@vendasta/conversation 0.30.1 → 0.32.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.
@@ -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 ConversationView {
672
+ class View {
668
673
  static fromProto(proto) {
669
- let m = new ConversationView();
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();
@@ -1481,6 +1517,9 @@ class GetParticipantsByKeyResponse {
1481
1517
  if (proto.participants) {
1482
1518
  m.participants = proto.participants.map(Participant.fromProto);
1483
1519
  }
1520
+ if (proto.participant) {
1521
+ m.participant = Participant.fromProto(proto.participant);
1522
+ }
1484
1523
  return m;
1485
1524
  }
1486
1525
  constructor(kwargs) {
@@ -1494,6 +1533,9 @@ class GetParticipantsByKeyResponse {
1494
1533
  if (typeof this.participants !== 'undefined' && this.participants !== null) {
1495
1534
  toReturn['participants'] = 'toApiJson' in this.participants ? this.participants.toApiJson() : this.participants;
1496
1535
  }
1536
+ if (typeof this.participant !== 'undefined' && this.participant !== null) {
1537
+ toReturn['participant'] = 'toApiJson' in this.participant ? this.participant.toApiJson() : this.participant;
1538
+ }
1497
1539
  return toReturn;
1498
1540
  }
1499
1541
  }
@@ -1575,49 +1617,6 @@ class ListMessagesResponse {
1575
1617
  return toReturn;
1576
1618
  }
1577
1619
  }
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
1620
  class LookupConversationsRequestLookupConversationsFilters {
1622
1621
  static fromProto(proto) {
1623
1622
  let m = new LookupConversationsRequestLookupConversationsFilters();
@@ -1912,6 +1911,9 @@ class RemoveConversationFromConversationViewRequest {
1912
1911
  if (typeof this.conversationId !== 'undefined') {
1913
1912
  toReturn['conversationId'] = this.conversationId;
1914
1913
  }
1914
+ if (typeof this.participantId !== 'undefined') {
1915
+ toReturn['participantId'] = this.participantId;
1916
+ }
1915
1917
  return toReturn;
1916
1918
  }
1917
1919
  }
@@ -2186,6 +2188,11 @@ class UpsertConfigurationResponse {
2186
2188
  }
2187
2189
  }
2188
2190
 
2191
+ // *********************************
2192
+ // Code generated by sdkgen
2193
+ // DO NOT EDIT!.
2194
+ //
2195
+ // Objects Index.
2189
2196
  // *********************************
2190
2197
 
2191
2198
  const environment = (window ? window['environment'] : 'prod') ?? 'prod';
@@ -2204,13 +2211,18 @@ class HostService {
2204
2211
  return 'https://' + this.host;
2205
2212
  }
2206
2213
  }
2207
- HostService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: HostService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2208
- HostService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: HostService, providedIn: 'root' });
2209
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: HostService, decorators: [{
2214
+ HostService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: HostService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2215
+ HostService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: HostService, providedIn: 'root' });
2216
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: HostService, decorators: [{
2210
2217
  type: Injectable,
2211
2218
  args: [{ providedIn: 'root' }]
2212
2219
  }] });
2213
2220
 
2221
+ // *********************************
2222
+ // Code generated by sdkgen
2223
+ // DO NOT EDIT!.
2224
+ //
2225
+ // API Service.
2214
2226
  // *********************************
