@vendasta/conversation 0.17.0 → 0.20.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/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 +54 -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 +116 -1
- package/fesm2015/vendasta-conversation.mjs.map +1 -1
- package/fesm2020/vendasta-conversation.mjs +116 -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 +8 -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 +14 -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";
|
|
@@ -387,6 +398,53 @@ class Participant {
|
|
|
387
398
|
if (typeof this.isParticipantInternalInfoDeleted !== 'undefined') {
|
|
388
399
|
toReturn['isParticipantInternalInfoDeleted'] = this.isParticipantInternalInfoDeleted;
|
|
389
400
|
}
|
|
401
|
+
if (typeof this.profileImageUrl !== 'undefined') {
|
|
402
|
+
toReturn['profileImageUrl'] = this.profileImageUrl;
|
|
403
|
+
}
|
|
404
|
+
return toReturn;
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
class ParticipantKey {
|
|
408
|
+
constructor(kwargs) {
|
|
409
|
+
if (!kwargs) {
|
|
410
|
+
return;
|
|
411
|
+
}
|
|
412
|
+
Object.assign(this, kwargs);
|
|
413
|
+
}
|
|
414
|
+
static fromProto(proto) {
|
|
415
|
+
let m = new ParticipantKey();
|
|
416
|
+
m = Object.assign(m, proto);
|
|
417
|
+
if (proto.location) {
|
|
418
|
+
m.location = enumStringToValue$1(PlatformLocation, proto.location);
|
|
419
|
+
}
|
|
420
|
+
if (proto.channels) {
|
|
421
|
+
m.channels = proto.channels.map((v) => enumStringToValue$1(ConversationChannel, v));
|
|
422
|
+
}
|
|
423
|
+
if (proto.participantType) {
|
|
424
|
+
m.participantType = enumStringToValue$1(GlobalParticipantType, proto.participantType);
|
|
425
|
+
}
|
|
426
|
+
return m;
|
|
427
|
+
}
|
|
428
|
+
toApiJson() {
|
|
429
|
+
const toReturn = {};
|
|
430
|
+
if (typeof this.internalParticipantId !== 'undefined') {
|
|
431
|
+
toReturn['internalParticipantId'] = this.internalParticipantId;
|
|
432
|
+
}
|
|
433
|
+
if (typeof this.partnerId !== 'undefined') {
|
|
434
|
+
toReturn['partnerId'] = this.partnerId;
|
|
435
|
+
}
|
|
436
|
+
if (typeof this.accountGroupId !== 'undefined') {
|
|
437
|
+
toReturn['accountGroupId'] = this.accountGroupId;
|
|
438
|
+
}
|
|
439
|
+
if (typeof this.location !== 'undefined') {
|
|
440
|
+
toReturn['location'] = this.location;
|
|
441
|
+
}
|
|
442
|
+
if (typeof this.channels !== 'undefined') {
|
|
443
|
+
toReturn['channels'] = this.channels;
|
|
444
|
+
}
|
|
445
|
+
if (typeof this.participantType !== 'undefined') {
|
|
446
|
+
toReturn['participantType'] = this.participantType;
|
|
447
|
+
}
|
|
390
448
|
return toReturn;
|
|
391
449
|
}
|
|
392
450
|
}
|
|
@@ -975,6 +1033,52 @@ class GetMultiParticipantsResponse {
|
|
|
975
1033
|
return toReturn;
|
|
976
1034
|
}
|
|
977
1035
|
}
|
|
1036
|
+
class GetParticipantsByKeyRequest {
|
|
1037
|
+
constructor(kwargs) {
|
|
1038
|
+
if (!kwargs) {
|
|
1039
|
+
return;
|
|
1040
|
+
}
|
|
1041
|
+
Object.assign(this, kwargs);
|
|
1042
|
+
}
|
|
1043
|
+
static fromProto(proto) {
|
|
1044
|
+
let m = new GetParticipantsByKeyRequest();
|
|
1045
|
+
m = Object.assign(m, proto);
|
|
1046
|
+
if (proto.participantKey) {
|
|
1047
|
+
m.participantKey = ParticipantKey.fromProto(proto.participantKey);
|
|
1048
|
+
}
|
|
1049
|
+
return m;
|
|
1050
|
+
}
|
|
1051
|
+
toApiJson() {
|
|
1052
|
+
const toReturn = {};
|
|
1053
|
+
if (typeof this.participantKey !== 'undefined' && this.participantKey !== null) {
|
|
1054
|
+
toReturn['participantKey'] = 'toApiJson' in this.participantKey ? this.participantKey.toApiJson() : this.participantKey;
|
|
1055
|
+
}
|
|
1056
|
+
return toReturn;
|
|
1057
|
+
}
|
|
1058
|
+
}
|
|
1059
|
+
class GetParticipantsByKeyResponse {
|
|
1060
|
+
constructor(kwargs) {
|
|
1061
|
+
if (!kwargs) {
|
|
1062
|
+
return;
|
|
1063
|
+
}
|
|
1064
|
+
Object.assign(this, kwargs);
|
|
1065
|
+
}
|
|
1066
|
+
static fromProto(proto) {
|
|
1067
|
+
let m = new GetParticipantsByKeyResponse();
|
|
1068
|
+
m = Object.assign(m, proto);
|
|
1069
|
+
if (proto.participants) {
|
|
1070
|
+
m.participants = proto.participants.map(Participant.fromProto);
|
|
1071
|
+
}
|
|
1072
|
+
return m;
|
|
1073
|
+
}
|
|
1074
|
+
toApiJson() {
|
|
1075
|
+
const toReturn = {};
|
|
1076
|
+
if (typeof this.participants !== 'undefined' && this.participants !== null) {
|
|
1077
|
+
toReturn['participants'] = 'toApiJson' in this.participants ? this.participants.toApiJson() : this.participants;
|
|
1078
|
+
}
|
|
1079
|
+
return toReturn;
|
|
1080
|
+
}
|
|
1081
|
+
}
|
|
978
1082
|
class ListMessagesRequestListMessagesFilters {
|
|
979
1083
|
constructor(kwargs) {
|
|
980
1084
|
if (!kwargs) {
|
|
@@ -1465,6 +1569,9 @@ class SetLastSeenRequest {
|
|
|
1465
1569
|
static fromProto(proto) {
|
|
1466
1570
|
let m = new SetLastSeenRequest();
|
|
1467
1571
|
m = Object.assign(m, proto);
|
|
1572
|
+
if (proto.participant) {
|
|
1573
|
+
m.participant = Participant.fromProto(proto.participant);
|
|
1574
|
+
}
|
|
1468
1575
|
return m;
|
|
1469
1576
|
}
|
|
1470
1577
|
toApiJson() {
|
|
@@ -1472,6 +1579,9 @@ class SetLastSeenRequest {
|
|
|
1472
1579
|
if (typeof this.conversationId !== 'undefined') {
|
|
1473
1580
|
toReturn['conversationId'] = this.conversationId;
|
|
1474
1581
|
}
|
|
1582
|
+
if (typeof this.participant !== 'undefined' && this.participant !== null) {
|
|
1583
|
+
toReturn['participant'] = 'toApiJson' in this.participant ? this.participant.toApiJson() : this.participant;
|
|
1584
|
+
}
|
|
1475
1585
|
return toReturn;
|
|
1476
1586
|
}
|
|
1477
1587
|
}
|
|
@@ -1648,6 +1758,11 @@ class ConversationApiService {
|
|
|
1648
1758
|
return this.http.post(this._host + "/conversation.v1.ConversationService/SetLastSeen", request.toApiJson(), this.apiOptions())
|
|
1649
1759
|
.pipe(map(resp => SetLastSeenResponse.fromProto(resp)));
|
|
1650
1760
|
}
|
|
1761
|
+
getParticipantsByKey(r) {
|
|
1762
|
+
const request = (r.toApiJson) ? r : new GetParticipantsByKeyRequest(r);
|
|
1763
|
+
return this.http.post(this._host + "/conversation.v1.ConversationService/GetParticipantsByKey", request.toApiJson(), this.apiOptions())
|
|
1764
|
+
.pipe(map(resp => GetParticipantsByKeyResponse.fromProto(resp)));
|
|
1765
|
+
}
|
|
1651
1766
|
}
|
|
1652
1767
|
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 });
|
|
1653
1768
|
ConversationApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: ConversationApiService, providedIn: 'root' });
|
|
@@ -1662,5 +1777,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImpor
|
|
|
1662
1777
|
* Generated bundle index. Do not edit.
|
|
1663
1778
|
*/
|
|
1664
1779
|
|
|
1665
|
-
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 };
|
|
1780
|
+
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 };
|
|
1666
1781
|
//# sourceMappingURL=vendasta-conversation.mjs.map
|