@vendasta/conversation 0.30.1 → 0.31.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 +3 -3
- package/esm2020/lib/_internal/conversation.api.service.mjs +9 -9
- package/esm2020/lib/_internal/inbox.api.service.mjs +3 -3
- package/esm2020/lib/_internal/interfaces/api.interface.mjs +1 -1
- package/esm2020/lib/_internal/interfaces/conversation-view.interface.mjs +1 -1
- package/esm2020/lib/_internal/interfaces/index.mjs +1 -1
- package/esm2020/lib/_internal/objects/api.mjs +51 -45
- package/esm2020/lib/_internal/objects/conversation-view.mjs +3 -19
- package/esm2020/lib/_internal/objects/index.mjs +3 -3
- package/fesm2015/vendasta-conversation.mjs +90 -74
- package/fesm2015/vendasta-conversation.mjs.map +1 -1
- package/fesm2020/vendasta-conversation.mjs +90 -74
- package/fesm2020/vendasta-conversation.mjs.map +1 -1
- package/lib/_internal/conversation.api.service.d.ts +3 -3
- package/lib/_internal/interfaces/api.interface.d.ts +9 -7
- package/lib/_internal/interfaces/conversation-view.interface.d.ts +1 -5
- package/lib/_internal/interfaces/index.d.ts +2 -2
- package/lib/_internal/objects/api.d.ts +15 -13
- package/lib/_internal/objects/conversation-view.d.ts +3 -7
- package/lib/_internal/objects/index.d.ts +2 -2
- package/package.json +1 -1
|
@@ -127,6 +127,11 @@ var SetLastSeenRequestStatus;
|
|
|
127
127
|
SetLastSeenRequestStatus[SetLastSeenRequestStatus["SET_LAST_SEEN_REQUEST_STATUS_UNREAD"] = 1] = "SET_LAST_SEEN_REQUEST_STATUS_UNREAD";
|
|
128
128
|
})(SetLastSeenRequestStatus || (SetLastSeenRequestStatus = {}));
|
|
129
129
|
|
|
130
|
+
// *********************************
|
|
131
|
+
// Code generated by sdkgen
|
|
132
|
+
// DO NOT EDIT!.
|
|
133
|
+
//
|
|
134
|
+
// Enums Index.
|
|
130
135
|
// *********************************
|
|
131
136
|
|
|
132
137
|
function enumStringToValue$7(enumRef, value) {
|
|
@@ -664,19 +669,13 @@ function enumStringToValue$1(enumRef, value) {
|
|
|
664
669
|
}
|
|
665
670
|
return enumRef[value];
|
|
666
671
|
}
|
|
667
|
-
class
|
|
672
|
+
class View {
|
|
668
673
|
static fromProto(proto) {
|
|
669
|
-
let m = new
|
|
674
|
+
let m = new View();
|
|
670
675
|
m = Object.assign(m, proto);
|
|
671
|
-
if (proto.viewType) {
|
|
672
|
-
m.viewType = enumStringToValue$1(ViewType, proto.viewType);
|
|
673
|
-
}
|
|
674
676
|
if (proto.created) {
|
|
675
677
|
m.created = new Date(proto.created);
|
|
676
678
|
}
|
|
677
|
-
if (proto.updated) {
|
|
678
|
-
m.updated = new Date(proto.updated);
|
|
679
|
-
}
|
|
680
679
|
return m;
|
|
681
680
|
}
|
|
682
681
|
constructor(kwargs) {
|
|
@@ -690,18 +689,9 @@ class ConversationView {
|
|
|
690
689
|
if (typeof this.viewId !== 'undefined') {
|
|
691
690
|
toReturn['viewId'] = this.viewId;
|
|
692
691
|
}
|
|
693
|
-
if (typeof this.participantId !== 'undefined') {
|
|
694
|
-
toReturn['participantId'] = this.participantId;
|
|
695
|
-
}
|
|
696
|
-
if (typeof this.viewType !== 'undefined') {
|
|
697
|
-
toReturn['viewType'] = this.viewType;
|
|
698
|
-
}
|
|
699
692
|
if (typeof this.created !== 'undefined' && this.created !== null) {
|
|
700
693
|
toReturn['created'] = 'toApiJson' in this.created ? this.created.toApiJson() : this.created;
|
|
701
694
|
}
|
|
702
|
-
if (typeof this.updated !== 'undefined' && this.updated !== null) {
|
|
703
|
-
toReturn['updated'] = 'toApiJson' in this.updated ? this.updated.toApiJson() : this.updated;
|
|
704
|
-
}
|
|
705
695
|
return toReturn;
|
|
706
696
|
}
|
|
707
697
|
}
|
|
@@ -732,6 +722,9 @@ class AddConversationToConversationViewRequest {
|
|
|
732
722
|
if (typeof this.conversationId !== 'undefined') {
|
|
733
723
|
toReturn['conversationId'] = this.conversationId;
|
|
734
724
|
}
|
|
725
|
+
if (typeof this.participantId !== 'undefined') {
|
|
726
|
+
toReturn['participantId'] = this.participantId;
|
|
727
|
+
}
|
|
735
728
|
return toReturn;
|
|
736
729
|
}
|
|
737
730
|
}
|
|
@@ -1201,6 +1194,49 @@ class GetConversationByKeyResponse {
|
|
|
1201
1194
|
return toReturn;
|
|
1202
1195
|
}
|
|
1203
1196
|
}
|
|
1197
|
+
class GetConversationViewsRequest {
|
|
1198
|
+
static fromProto(proto) {
|
|
1199
|
+
let m = new GetConversationViewsRequest();
|
|
1200
|
+
m = Object.assign(m, proto);
|
|
1201
|
+
return m;
|
|
1202
|
+
}
|
|
1203
|
+
constructor(kwargs) {
|
|
1204
|
+
if (!kwargs) {
|
|
1205
|
+
return;
|
|
1206
|
+
}
|
|
1207
|
+
Object.assign(this, kwargs);
|
|
1208
|
+
}
|
|
1209
|
+
toApiJson() {
|
|
1210
|
+
const toReturn = {};
|
|
1211
|
+
if (typeof this.participantId !== 'undefined') {
|
|
1212
|
+
toReturn['participantId'] = this.participantId;
|
|
1213
|
+
}
|
|
1214
|
+
return toReturn;
|
|
1215
|
+
}
|
|
1216
|
+
}
|
|
1217
|
+
class GetConversationViewsResponse {
|
|
1218
|
+
static fromProto(proto) {
|
|
1219
|
+
let m = new GetConversationViewsResponse();
|
|
1220
|
+
m = Object.assign(m, proto);
|
|
1221
|
+
if (proto.views) {
|
|
1222
|
+
m.views = proto.views.map(View.fromProto);
|
|
1223
|
+
}
|
|
1224
|
+
return m;
|
|
1225
|
+
}
|
|
1226
|
+
constructor(kwargs) {
|
|
1227
|
+
if (!kwargs) {
|
|
1228
|
+
return;
|
|
1229
|
+
}
|
|
1230
|
+
Object.assign(this, kwargs);
|
|
1231
|
+
}
|
|
1232
|
+
toApiJson() {
|
|
1233
|
+
const toReturn = {};
|
|
1234
|
+
if (typeof this.views !== 'undefined' && this.views !== null) {
|
|
1235
|
+
toReturn['views'] = 'toApiJson' in this.views ? this.views.toApiJson() : this.views;
|
|
1236
|
+
}
|
|
1237
|
+
return toReturn;
|
|
1238
|
+
}
|
|
1239
|
+
}
|
|
1204
1240
|
class GetMessageRequest {
|
|
1205
1241
|
static fromProto(proto) {
|
|
1206
1242
|
let m = new GetMessageRequest();
|
|
@@ -1575,49 +1611,6 @@ class ListMessagesResponse {
|
|
|
1575
1611
|
return toReturn;
|
|
1576
1612
|
}
|
|
1577
1613
|
}
|
|
1578
|
-
class ListParticipantConversationViewsRequest {
|
|
1579
|
-
static fromProto(proto) {
|
|
1580
|
-
let m = new ListParticipantConversationViewsRequest();
|
|
1581
|
-
m = Object.assign(m, proto);
|
|
1582
|
-
return m;
|
|
1583
|
-
}
|
|
1584
|
-
constructor(kwargs) {
|
|
1585
|
-
if (!kwargs) {
|
|
1586
|
-
return;
|
|
1587
|
-
}
|
|
1588
|
-
Object.assign(this, kwargs);
|
|
1589
|
-
}
|
|
1590
|
-
toApiJson() {
|
|
1591
|
-
const toReturn = {};
|
|
1592
|
-
if (typeof this.participantId !== 'undefined') {
|
|
1593
|
-
toReturn['participantId'] = this.participantId;
|
|
1594
|
-
}
|
|
1595
|
-
return toReturn;
|
|
1596
|
-
}
|
|
1597
|
-
}
|
|
1598
|
-
class ListParticipantConversationViewsResponse {
|
|
1599
|
-
static fromProto(proto) {
|
|
1600
|
-
let m = new ListParticipantConversationViewsResponse();
|
|
1601
|
-
m = Object.assign(m, proto);
|
|
1602
|
-
if (proto.conversationViews) {
|
|
1603
|
-
m.conversationViews = proto.conversationViews.map(ConversationView.fromProto);
|
|
1604
|
-
}
|
|
1605
|
-
return m;
|
|
1606
|
-
}
|
|
1607
|
-
constructor(kwargs) {
|
|
1608
|
-
if (!kwargs) {
|
|
1609
|
-
return;
|
|
1610
|
-
}
|
|
1611
|
-
Object.assign(this, kwargs);
|
|
1612
|
-
}
|
|
1613
|
-
toApiJson() {
|
|
1614
|
-
const toReturn = {};
|
|
1615
|
-
if (typeof this.conversationViews !== 'undefined' && this.conversationViews !== null) {
|
|
1616
|
-
toReturn['conversationViews'] = 'toApiJson' in this.conversationViews ? this.conversationViews.toApiJson() : this.conversationViews;
|
|
1617
|
-
}
|
|
1618
|
-
return toReturn;
|
|
1619
|
-
}
|
|
1620
|
-
}
|
|
1621
1614
|
class LookupConversationsRequestLookupConversationsFilters {
|
|
1622
1615
|
static fromProto(proto) {
|
|
1623
1616
|
let m = new LookupConversationsRequestLookupConversationsFilters();
|
|
@@ -1912,6 +1905,9 @@ class RemoveConversationFromConversationViewRequest {
|
|
|
1912
1905
|
if (typeof this.conversationId !== 'undefined') {
|
|
1913
1906
|
toReturn['conversationId'] = this.conversationId;
|
|
1914
1907
|
}
|
|
1908
|
+
if (typeof this.participantId !== 'undefined') {
|
|
1909
|
+
toReturn['participantId'] = this.participantId;
|
|
1910
|
+
}
|
|
1915
1911
|
return toReturn;
|
|
1916
1912
|
}
|
|
1917
1913
|
}
|
|
@@ -2186,6 +2182,11 @@ class UpsertConfigurationResponse {
|
|
|
2186
2182
|
}
|
|
2187
2183
|
}
|
|
2188
2184
|
|
|
2185
|
+
// *********************************
|
|
2186
|
+
// Code generated by sdkgen
|
|
2187
|
+
// DO NOT EDIT!.
|
|
2188
|
+
//
|
|
2189
|
+
// Objects Index.
|
|
2189
2190
|
// *********************************
|
|
2190
2191
|
|
|
2191
2192
|
const environment = (window ? window['environment'] : 'prod') ?? 'prod';
|
|
@@ -2204,13 +2205,18 @@ class HostService {
|
|
|
2204
2205
|
return 'https://' + this.host;
|
|
2205
2206
|
}
|
|
2206
2207
|
}
|
|
2207
|
-
HostService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
2208
|
-
HostService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
|
2209
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
2208
|
+
HostService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: HostService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2209
|
+
HostService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: HostService, providedIn: 'root' });
|
|
2210
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: HostService, decorators: [{
|
|
2210
2211
|
type: Injectable,
|
|
2211
2212
|
args: [{ providedIn: 'root' }]
|
|
2212
2213
|
}] });
|
|
2213
2214
|
|
|
2215
|
+
// *********************************
|
|
2216
|
+
// Code generated by sdkgen
|
|
2217
|
+
// DO NOT EDIT!.
|
|
2218
|
+
//
|
|
2219
|
+
// API Service.
|
|
2214
2220
|
// *********************************
|
|
2215
2221
|
class ConversationApiService {
|
|
2216
2222
|
constructor(http, hostService) {
|
|
@@ -2316,10 +2322,10 @@ class ConversationApiService {
|
|
|
2316
2322
|
return this.http.post(this._host + "/conversation.v1.ConversationService/GetParticipantsByKey", request.toApiJson(), this.apiOptions())
|
|
2317
2323
|
.pipe(map(resp => GetParticipantsByKeyResponse.fromProto(resp)));
|
|
2318
2324
|
}
|
|
2319
|
-
|
|
2320
|
-
const request = (r.toApiJson) ? r : new
|
|
2321
|
-
return this.http.post(this._host + "/conversation.v1.ConversationService/
|
|
2322
|
-
.pipe(map(resp =>
|
|
2325
|
+
getConversationViews(r) {
|
|
2326
|
+
const request = (r.toApiJson) ? r : new GetConversationViewsRequest(r);
|
|
2327
|
+
return this.http.post(this._host + "/conversation.v1.ConversationService/GetConversationViews", request.toApiJson(), this.apiOptions())
|
|
2328
|
+
.pipe(map(resp => GetConversationViewsResponse.fromProto(resp)));
|
|
2323
2329
|
}
|
|
2324
2330
|
addConversationToConversationView(r) {
|
|
2325
2331
|
const request = (r.toApiJson) ? r : new AddConversationToConversationViewRequest(r);
|
|
@@ -2330,13 +2336,18 @@ class ConversationApiService {
|
|
|
2330
2336
|
return this.http.post(this._host + "/conversation.v1.ConversationService/RemoveConversationFromConversationView", request.toApiJson(), { ...this.apiOptions(), observe: 'response' });
|
|
2331
2337
|
}
|
|
2332
2338
|
}
|
|
2333
|
-
ConversationApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
2334
|
-
ConversationApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
|
2335
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
2339
|
+
ConversationApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConversationApiService, deps: [{ token: i1.HttpClient }, { token: HostService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2340
|
+
ConversationApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConversationApiService, providedIn: 'root' });
|
|
2341
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConversationApiService, decorators: [{
|
|
2336
2342
|
type: Injectable,
|
|
2337
2343
|
args: [{ providedIn: 'root' }]
|
|
2338
2344
|
}], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: HostService }]; } });
|
|
2339
2345
|
|
|
2346
|
+
// *********************************
|
|
2347
|
+
// Code generated by sdkgen
|
|
2348
|
+
// DO NOT EDIT!.
|
|
2349
|
+
//
|
|
2350
|
+
// API Service.
|
|
2340
2351
|
// *********************************
|
|
2341
2352
|
class InboxApiService {
|
|
2342
2353
|
constructor(http, hostService) {
|
|
@@ -2368,18 +2379,23 @@ class InboxApiService {
|
|
|
2368
2379
|
.pipe(map(resp => UpsertConfigurationResponse.fromProto(resp)));
|
|
2369
2380
|
}
|
|
2370
2381
|
}
|
|
2371
|
-
InboxApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
2372
|
-
InboxApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
|
2373
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
2382
|
+
InboxApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: InboxApiService, deps: [{ token: i1.HttpClient }, { token: HostService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2383
|
+
InboxApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: InboxApiService, providedIn: 'root' });
|
|
2384
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: InboxApiService, decorators: [{
|
|
2374
2385
|
type: Injectable,
|
|
2375
2386
|
args: [{ providedIn: 'root' }]
|
|
2376
2387
|
}], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: HostService }]; } });
|
|
2377
2388
|
|
|
2378
2389
|
// *********************************
|
|
2390
|
+
// Code generated by sdkgen
|
|
2391
|
+
// DO NOT EDIT!.
|
|
2392
|
+
//
|
|
2393
|
+
// Index.
|
|
2394
|
+
// *********************************
|
|
2379
2395
|
|
|
2380
2396
|
/**
|
|
2381
2397
|
* Generated bundle index. Do not edit.
|
|
2382
2398
|
*/
|
|
2383
2399
|
|
|
2384
|
-
export { Access, AddConversationToConversationViewRequest, AddMultiParticipantsRequest, AddMultiParticipantsResponse, Address, Configuration, Conversation, ConversationApiService, ConversationChannel, ConversationKey, ConversationMessageCount,
|
|
2400
|
+
export { Access, AddConversationToConversationViewRequest, AddMultiParticipantsRequest, AddMultiParticipantsResponse, Address, Configuration, Conversation, ConversationApiService, ConversationChannel, ConversationKey, ConversationMessageCount, CreateConversationRequest, CreateConversationResponse, CreateMultiMessagesRequest, DeleteConversationRequest, DeleteMessageRequest, GetConfigurationRequest, GetConfigurationResponse, GetConversationByKeyRequest, GetConversationByKeyResponse, GetConversationViewsRequest, GetConversationViewsResponse, GetMessageRequest, GetMultiConfigurationRequest, GetMultiConfigurationResponse, GetMultiConversationDetailsRequest, GetMultiConversationDetailsResponse, GetMultiConversationDetailsResponseDetailedConversation, GetMultiConversationMessageCountRequest, GetMultiConversationMessageCountResponse, GetMultiConversationMessageCountResponseCountsEntry, GetMultiMessagesRequest, GetMultiMessagesResponse, GetMultiParticipantsRequest, GetMultiParticipantsResponse, GetParticipantsByKeyRequest, GetParticipantsByKeyResponse, GlobalParticipantType, InboxApiService, LastSeenByParticipant, ListMessagesRequest, ListMessagesRequestListMessagesFilters, ListMessagesResponse, LookupConversationsRequest, LookupConversationsRequestLookupConversationsFilters, LookupConversationsResponse, LookupConversationsResponseConversations, Message, MessageStatus, MessageType, Metadata, MetadataDataEntry, MetadataIdentifier, PagedRequestOptions, PagedResponseMetadata, Participant, ParticipantKey, ParticipantMessageStatus, ParticipantType, PlatformLocation, ReceiveMessageRequest, ReceiveMessageRequestMetadataEntry, RemoveConversationFromConversationViewRequest, SearchConversationsRequest, SearchConversationsResponse, SearchConversationsResponseDetailedConversation, SendMessageRequest, SendMessageResponse, SetLastSeenRequest, SetLastSeenRequestStatus, SetLastSeenResponse, SortDirection, SubjectParticipant, UpdateMessageStatusRequest, UpsertConfigurationRequest, UpsertConfigurationResponse, View, ViewType };
|
|
2385
2401
|
//# sourceMappingURL=vendasta-conversation.mjs.map
|