@vendasta/conversation 0.17.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/_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 +45 -1
- package/esm2020/public_api.mjs +1 -1
- package/fesm2015/vendasta-conversation.mjs +113 -1
- package/fesm2015/vendasta-conversation.mjs.map +1 -1
- package/fesm2020/vendasta-conversation.mjs +113 -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 +8 -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 +11 -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";
|
|
@@ -390,6 +401,50 @@ class Participant {
|
|
|
390
401
|
return toReturn;
|
|
391
402
|
}
|
|
392
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
|
+
}
|
|
445
|
+
return toReturn;
|
|
446
|
+
}
|
|
447
|
+
}
|
|
393
448
|
|
|
394
449
|
function enumStringToValue(enumRef, value) {
|
|
395
450
|
if (typeof value === 'number') {
|
|
@@ -975,6 +1030,52 @@ class GetMultiParticipantsResponse {
|
|
|
975
1030
|
return toReturn;
|
|
976
1031
|
}
|
|
977
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
|
+
}
|
|
978
1079
|
class ListMessagesRequestListMessagesFilters {
|
|
979
1080
|
constructor(kwargs) {
|
|
980
1081
|
if (!kwargs) {
|
|
@@ -1465,6 +1566,9 @@ class SetLastSeenRequest {
|
|
|
1465
1566
|
static fromProto(proto) {
|
|
1466
1567
|
let m = new SetLastSeenRequest();
|
|
1467
1568
|
m = Object.assign(m, proto);
|
|
1569
|
+
if (proto.participant) {
|
|
1570
|
+
m.participant = Participant.fromProto(proto.participant);
|
|
1571
|
+
}
|
|
1468
1572
|
return m;
|
|
1469
1573
|
}
|
|
1470
1574
|
toApiJson() {
|
|
@@ -1472,6 +1576,9 @@ class SetLastSeenRequest {
|
|
|
1472
1576
|
if (typeof this.conversationId !== 'undefined') {
|
|
1473
1577
|
toReturn['conversationId'] = this.conversationId;
|
|
1474
1578
|
}
|
|
1579
|
+
if (typeof this.participant !== 'undefined' && this.participant !== null) {
|
|
1580
|
+
toReturn['participant'] = 'toApiJson' in this.participant ? this.participant.toApiJson() : this.participant;
|
|
1581
|
+
}
|
|
1475
1582
|
return toReturn;
|
|
1476
1583
|
}
|
|
1477
1584
|
}
|
|
@@ -1648,6 +1755,11 @@ class ConversationApiService {
|
|
|
1648
1755
|
return this.http.post(this._host + "/conversation.v1.ConversationService/SetLastSeen", request.toApiJson(), this.apiOptions())
|
|
1649
1756
|
.pipe(map(resp => SetLastSeenResponse.fromProto(resp)));
|
|
1650
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
|
+
}
|
|
1651
1763
|
}
|
|
1652
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 });
|
|
1653
1765
|
ConversationApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: ConversationApiService, providedIn: 'root' });
|
|
@@ -1662,5 +1774,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImpor
|
|
|
1662
1774
|
* Generated bundle index. Do not edit.
|
|
1663
1775
|
*/
|
|
1664
1776
|
|
|
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 };
|
|
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 };
|
|
1666
1778
|
//# sourceMappingURL=vendasta-conversation.mjs.map
|