@vendasta/conversation 0.42.0 → 0.44.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 +4 -4
- package/esm2020/lib/_internal/conversation.api.service.mjs +12 -6
- package/esm2020/lib/_internal/inbox.api.service.mjs +4 -4
- package/esm2020/lib/_internal/interfaces/api.interface.mjs +1 -1
- package/esm2020/lib/_internal/interfaces/configuration.interface.mjs +1 -1
- package/esm2020/lib/_internal/interfaces/conversation.interface.mjs +1 -1
- package/esm2020/lib/_internal/interfaces/index.mjs +1 -1
- package/esm2020/lib/_internal/objects/api.mjs +64 -1
- package/esm2020/lib/_internal/objects/configuration.mjs +4 -1
- package/esm2020/lib/_internal/objects/conversation.mjs +10 -1
- package/esm2020/lib/_internal/objects/index.mjs +2 -2
- package/fesm2015/vendasta-conversation.mjs +92 -11
- package/fesm2015/vendasta-conversation.mjs.map +1 -1
- package/fesm2020/vendasta-conversation.mjs +92 -11
- package/fesm2020/vendasta-conversation.mjs.map +1 -1
- package/lib/_internal/conversation.api.service.d.ts +4 -3
- package/lib/_internal/interfaces/api.interface.d.ts +9 -0
- package/lib/_internal/interfaces/configuration.interface.d.ts +1 -0
- package/lib/_internal/interfaces/conversation.interface.d.ts +2 -0
- package/lib/_internal/interfaces/index.d.ts +1 -1
- package/lib/_internal/objects/api.d.ts +18 -0
- package/lib/_internal/objects/configuration.d.ts +1 -0
- package/lib/_internal/objects/conversation.d.ts +2 -0
- package/lib/_internal/objects/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -215,6 +215,9 @@ class Conversation {
|
|
|
215
215
|
if (proto.lastSeenByParticipant) {
|
|
216
216
|
m.lastSeenByParticipant = proto.lastSeenByParticipant.map(LastSeenByParticipant.fromProto);
|
|
217
217
|
}
|
|
218
|
+
if (proto.subjectParticipants) {
|
|
219
|
+
m.subjectParticipants = proto.subjectParticipants.map(SubjectParticipant.fromProto);
|
|
220
|
+
}
|
|
218
221
|
return m;
|
|
219
222
|
}
|
|
220
223
|
constructor(kwargs) {
|
|
@@ -261,6 +264,12 @@ class Conversation {
|
|
|
261
264
|
if (typeof this.conversationViewIds !== 'undefined') {
|
|
262
265
|
toReturn['conversationViewIds'] = this.conversationViewIds;
|
|
263
266
|
}
|
|
267
|
+
if (typeof this.subjectParticipantsKey !== 'undefined') {
|
|
268
|
+
toReturn['subjectParticipantsKey'] = this.subjectParticipantsKey;
|
|
269
|
+
}
|
|
270
|
+
if (typeof this.subjectParticipants !== 'undefined' && this.subjectParticipants !== null) {
|
|
271
|
+
toReturn['subjectParticipants'] = 'toApiJson' in this.subjectParticipants ? this.subjectParticipants.toApiJson() : this.subjectParticipants;
|
|
272
|
+
}
|
|
264
273
|
return toReturn;
|
|
265
274
|
}
|
|
266
275
|
}
|
|
@@ -729,6 +738,9 @@ class Configuration {
|
|
|
729
738
|
if (typeof this.smsEnabled !== 'undefined') {
|
|
730
739
|
toReturn['smsEnabled'] = this.smsEnabled;
|
|
731
740
|
}
|
|
741
|
+
if (typeof this.inboxProEnabled !== 'undefined') {
|
|
742
|
+
toReturn['inboxProEnabled'] = this.inboxProEnabled;
|
|
743
|
+
}
|
|
732
744
|
return toReturn;
|
|
733
745
|
}
|
|
734
746
|
}
|
|
@@ -1380,6 +1392,49 @@ class GetMultiConversationDetailsResponseDetailedConversation {
|
|
|
1380
1392
|
return toReturn;
|
|
1381
1393
|
}
|
|
1382
1394
|
}
|
|
1395
|
+
class GetAvailableChannelsForConversationRequest {
|
|
1396
|
+
static fromProto(proto) {
|
|
1397
|
+
let m = new GetAvailableChannelsForConversationRequest();
|
|
1398
|
+
m = Object.assign(m, proto);
|
|
1399
|
+
return m;
|
|
1400
|
+
}
|
|
1401
|
+
constructor(kwargs) {
|
|
1402
|
+
if (!kwargs) {
|
|
1403
|
+
return;
|
|
1404
|
+
}
|
|
1405
|
+
Object.assign(this, kwargs);
|
|
1406
|
+
}
|
|
1407
|
+
toApiJson() {
|
|
1408
|
+
const toReturn = {};
|
|
1409
|
+
if (typeof this.conversationId !== 'undefined') {
|
|
1410
|
+
toReturn['conversationId'] = this.conversationId;
|
|
1411
|
+
}
|
|
1412
|
+
return toReturn;
|
|
1413
|
+
}
|
|
1414
|
+
}
|
|
1415
|
+
class GetAvailableChannelsForConversationResponse {
|
|
1416
|
+
static fromProto(proto) {
|
|
1417
|
+
let m = new GetAvailableChannelsForConversationResponse();
|
|
1418
|
+
m = Object.assign(m, proto);
|
|
1419
|
+
if (proto.channels) {
|
|
1420
|
+
m.channels = proto.channels.map((v) => enumStringToValue(ConversationChannel, v));
|
|
1421
|
+
}
|
|
1422
|
+
return m;
|
|
1423
|
+
}
|
|
1424
|
+
constructor(kwargs) {
|
|
1425
|
+
if (!kwargs) {
|
|
1426
|
+
return;
|
|
1427
|
+
}
|
|
1428
|
+
Object.assign(this, kwargs);
|
|
1429
|
+
}
|
|
1430
|
+
toApiJson() {
|
|
1431
|
+
const toReturn = {};
|
|
1432
|
+
if (typeof this.channels !== 'undefined') {
|
|
1433
|
+
toReturn['channels'] = this.channels;
|
|
1434
|
+
}
|
|
1435
|
+
return toReturn;
|
|
1436
|
+
}
|
|
1437
|
+
}
|
|
1383
1438
|
class GetConfigurationRequest {
|
|
1384
1439
|
static fromProto(proto) {
|
|
1385
1440
|
let m = new GetConfigurationRequest();
|
|
@@ -2636,6 +2691,26 @@ class SendWidgetMessageRequest {
|
|
|
2636
2691
|
return toReturn;
|
|
2637
2692
|
}
|
|
2638
2693
|
}
|
|
2694
|
+
class SendWidgetMessageResponse {
|
|
2695
|
+
static fromProto(proto) {
|
|
2696
|
+
let m = new SendWidgetMessageResponse();
|
|
2697
|
+
m = Object.assign(m, proto);
|
|
2698
|
+
return m;
|
|
2699
|
+
}
|
|
2700
|
+
constructor(kwargs) {
|
|
2701
|
+
if (!kwargs) {
|
|
2702
|
+
return;
|
|
2703
|
+
}
|
|
2704
|
+
Object.assign(this, kwargs);
|
|
2705
|
+
}
|
|
2706
|
+
toApiJson() {
|
|
2707
|
+
const toReturn = {};
|
|
2708
|
+
if (typeof this.messageId !== 'undefined') {
|
|
2709
|
+
toReturn['messageId'] = this.messageId;
|
|
2710
|
+
}
|
|
2711
|
+
return toReturn;
|
|
2712
|
+
}
|
|
2713
|
+
}
|
|
2639
2714
|
class SetLastSeenRequest {
|
|
2640
2715
|
static fromProto(proto) {
|
|
2641
2716
|
let m = new SetLastSeenRequest();
|
|
@@ -2854,9 +2929,9 @@ class HostService {
|
|
|
2854
2929
|
return 'https://' + this.host;
|
|
2855
2930
|
}
|
|
2856
2931
|
}
|
|
2857
|
-
HostService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
2858
|
-
HostService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
|
2859
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
2932
|
+
HostService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: HostService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2933
|
+
HostService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: HostService, providedIn: 'root' });
|
|
2934
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: HostService, decorators: [{
|
|
2860
2935
|
type: Injectable,
|
|
2861
2936
|
args: [{ providedIn: 'root' }]
|
|
2862
2937
|
}] });
|
|
@@ -2996,12 +3071,18 @@ class ConversationApiService {
|
|
|
2996
3071
|
}
|
|
2997
3072
|
sendWidgetMessage(r) {
|
|
2998
3073
|
const request = (r.toApiJson) ? r : new SendWidgetMessageRequest(r);
|
|
2999
|
-
return this.http.post(this._host + "/conversation.v1.ConversationService/SendWidgetMessage", request.toApiJson(),
|
|
3074
|
+
return this.http.post(this._host + "/conversation.v1.ConversationService/SendWidgetMessage", request.toApiJson(), this.apiOptions())
|
|
3075
|
+
.pipe(map(resp => SendWidgetMessageResponse.fromProto(resp)));
|
|
3000
3076
|
}
|
|
3001
3077
|
getWidgetConversation() {
|
|
3002
3078
|
return this.http.post(this._host + "/conversation.v1.ConversationService/GetWidgetConversation", {}, this.apiOptions())
|
|
3003
3079
|
.pipe(map(resp => GetWidgetConversationResponse.fromProto(resp)));
|
|
3004
3080
|
}
|
|
3081
|
+
getAvailableChannelsForConversation(r) {
|
|
3082
|
+
const request = (r.toApiJson) ? r : new GetAvailableChannelsForConversationRequest(r);
|
|
3083
|
+
return this.http.post(this._host + "/conversation.v1.ConversationService/GetAvailableChannelsForConversation", request.toApiJson(), this.apiOptions())
|
|
3084
|
+
.pipe(map(resp => GetAvailableChannelsForConversationResponse.fromProto(resp)));
|
|
3085
|
+
}
|
|
3005
3086
|
createWidget(r) {
|
|
3006
3087
|
const request = (r.toApiJson) ? r : new CreateWidgetRequest(r);
|
|
3007
3088
|
return this.http.post(this._host + "/conversation.v1.ConversationService/CreateWidget", request.toApiJson(), this.apiOptions())
|
|
@@ -3032,9 +3113,9 @@ class ConversationApiService {
|
|
|
3032
3113
|
.pipe(map(resp => GetWidgetConfigResponse.fromProto(resp)));
|
|
3033
3114
|
}
|
|
3034
3115
|
}
|
|
3035
|
-
ConversationApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
3036
|
-
ConversationApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
|
3037
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
3116
|
+
ConversationApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ConversationApiService, deps: [{ token: i1.HttpClient }, { token: HostService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3117
|
+
ConversationApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ConversationApiService, providedIn: 'root' });
|
|
3118
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ConversationApiService, decorators: [{
|
|
3038
3119
|
type: Injectable,
|
|
3039
3120
|
args: [{ providedIn: 'root' }]
|
|
3040
3121
|
}], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: HostService }]; } });
|
|
@@ -3075,9 +3156,9 @@ class InboxApiService {
|
|
|
3075
3156
|
.pipe(map(resp => UpsertConfigurationResponse.fromProto(resp)));
|
|
3076
3157
|
}
|
|
3077
3158
|
}
|
|
3078
|
-
InboxApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
3079
|
-
InboxApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
|
3080
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
3159
|
+
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 });
|
|
3160
|
+
InboxApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: InboxApiService, providedIn: 'root' });
|
|
3161
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: InboxApiService, decorators: [{
|
|
3081
3162
|
type: Injectable,
|
|
3082
3163
|
args: [{ providedIn: 'root' }]
|
|
3083
3164
|
}], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: HostService }]; } });
|
|
@@ -3093,5 +3174,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
3093
3174
|
* Generated bundle index. Do not edit.
|
|
3094
3175
|
*/
|
|
3095
3176
|
|
|
3096
|
-
export { Access, AddConversationToConversationViewRequest, AddMultiParticipantsRequest, AddMultiParticipantsResponse, Address, Configuration, Conversation, ConversationApiService, ConversationChannel, ConversationKey, ConversationMessageCount, CreateConversationRequest, CreateConversationResponse, CreateMultiMessagesRequest, CreateWidgetConversationRequest, CreateWidgetConversationResponse, CreateWidgetRequest, CreateWidgetResponse, DeleteConversationRequest, DeleteMessageRequest, DeleteWidgetRequest, FieldMask, GetConfigurationRequest, GetConfigurationResponse, GetConversationByKeyRequest, GetConversationByKeyResponse, GetConversationViewsRequest, GetConversationViewsResponse, GetMessageRequest, GetMultiConfigurationRequest, GetMultiConfigurationResponse, GetMultiConversationDetailsRequest, GetMultiConversationDetailsResponse, GetMultiConversationDetailsResponseDetailedConversation, GetMultiConversationMessageCountRequest, GetMultiConversationMessageCountResponse, GetMultiConversationMessageCountResponseCountsEntry, GetMultiMessagesRequest, GetMultiMessagesResponse, GetMultiParticipantsRequest, GetMultiParticipantsResponse, GetMultiWidgetMessagesRequest, GetMultiWidgetMessagesResponse, GetParticipantsByKeyRequest, GetParticipantsByKeyResponse, GetWidgetConfigRequest, GetWidgetConfigResponse, GetWidgetConversationResponse, GetWidgetRequest, GetWidgetResponse, GlobalParticipantType, InboxApiService, LastSeenByParticipant, ListMessagesRequest, ListMessagesRequestListMessagesFilters, ListMessagesResponse, ListWidgetsRequest, ListWidgetsResponse, LookupConversationsRequest, LookupConversationsRequestLookupConversationsFilters, LookupConversationsResponse, LookupConversationsResponseConversations, Media, Message, MessageStatus, MessageType, Metadata, MetadataDataEntry, MetadataIdentifier, PagedRequestOptions, PagedResponseMetadata, Participant, ParticipantKey, ParticipantMessageStatus, ParticipantType, PlatformLocation, ReceiveMessageRequest, ReceiveMessageRequestMetadataEntry, RemoveConversationFromConversationViewRequest, SearchConversationsRequest, SearchConversationsResponse, SearchConversationsResponseDetailedConversation, SendMessageRequest, SendMessageResponse, SendStatus, SendWidgetMessageRequest, SetLastSeenRequest, SetLastSeenRequestStatus, SetLastSeenResponse, SortDirection, SubjectParticipant, UpdateMessageStatusRequest, UpdateWidgetRequest, UpdateWidgetResponse, UpsertConfigurationRequest, UpsertConfigurationResponse, View, ViewType, Widget, WidgetPosition };
|
|
3177
|
+
export { Access, AddConversationToConversationViewRequest, AddMultiParticipantsRequest, AddMultiParticipantsResponse, Address, Configuration, Conversation, ConversationApiService, ConversationChannel, ConversationKey, ConversationMessageCount, CreateConversationRequest, CreateConversationResponse, CreateMultiMessagesRequest, CreateWidgetConversationRequest, CreateWidgetConversationResponse, CreateWidgetRequest, CreateWidgetResponse, DeleteConversationRequest, DeleteMessageRequest, DeleteWidgetRequest, FieldMask, GetAvailableChannelsForConversationRequest, GetAvailableChannelsForConversationResponse, GetConfigurationRequest, GetConfigurationResponse, GetConversationByKeyRequest, GetConversationByKeyResponse, GetConversationViewsRequest, GetConversationViewsResponse, GetMessageRequest, GetMultiConfigurationRequest, GetMultiConfigurationResponse, GetMultiConversationDetailsRequest, GetMultiConversationDetailsResponse, GetMultiConversationDetailsResponseDetailedConversation, GetMultiConversationMessageCountRequest, GetMultiConversationMessageCountResponse, GetMultiConversationMessageCountResponseCountsEntry, GetMultiMessagesRequest, GetMultiMessagesResponse, GetMultiParticipantsRequest, GetMultiParticipantsResponse, GetMultiWidgetMessagesRequest, GetMultiWidgetMessagesResponse, GetParticipantsByKeyRequest, GetParticipantsByKeyResponse, GetWidgetConfigRequest, GetWidgetConfigResponse, GetWidgetConversationResponse, GetWidgetRequest, GetWidgetResponse, GlobalParticipantType, InboxApiService, LastSeenByParticipant, ListMessagesRequest, ListMessagesRequestListMessagesFilters, ListMessagesResponse, ListWidgetsRequest, ListWidgetsResponse, LookupConversationsRequest, LookupConversationsRequestLookupConversationsFilters, LookupConversationsResponse, LookupConversationsResponseConversations, Media, Message, MessageStatus, 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, UpdateMessageStatusRequest, UpdateWidgetRequest, UpdateWidgetResponse, UpsertConfigurationRequest, UpsertConfigurationResponse, View, ViewType, Widget, WidgetPosition };
|
|
3097
3178
|
//# sourceMappingURL=vendasta-conversation.mjs.map
|