@vendasta/conversation 0.24.0 → 0.26.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 +7 -2
- package/esm2020/lib/_internal/enums/common.enum.mjs +19 -0
- package/esm2020/lib/_internal/enums/index.mjs +3 -2
- package/esm2020/lib/_internal/enums/participant.enum.mjs +1 -13
- package/esm2020/lib/_internal/inbox.api.service.mjs +46 -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 +142 -2
- 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 +34 -1
- package/esm2020/lib/_internal/objects/index.mjs +5 -3
- package/esm2020/lib/index.mjs +2 -1
- package/fesm2015/vendasta-conversation.mjs +323 -27
- package/fesm2015/vendasta-conversation.mjs.map +1 -1
- package/fesm2020/vendasta-conversation.mjs +323 -27
- package/fesm2020/vendasta-conversation.mjs.map +1 -1
- package/lib/_internal/conversation.api.service.d.ts +3 -2
- package/lib/_internal/enums/common.enum.d.ts +11 -0
- package/lib/_internal/enums/index.d.ts +2 -1
- package/lib/_internal/enums/participant.enum.d.ts +0 -11
- package/lib/_internal/inbox.api.service.d.ts +17 -0
- package/lib/_internal/index.d.ts +1 -0
- package/lib/_internal/interfaces/api.interface.d.ts +21 -1
- 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 +6 -0
- package/lib/_internal/interfaces/index.d.ts +4 -2
- package/lib/_internal/objects/api.d.ts +39 -1
- 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 +9 -0
- package/lib/_internal/objects/index.d.ts +4 -2
- package/lib/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -26,6 +26,25 @@ var MessageType;
|
|
|
26
26
|
MessageType[MessageType["MESSAGE_TYPE_SYSTEM"] = 2] = "MESSAGE_TYPE_SYSTEM";
|
|
27
27
|
})(MessageType || (MessageType = {}));
|
|
28
28
|
|
|
29
|
+
// *********************************
|
|
30
|
+
// Code generated by sdkgen
|
|
31
|
+
// DO NOT EDIT!.
|
|
32
|
+
//
|
|
33
|
+
// Enums.
|
|
34
|
+
// *********************************
|
|
35
|
+
var GlobalParticipantType;
|
|
36
|
+
(function (GlobalParticipantType) {
|
|
37
|
+
GlobalParticipantType[GlobalParticipantType["GLOBAL_PARTICIPANT_TYPE_UNDEFINED"] = 0] = "GLOBAL_PARTICIPANT_TYPE_UNDEFINED";
|
|
38
|
+
GlobalParticipantType[GlobalParticipantType["GLOBAL_PARTICIPANT_TYPE_CUSTOMER"] = 1] = "GLOBAL_PARTICIPANT_TYPE_CUSTOMER";
|
|
39
|
+
GlobalParticipantType[GlobalParticipantType["GLOBAL_PARTICIPANT_TYPE_IAM_USER"] = 2] = "GLOBAL_PARTICIPANT_TYPE_IAM_USER";
|
|
40
|
+
GlobalParticipantType[GlobalParticipantType["GLOBAL_PARTICIPANT_TYPE_ACCOUNT_GROUP"] = 3] = "GLOBAL_PARTICIPANT_TYPE_ACCOUNT_GROUP";
|
|
41
|
+
GlobalParticipantType[GlobalParticipantType["GLOBAL_PARTICIPANT_TYPE_PARTNER"] = 4] = "GLOBAL_PARTICIPANT_TYPE_PARTNER";
|
|
42
|
+
GlobalParticipantType[GlobalParticipantType["GLOBAL_PARTICIPANT_TYPE_IAM_TEMPORARY_SUBJECT"] = 5] = "GLOBAL_PARTICIPANT_TYPE_IAM_TEMPORARY_SUBJECT";
|
|
43
|
+
GlobalParticipantType[GlobalParticipantType["GLOBAL_PARTICIPANT_TYPE_DIGITAL_AGENT"] = 6] = "GLOBAL_PARTICIPANT_TYPE_DIGITAL_AGENT";
|
|
44
|
+
GlobalParticipantType[GlobalParticipantType["GLOBAL_PARTICIPANT_TYPE_VENDOR"] = 7] = "GLOBAL_PARTICIPANT_TYPE_VENDOR";
|
|
45
|
+
GlobalParticipantType[GlobalParticipantType["GLOBAL_PARTICIPANT_TYPE_OPENAI_BOT"] = 8] = "GLOBAL_PARTICIPANT_TYPE_OPENAI_BOT";
|
|
46
|
+
})(GlobalParticipantType || (GlobalParticipantType = {}));
|
|
47
|
+
|
|
29
48
|
// *********************************
|
|
30
49
|
// Code generated by sdkgen
|
|
31
50
|
// DO NOT EDIT!.
|
|
@@ -58,18 +77,6 @@ var PlatformLocation;
|
|
|
58
77
|
//
|
|
59
78
|
// Enums.
|
|
60
79
|
// *********************************
|
|
61
|
-
var GlobalParticipantType;
|
|
62
|
-
(function (GlobalParticipantType) {
|
|
63
|
-
GlobalParticipantType[GlobalParticipantType["GLOBAL_PARTICIPANT_TYPE_UNDEFINED"] = 0] = "GLOBAL_PARTICIPANT_TYPE_UNDEFINED";
|
|
64
|
-
GlobalParticipantType[GlobalParticipantType["GLOBAL_PARTICIPANT_TYPE_CUSTOMER"] = 1] = "GLOBAL_PARTICIPANT_TYPE_CUSTOMER";
|
|
65
|
-
GlobalParticipantType[GlobalParticipantType["GLOBAL_PARTICIPANT_TYPE_IAM_USER"] = 2] = "GLOBAL_PARTICIPANT_TYPE_IAM_USER";
|
|
66
|
-
GlobalParticipantType[GlobalParticipantType["GLOBAL_PARTICIPANT_TYPE_ACCOUNT_GROUP"] = 3] = "GLOBAL_PARTICIPANT_TYPE_ACCOUNT_GROUP";
|
|
67
|
-
GlobalParticipantType[GlobalParticipantType["GLOBAL_PARTICIPANT_TYPE_PARTNER"] = 4] = "GLOBAL_PARTICIPANT_TYPE_PARTNER";
|
|
68
|
-
GlobalParticipantType[GlobalParticipantType["GLOBAL_PARTICIPANT_TYPE_IAM_TEMPORARY_SUBJECT"] = 5] = "GLOBAL_PARTICIPANT_TYPE_IAM_TEMPORARY_SUBJECT";
|
|
69
|
-
GlobalParticipantType[GlobalParticipantType["GLOBAL_PARTICIPANT_TYPE_DIGITAL_AGENT"] = 6] = "GLOBAL_PARTICIPANT_TYPE_DIGITAL_AGENT";
|
|
70
|
-
GlobalParticipantType[GlobalParticipantType["GLOBAL_PARTICIPANT_TYPE_VENDOR"] = 7] = "GLOBAL_PARTICIPANT_TYPE_VENDOR";
|
|
71
|
-
GlobalParticipantType[GlobalParticipantType["GLOBAL_PARTICIPANT_TYPE_OPENAI_BOT"] = 8] = "GLOBAL_PARTICIPANT_TYPE_OPENAI_BOT";
|
|
72
|
-
})(GlobalParticipantType || (GlobalParticipantType = {}));
|
|
73
80
|
var ParticipantType;
|
|
74
81
|
(function (ParticipantType) {
|
|
75
82
|
ParticipantType[ParticipantType["PARTICIPANT_TYPE_UNDEFINED"] = 0] = "PARTICIPANT_TYPE_UNDEFINED";
|
|
@@ -104,7 +111,7 @@ var SetLastSeenRequestStatus;
|
|
|
104
111
|
|
|
105
112
|
// *********************************
|
|
106
113
|
|
|
107
|
-
function enumStringToValue$
|
|
114
|
+
function enumStringToValue$6(enumRef, value) {
|
|
108
115
|
if (typeof value === 'number') {
|
|
109
116
|
return value;
|
|
110
117
|
}
|
|
@@ -121,7 +128,7 @@ class Message {
|
|
|
121
128
|
let m = new Message();
|
|
122
129
|
m = Object.assign(m, proto);
|
|
123
130
|
if (proto.type) {
|
|
124
|
-
m.type = enumStringToValue$
|
|
131
|
+
m.type = enumStringToValue$6(MessageType, proto.type);
|
|
125
132
|
}
|
|
126
133
|
if (proto.created) {
|
|
127
134
|
m.created = new Date(proto.created);
|
|
@@ -183,7 +190,7 @@ class ParticipantMessageStatus {
|
|
|
183
190
|
let m = new ParticipantMessageStatus();
|
|
184
191
|
m = Object.assign(m, proto);
|
|
185
192
|
if (proto.status) {
|
|
186
|
-
m.status = enumStringToValue$
|
|
193
|
+
m.status = enumStringToValue$6(MessageStatus, proto.status);
|
|
187
194
|
}
|
|
188
195
|
if (proto.updated) {
|
|
189
196
|
m.updated = new Date(proto.updated);
|
|
@@ -208,7 +215,40 @@ class ParticipantMessageStatus {
|
|
|
208
215
|
}
|
|
209
216
|
}
|
|
210
217
|
|
|
211
|
-
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) {
|
|
212
252
|
if (typeof value === 'number') {
|
|
213
253
|
return value;
|
|
214
254
|
}
|
|
@@ -225,7 +265,7 @@ class Conversation {
|
|
|
225
265
|
let m = new Conversation();
|
|
226
266
|
m = Object.assign(m, proto);
|
|
227
267
|
if (proto.channel) {
|
|
228
|
-
m.channel = enumStringToValue$
|
|
268
|
+
m.channel = enumStringToValue$4(ConversationChannel, proto.channel);
|
|
229
269
|
}
|
|
230
270
|
if (proto.created) {
|
|
231
271
|
m.created = new Date(proto.created);
|
|
@@ -240,7 +280,7 @@ class Conversation {
|
|
|
240
280
|
m.latestMsgSentTime = new Date(proto.latestMsgSentTime);
|
|
241
281
|
}
|
|
242
282
|
if (proto.originLocation) {
|
|
243
|
-
m.originLocation = enumStringToValue$
|
|
283
|
+
m.originLocation = enumStringToValue$4(PlatformLocation, proto.originLocation);
|
|
244
284
|
}
|
|
245
285
|
if (proto.lastSeenByParticipant) {
|
|
246
286
|
m.lastSeenByParticipant = proto.lastSeenByParticipant.map(LastSeenByParticipant.fromProto);
|
|
@@ -285,6 +325,38 @@ class Conversation {
|
|
|
285
325
|
return toReturn;
|
|
286
326
|
}
|
|
287
327
|
}
|
|
328
|
+
class ConversationKey {
|
|
329
|
+
constructor(kwargs) {
|
|
330
|
+
if (!kwargs) {
|
|
331
|
+
return;
|
|
332
|
+
}
|
|
333
|
+
Object.assign(this, kwargs);
|
|
334
|
+
}
|
|
335
|
+
static fromProto(proto) {
|
|
336
|
+
let m = new ConversationKey();
|
|
337
|
+
m = Object.assign(m, proto);
|
|
338
|
+
if (proto.subjectParticipants) {
|
|
339
|
+
m.subjectParticipants = proto.subjectParticipants.map(SubjectParticipant.fromProto);
|
|
340
|
+
}
|
|
341
|
+
if (proto.channel) {
|
|
342
|
+
m.channel = enumStringToValue$4(ConversationChannel, proto.channel);
|
|
343
|
+
}
|
|
344
|
+
return m;
|
|
345
|
+
}
|
|
346
|
+
toApiJson() {
|
|
347
|
+
const toReturn = {};
|
|
348
|
+
if (typeof this.subjectParticipants !== 'undefined' && this.subjectParticipants !== null) {
|
|
349
|
+
toReturn['subjectParticipants'] = 'toApiJson' in this.subjectParticipants ? this.subjectParticipants.toApiJson() : this.subjectParticipants;
|
|
350
|
+
}
|
|
351
|
+
if (typeof this.channel !== 'undefined') {
|
|
352
|
+
toReturn['channel'] = this.channel;
|
|
353
|
+
}
|
|
354
|
+
if (typeof this.originLocationExternalId !== 'undefined') {
|
|
355
|
+
toReturn['originLocationExternalId'] = this.originLocationExternalId;
|
|
356
|
+
}
|
|
357
|
+
return toReturn;
|
|
358
|
+
}
|
|
359
|
+
}
|
|
288
360
|
class LastSeenByParticipant {
|
|
289
361
|
constructor(kwargs) {
|
|
290
362
|
if (!kwargs) {
|
|
@@ -312,7 +384,7 @@ class LastSeenByParticipant {
|
|
|
312
384
|
}
|
|
313
385
|
}
|
|
314
386
|
|
|
315
|
-
function enumStringToValue$
|
|
387
|
+
function enumStringToValue$3(enumRef, value) {
|
|
316
388
|
if (typeof value === 'number') {
|
|
317
389
|
return value;
|
|
318
390
|
}
|
|
@@ -364,10 +436,10 @@ class Participant {
|
|
|
364
436
|
let m = new Participant();
|
|
365
437
|
m = Object.assign(m, proto);
|
|
366
438
|
if (proto.location) {
|
|
367
|
-
m.location = enumStringToValue$
|
|
439
|
+
m.location = enumStringToValue$3(PlatformLocation, proto.location);
|
|
368
440
|
}
|
|
369
441
|
if (proto.channel) {
|
|
370
|
-
m.channel = enumStringToValue$
|
|
442
|
+
m.channel = enumStringToValue$3(ConversationChannel, proto.channel);
|
|
371
443
|
}
|
|
372
444
|
if (proto.created) {
|
|
373
445
|
m.created = new Date(proto.created);
|
|
@@ -379,7 +451,7 @@ class Participant {
|
|
|
379
451
|
m.deleted = new Date(proto.deleted);
|
|
380
452
|
}
|
|
381
453
|
if (proto.participantType) {
|
|
382
|
-
m.participantType = enumStringToValue$
|
|
454
|
+
m.participantType = enumStringToValue$3(ParticipantType, proto.participantType);
|
|
383
455
|
}
|
|
384
456
|
if (proto.address) {
|
|
385
457
|
m.address = Address.fromProto(proto.address);
|
|
@@ -456,13 +528,13 @@ class ParticipantKey {
|
|
|
456
528
|
let m = new ParticipantKey();
|
|
457
529
|
m = Object.assign(m, proto);
|
|
458
530
|
if (proto.location) {
|
|
459
|
-
m.location = enumStringToValue$
|
|
531
|
+
m.location = enumStringToValue$3(PlatformLocation, proto.location);
|
|
460
532
|
}
|
|
461
533
|
if (proto.channels) {
|
|
462
|
-
m.channels = proto.channels.map((v) => enumStringToValue$
|
|
534
|
+
m.channels = proto.channels.map((v) => enumStringToValue$3(ConversationChannel, v));
|
|
463
535
|
}
|
|
464
536
|
if (proto.participantType) {
|
|
465
|
-
m.participantType = enumStringToValue$
|
|
537
|
+
m.participantType = enumStringToValue$3(GlobalParticipantType, proto.participantType);
|
|
466
538
|
}
|
|
467
539
|
return m;
|
|
468
540
|
}
|
|
@@ -490,7 +562,7 @@ class ParticipantKey {
|
|
|
490
562
|
}
|
|
491
563
|
}
|
|
492
564
|
|
|
493
|
-
function enumStringToValue$
|
|
565
|
+
function enumStringToValue$2(enumRef, value) {
|
|
494
566
|
if (typeof value === 'number') {
|
|
495
567
|
return value;
|
|
496
568
|
}
|
|
@@ -520,6 +592,54 @@ class Access {
|
|
|
520
592
|
}
|
|
521
593
|
}
|
|
522
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
|
+
|
|
523
643
|
function enumStringToValue(enumRef, value) {
|
|
524
644
|
if (typeof value === 'number') {
|
|
525
645
|
return value;
|
|
@@ -900,6 +1020,98 @@ class GetMultiConversationDetailsResponseDetailedConversation {
|
|
|
900
1020
|
return toReturn;
|
|
901
1021
|
}
|
|
902
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
|
+
}
|
|
1069
|
+
class GetConversationByKeyRequest {
|
|
1070
|
+
constructor(kwargs) {
|
|
1071
|
+
if (!kwargs) {
|
|
1072
|
+
return;
|
|
1073
|
+
}
|
|
1074
|
+
Object.assign(this, kwargs);
|
|
1075
|
+
}
|
|
1076
|
+
static fromProto(proto) {
|
|
1077
|
+
let m = new GetConversationByKeyRequest();
|
|
1078
|
+
m = Object.assign(m, proto);
|
|
1079
|
+
if (proto.conversationKey) {
|
|
1080
|
+
m.conversationKey = ConversationKey.fromProto(proto.conversationKey);
|
|
1081
|
+
}
|
|
1082
|
+
return m;
|
|
1083
|
+
}
|
|
1084
|
+
toApiJson() {
|
|
1085
|
+
const toReturn = {};
|
|
1086
|
+
if (typeof this.conversationKey !== 'undefined' && this.conversationKey !== null) {
|
|
1087
|
+
toReturn['conversationKey'] = 'toApiJson' in this.conversationKey ? this.conversationKey.toApiJson() : this.conversationKey;
|
|
1088
|
+
}
|
|
1089
|
+
return toReturn;
|
|
1090
|
+
}
|
|
1091
|
+
}
|
|
1092
|
+
class GetConversationByKeyResponse {
|
|
1093
|
+
constructor(kwargs) {
|
|
1094
|
+
if (!kwargs) {
|
|
1095
|
+
return;
|
|
1096
|
+
}
|
|
1097
|
+
Object.assign(this, kwargs);
|
|
1098
|
+
}
|
|
1099
|
+
static fromProto(proto) {
|
|
1100
|
+
let m = new GetConversationByKeyResponse();
|
|
1101
|
+
m = Object.assign(m, proto);
|
|
1102
|
+
if (proto.conversation) {
|
|
1103
|
+
m.conversation = Conversation.fromProto(proto.conversation);
|
|
1104
|
+
}
|
|
1105
|
+
return m;
|
|
1106
|
+
}
|
|
1107
|
+
toApiJson() {
|
|
1108
|
+
const toReturn = {};
|
|
1109
|
+
if (typeof this.conversation !== 'undefined' && this.conversation !== null) {
|
|
1110
|
+
toReturn['conversation'] = 'toApiJson' in this.conversation ? this.conversation.toApiJson() : this.conversation;
|
|
1111
|
+
}
|
|
1112
|
+
return toReturn;
|
|
1113
|
+
}
|
|
1114
|
+
}
|
|
903
1115
|
class GetMessageRequest {
|
|
904
1116
|
constructor(kwargs) {
|
|
905
1117
|
if (!kwargs) {
|
|
@@ -1720,6 +1932,52 @@ class UpdateMessageStatusRequest {
|
|
|
1720
1932
|
return toReturn;
|
|
1721
1933
|
}
|
|
1722
1934
|
}
|
|
1935
|
+
class UpsertConfigurationRequest {
|
|
1936
|
+
constructor(kwargs) {
|
|
1937
|
+
if (!kwargs) {
|
|
1938
|
+
return;
|
|
1939
|
+
}
|
|
1940
|
+
Object.assign(this, kwargs);
|
|
1941
|
+
}
|
|
1942
|
+
static fromProto(proto) {
|
|
1943
|
+
let m = new UpsertConfigurationRequest();
|
|
1944
|
+
m = Object.assign(m, proto);
|
|
1945
|
+
if (proto.configuration) {
|
|
1946
|
+
m.configuration = Configuration.fromProto(proto.configuration);
|
|
1947
|
+
}
|
|
1948
|
+
return m;
|
|
1949
|
+
}
|
|
1950
|
+
toApiJson() {
|
|
1951
|
+
const toReturn = {};
|
|
1952
|
+
if (typeof this.configuration !== 'undefined' && this.configuration !== null) {
|
|
1953
|
+
toReturn['configuration'] = 'toApiJson' in this.configuration ? this.configuration.toApiJson() : this.configuration;
|
|
1954
|
+
}
|
|
1955
|
+
return toReturn;
|
|
1956
|
+
}
|
|
1957
|
+
}
|
|
1958
|
+
class UpsertConfigurationResponse {
|
|
1959
|
+
constructor(kwargs) {
|
|
1960
|
+
if (!kwargs) {
|
|
1961
|
+
return;
|
|
1962
|
+
}
|
|
1963
|
+
Object.assign(this, kwargs);
|
|
1964
|
+
}
|
|
1965
|
+
static fromProto(proto) {
|
|
1966
|
+
let m = new UpsertConfigurationResponse();
|
|
1967
|
+
m = Object.assign(m, proto);
|
|
1968
|
+
if (proto.configuration) {
|
|
1969
|
+
m.configuration = Configuration.fromProto(proto.configuration);
|
|
1970
|
+
}
|
|
1971
|
+
return m;
|
|
1972
|
+
}
|
|
1973
|
+
toApiJson() {
|
|
1974
|
+
const toReturn = {};
|
|
1975
|
+
if (typeof this.configuration !== 'undefined' && this.configuration !== null) {
|
|
1976
|
+
toReturn['configuration'] = 'toApiJson' in this.configuration ? this.configuration.toApiJson() : this.configuration;
|
|
1977
|
+
}
|
|
1978
|
+
return toReturn;
|
|
1979
|
+
}
|
|
1980
|
+
}
|
|
1723
1981
|
|
|
1724
1982
|
// *********************************
|
|
1725
1983
|
|
|
@@ -1790,6 +2048,11 @@ class ConversationApiService {
|
|
|
1790
2048
|
return this.http.post(this._host + "/conversation.v1.ConversationService/LookupConversations", request.toApiJson(), this.apiOptions())
|
|
1791
2049
|
.pipe(map(resp => LookupConversationsResponse.fromProto(resp)));
|
|
1792
2050
|
}
|
|
2051
|
+
getConversationByKey(r) {
|
|
2052
|
+
const request = (r.toApiJson) ? r : new GetConversationByKeyRequest(r);
|
|
2053
|
+
return this.http.post(this._host + "/conversation.v1.ConversationService/GetConversationByKey", request.toApiJson(), this.apiOptions())
|
|
2054
|
+
.pipe(map(resp => GetConversationByKeyResponse.fromProto(resp)));
|
|
2055
|
+
}
|
|
1793
2056
|
createConversation(r) {
|
|
1794
2057
|
const request = (r.toApiJson) ? r : new CreateConversationRequest(r);
|
|
1795
2058
|
return this.http.post(this._host + "/conversation.v1.ConversationService/CreateConversation", request.toApiJson(), this.apiOptions())
|
|
@@ -1855,11 +2118,44 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImpor
|
|
|
1855
2118
|
args: [{ providedIn: 'root' }]
|
|
1856
2119
|
}], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: HostService }]; } });
|
|
1857
2120
|
|
|
2121
|
+
// *********************************
|
|
2122
|
+
class InboxApiService {
|
|
2123
|
+
constructor(http, hostService) {
|
|
2124
|
+
this.http = http;
|
|
2125
|
+
this.hostService = hostService;
|
|
2126
|
+
this._host = this.hostService.hostWithScheme;
|
|
2127
|
+
}
|
|
2128
|
+
apiOptions() {
|
|
2129
|
+
return {
|
|
2130
|
+
headers: new HttpHeaders({
|
|
2131
|
+
'Content-Type': 'application/json'
|
|
2132
|
+
}),
|
|
2133
|
+
withCredentials: true
|
|
2134
|
+
};
|
|
2135
|
+
}
|
|
2136
|
+
getConfiguration(r) {
|
|
2137
|
+
const request = (r.toApiJson) ? r : new GetConfigurationRequest(r);
|
|
2138
|
+
return this.http.post(this._host + "/conversation.v1.InboxService/GetConfiguration", request.toApiJson(), this.apiOptions())
|
|
2139
|
+
.pipe(map(resp => GetConfigurationResponse.fromProto(resp)));
|
|
2140
|
+
}
|
|
2141
|
+
upsertConfiguration(r) {
|
|
2142
|
+
const request = (r.toApiJson) ? r : new UpsertConfigurationRequest(r);
|
|
2143
|
+
return this.http.post(this._host + "/conversation.v1.InboxService/UpsertConfiguration", request.toApiJson(), this.apiOptions())
|
|
2144
|
+
.pipe(map(resp => UpsertConfigurationResponse.fromProto(resp)));
|
|
2145
|
+
}
|
|
2146
|
+
}
|
|
2147
|
+
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 });
|
|
2148
|
+
InboxApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: InboxApiService, providedIn: 'root' });
|
|
2149
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: InboxApiService, decorators: [{
|
|
2150
|
+
type: Injectable,
|
|
2151
|
+
args: [{ providedIn: 'root' }]
|
|
2152
|
+
}], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: HostService }]; } });
|
|
2153
|
+
|
|
1858
2154
|
// *********************************
|
|
1859
2155
|
|
|
1860
2156
|
/**
|
|
1861
2157
|
* Generated bundle index. Do not edit.
|
|
1862
2158
|
*/
|
|
1863
2159
|
|
|
1864
|
-
export { Access, AddMultiParticipantsRequest, AddMultiParticipantsResponse, Address, Conversation, ConversationApiService, ConversationChannel, ConversationMessageCount, CreateConversationRequest, CreateConversationResponse, CreateMultiMessagesRequest, DeleteConversationRequest, DeleteMessageRequest, 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, UpdateMessageStatusRequest };
|
|
2160
|
+
export { Access, AddMultiParticipantsRequest, AddMultiParticipantsResponse, Address, Configuration, Conversation, ConversationApiService, ConversationChannel, ConversationKey, ConversationMessageCount, CreateConversationRequest, CreateConversationResponse, CreateMultiMessagesRequest, DeleteConversationRequest, DeleteMessageRequest, GetConfigurationRequest, GetConfigurationResponse, GetConversationByKeyRequest, GetConversationByKeyResponse, GetMessageRequest, 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 };
|
|
1865
2161
|
//# sourceMappingURL=vendasta-conversation.mjs.map
|