@vendasta/conversation 0.11.0 → 0.12.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/bundles/vendasta-conversation.umd.js +113 -12
- package/bundles/vendasta-conversation.umd.js.map +1 -1
- package/bundles/vendasta-conversation.umd.min.js +1 -1
- package/bundles/vendasta-conversation.umd.min.js.map +1 -1
- package/esm2015/lib/_internal/conversation.api.service.js +7 -2
- package/esm2015/lib/_internal/interfaces/api.interface.js +1 -1
- package/esm2015/lib/_internal/interfaces/index.js +1 -1
- package/esm2015/lib/_internal/interfaces/participant.interface.js +1 -1
- package/esm2015/lib/_internal/objects/api.js +54 -5
- package/esm2015/lib/_internal/objects/index.js +3 -3
- package/esm2015/lib/_internal/objects/participant.js +42 -1
- package/fesm2015/vendasta-conversation.js +100 -5
- package/fesm2015/vendasta-conversation.js.map +1 -1
- package/lib/_internal/conversation.api.service.d.ts +3 -2
- package/lib/_internal/interfaces/api.interface.d.ts +7 -0
- package/lib/_internal/interfaces/index.d.ts +2 -2
- package/lib/_internal/interfaces/participant.interface.d.ts +9 -0
- package/lib/_internal/objects/api.d.ts +19 -6
- package/lib/_internal/objects/index.d.ts +2 -2
- package/lib/_internal/objects/participant.d.ts +12 -0
- package/package.json +1 -1
- package/vendasta-conversation.metadata.json +1 -1
|
@@ -243,6 +243,42 @@
|
|
|
243
243
|
}
|
|
244
244
|
return enumRef[value];
|
|
245
245
|
}
|
|
246
|
+
var Address = /** @class */ (function () {
|
|
247
|
+
function Address(kwargs) {
|
|
248
|
+
if (!kwargs) {
|
|
249
|
+
return;
|
|
250
|
+
}
|
|
251
|
+
Object.assign(this, kwargs);
|
|
252
|
+
}
|
|
253
|
+
Address.fromProto = function (proto) {
|
|
254
|
+
var m = new Address();
|
|
255
|
+
m = Object.assign(m, proto);
|
|
256
|
+
return m;
|
|
257
|
+
};
|
|
258
|
+
Address.prototype.toApiJson = function () {
|
|
259
|
+
var toReturn = {};
|
|
260
|
+
if (typeof this.firstLineAddress !== 'undefined') {
|
|
261
|
+
toReturn['firstLineAddress'] = this.firstLineAddress;
|
|
262
|
+
}
|
|
263
|
+
if (typeof this.secondLineAddress !== 'undefined') {
|
|
264
|
+
toReturn['secondLineAddress'] = this.secondLineAddress;
|
|
265
|
+
}
|
|
266
|
+
if (typeof this.city !== 'undefined') {
|
|
267
|
+
toReturn['city'] = this.city;
|
|
268
|
+
}
|
|
269
|
+
if (typeof this.state !== 'undefined') {
|
|
270
|
+
toReturn['state'] = this.state;
|
|
271
|
+
}
|
|
272
|
+
if (typeof this.country !== 'undefined') {
|
|
273
|
+
toReturn['country'] = this.country;
|
|
274
|
+
}
|
|
275
|
+
if (typeof this.zipCode !== 'undefined') {
|
|
276
|
+
toReturn['zipCode'] = this.zipCode;
|
|
277
|
+
}
|
|
278
|
+
return toReturn;
|
|
279
|
+
};
|
|
280
|
+
return Address;
|
|
281
|
+
}());
|
|
246
282
|
var Participant = /** @class */ (function () {
|
|
247
283
|
function Participant(kwargs) {
|
|
248
284
|
if (!kwargs) {
|
|
@@ -271,6 +307,9 @@
|
|
|
271
307
|
if (proto.participantType) {
|
|
272
308
|
m.participantType = enumStringToValue$2(exports.ParticipantType, proto.participantType);
|
|
273
309
|
}
|
|
310
|
+
if (proto.address) {
|
|
311
|
+
m.address = Address.fromProto(proto.address);
|
|
312
|
+
}
|
|
274
313
|
return m;
|
|
275
314
|
};
|
|
276
315
|
Participant.prototype.toApiJson = function () {
|
|
@@ -317,6 +356,9 @@
|
|
|
317
356
|
if (typeof this.phoneNumber !== 'undefined') {
|
|
318
357
|
toReturn['phoneNumber'] = this.phoneNumber;
|
|
319
358
|
}
|
|
359
|
+
if (typeof this.address !== 'undefined' && this.address !== null) {
|
|
360
|
+
toReturn['address'] = 'toApiJson' in this.address ? this.address.toApiJson() : this.address;
|
|
361
|
+
}
|
|
320
362
|
return toReturn;
|
|
321
363
|
};
|
|
322
364
|
return Participant;
|
|
@@ -328,6 +370,57 @@
|
|
|
328
370
|
}
|
|
329
371
|
return enumRef[value];
|
|
330
372
|
}
|
|
373
|
+
var AddMultiParticipantsRequest = /** @class */ (function () {
|
|
374
|
+
function AddMultiParticipantsRequest(kwargs) {
|
|
375
|
+
if (!kwargs) {
|
|
376
|
+
return;
|
|
377
|
+
}
|
|
378
|
+
Object.assign(this, kwargs);
|
|
379
|
+
}
|
|
380
|
+
AddMultiParticipantsRequest.fromProto = function (proto) {
|
|
381
|
+
var m = new AddMultiParticipantsRequest();
|
|
382
|
+
m = Object.assign(m, proto);
|
|
383
|
+
if (proto.participants) {
|
|
384
|
+
m.participants = proto.participants.map(Participant.fromProto);
|
|
385
|
+
}
|
|
386
|
+
return m;
|
|
387
|
+
};
|
|
388
|
+
AddMultiParticipantsRequest.prototype.toApiJson = function () {
|
|
389
|
+
var toReturn = {};
|
|
390
|
+
if (typeof this.conversationId !== 'undefined') {
|
|
391
|
+
toReturn['conversationId'] = this.conversationId;
|
|
392
|
+
}
|
|
393
|
+
if (typeof this.participants !== 'undefined' && this.participants !== null) {
|
|
394
|
+
toReturn['participants'] = 'toApiJson' in this.participants ? this.participants.toApiJson() : this.participants;
|
|
395
|
+
}
|
|
396
|
+
return toReturn;
|
|
397
|
+
};
|
|
398
|
+
return AddMultiParticipantsRequest;
|
|
399
|
+
}());
|
|
400
|
+
var AddMultiParticipantsResponse = /** @class */ (function () {
|
|
401
|
+
function AddMultiParticipantsResponse(kwargs) {
|
|
402
|
+
if (!kwargs) {
|
|
403
|
+
return;
|
|
404
|
+
}
|
|
405
|
+
Object.assign(this, kwargs);
|
|
406
|
+
}
|
|
407
|
+
AddMultiParticipantsResponse.fromProto = function (proto) {
|
|
408
|
+
var m = new AddMultiParticipantsResponse();
|
|
409
|
+
m = Object.assign(m, proto);
|
|
410
|
+
if (proto.participants) {
|
|
411
|
+
m.participants = proto.participants.map(Participant.fromProto);
|
|
412
|
+
}
|
|
413
|
+
return m;
|
|
414
|
+
};
|
|
415
|
+
AddMultiParticipantsResponse.prototype.toApiJson = function () {
|
|
416
|
+
var toReturn = {};
|
|
417
|
+
if (typeof this.participants !== 'undefined' && this.participants !== null) {
|
|
418
|
+
toReturn['participants'] = 'toApiJson' in this.participants ? this.participants.toApiJson() : this.participants;
|
|
419
|
+
}
|
|
420
|
+
return toReturn;
|
|
421
|
+
};
|
|
422
|
+
return AddMultiParticipantsResponse;
|
|
423
|
+
}());
|
|
331
424
|
var ConversationMessageCount = /** @class */ (function () {
|
|
332
425
|
function ConversationMessageCount(kwargs) {
|
|
333
426
|
if (!kwargs) {
|
|
@@ -592,15 +685,15 @@
|
|
|
592
685
|
};
|
|
593
686
|
return DeleteMessageRequest;
|
|
594
687
|
}());
|
|
595
|
-
var
|
|
596
|
-
function
|
|
688
|
+
var GetMultiConversationDetailsResponseDetailedConversation = /** @class */ (function () {
|
|
689
|
+
function GetMultiConversationDetailsResponseDetailedConversation(kwargs) {
|
|
597
690
|
if (!kwargs) {
|
|
598
691
|
return;
|
|
599
692
|
}
|
|
600
693
|
Object.assign(this, kwargs);
|
|
601
694
|
}
|
|
602
|
-
|
|
603
|
-
var m = new
|
|
695
|
+
GetMultiConversationDetailsResponseDetailedConversation.fromProto = function (proto) {
|
|
696
|
+
var m = new GetMultiConversationDetailsResponseDetailedConversation();
|
|
604
697
|
m = Object.assign(m, proto);
|
|
605
698
|
if (proto.conversation) {
|
|
606
699
|
m.conversation = Conversation.fromProto(proto.conversation);
|
|
@@ -613,7 +706,7 @@
|
|
|
613
706
|
}
|
|
614
707
|
return m;
|
|
615
708
|
};
|
|
616
|
-
|
|
709
|
+
GetMultiConversationDetailsResponseDetailedConversation.prototype.toApiJson = function () {
|
|
617
710
|
var toReturn = {};
|
|
618
711
|
if (typeof this.conversation !== 'undefined' && this.conversation !== null) {
|
|
619
712
|
toReturn['conversation'] = 'toApiJson' in this.conversation ? this.conversation.toApiJson() : this.conversation;
|
|
@@ -626,17 +719,17 @@
|
|
|
626
719
|
}
|
|
627
720
|
return toReturn;
|
|
628
721
|
};
|
|
629
|
-
return
|
|
722
|
+
return GetMultiConversationDetailsResponseDetailedConversation;
|
|
630
723
|
}());
|
|
631
|
-
var
|
|
632
|
-
function
|
|
724
|
+
var SearchConversationsResponseDetailedConversation = /** @class */ (function () {
|
|
725
|
+
function SearchConversationsResponseDetailedConversation(kwargs) {
|
|
633
726
|
if (!kwargs) {
|
|
634
727
|
return;
|
|
635
728
|
}
|
|
636
729
|
Object.assign(this, kwargs);
|
|
637
730
|
}
|
|
638
|
-
|
|
639
|
-
var m = new
|
|
731
|
+
SearchConversationsResponseDetailedConversation.fromProto = function (proto) {
|
|
732
|
+
var m = new SearchConversationsResponseDetailedConversation();
|
|
640
733
|
m = Object.assign(m, proto);
|
|
641
734
|
if (proto.conversation) {
|
|
642
735
|
m.conversation = Conversation.fromProto(proto.conversation);
|
|
@@ -649,7 +742,7 @@
|
|
|
649
742
|
}
|
|
650
743
|
return m;
|
|
651
744
|
};
|
|
652
|
-
|
|
745
|
+
SearchConversationsResponseDetailedConversation.prototype.toApiJson = function () {
|
|
653
746
|
var toReturn = {};
|
|
654
747
|
if (typeof this.conversation !== 'undefined' && this.conversation !== null) {
|
|
655
748
|
toReturn['conversation'] = 'toApiJson' in this.conversation ? this.conversation.toApiJson() : this.conversation;
|
|
@@ -662,7 +755,7 @@
|
|
|
662
755
|
}
|
|
663
756
|
return toReturn;
|
|
664
757
|
};
|
|
665
|
-
return
|
|
758
|
+
return SearchConversationsResponseDetailedConversation;
|
|
666
759
|
}());
|
|
667
760
|
var GetMessageRequest = /** @class */ (function () {
|
|
668
761
|
function GetMessageRequest(kwargs) {
|
|
@@ -1545,6 +1638,11 @@
|
|
|
1545
1638
|
return this.http.post(this.hostService.hostWithScheme() + "/conversation.v1.ConversationService/GetMultiConversationMessageCount", request.toApiJson(), this.apiOptions())
|
|
1546
1639
|
.pipe(operators.map(function (resp) { return GetMultiConversationMessageCountResponse.fromProto(resp); }), operators.share());
|
|
1547
1640
|
};
|
|
1641
|
+
ConversationApiService.prototype.addMultiParticipants = function (r) {
|
|
1642
|
+
var request = (r.toApiJson) ? r : new AddMultiParticipantsRequest(r);
|
|
1643
|
+
return this.http.post(this.hostService.hostWithScheme() + "/conversation.v1.ConversationService/AddMultiParticipants", request.toApiJson(), this.apiOptions())
|
|
1644
|
+
.pipe(operators.map(function (resp) { return AddMultiParticipantsResponse.fromProto(resp); }), operators.share());
|
|
1645
|
+
};
|
|
1548
1646
|
return ConversationApiService;
|
|
1549
1647
|
}());
|
|
1550
1648
|
ConversationApiService.ɵprov = i0.ɵɵdefineInjectable({ factory: function ConversationApiService_Factory() { return new ConversationApiService(i0.ɵɵinject(i1$1.HttpClient), i0.ɵɵinject(HostService)); }, token: ConversationApiService, providedIn: "root" });
|
|
@@ -1562,6 +1660,9 @@
|
|
|
1562
1660
|
* Generated bundle index. Do not edit.
|
|
1563
1661
|
*/
|
|
1564
1662
|
|
|
1663
|
+
exports.AddMultiParticipantsRequest = AddMultiParticipantsRequest;
|
|
1664
|
+
exports.AddMultiParticipantsResponse = AddMultiParticipantsResponse;
|
|
1665
|
+
exports.Address = Address;
|
|
1565
1666
|
exports.Conversation = Conversation;
|
|
1566
1667
|
exports.ConversationApiService = ConversationApiService;
|
|
1567
1668
|
exports.ConversationMessageCount = ConversationMessageCount;
|