@vendasta/conversation 0.11.0 → 0.14.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 +111 -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 +1092 -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 +1610 -0
  23. package/fesm2015/vendasta-conversation.mjs.map +1 -0
  24. package/{fesm2015/vendasta-conversation.js → fesm2020/vendasta-conversation.mjs} +183 -123
  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 +7 -0
  29. package/lib/_internal/interfaces/index.d.ts +2 -2
  30. package/lib/_internal/interfaces/participant.interface.d.ts +10 -0
  31. package/lib/_internal/objects/api.d.ts +19 -6
  32. package/lib/_internal/objects/index.d.ts +2 -2
  33. package/lib/_internal/objects/participant.d.ts +13 -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 -1611
  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 -107
  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 -1043
  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 -85
  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,12 +260,47 @@ 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
  }
266
267
  return enumRef[value];
267
268
  }
269
+ class Address {
270
+ constructor(kwargs) {
271
+ if (!kwargs) {
272
+ return;
273
+ }
274
+ Object.assign(this, kwargs);
275
+ }
276
+ static fromProto(proto) {
277
+ let m = new Address();
278
+ m = Object.assign(m, proto);
279
+ return m;
280
+ }
281
+ toApiJson() {
282
+ const toReturn = {};
283
+ if (typeof this.firstLineAddress !== 'undefined') {
284
+ toReturn['firstLineAddress'] = this.firstLineAddress;
285
+ }
286
+ if (typeof this.secondLineAddress !== 'undefined') {
287
+ toReturn['secondLineAddress'] = this.secondLineAddress;
288
+ }
289
+ if (typeof this.city !== 'undefined') {
290
+ toReturn['city'] = this.city;
291
+ }
292
+ if (typeof this.state !== 'undefined') {
293
+ toReturn['state'] = this.state;
294
+ }
295
+ if (typeof this.country !== 'undefined') {
296
+ toReturn['country'] = this.country;
297
+ }
298
+ if (typeof this.zipCode !== 'undefined') {
299
+ toReturn['zipCode'] = this.zipCode;
300
+ }
301
+ return toReturn;
302
+ }
303
+ }
268
304
  class Participant {
269
305
  constructor(kwargs) {
270
306
  if (!kwargs) {
@@ -276,10 +312,10 @@ class Participant {
276
312
  let m = new Participant();
277
313
  m = Object.assign(m, proto);
278
314
  if (proto.location) {
279
- m.location = enumStringToValue$2(PlatformLocation, proto.location);
315
+ m.location = enumStringToValue$1(PlatformLocation, proto.location);
280
316
  }
281
317
  if (proto.channel) {
282
- m.channel = enumStringToValue$2(ConversationChannel, proto.channel);
318
+ m.channel = enumStringToValue$1(ConversationChannel, proto.channel);
283
319
  }
284
320
  if (proto.created) {
285
321
  m.created = new Date(proto.created);
@@ -291,7 +327,10 @@ class Participant {
291
327
  m.deleted = new Date(proto.deleted);
292
328
  }
293
329
  if (proto.participantType) {
294
- m.participantType = enumStringToValue$2(ParticipantType, proto.participantType);
330
+ m.participantType = enumStringToValue$1(ParticipantType, proto.participantType);
331
+ }
332
+ if (proto.address) {
333
+ m.address = Address.fromProto(proto.address);
295
334
  }
296
335
  return m;
297
336
  }
@@ -339,16 +378,71 @@ class Participant {
339
378
  if (typeof this.phoneNumber !== 'undefined') {
340
379
  toReturn['phoneNumber'] = this.phoneNumber;
341
380
  }
381
+ if (typeof this.address !== 'undefined' && this.address !== null) {
382
+ toReturn['address'] = 'toApiJson' in this.address ? this.address.toApiJson() : this.address;
383
+ }
384
+ if (typeof this.isSubjectParticipant !== 'undefined') {
385
+ toReturn['isSubjectParticipant'] = this.isSubjectParticipant;
386
+ }
342
387
  return toReturn;
343
388
  }
344
389
  }
345
390
 
346
- function enumStringToValue$3(enumRef, value) {
391
+ function enumStringToValue(enumRef, value) {
347
392
  if (typeof value === 'number') {
348
393
  return value;
349
394
  }
350
395
  return enumRef[value];
351
396
  }
397
+ class AddMultiParticipantsRequest {
398
+ constructor(kwargs) {
399
+ if (!kwargs) {
400
+ return;
401
+ }
402
+ Object.assign(this, kwargs);
403
+ }
404
+ static fromProto(proto) {
405
+ let m = new AddMultiParticipantsRequest();
406
+ m = Object.assign(m, proto);
407
+ if (proto.participants) {
408
+ m.participants = proto.participants.map(Participant.fromProto);
409
+ }
410
+ return m;
411
+ }
412
+ toApiJson() {
413
+ const toReturn = {};
414
+ if (typeof this.conversationId !== 'undefined') {
415
+ toReturn['conversationId'] = this.conversationId;
416
+ }
417
+ if (typeof this.participants !== 'undefined' && this.participants !== null) {
418
+ toReturn['participants'] = 'toApiJson' in this.participants ? this.participants.toApiJson() : this.participants;
419
+ }
420
+ return toReturn;
421
+ }
422
+ }
423
+ class AddMultiParticipantsResponse {
424
+ constructor(kwargs) {
425
+ if (!kwargs) {
426
+ return;
427
+ }
428
+ Object.assign(this, kwargs);
429
+ }
430
+ static fromProto(proto) {
431
+ let m = new AddMultiParticipantsResponse();
432
+ m = Object.assign(m, proto);
433
+ if (proto.participants) {
434
+ m.participants = proto.participants.map(Participant.fromProto);
435
+ }
436
+ return m;
437
+ }
438
+ toApiJson() {
439
+ const toReturn = {};
440
+ if (typeof this.participants !== 'undefined' && this.participants !== null) {
441
+ toReturn['participants'] = 'toApiJson' in this.participants ? this.participants.toApiJson() : this.participants;
442
+ }
443
+ return toReturn;
444
+ }
445
+ }
352
446
  class ConversationMessageCount {
353
447
  constructor(kwargs) {
354
448
  if (!kwargs) {
@@ -444,7 +538,7 @@ class CreateConversationRequest {
444
538
  m.participants = proto.participants.map(Participant.fromProto);
445
539
  }
446
540
  if (proto.channel) {
447
- m.channel = enumStringToValue$3(ConversationChannel, proto.channel);
541
+ m.channel = enumStringToValue(ConversationChannel, proto.channel);
448
542
  }
449
543
  if (proto.created) {
450
544
  m.created = new Date(proto.created);
@@ -453,7 +547,7 @@ class CreateConversationRequest {
453
547
  m.updated = new Date(proto.updated);
454
548
  }
455
549
  if (proto.originLocation) {
456
- m.originLocation = enumStringToValue$3(PlatformLocation, proto.originLocation);
550
+ m.originLocation = enumStringToValue(PlatformLocation, proto.originLocation);
457
551
  }
458
552
  return m;
459
553
  }
@@ -604,7 +698,7 @@ class DeleteMessageRequest {
604
698
  return toReturn;
605
699
  }
606
700
  }
607
- class SearchConversationsResponseDetailedConversation {
701
+ class GetMultiConversationDetailsResponseDetailedConversation {
608
702
  constructor(kwargs) {
609
703
  if (!kwargs) {
610
704
  return;
@@ -612,7 +706,7 @@ class SearchConversationsResponseDetailedConversation {
612
706
  Object.assign(this, kwargs);
613
707
  }
614
708
  static fromProto(proto) {
615
- let m = new SearchConversationsResponseDetailedConversation();
709
+ let m = new GetMultiConversationDetailsResponseDetailedConversation();
616
710
  m = Object.assign(m, proto);
617
711
  if (proto.conversation) {
618
712
  m.conversation = Conversation.fromProto(proto.conversation);
@@ -639,7 +733,7 @@ class SearchConversationsResponseDetailedConversation {
639
733
  return toReturn;
640
734
  }
641
735
  }
642
- class GetMultiConversationDetailsResponseDetailedConversation {
736
+ class SearchConversationsResponseDetailedConversation {
643
737
  constructor(kwargs) {
644
738
  if (!kwargs) {
645
739
  return;
@@ -647,7 +741,7 @@ class GetMultiConversationDetailsResponseDetailedConversation {
647
741
  Object.assign(this, kwargs);
648
742
  }
649
743
  static fromProto(proto) {
650
- let m = new GetMultiConversationDetailsResponseDetailedConversation();
744
+ let m = new SearchConversationsResponseDetailedConversation();
651
745
  m = Object.assign(m, proto);
652
746
  if (proto.conversation) {
653
747
  m.conversation = Conversation.fromProto(proto.conversation);
@@ -961,13 +1055,13 @@ class LookupConversationsRequestLookupConversationsFilters {
961
1055
  let m = new LookupConversationsRequestLookupConversationsFilters();
962
1056
  m = Object.assign(m, proto);
963
1057
  if (proto.location) {
964
- m.location = enumStringToValue$3(PlatformLocation, proto.location);
1058
+ m.location = enumStringToValue(PlatformLocation, proto.location);
965
1059
  }
966
1060
  if (proto.channel) {
967
- m.channel = enumStringToValue$3(ConversationChannel, proto.channel);
1061
+ m.channel = enumStringToValue(ConversationChannel, proto.channel);
968
1062
  }
969
1063
  if (proto.originLocation) {
970
- m.originLocation = enumStringToValue$3(PlatformLocation, proto.originLocation);
1064
+ m.originLocation = enumStringToValue(PlatformLocation, proto.originLocation);
971
1065
  }
972
1066
  return m;
973
1067
  }
@@ -1066,7 +1160,7 @@ class Metadata {
1066
1160
  let m = new Metadata();
1067
1161
  m = Object.assign(m, proto);
1068
1162
  if (proto.identifier) {
1069
- m.identifier = enumStringToValue$3(MetadataIdentifier, proto.identifier);
1163
+ m.identifier = enumStringToValue(MetadataIdentifier, proto.identifier);
1070
1164
  }
1071
1165
  if (proto.data) {
1072
1166
  m.data = Object.keys(proto.data).reduce((obj, k) => { obj[k] = proto.data[k]; return obj; }, {});
@@ -1164,13 +1258,13 @@ class ReceiveMessageRequest {
1164
1258
  let m = new ReceiveMessageRequest();
1165
1259
  m = Object.assign(m, proto);
1166
1260
  if (proto.channel) {
1167
- m.channel = enumStringToValue$3(ConversationChannel, proto.channel);
1261
+ m.channel = enumStringToValue(ConversationChannel, proto.channel);
1168
1262
  }
1169
1263
  if (proto.type) {
1170
- m.type = enumStringToValue$3(MessageType, proto.type);
1264
+ m.type = enumStringToValue(MessageType, proto.type);
1171
1265
  }
1172
1266
  if (proto.location) {
1173
- m.location = enumStringToValue$3(PlatformLocation, proto.location);
1267
+ m.location = enumStringToValue(PlatformLocation, proto.location);
1174
1268
  }
1175
1269
  if (proto.metadata) {
1176
1270
  m.metadata = Object.keys(proto.metadata).reduce((obj, k) => { obj[k] = proto.metadata[k]; return obj; }, {});
@@ -1229,7 +1323,7 @@ class SearchConversationsRequest {
1229
1323
  let m = new SearchConversationsRequest();
1230
1324
  m = Object.assign(m, proto);
1231
1325
  if (proto.location) {
1232
- m.location = enumStringToValue$3(PlatformLocation, proto.location);
1326
+ m.location = enumStringToValue(PlatformLocation, proto.location);
1233
1327
  }
1234
1328
  if (proto.pagingOptions) {
1235
1329
  m.pagingOptions = PagedRequestOptions.fromProto(proto.pagingOptions);
@@ -1302,7 +1396,7 @@ class SendMessageRequest {
1302
1396
  m.recipient = Participant.fromProto(proto.recipient);
1303
1397
  }
1304
1398
  if (proto.type) {
1305
- m.type = enumStringToValue$3(MessageType, proto.type);
1399
+ m.type = enumStringToValue(MessageType, proto.type);
1306
1400
  }
1307
1401
  if (proto.metadata) {
1308
1402
  m.metadata = proto.metadata.map(Metadata.fromProto);
@@ -1363,7 +1457,7 @@ class UpdateMessageStatusRequest {
1363
1457
  let m = new UpdateMessageStatusRequest();
1364
1458
  m = Object.assign(m, proto);
1365
1459
  if (proto.status) {
1366
- m.status = enumStringToValue$3(MessageStatus, proto.status);
1460
+ m.status = enumStringToValue(MessageStatus, proto.status);
1367
1461
  }
1368
1462
  return m;
1369
1463
  }
@@ -1384,72 +1478,35 @@ class UpdateMessageStatusRequest {
1384
1478
 
1385
1479
  // *********************************
1386
1480
 
1481
+ const environment = (window ? window['environment'] : 'prod') ?? 'prod';
1482
+ const hostMap = {
1483
+ 'local': 'conversation-api.vendasta-local.com',
1484
+ 'test': '',
1485
+ 'demo': 'conversation-demo.apigateway.co',
1486
+ 'prod': 'conversation-prod.apigateway.co',
1487
+ 'production': 'conversation-prod.apigateway.co',
1488
+ };
1387
1489
  class HostService {
1388
- constructor(environmentService) {
1389
- this.environmentService = environmentService;
1390
- }
1391
- host() {
1392
- if (this._host) {
1393
- return this._host;
1394
- }
1395
- switch (this.environmentService.getEnvironment()) {
1396
- case Environment.LOCAL:
1397
- this._host = 'conversation-api.vendasta-local.com';
1398
- break;
1399
- case Environment.TEST:
1400
- this._host = '';
1401
- break;
1402
- case Environment.DEMO:
1403
- this._host = 'conversation-demo.apigateway.co';
1404
- break;
1405
- case Environment.PROD:
1406
- this._host = 'conversation-prod.apigateway.co';
1407
- break;
1408
- }
1409
- return this._host;
1410
- }
1411
- httpsHost() {
1412
- if (this._httpsHost) {
1413
- return this._httpsHost;
1414
- }
1415
- switch (this.environmentService.getEnvironment()) {
1416
- case Environment.LOCAL:
1417
- this._httpsHost = 'conversation.vendasta-local.com';
1418
- break;
1419
- case Environment.TEST:
1420
- this._httpsHost = '';
1421
- break;
1422
- case Environment.DEMO:
1423
- this._httpsHost = 'conversation-demo.apigateway.co';
1424
- break;
1425
- case Environment.PROD:
1426
- this._httpsHost = 'conversation-prod.apigateway.co';
1427
- break;
1428
- }
1429
- return this._httpsHost;
1430
- }
1431
- hostWithScheme() {
1432
- const scheme = this.environmentService.getEnvironment() === Environment.LOCAL ? 'http://' : 'https://';
1433
- return scheme + this.host();
1434
- }
1435
- httpsHostWithScheme() {
1436
- const scheme = this.environmentService.getEnvironment() === Environment.LOCAL ? 'http://' : 'https://';
1437
- return scheme + this.httpsHost();
1490
+ get host() {
1491
+ return hostMap[environment.toLowerCase()];
1492
+ }
1493
+ get hostWithScheme() {
1494
+ return 'https://' + this.host;
1438
1495
  }
1439
1496
  }
1440
- HostService.ɵprov = ɵɵdefineInjectable({ factory: function HostService_Factory() { return new HostService(ɵɵinject(EnvironmentService)); }, token: HostService, providedIn: "root" });
1441
- HostService.decorators = [
1442
- { type: Injectable, args: [{ providedIn: 'root' },] }
1443
- ];
1444
- HostService.ctorParameters = () => [
1445
- { type: EnvironmentService }
1446
- ];
1497
+ HostService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: HostService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1498
+ HostService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: HostService, providedIn: 'root' });
1499
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: HostService, decorators: [{
1500
+ type: Injectable,
1501
+ args: [{ providedIn: 'root' }]
1502
+ }] });
1447
1503
 
1448
1504
  // *********************************
1449
1505
  class ConversationApiService {
1450
1506
  constructor(http, hostService) {
1451
1507
  this.http = http;
1452
1508
  this.hostService = hostService;
1509
+ this._host = this.hostService.hostWithScheme;
1453
1510
  }
1454
1511
  apiOptions() {
1455
1512
  return {
@@ -1461,83 +1518,86 @@ class ConversationApiService {
1461
1518
  }
1462
1519
  sendMessage(r) {
1463
1520
  const request = (r.toApiJson) ? r : new SendMessageRequest(r);
1464
- return this.http.post(this.hostService.hostWithScheme() + "/conversation.v1.ConversationService/SendMessage", request.toApiJson(), this.apiOptions())
1465
- .pipe(map(resp => SendMessageResponse.fromProto(resp)), share());
1521
+ return this.http.post(this._host + "/conversation.v1.ConversationService/SendMessage", request.toApiJson(), this.apiOptions())
1522
+ .pipe(map(resp => SendMessageResponse.fromProto(resp)));
1466
1523
  }
1467
1524
  getMessage(r) {
1468
1525
  const request = (r.toApiJson) ? r : new GetMessageRequest(r);
1469
- return this.http.post(this.hostService.hostWithScheme() + "/conversation.v1.ConversationService/GetMessage", request.toApiJson(), this.apiOptions())
1470
- .pipe(map(resp => Message.fromProto(resp)), share());
1526
+ return this.http.post(this._host + "/conversation.v1.ConversationService/GetMessage", request.toApiJson(), this.apiOptions())
1527
+ .pipe(map(resp => Message.fromProto(resp)));
1471
1528
  }
1472
1529
  listMessages(r) {
1473
1530
  const request = (r.toApiJson) ? r : new ListMessagesRequest(r);
1474
- return this.http.post(this.hostService.hostWithScheme() + "/conversation.v1.ConversationService/ListMessages", request.toApiJson(), this.apiOptions())
1475
- .pipe(map(resp => ListMessagesResponse.fromProto(resp)), share());
1531
+ return this.http.post(this._host + "/conversation.v1.ConversationService/ListMessages", request.toApiJson(), this.apiOptions())
1532
+ .pipe(map(resp => ListMessagesResponse.fromProto(resp)));
1476
1533
  }
1477
1534
  deleteMessage(r) {
1478
1535
  const request = (r.toApiJson) ? r : new DeleteMessageRequest(r);
1479
- return this.http.post(this.hostService.hostWithScheme() + "/conversation.v1.ConversationService/DeleteMessage", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
1536
+ return this.http.post(this._host + "/conversation.v1.ConversationService/DeleteMessage", request.toApiJson(), { ...this.apiOptions(), observe: 'response' });
1480
1537
  }
1481
1538
  updateMessageStatus(r) {
1482
1539
  const request = (r.toApiJson) ? r : new UpdateMessageStatusRequest(r);
1483
- return this.http.post(this.hostService.hostWithScheme() + "/conversation.v1.ConversationService/UpdateMessageStatus", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
1540
+ return this.http.post(this._host + "/conversation.v1.ConversationService/UpdateMessageStatus", request.toApiJson(), { ...this.apiOptions(), observe: 'response' });
1484
1541
  }
1485
1542
  lookupConversations(r) {
1486
1543
  const request = (r.toApiJson) ? r : new LookupConversationsRequest(r);
1487
- return this.http.post(this.hostService.hostWithScheme() + "/conversation.v1.ConversationService/LookupConversations", request.toApiJson(), this.apiOptions())
1488
- .pipe(map(resp => LookupConversationsResponse.fromProto(resp)), share());
1544
+ return this.http.post(this._host + "/conversation.v1.ConversationService/LookupConversations", request.toApiJson(), this.apiOptions())
1545
+ .pipe(map(resp => LookupConversationsResponse.fromProto(resp)));
1489
1546
  }
1490
1547
  createConversation(r) {
1491
1548
  const request = (r.toApiJson) ? r : new CreateConversationRequest(r);
1492
- return this.http.post(this.hostService.hostWithScheme() + "/conversation.v1.ConversationService/CreateConversation", request.toApiJson(), this.apiOptions())
1493
- .pipe(map(resp => CreateConversationResponse.fromProto(resp)), share());
1549
+ return this.http.post(this._host + "/conversation.v1.ConversationService/CreateConversation", request.toApiJson(), this.apiOptions())
1550
+ .pipe(map(resp => CreateConversationResponse.fromProto(resp)));
1494
1551
  }
1495
1552
  deleteConversation(r) {
1496
1553
  const request = (r.toApiJson) ? r : new DeleteConversationRequest(r);
1497
- return this.http.post(this.hostService.hostWithScheme() + "/conversation.v1.ConversationService/DeleteConversation", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
1554
+ return this.http.post(this._host + "/conversation.v1.ConversationService/DeleteConversation", request.toApiJson(), { ...this.apiOptions(), observe: 'response' });
1498
1555
  }
1499
1556
  receiveMessage(r) {
1500
1557
  const request = (r.toApiJson) ? r : new ReceiveMessageRequest(r);
1501
- return this.http.post(this.hostService.hostWithScheme() + "/conversation.v1.ConversationService/ReceiveMessage", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
1558
+ return this.http.post(this._host + "/conversation.v1.ConversationService/ReceiveMessage", request.toApiJson(), { ...this.apiOptions(), observe: 'response' });
1502
1559
  }
1503
1560
  getMultiMessages(r) {
1504
1561
  const request = (r.toApiJson) ? r : new GetMultiMessagesRequest(r);
1505
- return this.http.post(this.hostService.hostWithScheme() + "/conversation.v1.ConversationService/GetMultiMessages", request.toApiJson(), this.apiOptions())
1506
- .pipe(map(resp => GetMultiMessagesResponse.fromProto(resp)), share());
1562
+ return this.http.post(this._host + "/conversation.v1.ConversationService/GetMultiMessages", request.toApiJson(), this.apiOptions())
1563
+ .pipe(map(resp => GetMultiMessagesResponse.fromProto(resp)));
1507
1564
  }
1508
1565
  createMultiMessages(r) {
1509
1566
  const request = (r.toApiJson) ? r : new CreateMultiMessagesRequest(r);
1510
- return this.http.post(this.hostService.hostWithScheme() + "/conversation.v1.ConversationService/CreateMultiMessages", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
1567
+ return this.http.post(this._host + "/conversation.v1.ConversationService/CreateMultiMessages", request.toApiJson(), { ...this.apiOptions(), observe: 'response' });
1511
1568
  }
1512
1569
  getMultiConversationDetails(r) {
1513
1570
  const request = (r.toApiJson) ? r : new GetMultiConversationDetailsRequest(r);
1514
- return this.http.post(this.hostService.hostWithScheme() + "/conversation.v1.ConversationService/GetMultiConversationDetails", request.toApiJson(), this.apiOptions())
1515
- .pipe(map(resp => GetMultiConversationDetailsResponse.fromProto(resp)), share());
1571
+ return this.http.post(this._host + "/conversation.v1.ConversationService/GetMultiConversationDetails", request.toApiJson(), this.apiOptions())
1572
+ .pipe(map(resp => GetMultiConversationDetailsResponse.fromProto(resp)));
1516
1573
  }
1517
1574
  getMultiParticipants(r) {
1518
1575
  const request = (r.toApiJson) ? r : new GetMultiParticipantsRequest(r);
1519
- return this.http.post(this.hostService.hostWithScheme() + "/conversation.v1.ConversationService/GetMultiParticipants", request.toApiJson(), this.apiOptions())
1520
- .pipe(map(resp => GetMultiParticipantsResponse.fromProto(resp)), share());
1576
+ return this.http.post(this._host + "/conversation.v1.ConversationService/GetMultiParticipants", request.toApiJson(), this.apiOptions())
1577
+ .pipe(map(resp => GetMultiParticipantsResponse.fromProto(resp)));
1521
1578
  }
1522
1579
  searchConversations(r) {
1523
1580
  const request = (r.toApiJson) ? r : new SearchConversationsRequest(r);
1524
- return this.http.post(this.hostService.hostWithScheme() + "/conversation.v1.ConversationService/SearchConversations", request.toApiJson(), this.apiOptions())
1525
- .pipe(map(resp => SearchConversationsResponse.fromProto(resp)), share());
1581
+ return this.http.post(this._host + "/conversation.v1.ConversationService/SearchConversations", request.toApiJson(), this.apiOptions())
1582
+ .pipe(map(resp => SearchConversationsResponse.fromProto(resp)));
1526
1583
  }
1527
1584
  getMultiConversationMessageCount(r) {
1528
1585
  const request = (r.toApiJson) ? r : new GetMultiConversationMessageCountRequest(r);
1529
- return this.http.post(this.hostService.hostWithScheme() + "/conversation.v1.ConversationService/GetMultiConversationMessageCount", request.toApiJson(), this.apiOptions())
1530
- .pipe(map(resp => GetMultiConversationMessageCountResponse.fromProto(resp)), share());
1586
+ return this.http.post(this._host + "/conversation.v1.ConversationService/GetMultiConversationMessageCount", request.toApiJson(), this.apiOptions())
1587
+ .pipe(map(resp => GetMultiConversationMessageCountResponse.fromProto(resp)));
1588
+ }
1589
+ addMultiParticipants(r) {
1590
+ const request = (r.toApiJson) ? r : new AddMultiParticipantsRequest(r);
1591
+ return this.http.post(this._host + "/conversation.v1.ConversationService/AddMultiParticipants", request.toApiJson(), this.apiOptions())
1592
+ .pipe(map(resp => AddMultiParticipantsResponse.fromProto(resp)));
1531
1593
  }
1532
1594
  }
1533
- ConversationApiService.ɵprov = ɵɵdefineInjectable({ factory: function ConversationApiService_Factory() { return new ConversationApiService(ɵɵinject(HttpClient), ɵɵinject(HostService)); }, token: ConversationApiService, providedIn: "root" });
1534
- ConversationApiService.decorators = [
1535
- { type: Injectable, args: [{ providedIn: 'root' },] }
1536
- ];
1537
- ConversationApiService.ctorParameters = () => [
1538
- { type: HttpClient },
1539
- { type: HostService }
1540
- ];
1595
+ 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 });
1596
+ ConversationApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: ConversationApiService, providedIn: 'root' });
1597
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: ConversationApiService, decorators: [{
1598
+ type: Injectable,
1599
+ args: [{ providedIn: 'root' }]
1600
+ }], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: HostService }]; } });
1541
1601
 
1542
1602
  // *********************************
1543
1603
 
@@ -1545,5 +1605,5 @@ ConversationApiService.ctorParameters = () => [
1545
1605
  * Generated bundle index. Do not edit.
1546
1606
  */
1547
1607
 
1548
- export { 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 };
1549
- //# sourceMappingURL=vendasta-conversation.js.map
1608
+ 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 };
1609
+ //# sourceMappingURL=vendasta-conversation.mjs.map