@roarkanalytics/sdk 7.6.0 → 7.8.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/CHANGELOG.md +24 -0
- package/client.d.mts +3 -0
- package/client.d.mts.map +1 -1
- package/client.d.ts +3 -0
- package/client.d.ts.map +1 -1
- package/client.js +3 -0
- package/client.js.map +1 -1
- package/client.mjs +3 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/call.d.mts +8 -0
- package/resources/call.d.mts.map +1 -1
- package/resources/call.d.ts +8 -0
- package/resources/call.d.ts.map +1 -1
- package/resources/config.d.mts +1 -0
- package/resources/config.d.mts.map +1 -1
- package/resources/config.d.ts +1 -0
- package/resources/config.d.ts.map +1 -1
- package/resources/customer-flow.d.mts +17 -0
- package/resources/customer-flow.d.mts.map +1 -1
- package/resources/customer-flow.d.ts +17 -0
- package/resources/customer-flow.d.ts.map +1 -1
- package/resources/customer-profile.d.mts +806 -0
- package/resources/customer-profile.d.mts.map +1 -0
- package/resources/customer-profile.d.ts +806 -0
- package/resources/customer-profile.d.ts.map +1 -0
- package/resources/customer-profile.js +141 -0
- package/resources/customer-profile.js.map +1 -0
- package/resources/customer-profile.mjs +137 -0
- package/resources/customer-profile.mjs.map +1 -0
- package/resources/index.d.mts +1 -0
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -0
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -0
- package/resources/index.mjs.map +1 -1
- package/src/client.ts +37 -0
- package/src/resources/call.ts +12 -0
- package/src/resources/config.ts +2 -0
- package/src/resources/customer-flow.ts +28 -0
- package/src/resources/customer-profile.ts +1311 -0
- package/src/resources/index.ts +17 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -0,0 +1,1311 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../core/resource';
|
|
4
|
+
import { APIPromise } from '../core/api-promise';
|
|
5
|
+
import { RequestOptions } from '../internal/request-options';
|
|
6
|
+
import { path } from '../internal/utils/path';
|
|
7
|
+
|
|
8
|
+
export class CustomerProfile extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Returns the people who have talked to your agents in this project. Customers we
|
|
11
|
+
* hold nothing about beyond their identifier are left out unless includeNoData is
|
|
12
|
+
* true.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* const customerProfiles =
|
|
17
|
+
* await client.customerProfile.list();
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
list(
|
|
21
|
+
query: CustomerProfileListParams | null | undefined = {},
|
|
22
|
+
options?: RequestOptions,
|
|
23
|
+
): APIPromise<CustomerProfileListResponse> {
|
|
24
|
+
return this._client.get('/v1/customer-profile', { query, ...options });
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Permanently removes the profile, its fields, evidence and notes. Conversations
|
|
29
|
+
* are kept. A new conversation from the same identifier creates a new profile.
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```ts
|
|
33
|
+
* const customerProfile = await client.customerProfile.delete(
|
|
34
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
35
|
+
* );
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
delete(customerProfileID: string, options?: RequestOptions): APIPromise<CustomerProfileDeleteResponse> {
|
|
39
|
+
return this._client.delete(path`/v1/customer-profile/${customerProfileID}`, options);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Removes the value and any lock, so a later conversation can fill it again.
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* ```ts
|
|
47
|
+
* const response =
|
|
48
|
+
* await client.customerProfile.clearAttribute('FULL_NAME', {
|
|
49
|
+
* customerProfileId:
|
|
50
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
51
|
+
* });
|
|
52
|
+
* ```
|
|
53
|
+
*/
|
|
54
|
+
clearAttribute(
|
|
55
|
+
key:
|
|
56
|
+
| 'FULL_NAME'
|
|
57
|
+
| 'PREFERRED_NAME'
|
|
58
|
+
| 'ACCOUNT_ID'
|
|
59
|
+
| 'COMPANY'
|
|
60
|
+
| 'JOB_TITLE'
|
|
61
|
+
| 'EMAIL'
|
|
62
|
+
| 'ALTERNATE_PHONE'
|
|
63
|
+
| 'AGE'
|
|
64
|
+
| 'GENDER'
|
|
65
|
+
| 'LANGUAGE'
|
|
66
|
+
| 'LOCATION'
|
|
67
|
+
| 'TIMEZONE'
|
|
68
|
+
| 'BEST_TIME_TO_REACH'
|
|
69
|
+
| 'PREFERRED_CHANNEL',
|
|
70
|
+
params: CustomerProfileClearAttributeParams,
|
|
71
|
+
options?: RequestOptions,
|
|
72
|
+
): APIPromise<CustomerProfileClearAttributeResponse> {
|
|
73
|
+
const { customerProfileId } = params;
|
|
74
|
+
return this._client.delete(path`/v1/customer-profile/${customerProfileId}/attributes/${key}`, options);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Get a customer profile
|
|
79
|
+
*
|
|
80
|
+
* @example
|
|
81
|
+
* ```ts
|
|
82
|
+
* const response = await client.customerProfile.getByID(
|
|
83
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
84
|
+
* );
|
|
85
|
+
* ```
|
|
86
|
+
*/
|
|
87
|
+
getByID(customerProfileID: string, options?: RequestOptions): APIPromise<CustomerProfileGetByIDResponse> {
|
|
88
|
+
return this._client.get(path`/v1/customer-profile/${customerProfileID}`, options);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Calls and chats with this customer, newest first.
|
|
93
|
+
*
|
|
94
|
+
* @example
|
|
95
|
+
* ```ts
|
|
96
|
+
* const response =
|
|
97
|
+
* await client.customerProfile.listConversations(
|
|
98
|
+
* 'customerProfileId',
|
|
99
|
+
* );
|
|
100
|
+
* ```
|
|
101
|
+
*/
|
|
102
|
+
listConversations(
|
|
103
|
+
customerProfileID: string,
|
|
104
|
+
query: CustomerProfileListConversationsParams | null | undefined = {},
|
|
105
|
+
options?: RequestOptions,
|
|
106
|
+
): APIPromise<CustomerProfileListConversationsResponse> {
|
|
107
|
+
return this._client.get(path`/v1/customer-profile/${customerProfileID}/conversations`, {
|
|
108
|
+
query,
|
|
109
|
+
...options,
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Sets the value and locks the field, so newer conversations cannot change it.
|
|
115
|
+
*
|
|
116
|
+
* @example
|
|
117
|
+
* ```ts
|
|
118
|
+
* const response = await client.customerProfile.setAttribute(
|
|
119
|
+
* 'FULL_NAME',
|
|
120
|
+
* {
|
|
121
|
+
* customerProfileId:
|
|
122
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
123
|
+
* value: 'x',
|
|
124
|
+
* },
|
|
125
|
+
* );
|
|
126
|
+
* ```
|
|
127
|
+
*/
|
|
128
|
+
setAttribute(
|
|
129
|
+
key:
|
|
130
|
+
| 'FULL_NAME'
|
|
131
|
+
| 'PREFERRED_NAME'
|
|
132
|
+
| 'ACCOUNT_ID'
|
|
133
|
+
| 'COMPANY'
|
|
134
|
+
| 'JOB_TITLE'
|
|
135
|
+
| 'EMAIL'
|
|
136
|
+
| 'ALTERNATE_PHONE'
|
|
137
|
+
| 'AGE'
|
|
138
|
+
| 'GENDER'
|
|
139
|
+
| 'LANGUAGE'
|
|
140
|
+
| 'LOCATION'
|
|
141
|
+
| 'TIMEZONE'
|
|
142
|
+
| 'BEST_TIME_TO_REACH'
|
|
143
|
+
| 'PREFERRED_CHANNEL',
|
|
144
|
+
params: CustomerProfileSetAttributeParams,
|
|
145
|
+
options?: RequestOptions,
|
|
146
|
+
): APIPromise<CustomerProfileSetAttributeResponse> {
|
|
147
|
+
const { customerProfileId, ...body } = params;
|
|
148
|
+
return this._client.put(path`/v1/customer-profile/${customerProfileId}/attributes/${key}`, {
|
|
149
|
+
body,
|
|
150
|
+
...options,
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Lets newer conversations change this field again. The current value stays until
|
|
156
|
+
* one does.
|
|
157
|
+
*
|
|
158
|
+
* @example
|
|
159
|
+
* ```ts
|
|
160
|
+
* const response =
|
|
161
|
+
* await client.customerProfile.unlockAttribute(
|
|
162
|
+
* 'FULL_NAME',
|
|
163
|
+
* {
|
|
164
|
+
* customerProfileId:
|
|
165
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
166
|
+
* },
|
|
167
|
+
* );
|
|
168
|
+
* ```
|
|
169
|
+
*/
|
|
170
|
+
unlockAttribute(
|
|
171
|
+
key:
|
|
172
|
+
| 'FULL_NAME'
|
|
173
|
+
| 'PREFERRED_NAME'
|
|
174
|
+
| 'ACCOUNT_ID'
|
|
175
|
+
| 'COMPANY'
|
|
176
|
+
| 'JOB_TITLE'
|
|
177
|
+
| 'EMAIL'
|
|
178
|
+
| 'ALTERNATE_PHONE'
|
|
179
|
+
| 'AGE'
|
|
180
|
+
| 'GENDER'
|
|
181
|
+
| 'LANGUAGE'
|
|
182
|
+
| 'LOCATION'
|
|
183
|
+
| 'TIMEZONE'
|
|
184
|
+
| 'BEST_TIME_TO_REACH'
|
|
185
|
+
| 'PREFERRED_CHANNEL',
|
|
186
|
+
params: CustomerProfileUnlockAttributeParams,
|
|
187
|
+
options?: RequestOptions,
|
|
188
|
+
): APIPromise<CustomerProfileUnlockAttributeResponse> {
|
|
189
|
+
const { customerProfileId } = params;
|
|
190
|
+
return this._client.post(
|
|
191
|
+
path`/v1/customer-profile/${customerProfileId}/attributes/${key}/unlock`,
|
|
192
|
+
options,
|
|
193
|
+
);
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* Replaces your team's shared notes. Null or empty clears them. The last save
|
|
198
|
+
* wins.
|
|
199
|
+
*
|
|
200
|
+
* @example
|
|
201
|
+
* ```ts
|
|
202
|
+
* const response = await client.customerProfile.updateNotes(
|
|
203
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
204
|
+
* { notes: 'notes' },
|
|
205
|
+
* );
|
|
206
|
+
* ```
|
|
207
|
+
*/
|
|
208
|
+
updateNotes(
|
|
209
|
+
customerProfileID: string,
|
|
210
|
+
body: CustomerProfileUpdateNotesParams,
|
|
211
|
+
options?: RequestOptions,
|
|
212
|
+
): APIPromise<CustomerProfileUpdateNotesResponse> {
|
|
213
|
+
return this._client.put(path`/v1/customer-profile/${customerProfileID}/notes`, { body, ...options });
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
export interface CustomerProfileListResponse {
|
|
218
|
+
data: CustomerProfileListResponse.Data;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
export namespace CustomerProfileListResponse {
|
|
222
|
+
export interface Data {
|
|
223
|
+
items: Array<Data.Item>;
|
|
224
|
+
|
|
225
|
+
page: number;
|
|
226
|
+
|
|
227
|
+
totalCount: number;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
export namespace Data {
|
|
231
|
+
export interface Item {
|
|
232
|
+
/**
|
|
233
|
+
* Unique identifier of the customer profile
|
|
234
|
+
*/
|
|
235
|
+
id: string;
|
|
236
|
+
|
|
237
|
+
agentIds: Array<string>;
|
|
238
|
+
|
|
239
|
+
attributes: Array<Item.Attribute>;
|
|
240
|
+
|
|
241
|
+
chatCount: number;
|
|
242
|
+
|
|
243
|
+
conversationCount: number;
|
|
244
|
+
|
|
245
|
+
/**
|
|
246
|
+
* Null until a name is known, which is common
|
|
247
|
+
*/
|
|
248
|
+
displayName: string | null;
|
|
249
|
+
|
|
250
|
+
externalId: string | null;
|
|
251
|
+
|
|
252
|
+
firstSeenAt: string | null;
|
|
253
|
+
|
|
254
|
+
lastSeenAt: string | null;
|
|
255
|
+
|
|
256
|
+
/**
|
|
257
|
+
* Your team's shared notes. Never sent to the agent.
|
|
258
|
+
*/
|
|
259
|
+
notes: string | null;
|
|
260
|
+
|
|
261
|
+
notesUpdatedAt: string | null;
|
|
262
|
+
|
|
263
|
+
openItems: string | null;
|
|
264
|
+
|
|
265
|
+
phoneNumberE164: string | null;
|
|
266
|
+
|
|
267
|
+
summary: string | null;
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* Voice only. Chat time is not included.
|
|
271
|
+
*/
|
|
272
|
+
talkTimeMs: number;
|
|
273
|
+
|
|
274
|
+
voiceCount: number;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
export namespace Item {
|
|
278
|
+
export interface Attribute {
|
|
279
|
+
/**
|
|
280
|
+
* What a newer conversation said while this field was locked
|
|
281
|
+
*/
|
|
282
|
+
blockedValue: string | null;
|
|
283
|
+
|
|
284
|
+
/**
|
|
285
|
+
* The moment the current value was heard. Null for a value set by a person or the
|
|
286
|
+
* API.
|
|
287
|
+
*/
|
|
288
|
+
evidence: Attribute.Evidence | null;
|
|
289
|
+
|
|
290
|
+
/**
|
|
291
|
+
* Other values this field has held or been offered, newest first
|
|
292
|
+
*/
|
|
293
|
+
history: Array<Attribute.History>;
|
|
294
|
+
|
|
295
|
+
/**
|
|
296
|
+
* True when newer conversations cannot change this field
|
|
297
|
+
*/
|
|
298
|
+
isLocked: boolean;
|
|
299
|
+
|
|
300
|
+
key:
|
|
301
|
+
| 'FULL_NAME'
|
|
302
|
+
| 'PREFERRED_NAME'
|
|
303
|
+
| 'ACCOUNT_ID'
|
|
304
|
+
| 'COMPANY'
|
|
305
|
+
| 'JOB_TITLE'
|
|
306
|
+
| 'EMAIL'
|
|
307
|
+
| 'ALTERNATE_PHONE'
|
|
308
|
+
| 'AGE'
|
|
309
|
+
| 'GENDER'
|
|
310
|
+
| 'LANGUAGE'
|
|
311
|
+
| 'LOCATION'
|
|
312
|
+
| 'TIMEZONE'
|
|
313
|
+
| 'BEST_TIME_TO_REACH'
|
|
314
|
+
| 'PREFERRED_CHANNEL';
|
|
315
|
+
|
|
316
|
+
observedAt: string;
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
* Where the current value came from. LIVE and POST_CALL extraction are read from
|
|
320
|
+
* conversations.
|
|
321
|
+
*/
|
|
322
|
+
source: 'LIVE_EXTRACTION' | 'POST_CALL_EXTRACTION' | 'API' | 'USER';
|
|
323
|
+
|
|
324
|
+
value: string;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
export namespace Attribute {
|
|
328
|
+
/**
|
|
329
|
+
* The moment the current value was heard. Null for a value set by a person or the
|
|
330
|
+
* API.
|
|
331
|
+
*/
|
|
332
|
+
export interface Evidence {
|
|
333
|
+
callId: string | null;
|
|
334
|
+
|
|
335
|
+
chatId: string | null;
|
|
336
|
+
|
|
337
|
+
observedAt: string;
|
|
338
|
+
|
|
339
|
+
/**
|
|
340
|
+
* Where in the conversation this was said
|
|
341
|
+
*/
|
|
342
|
+
offsetMs: number | null;
|
|
343
|
+
|
|
344
|
+
/**
|
|
345
|
+
* The customer's words. Null on a project with redaction on.
|
|
346
|
+
*/
|
|
347
|
+
quote: string | null;
|
|
348
|
+
|
|
349
|
+
source: 'LIVE_EXTRACTION' | 'POST_CALL_EXTRACTION' | 'API' | 'USER';
|
|
350
|
+
|
|
351
|
+
value: string;
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
export interface History {
|
|
355
|
+
callId: string | null;
|
|
356
|
+
|
|
357
|
+
chatId: string | null;
|
|
358
|
+
|
|
359
|
+
observedAt: string;
|
|
360
|
+
|
|
361
|
+
/**
|
|
362
|
+
* Where in the conversation this was said
|
|
363
|
+
*/
|
|
364
|
+
offsetMs: number | null;
|
|
365
|
+
|
|
366
|
+
/**
|
|
367
|
+
* The customer's words. Null on a project with redaction on.
|
|
368
|
+
*/
|
|
369
|
+
quote: string | null;
|
|
370
|
+
|
|
371
|
+
source: 'LIVE_EXTRACTION' | 'POST_CALL_EXTRACTION' | 'API' | 'USER';
|
|
372
|
+
|
|
373
|
+
value: string;
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
export interface CustomerProfileDeleteResponse {
|
|
381
|
+
data: CustomerProfileDeleteResponse.Data;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
export namespace CustomerProfileDeleteResponse {
|
|
385
|
+
export interface Data {
|
|
386
|
+
success: boolean;
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
export interface CustomerProfileClearAttributeResponse {
|
|
391
|
+
data: CustomerProfileClearAttributeResponse.Data;
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
export namespace CustomerProfileClearAttributeResponse {
|
|
395
|
+
export interface Data {
|
|
396
|
+
/**
|
|
397
|
+
* Unique identifier of the customer profile
|
|
398
|
+
*/
|
|
399
|
+
id: string;
|
|
400
|
+
|
|
401
|
+
agentIds: Array<string>;
|
|
402
|
+
|
|
403
|
+
attributes: Array<Data.Attribute>;
|
|
404
|
+
|
|
405
|
+
chatCount: number;
|
|
406
|
+
|
|
407
|
+
conversationCount: number;
|
|
408
|
+
|
|
409
|
+
/**
|
|
410
|
+
* Null until a name is known, which is common
|
|
411
|
+
*/
|
|
412
|
+
displayName: string | null;
|
|
413
|
+
|
|
414
|
+
externalId: string | null;
|
|
415
|
+
|
|
416
|
+
firstSeenAt: string | null;
|
|
417
|
+
|
|
418
|
+
lastSeenAt: string | null;
|
|
419
|
+
|
|
420
|
+
/**
|
|
421
|
+
* Your team's shared notes. Never sent to the agent.
|
|
422
|
+
*/
|
|
423
|
+
notes: string | null;
|
|
424
|
+
|
|
425
|
+
notesUpdatedAt: string | null;
|
|
426
|
+
|
|
427
|
+
openItems: string | null;
|
|
428
|
+
|
|
429
|
+
phoneNumberE164: string | null;
|
|
430
|
+
|
|
431
|
+
summary: string | null;
|
|
432
|
+
|
|
433
|
+
/**
|
|
434
|
+
* Voice only. Chat time is not included.
|
|
435
|
+
*/
|
|
436
|
+
talkTimeMs: number;
|
|
437
|
+
|
|
438
|
+
voiceCount: number;
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
export namespace Data {
|
|
442
|
+
export interface Attribute {
|
|
443
|
+
/**
|
|
444
|
+
* What a newer conversation said while this field was locked
|
|
445
|
+
*/
|
|
446
|
+
blockedValue: string | null;
|
|
447
|
+
|
|
448
|
+
/**
|
|
449
|
+
* The moment the current value was heard. Null for a value set by a person or the
|
|
450
|
+
* API.
|
|
451
|
+
*/
|
|
452
|
+
evidence: Attribute.Evidence | null;
|
|
453
|
+
|
|
454
|
+
/**
|
|
455
|
+
* Other values this field has held or been offered, newest first
|
|
456
|
+
*/
|
|
457
|
+
history: Array<Attribute.History>;
|
|
458
|
+
|
|
459
|
+
/**
|
|
460
|
+
* True when newer conversations cannot change this field
|
|
461
|
+
*/
|
|
462
|
+
isLocked: boolean;
|
|
463
|
+
|
|
464
|
+
key:
|
|
465
|
+
| 'FULL_NAME'
|
|
466
|
+
| 'PREFERRED_NAME'
|
|
467
|
+
| 'ACCOUNT_ID'
|
|
468
|
+
| 'COMPANY'
|
|
469
|
+
| 'JOB_TITLE'
|
|
470
|
+
| 'EMAIL'
|
|
471
|
+
| 'ALTERNATE_PHONE'
|
|
472
|
+
| 'AGE'
|
|
473
|
+
| 'GENDER'
|
|
474
|
+
| 'LANGUAGE'
|
|
475
|
+
| 'LOCATION'
|
|
476
|
+
| 'TIMEZONE'
|
|
477
|
+
| 'BEST_TIME_TO_REACH'
|
|
478
|
+
| 'PREFERRED_CHANNEL';
|
|
479
|
+
|
|
480
|
+
observedAt: string;
|
|
481
|
+
|
|
482
|
+
/**
|
|
483
|
+
* Where the current value came from. LIVE and POST_CALL extraction are read from
|
|
484
|
+
* conversations.
|
|
485
|
+
*/
|
|
486
|
+
source: 'LIVE_EXTRACTION' | 'POST_CALL_EXTRACTION' | 'API' | 'USER';
|
|
487
|
+
|
|
488
|
+
value: string;
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
export namespace Attribute {
|
|
492
|
+
/**
|
|
493
|
+
* The moment the current value was heard. Null for a value set by a person or the
|
|
494
|
+
* API.
|
|
495
|
+
*/
|
|
496
|
+
export interface Evidence {
|
|
497
|
+
callId: string | null;
|
|
498
|
+
|
|
499
|
+
chatId: string | null;
|
|
500
|
+
|
|
501
|
+
observedAt: string;
|
|
502
|
+
|
|
503
|
+
/**
|
|
504
|
+
* Where in the conversation this was said
|
|
505
|
+
*/
|
|
506
|
+
offsetMs: number | null;
|
|
507
|
+
|
|
508
|
+
/**
|
|
509
|
+
* The customer's words. Null on a project with redaction on.
|
|
510
|
+
*/
|
|
511
|
+
quote: string | null;
|
|
512
|
+
|
|
513
|
+
source: 'LIVE_EXTRACTION' | 'POST_CALL_EXTRACTION' | 'API' | 'USER';
|
|
514
|
+
|
|
515
|
+
value: string;
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
export interface History {
|
|
519
|
+
callId: string | null;
|
|
520
|
+
|
|
521
|
+
chatId: string | null;
|
|
522
|
+
|
|
523
|
+
observedAt: string;
|
|
524
|
+
|
|
525
|
+
/**
|
|
526
|
+
* Where in the conversation this was said
|
|
527
|
+
*/
|
|
528
|
+
offsetMs: number | null;
|
|
529
|
+
|
|
530
|
+
/**
|
|
531
|
+
* The customer's words. Null on a project with redaction on.
|
|
532
|
+
*/
|
|
533
|
+
quote: string | null;
|
|
534
|
+
|
|
535
|
+
source: 'LIVE_EXTRACTION' | 'POST_CALL_EXTRACTION' | 'API' | 'USER';
|
|
536
|
+
|
|
537
|
+
value: string;
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
export interface CustomerProfileGetByIDResponse {
|
|
544
|
+
data: CustomerProfileGetByIDResponse.Data;
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
export namespace CustomerProfileGetByIDResponse {
|
|
548
|
+
export interface Data {
|
|
549
|
+
/**
|
|
550
|
+
* Unique identifier of the customer profile
|
|
551
|
+
*/
|
|
552
|
+
id: string;
|
|
553
|
+
|
|
554
|
+
agentIds: Array<string>;
|
|
555
|
+
|
|
556
|
+
attributes: Array<Data.Attribute>;
|
|
557
|
+
|
|
558
|
+
chatCount: number;
|
|
559
|
+
|
|
560
|
+
conversationCount: number;
|
|
561
|
+
|
|
562
|
+
/**
|
|
563
|
+
* Null until a name is known, which is common
|
|
564
|
+
*/
|
|
565
|
+
displayName: string | null;
|
|
566
|
+
|
|
567
|
+
externalId: string | null;
|
|
568
|
+
|
|
569
|
+
firstSeenAt: string | null;
|
|
570
|
+
|
|
571
|
+
lastSeenAt: string | null;
|
|
572
|
+
|
|
573
|
+
/**
|
|
574
|
+
* Your team's shared notes. Never sent to the agent.
|
|
575
|
+
*/
|
|
576
|
+
notes: string | null;
|
|
577
|
+
|
|
578
|
+
notesUpdatedAt: string | null;
|
|
579
|
+
|
|
580
|
+
openItems: string | null;
|
|
581
|
+
|
|
582
|
+
phoneNumberE164: string | null;
|
|
583
|
+
|
|
584
|
+
summary: string | null;
|
|
585
|
+
|
|
586
|
+
/**
|
|
587
|
+
* Voice only. Chat time is not included.
|
|
588
|
+
*/
|
|
589
|
+
talkTimeMs: number;
|
|
590
|
+
|
|
591
|
+
voiceCount: number;
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
export namespace Data {
|
|
595
|
+
export interface Attribute {
|
|
596
|
+
/**
|
|
597
|
+
* What a newer conversation said while this field was locked
|
|
598
|
+
*/
|
|
599
|
+
blockedValue: string | null;
|
|
600
|
+
|
|
601
|
+
/**
|
|
602
|
+
* The moment the current value was heard. Null for a value set by a person or the
|
|
603
|
+
* API.
|
|
604
|
+
*/
|
|
605
|
+
evidence: Attribute.Evidence | null;
|
|
606
|
+
|
|
607
|
+
/**
|
|
608
|
+
* Other values this field has held or been offered, newest first
|
|
609
|
+
*/
|
|
610
|
+
history: Array<Attribute.History>;
|
|
611
|
+
|
|
612
|
+
/**
|
|
613
|
+
* True when newer conversations cannot change this field
|
|
614
|
+
*/
|
|
615
|
+
isLocked: boolean;
|
|
616
|
+
|
|
617
|
+
key:
|
|
618
|
+
| 'FULL_NAME'
|
|
619
|
+
| 'PREFERRED_NAME'
|
|
620
|
+
| 'ACCOUNT_ID'
|
|
621
|
+
| 'COMPANY'
|
|
622
|
+
| 'JOB_TITLE'
|
|
623
|
+
| 'EMAIL'
|
|
624
|
+
| 'ALTERNATE_PHONE'
|
|
625
|
+
| 'AGE'
|
|
626
|
+
| 'GENDER'
|
|
627
|
+
| 'LANGUAGE'
|
|
628
|
+
| 'LOCATION'
|
|
629
|
+
| 'TIMEZONE'
|
|
630
|
+
| 'BEST_TIME_TO_REACH'
|
|
631
|
+
| 'PREFERRED_CHANNEL';
|
|
632
|
+
|
|
633
|
+
observedAt: string;
|
|
634
|
+
|
|
635
|
+
/**
|
|
636
|
+
* Where the current value came from. LIVE and POST_CALL extraction are read from
|
|
637
|
+
* conversations.
|
|
638
|
+
*/
|
|
639
|
+
source: 'LIVE_EXTRACTION' | 'POST_CALL_EXTRACTION' | 'API' | 'USER';
|
|
640
|
+
|
|
641
|
+
value: string;
|
|
642
|
+
}
|
|
643
|
+
|
|
644
|
+
export namespace Attribute {
|
|
645
|
+
/**
|
|
646
|
+
* The moment the current value was heard. Null for a value set by a person or the
|
|
647
|
+
* API.
|
|
648
|
+
*/
|
|
649
|
+
export interface Evidence {
|
|
650
|
+
callId: string | null;
|
|
651
|
+
|
|
652
|
+
chatId: string | null;
|
|
653
|
+
|
|
654
|
+
observedAt: string;
|
|
655
|
+
|
|
656
|
+
/**
|
|
657
|
+
* Where in the conversation this was said
|
|
658
|
+
*/
|
|
659
|
+
offsetMs: number | null;
|
|
660
|
+
|
|
661
|
+
/**
|
|
662
|
+
* The customer's words. Null on a project with redaction on.
|
|
663
|
+
*/
|
|
664
|
+
quote: string | null;
|
|
665
|
+
|
|
666
|
+
source: 'LIVE_EXTRACTION' | 'POST_CALL_EXTRACTION' | 'API' | 'USER';
|
|
667
|
+
|
|
668
|
+
value: string;
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
export interface History {
|
|
672
|
+
callId: string | null;
|
|
673
|
+
|
|
674
|
+
chatId: string | null;
|
|
675
|
+
|
|
676
|
+
observedAt: string;
|
|
677
|
+
|
|
678
|
+
/**
|
|
679
|
+
* Where in the conversation this was said
|
|
680
|
+
*/
|
|
681
|
+
offsetMs: number | null;
|
|
682
|
+
|
|
683
|
+
/**
|
|
684
|
+
* The customer's words. Null on a project with redaction on.
|
|
685
|
+
*/
|
|
686
|
+
quote: string | null;
|
|
687
|
+
|
|
688
|
+
source: 'LIVE_EXTRACTION' | 'POST_CALL_EXTRACTION' | 'API' | 'USER';
|
|
689
|
+
|
|
690
|
+
value: string;
|
|
691
|
+
}
|
|
692
|
+
}
|
|
693
|
+
}
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
export interface CustomerProfileListConversationsResponse {
|
|
697
|
+
data: CustomerProfileListConversationsResponse.Data;
|
|
698
|
+
}
|
|
699
|
+
|
|
700
|
+
export namespace CustomerProfileListConversationsResponse {
|
|
701
|
+
export interface Data {
|
|
702
|
+
items: Array<Data.Item>;
|
|
703
|
+
|
|
704
|
+
page: number;
|
|
705
|
+
|
|
706
|
+
totalCount: number;
|
|
707
|
+
}
|
|
708
|
+
|
|
709
|
+
export namespace Data {
|
|
710
|
+
export interface Item {
|
|
711
|
+
id: string;
|
|
712
|
+
|
|
713
|
+
conversationType: 'call' | 'chat';
|
|
714
|
+
|
|
715
|
+
durationMs: number | null;
|
|
716
|
+
|
|
717
|
+
startedAt: string;
|
|
718
|
+
|
|
719
|
+
summary: string | null;
|
|
720
|
+
|
|
721
|
+
title: string | null;
|
|
722
|
+
}
|
|
723
|
+
}
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
export interface CustomerProfileSetAttributeResponse {
|
|
727
|
+
data: CustomerProfileSetAttributeResponse.Data;
|
|
728
|
+
}
|
|
729
|
+
|
|
730
|
+
export namespace CustomerProfileSetAttributeResponse {
|
|
731
|
+
export interface Data {
|
|
732
|
+
/**
|
|
733
|
+
* Unique identifier of the customer profile
|
|
734
|
+
*/
|
|
735
|
+
id: string;
|
|
736
|
+
|
|
737
|
+
agentIds: Array<string>;
|
|
738
|
+
|
|
739
|
+
attributes: Array<Data.Attribute>;
|
|
740
|
+
|
|
741
|
+
chatCount: number;
|
|
742
|
+
|
|
743
|
+
conversationCount: number;
|
|
744
|
+
|
|
745
|
+
/**
|
|
746
|
+
* Null until a name is known, which is common
|
|
747
|
+
*/
|
|
748
|
+
displayName: string | null;
|
|
749
|
+
|
|
750
|
+
externalId: string | null;
|
|
751
|
+
|
|
752
|
+
firstSeenAt: string | null;
|
|
753
|
+
|
|
754
|
+
lastSeenAt: string | null;
|
|
755
|
+
|
|
756
|
+
/**
|
|
757
|
+
* Your team's shared notes. Never sent to the agent.
|
|
758
|
+
*/
|
|
759
|
+
notes: string | null;
|
|
760
|
+
|
|
761
|
+
notesUpdatedAt: string | null;
|
|
762
|
+
|
|
763
|
+
openItems: string | null;
|
|
764
|
+
|
|
765
|
+
phoneNumberE164: string | null;
|
|
766
|
+
|
|
767
|
+
summary: string | null;
|
|
768
|
+
|
|
769
|
+
/**
|
|
770
|
+
* Voice only. Chat time is not included.
|
|
771
|
+
*/
|
|
772
|
+
talkTimeMs: number;
|
|
773
|
+
|
|
774
|
+
voiceCount: number;
|
|
775
|
+
}
|
|
776
|
+
|
|
777
|
+
export namespace Data {
|
|
778
|
+
export interface Attribute {
|
|
779
|
+
/**
|
|
780
|
+
* What a newer conversation said while this field was locked
|
|
781
|
+
*/
|
|
782
|
+
blockedValue: string | null;
|
|
783
|
+
|
|
784
|
+
/**
|
|
785
|
+
* The moment the current value was heard. Null for a value set by a person or the
|
|
786
|
+
* API.
|
|
787
|
+
*/
|
|
788
|
+
evidence: Attribute.Evidence | null;
|
|
789
|
+
|
|
790
|
+
/**
|
|
791
|
+
* Other values this field has held or been offered, newest first
|
|
792
|
+
*/
|
|
793
|
+
history: Array<Attribute.History>;
|
|
794
|
+
|
|
795
|
+
/**
|
|
796
|
+
* True when newer conversations cannot change this field
|
|
797
|
+
*/
|
|
798
|
+
isLocked: boolean;
|
|
799
|
+
|
|
800
|
+
key:
|
|
801
|
+
| 'FULL_NAME'
|
|
802
|
+
| 'PREFERRED_NAME'
|
|
803
|
+
| 'ACCOUNT_ID'
|
|
804
|
+
| 'COMPANY'
|
|
805
|
+
| 'JOB_TITLE'
|
|
806
|
+
| 'EMAIL'
|
|
807
|
+
| 'ALTERNATE_PHONE'
|
|
808
|
+
| 'AGE'
|
|
809
|
+
| 'GENDER'
|
|
810
|
+
| 'LANGUAGE'
|
|
811
|
+
| 'LOCATION'
|
|
812
|
+
| 'TIMEZONE'
|
|
813
|
+
| 'BEST_TIME_TO_REACH'
|
|
814
|
+
| 'PREFERRED_CHANNEL';
|
|
815
|
+
|
|
816
|
+
observedAt: string;
|
|
817
|
+
|
|
818
|
+
/**
|
|
819
|
+
* Where the current value came from. LIVE and POST_CALL extraction are read from
|
|
820
|
+
* conversations.
|
|
821
|
+
*/
|
|
822
|
+
source: 'LIVE_EXTRACTION' | 'POST_CALL_EXTRACTION' | 'API' | 'USER';
|
|
823
|
+
|
|
824
|
+
value: string;
|
|
825
|
+
}
|
|
826
|
+
|
|
827
|
+
export namespace Attribute {
|
|
828
|
+
/**
|
|
829
|
+
* The moment the current value was heard. Null for a value set by a person or the
|
|
830
|
+
* API.
|
|
831
|
+
*/
|
|
832
|
+
export interface Evidence {
|
|
833
|
+
callId: string | null;
|
|
834
|
+
|
|
835
|
+
chatId: string | null;
|
|
836
|
+
|
|
837
|
+
observedAt: string;
|
|
838
|
+
|
|
839
|
+
/**
|
|
840
|
+
* Where in the conversation this was said
|
|
841
|
+
*/
|
|
842
|
+
offsetMs: number | null;
|
|
843
|
+
|
|
844
|
+
/**
|
|
845
|
+
* The customer's words. Null on a project with redaction on.
|
|
846
|
+
*/
|
|
847
|
+
quote: string | null;
|
|
848
|
+
|
|
849
|
+
source: 'LIVE_EXTRACTION' | 'POST_CALL_EXTRACTION' | 'API' | 'USER';
|
|
850
|
+
|
|
851
|
+
value: string;
|
|
852
|
+
}
|
|
853
|
+
|
|
854
|
+
export interface History {
|
|
855
|
+
callId: string | null;
|
|
856
|
+
|
|
857
|
+
chatId: string | null;
|
|
858
|
+
|
|
859
|
+
observedAt: string;
|
|
860
|
+
|
|
861
|
+
/**
|
|
862
|
+
* Where in the conversation this was said
|
|
863
|
+
*/
|
|
864
|
+
offsetMs: number | null;
|
|
865
|
+
|
|
866
|
+
/**
|
|
867
|
+
* The customer's words. Null on a project with redaction on.
|
|
868
|
+
*/
|
|
869
|
+
quote: string | null;
|
|
870
|
+
|
|
871
|
+
source: 'LIVE_EXTRACTION' | 'POST_CALL_EXTRACTION' | 'API' | 'USER';
|
|
872
|
+
|
|
873
|
+
value: string;
|
|
874
|
+
}
|
|
875
|
+
}
|
|
876
|
+
}
|
|
877
|
+
}
|
|
878
|
+
|
|
879
|
+
export interface CustomerProfileUnlockAttributeResponse {
|
|
880
|
+
data: CustomerProfileUnlockAttributeResponse.Data;
|
|
881
|
+
}
|
|
882
|
+
|
|
883
|
+
export namespace CustomerProfileUnlockAttributeResponse {
|
|
884
|
+
export interface Data {
|
|
885
|
+
/**
|
|
886
|
+
* Unique identifier of the customer profile
|
|
887
|
+
*/
|
|
888
|
+
id: string;
|
|
889
|
+
|
|
890
|
+
agentIds: Array<string>;
|
|
891
|
+
|
|
892
|
+
attributes: Array<Data.Attribute>;
|
|
893
|
+
|
|
894
|
+
chatCount: number;
|
|
895
|
+
|
|
896
|
+
conversationCount: number;
|
|
897
|
+
|
|
898
|
+
/**
|
|
899
|
+
* Null until a name is known, which is common
|
|
900
|
+
*/
|
|
901
|
+
displayName: string | null;
|
|
902
|
+
|
|
903
|
+
externalId: string | null;
|
|
904
|
+
|
|
905
|
+
firstSeenAt: string | null;
|
|
906
|
+
|
|
907
|
+
lastSeenAt: string | null;
|
|
908
|
+
|
|
909
|
+
/**
|
|
910
|
+
* Your team's shared notes. Never sent to the agent.
|
|
911
|
+
*/
|
|
912
|
+
notes: string | null;
|
|
913
|
+
|
|
914
|
+
notesUpdatedAt: string | null;
|
|
915
|
+
|
|
916
|
+
openItems: string | null;
|
|
917
|
+
|
|
918
|
+
phoneNumberE164: string | null;
|
|
919
|
+
|
|
920
|
+
summary: string | null;
|
|
921
|
+
|
|
922
|
+
/**
|
|
923
|
+
* Voice only. Chat time is not included.
|
|
924
|
+
*/
|
|
925
|
+
talkTimeMs: number;
|
|
926
|
+
|
|
927
|
+
voiceCount: number;
|
|
928
|
+
}
|
|
929
|
+
|
|
930
|
+
export namespace Data {
|
|
931
|
+
export interface Attribute {
|
|
932
|
+
/**
|
|
933
|
+
* What a newer conversation said while this field was locked
|
|
934
|
+
*/
|
|
935
|
+
blockedValue: string | null;
|
|
936
|
+
|
|
937
|
+
/**
|
|
938
|
+
* The moment the current value was heard. Null for a value set by a person or the
|
|
939
|
+
* API.
|
|
940
|
+
*/
|
|
941
|
+
evidence: Attribute.Evidence | null;
|
|
942
|
+
|
|
943
|
+
/**
|
|
944
|
+
* Other values this field has held or been offered, newest first
|
|
945
|
+
*/
|
|
946
|
+
history: Array<Attribute.History>;
|
|
947
|
+
|
|
948
|
+
/**
|
|
949
|
+
* True when newer conversations cannot change this field
|
|
950
|
+
*/
|
|
951
|
+
isLocked: boolean;
|
|
952
|
+
|
|
953
|
+
key:
|
|
954
|
+
| 'FULL_NAME'
|
|
955
|
+
| 'PREFERRED_NAME'
|
|
956
|
+
| 'ACCOUNT_ID'
|
|
957
|
+
| 'COMPANY'
|
|
958
|
+
| 'JOB_TITLE'
|
|
959
|
+
| 'EMAIL'
|
|
960
|
+
| 'ALTERNATE_PHONE'
|
|
961
|
+
| 'AGE'
|
|
962
|
+
| 'GENDER'
|
|
963
|
+
| 'LANGUAGE'
|
|
964
|
+
| 'LOCATION'
|
|
965
|
+
| 'TIMEZONE'
|
|
966
|
+
| 'BEST_TIME_TO_REACH'
|
|
967
|
+
| 'PREFERRED_CHANNEL';
|
|
968
|
+
|
|
969
|
+
observedAt: string;
|
|
970
|
+
|
|
971
|
+
/**
|
|
972
|
+
* Where the current value came from. LIVE and POST_CALL extraction are read from
|
|
973
|
+
* conversations.
|
|
974
|
+
*/
|
|
975
|
+
source: 'LIVE_EXTRACTION' | 'POST_CALL_EXTRACTION' | 'API' | 'USER';
|
|
976
|
+
|
|
977
|
+
value: string;
|
|
978
|
+
}
|
|
979
|
+
|
|
980
|
+
export namespace Attribute {
|
|
981
|
+
/**
|
|
982
|
+
* The moment the current value was heard. Null for a value set by a person or the
|
|
983
|
+
* API.
|
|
984
|
+
*/
|
|
985
|
+
export interface Evidence {
|
|
986
|
+
callId: string | null;
|
|
987
|
+
|
|
988
|
+
chatId: string | null;
|
|
989
|
+
|
|
990
|
+
observedAt: string;
|
|
991
|
+
|
|
992
|
+
/**
|
|
993
|
+
* Where in the conversation this was said
|
|
994
|
+
*/
|
|
995
|
+
offsetMs: number | null;
|
|
996
|
+
|
|
997
|
+
/**
|
|
998
|
+
* The customer's words. Null on a project with redaction on.
|
|
999
|
+
*/
|
|
1000
|
+
quote: string | null;
|
|
1001
|
+
|
|
1002
|
+
source: 'LIVE_EXTRACTION' | 'POST_CALL_EXTRACTION' | 'API' | 'USER';
|
|
1003
|
+
|
|
1004
|
+
value: string;
|
|
1005
|
+
}
|
|
1006
|
+
|
|
1007
|
+
export interface History {
|
|
1008
|
+
callId: string | null;
|
|
1009
|
+
|
|
1010
|
+
chatId: string | null;
|
|
1011
|
+
|
|
1012
|
+
observedAt: string;
|
|
1013
|
+
|
|
1014
|
+
/**
|
|
1015
|
+
* Where in the conversation this was said
|
|
1016
|
+
*/
|
|
1017
|
+
offsetMs: number | null;
|
|
1018
|
+
|
|
1019
|
+
/**
|
|
1020
|
+
* The customer's words. Null on a project with redaction on.
|
|
1021
|
+
*/
|
|
1022
|
+
quote: string | null;
|
|
1023
|
+
|
|
1024
|
+
source: 'LIVE_EXTRACTION' | 'POST_CALL_EXTRACTION' | 'API' | 'USER';
|
|
1025
|
+
|
|
1026
|
+
value: string;
|
|
1027
|
+
}
|
|
1028
|
+
}
|
|
1029
|
+
}
|
|
1030
|
+
}
|
|
1031
|
+
|
|
1032
|
+
export interface CustomerProfileUpdateNotesResponse {
|
|
1033
|
+
data: CustomerProfileUpdateNotesResponse.Data;
|
|
1034
|
+
}
|
|
1035
|
+
|
|
1036
|
+
export namespace CustomerProfileUpdateNotesResponse {
|
|
1037
|
+
export interface Data {
|
|
1038
|
+
/**
|
|
1039
|
+
* Unique identifier of the customer profile
|
|
1040
|
+
*/
|
|
1041
|
+
id: string;
|
|
1042
|
+
|
|
1043
|
+
agentIds: Array<string>;
|
|
1044
|
+
|
|
1045
|
+
attributes: Array<Data.Attribute>;
|
|
1046
|
+
|
|
1047
|
+
chatCount: number;
|
|
1048
|
+
|
|
1049
|
+
conversationCount: number;
|
|
1050
|
+
|
|
1051
|
+
/**
|
|
1052
|
+
* Null until a name is known, which is common
|
|
1053
|
+
*/
|
|
1054
|
+
displayName: string | null;
|
|
1055
|
+
|
|
1056
|
+
externalId: string | null;
|
|
1057
|
+
|
|
1058
|
+
firstSeenAt: string | null;
|
|
1059
|
+
|
|
1060
|
+
lastSeenAt: string | null;
|
|
1061
|
+
|
|
1062
|
+
/**
|
|
1063
|
+
* Your team's shared notes. Never sent to the agent.
|
|
1064
|
+
*/
|
|
1065
|
+
notes: string | null;
|
|
1066
|
+
|
|
1067
|
+
notesUpdatedAt: string | null;
|
|
1068
|
+
|
|
1069
|
+
openItems: string | null;
|
|
1070
|
+
|
|
1071
|
+
phoneNumberE164: string | null;
|
|
1072
|
+
|
|
1073
|
+
summary: string | null;
|
|
1074
|
+
|
|
1075
|
+
/**
|
|
1076
|
+
* Voice only. Chat time is not included.
|
|
1077
|
+
*/
|
|
1078
|
+
talkTimeMs: number;
|
|
1079
|
+
|
|
1080
|
+
voiceCount: number;
|
|
1081
|
+
}
|
|
1082
|
+
|
|
1083
|
+
export namespace Data {
|
|
1084
|
+
export interface Attribute {
|
|
1085
|
+
/**
|
|
1086
|
+
* What a newer conversation said while this field was locked
|
|
1087
|
+
*/
|
|
1088
|
+
blockedValue: string | null;
|
|
1089
|
+
|
|
1090
|
+
/**
|
|
1091
|
+
* The moment the current value was heard. Null for a value set by a person or the
|
|
1092
|
+
* API.
|
|
1093
|
+
*/
|
|
1094
|
+
evidence: Attribute.Evidence | null;
|
|
1095
|
+
|
|
1096
|
+
/**
|
|
1097
|
+
* Other values this field has held or been offered, newest first
|
|
1098
|
+
*/
|
|
1099
|
+
history: Array<Attribute.History>;
|
|
1100
|
+
|
|
1101
|
+
/**
|
|
1102
|
+
* True when newer conversations cannot change this field
|
|
1103
|
+
*/
|
|
1104
|
+
isLocked: boolean;
|
|
1105
|
+
|
|
1106
|
+
key:
|
|
1107
|
+
| 'FULL_NAME'
|
|
1108
|
+
| 'PREFERRED_NAME'
|
|
1109
|
+
| 'ACCOUNT_ID'
|
|
1110
|
+
| 'COMPANY'
|
|
1111
|
+
| 'JOB_TITLE'
|
|
1112
|
+
| 'EMAIL'
|
|
1113
|
+
| 'ALTERNATE_PHONE'
|
|
1114
|
+
| 'AGE'
|
|
1115
|
+
| 'GENDER'
|
|
1116
|
+
| 'LANGUAGE'
|
|
1117
|
+
| 'LOCATION'
|
|
1118
|
+
| 'TIMEZONE'
|
|
1119
|
+
| 'BEST_TIME_TO_REACH'
|
|
1120
|
+
| 'PREFERRED_CHANNEL';
|
|
1121
|
+
|
|
1122
|
+
observedAt: string;
|
|
1123
|
+
|
|
1124
|
+
/**
|
|
1125
|
+
* Where the current value came from. LIVE and POST_CALL extraction are read from
|
|
1126
|
+
* conversations.
|
|
1127
|
+
*/
|
|
1128
|
+
source: 'LIVE_EXTRACTION' | 'POST_CALL_EXTRACTION' | 'API' | 'USER';
|
|
1129
|
+
|
|
1130
|
+
value: string;
|
|
1131
|
+
}
|
|
1132
|
+
|
|
1133
|
+
export namespace Attribute {
|
|
1134
|
+
/**
|
|
1135
|
+
* The moment the current value was heard. Null for a value set by a person or the
|
|
1136
|
+
* API.
|
|
1137
|
+
*/
|
|
1138
|
+
export interface Evidence {
|
|
1139
|
+
callId: string | null;
|
|
1140
|
+
|
|
1141
|
+
chatId: string | null;
|
|
1142
|
+
|
|
1143
|
+
observedAt: string;
|
|
1144
|
+
|
|
1145
|
+
/**
|
|
1146
|
+
* Where in the conversation this was said
|
|
1147
|
+
*/
|
|
1148
|
+
offsetMs: number | null;
|
|
1149
|
+
|
|
1150
|
+
/**
|
|
1151
|
+
* The customer's words. Null on a project with redaction on.
|
|
1152
|
+
*/
|
|
1153
|
+
quote: string | null;
|
|
1154
|
+
|
|
1155
|
+
source: 'LIVE_EXTRACTION' | 'POST_CALL_EXTRACTION' | 'API' | 'USER';
|
|
1156
|
+
|
|
1157
|
+
value: string;
|
|
1158
|
+
}
|
|
1159
|
+
|
|
1160
|
+
export interface History {
|
|
1161
|
+
callId: string | null;
|
|
1162
|
+
|
|
1163
|
+
chatId: string | null;
|
|
1164
|
+
|
|
1165
|
+
observedAt: string;
|
|
1166
|
+
|
|
1167
|
+
/**
|
|
1168
|
+
* Where in the conversation this was said
|
|
1169
|
+
*/
|
|
1170
|
+
offsetMs: number | null;
|
|
1171
|
+
|
|
1172
|
+
/**
|
|
1173
|
+
* The customer's words. Null on a project with redaction on.
|
|
1174
|
+
*/
|
|
1175
|
+
quote: string | null;
|
|
1176
|
+
|
|
1177
|
+
source: 'LIVE_EXTRACTION' | 'POST_CALL_EXTRACTION' | 'API' | 'USER';
|
|
1178
|
+
|
|
1179
|
+
value: string;
|
|
1180
|
+
}
|
|
1181
|
+
}
|
|
1182
|
+
}
|
|
1183
|
+
}
|
|
1184
|
+
|
|
1185
|
+
export interface CustomerProfileListParams {
|
|
1186
|
+
agentId?: string;
|
|
1187
|
+
|
|
1188
|
+
/**
|
|
1189
|
+
* Filter by this field. Use with fieldOperator and, unless checking presence,
|
|
1190
|
+
* fieldValue.
|
|
1191
|
+
*/
|
|
1192
|
+
fieldKey?:
|
|
1193
|
+
| 'FULL_NAME'
|
|
1194
|
+
| 'PREFERRED_NAME'
|
|
1195
|
+
| 'ACCOUNT_ID'
|
|
1196
|
+
| 'COMPANY'
|
|
1197
|
+
| 'JOB_TITLE'
|
|
1198
|
+
| 'EMAIL'
|
|
1199
|
+
| 'ALTERNATE_PHONE'
|
|
1200
|
+
| 'AGE'
|
|
1201
|
+
| 'GENDER'
|
|
1202
|
+
| 'LANGUAGE'
|
|
1203
|
+
| 'LOCATION'
|
|
1204
|
+
| 'TIMEZONE'
|
|
1205
|
+
| 'BEST_TIME_TO_REACH'
|
|
1206
|
+
| 'PREFERRED_CHANNEL';
|
|
1207
|
+
|
|
1208
|
+
/**
|
|
1209
|
+
* How fieldValue is compared, ignoring case. NOT_EQUALS includes customers without
|
|
1210
|
+
* the field.
|
|
1211
|
+
*/
|
|
1212
|
+
fieldOperator?: 'EQUALS' | 'NOT_EQUALS' | 'CONTAINS' | 'STARTS_WITH' | 'IS_SET' | 'IS_NOT_SET';
|
|
1213
|
+
|
|
1214
|
+
fieldValue?: string;
|
|
1215
|
+
|
|
1216
|
+
/**
|
|
1217
|
+
* Include customers we hold nothing about beyond their identifier. Defaults to
|
|
1218
|
+
* false.
|
|
1219
|
+
*/
|
|
1220
|
+
includeNoData?: 'true' | 'false';
|
|
1221
|
+
|
|
1222
|
+
limit?: number;
|
|
1223
|
+
|
|
1224
|
+
modality?: 'call' | 'chat';
|
|
1225
|
+
|
|
1226
|
+
page?: number;
|
|
1227
|
+
|
|
1228
|
+
search?: string;
|
|
1229
|
+
|
|
1230
|
+
/**
|
|
1231
|
+
* A column, or field.<KEY> (for example field.COMPANY) to sort by a field's value.
|
|
1232
|
+
* Customers without a value sort last.
|
|
1233
|
+
*/
|
|
1234
|
+
sortBy?:
|
|
1235
|
+
| 'lastSeenAt'
|
|
1236
|
+
| 'firstSeenAt'
|
|
1237
|
+
| 'conversationCount'
|
|
1238
|
+
| 'voiceCount'
|
|
1239
|
+
| 'chatCount'
|
|
1240
|
+
| 'talkTimeMs'
|
|
1241
|
+
| 'displayName'
|
|
1242
|
+
| 'field.FULL_NAME'
|
|
1243
|
+
| 'field.PREFERRED_NAME'
|
|
1244
|
+
| 'field.ACCOUNT_ID'
|
|
1245
|
+
| 'field.COMPANY'
|
|
1246
|
+
| 'field.JOB_TITLE'
|
|
1247
|
+
| 'field.EMAIL'
|
|
1248
|
+
| 'field.ALTERNATE_PHONE'
|
|
1249
|
+
| 'field.AGE'
|
|
1250
|
+
| 'field.GENDER'
|
|
1251
|
+
| 'field.LANGUAGE'
|
|
1252
|
+
| 'field.LOCATION'
|
|
1253
|
+
| 'field.TIMEZONE'
|
|
1254
|
+
| 'field.BEST_TIME_TO_REACH'
|
|
1255
|
+
| 'field.PREFERRED_CHANNEL';
|
|
1256
|
+
|
|
1257
|
+
sortDirection?: 'asc' | 'desc';
|
|
1258
|
+
}
|
|
1259
|
+
|
|
1260
|
+
export interface CustomerProfileClearAttributeParams {
|
|
1261
|
+
customerProfileId: string;
|
|
1262
|
+
}
|
|
1263
|
+
|
|
1264
|
+
export interface CustomerProfileListConversationsParams {
|
|
1265
|
+
limit?: number;
|
|
1266
|
+
|
|
1267
|
+
page?: number;
|
|
1268
|
+
}
|
|
1269
|
+
|
|
1270
|
+
export interface CustomerProfileSetAttributeParams {
|
|
1271
|
+
/**
|
|
1272
|
+
* Path param
|
|
1273
|
+
*/
|
|
1274
|
+
customerProfileId: string;
|
|
1275
|
+
|
|
1276
|
+
/**
|
|
1277
|
+
* Body param: The new value. Setting a field locks it, so newer conversations
|
|
1278
|
+
* cannot change it.
|
|
1279
|
+
*/
|
|
1280
|
+
value: string;
|
|
1281
|
+
}
|
|
1282
|
+
|
|
1283
|
+
export interface CustomerProfileUnlockAttributeParams {
|
|
1284
|
+
customerProfileId: string;
|
|
1285
|
+
}
|
|
1286
|
+
|
|
1287
|
+
export interface CustomerProfileUpdateNotesParams {
|
|
1288
|
+
/**
|
|
1289
|
+
* Replaces the existing notes. Null or empty clears them.
|
|
1290
|
+
*/
|
|
1291
|
+
notes: string | null;
|
|
1292
|
+
}
|
|
1293
|
+
|
|
1294
|
+
export declare namespace CustomerProfile {
|
|
1295
|
+
export {
|
|
1296
|
+
type CustomerProfileListResponse as CustomerProfileListResponse,
|
|
1297
|
+
type CustomerProfileDeleteResponse as CustomerProfileDeleteResponse,
|
|
1298
|
+
type CustomerProfileClearAttributeResponse as CustomerProfileClearAttributeResponse,
|
|
1299
|
+
type CustomerProfileGetByIDResponse as CustomerProfileGetByIDResponse,
|
|
1300
|
+
type CustomerProfileListConversationsResponse as CustomerProfileListConversationsResponse,
|
|
1301
|
+
type CustomerProfileSetAttributeResponse as CustomerProfileSetAttributeResponse,
|
|
1302
|
+
type CustomerProfileUnlockAttributeResponse as CustomerProfileUnlockAttributeResponse,
|
|
1303
|
+
type CustomerProfileUpdateNotesResponse as CustomerProfileUpdateNotesResponse,
|
|
1304
|
+
type CustomerProfileListParams as CustomerProfileListParams,
|
|
1305
|
+
type CustomerProfileClearAttributeParams as CustomerProfileClearAttributeParams,
|
|
1306
|
+
type CustomerProfileListConversationsParams as CustomerProfileListConversationsParams,
|
|
1307
|
+
type CustomerProfileSetAttributeParams as CustomerProfileSetAttributeParams,
|
|
1308
|
+
type CustomerProfileUnlockAttributeParams as CustomerProfileUnlockAttributeParams,
|
|
1309
|
+
type CustomerProfileUpdateNotesParams as CustomerProfileUpdateNotesParams,
|
|
1310
|
+
};
|
|
1311
|
+
}
|