@roarkanalytics/sdk 7.7.0 → 7.9.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.
@@ -0,0 +1,800 @@
1
+ import { APIResource } from "../core/resource.mjs";
2
+ import { APIPromise } from "../core/api-promise.mjs";
3
+ import { RequestOptions } from "../internal/request-options.mjs";
4
+ export declare class CustomerProfile extends APIResource {
5
+ /**
6
+ * Returns the people who have talked to your agents in this project. Customers we
7
+ * hold nothing about beyond their identifier are left out unless includeNoData is
8
+ * true.
9
+ *
10
+ * @example
11
+ * ```ts
12
+ * const customerProfiles =
13
+ * await client.customerProfile.list();
14
+ * ```
15
+ */
16
+ list(query?: CustomerProfileListParams | null | undefined, options?: RequestOptions): APIPromise<CustomerProfileListResponse>;
17
+ /**
18
+ * Permanently removes the profile, its fields, evidence and notes. Conversations
19
+ * are kept. A new conversation from the same identifier creates a new profile.
20
+ *
21
+ * @example
22
+ * ```ts
23
+ * const customerProfile = await client.customerProfile.delete(
24
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
25
+ * );
26
+ * ```
27
+ */
28
+ delete(customerProfileID: string, options?: RequestOptions): APIPromise<CustomerProfileDeleteResponse>;
29
+ /**
30
+ * Removes the value and any lock, so a later conversation can fill it again.
31
+ *
32
+ * @example
33
+ * ```ts
34
+ * const response =
35
+ * await client.customerProfile.clearAttribute('FULL_NAME', {
36
+ * customerProfileId:
37
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
38
+ * });
39
+ * ```
40
+ */
41
+ clearAttribute(key: 'FULL_NAME' | 'PREFERRED_NAME' | 'ACCOUNT_ID' | 'COMPANY' | 'JOB_TITLE' | 'EMAIL' | 'ALTERNATE_PHONE' | 'AGE' | 'GENDER' | 'LANGUAGE' | 'LOCATION' | 'TIMEZONE' | 'BEST_TIME_TO_REACH' | 'PREFERRED_CHANNEL', params: CustomerProfileClearAttributeParams, options?: RequestOptions): APIPromise<CustomerProfileClearAttributeResponse>;
42
+ /**
43
+ * Get a customer profile
44
+ *
45
+ * @example
46
+ * ```ts
47
+ * const response = await client.customerProfile.getByID(
48
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
49
+ * );
50
+ * ```
51
+ */
52
+ getByID(customerProfileID: string, options?: RequestOptions): APIPromise<CustomerProfileGetByIDResponse>;
53
+ /**
54
+ * Calls and chats with this customer, newest first.
55
+ *
56
+ * @example
57
+ * ```ts
58
+ * const response =
59
+ * await client.customerProfile.listConversations(
60
+ * 'customerProfileId',
61
+ * );
62
+ * ```
63
+ */
64
+ listConversations(customerProfileID: string, query?: CustomerProfileListConversationsParams | null | undefined, options?: RequestOptions): APIPromise<CustomerProfileListConversationsResponse>;
65
+ /**
66
+ * Sets the value and locks the field, so newer conversations cannot change it.
67
+ *
68
+ * @example
69
+ * ```ts
70
+ * const response = await client.customerProfile.setAttribute(
71
+ * 'FULL_NAME',
72
+ * {
73
+ * customerProfileId:
74
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
75
+ * value: 'x',
76
+ * },
77
+ * );
78
+ * ```
79
+ */
80
+ setAttribute(key: 'FULL_NAME' | 'PREFERRED_NAME' | 'ACCOUNT_ID' | 'COMPANY' | 'JOB_TITLE' | 'EMAIL' | 'ALTERNATE_PHONE' | 'AGE' | 'GENDER' | 'LANGUAGE' | 'LOCATION' | 'TIMEZONE' | 'BEST_TIME_TO_REACH' | 'PREFERRED_CHANNEL', params: CustomerProfileSetAttributeParams, options?: RequestOptions): APIPromise<CustomerProfileSetAttributeResponse>;
81
+ /**
82
+ * Lets newer conversations change this field again. The current value stays until
83
+ * one does.
84
+ *
85
+ * @example
86
+ * ```ts
87
+ * const response =
88
+ * await client.customerProfile.unlockAttribute(
89
+ * 'FULL_NAME',
90
+ * {
91
+ * customerProfileId:
92
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
93
+ * },
94
+ * );
95
+ * ```
96
+ */
97
+ unlockAttribute(key: 'FULL_NAME' | 'PREFERRED_NAME' | 'ACCOUNT_ID' | 'COMPANY' | 'JOB_TITLE' | 'EMAIL' | 'ALTERNATE_PHONE' | 'AGE' | 'GENDER' | 'LANGUAGE' | 'LOCATION' | 'TIMEZONE' | 'BEST_TIME_TO_REACH' | 'PREFERRED_CHANNEL', params: CustomerProfileUnlockAttributeParams, options?: RequestOptions): APIPromise<CustomerProfileUnlockAttributeResponse>;
98
+ /**
99
+ * Replaces your team's shared notes. Null or empty clears them. The last save
100
+ * wins.
101
+ *
102
+ * @example
103
+ * ```ts
104
+ * const response = await client.customerProfile.updateNotes(
105
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
106
+ * { notes: 'notes' },
107
+ * );
108
+ * ```
109
+ */
110
+ updateNotes(customerProfileID: string, body: CustomerProfileUpdateNotesParams, options?: RequestOptions): APIPromise<CustomerProfileUpdateNotesResponse>;
111
+ }
112
+ export interface CustomerProfileListResponse {
113
+ data: CustomerProfileListResponse.Data;
114
+ }
115
+ export declare namespace CustomerProfileListResponse {
116
+ interface Data {
117
+ items: Array<Data.Item>;
118
+ page: number;
119
+ totalCount: number;
120
+ }
121
+ namespace Data {
122
+ interface Item {
123
+ /**
124
+ * Unique identifier of the customer profile
125
+ */
126
+ id: string;
127
+ agentIds: Array<string>;
128
+ attributes: Array<Item.Attribute>;
129
+ chatCount: number;
130
+ conversationCount: number;
131
+ /**
132
+ * Null until a name is known, which is common
133
+ */
134
+ displayName: string | null;
135
+ externalId: string | null;
136
+ firstSeenAt: string | null;
137
+ lastSeenAt: string | null;
138
+ /**
139
+ * Your team's shared notes. Never sent to the agent.
140
+ */
141
+ notes: string | null;
142
+ notesUpdatedAt: string | null;
143
+ phoneNumberE164: string | null;
144
+ summary: string | null;
145
+ /**
146
+ * Voice only. Chat time is not included.
147
+ */
148
+ talkTimeMs: number;
149
+ voiceCount: number;
150
+ }
151
+ namespace Item {
152
+ interface Attribute {
153
+ /**
154
+ * What a newer conversation said while this field was locked
155
+ */
156
+ blockedValue: string | null;
157
+ /**
158
+ * The moment the current value was heard. Null for a value set by a person or the
159
+ * API.
160
+ */
161
+ evidence: Attribute.Evidence | null;
162
+ /**
163
+ * Other values this field has held or been offered, newest first
164
+ */
165
+ history: Array<Attribute.History>;
166
+ /**
167
+ * True when newer conversations cannot change this field
168
+ */
169
+ isLocked: boolean;
170
+ key: 'FULL_NAME' | 'PREFERRED_NAME' | 'ACCOUNT_ID' | 'COMPANY' | 'JOB_TITLE' | 'EMAIL' | 'ALTERNATE_PHONE' | 'AGE' | 'GENDER' | 'LANGUAGE' | 'LOCATION' | 'TIMEZONE' | 'BEST_TIME_TO_REACH' | 'PREFERRED_CHANNEL';
171
+ observedAt: string;
172
+ /**
173
+ * Where the current value came from. LIVE and POST_CALL extraction are read from
174
+ * conversations.
175
+ */
176
+ source: 'LIVE_EXTRACTION' | 'POST_CALL_EXTRACTION' | 'API' | 'USER';
177
+ value: string;
178
+ }
179
+ namespace Attribute {
180
+ /**
181
+ * The moment the current value was heard. Null for a value set by a person or the
182
+ * API.
183
+ */
184
+ interface Evidence {
185
+ callId: string | null;
186
+ chatId: string | null;
187
+ observedAt: string;
188
+ /**
189
+ * Where in the conversation this was said
190
+ */
191
+ offsetMs: number | null;
192
+ /**
193
+ * The customer's words. Null on a project with redaction on.
194
+ */
195
+ quote: string | null;
196
+ source: 'LIVE_EXTRACTION' | 'POST_CALL_EXTRACTION' | 'API' | 'USER';
197
+ value: string;
198
+ }
199
+ interface History {
200
+ callId: string | null;
201
+ chatId: string | null;
202
+ observedAt: string;
203
+ /**
204
+ * Where in the conversation this was said
205
+ */
206
+ offsetMs: number | null;
207
+ /**
208
+ * The customer's words. Null on a project with redaction on.
209
+ */
210
+ quote: string | null;
211
+ source: 'LIVE_EXTRACTION' | 'POST_CALL_EXTRACTION' | 'API' | 'USER';
212
+ value: string;
213
+ }
214
+ }
215
+ }
216
+ }
217
+ }
218
+ export interface CustomerProfileDeleteResponse {
219
+ data: CustomerProfileDeleteResponse.Data;
220
+ }
221
+ export declare namespace CustomerProfileDeleteResponse {
222
+ interface Data {
223
+ success: boolean;
224
+ }
225
+ }
226
+ export interface CustomerProfileClearAttributeResponse {
227
+ data: CustomerProfileClearAttributeResponse.Data;
228
+ }
229
+ export declare namespace CustomerProfileClearAttributeResponse {
230
+ interface Data {
231
+ /**
232
+ * Unique identifier of the customer profile
233
+ */
234
+ id: string;
235
+ agentIds: Array<string>;
236
+ attributes: Array<Data.Attribute>;
237
+ chatCount: number;
238
+ conversationCount: number;
239
+ /**
240
+ * Null until a name is known, which is common
241
+ */
242
+ displayName: string | null;
243
+ externalId: string | null;
244
+ firstSeenAt: string | null;
245
+ lastSeenAt: string | null;
246
+ /**
247
+ * Your team's shared notes. Never sent to the agent.
248
+ */
249
+ notes: string | null;
250
+ notesUpdatedAt: string | null;
251
+ phoneNumberE164: string | null;
252
+ summary: string | null;
253
+ /**
254
+ * Voice only. Chat time is not included.
255
+ */
256
+ talkTimeMs: number;
257
+ voiceCount: number;
258
+ }
259
+ namespace Data {
260
+ interface Attribute {
261
+ /**
262
+ * What a newer conversation said while this field was locked
263
+ */
264
+ blockedValue: string | null;
265
+ /**
266
+ * The moment the current value was heard. Null for a value set by a person or the
267
+ * API.
268
+ */
269
+ evidence: Attribute.Evidence | null;
270
+ /**
271
+ * Other values this field has held or been offered, newest first
272
+ */
273
+ history: Array<Attribute.History>;
274
+ /**
275
+ * True when newer conversations cannot change this field
276
+ */
277
+ isLocked: boolean;
278
+ key: 'FULL_NAME' | 'PREFERRED_NAME' | 'ACCOUNT_ID' | 'COMPANY' | 'JOB_TITLE' | 'EMAIL' | 'ALTERNATE_PHONE' | 'AGE' | 'GENDER' | 'LANGUAGE' | 'LOCATION' | 'TIMEZONE' | 'BEST_TIME_TO_REACH' | 'PREFERRED_CHANNEL';
279
+ observedAt: string;
280
+ /**
281
+ * Where the current value came from. LIVE and POST_CALL extraction are read from
282
+ * conversations.
283
+ */
284
+ source: 'LIVE_EXTRACTION' | 'POST_CALL_EXTRACTION' | 'API' | 'USER';
285
+ value: string;
286
+ }
287
+ namespace Attribute {
288
+ /**
289
+ * The moment the current value was heard. Null for a value set by a person or the
290
+ * API.
291
+ */
292
+ interface Evidence {
293
+ callId: string | null;
294
+ chatId: string | null;
295
+ observedAt: string;
296
+ /**
297
+ * Where in the conversation this was said
298
+ */
299
+ offsetMs: number | null;
300
+ /**
301
+ * The customer's words. Null on a project with redaction on.
302
+ */
303
+ quote: string | null;
304
+ source: 'LIVE_EXTRACTION' | 'POST_CALL_EXTRACTION' | 'API' | 'USER';
305
+ value: string;
306
+ }
307
+ interface History {
308
+ callId: string | null;
309
+ chatId: string | null;
310
+ observedAt: string;
311
+ /**
312
+ * Where in the conversation this was said
313
+ */
314
+ offsetMs: number | null;
315
+ /**
316
+ * The customer's words. Null on a project with redaction on.
317
+ */
318
+ quote: string | null;
319
+ source: 'LIVE_EXTRACTION' | 'POST_CALL_EXTRACTION' | 'API' | 'USER';
320
+ value: string;
321
+ }
322
+ }
323
+ }
324
+ }
325
+ export interface CustomerProfileGetByIDResponse {
326
+ data: CustomerProfileGetByIDResponse.Data;
327
+ }
328
+ export declare namespace CustomerProfileGetByIDResponse {
329
+ interface Data {
330
+ /**
331
+ * Unique identifier of the customer profile
332
+ */
333
+ id: string;
334
+ agentIds: Array<string>;
335
+ attributes: Array<Data.Attribute>;
336
+ chatCount: number;
337
+ conversationCount: number;
338
+ /**
339
+ * Null until a name is known, which is common
340
+ */
341
+ displayName: string | null;
342
+ externalId: string | null;
343
+ firstSeenAt: string | null;
344
+ lastSeenAt: string | null;
345
+ /**
346
+ * Your team's shared notes. Never sent to the agent.
347
+ */
348
+ notes: string | null;
349
+ notesUpdatedAt: string | null;
350
+ phoneNumberE164: string | null;
351
+ summary: string | null;
352
+ /**
353
+ * Voice only. Chat time is not included.
354
+ */
355
+ talkTimeMs: number;
356
+ voiceCount: number;
357
+ }
358
+ namespace Data {
359
+ interface Attribute {
360
+ /**
361
+ * What a newer conversation said while this field was locked
362
+ */
363
+ blockedValue: string | null;
364
+ /**
365
+ * The moment the current value was heard. Null for a value set by a person or the
366
+ * API.
367
+ */
368
+ evidence: Attribute.Evidence | null;
369
+ /**
370
+ * Other values this field has held or been offered, newest first
371
+ */
372
+ history: Array<Attribute.History>;
373
+ /**
374
+ * True when newer conversations cannot change this field
375
+ */
376
+ isLocked: boolean;
377
+ key: 'FULL_NAME' | 'PREFERRED_NAME' | 'ACCOUNT_ID' | 'COMPANY' | 'JOB_TITLE' | 'EMAIL' | 'ALTERNATE_PHONE' | 'AGE' | 'GENDER' | 'LANGUAGE' | 'LOCATION' | 'TIMEZONE' | 'BEST_TIME_TO_REACH' | 'PREFERRED_CHANNEL';
378
+ observedAt: string;
379
+ /**
380
+ * Where the current value came from. LIVE and POST_CALL extraction are read from
381
+ * conversations.
382
+ */
383
+ source: 'LIVE_EXTRACTION' | 'POST_CALL_EXTRACTION' | 'API' | 'USER';
384
+ value: string;
385
+ }
386
+ namespace Attribute {
387
+ /**
388
+ * The moment the current value was heard. Null for a value set by a person or the
389
+ * API.
390
+ */
391
+ interface Evidence {
392
+ callId: string | null;
393
+ chatId: string | null;
394
+ observedAt: string;
395
+ /**
396
+ * Where in the conversation this was said
397
+ */
398
+ offsetMs: number | null;
399
+ /**
400
+ * The customer's words. Null on a project with redaction on.
401
+ */
402
+ quote: string | null;
403
+ source: 'LIVE_EXTRACTION' | 'POST_CALL_EXTRACTION' | 'API' | 'USER';
404
+ value: string;
405
+ }
406
+ interface History {
407
+ callId: string | null;
408
+ chatId: string | null;
409
+ observedAt: string;
410
+ /**
411
+ * Where in the conversation this was said
412
+ */
413
+ offsetMs: number | null;
414
+ /**
415
+ * The customer's words. Null on a project with redaction on.
416
+ */
417
+ quote: string | null;
418
+ source: 'LIVE_EXTRACTION' | 'POST_CALL_EXTRACTION' | 'API' | 'USER';
419
+ value: string;
420
+ }
421
+ }
422
+ }
423
+ }
424
+ export interface CustomerProfileListConversationsResponse {
425
+ data: CustomerProfileListConversationsResponse.Data;
426
+ }
427
+ export declare namespace CustomerProfileListConversationsResponse {
428
+ interface Data {
429
+ items: Array<Data.Item>;
430
+ page: number;
431
+ totalCount: number;
432
+ }
433
+ namespace Data {
434
+ interface Item {
435
+ id: string;
436
+ conversationType: 'call' | 'chat';
437
+ durationMs: number | null;
438
+ startedAt: string;
439
+ summary: string | null;
440
+ title: string | null;
441
+ }
442
+ }
443
+ }
444
+ export interface CustomerProfileSetAttributeResponse {
445
+ data: CustomerProfileSetAttributeResponse.Data;
446
+ }
447
+ export declare namespace CustomerProfileSetAttributeResponse {
448
+ interface Data {
449
+ /**
450
+ * Unique identifier of the customer profile
451
+ */
452
+ id: string;
453
+ agentIds: Array<string>;
454
+ attributes: Array<Data.Attribute>;
455
+ chatCount: number;
456
+ conversationCount: number;
457
+ /**
458
+ * Null until a name is known, which is common
459
+ */
460
+ displayName: string | null;
461
+ externalId: string | null;
462
+ firstSeenAt: string | null;
463
+ lastSeenAt: string | null;
464
+ /**
465
+ * Your team's shared notes. Never sent to the agent.
466
+ */
467
+ notes: string | null;
468
+ notesUpdatedAt: string | null;
469
+ phoneNumberE164: string | null;
470
+ summary: string | null;
471
+ /**
472
+ * Voice only. Chat time is not included.
473
+ */
474
+ talkTimeMs: number;
475
+ voiceCount: number;
476
+ }
477
+ namespace Data {
478
+ interface Attribute {
479
+ /**
480
+ * What a newer conversation said while this field was locked
481
+ */
482
+ blockedValue: string | null;
483
+ /**
484
+ * The moment the current value was heard. Null for a value set by a person or the
485
+ * API.
486
+ */
487
+ evidence: Attribute.Evidence | null;
488
+ /**
489
+ * Other values this field has held or been offered, newest first
490
+ */
491
+ history: Array<Attribute.History>;
492
+ /**
493
+ * True when newer conversations cannot change this field
494
+ */
495
+ isLocked: boolean;
496
+ key: 'FULL_NAME' | 'PREFERRED_NAME' | 'ACCOUNT_ID' | 'COMPANY' | 'JOB_TITLE' | 'EMAIL' | 'ALTERNATE_PHONE' | 'AGE' | 'GENDER' | 'LANGUAGE' | 'LOCATION' | 'TIMEZONE' | 'BEST_TIME_TO_REACH' | 'PREFERRED_CHANNEL';
497
+ observedAt: string;
498
+ /**
499
+ * Where the current value came from. LIVE and POST_CALL extraction are read from
500
+ * conversations.
501
+ */
502
+ source: 'LIVE_EXTRACTION' | 'POST_CALL_EXTRACTION' | 'API' | 'USER';
503
+ value: string;
504
+ }
505
+ namespace Attribute {
506
+ /**
507
+ * The moment the current value was heard. Null for a value set by a person or the
508
+ * API.
509
+ */
510
+ interface Evidence {
511
+ callId: string | null;
512
+ chatId: string | null;
513
+ observedAt: string;
514
+ /**
515
+ * Where in the conversation this was said
516
+ */
517
+ offsetMs: number | null;
518
+ /**
519
+ * The customer's words. Null on a project with redaction on.
520
+ */
521
+ quote: string | null;
522
+ source: 'LIVE_EXTRACTION' | 'POST_CALL_EXTRACTION' | 'API' | 'USER';
523
+ value: string;
524
+ }
525
+ interface History {
526
+ callId: string | null;
527
+ chatId: string | null;
528
+ observedAt: string;
529
+ /**
530
+ * Where in the conversation this was said
531
+ */
532
+ offsetMs: number | null;
533
+ /**
534
+ * The customer's words. Null on a project with redaction on.
535
+ */
536
+ quote: string | null;
537
+ source: 'LIVE_EXTRACTION' | 'POST_CALL_EXTRACTION' | 'API' | 'USER';
538
+ value: string;
539
+ }
540
+ }
541
+ }
542
+ }
543
+ export interface CustomerProfileUnlockAttributeResponse {
544
+ data: CustomerProfileUnlockAttributeResponse.Data;
545
+ }
546
+ export declare namespace CustomerProfileUnlockAttributeResponse {
547
+ interface Data {
548
+ /**
549
+ * Unique identifier of the customer profile
550
+ */
551
+ id: string;
552
+ agentIds: Array<string>;
553
+ attributes: Array<Data.Attribute>;
554
+ chatCount: number;
555
+ conversationCount: number;
556
+ /**
557
+ * Null until a name is known, which is common
558
+ */
559
+ displayName: string | null;
560
+ externalId: string | null;
561
+ firstSeenAt: string | null;
562
+ lastSeenAt: string | null;
563
+ /**
564
+ * Your team's shared notes. Never sent to the agent.
565
+ */
566
+ notes: string | null;
567
+ notesUpdatedAt: string | null;
568
+ phoneNumberE164: string | null;
569
+ summary: string | null;
570
+ /**
571
+ * Voice only. Chat time is not included.
572
+ */
573
+ talkTimeMs: number;
574
+ voiceCount: number;
575
+ }
576
+ namespace Data {
577
+ interface Attribute {
578
+ /**
579
+ * What a newer conversation said while this field was locked
580
+ */
581
+ blockedValue: string | null;
582
+ /**
583
+ * The moment the current value was heard. Null for a value set by a person or the
584
+ * API.
585
+ */
586
+ evidence: Attribute.Evidence | null;
587
+ /**
588
+ * Other values this field has held or been offered, newest first
589
+ */
590
+ history: Array<Attribute.History>;
591
+ /**
592
+ * True when newer conversations cannot change this field
593
+ */
594
+ isLocked: boolean;
595
+ key: 'FULL_NAME' | 'PREFERRED_NAME' | 'ACCOUNT_ID' | 'COMPANY' | 'JOB_TITLE' | 'EMAIL' | 'ALTERNATE_PHONE' | 'AGE' | 'GENDER' | 'LANGUAGE' | 'LOCATION' | 'TIMEZONE' | 'BEST_TIME_TO_REACH' | 'PREFERRED_CHANNEL';
596
+ observedAt: string;
597
+ /**
598
+ * Where the current value came from. LIVE and POST_CALL extraction are read from
599
+ * conversations.
600
+ */
601
+ source: 'LIVE_EXTRACTION' | 'POST_CALL_EXTRACTION' | 'API' | 'USER';
602
+ value: string;
603
+ }
604
+ namespace Attribute {
605
+ /**
606
+ * The moment the current value was heard. Null for a value set by a person or the
607
+ * API.
608
+ */
609
+ interface Evidence {
610
+ callId: string | null;
611
+ chatId: string | null;
612
+ observedAt: string;
613
+ /**
614
+ * Where in the conversation this was said
615
+ */
616
+ offsetMs: number | null;
617
+ /**
618
+ * The customer's words. Null on a project with redaction on.
619
+ */
620
+ quote: string | null;
621
+ source: 'LIVE_EXTRACTION' | 'POST_CALL_EXTRACTION' | 'API' | 'USER';
622
+ value: string;
623
+ }
624
+ interface History {
625
+ callId: string | null;
626
+ chatId: string | null;
627
+ observedAt: string;
628
+ /**
629
+ * Where in the conversation this was said
630
+ */
631
+ offsetMs: number | null;
632
+ /**
633
+ * The customer's words. Null on a project with redaction on.
634
+ */
635
+ quote: string | null;
636
+ source: 'LIVE_EXTRACTION' | 'POST_CALL_EXTRACTION' | 'API' | 'USER';
637
+ value: string;
638
+ }
639
+ }
640
+ }
641
+ }
642
+ export interface CustomerProfileUpdateNotesResponse {
643
+ data: CustomerProfileUpdateNotesResponse.Data;
644
+ }
645
+ export declare namespace CustomerProfileUpdateNotesResponse {
646
+ interface Data {
647
+ /**
648
+ * Unique identifier of the customer profile
649
+ */
650
+ id: string;
651
+ agentIds: Array<string>;
652
+ attributes: Array<Data.Attribute>;
653
+ chatCount: number;
654
+ conversationCount: number;
655
+ /**
656
+ * Null until a name is known, which is common
657
+ */
658
+ displayName: string | null;
659
+ externalId: string | null;
660
+ firstSeenAt: string | null;
661
+ lastSeenAt: string | null;
662
+ /**
663
+ * Your team's shared notes. Never sent to the agent.
664
+ */
665
+ notes: string | null;
666
+ notesUpdatedAt: string | null;
667
+ phoneNumberE164: string | null;
668
+ summary: string | null;
669
+ /**
670
+ * Voice only. Chat time is not included.
671
+ */
672
+ talkTimeMs: number;
673
+ voiceCount: number;
674
+ }
675
+ namespace Data {
676
+ interface Attribute {
677
+ /**
678
+ * What a newer conversation said while this field was locked
679
+ */
680
+ blockedValue: string | null;
681
+ /**
682
+ * The moment the current value was heard. Null for a value set by a person or the
683
+ * API.
684
+ */
685
+ evidence: Attribute.Evidence | null;
686
+ /**
687
+ * Other values this field has held or been offered, newest first
688
+ */
689
+ history: Array<Attribute.History>;
690
+ /**
691
+ * True when newer conversations cannot change this field
692
+ */
693
+ isLocked: boolean;
694
+ key: 'FULL_NAME' | 'PREFERRED_NAME' | 'ACCOUNT_ID' | 'COMPANY' | 'JOB_TITLE' | 'EMAIL' | 'ALTERNATE_PHONE' | 'AGE' | 'GENDER' | 'LANGUAGE' | 'LOCATION' | 'TIMEZONE' | 'BEST_TIME_TO_REACH' | 'PREFERRED_CHANNEL';
695
+ observedAt: string;
696
+ /**
697
+ * Where the current value came from. LIVE and POST_CALL extraction are read from
698
+ * conversations.
699
+ */
700
+ source: 'LIVE_EXTRACTION' | 'POST_CALL_EXTRACTION' | 'API' | 'USER';
701
+ value: string;
702
+ }
703
+ namespace Attribute {
704
+ /**
705
+ * The moment the current value was heard. Null for a value set by a person or the
706
+ * API.
707
+ */
708
+ interface Evidence {
709
+ callId: string | null;
710
+ chatId: string | null;
711
+ observedAt: string;
712
+ /**
713
+ * Where in the conversation this was said
714
+ */
715
+ offsetMs: number | null;
716
+ /**
717
+ * The customer's words. Null on a project with redaction on.
718
+ */
719
+ quote: string | null;
720
+ source: 'LIVE_EXTRACTION' | 'POST_CALL_EXTRACTION' | 'API' | 'USER';
721
+ value: string;
722
+ }
723
+ interface History {
724
+ callId: string | null;
725
+ chatId: string | null;
726
+ observedAt: string;
727
+ /**
728
+ * Where in the conversation this was said
729
+ */
730
+ offsetMs: number | null;
731
+ /**
732
+ * The customer's words. Null on a project with redaction on.
733
+ */
734
+ quote: string | null;
735
+ source: 'LIVE_EXTRACTION' | 'POST_CALL_EXTRACTION' | 'API' | 'USER';
736
+ value: string;
737
+ }
738
+ }
739
+ }
740
+ }
741
+ export interface CustomerProfileListParams {
742
+ agentId?: string;
743
+ /**
744
+ * Filter by this field. Use with fieldOperator and, unless checking presence,
745
+ * fieldValue.
746
+ */
747
+ fieldKey?: 'FULL_NAME' | 'PREFERRED_NAME' | 'ACCOUNT_ID' | 'COMPANY' | 'JOB_TITLE' | 'EMAIL' | 'ALTERNATE_PHONE' | 'AGE' | 'GENDER' | 'LANGUAGE' | 'LOCATION' | 'TIMEZONE' | 'BEST_TIME_TO_REACH' | 'PREFERRED_CHANNEL';
748
+ /**
749
+ * How fieldValue is compared, ignoring case. NOT_EQUALS includes customers without
750
+ * the field.
751
+ */
752
+ fieldOperator?: 'EQUALS' | 'NOT_EQUALS' | 'CONTAINS' | 'STARTS_WITH' | 'IS_SET' | 'IS_NOT_SET';
753
+ fieldValue?: string;
754
+ /**
755
+ * Include customers we hold nothing about beyond their identifier. Defaults to
756
+ * false.
757
+ */
758
+ includeNoData?: 'true' | 'false';
759
+ limit?: number;
760
+ modality?: 'call' | 'chat';
761
+ page?: number;
762
+ search?: string;
763
+ /**
764
+ * A column, or field.<KEY> (for example field.COMPANY) to sort by a field's value.
765
+ * Customers without a value sort last.
766
+ */
767
+ sortBy?: 'lastSeenAt' | 'firstSeenAt' | 'conversationCount' | 'voiceCount' | 'chatCount' | 'talkTimeMs' | 'displayName' | 'field.FULL_NAME' | 'field.PREFERRED_NAME' | 'field.ACCOUNT_ID' | 'field.COMPANY' | 'field.JOB_TITLE' | 'field.EMAIL' | 'field.ALTERNATE_PHONE' | 'field.AGE' | 'field.GENDER' | 'field.LANGUAGE' | 'field.LOCATION' | 'field.TIMEZONE' | 'field.BEST_TIME_TO_REACH' | 'field.PREFERRED_CHANNEL';
768
+ sortDirection?: 'asc' | 'desc';
769
+ }
770
+ export interface CustomerProfileClearAttributeParams {
771
+ customerProfileId: string;
772
+ }
773
+ export interface CustomerProfileListConversationsParams {
774
+ limit?: number;
775
+ page?: number;
776
+ }
777
+ export interface CustomerProfileSetAttributeParams {
778
+ /**
779
+ * Path param
780
+ */
781
+ customerProfileId: string;
782
+ /**
783
+ * Body param: The new value. Setting a field locks it, so newer conversations
784
+ * cannot change it.
785
+ */
786
+ value: string;
787
+ }
788
+ export interface CustomerProfileUnlockAttributeParams {
789
+ customerProfileId: string;
790
+ }
791
+ export interface CustomerProfileUpdateNotesParams {
792
+ /**
793
+ * Replaces the existing notes. Null or empty clears them.
794
+ */
795
+ notes: string | null;
796
+ }
797
+ export declare namespace CustomerProfile {
798
+ export { type CustomerProfileListResponse as CustomerProfileListResponse, type CustomerProfileDeleteResponse as CustomerProfileDeleteResponse, type CustomerProfileClearAttributeResponse as CustomerProfileClearAttributeResponse, type CustomerProfileGetByIDResponse as CustomerProfileGetByIDResponse, type CustomerProfileListConversationsResponse as CustomerProfileListConversationsResponse, type CustomerProfileSetAttributeResponse as CustomerProfileSetAttributeResponse, type CustomerProfileUnlockAttributeResponse as CustomerProfileUnlockAttributeResponse, type CustomerProfileUpdateNotesResponse as CustomerProfileUpdateNotesResponse, type CustomerProfileListParams as CustomerProfileListParams, type CustomerProfileClearAttributeParams as CustomerProfileClearAttributeParams, type CustomerProfileListConversationsParams as CustomerProfileListConversationsParams, type CustomerProfileSetAttributeParams as CustomerProfileSetAttributeParams, type CustomerProfileUnlockAttributeParams as CustomerProfileUnlockAttributeParams, type CustomerProfileUpdateNotesParams as CustomerProfileUpdateNotesParams, };
799
+ }
800
+ //# sourceMappingURL=customer-profile.d.mts.map