@vendasta/conversation 0.15.0 → 0.19.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/_generated/host.service.mjs +1 -1
- package/esm2020/lib/_internal/conversation.api.service.mjs +8 -3
- package/esm2020/lib/_internal/enums/index.mjs +2 -2
- package/esm2020/lib/_internal/enums/participant.enum.mjs +12 -1
- package/esm2020/lib/_internal/interfaces/api.interface.mjs +1 -1
- package/esm2020/lib/_internal/interfaces/index.mjs +1 -1
- package/esm2020/lib/_internal/interfaces/participant.interface.mjs +1 -1
- package/esm2020/lib/_internal/objects/api.mjs +60 -2
- package/esm2020/lib/_internal/objects/index.mjs +3 -3
- package/esm2020/lib/_internal/objects/participant.mjs +48 -1
- package/esm2020/public_api.mjs +1 -1
- package/fesm2015/vendasta-conversation.mjs +122 -1
- package/fesm2015/vendasta-conversation.mjs.map +1 -1
- package/fesm2020/vendasta-conversation.mjs +122 -1
- package/fesm2020/vendasta-conversation.mjs.map +1 -1
- package/lib/_internal/conversation.api.service.d.ts +3 -2
- package/lib/_internal/enums/index.d.ts +1 -1
- package/lib/_internal/enums/participant.enum.d.ts +10 -0
- package/lib/_internal/interfaces/api.interface.d.ts +10 -1
- 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 +16 -1
- package/lib/_internal/objects/index.d.ts +2 -2
- package/lib/_internal/objects/participant.d.ts +12 -0
- package/package.json +1 -1
|
@@ -56,6 +56,17 @@ var PlatformLocation;
|
|
|
56
56
|
//
|
|
57
57
|
// Enums.
|
|
58
58
|
// *********************************
|
|
59
|
+
var GlobalParticipantType;
|
|
60
|
+
(function (GlobalParticipantType) {
|
|
61
|
+
GlobalParticipantType[GlobalParticipantType["GLOBAL_PARTICIPANT_TYPE_UNDEFINED"] = 0] = "GLOBAL_PARTICIPANT_TYPE_UNDEFINED";
|
|
62
|
+
GlobalParticipantType[GlobalParticipantType["GLOBAL_PARTICIPANT_TYPE_CUSTOMER"] = 1] = "GLOBAL_PARTICIPANT_TYPE_CUSTOMER";
|
|
63
|
+
GlobalParticipantType[GlobalParticipantType["GLOBAL_PARTICIPANT_TYPE_IAM_USER"] = 2] = "GLOBAL_PARTICIPANT_TYPE_IAM_USER";
|
|
64
|
+
GlobalParticipantType[GlobalParticipantType["GLOBAL_PARTICIPANT_TYPE_ACCOUNT_GROUP"] = 3] = "GLOBAL_PARTICIPANT_TYPE_ACCOUNT_GROUP";
|
|
65
|
+
GlobalParticipantType[GlobalParticipantType["GLOBAL_PARTICIPANT_TYPE_PARTNER"] = 4] = "GLOBAL_PARTICIPANT_TYPE_PARTNER";
|
|
66
|
+
GlobalParticipantType[GlobalParticipantType["GLOBAL_PARTICIPANT_TYPE_IAM_TEMPORARY_SUBJECT"] = 5] = "GLOBAL_PARTICIPANT_TYPE_IAM_TEMPORARY_SUBJECT";
|
|
67
|
+
GlobalParticipantType[GlobalParticipantType["GLOBAL_PARTICIPANT_TYPE_DIGITAL_AGENT"] = 6] = "GLOBAL_PARTICIPANT_TYPE_DIGITAL_AGENT";
|
|
68
|
+
GlobalParticipantType[GlobalParticipantType["GLOBAL_PARTICIPANT_TYPE_VENDOR"] = 7] = "GLOBAL_PARTICIPANT_TYPE_VENDOR";
|
|
69
|
+
})(GlobalParticipantType || (GlobalParticipantType = {}));
|
|
59
70
|
var ParticipantType;
|
|
60
71
|
(function (ParticipantType) {
|
|
61
72
|
ParticipantType[ParticipantType["PARTICIPANT_TYPE_UNDEFINED"] = 0] = "PARTICIPANT_TYPE_UNDEFINED";
|
|
@@ -384,6 +395,53 @@ class Participant {
|
|
|
384
395
|
if (typeof this.isSubjectParticipant !== 'undefined') {
|
|
385
396
|
toReturn['isSubjectParticipant'] = this.isSubjectParticipant;
|
|
386
397
|
}
|
|
398
|
+
if (typeof this.isParticipantInternalInfoDeleted !== 'undefined') {
|
|
399
|
+
toReturn['isParticipantInternalInfoDeleted'] = this.isParticipantInternalInfoDeleted;
|
|
400
|
+
}
|
|
401
|
+
return toReturn;
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
class ParticipantKey {
|
|
405
|
+
constructor(kwargs) {
|
|
406
|
+
if (!kwargs) {
|
|
407
|
+
return;
|
|
408
|
+
}
|
|
409
|
+
Object.assign(this, kwargs);
|
|
410
|
+
}
|
|
411
|
+
static fromProto(proto) {
|
|
412
|
+
let m = new ParticipantKey();
|
|
413
|
+
m = Object.assign(m, proto);
|
|
414
|
+
if (proto.location) {
|
|
415
|
+
m.location = enumStringToValue$1(PlatformLocation, proto.location);
|
|
416
|
+
}
|
|
417
|
+
if (proto.channels) {
|
|
418
|
+
m.channels = proto.channels.map((v) => enumStringToValue$1(ConversationChannel, v));
|
|
419
|
+
}
|
|
420
|
+
if (proto.participantType) {
|
|
421
|
+
m.participantType = enumStringToValue$1(GlobalParticipantType, proto.participantType);
|
|
422
|
+
}
|
|
423
|
+
return m;
|
|
424
|
+
}
|
|
425
|
+
toApiJson() {
|
|
426
|
+
const toReturn = {};
|
|
427
|
+
if (typeof this.internalParticipantId !== 'undefined') {
|
|
428
|
+
toReturn['internalParticipantId'] = this.internalParticipantId;
|
|
429
|
+
}
|
|
430
|
+
if (typeof this.partnerId !== 'undefined') {
|
|
431
|
+
toReturn['partnerId'] = this.partnerId;
|
|
432
|
+
}
|
|
433
|
+
if (typeof this.accountGroupId !== 'undefined') {
|
|
434
|
+
toReturn['accountGroupId'] = this.accountGroupId;
|
|
435
|
+
}
|
|
436
|
+
if (typeof this.location !== 'undefined') {
|
|
437
|
+
toReturn['location'] = this.location;
|
|
438
|
+
}
|
|
439
|
+
if (typeof this.channels !== 'undefined') {
|
|
440
|
+
toReturn['channels'] = this.channels;
|
|
441
|
+
}
|
|
442
|
+
if (typeof this.participantType !== 'undefined') {
|
|
443
|
+
toReturn['participantType'] = this.participantType;
|
|
444
|
+
}
|
|
387
445
|
return toReturn;
|
|
388
446
|
}
|
|
389
447
|
}
|
|
@@ -897,6 +955,9 @@ class GetMultiMessagesRequest {
|
|
|
897
955
|
if (typeof this.messageIds !== 'undefined') {
|
|
898
956
|
toReturn['messageIds'] = this.messageIds;
|
|
899
957
|
}
|
|
958
|
+
if (typeof this.conversationId !== 'undefined') {
|
|
959
|
+
toReturn['conversationId'] = this.conversationId;
|
|
960
|
+
}
|
|
900
961
|
return toReturn;
|
|
901
962
|
}
|
|
902
963
|
}
|
|
@@ -940,6 +1001,9 @@ class GetMultiParticipantsRequest {
|
|
|
940
1001
|
if (typeof this.participantIds !== 'undefined') {
|
|
941
1002
|
toReturn['participantIds'] = this.participantIds;
|
|
942
1003
|
}
|
|
1004
|
+
if (typeof this.conversationId !== 'undefined') {
|
|
1005
|
+
toReturn['conversationId'] = this.conversationId;
|
|
1006
|
+
}
|
|
943
1007
|
return toReturn;
|
|
944
1008
|
}
|
|
945
1009
|
}
|
|
@@ -966,6 +1030,52 @@ class GetMultiParticipantsResponse {
|
|
|
966
1030
|
return toReturn;
|
|
967
1031
|
}
|
|
968
1032
|
}
|
|
1033
|
+
class GetParticipantsByKeyRequest {
|
|
1034
|
+
constructor(kwargs) {
|
|
1035
|
+
if (!kwargs) {
|
|
1036
|
+
return;
|
|
1037
|
+
}
|
|
1038
|
+
Object.assign(this, kwargs);
|
|
1039
|
+
}
|
|
1040
|
+
static fromProto(proto) {
|
|
1041
|
+
let m = new GetParticipantsByKeyRequest();
|
|
1042
|
+
m = Object.assign(m, proto);
|
|
1043
|
+
if (proto.participantKey) {
|
|
1044
|
+
m.participantKey = ParticipantKey.fromProto(proto.participantKey);
|
|
1045
|
+
}
|
|
1046
|
+
return m;
|
|
1047
|
+
}
|
|
1048
|
+
toApiJson() {
|
|
1049
|
+
const toReturn = {};
|
|
1050
|
+
if (typeof this.participantKey !== 'undefined' && this.participantKey !== null) {
|
|
1051
|
+
toReturn['participantKey'] = 'toApiJson' in this.participantKey ? this.participantKey.toApiJson() : this.participantKey;
|
|
1052
|
+
}
|
|
1053
|
+
return toReturn;
|
|
1054
|
+
}
|
|
1055
|
+
}
|
|
1056
|
+
class GetParticipantsByKeyResponse {
|
|
1057
|
+
constructor(kwargs) {
|
|
1058
|
+
if (!kwargs) {
|
|
1059
|
+
return;
|
|
1060
|
+
}
|
|
1061
|
+
Object.assign(this, kwargs);
|
|
1062
|
+
}
|
|
1063
|
+
static fromProto(proto) {
|
|
1064
|
+
let m = new GetParticipantsByKeyResponse();
|
|
1065
|
+
m = Object.assign(m, proto);
|
|
1066
|
+
if (proto.participants) {
|
|
1067
|
+
m.participants = proto.participants.map(Participant.fromProto);
|
|
1068
|
+
}
|
|
1069
|
+
return m;
|
|
1070
|
+
}
|
|
1071
|
+
toApiJson() {
|
|
1072
|
+
const toReturn = {};
|
|
1073
|
+
if (typeof this.participants !== 'undefined' && this.participants !== null) {
|
|
1074
|
+
toReturn['participants'] = 'toApiJson' in this.participants ? this.participants.toApiJson() : this.participants;
|
|
1075
|
+
}
|
|
1076
|
+
return toReturn;
|
|
1077
|
+
}
|
|
1078
|
+
}
|
|
969
1079
|
class ListMessagesRequestListMessagesFilters {
|
|
970
1080
|
constructor(kwargs) {
|
|
971
1081
|
if (!kwargs) {
|
|
@@ -1456,6 +1566,9 @@ class SetLastSeenRequest {
|
|
|
1456
1566
|
static fromProto(proto) {
|
|
1457
1567
|
let m = new SetLastSeenRequest();
|
|
1458
1568
|
m = Object.assign(m, proto);
|
|
1569
|
+
if (proto.participant) {
|
|
1570
|
+
m.participant = Participant.fromProto(proto.participant);
|
|
1571
|
+
}
|
|
1459
1572
|
return m;
|
|
1460
1573
|
}
|
|
1461
1574
|
toApiJson() {
|
|
@@ -1463,6 +1576,9 @@ class SetLastSeenRequest {
|
|
|
1463
1576
|
if (typeof this.conversationId !== 'undefined') {
|
|
1464
1577
|
toReturn['conversationId'] = this.conversationId;
|
|
1465
1578
|
}
|
|
1579
|
+
if (typeof this.participant !== 'undefined' && this.participant !== null) {
|
|
1580
|
+
toReturn['participant'] = 'toApiJson' in this.participant ? this.participant.toApiJson() : this.participant;
|
|
1581
|
+
}
|
|
1466
1582
|
return toReturn;
|
|
1467
1583
|
}
|
|
1468
1584
|
}
|
|
@@ -1639,6 +1755,11 @@ class ConversationApiService {
|
|
|
1639
1755
|
return this.http.post(this._host + "/conversation.v1.ConversationService/SetLastSeen", request.toApiJson(), this.apiOptions())
|
|
1640
1756
|
.pipe(map(resp => SetLastSeenResponse.fromProto(resp)));
|
|
1641
1757
|
}
|
|
1758
|
+
getParticipantsByKey(r) {
|
|
1759
|
+
const request = (r.toApiJson) ? r : new GetParticipantsByKeyRequest(r);
|
|
1760
|
+
return this.http.post(this._host + "/conversation.v1.ConversationService/GetParticipantsByKey", request.toApiJson(), this.apiOptions())
|
|
1761
|
+
.pipe(map(resp => GetParticipantsByKeyResponse.fromProto(resp)));
|
|
1762
|
+
}
|
|
1642
1763
|
}
|
|
1643
1764
|
ConversationApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: ConversationApiService, deps: [{ token: i1.HttpClient }, { token: HostService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1644
1765
|
ConversationApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: ConversationApiService, providedIn: 'root' });
|
|
@@ -1653,5 +1774,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImpor
|
|
|
1653
1774
|
* Generated bundle index. Do not edit.
|
|
1654
1775
|
*/
|
|
1655
1776
|
|
|
1656
|
-
export { AddMultiParticipantsRequest, AddMultiParticipantsResponse, Address, Conversation, ConversationApiService, ConversationChannel, ConversationMessageCount, CreateConversationRequest, CreateConversationResponse, CreateMultiMessagesRequest, DeleteConversationRequest, DeleteMessageRequest, GetMessageRequest, GetMultiConversationDetailsRequest, GetMultiConversationDetailsResponse, GetMultiConversationDetailsResponseDetailedConversation, GetMultiConversationMessageCountRequest, GetMultiConversationMessageCountResponse, GetMultiConversationMessageCountResponseCountsEntry, GetMultiMessagesRequest, GetMultiMessagesResponse, GetMultiParticipantsRequest, GetMultiParticipantsResponse, ListMessagesRequest, ListMessagesRequestListMessagesFilters, ListMessagesResponse, LookupConversationsRequest, LookupConversationsRequestLookupConversationsFilters, LookupConversationsResponse, LookupConversationsResponseConversations, Message, MessageStatus, MessageType, Metadata, MetadataDataEntry, MetadataIdentifier, PagedRequestOptions, PagedResponseMetadata, Participant, ParticipantMessageStatus, ParticipantType, PlatformLocation, ReceiveMessageRequest, ReceiveMessageRequestMetadataEntry, SearchConversationsRequest, SearchConversationsResponse, SearchConversationsResponseDetailedConversation, SendMessageRequest, SendMessageResponse, SetLastSeenRequest, SetLastSeenResponse, UpdateMessageStatusRequest };
|
|
1777
|
+
export { 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, 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, SetLastSeenResponse, UpdateMessageStatusRequest };
|
|
1657
1778
|
//# sourceMappingURL=vendasta-conversation.mjs.map
|