@vendasta/conversation 0.13.0 → 0.16.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.
Files changed (63) hide show
  1. package/esm2020/lib/_generated/host.service.mjs +25 -0
  2. package/esm2020/lib/_internal/conversation.api.service.mjs +116 -0
  3. package/esm2020/lib/_internal/enums/api.enum.mjs +14 -0
  4. package/esm2020/lib/_internal/enums/conversation.enum.mjs +25 -0
  5. package/esm2020/lib/_internal/enums/index.mjs +11 -0
  6. package/esm2020/lib/_internal/enums/message.enum.mjs +21 -0
  7. package/esm2020/lib/_internal/enums/participant.enum.mjs +18 -0
  8. package/esm2020/lib/_internal/index.mjs +11 -0
  9. package/esm2020/lib/_internal/interfaces/api.interface.mjs +2 -0
  10. package/esm2020/lib/_internal/interfaces/conversation.interface.mjs +8 -0
  11. package/esm2020/lib/_internal/interfaces/index.mjs +2 -0
  12. package/esm2020/lib/_internal/interfaces/message.interface.mjs +8 -0
  13. package/esm2020/lib/_internal/interfaces/participant.interface.mjs +8 -0
  14. package/esm2020/lib/_internal/objects/api.mjs +1141 -0
  15. package/esm2020/lib/_internal/objects/conversation.mjs +73 -0
  16. package/esm2020/lib/_internal/objects/index.mjs +11 -0
  17. package/esm2020/lib/_internal/objects/message.mjs +105 -0
  18. package/esm2020/lib/_internal/objects/participant.mjs +129 -0
  19. package/esm2020/lib/index.mjs +3 -0
  20. package/esm2020/public_api.mjs +2 -0
  21. package/esm2020/vendasta-conversation.mjs +5 -0
  22. package/fesm2015/vendasta-conversation.mjs +1664 -0
  23. package/fesm2015/vendasta-conversation.mjs.map +1 -0
  24. package/{fesm2015/vendasta-conversation.js → fesm2020/vendasta-conversation.mjs} +144 -125
  25. package/fesm2020/vendasta-conversation.mjs.map +1 -0
  26. package/lib/_generated/host.service.d.ts +5 -9
  27. package/lib/_internal/conversation.api.service.d.ts +7 -2
  28. package/lib/_internal/interfaces/api.interface.d.ts +10 -2
  29. package/lib/_internal/interfaces/index.d.ts +1 -1
  30. package/lib/_internal/interfaces/participant.interface.d.ts +1 -0
  31. package/lib/_internal/objects/api.d.ts +20 -6
  32. package/lib/_internal/objects/index.d.ts +1 -1
  33. package/lib/_internal/objects/participant.d.ts +1 -0
  34. package/package.json +27 -16
  35. package/src/README.md +1 -0
  36. package/vendasta-conversation.d.ts +1 -1
  37. package/bundles/vendasta-conversation.umd.js +0 -1712
  38. package/bundles/vendasta-conversation.umd.js.map +0 -1
  39. package/bundles/vendasta-conversation.umd.min.js +0 -2
  40. package/bundles/vendasta-conversation.umd.min.js.map +0 -1
  41. package/esm2015/lib/_generated/host.service.js +0 -65
  42. package/esm2015/lib/_internal/conversation.api.service.js +0 -112
  43. package/esm2015/lib/_internal/enums/api.enum.js +0 -14
  44. package/esm2015/lib/_internal/enums/conversation.enum.js +0 -25
  45. package/esm2015/lib/_internal/enums/index.js +0 -11
  46. package/esm2015/lib/_internal/enums/message.enum.js +0 -21
  47. package/esm2015/lib/_internal/enums/participant.enum.js +0 -18
  48. package/esm2015/lib/_internal/index.js +0 -11
  49. package/esm2015/lib/_internal/interfaces/api.interface.js +0 -2
  50. package/esm2015/lib/_internal/interfaces/conversation.interface.js +0 -8
  51. package/esm2015/lib/_internal/interfaces/index.js +0 -2
  52. package/esm2015/lib/_internal/interfaces/message.interface.js +0 -8
  53. package/esm2015/lib/_internal/interfaces/participant.interface.js +0 -8
  54. package/esm2015/lib/_internal/objects/api.js +0 -1092
  55. package/esm2015/lib/_internal/objects/conversation.js +0 -73
  56. package/esm2015/lib/_internal/objects/index.js +0 -11
  57. package/esm2015/lib/_internal/objects/message.js +0 -105
  58. package/esm2015/lib/_internal/objects/participant.js +0 -126
  59. package/esm2015/lib/index.js +0 -3
  60. package/esm2015/public_api.js +0 -2
  61. package/esm2015/vendasta-conversation.js +0 -6
  62. package/fesm2015/vendasta-conversation.js.map +0 -1
  63. package/vendasta-conversation.metadata.json +0 -1
