@vendasta/conversation 0.55.0 → 0.57.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/enums/common.enum.mjs +2 -1
- package/esm2020/lib/_internal/enums/participant.enum.mjs +2 -1
- package/esm2020/lib/_internal/inbox.api.service.mjs +8 -3
- package/esm2020/lib/_internal/interfaces/api.interface.mjs +1 -1
- package/esm2020/lib/_internal/interfaces/common.interface.mjs +1 -1
- package/esm2020/lib/_internal/interfaces/configuration.interface.mjs +1 -1
- package/esm2020/lib/_internal/interfaces/index.mjs +1 -1
- package/esm2020/lib/_internal/interfaces/participant.interface.mjs +1 -7
- package/esm2020/lib/_internal/objects/api.mjs +63 -2
- package/esm2020/lib/_internal/objects/common.mjs +27 -1
- package/esm2020/lib/_internal/objects/configuration.mjs +36 -1
- package/esm2020/lib/_internal/objects/index.mjs +4 -4
- package/esm2020/lib/_internal/objects/participant.mjs +14 -1
- package/fesm2015/vendasta-conversation.mjs +142 -1
- package/fesm2015/vendasta-conversation.mjs.map +1 -1
- package/fesm2020/vendasta-conversation.mjs +142 -1
- package/fesm2020/vendasta-conversation.mjs.map +1 -1
- package/lib/_internal/enums/common.enum.d.ts +2 -1
- package/lib/_internal/enums/participant.enum.d.ts +2 -1
- package/lib/_internal/inbox.api.service.d.ts +3 -2
- package/lib/_internal/interfaces/api.interface.d.ts +10 -1
- package/lib/_internal/interfaces/common.interface.d.ts +4 -0
- package/lib/_internal/interfaces/configuration.interface.d.ts +8 -0
- package/lib/_internal/interfaces/index.d.ts +3 -3
- package/lib/_internal/interfaces/participant.interface.d.ts +3 -0
- package/lib/_internal/objects/api.d.ts +16 -1
- package/lib/_internal/objects/common.d.ts +7 -0
- package/lib/_internal/objects/configuration.d.ts +11 -0
- package/lib/_internal/objects/index.d.ts +3 -3
- package/lib/_internal/objects/participant.d.ts +3 -0
- package/package.json +1 -1
|
@@ -22,6 +22,7 @@ var GlobalParticipantType;
|
|
|
22
22
|
GlobalParticipantType[GlobalParticipantType["GLOBAL_PARTICIPANT_TYPE_VENDOR"] = 7] = "GLOBAL_PARTICIPANT_TYPE_VENDOR";
|
|
23
23
|
GlobalParticipantType[GlobalParticipantType["GLOBAL_PARTICIPANT_TYPE_OPENAI_BOT"] = 8] = "GLOBAL_PARTICIPANT_TYPE_OPENAI_BOT";
|
|
24
24
|
GlobalParticipantType[GlobalParticipantType["GLOBAL_PARTICIPANT_TYPE_ANONYMOUS"] = 9] = "GLOBAL_PARTICIPANT_TYPE_ANONYMOUS";
|
|
25
|
+
GlobalParticipantType[GlobalParticipantType["GLOBAL_PARTICIPANT_TYPE_GROUP"] = 10] = "GLOBAL_PARTICIPANT_TYPE_GROUP";
|
|
25
26
|
})(GlobalParticipantType || (GlobalParticipantType = {}));
|
|
26
27
|
var SortDirection;
|
|
27
28
|
(function (SortDirection) {
|
|
@@ -99,6 +100,7 @@ var ParticipantType;
|
|
|
99
100
|
ParticipantType[ParticipantType["PARTICIPANT_TYPE_VENDOR"] = 7] = "PARTICIPANT_TYPE_VENDOR";
|
|
100
101
|
ParticipantType[ParticipantType["PARTICIPANT_TYPE_OPENAI_BOT"] = 8] = "PARTICIPANT_TYPE_OPENAI_BOT";
|
|
101
102
|
ParticipantType[ParticipantType["PARTICIPANT_TYPE_ANONYMOUS"] = 9] = "PARTICIPANT_TYPE_ANONYMOUS";
|
|
103
|
+
ParticipantType[ParticipantType["PARTICIPANT_TYPE_GROUP"] = 10] = "PARTICIPANT_TYPE_GROUP";
|
|
102
104
|
})(ParticipantType || (ParticipantType = {}));
|
|
103
105
|
|
|
104
106
|
// *********************************
|
|
@@ -171,6 +173,32 @@ function enumStringToValue$a(enumRef, value) {
|
|
|
171
173
|
}
|
|
172
174
|
return enumRef[value];
|
|
173
175
|
}
|
|
176
|
+
class NamespaceDetail {
|
|
177
|
+
static fromProto(proto) {
|
|
178
|
+
let m = new NamespaceDetail();
|
|
179
|
+
m = Object.assign(m, proto);
|
|
180
|
+
if (proto.participantType) {
|
|
181
|
+
m.participantType = enumStringToValue$a(GlobalParticipantType, proto.participantType);
|
|
182
|
+
}
|
|
183
|
+
return m;
|
|
184
|
+
}
|
|
185
|
+
constructor(kwargs) {
|
|
186
|
+
if (!kwargs) {
|
|
187
|
+
return;
|
|
188
|
+
}
|
|
189
|
+
Object.assign(this, kwargs);
|
|
190
|
+
}
|
|
191
|
+
toApiJson() {
|
|
192
|
+
const toReturn = {};
|
|
193
|
+
if (typeof this.participantType !== 'undefined') {
|
|
194
|
+
toReturn['participantType'] = this.participantType;
|
|
195
|
+
}
|
|
196
|
+
if (typeof this.internalParticipantId !== 'undefined') {
|
|
197
|
+
toReturn['internalParticipantId'] = this.internalParticipantId;
|
|
198
|
+
}
|
|
199
|
+
return toReturn;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
174
202
|
class SubjectParticipant {
|
|
175
203
|
static fromProto(proto) {
|
|
176
204
|
let m = new SubjectParticipant();
|
|
@@ -563,6 +591,9 @@ class Participant {
|
|
|
563
591
|
if (proto.address) {
|
|
564
592
|
m.address = Address.fromProto(proto.address);
|
|
565
593
|
}
|
|
594
|
+
if (proto.namespaceHierarchy) {
|
|
595
|
+
m.namespaceHierarchy = proto.namespaceHierarchy.map(NamespaceDetail.fromProto);
|
|
596
|
+
}
|
|
566
597
|
return m;
|
|
567
598
|
}
|
|
568
599
|
constructor(kwargs) {
|
|
@@ -627,6 +658,9 @@ class Participant {
|
|
|
627
658
|
if (typeof this.profileImageUrl !== 'undefined') {
|
|
628
659
|
toReturn['profileImageUrl'] = this.profileImageUrl;
|
|
629
660
|
}
|
|
661
|
+
if (typeof this.namespaceHierarchy !== 'undefined' && this.namespaceHierarchy !== null) {
|
|
662
|
+
toReturn['namespaceHierarchy'] = 'toApiJson' in this.namespaceHierarchy ? this.namespaceHierarchy.toApiJson() : this.namespaceHierarchy;
|
|
663
|
+
}
|
|
630
664
|
return toReturn;
|
|
631
665
|
}
|
|
632
666
|
}
|
|
@@ -643,6 +677,9 @@ class ParticipantKey {
|
|
|
643
677
|
if (proto.participantType) {
|
|
644
678
|
m.participantType = enumStringToValue$7(GlobalParticipantType, proto.participantType);
|
|
645
679
|
}
|
|
680
|
+
if (proto.namespaceHierarchy) {
|
|
681
|
+
m.namespaceHierarchy = proto.namespaceHierarchy.map(NamespaceDetail.fromProto);
|
|
682
|
+
}
|
|
646
683
|
return m;
|
|
647
684
|
}
|
|
648
685
|
constructor(kwargs) {
|
|
@@ -671,6 +708,9 @@ class ParticipantKey {
|
|
|
671
708
|
if (typeof this.participantType !== 'undefined') {
|
|
672
709
|
toReturn['participantType'] = this.participantType;
|
|
673
710
|
}
|
|
711
|
+
if (typeof this.namespaceHierarchy !== 'undefined' && this.namespaceHierarchy !== null) {
|
|
712
|
+
toReturn['namespaceHierarchy'] = 'toApiJson' in this.namespaceHierarchy ? this.namespaceHierarchy.toApiJson() : this.namespaceHierarchy;
|
|
713
|
+
}
|
|
674
714
|
return toReturn;
|
|
675
715
|
}
|
|
676
716
|
}
|
|
@@ -764,6 +804,41 @@ class Configuration {
|
|
|
764
804
|
if (typeof this.facebookMessengerEnabled !== 'undefined') {
|
|
765
805
|
toReturn['facebookMessengerEnabled'] = this.facebookMessengerEnabled;
|
|
766
806
|
}
|
|
807
|
+
if (typeof this.multiLocationEnabled !== 'undefined') {
|
|
808
|
+
toReturn['multiLocationEnabled'] = this.multiLocationEnabled;
|
|
809
|
+
}
|
|
810
|
+
return toReturn;
|
|
811
|
+
}
|
|
812
|
+
}
|
|
813
|
+
class ProductFeature {
|
|
814
|
+
static fromProto(proto) {
|
|
815
|
+
let m = new ProductFeature();
|
|
816
|
+
m = Object.assign(m, proto);
|
|
817
|
+
return m;
|
|
818
|
+
}
|
|
819
|
+
constructor(kwargs) {
|
|
820
|
+
if (!kwargs) {
|
|
821
|
+
return;
|
|
822
|
+
}
|
|
823
|
+
Object.assign(this, kwargs);
|
|
824
|
+
}
|
|
825
|
+
toApiJson() {
|
|
826
|
+
const toReturn = {};
|
|
827
|
+
if (typeof this.googleBusinessMessagesEnabled !== 'undefined') {
|
|
828
|
+
toReturn['googleBusinessMessagesEnabled'] = this.googleBusinessMessagesEnabled;
|
|
829
|
+
}
|
|
830
|
+
if (typeof this.smsEnabled !== 'undefined') {
|
|
831
|
+
toReturn['smsEnabled'] = this.smsEnabled;
|
|
832
|
+
}
|
|
833
|
+
if (typeof this.multiLocationEnabled !== 'undefined') {
|
|
834
|
+
toReturn['multiLocationEnabled'] = this.multiLocationEnabled;
|
|
835
|
+
}
|
|
836
|
+
if (typeof this.webChatEnabled !== 'undefined') {
|
|
837
|
+
toReturn['webChatEnabled'] = this.webChatEnabled;
|
|
838
|
+
}
|
|
839
|
+
if (typeof this.facebookMessengerEnabled !== 'undefined') {
|
|
840
|
+
toReturn['facebookMessengerEnabled'] = this.facebookMessengerEnabled;
|
|
841
|
+
}
|
|
767
842
|
return toReturn;
|
|
768
843
|
}
|
|
769
844
|
}
|
|
@@ -1307,6 +1382,9 @@ class CreateWidgetConversationRequest {
|
|
|
1307
1382
|
if (typeof this.widgetId !== 'undefined') {
|
|
1308
1383
|
toReturn['widgetId'] = this.widgetId;
|
|
1309
1384
|
}
|
|
1385
|
+
if (typeof this.chatSourceUrl !== 'undefined') {
|
|
1386
|
+
toReturn['chatSourceUrl'] = this.chatSourceUrl;
|
|
1387
|
+
}
|
|
1310
1388
|
return toReturn;
|
|
1311
1389
|
}
|
|
1312
1390
|
}
|
|
@@ -3344,6 +3422,64 @@ class UpsertConfigurationResponse {
|
|
|
3344
3422
|
return toReturn;
|
|
3345
3423
|
}
|
|
3346
3424
|
}
|
|
3425
|
+
class UpsertProductFeatureRequest {
|
|
3426
|
+
static fromProto(proto) {
|
|
3427
|
+
let m = new UpsertProductFeatureRequest();
|
|
3428
|
+
m = Object.assign(m, proto);
|
|
3429
|
+
if (proto.productFeature) {
|
|
3430
|
+
m.productFeature = ProductFeature.fromProto(proto.productFeature);
|
|
3431
|
+
}
|
|
3432
|
+
if (proto.fieldMask) {
|
|
3433
|
+
m.fieldMask = FieldMask.fromProto(proto.fieldMask);
|
|
3434
|
+
}
|
|
3435
|
+
if (proto.subjectParticipant) {
|
|
3436
|
+
m.subjectParticipant = SubjectParticipant.fromProto(proto.subjectParticipant);
|
|
3437
|
+
}
|
|
3438
|
+
return m;
|
|
3439
|
+
}
|
|
3440
|
+
constructor(kwargs) {
|
|
3441
|
+
if (!kwargs) {
|
|
3442
|
+
return;
|
|
3443
|
+
}
|
|
3444
|
+
Object.assign(this, kwargs);
|
|
3445
|
+
}
|
|
3446
|
+
toApiJson() {
|
|
3447
|
+
const toReturn = {};
|
|
3448
|
+
if (typeof this.productFeature !== 'undefined' && this.productFeature !== null) {
|
|
3449
|
+
toReturn['productFeature'] = 'toApiJson' in this.productFeature ? this.productFeature.toApiJson() : this.productFeature;
|
|
3450
|
+
}
|
|
3451
|
+
if (typeof this.fieldMask !== 'undefined' && this.fieldMask !== null) {
|
|
3452
|
+
toReturn['fieldMask'] = 'toApiJson' in this.fieldMask ? this.fieldMask.toApiJson() : this.fieldMask;
|
|
3453
|
+
}
|
|
3454
|
+
if (typeof this.subjectParticipant !== 'undefined' && this.subjectParticipant !== null) {
|
|
3455
|
+
toReturn['subjectParticipant'] = 'toApiJson' in this.subjectParticipant ? this.subjectParticipant.toApiJson() : this.subjectParticipant;
|
|
3456
|
+
}
|
|
3457
|
+
return toReturn;
|
|
3458
|
+
}
|
|
3459
|
+
}
|
|
3460
|
+
class UpsertProductFeatureResponse {
|
|
3461
|
+
static fromProto(proto) {
|
|
3462
|
+
let m = new UpsertProductFeatureResponse();
|
|
3463
|
+
m = Object.assign(m, proto);
|
|
3464
|
+
if (proto.productFeature) {
|
|
3465
|
+
m.productFeature = ProductFeature.fromProto(proto.productFeature);
|
|
3466
|
+
}
|
|
3467
|
+
return m;
|
|
3468
|
+
}
|
|
3469
|
+
constructor(kwargs) {
|
|
3470
|
+
if (!kwargs) {
|
|
3471
|
+
return;
|
|
3472
|
+
}
|
|
3473
|
+
Object.assign(this, kwargs);
|
|
3474
|
+
}
|
|
3475
|
+
toApiJson() {
|
|
3476
|
+
const toReturn = {};
|
|
3477
|
+
if (typeof this.productFeature !== 'undefined' && this.productFeature !== null) {
|
|
3478
|
+
toReturn['productFeature'] = 'toApiJson' in this.productFeature ? this.productFeature.toApiJson() : this.productFeature;
|
|
3479
|
+
}
|
|
3480
|
+
return toReturn;
|
|
3481
|
+
}
|
|
3482
|
+
}
|
|
3347
3483
|
|
|
3348
3484
|
// *********************************
|
|
3349
3485
|
// Code generated by sdkgen
|
|
@@ -3627,6 +3763,11 @@ class InboxApiService {
|
|
|
3627
3763
|
return this.http.post(this._host + "/conversation.v1.InboxService/UpsertConfiguration", request.toApiJson(), this.apiOptions())
|
|
3628
3764
|
.pipe(map(resp => UpsertConfigurationResponse.fromProto(resp)));
|
|
3629
3765
|
}
|
|
3766
|
+
upsertProductFeature(r) {
|
|
3767
|
+
const request = (r.toApiJson) ? r : new UpsertProductFeatureRequest(r);
|
|
3768
|
+
return this.http.post(this._host + "/conversation.v1.InboxService/UpsertProductFeature", request.toApiJson(), this.apiOptions())
|
|
3769
|
+
.pipe(map(resp => UpsertProductFeatureResponse.fromProto(resp)));
|
|
3770
|
+
}
|
|
3630
3771
|
}
|
|
3631
3772
|
InboxApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: InboxApiService, deps: [{ token: i1.HttpClient }, { token: HostService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3632
3773
|
InboxApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: InboxApiService, providedIn: 'root' });
|
|
@@ -3646,5 +3787,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
3646
3787
|
* Generated bundle index. Do not edit.
|
|
3647
3788
|
*/
|
|
3648
3789
|
|
|
3649
|
-
export { Access, AddConversationToConversationViewRequest, AddMultiParticipantsRequest, AddMultiParticipantsResponse, Address, Configuration, Conversation, ConversationApiService, ConversationChannel, ConversationKey, ConversationMessageCount, CreateConversationRequest, CreateConversationResponse, CreateMessageTemplateRequest, CreateMessageTemplateResponse, CreateMultiMessagesRequest, CreateWidgetConversationRequest, CreateWidgetConversationResponse, CreateWidgetRequest, CreateWidgetResponse, DataSources, DeleteConversationRequest, DeleteMessageRequest, DeleteMessageTemplateRequest, DeleteWidgetRequest, EvaluateResponseRequest, EvaluationSentiment, FieldMask, GetAvailableChannelsForConversationRequest, GetAvailableChannelsForConversationResponse, GetConfigurationRequest, GetConfigurationResponse, GetConversationByKeyRequest, GetConversationByKeyResponse, GetConversationViewsRequest, GetConversationViewsResponse, GetMessageRequest, GetMessageTemplateRequest, GetMessageTemplateResponse, GetMultiConfigurationRequest, GetMultiConfigurationResponse, GetMultiConversationDetailsRequest, GetMultiConversationDetailsResponse, GetMultiConversationDetailsResponseDetailedConversation, GetMultiConversationMessageCountRequest, GetMultiConversationMessageCountResponse, GetMultiConversationMessageCountResponseCountsEntry, GetMultiMessagesRequest, GetMultiMessagesResponse, GetMultiParticipantsRequest, GetMultiParticipantsResponse, GetMultiWidgetMessagesRequest, GetMultiWidgetMessagesResponse, GetParticipantsByKeyRequest, GetParticipantsByKeyResponse, GetWidgetConfigRequest, GetWidgetConfigResponse, GetWidgetConversationResponse, GetWidgetRequest, GetWidgetResponse, GlobalParticipantType, InboxApiService, LastSeenByParticipant, ListMessageTemplateRequest, ListMessageTemplateResponse, ListMessagesRequest, ListMessagesRequestListMessagesFilters, ListMessagesResponse, ListWidgetsRequest, ListWidgetsResponse, LookupConversationsRequest, LookupConversationsRequestLookupConversationsFilters, LookupConversationsResponse, LookupConversationsResponseConversations, Media, Message, MessageStatus, MessageTemplate, MessageType, Metadata, MetadataDataEntry, MetadataIdentifier, PagedRequestOptions, PagedResponseMetadata, Participant, ParticipantKey, ParticipantMessageStatus, ParticipantType, PlatformLocation, ReceiveMessageRequest, ReceiveMessageRequestMetadataEntry, RemoveConversationFromConversationViewRequest, SearchConversationsRequest, SearchConversationsResponse, SearchConversationsResponseDetailedConversation, SendMessageRequest, SendMessageResponse, SendStatus, SendWidgetMessageRequest, SendWidgetMessageResponse, SetLastSeenRequest, SetLastSeenRequestStatus, SetLastSeenResponse, SortDirection, SubjectParticipant, UpdateConversationRequest, UpdateConversationResponse, UpdateMessageStatusRequest, UpdateMessageTemplateRequest, UpdateMessageTemplateResponse, UpdateWidgetRequest, UpdateWidgetResponse, UpsertConfigurationRequest, UpsertConfigurationResponse, View, ViewType, Widget, WidgetPosition };
|
|
3790
|
+
export { Access, AddConversationToConversationViewRequest, AddMultiParticipantsRequest, AddMultiParticipantsResponse, Address, Configuration, Conversation, ConversationApiService, ConversationChannel, ConversationKey, ConversationMessageCount, CreateConversationRequest, CreateConversationResponse, CreateMessageTemplateRequest, CreateMessageTemplateResponse, CreateMultiMessagesRequest, CreateWidgetConversationRequest, CreateWidgetConversationResponse, CreateWidgetRequest, CreateWidgetResponse, DataSources, DeleteConversationRequest, DeleteMessageRequest, DeleteMessageTemplateRequest, DeleteWidgetRequest, EvaluateResponseRequest, EvaluationSentiment, FieldMask, GetAvailableChannelsForConversationRequest, GetAvailableChannelsForConversationResponse, GetConfigurationRequest, GetConfigurationResponse, GetConversationByKeyRequest, GetConversationByKeyResponse, GetConversationViewsRequest, GetConversationViewsResponse, GetMessageRequest, GetMessageTemplateRequest, GetMessageTemplateResponse, GetMultiConfigurationRequest, GetMultiConfigurationResponse, GetMultiConversationDetailsRequest, GetMultiConversationDetailsResponse, GetMultiConversationDetailsResponseDetailedConversation, GetMultiConversationMessageCountRequest, GetMultiConversationMessageCountResponse, GetMultiConversationMessageCountResponseCountsEntry, GetMultiMessagesRequest, GetMultiMessagesResponse, GetMultiParticipantsRequest, GetMultiParticipantsResponse, GetMultiWidgetMessagesRequest, GetMultiWidgetMessagesResponse, GetParticipantsByKeyRequest, GetParticipantsByKeyResponse, GetWidgetConfigRequest, GetWidgetConfigResponse, GetWidgetConversationResponse, GetWidgetRequest, GetWidgetResponse, GlobalParticipantType, InboxApiService, LastSeenByParticipant, ListMessageTemplateRequest, ListMessageTemplateResponse, ListMessagesRequest, ListMessagesRequestListMessagesFilters, ListMessagesResponse, ListWidgetsRequest, ListWidgetsResponse, LookupConversationsRequest, LookupConversationsRequestLookupConversationsFilters, LookupConversationsResponse, LookupConversationsResponseConversations, Media, Message, MessageStatus, MessageTemplate, MessageType, Metadata, MetadataDataEntry, MetadataIdentifier, NamespaceDetail, PagedRequestOptions, PagedResponseMetadata, Participant, ParticipantKey, ParticipantMessageStatus, ParticipantType, PlatformLocation, ProductFeature, ReceiveMessageRequest, ReceiveMessageRequestMetadataEntry, RemoveConversationFromConversationViewRequest, SearchConversationsRequest, SearchConversationsResponse, SearchConversationsResponseDetailedConversation, SendMessageRequest, SendMessageResponse, SendStatus, SendWidgetMessageRequest, SendWidgetMessageResponse, SetLastSeenRequest, SetLastSeenRequestStatus, SetLastSeenResponse, SortDirection, SubjectParticipant, UpdateConversationRequest, UpdateConversationResponse, UpdateMessageStatusRequest, UpdateMessageTemplateRequest, UpdateMessageTemplateResponse, UpdateWidgetRequest, UpdateWidgetResponse, UpsertConfigurationRequest, UpsertConfigurationResponse, UpsertProductFeatureRequest, UpsertProductFeatureResponse, View, ViewType, Widget, WidgetPosition };
|
|
3650
3791
|
//# sourceMappingURL=vendasta-conversation.mjs.map
|