@joinskips/brand 9.0.0-develop.148 → 9.0.0-develop.149
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/chat/chat/SkipsChat.d.ts +36 -0
- package/chat/chat/SkipsChat.js +98 -0
- package/chat/chat/client.d.ts +48 -0
- package/chat/chat/client.js +173 -0
- package/chat/chat/connection.d.ts +4 -0
- package/chat/chat/connection.js +6 -0
- package/chat/chat/generated/skips-app/index.d.ts +1 -0
- package/chat/chat/generated/skips-app/index.js +2 -0
- package/chat/chat/generated/skips-app/types.gen.d.ts +733 -0
- package/chat/chat/generated/skips-app/types.gen.js +2 -0
- package/chat/chat/index.d.ts +3 -0
- package/chat/chat/index.js +2 -0
- package/chat/chat/platform.d.ts +4 -0
- package/chat/chat/platform.js +46 -0
- package/chat/chat/session.d.ts +19 -0
- package/chat/chat/session.js +95 -0
- package/chat/chat/useSkipsChat.d.ts +78 -0
- package/chat/chat/useSkipsChat.js +498 -0
- package/chat/chat/verify.d.ts +35 -0
- package/chat/chat/verify.js +84 -0
- package/chat/helpers/index.d.ts +1 -1
- package/chat/helpers/index.js +1 -1
- package/chat/helpers/message.d.ts +1 -1
- package/chat/helpers/thread.d.ts +12 -1
- package/chat/helpers/thread.js +16 -1
- package/chat/index.d.ts +1 -0
- package/chat/index.js +1 -0
- package/chat/ui/Conversation.d.ts +29 -3
- package/chat/ui/Conversation.js +37 -12
- package/chat/ui/index.d.ts +0 -1
- package/chat/ui/index.js +0 -1
- package/chat/ui/parts.d.ts +1 -1
- package/package.json +9 -1
- package/chat/ui/CheckIn.d.ts +0 -25
- package/chat/ui/CheckIn.js +0 -24
|
@@ -0,0 +1,733 @@
|
|
|
1
|
+
export type ClientOptions = {
|
|
2
|
+
baseUrl: string;
|
|
3
|
+
};
|
|
4
|
+
export type PublicContact = {
|
|
5
|
+
/**
|
|
6
|
+
* Id of the contact
|
|
7
|
+
*/
|
|
8
|
+
id?: number;
|
|
9
|
+
/**
|
|
10
|
+
* The session identifier of the contact
|
|
11
|
+
*/
|
|
12
|
+
source_id?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Name of the contact when available
|
|
15
|
+
*/
|
|
16
|
+
name?: string | null;
|
|
17
|
+
/**
|
|
18
|
+
* Email of the contact
|
|
19
|
+
*/
|
|
20
|
+
email?: string | null;
|
|
21
|
+
/**
|
|
22
|
+
* Phone number of the contact
|
|
23
|
+
*/
|
|
24
|
+
phone_number?: string | null;
|
|
25
|
+
/**
|
|
26
|
+
* The token to be used to connect to skips websocket
|
|
27
|
+
*/
|
|
28
|
+
pubsub_token?: string;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Full serialized contact record returned when the public API renders a Contact model directly.
|
|
32
|
+
*/
|
|
33
|
+
export type PublicContactRecord = {
|
|
34
|
+
/**
|
|
35
|
+
* Id of the contact
|
|
36
|
+
*/
|
|
37
|
+
id?: number;
|
|
38
|
+
/**
|
|
39
|
+
* Name of the contact when available
|
|
40
|
+
*/
|
|
41
|
+
name?: string | null;
|
|
42
|
+
/**
|
|
43
|
+
* Email of the contact
|
|
44
|
+
*/
|
|
45
|
+
email?: string | null;
|
|
46
|
+
/**
|
|
47
|
+
* Phone number of the contact
|
|
48
|
+
*/
|
|
49
|
+
phone_number?: string | null;
|
|
50
|
+
/**
|
|
51
|
+
* Identifier of the contact
|
|
52
|
+
*/
|
|
53
|
+
identifier?: string | null;
|
|
54
|
+
/**
|
|
55
|
+
* Whether the contact is blocked
|
|
56
|
+
*/
|
|
57
|
+
blocked?: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Additional attributes of the contact when present
|
|
60
|
+
*/
|
|
61
|
+
additional_attributes?: {
|
|
62
|
+
[key: string]: unknown;
|
|
63
|
+
} | null;
|
|
64
|
+
/**
|
|
65
|
+
* Custom attributes of the contact when present
|
|
66
|
+
*/
|
|
67
|
+
custom_attributes?: {
|
|
68
|
+
[key: string]: unknown;
|
|
69
|
+
} | null;
|
|
70
|
+
/**
|
|
71
|
+
* Contact type of the contact when available
|
|
72
|
+
*/
|
|
73
|
+
contact_type?: string | null;
|
|
74
|
+
/**
|
|
75
|
+
* Country code of the contact
|
|
76
|
+
*/
|
|
77
|
+
country_code?: string | null;
|
|
78
|
+
/**
|
|
79
|
+
* Last activity timestamp of the contact in ISO 8601 format
|
|
80
|
+
*/
|
|
81
|
+
last_activity_at?: string | null;
|
|
82
|
+
/**
|
|
83
|
+
* Created timestamp of the contact in ISO 8601 format
|
|
84
|
+
*/
|
|
85
|
+
created_at?: string | null;
|
|
86
|
+
/**
|
|
87
|
+
* Updated timestamp of the contact in ISO 8601 format
|
|
88
|
+
*/
|
|
89
|
+
updated_at?: string | null;
|
|
90
|
+
/**
|
|
91
|
+
* Last name of the contact
|
|
92
|
+
*/
|
|
93
|
+
last_name?: string | null;
|
|
94
|
+
/**
|
|
95
|
+
* Middle name of the contact
|
|
96
|
+
*/
|
|
97
|
+
middle_name?: string | null;
|
|
98
|
+
/**
|
|
99
|
+
* Location of the contact
|
|
100
|
+
*/
|
|
101
|
+
location?: string | null;
|
|
102
|
+
/**
|
|
103
|
+
* Account id of the contact
|
|
104
|
+
*/
|
|
105
|
+
account_id?: number;
|
|
106
|
+
/**
|
|
107
|
+
* Company id of the contact
|
|
108
|
+
*/
|
|
109
|
+
company_id?: number | null;
|
|
110
|
+
/**
|
|
111
|
+
* Labels applied to the contact
|
|
112
|
+
*/
|
|
113
|
+
label_list?: Array<string>;
|
|
114
|
+
[key: string]: unknown;
|
|
115
|
+
};
|
|
116
|
+
export type PublicConversation = {
|
|
117
|
+
/**
|
|
118
|
+
* Id of the conversation
|
|
119
|
+
*/
|
|
120
|
+
id?: number;
|
|
121
|
+
/**
|
|
122
|
+
* UUID of the conversation
|
|
123
|
+
*/
|
|
124
|
+
uuid?: string;
|
|
125
|
+
/**
|
|
126
|
+
* The inbox id of the conversation
|
|
127
|
+
*/
|
|
128
|
+
inbox_id?: number;
|
|
129
|
+
/**
|
|
130
|
+
* Timestamp of when the contact last seen the conversation (Unix timestamp)
|
|
131
|
+
*/
|
|
132
|
+
contact_last_seen_at?: number;
|
|
133
|
+
/**
|
|
134
|
+
* The status of the conversation
|
|
135
|
+
*/
|
|
136
|
+
status?: 'open' | 'resolved' | 'pending' | 'snoozed';
|
|
137
|
+
/**
|
|
138
|
+
* Timestamp of when the agent last seen the conversation (Unix timestamp)
|
|
139
|
+
*/
|
|
140
|
+
agent_last_seen_at?: number;
|
|
141
|
+
/**
|
|
142
|
+
* Messages in the conversation
|
|
143
|
+
*/
|
|
144
|
+
messages?: Array<PublicMessage>;
|
|
145
|
+
contact?: PublicContactRecord;
|
|
146
|
+
};
|
|
147
|
+
export type PublicMessage = {
|
|
148
|
+
/**
|
|
149
|
+
* Id of the message
|
|
150
|
+
*/
|
|
151
|
+
id?: number;
|
|
152
|
+
/**
|
|
153
|
+
* Text content of the message. Can be null for attachment-only messages.
|
|
154
|
+
*/
|
|
155
|
+
content?: string | null;
|
|
156
|
+
/**
|
|
157
|
+
* Denotes the message type. Possible values: 0 (incoming), 1 (outgoing), 2 (activity), 3 (template)
|
|
158
|
+
*/
|
|
159
|
+
message_type?: number;
|
|
160
|
+
/**
|
|
161
|
+
* Content type of the message
|
|
162
|
+
*/
|
|
163
|
+
content_type?: string;
|
|
164
|
+
/**
|
|
165
|
+
* Additional content attributes of the message
|
|
166
|
+
*/
|
|
167
|
+
content_attributes?: {
|
|
168
|
+
[key: string]: unknown;
|
|
169
|
+
};
|
|
170
|
+
/**
|
|
171
|
+
* Created at Unix timestamp of the message
|
|
172
|
+
*/
|
|
173
|
+
created_at?: number;
|
|
174
|
+
/**
|
|
175
|
+
* Display Id of the conversation the message belongs to
|
|
176
|
+
*/
|
|
177
|
+
conversation_id?: number;
|
|
178
|
+
/**
|
|
179
|
+
* Attachments if any
|
|
180
|
+
*/
|
|
181
|
+
attachments?: Array<PublicMessageAttachment>;
|
|
182
|
+
sender?: PublicMessageSender;
|
|
183
|
+
};
|
|
184
|
+
/**
|
|
185
|
+
* Attachment payload. Available fields vary by attachment file_type.
|
|
186
|
+
*/
|
|
187
|
+
export type PublicMessageAttachment = {
|
|
188
|
+
/**
|
|
189
|
+
* Id of the attachment
|
|
190
|
+
*/
|
|
191
|
+
id?: number;
|
|
192
|
+
/**
|
|
193
|
+
* Id of the parent message
|
|
194
|
+
*/
|
|
195
|
+
message_id?: number;
|
|
196
|
+
/**
|
|
197
|
+
* Type of the attached file
|
|
198
|
+
*/
|
|
199
|
+
file_type?: 'image' | 'audio' | 'video' | 'file' | 'location' | 'fallback' | 'share' | 'story_mention' | 'contact' | 'ig_reel' | 'ig_post' | 'ig_story' | 'embed';
|
|
200
|
+
/**
|
|
201
|
+
* Id of the account
|
|
202
|
+
*/
|
|
203
|
+
account_id?: number;
|
|
204
|
+
/**
|
|
205
|
+
* File extension
|
|
206
|
+
*/
|
|
207
|
+
extension?: string | null;
|
|
208
|
+
/**
|
|
209
|
+
* URL of the file. Can be null when an attachment variant has no external URL.
|
|
210
|
+
*/
|
|
211
|
+
data_url?: string | null;
|
|
212
|
+
/**
|
|
213
|
+
* URL of the file thumbnail
|
|
214
|
+
*/
|
|
215
|
+
thumb_url?: string;
|
|
216
|
+
/**
|
|
217
|
+
* File size in bytes
|
|
218
|
+
*/
|
|
219
|
+
file_size?: number;
|
|
220
|
+
/**
|
|
221
|
+
* Width of the attachment when available
|
|
222
|
+
*/
|
|
223
|
+
width?: number | null;
|
|
224
|
+
/**
|
|
225
|
+
* Height of the attachment when available
|
|
226
|
+
*/
|
|
227
|
+
height?: number | null;
|
|
228
|
+
/**
|
|
229
|
+
* Latitude for location attachments
|
|
230
|
+
*/
|
|
231
|
+
coordinates_lat?: number;
|
|
232
|
+
/**
|
|
233
|
+
* Longitude for location attachments
|
|
234
|
+
*/
|
|
235
|
+
coordinates_long?: number;
|
|
236
|
+
/**
|
|
237
|
+
* Fallback title for location, fallback, and contact attachments when available
|
|
238
|
+
*/
|
|
239
|
+
fallback_title?: string | null;
|
|
240
|
+
/**
|
|
241
|
+
* Metadata for contact attachments
|
|
242
|
+
*/
|
|
243
|
+
meta?: {
|
|
244
|
+
[key: string]: unknown;
|
|
245
|
+
};
|
|
246
|
+
/**
|
|
247
|
+
* Transcribed text for audio attachments
|
|
248
|
+
*/
|
|
249
|
+
transcribed_text?: string;
|
|
250
|
+
[key: string]: unknown;
|
|
251
|
+
};
|
|
252
|
+
/**
|
|
253
|
+
* Polymorphic sender payload returned by push_event_data. Available fields vary by sender type.
|
|
254
|
+
*/
|
|
255
|
+
export type PublicMessageSender = {
|
|
256
|
+
/**
|
|
257
|
+
* Id of the sender
|
|
258
|
+
*/
|
|
259
|
+
id?: number;
|
|
260
|
+
/**
|
|
261
|
+
* Name of the sender when available
|
|
262
|
+
*/
|
|
263
|
+
name?: string | null;
|
|
264
|
+
/**
|
|
265
|
+
* Avatar URL of the sender. Present for senders of type user, agent_bot, and captain_assistant. Not present for contact senders (use thumbnail instead).
|
|
266
|
+
*/
|
|
267
|
+
avatar_url?: string;
|
|
268
|
+
/**
|
|
269
|
+
* Avatar/thumbnail URL of the sender. Contact senders use this field; user senders may also include it.
|
|
270
|
+
*/
|
|
271
|
+
thumbnail?: string;
|
|
272
|
+
/**
|
|
273
|
+
* Type of the sender
|
|
274
|
+
*/
|
|
275
|
+
type?: 'contact' | 'user' | 'agent_bot' | 'captain_assistant';
|
|
276
|
+
/**
|
|
277
|
+
* Display name for user senders
|
|
278
|
+
*/
|
|
279
|
+
available_name?: string | null;
|
|
280
|
+
/**
|
|
281
|
+
* Availability status for user senders
|
|
282
|
+
*/
|
|
283
|
+
availability_status?: string | null;
|
|
284
|
+
/**
|
|
285
|
+
* Email of the sender when the sender is a contact
|
|
286
|
+
*/
|
|
287
|
+
email?: string | null;
|
|
288
|
+
/**
|
|
289
|
+
* Phone number of the sender when the sender is a contact
|
|
290
|
+
*/
|
|
291
|
+
phone_number?: string | null;
|
|
292
|
+
/**
|
|
293
|
+
* Identifier of the sender when the sender is a contact
|
|
294
|
+
*/
|
|
295
|
+
identifier?: string | null;
|
|
296
|
+
/**
|
|
297
|
+
* Whether the sender is blocked when the sender is a contact
|
|
298
|
+
*/
|
|
299
|
+
blocked?: boolean;
|
|
300
|
+
/**
|
|
301
|
+
* Additional attributes when the sender is a contact and available
|
|
302
|
+
*/
|
|
303
|
+
additional_attributes?: {
|
|
304
|
+
[key: string]: unknown;
|
|
305
|
+
} | null;
|
|
306
|
+
/**
|
|
307
|
+
* Custom attributes when the sender is a contact and available
|
|
308
|
+
*/
|
|
309
|
+
custom_attributes?: {
|
|
310
|
+
[key: string]: unknown;
|
|
311
|
+
} | null;
|
|
312
|
+
/**
|
|
313
|
+
* Description when the sender is a captain assistant
|
|
314
|
+
*/
|
|
315
|
+
description?: string | null;
|
|
316
|
+
/**
|
|
317
|
+
* Created timestamp in ISO 8601 format when the sender is a captain assistant
|
|
318
|
+
*/
|
|
319
|
+
created_at?: string | null;
|
|
320
|
+
[key: string]: unknown;
|
|
321
|
+
};
|
|
322
|
+
export type PublicInbox = {
|
|
323
|
+
/**
|
|
324
|
+
* Inbox identifier
|
|
325
|
+
*/
|
|
326
|
+
identifier?: string;
|
|
327
|
+
/**
|
|
328
|
+
* Name of the inbox
|
|
329
|
+
*/
|
|
330
|
+
name?: string;
|
|
331
|
+
/**
|
|
332
|
+
* The timezone defined on the inbox
|
|
333
|
+
*/
|
|
334
|
+
timezone?: string;
|
|
335
|
+
/**
|
|
336
|
+
* The working hours defined on the inbox
|
|
337
|
+
*/
|
|
338
|
+
working_hours?: Array<{
|
|
339
|
+
/**
|
|
340
|
+
* Day of the week as a number. Sunday -> 0, Saturday -> 6
|
|
341
|
+
*/
|
|
342
|
+
day_of_week?: number;
|
|
343
|
+
/**
|
|
344
|
+
* Whether or not the business is open the whole day
|
|
345
|
+
*/
|
|
346
|
+
open_all_day?: boolean;
|
|
347
|
+
/**
|
|
348
|
+
* Whether or not the business is closed the whole day
|
|
349
|
+
*/
|
|
350
|
+
closed_all_day?: boolean;
|
|
351
|
+
/**
|
|
352
|
+
* Opening hour. Can be null if closed all day
|
|
353
|
+
*/
|
|
354
|
+
open_hour?: number;
|
|
355
|
+
/**
|
|
356
|
+
* Opening minute. Can be null if closed all day
|
|
357
|
+
*/
|
|
358
|
+
open_minutes?: number;
|
|
359
|
+
/**
|
|
360
|
+
* Closing hour. Can be null if closed all day
|
|
361
|
+
*/
|
|
362
|
+
close_hour?: number;
|
|
363
|
+
/**
|
|
364
|
+
* Closing minute. Can be null if closed all day
|
|
365
|
+
*/
|
|
366
|
+
close_minutes?: number;
|
|
367
|
+
}>;
|
|
368
|
+
/**
|
|
369
|
+
* Whether of not the working hours are enabled on the inbox
|
|
370
|
+
*/
|
|
371
|
+
working_hours_enabled?: boolean;
|
|
372
|
+
/**
|
|
373
|
+
* Whether of not the Customer Satisfaction survey is enabled on the inbox
|
|
374
|
+
*/
|
|
375
|
+
csat_survey_enabled?: boolean;
|
|
376
|
+
/**
|
|
377
|
+
* Whether of not the Greeting Message is enabled on the inbox
|
|
378
|
+
*/
|
|
379
|
+
greeting_enabled?: boolean;
|
|
380
|
+
/**
|
|
381
|
+
* Whether of not the User Identity Validation is enforced on the inbox
|
|
382
|
+
*/
|
|
383
|
+
identity_validation_enabled?: boolean;
|
|
384
|
+
};
|
|
385
|
+
export type PublicContactCreateUpdatePayload = {
|
|
386
|
+
/**
|
|
387
|
+
* External identifier of the contact
|
|
388
|
+
*/
|
|
389
|
+
identifier?: string;
|
|
390
|
+
/**
|
|
391
|
+
* Identifier hash prepared for HMAC authentication
|
|
392
|
+
*/
|
|
393
|
+
identifier_hash?: string;
|
|
394
|
+
/**
|
|
395
|
+
* Email of the contact
|
|
396
|
+
*/
|
|
397
|
+
email?: string;
|
|
398
|
+
/**
|
|
399
|
+
* Name of the contact
|
|
400
|
+
*/
|
|
401
|
+
name?: string;
|
|
402
|
+
/**
|
|
403
|
+
* Phone number of the contact
|
|
404
|
+
*/
|
|
405
|
+
phone_number?: string;
|
|
406
|
+
/**
|
|
407
|
+
* Send the form data with the avatar image binary or use the avatar_url
|
|
408
|
+
*/
|
|
409
|
+
avatar?: Blob | File;
|
|
410
|
+
/**
|
|
411
|
+
* Custom attributes of the customer
|
|
412
|
+
*/
|
|
413
|
+
custom_attributes?: {
|
|
414
|
+
[key: string]: unknown;
|
|
415
|
+
};
|
|
416
|
+
};
|
|
417
|
+
export type PublicMessageCreatePayload = {
|
|
418
|
+
/**
|
|
419
|
+
* Content for the message
|
|
420
|
+
*/
|
|
421
|
+
content?: string;
|
|
422
|
+
/**
|
|
423
|
+
* Temporary identifier which will be passed back via websockets
|
|
424
|
+
*/
|
|
425
|
+
echo_id?: string;
|
|
426
|
+
};
|
|
427
|
+
export type PublicMessageUpdatePayload = {
|
|
428
|
+
/**
|
|
429
|
+
* Replies to the Bot Message Types: the values chosen or entered in an input_select or form message, or the answer to an input_csat message
|
|
430
|
+
*/
|
|
431
|
+
submitted_values?: Array<{
|
|
432
|
+
/**
|
|
433
|
+
* The name of the submitted value
|
|
434
|
+
*/
|
|
435
|
+
name?: string;
|
|
436
|
+
/**
|
|
437
|
+
* The title of the submitted value
|
|
438
|
+
*/
|
|
439
|
+
title?: string;
|
|
440
|
+
/**
|
|
441
|
+
* The value of the submitted value
|
|
442
|
+
*/
|
|
443
|
+
value?: string;
|
|
444
|
+
}> | {
|
|
445
|
+
/**
|
|
446
|
+
* The CSAT survey response
|
|
447
|
+
*/
|
|
448
|
+
csat_survey_response?: {
|
|
449
|
+
/**
|
|
450
|
+
* The feedback message of the CSAT survey response
|
|
451
|
+
*/
|
|
452
|
+
feedback_message?: string;
|
|
453
|
+
/**
|
|
454
|
+
* The rating of the CSAT survey response
|
|
455
|
+
*/
|
|
456
|
+
rating?: number;
|
|
457
|
+
};
|
|
458
|
+
};
|
|
459
|
+
};
|
|
460
|
+
export type PublicConversationCreatePayload = {
|
|
461
|
+
/**
|
|
462
|
+
* The page the conversation started on, which the care team sees as where it began
|
|
463
|
+
*/
|
|
464
|
+
referer_url?: string;
|
|
465
|
+
/**
|
|
466
|
+
* Custom attributes of the conversation
|
|
467
|
+
*/
|
|
468
|
+
custom_attributes?: {
|
|
469
|
+
[key: string]: unknown;
|
|
470
|
+
};
|
|
471
|
+
};
|
|
472
|
+
/**
|
|
473
|
+
* data
|
|
474
|
+
*/
|
|
475
|
+
export type BadRequestError = {
|
|
476
|
+
description?: string;
|
|
477
|
+
errors?: Array<RequestError>;
|
|
478
|
+
};
|
|
479
|
+
export type RequestError = {
|
|
480
|
+
field?: string;
|
|
481
|
+
message?: string;
|
|
482
|
+
code?: string;
|
|
483
|
+
};
|
|
484
|
+
/**
|
|
485
|
+
* The numeric ID of the account
|
|
486
|
+
*/
|
|
487
|
+
export type AccountId = number;
|
|
488
|
+
/**
|
|
489
|
+
* The ID of the agentbot to be updated
|
|
490
|
+
*/
|
|
491
|
+
export type AgentBotId = number;
|
|
492
|
+
/**
|
|
493
|
+
* The ID of the team to be updated
|
|
494
|
+
*/
|
|
495
|
+
export type TeamId = number;
|
|
496
|
+
/**
|
|
497
|
+
* The ID of the Inbox
|
|
498
|
+
*/
|
|
499
|
+
export type InboxId = number;
|
|
500
|
+
/**
|
|
501
|
+
* The numeric ID of the integration hook
|
|
502
|
+
*/
|
|
503
|
+
export type HookId = number;
|
|
504
|
+
/**
|
|
505
|
+
* Id of the session for which the conversation is created.
|
|
506
|
+
*
|
|
507
|
+
*
|
|
508
|
+
*
|
|
509
|
+
* Source Ids can be obtained through contactable inboxes API or via generated.<br/><br/>Website: Skips generated string which can be obtained from webhook events. <br/> Phone Channels(Twilio): Phone number in e164 format <br/> Email Channels: Contact Email address <br/> API Channel: Any Random String
|
|
510
|
+
*/
|
|
511
|
+
export type SourceId = string;
|
|
512
|
+
/**
|
|
513
|
+
* The attribute by which list should be sorted
|
|
514
|
+
*/
|
|
515
|
+
export type ContactSortParam = 'name' | 'email' | 'phone_number' | 'last_activity_at' | '-name' | '-email' | '-phone_number' | '-last_activity_at';
|
|
516
|
+
/**
|
|
517
|
+
* The numeric ID of the conversation
|
|
518
|
+
*/
|
|
519
|
+
export type ConversationId = number;
|
|
520
|
+
/**
|
|
521
|
+
* The uuid of the conversation
|
|
522
|
+
*/
|
|
523
|
+
export type ConversationUuid = number;
|
|
524
|
+
/**
|
|
525
|
+
* The numeric ID of the custom filter
|
|
526
|
+
*/
|
|
527
|
+
export type CustomFilterId = number;
|
|
528
|
+
/**
|
|
529
|
+
* The numeric ID of the webhook
|
|
530
|
+
*/
|
|
531
|
+
export type WebhookId = number;
|
|
532
|
+
/**
|
|
533
|
+
* The numeric ID of the message
|
|
534
|
+
*/
|
|
535
|
+
export type MessageId = number;
|
|
536
|
+
/**
|
|
537
|
+
* The page parameter
|
|
538
|
+
*/
|
|
539
|
+
export type Page = number;
|
|
540
|
+
/**
|
|
541
|
+
* The numeric ID of the user on the platform
|
|
542
|
+
*/
|
|
543
|
+
export type PlatformUserId = number;
|
|
544
|
+
/**
|
|
545
|
+
* Type of report
|
|
546
|
+
*/
|
|
547
|
+
export type ReportType = 'account' | 'agent' | 'inbox' | 'label' | 'team';
|
|
548
|
+
/**
|
|
549
|
+
* The type of metric
|
|
550
|
+
*/
|
|
551
|
+
export type ReportMetric = 'conversations_count' | 'incoming_messages_count' | 'outgoing_messages_count' | 'avg_first_response_time' | 'avg_resolution_time' | 'resolutions_count';
|
|
552
|
+
/**
|
|
553
|
+
* The identifier obtained from API inbox channel
|
|
554
|
+
*/
|
|
555
|
+
export type PublicInboxIdentifier = string;
|
|
556
|
+
/**
|
|
557
|
+
* The source id of contact obtained on contact create
|
|
558
|
+
*/
|
|
559
|
+
export type PublicContactIdentifier = string;
|
|
560
|
+
/**
|
|
561
|
+
* The slug of the portal. The numeric portal ID is not accepted.
|
|
562
|
+
*/
|
|
563
|
+
export type PortalSlug = string;
|
|
564
|
+
export type CreateAContactData = {
|
|
565
|
+
body: PublicContactCreateUpdatePayload;
|
|
566
|
+
path: {
|
|
567
|
+
/**
|
|
568
|
+
* The identifier obtained from API inbox channel
|
|
569
|
+
*/
|
|
570
|
+
inbox_identifier: string;
|
|
571
|
+
};
|
|
572
|
+
query?: never;
|
|
573
|
+
url: '/public/api/v1/inboxes/{inbox_identifier}/contacts';
|
|
574
|
+
};
|
|
575
|
+
export type CreateAContactErrors = {
|
|
576
|
+
/**
|
|
577
|
+
* Unauthorized
|
|
578
|
+
*/
|
|
579
|
+
401: BadRequestError;
|
|
580
|
+
};
|
|
581
|
+
export type CreateAContactError = CreateAContactErrors[keyof CreateAContactErrors];
|
|
582
|
+
export type CreateAContactResponses = {
|
|
583
|
+
/**
|
|
584
|
+
* Success
|
|
585
|
+
*/
|
|
586
|
+
200: PublicContact;
|
|
587
|
+
};
|
|
588
|
+
export type CreateAContactResponse = CreateAContactResponses[keyof CreateAContactResponses];
|
|
589
|
+
export type CreateAConversationData = {
|
|
590
|
+
body: PublicConversationCreatePayload;
|
|
591
|
+
path: {
|
|
592
|
+
/**
|
|
593
|
+
* The identifier obtained from API inbox channel
|
|
594
|
+
*/
|
|
595
|
+
inbox_identifier: string;
|
|
596
|
+
/**
|
|
597
|
+
* The source id of contact obtained on contact create
|
|
598
|
+
*/
|
|
599
|
+
contact_identifier: string;
|
|
600
|
+
};
|
|
601
|
+
query?: never;
|
|
602
|
+
url: '/public/api/v1/inboxes/{inbox_identifier}/contacts/{contact_identifier}/conversations';
|
|
603
|
+
};
|
|
604
|
+
export type CreateAConversationErrors = {
|
|
605
|
+
/**
|
|
606
|
+
* Unauthorized
|
|
607
|
+
*/
|
|
608
|
+
401: BadRequestError;
|
|
609
|
+
};
|
|
610
|
+
export type CreateAConversationError = CreateAConversationErrors[keyof CreateAConversationErrors];
|
|
611
|
+
export type CreateAConversationResponses = {
|
|
612
|
+
/**
|
|
613
|
+
* Success
|
|
614
|
+
*/
|
|
615
|
+
200: PublicConversation;
|
|
616
|
+
};
|
|
617
|
+
export type CreateAConversationResponse = CreateAConversationResponses[keyof CreateAConversationResponses];
|
|
618
|
+
export type ToggleTypingStatusData = {
|
|
619
|
+
body: {
|
|
620
|
+
/**
|
|
621
|
+
* The typing status to set
|
|
622
|
+
*/
|
|
623
|
+
typing_status?: 'on' | 'off';
|
|
624
|
+
};
|
|
625
|
+
path: {
|
|
626
|
+
/**
|
|
627
|
+
* The identifier obtained from API inbox channel
|
|
628
|
+
*/
|
|
629
|
+
inbox_identifier: string;
|
|
630
|
+
/**
|
|
631
|
+
* The source id of contact obtained on contact create
|
|
632
|
+
*/
|
|
633
|
+
contact_identifier: string;
|
|
634
|
+
/**
|
|
635
|
+
* The numeric ID of the conversation
|
|
636
|
+
*/
|
|
637
|
+
conversation_id: number;
|
|
638
|
+
};
|
|
639
|
+
query: {
|
|
640
|
+
/**
|
|
641
|
+
* Typing status, either 'on' or 'off'
|
|
642
|
+
*/
|
|
643
|
+
typing_status: string;
|
|
644
|
+
};
|
|
645
|
+
url: '/public/api/v1/inboxes/{inbox_identifier}/contacts/{contact_identifier}/conversations/{conversation_id}/toggle_typing';
|
|
646
|
+
};
|
|
647
|
+
export type ToggleTypingStatusErrors = {
|
|
648
|
+
/**
|
|
649
|
+
* Unauthorized
|
|
650
|
+
*/
|
|
651
|
+
401: BadRequestError;
|
|
652
|
+
/**
|
|
653
|
+
* Conversation not found
|
|
654
|
+
*/
|
|
655
|
+
404: BadRequestError;
|
|
656
|
+
};
|
|
657
|
+
export type ToggleTypingStatusError = ToggleTypingStatusErrors[keyof ToggleTypingStatusErrors];
|
|
658
|
+
export type ToggleTypingStatusResponses = {
|
|
659
|
+
/**
|
|
660
|
+
* Typing status toggled successfully
|
|
661
|
+
*/
|
|
662
|
+
200: unknown;
|
|
663
|
+
};
|
|
664
|
+
export type CreateAMessageData = {
|
|
665
|
+
body: PublicMessageCreatePayload;
|
|
666
|
+
path: {
|
|
667
|
+
/**
|
|
668
|
+
* The identifier obtained from API inbox channel
|
|
669
|
+
*/
|
|
670
|
+
inbox_identifier: string;
|
|
671
|
+
/**
|
|
672
|
+
* The source id of contact obtained on contact create
|
|
673
|
+
*/
|
|
674
|
+
contact_identifier: string;
|
|
675
|
+
/**
|
|
676
|
+
* The numeric ID of the conversation
|
|
677
|
+
*/
|
|
678
|
+
conversation_id: number;
|
|
679
|
+
};
|
|
680
|
+
query?: never;
|
|
681
|
+
url: '/public/api/v1/inboxes/{inbox_identifier}/contacts/{contact_identifier}/conversations/{conversation_id}/messages';
|
|
682
|
+
};
|
|
683
|
+
export type CreateAMessageErrors = {
|
|
684
|
+
/**
|
|
685
|
+
* Unauthorized
|
|
686
|
+
*/
|
|
687
|
+
401: BadRequestError;
|
|
688
|
+
};
|
|
689
|
+
export type CreateAMessageError = CreateAMessageErrors[keyof CreateAMessageErrors];
|
|
690
|
+
export type CreateAMessageResponses = {
|
|
691
|
+
/**
|
|
692
|
+
* Success
|
|
693
|
+
*/
|
|
694
|
+
200: PublicMessage;
|
|
695
|
+
};
|
|
696
|
+
export type CreateAMessageResponse = CreateAMessageResponses[keyof CreateAMessageResponses];
|
|
697
|
+
export type UpdateAMessageData = {
|
|
698
|
+
body: PublicMessageUpdatePayload;
|
|
699
|
+
path: {
|
|
700
|
+
/**
|
|
701
|
+
* The identifier obtained from API inbox channel
|
|
702
|
+
*/
|
|
703
|
+
inbox_identifier: string;
|
|
704
|
+
/**
|
|
705
|
+
* The source id of contact obtained on contact create
|
|
706
|
+
*/
|
|
707
|
+
contact_identifier: string;
|
|
708
|
+
/**
|
|
709
|
+
* The numeric ID of the conversation
|
|
710
|
+
*/
|
|
711
|
+
conversation_id: number;
|
|
712
|
+
/**
|
|
713
|
+
* The numeric ID of the message
|
|
714
|
+
*/
|
|
715
|
+
message_id: number;
|
|
716
|
+
};
|
|
717
|
+
query?: never;
|
|
718
|
+
url: '/public/api/v1/inboxes/{inbox_identifier}/contacts/{contact_identifier}/conversations/{conversation_id}/messages/{message_id}';
|
|
719
|
+
};
|
|
720
|
+
export type UpdateAMessageErrors = {
|
|
721
|
+
/**
|
|
722
|
+
* Unauthorized
|
|
723
|
+
*/
|
|
724
|
+
401: BadRequestError;
|
|
725
|
+
};
|
|
726
|
+
export type UpdateAMessageError = UpdateAMessageErrors[keyof UpdateAMessageErrors];
|
|
727
|
+
export type UpdateAMessageResponses = {
|
|
728
|
+
/**
|
|
729
|
+
* Success
|
|
730
|
+
*/
|
|
731
|
+
200: PublicMessage;
|
|
732
|
+
};
|
|
733
|
+
export type UpdateAMessageResponse = UpdateAMessageResponses[keyof UpdateAMessageResponses];
|