@vendasta/conversation 0.41.0 → 0.43.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 +4 -4
- package/esm2020/lib/_internal/conversation.api.service.mjs +12 -6
- package/esm2020/lib/_internal/enums/index.mjs +2 -2
- package/esm2020/lib/_internal/inbox.api.service.mjs +4 -4
- package/esm2020/lib/_internal/interfaces/api.interface.mjs +1 -1
- package/esm2020/lib/_internal/interfaces/configuration.interface.mjs +1 -1
- package/esm2020/lib/_internal/interfaces/index.mjs +1 -1
- package/esm2020/lib/_internal/interfaces/message.interface.mjs +1 -1
- package/esm2020/lib/_internal/objects/api.mjs +70 -1
- package/esm2020/lib/_internal/objects/configuration.mjs +4 -1
- package/esm2020/lib/_internal/objects/index.mjs +3 -3
- package/esm2020/lib/_internal/objects/message.mjs +7 -1
- package/fesm2015/vendasta-conversation.mjs +251 -167
- package/fesm2015/vendasta-conversation.mjs.map +1 -1
- package/fesm2020/vendasta-conversation.mjs +251 -167
- package/fesm2020/vendasta-conversation.mjs.map +1 -1
- package/lib/_internal/conversation.api.service.d.ts +4 -3
- package/lib/_internal/enums/index.d.ts +1 -1
- package/lib/_internal/interfaces/api.interface.d.ts +10 -0
- package/lib/_internal/interfaces/configuration.interface.d.ts +1 -0
- package/lib/_internal/interfaces/index.d.ts +2 -2
- package/lib/_internal/interfaces/message.interface.d.ts +1 -0
- package/lib/_internal/objects/api.d.ts +19 -0
- package/lib/_internal/objects/configuration.d.ts +1 -0
- package/lib/_internal/objects/index.d.ts +2 -2
- package/lib/_internal/objects/message.d.ts +1 -0
- package/package.json +1 -1
|
@@ -4,28 +4,6 @@ import * as i1 from '@angular/common/http';
|
|
|
4
4
|
import { HttpHeaders } from '@angular/common/http';
|
|
5
5
|
import { map } from 'rxjs/operators';
|
|
6
6
|
|
|
7
|
-
// *********************************
|
|
8
|
-
// Code generated by sdkgen
|
|
9
|
-
// DO NOT EDIT!.
|
|
10
|
-
//
|
|
11
|
-
// Enums.
|
|
12
|
-
// *********************************
|
|
13
|
-
var MessageStatus;
|
|
14
|
-
(function (MessageStatus) {
|
|
15
|
-
MessageStatus[MessageStatus["MESSAGE_STATUS_NOT_READ"] = 0] = "MESSAGE_STATUS_NOT_READ";
|
|
16
|
-
MessageStatus[MessageStatus["MESSAGE_STATUS_READ"] = 1] = "MESSAGE_STATUS_READ";
|
|
17
|
-
MessageStatus[MessageStatus["MESSAGE_STATUS_SENT"] = 2] = "MESSAGE_STATUS_SENT";
|
|
18
|
-
MessageStatus[MessageStatus["MESSAGE_STATUS_DELIVERED"] = 3] = "MESSAGE_STATUS_DELIVERED";
|
|
19
|
-
MessageStatus[MessageStatus["MESSAGE_STATUS_FAILED"] = 4] = "MESSAGE_STATUS_FAILED";
|
|
20
|
-
MessageStatus[MessageStatus["MESSAGE_STATUS_UNDELIVERED"] = 5] = "MESSAGE_STATUS_UNDELIVERED";
|
|
21
|
-
})(MessageStatus || (MessageStatus = {}));
|
|
22
|
-
var MessageType;
|
|
23
|
-
(function (MessageType) {
|
|
24
|
-
MessageType[MessageType["MESSAGE_TYPE_MESSAGE"] = 0] = "MESSAGE_TYPE_MESSAGE";
|
|
25
|
-
MessageType[MessageType["MESSAGE_TYPE_MEDIA"] = 1] = "MESSAGE_TYPE_MEDIA";
|
|
26
|
-
MessageType[MessageType["MESSAGE_TYPE_SYSTEM"] = 2] = "MESSAGE_TYPE_SYSTEM";
|
|
27
|
-
})(MessageType || (MessageType = {}));
|
|
28
|
-
|
|
29
7
|
// *********************************
|
|
30
8
|
// Code generated by sdkgen
|
|
31
9
|
// DO NOT EDIT!.
|
|
@@ -80,6 +58,28 @@ var PlatformLocation;
|
|
|
80
58
|
PlatformLocation[PlatformLocation["PLATFORM_LOCATION_SALES_CENTER"] = 6] = "PLATFORM_LOCATION_SALES_CENTER";
|
|
81
59
|
})(PlatformLocation || (PlatformLocation = {}));
|
|
82
60
|
|
|
61
|
+
// *********************************
|
|
62
|
+
// Code generated by sdkgen
|
|
63
|
+
// DO NOT EDIT!.
|
|
64
|
+
//
|
|
65
|
+
// Enums.
|
|
66
|
+
// *********************************
|
|
67
|
+
var MessageStatus;
|
|
68
|
+
(function (MessageStatus) {
|
|
69
|
+
MessageStatus[MessageStatus["MESSAGE_STATUS_NOT_READ"] = 0] = "MESSAGE_STATUS_NOT_READ";
|
|
70
|
+
MessageStatus[MessageStatus["MESSAGE_STATUS_READ"] = 1] = "MESSAGE_STATUS_READ";
|
|
71
|
+
MessageStatus[MessageStatus["MESSAGE_STATUS_SENT"] = 2] = "MESSAGE_STATUS_SENT";
|
|
72
|
+
MessageStatus[MessageStatus["MESSAGE_STATUS_DELIVERED"] = 3] = "MESSAGE_STATUS_DELIVERED";
|
|
73
|
+
MessageStatus[MessageStatus["MESSAGE_STATUS_FAILED"] = 4] = "MESSAGE_STATUS_FAILED";
|
|
74
|
+
MessageStatus[MessageStatus["MESSAGE_STATUS_UNDELIVERED"] = 5] = "MESSAGE_STATUS_UNDELIVERED";
|
|
75
|
+
})(MessageStatus || (MessageStatus = {}));
|
|
76
|
+
var MessageType;
|
|
77
|
+
(function (MessageType) {
|
|
78
|
+
MessageType[MessageType["MESSAGE_TYPE_MESSAGE"] = 0] = "MESSAGE_TYPE_MESSAGE";
|
|
79
|
+
MessageType[MessageType["MESSAGE_TYPE_MEDIA"] = 1] = "MESSAGE_TYPE_MEDIA";
|
|
80
|
+
MessageType[MessageType["MESSAGE_TYPE_SYSTEM"] = 2] = "MESSAGE_TYPE_SYSTEM";
|
|
81
|
+
})(MessageType || (MessageType = {}));
|
|
82
|
+
|
|
83
83
|
// *********************************
|
|
84
84
|
// Code generated by sdkgen
|
|
85
85
|
// DO NOT EDIT!.
|
|
@@ -157,12 +157,45 @@ function enumStringToValue$9(enumRef, value) {
|
|
|
157
157
|
}
|
|
158
158
|
return enumRef[value];
|
|
159
159
|
}
|
|
160
|
-
class
|
|
160
|
+
class SubjectParticipant {
|
|
161
161
|
static fromProto(proto) {
|
|
162
|
-
let m = new
|
|
162
|
+
let m = new SubjectParticipant();
|
|
163
163
|
m = Object.assign(m, proto);
|
|
164
|
-
if (proto.
|
|
165
|
-
m.
|
|
164
|
+
if (proto.participantType) {
|
|
165
|
+
m.participantType = enumStringToValue$9(GlobalParticipantType, proto.participantType);
|
|
166
|
+
}
|
|
167
|
+
return m;
|
|
168
|
+
}
|
|
169
|
+
constructor(kwargs) {
|
|
170
|
+
if (!kwargs) {
|
|
171
|
+
return;
|
|
172
|
+
}
|
|
173
|
+
Object.assign(this, kwargs);
|
|
174
|
+
}
|
|
175
|
+
toApiJson() {
|
|
176
|
+
const toReturn = {};
|
|
177
|
+
if (typeof this.participantType !== 'undefined') {
|
|
178
|
+
toReturn['participantType'] = this.participantType;
|
|
179
|
+
}
|
|
180
|
+
if (typeof this.internalParticipantId !== 'undefined') {
|
|
181
|
+
toReturn['internalParticipantId'] = this.internalParticipantId;
|
|
182
|
+
}
|
|
183
|
+
return toReturn;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
function enumStringToValue$8(enumRef, value) {
|
|
188
|
+
if (typeof value === 'number') {
|
|
189
|
+
return value;
|
|
190
|
+
}
|
|
191
|
+
return enumRef[value];
|
|
192
|
+
}
|
|
193
|
+
class Conversation {
|
|
194
|
+
static fromProto(proto) {
|
|
195
|
+
let m = new Conversation();
|
|
196
|
+
m = Object.assign(m, proto);
|
|
197
|
+
if (proto.channel) {
|
|
198
|
+
m.channel = enumStringToValue$8(ConversationChannel, proto.channel);
|
|
166
199
|
}
|
|
167
200
|
if (proto.created) {
|
|
168
201
|
m.created = new Date(proto.created);
|
|
@@ -173,8 +206,14 @@ class Message {
|
|
|
173
206
|
if (proto.deleted) {
|
|
174
207
|
m.deleted = new Date(proto.deleted);
|
|
175
208
|
}
|
|
176
|
-
if (proto.
|
|
177
|
-
m.
|
|
209
|
+
if (proto.latestMsgSentTime) {
|
|
210
|
+
m.latestMsgSentTime = new Date(proto.latestMsgSentTime);
|
|
211
|
+
}
|
|
212
|
+
if (proto.originLocation) {
|
|
213
|
+
m.originLocation = enumStringToValue$8(PlatformLocation, proto.originLocation);
|
|
214
|
+
}
|
|
215
|
+
if (proto.lastSeenByParticipant) {
|
|
216
|
+
m.lastSeenByParticipant = proto.lastSeenByParticipant.map(LastSeenByParticipant.fromProto);
|
|
178
217
|
}
|
|
179
218
|
return m;
|
|
180
219
|
}
|
|
@@ -186,26 +225,14 @@ class Message {
|
|
|
186
225
|
}
|
|
187
226
|
toApiJson() {
|
|
188
227
|
const toReturn = {};
|
|
189
|
-
if (typeof this.messageId !== 'undefined') {
|
|
190
|
-
toReturn['messageId'] = this.messageId;
|
|
191
|
-
}
|
|
192
|
-
if (typeof this.externalMessageId !== 'undefined') {
|
|
193
|
-
toReturn['externalMessageId'] = this.externalMessageId;
|
|
194
|
-
}
|
|
195
228
|
if (typeof this.conversationId !== 'undefined') {
|
|
196
229
|
toReturn['conversationId'] = this.conversationId;
|
|
197
230
|
}
|
|
198
|
-
if (typeof this.
|
|
199
|
-
toReturn['
|
|
200
|
-
}
|
|
201
|
-
if (typeof this.type !== 'undefined') {
|
|
202
|
-
toReturn['type'] = this.type;
|
|
203
|
-
}
|
|
204
|
-
if (typeof this.body !== 'undefined') {
|
|
205
|
-
toReturn['body'] = this.body;
|
|
231
|
+
if (typeof this.channel !== 'undefined') {
|
|
232
|
+
toReturn['channel'] = this.channel;
|
|
206
233
|
}
|
|
207
|
-
if (typeof this.
|
|
208
|
-
toReturn['
|
|
234
|
+
if (typeof this.externalConversationId !== 'undefined') {
|
|
235
|
+
toReturn['externalConversationId'] = this.externalConversationId;
|
|
209
236
|
}
|
|
210
237
|
if (typeof this.created !== 'undefined' && this.created !== null) {
|
|
211
238
|
toReturn['created'] = 'toApiJson' in this.created ? this.created.toApiJson() : this.created;
|
|
@@ -216,59 +243,36 @@ class Message {
|
|
|
216
243
|
if (typeof this.deleted !== 'undefined' && this.deleted !== null) {
|
|
217
244
|
toReturn['deleted'] = 'toApiJson' in this.deleted ? this.deleted.toApiJson() : this.deleted;
|
|
218
245
|
}
|
|
219
|
-
if (typeof this.
|
|
220
|
-
toReturn['
|
|
221
|
-
}
|
|
222
|
-
if (typeof this.sendStatus !== 'undefined' && this.sendStatus !== null) {
|
|
223
|
-
toReturn['sendStatus'] = 'toApiJson' in this.sendStatus ? this.sendStatus.toApiJson() : this.sendStatus;
|
|
224
|
-
}
|
|
225
|
-
return toReturn;
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
class ParticipantMessageStatus {
|
|
229
|
-
static fromProto(proto) {
|
|
230
|
-
let m = new ParticipantMessageStatus();
|
|
231
|
-
m = Object.assign(m, proto);
|
|
232
|
-
if (proto.status) {
|
|
233
|
-
m.status = enumStringToValue$9(MessageStatus, proto.status);
|
|
234
|
-
}
|
|
235
|
-
if (proto.updated) {
|
|
236
|
-
m.updated = new Date(proto.updated);
|
|
246
|
+
if (typeof this.participantIds !== 'undefined') {
|
|
247
|
+
toReturn['participantIds'] = this.participantIds;
|
|
237
248
|
}
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
constructor(kwargs) {
|
|
241
|
-
if (!kwargs) {
|
|
242
|
-
return;
|
|
249
|
+
if (typeof this.latestMsgSentTime !== 'undefined' && this.latestMsgSentTime !== null) {
|
|
250
|
+
toReturn['latestMsgSentTime'] = 'toApiJson' in this.latestMsgSentTime ? this.latestMsgSentTime.toApiJson() : this.latestMsgSentTime;
|
|
243
251
|
}
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
toApiJson() {
|
|
247
|
-
const toReturn = {};
|
|
248
|
-
if (typeof this.participantId !== 'undefined') {
|
|
249
|
-
toReturn['participantId'] = this.participantId;
|
|
252
|
+
if (typeof this.originLocation !== 'undefined') {
|
|
253
|
+
toReturn['originLocation'] = this.originLocation;
|
|
250
254
|
}
|
|
251
|
-
if (typeof this.
|
|
252
|
-
toReturn['
|
|
255
|
+
if (typeof this.originLocationExternalId !== 'undefined') {
|
|
256
|
+
toReturn['originLocationExternalId'] = this.originLocationExternalId;
|
|
253
257
|
}
|
|
254
|
-
if (typeof this.
|
|
255
|
-
toReturn['
|
|
258
|
+
if (typeof this.lastSeenByParticipant !== 'undefined' && this.lastSeenByParticipant !== null) {
|
|
259
|
+
toReturn['lastSeenByParticipant'] = 'toApiJson' in this.lastSeenByParticipant ? this.lastSeenByParticipant.toApiJson() : this.lastSeenByParticipant;
|
|
256
260
|
}
|
|
257
|
-
if (typeof this.
|
|
258
|
-
toReturn['
|
|
261
|
+
if (typeof this.conversationViewIds !== 'undefined') {
|
|
262
|
+
toReturn['conversationViewIds'] = this.conversationViewIds;
|
|
259
263
|
}
|
|
260
264
|
return toReturn;
|
|
261
265
|
}
|
|
262
266
|
}
|
|
263
|
-
class
|
|
267
|
+
class ConversationKey {
|
|
264
268
|
static fromProto(proto) {
|
|
265
|
-
let m = new
|
|
269
|
+
let m = new ConversationKey();
|
|
266
270
|
m = Object.assign(m, proto);
|
|
267
|
-
if (proto.
|
|
268
|
-
m.
|
|
271
|
+
if (proto.subjectParticipants) {
|
|
272
|
+
m.subjectParticipants = proto.subjectParticipants.map(SubjectParticipant.fromProto);
|
|
269
273
|
}
|
|
270
|
-
if (proto.
|
|
271
|
-
m.
|
|
274
|
+
if (proto.channel) {
|
|
275
|
+
m.channel = enumStringToValue$8(ConversationChannel, proto.channel);
|
|
272
276
|
}
|
|
273
277
|
return m;
|
|
274
278
|
}
|
|
@@ -280,31 +284,24 @@ class SendStatus {
|
|
|
280
284
|
}
|
|
281
285
|
toApiJson() {
|
|
282
286
|
const toReturn = {};
|
|
283
|
-
if (typeof this.
|
|
284
|
-
toReturn['
|
|
287
|
+
if (typeof this.subjectParticipants !== 'undefined' && this.subjectParticipants !== null) {
|
|
288
|
+
toReturn['subjectParticipants'] = 'toApiJson' in this.subjectParticipants ? this.subjectParticipants.toApiJson() : this.subjectParticipants;
|
|
285
289
|
}
|
|
286
|
-
if (typeof this.
|
|
287
|
-
toReturn['
|
|
290
|
+
if (typeof this.channel !== 'undefined') {
|
|
291
|
+
toReturn['channel'] = this.channel;
|
|
288
292
|
}
|
|
289
|
-
if (typeof this.
|
|
290
|
-
toReturn['
|
|
293
|
+
if (typeof this.originLocationExternalId !== 'undefined') {
|
|
294
|
+
toReturn['originLocationExternalId'] = this.originLocationExternalId;
|
|
291
295
|
}
|
|
292
296
|
return toReturn;
|
|
293
297
|
}
|
|
294
298
|
}
|
|
295
|
-
|
|
296
|
-
function enumStringToValue$8(enumRef, value) {
|
|
297
|
-
if (typeof value === 'number') {
|
|
298
|
-
return value;
|
|
299
|
-
}
|
|
300
|
-
return enumRef[value];
|
|
301
|
-
}
|
|
302
|
-
class SubjectParticipant {
|
|
299
|
+
class LastSeenByParticipant {
|
|
303
300
|
static fromProto(proto) {
|
|
304
|
-
let m = new
|
|
301
|
+
let m = new LastSeenByParticipant();
|
|
305
302
|
m = Object.assign(m, proto);
|
|
306
|
-
if (proto.
|
|
307
|
-
m.
|
|
303
|
+
if (proto.lastSeenTime) {
|
|
304
|
+
m.lastSeenTime = new Date(proto.lastSeenTime);
|
|
308
305
|
}
|
|
309
306
|
return m;
|
|
310
307
|
}
|
|
@@ -316,11 +313,11 @@ class SubjectParticipant {
|
|
|
316
313
|
}
|
|
317
314
|
toApiJson() {
|
|
318
315
|
const toReturn = {};
|
|
319
|
-
if (typeof this.
|
|
320
|
-
toReturn['
|
|
316
|
+
if (typeof this.participantId !== 'undefined') {
|
|
317
|
+
toReturn['participantId'] = this.participantId;
|
|
321
318
|
}
|
|
322
|
-
if (typeof this.
|
|
323
|
-
toReturn['
|
|
319
|
+
if (typeof this.lastSeenTime !== 'undefined' && this.lastSeenTime !== null) {
|
|
320
|
+
toReturn['lastSeenTime'] = 'toApiJson' in this.lastSeenTime ? this.lastSeenTime.toApiJson() : this.lastSeenTime;
|
|
324
321
|
}
|
|
325
322
|
return toReturn;
|
|
326
323
|
}
|
|
@@ -332,12 +329,12 @@ function enumStringToValue$7(enumRef, value) {
|
|
|
332
329
|
}
|
|
333
330
|
return enumRef[value];
|
|
334
331
|
}
|
|
335
|
-
class
|
|
332
|
+
class Message {
|
|
336
333
|
static fromProto(proto) {
|
|
337
|
-
let m = new
|
|
334
|
+
let m = new Message();
|
|
338
335
|
m = Object.assign(m, proto);
|
|
339
|
-
if (proto.
|
|
340
|
-
m.
|
|
336
|
+
if (proto.type) {
|
|
337
|
+
m.type = enumStringToValue$7(MessageType, proto.type);
|
|
341
338
|
}
|
|
342
339
|
if (proto.created) {
|
|
343
340
|
m.created = new Date(proto.created);
|
|
@@ -348,14 +345,11 @@ class Conversation {
|
|
|
348
345
|
if (proto.deleted) {
|
|
349
346
|
m.deleted = new Date(proto.deleted);
|
|
350
347
|
}
|
|
351
|
-
if (proto.
|
|
352
|
-
m.
|
|
353
|
-
}
|
|
354
|
-
if (proto.originLocation) {
|
|
355
|
-
m.originLocation = enumStringToValue$7(PlatformLocation, proto.originLocation);
|
|
348
|
+
if (proto.sendStatus) {
|
|
349
|
+
m.sendStatus = SendStatus.fromProto(proto.sendStatus);
|
|
356
350
|
}
|
|
357
|
-
if (proto.
|
|
358
|
-
m.
|
|
351
|
+
if (proto.channel) {
|
|
352
|
+
m.channel = enumStringToValue$7(ConversationChannel, proto.channel);
|
|
359
353
|
}
|
|
360
354
|
return m;
|
|
361
355
|
}
|
|
@@ -367,14 +361,26 @@ class Conversation {
|
|
|
367
361
|
}
|
|
368
362
|
toApiJson() {
|
|
369
363
|
const toReturn = {};
|
|
364
|
+
if (typeof this.messageId !== 'undefined') {
|
|
365
|
+
toReturn['messageId'] = this.messageId;
|
|
366
|
+
}
|
|
367
|
+
if (typeof this.externalMessageId !== 'undefined') {
|
|
368
|
+
toReturn['externalMessageId'] = this.externalMessageId;
|
|
369
|
+
}
|
|
370
370
|
if (typeof this.conversationId !== 'undefined') {
|
|
371
371
|
toReturn['conversationId'] = this.conversationId;
|
|
372
372
|
}
|
|
373
|
-
if (typeof this.
|
|
374
|
-
toReturn['
|
|
373
|
+
if (typeof this.participantId !== 'undefined') {
|
|
374
|
+
toReturn['participantId'] = this.participantId;
|
|
375
375
|
}
|
|
376
|
-
if (typeof this.
|
|
377
|
-
toReturn['
|
|
376
|
+
if (typeof this.type !== 'undefined') {
|
|
377
|
+
toReturn['type'] = this.type;
|
|
378
|
+
}
|
|
379
|
+
if (typeof this.body !== 'undefined') {
|
|
380
|
+
toReturn['body'] = this.body;
|
|
381
|
+
}
|
|
382
|
+
if (typeof this.error !== 'undefined') {
|
|
383
|
+
toReturn['error'] = this.error;
|
|
378
384
|
}
|
|
379
385
|
if (typeof this.created !== 'undefined' && this.created !== null) {
|
|
380
386
|
toReturn['created'] = 'toApiJson' in this.created ? this.created.toApiJson() : this.created;
|
|
@@ -385,36 +391,27 @@ class Conversation {
|
|
|
385
391
|
if (typeof this.deleted !== 'undefined' && this.deleted !== null) {
|
|
386
392
|
toReturn['deleted'] = 'toApiJson' in this.deleted ? this.deleted.toApiJson() : this.deleted;
|
|
387
393
|
}
|
|
388
|
-
if (typeof this.
|
|
389
|
-
toReturn['
|
|
390
|
-
}
|
|
391
|
-
if (typeof this.latestMsgSentTime !== 'undefined' && this.latestMsgSentTime !== null) {
|
|
392
|
-
toReturn['latestMsgSentTime'] = 'toApiJson' in this.latestMsgSentTime ? this.latestMsgSentTime.toApiJson() : this.latestMsgSentTime;
|
|
393
|
-
}
|
|
394
|
-
if (typeof this.originLocation !== 'undefined') {
|
|
395
|
-
toReturn['originLocation'] = this.originLocation;
|
|
396
|
-
}
|
|
397
|
-
if (typeof this.originLocationExternalId !== 'undefined') {
|
|
398
|
-
toReturn['originLocationExternalId'] = this.originLocationExternalId;
|
|
394
|
+
if (typeof this.media !== 'undefined') {
|
|
395
|
+
toReturn['media'] = this.media;
|
|
399
396
|
}
|
|
400
|
-
if (typeof this.
|
|
401
|
-
toReturn['
|
|
397
|
+
if (typeof this.sendStatus !== 'undefined' && this.sendStatus !== null) {
|
|
398
|
+
toReturn['sendStatus'] = 'toApiJson' in this.sendStatus ? this.sendStatus.toApiJson() : this.sendStatus;
|
|
402
399
|
}
|
|
403
|
-
if (typeof this.
|
|
404
|
-
toReturn['
|
|
400
|
+
if (typeof this.channel !== 'undefined') {
|
|
401
|
+
toReturn['channel'] = this.channel;
|
|
405
402
|
}
|
|
406
403
|
return toReturn;
|
|
407
404
|
}
|
|
408
405
|
}
|
|
409
|
-
class
|
|
406
|
+
class ParticipantMessageStatus {
|
|
410
407
|
static fromProto(proto) {
|
|
411
|
-
let m = new
|
|
408
|
+
let m = new ParticipantMessageStatus();
|
|
412
409
|
m = Object.assign(m, proto);
|
|
413
|
-
if (proto.
|
|
414
|
-
m.
|
|
410
|
+
if (proto.status) {
|
|
411
|
+
m.status = enumStringToValue$7(MessageStatus, proto.status);
|
|
415
412
|
}
|
|
416
|
-
if (proto.
|
|
417
|
-
m.
|
|
413
|
+
if (proto.updated) {
|
|
414
|
+
m.updated = new Date(proto.updated);
|
|
418
415
|
}
|
|
419
416
|
return m;
|
|
420
417
|
}
|
|
@@ -426,24 +423,30 @@ class ConversationKey {
|
|
|
426
423
|
}
|
|
427
424
|
toApiJson() {
|
|
428
425
|
const toReturn = {};
|
|
429
|
-
if (typeof this.
|
|
430
|
-
toReturn['
|
|
426
|
+
if (typeof this.participantId !== 'undefined') {
|
|
427
|
+
toReturn['participantId'] = this.participantId;
|
|
431
428
|
}
|
|
432
|
-
if (typeof this.
|
|
433
|
-
toReturn['
|
|
429
|
+
if (typeof this.messageId !== 'undefined') {
|
|
430
|
+
toReturn['messageId'] = this.messageId;
|
|
434
431
|
}
|
|
435
|
-
if (typeof this.
|
|
436
|
-
toReturn['
|
|
432
|
+
if (typeof this.status !== 'undefined') {
|
|
433
|
+
toReturn['status'] = this.status;
|
|
434
|
+
}
|
|
435
|
+
if (typeof this.updated !== 'undefined' && this.updated !== null) {
|
|
436
|
+
toReturn['updated'] = 'toApiJson' in this.updated ? this.updated.toApiJson() : this.updated;
|
|
437
437
|
}
|
|
438
438
|
return toReturn;
|
|
439
439
|
}
|
|
440
440
|
}
|
|
441
|
-
class
|
|
441
|
+
class SendStatus {
|
|
442
442
|
static fromProto(proto) {
|
|
443
|
-
let m = new
|
|
443
|
+
let m = new SendStatus();
|
|
444
444
|
m = Object.assign(m, proto);
|
|
445
|
-
if (proto.
|
|
446
|
-
m.
|
|
445
|
+
if (proto.status) {
|
|
446
|
+
m.status = enumStringToValue$7(MessageStatus, proto.status);
|
|
447
|
+
}
|
|
448
|
+
if (proto.created) {
|
|
449
|
+
m.created = new Date(proto.created);
|
|
447
450
|
}
|
|
448
451
|
return m;
|
|
449
452
|
}
|
|
@@ -455,11 +458,14 @@ class LastSeenByParticipant {
|
|
|
455
458
|
}
|
|
456
459
|
toApiJson() {
|
|
457
460
|
const toReturn = {};
|
|
458
|
-
if (typeof this.
|
|
459
|
-
toReturn['
|
|
461
|
+
if (typeof this.status !== 'undefined') {
|
|
462
|
+
toReturn['status'] = this.status;
|
|
460
463
|
}
|
|
461
|
-
if (typeof this.
|
|
462
|
-
toReturn['
|
|
464
|
+
if (typeof this.reason !== 'undefined') {
|
|
465
|
+
toReturn['reason'] = this.reason;
|
|
466
|
+
}
|
|
467
|
+
if (typeof this.created !== 'undefined' && this.created !== null) {
|
|
468
|
+
toReturn['created'] = 'toApiJson' in this.created ? this.created.toApiJson() : this.created;
|
|
463
469
|
}
|
|
464
470
|
return toReturn;
|
|
465
471
|
}
|
|
@@ -723,6 +729,9 @@ class Configuration {
|
|
|
723
729
|
if (typeof this.smsEnabled !== 'undefined') {
|
|
724
730
|
toReturn['smsEnabled'] = this.smsEnabled;
|
|
725
731
|
}
|
|
732
|
+
if (typeof this.inboxProEnabled !== 'undefined') {
|
|
733
|
+
toReturn['inboxProEnabled'] = this.inboxProEnabled;
|
|
734
|
+
}
|
|
726
735
|
return toReturn;
|
|
727
736
|
}
|
|
728
737
|
}
|
|
@@ -1374,6 +1383,49 @@ class GetMultiConversationDetailsResponseDetailedConversation {
|
|
|
1374
1383
|
return toReturn;
|
|
1375
1384
|
}
|
|
1376
1385
|
}
|
|
1386
|
+
class GetAvailableChannelsForConversationRequest {
|
|
1387
|
+
static fromProto(proto) {
|
|
1388
|
+
let m = new GetAvailableChannelsForConversationRequest();
|
|
1389
|
+
m = Object.assign(m, proto);
|
|
1390
|
+
return m;
|
|
1391
|
+
}
|
|
1392
|
+
constructor(kwargs) {
|
|
1393
|
+
if (!kwargs) {
|
|
1394
|
+
return;
|
|
1395
|
+
}
|
|
1396
|
+
Object.assign(this, kwargs);
|
|
1397
|
+
}
|
|
1398
|
+
toApiJson() {
|
|
1399
|
+
const toReturn = {};
|
|
1400
|
+
if (typeof this.conversationId !== 'undefined') {
|
|
1401
|
+
toReturn['conversationId'] = this.conversationId;
|
|
1402
|
+
}
|
|
1403
|
+
return toReturn;
|
|
1404
|
+
}
|
|
1405
|
+
}
|
|
1406
|
+
class GetAvailableChannelsForConversationResponse {
|
|
1407
|
+
static fromProto(proto) {
|
|
1408
|
+
let m = new GetAvailableChannelsForConversationResponse();
|
|
1409
|
+
m = Object.assign(m, proto);
|
|
1410
|
+
if (proto.channels) {
|
|
1411
|
+
m.channels = proto.channels.map((v) => enumStringToValue(ConversationChannel, v));
|
|
1412
|
+
}
|
|
1413
|
+
return m;
|
|
1414
|
+
}
|
|
1415
|
+
constructor(kwargs) {
|
|
1416
|
+
if (!kwargs) {
|
|
1417
|
+
return;
|
|
1418
|
+
}
|
|
1419
|
+
Object.assign(this, kwargs);
|
|
1420
|
+
}
|
|
1421
|
+
toApiJson() {
|
|
1422
|
+
const toReturn = {};
|
|
1423
|
+
if (typeof this.channels !== 'undefined') {
|
|
1424
|
+
toReturn['channels'] = this.channels;
|
|
1425
|
+
}
|
|
1426
|
+
return toReturn;
|
|
1427
|
+
}
|
|
1428
|
+
}
|
|
1377
1429
|
class GetConfigurationRequest {
|
|
1378
1430
|
static fromProto(proto) {
|
|
1379
1431
|
let m = new GetConfigurationRequest();
|
|
@@ -2526,6 +2578,9 @@ class SendMessageRequest {
|
|
|
2526
2578
|
if (proto.media) {
|
|
2527
2579
|
m.media = proto.media.map(Media.fromProto);
|
|
2528
2580
|
}
|
|
2581
|
+
if (proto.channel) {
|
|
2582
|
+
m.channel = enumStringToValue(ConversationChannel, proto.channel);
|
|
2583
|
+
}
|
|
2529
2584
|
return m;
|
|
2530
2585
|
}
|
|
2531
2586
|
constructor(kwargs) {
|
|
@@ -2560,6 +2615,9 @@ class SendMessageRequest {
|
|
|
2560
2615
|
if (typeof this.media !== 'undefined' && this.media !== null) {
|
|
2561
2616
|
toReturn['media'] = 'toApiJson' in this.media ? this.media.toApiJson() : this.media;
|
|
2562
2617
|
}
|
|
2618
|
+
if (typeof this.channel !== 'undefined') {
|
|
2619
|
+
toReturn['channel'] = this.channel;
|
|
2620
|
+
}
|
|
2563
2621
|
return toReturn;
|
|
2564
2622
|
}
|
|
2565
2623
|
}
|
|
@@ -2624,6 +2682,26 @@ class SendWidgetMessageRequest {
|
|
|
2624
2682
|
return toReturn;
|
|
2625
2683
|
}
|
|
2626
2684
|
}
|
|
2685
|
+
class SendWidgetMessageResponse {
|
|
2686
|
+
static fromProto(proto) {
|
|
2687
|
+
let m = new SendWidgetMessageResponse();
|
|
2688
|
+
m = Object.assign(m, proto);
|
|
2689
|
+
return m;
|
|
2690
|
+
}
|
|
2691
|
+
constructor(kwargs) {
|
|
2692
|
+
if (!kwargs) {
|
|
2693
|
+
return;
|
|
2694
|
+
}
|
|
2695
|
+
Object.assign(this, kwargs);
|
|
2696
|
+
}
|
|
2697
|
+
toApiJson() {
|
|
2698
|
+
const toReturn = {};
|
|
2699
|
+
if (typeof this.messageId !== 'undefined') {
|
|
2700
|
+
toReturn['messageId'] = this.messageId;
|
|
2701
|
+
}
|
|
2702
|
+
return toReturn;
|
|
2703
|
+
}
|
|
2704
|
+
}
|
|
2627
2705
|
class SetLastSeenRequest {
|
|
2628
2706
|
static fromProto(proto) {
|
|
2629
2707
|
let m = new SetLastSeenRequest();
|
|
@@ -2843,9 +2921,9 @@ class HostService {
|
|
|
2843
2921
|
return 'https://' + this.host;
|
|
2844
2922
|
}
|
|
2845
2923
|
}
|
|
2846
|
-
HostService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
2847
|
-
HostService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
|
2848
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
2924
|
+
HostService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: HostService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2925
|
+
HostService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: HostService, providedIn: 'root' });
|
|
2926
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: HostService, decorators: [{
|
|
2849
2927
|
type: Injectable,
|
|
2850
2928
|
args: [{ providedIn: 'root' }]
|
|
2851
2929
|
}] });
|
|
@@ -2985,12 +3063,18 @@ class ConversationApiService {
|
|
|
2985
3063
|
}
|
|
2986
3064
|
sendWidgetMessage(r) {
|
|
2987
3065
|
const request = (r.toApiJson) ? r : new SendWidgetMessageRequest(r);
|
|
2988
|
-
return this.http.post(this._host + "/conversation.v1.ConversationService/SendWidgetMessage", request.toApiJson(),
|
|
3066
|
+
return this.http.post(this._host + "/conversation.v1.ConversationService/SendWidgetMessage", request.toApiJson(), this.apiOptions())
|
|
3067
|
+
.pipe(map(resp => SendWidgetMessageResponse.fromProto(resp)));
|
|
2989
3068
|
}
|
|
2990
3069
|
getWidgetConversation() {
|
|
2991
3070
|
return this.http.post(this._host + "/conversation.v1.ConversationService/GetWidgetConversation", {}, this.apiOptions())
|
|
2992
3071
|
.pipe(map(resp => GetWidgetConversationResponse.fromProto(resp)));
|
|
2993
3072
|
}
|
|
3073
|
+
getAvailableChannelsForConversation(r) {
|
|
3074
|
+
const request = (r.toApiJson) ? r : new GetAvailableChannelsForConversationRequest(r);
|
|
3075
|
+
return this.http.post(this._host + "/conversation.v1.ConversationService/GetAvailableChannelsForConversation", request.toApiJson(), this.apiOptions())
|
|
3076
|
+
.pipe(map(resp => GetAvailableChannelsForConversationResponse.fromProto(resp)));
|
|
3077
|
+
}
|
|
2994
3078
|
createWidget(r) {
|
|
2995
3079
|
const request = (r.toApiJson) ? r : new CreateWidgetRequest(r);
|
|
2996
3080
|
return this.http.post(this._host + "/conversation.v1.ConversationService/CreateWidget", request.toApiJson(), this.apiOptions())
|
|
@@ -3021,9 +3105,9 @@ class ConversationApiService {
|
|
|
3021
3105
|
.pipe(map(resp => GetWidgetConfigResponse.fromProto(resp)));
|
|
3022
3106
|
}
|
|
3023
3107
|
}
|
|
3024
|
-
ConversationApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
3025
|
-
ConversationApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
|
3026
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
3108
|
+
ConversationApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ConversationApiService, deps: [{ token: i1.HttpClient }, { token: HostService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3109
|
+
ConversationApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ConversationApiService, providedIn: 'root' });
|
|
3110
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ConversationApiService, decorators: [{
|
|
3027
3111
|
type: Injectable,
|
|
3028
3112
|
args: [{ providedIn: 'root' }]
|
|
3029
3113
|
}], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: HostService }]; } });
|
|
@@ -3064,9 +3148,9 @@ class InboxApiService {
|
|
|
3064
3148
|
.pipe(map(resp => UpsertConfigurationResponse.fromProto(resp)));
|
|
3065
3149
|
}
|
|
3066
3150
|
}
|
|
3067
|
-
InboxApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
3068
|
-
InboxApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
|
3069
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
3151
|
+
InboxApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: InboxApiService, deps: [{ token: i1.HttpClient }, { token: HostService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3152
|
+
InboxApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: InboxApiService, providedIn: 'root' });
|
|
3153
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: InboxApiService, decorators: [{
|
|
3070
3154
|
type: Injectable,
|
|
3071
3155
|
args: [{ providedIn: 'root' }]
|
|
3072
3156
|
}], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: HostService }]; } });
|
|
@@ -3082,5 +3166,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
3082
3166
|
* Generated bundle index. Do not edit.
|
|
3083
3167
|
*/
|
|
3084
3168
|
|
|
3085
|
-
export { Access, AddConversationToConversationViewRequest, AddMultiParticipantsRequest, AddMultiParticipantsResponse, Address, Configuration, Conversation, ConversationApiService, ConversationChannel, ConversationKey, ConversationMessageCount, CreateConversationRequest, CreateConversationResponse, CreateMultiMessagesRequest, CreateWidgetConversationRequest, CreateWidgetConversationResponse, CreateWidgetRequest, CreateWidgetResponse, DeleteConversationRequest, DeleteMessageRequest, DeleteWidgetRequest, FieldMask, GetConfigurationRequest, GetConfigurationResponse, GetConversationByKeyRequest, GetConversationByKeyResponse, GetConversationViewsRequest, GetConversationViewsResponse, GetMessageRequest, GetMultiConfigurationRequest, GetMultiConfigurationResponse, GetMultiConversationDetailsRequest, GetMultiConversationDetailsResponse, GetMultiConversationDetailsResponseDetailedConversation, GetMultiConversationMessageCountRequest, GetMultiConversationMessageCountResponse, GetMultiConversationMessageCountResponseCountsEntry, GetMultiMessagesRequest, GetMultiMessagesResponse, GetMultiParticipantsRequest, GetMultiParticipantsResponse, GetMultiWidgetMessagesRequest, GetMultiWidgetMessagesResponse, GetParticipantsByKeyRequest, GetParticipantsByKeyResponse, GetWidgetConfigRequest, GetWidgetConfigResponse, GetWidgetConversationResponse, GetWidgetRequest, GetWidgetResponse, GlobalParticipantType, InboxApiService, LastSeenByParticipant, ListMessagesRequest, ListMessagesRequestListMessagesFilters, ListMessagesResponse, ListWidgetsRequest, ListWidgetsResponse, LookupConversationsRequest, LookupConversationsRequestLookupConversationsFilters, LookupConversationsResponse, LookupConversationsResponseConversations, Media, Message, MessageStatus, MessageType, Metadata, MetadataDataEntry, MetadataIdentifier, PagedRequestOptions, PagedResponseMetadata, Participant, ParticipantKey, ParticipantMessageStatus, ParticipantType, PlatformLocation, ReceiveMessageRequest, ReceiveMessageRequestMetadataEntry, RemoveConversationFromConversationViewRequest, SearchConversationsRequest, SearchConversationsResponse, SearchConversationsResponseDetailedConversation, SendMessageRequest, SendMessageResponse, SendStatus, SendWidgetMessageRequest, SetLastSeenRequest, SetLastSeenRequestStatus, SetLastSeenResponse, SortDirection, SubjectParticipant, UpdateMessageStatusRequest, UpdateWidgetRequest, UpdateWidgetResponse, UpsertConfigurationRequest, UpsertConfigurationResponse, View, ViewType, Widget, WidgetPosition };
|
|
3169
|
+
export { Access, AddConversationToConversationViewRequest, AddMultiParticipantsRequest, AddMultiParticipantsResponse, Address, Configuration, Conversation, ConversationApiService, ConversationChannel, ConversationKey, ConversationMessageCount, CreateConversationRequest, CreateConversationResponse, CreateMultiMessagesRequest, CreateWidgetConversationRequest, CreateWidgetConversationResponse, CreateWidgetRequest, CreateWidgetResponse, DeleteConversationRequest, DeleteMessageRequest, DeleteWidgetRequest, FieldMask, GetAvailableChannelsForConversationRequest, GetAvailableChannelsForConversationResponse, GetConfigurationRequest, GetConfigurationResponse, GetConversationByKeyRequest, GetConversationByKeyResponse, GetConversationViewsRequest, GetConversationViewsResponse, GetMessageRequest, GetMultiConfigurationRequest, GetMultiConfigurationResponse, GetMultiConversationDetailsRequest, GetMultiConversationDetailsResponse, GetMultiConversationDetailsResponseDetailedConversation, GetMultiConversationMessageCountRequest, GetMultiConversationMessageCountResponse, GetMultiConversationMessageCountResponseCountsEntry, GetMultiMessagesRequest, GetMultiMessagesResponse, GetMultiParticipantsRequest, GetMultiParticipantsResponse, GetMultiWidgetMessagesRequest, GetMultiWidgetMessagesResponse, GetParticipantsByKeyRequest, GetParticipantsByKeyResponse, GetWidgetConfigRequest, GetWidgetConfigResponse, GetWidgetConversationResponse, GetWidgetRequest, GetWidgetResponse, GlobalParticipantType, InboxApiService, LastSeenByParticipant, ListMessagesRequest, ListMessagesRequestListMessagesFilters, ListMessagesResponse, ListWidgetsRequest, ListWidgetsResponse, LookupConversationsRequest, LookupConversationsRequestLookupConversationsFilters, LookupConversationsResponse, LookupConversationsResponseConversations, Media, Message, MessageStatus, MessageType, Metadata, MetadataDataEntry, MetadataIdentifier, PagedRequestOptions, PagedResponseMetadata, Participant, ParticipantKey, ParticipantMessageStatus, ParticipantType, PlatformLocation, ReceiveMessageRequest, ReceiveMessageRequestMetadataEntry, RemoveConversationFromConversationViewRequest, SearchConversationsRequest, SearchConversationsResponse, SearchConversationsResponseDetailedConversation, SendMessageRequest, SendMessageResponse, SendStatus, SendWidgetMessageRequest, SendWidgetMessageResponse, SetLastSeenRequest, SetLastSeenRequestStatus, SetLastSeenResponse, SortDirection, SubjectParticipant, UpdateMessageStatusRequest, UpdateWidgetRequest, UpdateWidgetResponse, UpsertConfigurationRequest, UpsertConfigurationResponse, View, ViewType, Widget, WidgetPosition };
|
|
3086
3170
|
//# sourceMappingURL=vendasta-conversation.mjs.map
|