2215
2227
  class ConversationApiService {
2216
2228
  constructor(http, hostService) {
@@ -2316,10 +2328,10 @@ class ConversationApiService {
2316
2328
  return this.http.post(this._host + "/conversation.v1.ConversationService/GetParticipantsByKey", request.toApiJson(), this.apiOptions())
2317
2329
  .pipe(map(resp => GetParticipantsByKeyResponse.fromProto(resp)));
2318
2330
  }
2319
- listParticipantConversationViews(r) {
2320
- const request = (r.toApiJson) ? r : new ListParticipantConversationViewsRequest(r);
2321
- return this.http.post(this._host + "/conversation.v1.ConversationService/ListParticipantConversationViews", request.toApiJson(), this.apiOptions())
2322
- .pipe(map(resp => ListParticipantConversationViewsResponse.fromProto(resp)));
2331
+ getConversationViews(r) {
2332
+ const request = (r.toApiJson) ? r : new GetConversationViewsRequest(r);
2333
+ return this.http.post(this._host + "/conversation.v1.ConversationService/GetConversationViews", request.toApiJson(), this.apiOptions())
2334
+ .pipe(map(resp => GetConversationViewsResponse.fromProto(resp)));
2323
2335
  }
2324
2336
  addConversationToConversationView(r) {
2325
2337
  const request = (r.toApiJson) ? r : new AddConversationToConversationViewRequest(r);
@@ -2330,13 +2342,18 @@ class ConversationApiService {
2330
2342
  return this.http.post(this._host + "/conversation.v1.ConversationService/RemoveConversationFromConversationView", request.toApiJson(), { ...this.apiOptions(), observe: 'response' });
2331
2343
  }
2332
2344
  }
2333
- ConversationApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ConversationApiService, deps: [{ token: i1.HttpClient }, { token: HostService }], target: i0.ɵɵFactoryTarget.Injectable });
2334
- ConversationApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ConversationApiService, providedIn: 'root' });
2335
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ConversationApiService, decorators: [{
2345
+ 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 });
2346
+ ConversationApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConversationApiService, providedIn: 'root' });
2347
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConversationApiService, decorators: [{
2336
2348
  type: Injectable,
2337
2349
  args: [{ providedIn: 'root' }]
2338
2350
  }], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: HostService }]; } });
2339
2351
 
2352
+ // *********************************
2353
+ // Code generated by sdkgen
2354
+ // DO NOT EDIT!.
2355
+ //
2356
+ // API Service.
2340
2357
  // *********************************
2341
2358
  class InboxApiService {
2342
2359
  constructor(http, hostService) {
@@ -2368,18 +2385,23 @@ class InboxApiService {
2368
2385
  .pipe(map(resp => UpsertConfigurationResponse.fromProto(resp)));
2369
2386
  }
2370
2387
  }
2371
- InboxApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: InboxApiService, deps: [{ token: i1.HttpClient }, { token: HostService }], target: i0.ɵɵFactoryTarget.Injectable });
2372
- InboxApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: InboxApiService, providedIn: 'root' });
2373
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: InboxApiService, decorators: [{
2388
+ 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 });
2389
+ InboxApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: InboxApiService, providedIn: 'root' });
2390
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: InboxApiService, decorators: [{
2374
2391
  type: Injectable,
2375
2392
  args: [{ providedIn: 'root' }]
2376
2393
  }], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: HostService }]; } });
2377
2394
 
2378
2395
  // *********************************
2396
+ // Code generated by sdkgen
2397
+ // DO NOT EDIT!.
2398
+ //
2399
+ // Index.
2400
+ // *********************************
2379
2401
 
2380
2402
  /**
2381
2403
  * Generated bundle index. Do not edit.
2382
2404
  */
2383
2405
 
2384
- export { Access, AddConversationToConversationViewRequest, AddMultiParticipantsRequest, AddMultiParticipantsResponse, Address, Configuration, Conversation, ConversationApiService, ConversationChannel, ConversationKey, ConversationMessageCount, ConversationView, CreateConversationRequest, CreateConversationResponse, CreateMultiMessagesRequest, DeleteConversationRequest, DeleteMessageRequest, GetConfigurationRequest, GetConfigurationResponse, GetConversationByKeyRequest, GetConversationByKeyResponse, GetMessageRequest, GetMultiConfigurationRequest, GetMultiConfigurationResponse, GetMultiConversationDetailsRequest, GetMultiConversationDetailsResponse, GetMultiConversationDetailsResponseDetailedConversation, GetMultiConversationMessageCountRequest, GetMultiConversationMessageCountResponse, GetMultiConversationMessageCountResponseCountsEntry, GetMultiMessagesRequest, GetMultiMessagesResponse, GetMultiParticipantsRequest, GetMultiParticipantsResponse, GetParticipantsByKeyRequest, GetParticipantsByKeyResponse, GlobalParticipantType, InboxApiService, LastSeenByParticipant, ListMessagesRequest, ListMessagesRequestListMessagesFilters, ListMessagesResponse, ListParticipantConversationViewsRequest, ListParticipantConversationViewsResponse, 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, ViewType };
2406
+ 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
2407
  //# sourceMappingURL=vendasta-conversation.mjs.map