@vendasta/conversation 0.13.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.
- package/esm2020/lib/_generated/host.service.mjs +25 -0
- package/esm2020/lib/_internal/conversation.api.service.mjs +111 -0
- package/esm2020/lib/_internal/enums/api.enum.mjs +14 -0
- package/esm2020/lib/_internal/enums/conversation.enum.mjs +25 -0
- package/esm2020/lib/_internal/enums/index.mjs +11 -0
- package/esm2020/lib/_internal/enums/message.enum.mjs +21 -0
- package/esm2020/lib/_internal/enums/participant.enum.mjs +18 -0
- package/esm2020/lib/_internal/index.mjs +11 -0
- package/esm2020/lib/_internal/interfaces/api.interface.mjs +2 -0
- package/esm2020/lib/_internal/interfaces/conversation.interface.mjs +8 -0
- package/esm2020/lib/_internal/interfaces/index.mjs +2 -0
- package/esm2020/lib/_internal/interfaces/message.interface.mjs +8 -0
- package/esm2020/lib/_internal/interfaces/participant.interface.mjs +8 -0
- package/esm2020/lib/_internal/objects/api.mjs +1092 -0
- package/esm2020/lib/_internal/objects/conversation.mjs +73 -0
- package/esm2020/lib/_internal/objects/index.mjs +11 -0
- package/esm2020/lib/_internal/objects/message.mjs +105 -0
- package/esm2020/lib/_internal/objects/participant.mjs +129 -0
- package/esm2020/lib/index.mjs +3 -0
- package/esm2020/public_api.mjs +2 -0
- package/esm2020/vendasta-conversation.mjs +5 -0
- package/fesm2015/{vendasta-conversation.js → vendasta-conversation.mjs} +87 -121
- package/fesm2015/vendasta-conversation.mjs.map +1 -0
- package/fesm2020/vendasta-conversation.mjs +1609 -0
- package/fesm2020/vendasta-conversation.mjs.map +1 -0
- package/lib/_generated/host.service.d.ts +5 -9
- package/lib/_internal/conversation.api.service.d.ts +4 -0
- package/lib/_internal/interfaces/participant.interface.d.ts +1 -0
- package/lib/_internal/objects/participant.d.ts +1 -0
- package/package.json +27 -16
- package/src/README.md +1 -0
- package/vendasta-conversation.d.ts +1 -1
- package/bundles/vendasta-conversation.umd.js +0 -1712
- package/bundles/vendasta-conversation.umd.js.map +0 -1
- package/bundles/vendasta-conversation.umd.min.js +0 -2
- package/bundles/vendasta-conversation.umd.min.js.map +0 -1
- package/esm2015/lib/_generated/host.service.js +0 -65
- package/esm2015/lib/_internal/conversation.api.service.js +0 -112
- package/esm2015/lib/_internal/enums/api.enum.js +0 -14
- package/esm2015/lib/_internal/enums/conversation.enum.js +0 -25
- package/esm2015/lib/_internal/enums/index.js +0 -11
- package/esm2015/lib/_internal/enums/message.enum.js +0 -21
- package/esm2015/lib/_internal/enums/participant.enum.js +0 -18
- package/esm2015/lib/_internal/index.js +0 -11
- package/esm2015/lib/_internal/interfaces/api.interface.js +0 -2
- package/esm2015/lib/_internal/interfaces/conversation.interface.js +0 -8
- package/esm2015/lib/_internal/interfaces/index.js +0 -2
- package/esm2015/lib/_internal/interfaces/message.interface.js +0 -8
- package/esm2015/lib/_internal/interfaces/participant.interface.js +0 -8
- package/esm2015/lib/_internal/objects/api.js +0 -1092
- package/esm2015/lib/_internal/objects/conversation.js +0 -73
- package/esm2015/lib/_internal/objects/index.js +0 -11
- package/esm2015/lib/_internal/objects/message.js +0 -105
- package/esm2015/lib/_internal/objects/participant.js +0 -126
- package/esm2015/lib/index.js +0 -3
- package/esm2015/public_api.js +0 -2
- package/esm2015/vendasta-conversation.js +0 -6
- package/fesm2015/vendasta-conversation.js.map +0 -1
- package/vendasta-conversation.metadata.json +0 -1
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
315
|
+
m.location = enumStringToValue$1(PlatformLocation, proto.location);
|
|
315
316
|
}
|
|
316
317
|
if (proto.channel) {
|
|
317
|
-
m.channel = enumStringToValue$
|
|
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$
|
|
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
|
|
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
|
|
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
|
|
550
|
+
m.originLocation = enumStringToValue(PlatformLocation, proto.originLocation);
|
|
547
551
|
}
|
|
548
552
|
return m;
|
|
549
553
|
}
|
|
@@ -1051,13 +1055,13 @@ class LookupConversationsRequestLookupConversationsFilters {
|
|
|
1051
1055
|
let m = new LookupConversationsRequestLookupConversationsFilters();
|
|
1052
1056
|
m = Object.assign(m, proto);
|
|
1053
1057
|
if (proto.location) {
|
|
1054
|
-
m.location = enumStringToValue
|
|
1058
|
+
m.location = enumStringToValue(PlatformLocation, proto.location);
|
|
1055
1059
|
}
|
|
1056
1060
|
if (proto.channel) {
|
|
1057
|
-
m.channel = enumStringToValue
|
|
1061
|
+
m.channel = enumStringToValue(ConversationChannel, proto.channel);
|
|
1058
1062
|
}
|
|
1059
1063
|
if (proto.originLocation) {
|
|
1060
|
-
m.originLocation = enumStringToValue
|
|
1064
|
+
m.originLocation = enumStringToValue(PlatformLocation, proto.originLocation);
|
|
1061
1065
|
}
|
|
1062
1066
|
return m;
|
|
1063
1067
|
}
|
|
@@ -1156,7 +1160,7 @@ class Metadata {
|
|
|
1156
1160
|
let m = new Metadata();
|
|
1157
1161
|
m = Object.assign(m, proto);
|
|
1158
1162
|
if (proto.identifier) {
|
|
1159
|
-
m.identifier = enumStringToValue
|
|
1163
|
+
m.identifier = enumStringToValue(MetadataIdentifier, proto.identifier);
|
|
1160
1164
|
}
|
|
1161
1165
|
if (proto.data) {
|
|
1162
1166
|
m.data = Object.keys(proto.data).reduce((obj, k) => { obj[k] = proto.data[k]; return obj; }, {});
|
|
@@ -1254,13 +1258,13 @@ class ReceiveMessageRequest {
|
|
|
1254
1258
|
let m = new ReceiveMessageRequest();
|
|
1255
1259
|
m = Object.assign(m, proto);
|
|
1256
1260
|
if (proto.channel) {
|
|
1257
|
-
m.channel = enumStringToValue
|
|
1261
|
+
m.channel = enumStringToValue(ConversationChannel, proto.channel);
|
|
1258
1262
|
}
|
|
1259
1263
|
if (proto.type) {
|
|
1260
|
-
m.type = enumStringToValue
|
|
1264
|
+
m.type = enumStringToValue(MessageType, proto.type);
|
|
1261
1265
|
}
|
|
1262
1266
|
if (proto.location) {
|
|
1263
|
-
m.location = enumStringToValue
|
|
1267
|
+
m.location = enumStringToValue(PlatformLocation, proto.location);
|
|
1264
1268
|
}
|
|
1265
1269
|
if (proto.metadata) {
|
|
1266
1270
|
m.metadata = Object.keys(proto.metadata).reduce((obj, k) => { obj[k] = proto.metadata[k]; return obj; }, {});
|
|
@@ -1319,7 +1323,7 @@ class SearchConversationsRequest {
|
|
|
1319
1323
|
let m = new SearchConversationsRequest();
|
|
1320
1324
|
m = Object.assign(m, proto);
|
|
1321
1325
|
if (proto.location) {
|
|
1322
|
-
m.location = enumStringToValue
|
|
1326
|
+
m.location = enumStringToValue(PlatformLocation, proto.location);
|
|
1323
1327
|
}
|
|
1324
1328
|
if (proto.pagingOptions) {
|
|
1325
1329
|
m.pagingOptions = PagedRequestOptions.fromProto(proto.pagingOptions);
|
|
@@ -1392,7 +1396,7 @@ class SendMessageRequest {
|
|
|
1392
1396
|
m.recipient = Participant.fromProto(proto.recipient);
|
|
1393
1397
|
}
|
|
1394
1398
|
if (proto.type) {
|
|
1395
|
-
m.type = enumStringToValue
|
|
1399
|
+
m.type = enumStringToValue(MessageType, proto.type);
|
|
1396
1400
|
}
|
|
1397
1401
|
if (proto.metadata) {
|
|
1398
1402
|
m.metadata = proto.metadata.map(Metadata.fromProto);
|
|
@@ -1453,7 +1457,7 @@ class UpdateMessageStatusRequest {
|
|
|
1453
1457
|
let m = new UpdateMessageStatusRequest();
|
|
1454
1458
|
m = Object.assign(m, proto);
|
|
1455
1459
|
if (proto.status) {
|
|
1456
|
-
m.status = enumStringToValue
|
|
1460
|
+
m.status = enumStringToValue(MessageStatus, proto.status);
|
|
1457
1461
|
}
|
|
1458
1462
|
return m;
|
|
1459
1463
|
}
|
|
@@ -1474,72 +1478,36 @@ class UpdateMessageStatusRequest {
|
|
|
1474
1478
|
|
|
1475
1479
|
// *********************************
|
|
1476
1480
|
|
|
1481
|
+
var _a;
|
|
1482
|
+
const environment = (_a = (window ? window['environment'] : 'prod')) !== null && _a !== void 0 ? _a : 'prod';
|
|
1483
|
+
const hostMap = {
|
|
1484
|
+
'local': 'conversation-api.vendasta-local.com',
|
|
1485
|
+
'test': '',
|
|
1486
|
+
'demo': 'conversation-demo.apigateway.co',
|
|
1487
|
+
'prod': 'conversation-prod.apigateway.co',
|
|
1488
|
+
'production': 'conversation-prod.apigateway.co',
|
|
1489
|
+
};
|
|
1477
1490
|
class HostService {
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
}
|
|
1481
|
-
|
|
1482
|
-
|
|
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();
|
|
1491
|
+
get host() {
|
|
1492
|
+
return hostMap[environment.toLowerCase()];
|
|
1493
|
+
}
|
|
1494
|
+
get hostWithScheme() {
|
|
1495
|
+
return 'https://' + this.host;
|
|
1528
1496
|
}
|
|
1529
1497
|
}
|
|
1530
|
-
HostService.ɵ
|
|
1531
|
-
HostService
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
];
|
|
1498
|
+
HostService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: HostService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1499
|
+
HostService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: HostService, providedIn: 'root' });
|
|
1500
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: HostService, decorators: [{
|
|
1501
|
+
type: Injectable,
|
|
1502
|
+
args: [{ providedIn: 'root' }]
|
|
1503
|
+
}] });
|
|
1537
1504
|
|
|
1538
1505
|
// *********************************
|
|
1539
1506
|
class ConversationApiService {
|
|
1540
1507
|
constructor(http, hostService) {
|
|
1541
1508
|
this.http = http;
|
|
1542
1509
|
this.hostService = hostService;
|
|
1510
|
+
this._host = this.hostService.hostWithScheme;
|
|
1543
1511
|
}
|
|
1544
1512
|
apiOptions() {
|
|
1545
1513
|
return {
|
|
@@ -1551,88 +1519,86 @@ class ConversationApiService {
|
|
|
1551
1519
|
}
|
|
1552
1520
|
sendMessage(r) {
|
|
1553
1521
|
const request = (r.toApiJson) ? r : new SendMessageRequest(r);
|
|
1554
|
-
return this.http.post(this.
|
|
1555
|
-
.pipe(map(resp => SendMessageResponse.fromProto(resp))
|
|
1522
|
+
return this.http.post(this._host + "/conversation.v1.ConversationService/SendMessage", request.toApiJson(), this.apiOptions())
|
|
1523
|
+
.pipe(map(resp => SendMessageResponse.fromProto(resp)));
|
|
1556
1524
|
}
|
|
1557
1525
|
getMessage(r) {
|
|
1558
1526
|
const request = (r.toApiJson) ? r : new GetMessageRequest(r);
|
|
1559
|
-
return this.http.post(this.
|
|
1560
|
-
.pipe(map(resp => Message.fromProto(resp))
|
|
1527
|
+
return this.http.post(this._host + "/conversation.v1.ConversationService/GetMessage", request.toApiJson(), this.apiOptions())
|
|
1528
|
+
.pipe(map(resp => Message.fromProto(resp)));
|
|
1561
1529
|
}
|
|
1562
1530
|
listMessages(r) {
|
|
1563
1531
|
const request = (r.toApiJson) ? r : new ListMessagesRequest(r);
|
|
1564
|
-
return this.http.post(this.
|
|
1565
|
-
.pipe(map(resp => ListMessagesResponse.fromProto(resp))
|
|
1532
|
+
return this.http.post(this._host + "/conversation.v1.ConversationService/ListMessages", request.toApiJson(), this.apiOptions())
|
|
1533
|
+
.pipe(map(resp => ListMessagesResponse.fromProto(resp)));
|
|
1566
1534
|
}
|
|
1567
1535
|
deleteMessage(r) {
|
|
1568
1536
|
const request = (r.toApiJson) ? r : new DeleteMessageRequest(r);
|
|
1569
|
-
return this.http.post(this.
|
|
1537
|
+
return this.http.post(this._host + "/conversation.v1.ConversationService/DeleteMessage", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
|
|
1570
1538
|
}
|
|
1571
1539
|
updateMessageStatus(r) {
|
|
1572
1540
|
const request = (r.toApiJson) ? r : new UpdateMessageStatusRequest(r);
|
|
1573
|
-
return this.http.post(this.
|
|
1541
|
+
return this.http.post(this._host + "/conversation.v1.ConversationService/UpdateMessageStatus", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
|
|
1574
1542
|
}
|
|
1575
1543
|
lookupConversations(r) {
|
|
1576
1544
|
const request = (r.toApiJson) ? r : new LookupConversationsRequest(r);
|
|
1577
|
-
return this.http.post(this.
|
|
1578
|
-
.pipe(map(resp => LookupConversationsResponse.fromProto(resp))
|
|
1545
|
+
return this.http.post(this._host + "/conversation.v1.ConversationService/LookupConversations", request.toApiJson(), this.apiOptions())
|
|
1546
|
+
.pipe(map(resp => LookupConversationsResponse.fromProto(resp)));
|
|
1579
1547
|
}
|
|
1580
1548
|
createConversation(r) {
|
|
1581
1549
|
const request = (r.toApiJson) ? r : new CreateConversationRequest(r);
|
|
1582
|
-
return this.http.post(this.
|
|
1583
|
-
.pipe(map(resp => CreateConversationResponse.fromProto(resp))
|
|
1550
|
+
return this.http.post(this._host + "/conversation.v1.ConversationService/CreateConversation", request.toApiJson(), this.apiOptions())
|
|
1551
|
+
.pipe(map(resp => CreateConversationResponse.fromProto(resp)));
|
|
1584
1552
|
}
|
|
1585
1553
|
deleteConversation(r) {
|
|
1586
1554
|
const request = (r.toApiJson) ? r : new DeleteConversationRequest(r);
|
|
1587
|
-
return this.http.post(this.
|
|
1555
|
+
return this.http.post(this._host + "/conversation.v1.ConversationService/DeleteConversation", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
|
|
1588
1556
|
}
|
|
1589
1557
|
receiveMessage(r) {
|
|
1590
1558
|
const request = (r.toApiJson) ? r : new ReceiveMessageRequest(r);
|
|
1591
|
-
return this.http.post(this.
|
|
1559
|
+
return this.http.post(this._host + "/conversation.v1.ConversationService/ReceiveMessage", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
|
|
1592
1560
|
}
|
|
1593
1561
|
getMultiMessages(r) {
|
|
1594
1562
|
const request = (r.toApiJson) ? r : new GetMultiMessagesRequest(r);
|
|
1595
|
-
return this.http.post(this.
|
|
1596
|
-
.pipe(map(resp => GetMultiMessagesResponse.fromProto(resp))
|
|
1563
|
+
return this.http.post(this._host + "/conversation.v1.ConversationService/GetMultiMessages", request.toApiJson(), this.apiOptions())
|
|
1564
|
+
.pipe(map(resp => GetMultiMessagesResponse.fromProto(resp)));
|
|
1597
1565
|
}
|
|
1598
1566
|
createMultiMessages(r) {
|
|
1599
1567
|
const request = (r.toApiJson) ? r : new CreateMultiMessagesRequest(r);
|
|
1600
|
-
return this.http.post(this.
|
|
1568
|
+
return this.http.post(this._host + "/conversation.v1.ConversationService/CreateMultiMessages", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
|
|
1601
1569
|
}
|
|
1602
1570
|
getMultiConversationDetails(r) {
|
|
1603
1571
|
const request = (r.toApiJson) ? r : new GetMultiConversationDetailsRequest(r);
|
|
1604
|
-
return this.http.post(this.
|
|
1605
|
-
.pipe(map(resp => GetMultiConversationDetailsResponse.fromProto(resp))
|
|
1572
|
+
return this.http.post(this._host + "/conversation.v1.ConversationService/GetMultiConversationDetails", request.toApiJson(), this.apiOptions())
|
|
1573
|
+
.pipe(map(resp => GetMultiConversationDetailsResponse.fromProto(resp)));
|
|
1606
1574
|
}
|
|
1607
1575
|
getMultiParticipants(r) {
|
|
1608
1576
|
const request = (r.toApiJson) ? r : new GetMultiParticipantsRequest(r);
|
|
1609
|
-
return this.http.post(this.
|
|
1610
|
-
.pipe(map(resp => GetMultiParticipantsResponse.fromProto(resp))
|
|
1577
|
+
return this.http.post(this._host + "/conversation.v1.ConversationService/GetMultiParticipants", request.toApiJson(), this.apiOptions())
|
|
1578
|
+
.pipe(map(resp => GetMultiParticipantsResponse.fromProto(resp)));
|
|
1611
1579
|
}
|
|
1612
1580
|
searchConversations(r) {
|
|
1613
1581
|
const request = (r.toApiJson) ? r : new SearchConversationsRequest(r);
|
|
1614
|
-
return this.http.post(this.
|
|
1615
|
-
.pipe(map(resp => SearchConversationsResponse.fromProto(resp))
|
|
1582
|
+
return this.http.post(this._host + "/conversation.v1.ConversationService/SearchConversations", request.toApiJson(), this.apiOptions())
|
|
1583
|
+
.pipe(map(resp => SearchConversationsResponse.fromProto(resp)));
|
|
1616
1584
|
}
|
|
1617
1585
|
getMultiConversationMessageCount(r) {
|
|
1618
1586
|
const request = (r.toApiJson) ? r : new GetMultiConversationMessageCountRequest(r);
|
|
1619
|
-
return this.http.post(this.
|
|
1620
|
-
.pipe(map(resp => GetMultiConversationMessageCountResponse.fromProto(resp))
|
|
1587
|
+
return this.http.post(this._host + "/conversation.v1.ConversationService/GetMultiConversationMessageCount", request.toApiJson(), this.apiOptions())
|
|
1588
|
+
.pipe(map(resp => GetMultiConversationMessageCountResponse.fromProto(resp)));
|
|
1621
1589
|
}
|
|
1622
1590
|
addMultiParticipants(r) {
|
|
1623
1591
|
const request = (r.toApiJson) ? r : new AddMultiParticipantsRequest(r);
|
|
1624
|
-
return this.http.post(this.
|
|
1625
|
-
.pipe(map(resp => AddMultiParticipantsResponse.fromProto(resp))
|
|
1592
|
+
return this.http.post(this._host + "/conversation.v1.ConversationService/AddMultiParticipants", request.toApiJson(), this.apiOptions())
|
|
1593
|
+
.pipe(map(resp => AddMultiParticipantsResponse.fromProto(resp)));
|
|
1626
1594
|
}
|
|
1627
1595
|
}
|
|
1628
|
-
ConversationApiService.ɵ
|
|
1629
|
-
ConversationApiService
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
{ type: HostService }
|
|
1635
|
-
];
|
|
1596
|
+
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 });
|
|
1597
|
+
ConversationApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: ConversationApiService, providedIn: 'root' });
|
|
1598
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: ConversationApiService, decorators: [{
|
|
1599
|
+
type: Injectable,
|
|
1600
|
+
args: [{ providedIn: 'root' }]
|
|
1601
|
+
}], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: HostService }]; } });
|
|
1636
1602
|
|
|
1637
1603
|
// *********************************
|
|
1638
1604
|
|
|
@@ -1640,5 +1606,5 @@ ConversationApiService.ctorParameters = () => [
|
|
|
1640
1606
|
* Generated bundle index. Do not edit.
|
|
1641
1607
|
*/
|
|
1642
1608
|
|
|
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
|
|
1644
|
-
//# sourceMappingURL=vendasta-conversation.
|
|
1609
|
+
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 };
|
|
1610
|
+
//# sourceMappingURL=vendasta-conversation.mjs.map
|