@@ -1,7 +1,8 @@
1
- import { ɵɵdefineInjectable, ɵɵinject, Injectable } from '@angular/core';
2
- import { HttpHeaders, HttpClient } from '@angular/common/http';
3
- import { Environment, EnvironmentService } from '@vendasta/core';
4
- import { map, share } from 'rxjs/operators';
1
+ import * as i0 from '@angular/core';
2
+ import { Injectable } from '@angular/core';
3
+ import * as i1 from '@angular/common/http';
4
+ import { HttpHeaders } from '@angular/common/http';
5
+ import { map } from 'rxjs/operators';
5
6
 
6
7
  // *********************************
7
8
  // Code generated by sdkgen
@@ -83,7 +84,7 @@ var MetadataIdentifier;
83
84
 
84
85
  // *********************************
85
86
 
86
- function enumStringToValue(enumRef, value) {
87
+ function enumStringToValue$3(enumRef, value) {
87
88
  if (typeof value === 'number') {
88
89
  return value;
89
90
  }
@@ -100,7 +101,7 @@ class Message {
100
101
  let m = new Message();
101
102
  m = Object.assign(m, proto);
102
103
  if (proto.type) {
103
- m.type = enumStringToValue(MessageType, proto.type);
104
+ m.type = enumStringToValue$3(MessageType, proto.type);
104
105
  }
105
106
  if (proto.created) {
106
107
  m.created = new Date(proto.created);
@@ -162,7 +163,7 @@ class ParticipantMessageStatus {
162
163
  let m = new ParticipantMessageStatus();
163
164
  m = Object.assign(m, proto);
164
165
  if (proto.status) {
165
- m.status = enumStringToValue(MessageStatus, proto.status);
166
+ m.status = enumStringToValue$3(MessageStatus, proto.status);
166
167
  }
167
168
  if (proto.updated) {
168
169
  m.updated = new Date(proto.updated);
@@ -187,7 +188,7 @@ class ParticipantMessageStatus {
187
188
  }
188
189
  }
189
190
 
190
- function enumStringToValue$1(enumRef, value) {
191
+ function enumStringToValue$2(enumRef, value) {
191
192
  if (typeof value === 'number') {
192
193
  return value;
193
194
  }
@@ -204,7 +205,7 @@ class Conversation {
204
205
  let m = new Conversation();
205
206
  m = Object.assign(m, proto);
206
207
  if (proto.channel) {
207
- m.channel = enumStringToValue$1(ConversationChannel, proto.channel);
208
+ m.channel = enumStringToValue$2(ConversationChannel, proto.channel);
208
209
  }
209
210
  if (proto.created) {
210
211
  m.created = new Date(proto.created);
@@ -219,7 +220,7 @@ class Conversation {
219
220
  m.latestMsgSentTime = new Date(proto.latestMsgSentTime);
220
221
  }
221
222
  if (proto.originLocation) {
222
- m.originLocation = enumStringToValue$1(PlatformLocation, proto.originLocation);
223
+ m.originLocation = enumStringToValue$2(PlatformLocation, proto.originLocation);
223
224
  }
224
225
  return m;
225
226
  }
@@ -259,7 +260,7 @@ class Conversation {
259
260
  }
260
261
  }
261
262
 
262
- function enumStringToValue$2(enumRef, value) {
263
+ function enumStringToValue$1(enumRef, value) {
263
264
  if (typeof value === 'number') {
264
265
  return value;
265
266
  }
@@ -311,10 +312,10 @@ class Participant {
311
312
  let m = new Participant();
312
313
  m = Object.assign(m, proto);
313
314
  if (proto.location) {
314
- m.location = enumStringToValue$2(PlatformLocation, proto.location);
315
+ m.location = enumStringToValue$1(PlatformLocation, proto.location);
315
316
  }
316
317
  if (proto.channel) {
317
- m.channel = enumStringToValue$2(ConversationChannel, proto.channel);
318
+ m.channel = enumStringToValue$1(ConversationChannel, proto.channel);
318
319
  }
319
320
  if (proto.created) {
320
321
  m.created = new Date(proto.created);
@@ -326,7 +327,7 @@ class Participant {
326
327
  m.deleted = new Date(proto.deleted);
327
328
  }
328
329
  if (proto.participantType) {
329
- m.participantType = enumStringToValue$2(ParticipantType, proto.participantType);
330
+ m.participantType = enumStringToValue$1(ParticipantType, proto.participantType);
330
331
  }
331
332
  if (proto.address) {
332
333
  m.address = Address.fromProto(proto.address);
@@ -380,11 +381,14 @@ class Participant {
380
381
  if (typeof this.address !== 'undefined' && this.address !== null) {
381
382
  toReturn['address'] = 'toApiJson' in this.address ? this.address.toApiJson() : this.address;
382
383
  }
384
+ if (typeof this.isSubjectParticipant !== 'undefined') {
385
+ toReturn['isSubjectParticipant'] = this.isSubjectParticipant;
386
+ }
383
387
  return toReturn;
384
388
  }
385
389
  }
386
390
 
387
- function enumStringToValue$3(enumRef, value) {
391
+ function enumStringToValue(enumRef, value) {
388
392
  if (typeof value === 'number') {
389
393
  return value;
390
394
  }
@@ -534,7 +538,7 @@ class CreateConversationRequest {
534
538
  m.participants = proto.participants.map(Participant.fromProto);
535
539
  }
536
540
  if (proto.channel) {
537
- m.channel = enumStringToValue$3(ConversationChannel, proto.channel);
541
+ m.channel = enumStringToValue(ConversationChannel, proto.channel);
538
542
  }
539
543
  if (proto.created) {
540
544
  m.created = new Date(proto.created);
@@ -543,7 +547,7 @@ class CreateConversationRequest {
543
547
  m.updated = new Date(proto.updated);
544
548
  }
545
549
  if (proto.originLocation) {
546
- m.originLocation = enumStringToValue$3(PlatformLocation, proto.originLocation);
550
+ m.originLocation = enumStringToValue(PlatformLocation, proto.originLocation);
547
551
  }
548
552
  return m;
549
553
  }
@@ -694,7 +698,7 @@ class DeleteMessageRequest {
694
698
  return toReturn;
695
699
  }
696
700
  }
697
- class GetMultiConversationDetailsResponseDetailedConversation {
701
+ class SearchConversationsResponseDetailedConversation {
698
702
  constructor(kwargs) {
699
703
  if (!kwargs) {
700
704
  return;
@@ -702,7 +706,7 @@ class GetMultiConversationDetailsResponseDetailedConversation {
702
706
  Object.assign(this, kwargs);
703
707
  }
704
708
  static fromProto(proto) {
705
- let m = new GetMultiConversationDetailsResponseDetailedConversation();
709
+ let m = new SearchConversationsResponseDetailedConversation();
706
710
  m = Object.assign(m, proto);
707
711
  if (proto.conversation) {
708
712
  m.conversation = Conversation.fromProto(proto.conversation);
@@ -729,7 +733,7 @@ class GetMultiConversationDetailsResponseDetailedConversation {
729
733
  return toReturn;
730
734
  }
731
735
  }
732
- class SearchConversationsResponseDetailedConversation {
736
+ class GetMultiConversationDetailsResponseDetailedConversation {
733
737
  constructor(kwargs) {
734
738
  if (!kwargs) {
735
739
  return;
@@ -737,7 +741,7 @@ class SearchConversationsResponseDetailedConversation {
737
741
  Object.assign(this, kwargs);
738
742
  }
739
743
  static fromProto(proto) {
740
- let m = new SearchConversationsResponseDetailedConversation();
744
+ let m = new GetMultiConversationDetailsResponseDetailedConversation();
741
745
  m = Object.assign(m, proto);
742
746
  if (proto.conversation) {
743
747
  m.conversation = Conversation.fromProto(proto.conversation);
@@ -893,6 +897,9 @@ class GetMultiMessagesRequest {
893
897
  if (typeof this.messageIds !== 'undefined') {
894
898
  toReturn['messageIds'] = this.messageIds;
895
899
  }
900
+ if (typeof this.conversationId !== 'undefined') {
901
+ toReturn['conversationId'] = this.conversationId;
902
+ }
896
903
  return toReturn;
897
904
  }
898
905
  }
@@ -936,6 +943,9 @@ class GetMultiParticipantsRequest {
936
943
  if (typeof this.participantIds !== 'undefined') {
937
944
  toReturn['participantIds'] = this.participantIds;
938
945
  }
946
+ if (typeof this.conversationId !== 'undefined') {
947
+ toReturn['conversationId'] = this.conversationId;
948
+ }
939
949
  return toReturn;
940
950
  }
941
951
  }
@@ -1051,13 +1061,13 @@ class LookupConversationsRequestLookupConversationsFilters {
1051
1061
  let m = new LookupConversationsRequestLookupConversationsFilters();
1052
1062
  m = Object.assign(m, proto);
1053
1063
  if (proto.location) {
1054
- m.location = enumStringToValue$3(PlatformLocation, proto.location);
1064
+ m.location = enumStringToValue(PlatformLocation, proto.location);
1055
1065
  }
1056
1066
  if (proto.channel) {
1057
- m.channel = enumStringToValue$3(ConversationChannel, proto.channel);
1067
+ m.channel = enumStringToValue(ConversationChannel, proto.channel);
1058
1068
  }
1059
1069
  if (proto.originLocation) {
1060
- m.originLocation = enumStringToValue$3(PlatformLocation, proto.originLocation);
1070
+ m.originLocation = enumStringToValue(PlatformLocation, proto.originLocation);
1061
1071
  }
1062
1072
  return m;
1063
1073
  }
@@ -1156,7 +1166,7 @@ class Metadata {
1156
1166
  let m = new Metadata();
1157
1167
  m = Object.assign(m, proto);
1158
1168
  if (proto.identifier) {
1159
- m.identifier = enumStringToValue$3(MetadataIdentifier, proto.identifier);
1169
+ m.identifier = enumStringToValue(MetadataIdentifier, proto.identifier);
1160
1170
  }
1161
1171
  if (proto.data) {
1162
1172
  m.data = Object.keys(proto.data).reduce((obj, k) => { obj[k] = proto.data[k]; return obj; }, {});
@@ -1254,13 +1264,13 @@ class ReceiveMessageRequest {
1254
1264
  let m = new ReceiveMessageRequest();
1255
1265
  m = Object.assign(m, proto);
1256
1266
  if (proto.channel) {
1257
- m.channel = enumStringToValue$3(ConversationChannel, proto.channel);
1267
+ m.channel = enumStringToValue(ConversationChannel, proto.channel);
1258
1268
  }
1259
1269
  if (proto.type) {
1260
- m.type = enumStringToValue$3(MessageType, proto.type);
1270
+ m.type = enumStringToValue(MessageType, proto.type);
1261
1271
  }
1262
1272
  if (proto.location) {
1263
- m.location = enumStringToValue$3(PlatformLocation, proto.location);
1273
+ m.location = enumStringToValue(PlatformLocation, proto.location);
1264
1274
  }
1265
1275
  if (proto.metadata) {
1266
1276
  m.metadata = Object.keys(proto.metadata).reduce((obj, k) => { obj[k] = proto.metadata[k]; return obj; }, {});
@@ -1319,7 +1329,7 @@ class SearchConversationsRequest {
1319
1329
  let m = new SearchConversationsRequest();
1320
1330
  m = Object.assign(m, proto);
1321
1331
  if (proto.location) {
1322
- m.location = enumStringToValue$3(PlatformLocation, proto.location);
1332
+ m.location = enumStringToValue(PlatformLocation, proto.location);
1323
1333
  }
1324
1334
  if (proto.pagingOptions) {
1325
1335
  m.pagingOptions = PagedRequestOptions.fromProto(proto.pagingOptions);
@@ -1392,7 +1402,7 @@ class SendMessageRequest {
1392
1402
  m.recipient = Participant.fromProto(proto.recipient);
1393
1403
  }
1394
1404
  if (proto.type) {
1395
- m.type = enumStringToValue$3(MessageType, proto.type);
1405
+ m.type = enumStringToValue(MessageType, proto.type);
1396
1406
  }
1397
1407
  if (proto.metadata) {
1398
1408
  m.metadata = proto.metadata.map(Metadata.fromProto);
@@ -1442,6 +1452,49 @@ class SendMessageResponse {
1442
1452
  return toReturn;
1443
1453
  }
1444
1454
  }
1455
+ class SetLastSeenRequest {
1456
+ constructor(kwargs) {
1457
+ if (!kwargs) {
1458
+ return;
1459
+ }
1460
+ Object.assign(this, kwargs);
1461
+ }
1462
+ static fromProto(proto) {
1463
+ let m = new SetLastSeenRequest();
1464
+ m = Object.assign(m, proto);
1465
+ return m;
1466
+ }
1467
+ toApiJson() {
1468
+ const toReturn = {};
1469
+ if (typeof this.conversationId !== 'undefined') {
1470
+ toReturn['conversationId'] = this.conversationId;
1471
+ }
1472
+ return toReturn;
1473
+ }
1474
+ }
1475
+ class SetLastSeenResponse {
1476
+ constructor(kwargs) {
1477
+ if (!kwargs) {
1478
+ return;
1479
+ }
1480
+ Object.assign(this, kwargs);
1481
+ }
1482
+ static fromProto(proto) {
1483
+ let m = new SetLastSeenResponse();
1484
+ m = Object.assign(m, proto);
1485
+ if (proto.lastSeen) {
1486
+ m.lastSeen = new Date(proto.lastSeen);
1487
+ }
1488
+ return m;
1489
+ }
1490
+ toApiJson() {
1491
+ const toReturn = {};
1492
+ if (typeof this.lastSeen !== 'undefined' && this.lastSeen !== null) {
1493
+ toReturn['lastSeen'] = 'toApiJson' in this.lastSeen ? this.lastSeen.toApiJson() : this.lastSeen;
1494
+ }
1495
+ return toReturn;
1496
+ }
1497
+ }
1445
1498
  class UpdateMessageStatusRequest {
1446
1499
  constructor(kwargs) {
1447
1500
  if (!kwargs) {
@@ -1453,7 +1506,7 @@ class UpdateMessageStatusRequest {
1453
1506
  let m = new UpdateMessageStatusRequest();
1454
1507
  m = Object.assign(m, proto);
1455
1508
  if (proto.status) {
1456
- m.status = enumStringToValue$3(MessageStatus, proto.status);
1509
+ m.status = enumStringToValue(MessageStatus, proto.status);
1457
1510
  }
1458
1511
  return m;
1459
1512
  }
@@ -1474,72 +1527,35 @@ class UpdateMessageStatusRequest {
1474
1527
 
1475
1528
  // *********************************
1476
1529
 
1530
+ const environment = (window ? window['environment'] : 'prod') ?? 'prod';
1531
+ const hostMap = {
1532
+ 'local': 'conversation-api.vendasta-local.com',
1533
+ 'test': '',
1534
+ 'demo': 'conversation-demo.apigateway.co',
1535
+ 'prod': 'conversation-prod.apigateway.co',
1536
+ 'production': 'conversation-prod.apigateway.co',
1537
+ };
1477
1538
  class HostService {
1478
- constructor(environmentService) {
1479
- this.environmentService = environmentService;
1480
- }
1481
- host() {
1482
- if (this._host) {
1483
- return this._host;
1484
- }
1485
- switch (this.environmentService.getEnvironment()) {
1486
- case Environment.LOCAL:
1487
- this._host = 'conversation-api.vendasta-local.com';
1488
- break;
1489
- case Environment.TEST:
1490
- this._host = '';
1491
- break;
1492
- case Environment.DEMO:
1493
- this._host = 'conversation-demo.apigateway.co';
1494
- break;
1495
- case Environment.PROD:
1496
- this._host = 'conversation-prod.apigateway.co';
1497
- break;
1498
- }
1499
- return this._host;
1500
- }
1501
- httpsHost() {
1502
- if (this._httpsHost) {
1503
- return this._httpsHost;
1504
- }
1505
- switch (this.environmentService.getEnvironment()) {
1506
- case Environment.LOCAL:
1507
- this._httpsHost = 'conversation.vendasta-local.com';
1508
- break;
1509
- case Environment.TEST:
1510
- this._httpsHost = '';
1511
- break;
1512
- case Environment.DEMO:
1513
- this._httpsHost = 'conversation-demo.apigateway.co';
1514
- break;
1515
- case Environment.PROD:
1516
- this._httpsHost = 'conversation-prod.apigateway.co';
1517
- break;
1518
- }
1519
- return this._httpsHost;
1520
- }
1521
- hostWithScheme() {
1522
- const scheme = this.environmentService.getEnvironment() === Environment.LOCAL ? 'http://' : 'https://';
1523
- return scheme + this.host();
1524
- }
1525
- httpsHostWithScheme() {
1526
- const scheme = this.environmentService.getEnvironment() === Environment.LOCAL ? 'http://' : 'https://';
1527
- return scheme + this.httpsHost();
1539
+ get host() {
1540
+ return hostMap[environment.toLowerCase()];
1541
+ }
1542
+ get hostWithScheme() {
1543
+ return 'https://' + this.host;
1528
1544
  }
1529
1545
  }
1530
- HostService.ɵprov = ɵɵdefineInjectable({ factory: function HostService_Factory() { return new HostService(ɵɵinject(EnvironmentService)); }, token: HostService, providedIn: "root" });
1531
- HostService.decorators = [
1532
- { type: Injectable, args: [{ providedIn: 'root' },] }
1533
- ];
1534
- HostService.ctorParameters = () => [
1535
- { type: EnvironmentService }
1536
- ];
1546
+ HostService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: HostService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1547
+ HostService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: HostService, providedIn: 'root' });
1548
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: HostService, decorators: [{
1549
+ type: Injectable,
1550
+ args: [{ providedIn: 'root' }]
1551
+ }] });
1537
1552
 
1538
1553
  // *********************************
1539
1554
  class ConversationApiService {
1540
1555
  constructor(http, hostService) {
1541
1556
  this.http = http;
1542
1557
  this.hostService = hostService;
1558
+ this._host = this.hostService.hostWithScheme;
1543
1559
  }
1544
1560
  apiOptions() {
1545
1561
  return {
@@ -1551,88 +1567,91 @@ class ConversationApiService {
1551
1567
  }
1552
1568
  sendMessage(r) {
1553
1569
  const request = (r.toApiJson) ? r : new SendMessageRequest(r);
1554
- return this.http.post(this.hostService.hostWithScheme() + "/conversation.v1.ConversationService/SendMessage", request.toApiJson(), this.apiOptions())
1555
- .pipe(map(resp => SendMessageResponse.fromProto(resp)), share());
1570
+ return this.http.post(this._host + "/conversation.v1.ConversationService/SendMessage", request.toApiJson(), this.apiOptions())
1571
+ .pipe(map(resp => SendMessageResponse.fromProto(resp)));
1556
1572
  }
1557
1573
  getMessage(r) {
1558
1574
  const request = (r.toApiJson) ? r : new GetMessageRequest(r);
1559
- return this.http.post(this.hostService.hostWithScheme() + "/conversation.v1.ConversationService/GetMessage", request.toApiJson(), this.apiOptions())
1560
- .pipe(map(resp => Message.fromProto(resp)), share());
1575
+ return this.http.post(this._host + "/conversation.v1.ConversationService/GetMessage", request.toApiJson(), this.apiOptions())
1576
+ .pipe(map(resp => Message.fromProto(resp)));
1561
1577
  }
1562
1578
  listMessages(r) {
1563
1579
  const request = (r.toApiJson) ? r : new ListMessagesRequest(r);
1564
- return this.http.post(this.hostService.hostWithScheme() + "/conversation.v1.ConversationService/ListMessages", request.toApiJson(), this.apiOptions())
1565
- .pipe(map(resp => ListMessagesResponse.fromProto(resp)), share());
1580
+ return this.http.post(this._host + "/conversation.v1.ConversationService/ListMessages", request.toApiJson(), this.apiOptions())
1581
+ .pipe(map(resp => ListMessagesResponse.fromProto(resp)));
1566
1582
  }
1567
1583
  deleteMessage(r) {
1568
1584
  const request = (r.toApiJson) ? r : new DeleteMessageRequest(r);
1569
- return this.http.post(this.hostService.hostWithScheme() + "/conversation.v1.ConversationService/DeleteMessage", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
1585
+ return this.http.post(this._host + "/conversation.v1.ConversationService/DeleteMessage", request.toApiJson(), { ...this.apiOptions(), observe: 'response' });
1570
1586
  }
1571
1587
  updateMessageStatus(r) {
1572
1588
  const request = (r.toApiJson) ? r : new UpdateMessageStatusRequest(r);
1573
- return this.http.post(this.hostService.hostWithScheme() + "/conversation.v1.ConversationService/UpdateMessageStatus", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
1589
+ return this.http.post(this._host + "/conversation.v1.ConversationService/UpdateMessageStatus", request.toApiJson(), { ...this.apiOptions(), observe: 'response' });
1574
1590
  }
1575
1591
  lookupConversations(r) {
1576
1592
  const request = (r.toApiJson) ? r : new LookupConversationsRequest(r);
1577
- return this.http.post(this.hostService.hostWithScheme() + "/conversation.v1.ConversationService/LookupConversations", request.toApiJson(), this.apiOptions())
1578
- .pipe(map(resp => LookupConversationsResponse.fromProto(resp)), share());
1593
+ return this.http.post(this._host + "/conversation.v1.ConversationService/LookupConversations", request.toApiJson(), this.apiOptions())
1594
+ .pipe(map(resp => LookupConversationsResponse.fromProto(resp)));
1579
1595
  }
1580
1596
  createConversation(r) {
1581
1597
  const request = (r.toApiJson) ? r : new CreateConversationRequest(r);
1582
- return this.http.post(this.hostService.hostWithScheme() + "/conversation.v1.ConversationService/CreateConversation", request.toApiJson(), this.apiOptions())
1583
- .pipe(map(resp => CreateConversationResponse.fromProto(resp)), share());
1598
+ return this.http.post(this._host + "/conversation.v1.ConversationService/CreateConversation", request.toApiJson(), this.apiOptions())
1599
+ .pipe(map(resp => CreateConversationResponse.fromProto(resp)));
1584
1600
  }
1585
1601
  deleteConversation(r) {
1586
1602
  const request = (r.toApiJson) ? r : new DeleteConversationRequest(r);
1587
- return this.http.post(this.hostService.hostWithScheme() + "/conversation.v1.ConversationService/DeleteConversation", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
1603
+ return this.http.post(this._host + "/conversation.v1.ConversationService/DeleteConversation", request.toApiJson(), { ...this.apiOptions(), observe: 'response' });
1588
1604
  }
1589
1605
  receiveMessage(r) {
1590
1606
  const request = (r.toApiJson) ? r : new ReceiveMessageRequest(r);
1591
- return this.http.post(this.hostService.hostWithScheme() + "/conversation.v1.ConversationService/ReceiveMessage", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
1607
+ return this.http.post(this._host + "/conversation.v1.ConversationService/ReceiveMessage", request.toApiJson(), { ...this.apiOptions(), observe: 'response' });
1592
1608
  }
1593
1609
  getMultiMessages(r) {
1594
1610
  const request = (r.toApiJson) ? r : new GetMultiMessagesRequest(r);
1595
- return this.http.post(this.hostService.hostWithScheme() + "/conversation.v1.ConversationService/GetMultiMessages", request.toApiJson(), this.apiOptions())
1596
- .pipe(map(resp => GetMultiMessagesResponse.fromProto(resp)), share());
1611
+ return this.http.post(this._host + "/conversation.v1.ConversationService/GetMultiMessages", request.toApiJson(), this.apiOptions())
1612
+ .pipe(map(resp => GetMultiMessagesResponse.fromProto(resp)));
1597
1613
  }
1598
1614
  createMultiMessages(r) {
1599
1615
  const request = (r.toApiJson) ? r : new CreateMultiMessagesRequest(r);
1600
- return this.http.post(this.hostService.hostWithScheme() + "/conversation.v1.ConversationService/CreateMultiMessages", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
1616
+ return this.http.post(this._host + "/conversation.v1.ConversationService/CreateMultiMessages", request.toApiJson(), { ...this.apiOptions(), observe: 'response' });
1601
1617
  }
1602
1618
  getMultiConversationDetails(r) {
1603
1619
  const request = (r.toApiJson) ? r : new GetMultiConversationDetailsRequest(r);
1604
- return this.http.post(this.hostService.hostWithScheme() + "/conversation.v1.ConversationService/GetMultiConversationDetails", request.toApiJson(), this.apiOptions())
1605
- .pipe(map(resp => GetMultiConversationDetailsResponse.fromProto(resp)), share());
1620
+ return this.http.post(this._host + "/conversation.v1.ConversationService/GetMultiConversationDetails", request.toApiJson(), this.apiOptions())
1621
+ .pipe(map(resp => GetMultiConversationDetailsResponse.fromProto(resp)));
1606
1622
  }
1607
1623
  getMultiParticipants(r) {
1608
1624
  const request = (r.toApiJson) ? r : new GetMultiParticipantsRequest(r);
1609
- return this.http.post(this.hostService.hostWithScheme() + "/conversation.v1.ConversationService/GetMultiParticipants", request.toApiJson(), this.apiOptions())
1610
- .pipe(map(resp => GetMultiParticipantsResponse.fromProto(resp)), share());
1625
+ return this.http.post(this._host + "/conversation.v1.ConversationService/GetMultiParticipants", request.toApiJson(), this.apiOptions())
1626
+ .pipe(map(resp => GetMultiParticipantsResponse.fromProto(resp)));
1611
1627
  }
1612
1628
  searchConversations(r) {
1613
1629
  const request = (r.toApiJson) ? r : new SearchConversationsRequest(r);
1614
- return this.http.post(this.hostService.hostWithScheme() + "/conversation.v1.ConversationService/SearchConversations", request.toApiJson(), this.apiOptions())
1615
- .pipe(map(resp => SearchConversationsResponse.fromProto(resp)), share());
1630
+ return this.http.post(this._host + "/conversation.v1.ConversationService/SearchConversations", request.toApiJson(), this.apiOptions())
1631
+ .pipe(map(resp => SearchConversationsResponse.fromProto(resp)));
1616
1632
  }
1617
1633
  getMultiConversationMessageCount(r) {
1618
1634
  const request = (r.toApiJson) ? r : new GetMultiConversationMessageCountRequest(r);
1619
- return this.http.post(this.hostService.hostWithScheme() + "/conversation.v1.ConversationService/GetMultiConversationMessageCount", request.toApiJson(), this.apiOptions())
1620
- .pipe(map(resp => GetMultiConversationMessageCountResponse.fromProto(resp)), share());
1635
+ return this.http.post(this._host + "/conversation.v1.ConversationService/GetMultiConversationMessageCount", request.toApiJson(), this.apiOptions())
1636
+ .pipe(map(resp => GetMultiConversationMessageCountResponse.fromProto(resp)));
1621
1637
  }
1622
1638
  addMultiParticipants(r) {
1623
1639
  const request = (r.toApiJson) ? r : new AddMultiParticipantsRequest(r);
1624
- return this.http.post(this.hostService.hostWithScheme() + "/conversation.v1.ConversationService/AddMultiParticipants", request.toApiJson(), this.apiOptions())
1625
- .pipe(map(resp => AddMultiParticipantsResponse.fromProto(resp)), share());
1640
+ return this.http.post(this._host + "/conversation.v1.ConversationService/AddMultiParticipants", request.toApiJson(), this.apiOptions())
1641
+ .pipe(map(resp => AddMultiParticipantsResponse.fromProto(resp)));
1642
+ }
1643
+ setLastSeen(r) {
1644
+ const request = (r.toApiJson) ? r : new SetLastSeenRequest(r);
1645
+ return this.http.post(this._host + "/conversation.v1.ConversationService/SetLastSeen", request.toApiJson(), this.apiOptions())
1646
+ .pipe(map(resp => SetLastSeenResponse.fromProto(resp)));
1626
1647
  }
1627
1648
  }
1628
- ConversationApiService.ɵprov = ɵɵdefineInjectable({ factory: function ConversationApiService_Factory() { return new ConversationApiService(ɵɵinject(HttpClient), ɵɵinject(HostService)); }, token: ConversationApiService, providedIn: "root" });
1629
- ConversationApiService.decorators = [
1630
- { type: Injectable, args: [{ providedIn: 'root' },] }
1631
- ];
1632
- ConversationApiService.ctorParameters = () => [
1633
- { type: HttpClient },
1634
- { type: HostService }
1635
- ];
1649
+ 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 });
1650
+ ConversationApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: ConversationApiService, providedIn: 'root' });
1651
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: ConversationApiService, decorators: [{
1652
+ type: Injectable,
1653
+ args: [{ providedIn: 'root' }]
1654
+ }], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: HostService }]; } });
1636
1655
 
1637
1656
  // *********************************
1638
1657
 
@@ -1640,5 +1659,5 @@ ConversationApiService.ctorParameters = () => [
1640
1659
  * Generated bundle index. Do not edit.
1641
1660
  */
1642
1661
 
1643
- 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, UpdateMessageStatusRequest, HostService as ɵa };
1644
- //# sourceMappingURL=vendasta-conversation.js.map
1662
+ 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 };
1663
+ //# sourceMappingURL=vendasta-conversation.mjs.map