@voiflow/sdk 0.0.0-stage → 0.1.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,1999 @@
1
+ import { BinaryResponse, HttpClient } from "./http.js";
2
+ import { SSEEvent } from "./sse.js";
3
+ type Fields = Record<string, unknown>;
4
+ export declare class Businesses {
5
+ private readonly http;
6
+ constructor(http: HttpClient);
7
+ list(params?: {
8
+ extraQuery?: Record<string, string>;
9
+ }): AsyncGenerator<{
10
+ "id": string;
11
+ "name": string;
12
+ "slug": string;
13
+ "active": boolean;
14
+ "archived"?: boolean;
15
+ "way"?: string;
16
+ "style_id"?: string;
17
+ "business_type"?: string;
18
+ "region"?: string;
19
+ "timezone"?: string;
20
+ "currency"?: string;
21
+ "enabled_workspaces"?: (string)[];
22
+ "billing_state"?: string;
23
+ "billing_error"?: string;
24
+ "created_ts"?: number;
25
+ "action_required"?: (Record<string, string>) | null;
26
+ }, void, void>;
27
+ /** May throw VoiFlowOperationPending (HTTP 202): the outcome is not yet known — do not repeat under a new key. */
28
+ create(body: {
29
+ "name": string;
30
+ "style_id": string;
31
+ "way"?: "" | "native" | "integrated" | "hybrid";
32
+ "business_type"?: string;
33
+ }, options?: {
34
+ idempotencyKey?: string;
35
+ }): Promise<{
36
+ "id": string;
37
+ "name": string;
38
+ "slug": string;
39
+ "active": boolean;
40
+ "archived"?: boolean;
41
+ "way"?: string;
42
+ "style_id"?: string;
43
+ "business_type"?: string;
44
+ "region"?: string;
45
+ "timezone"?: string;
46
+ "currency"?: string;
47
+ "enabled_workspaces"?: (string)[];
48
+ "billing_state"?: string;
49
+ "billing_error"?: string;
50
+ "created_ts"?: number;
51
+ "action_required"?: (Record<string, string>) | null;
52
+ }>;
53
+ retrieve(businessId: string, params?: {
54
+ extraQuery?: Record<string, string>;
55
+ }): Promise<{
56
+ "id": string;
57
+ "name": string;
58
+ "slug": string;
59
+ "active": boolean;
60
+ "archived"?: boolean;
61
+ "way"?: string;
62
+ "style_id"?: string;
63
+ "business_type"?: string;
64
+ "region"?: string;
65
+ "timezone"?: string;
66
+ "currency"?: string;
67
+ "enabled_workspaces"?: (string)[];
68
+ "billing_state"?: string;
69
+ "billing_error"?: string;
70
+ "created_ts"?: number;
71
+ "action_required"?: (Record<string, string>) | null;
72
+ }>;
73
+ /** May throw VoiFlowOperationPending (HTTP 202): the outcome is not yet known — do not repeat under a new key. */
74
+ update(businessId: string, body: {
75
+ "name"?: (string) | null;
76
+ "active"?: (boolean) | null;
77
+ "archived"?: (boolean) | null;
78
+ }): Promise<{
79
+ "id": string;
80
+ "name": string;
81
+ "slug": string;
82
+ "active": boolean;
83
+ "archived"?: boolean;
84
+ "way"?: string;
85
+ "style_id"?: string;
86
+ "business_type"?: string;
87
+ "region"?: string;
88
+ "timezone"?: string;
89
+ "currency"?: string;
90
+ "enabled_workspaces"?: (string)[];
91
+ "billing_state"?: string;
92
+ "billing_error"?: string;
93
+ "created_ts"?: number;
94
+ "action_required"?: (Record<string, string>) | null;
95
+ }>;
96
+ readiness(businessId: string, params?: {
97
+ extraQuery?: Record<string, string>;
98
+ }): Promise<{
99
+ "ready"?: boolean;
100
+ "items"?: (Record<string, unknown>)[];
101
+ }>;
102
+ settings(businessId: string, params?: {
103
+ extraQuery?: Record<string, string>;
104
+ }): Promise<{
105
+ "id": string;
106
+ "name": string;
107
+ "slug"?: string;
108
+ "way"?: string;
109
+ "region"?: string;
110
+ "timezone"?: string;
111
+ "currency"?: string;
112
+ "temperament"?: string;
113
+ "disclosure"?: string;
114
+ "disclosure_line"?: string;
115
+ "disclose_upfront"?: boolean;
116
+ "record_calls"?: boolean;
117
+ "webhook_url"?: string;
118
+ "features"?: Record<string, unknown>;
119
+ "policies"?: Record<string, unknown>;
120
+ "vocabulary"?: Record<string, unknown>;
121
+ "compliance_profile"?: string;
122
+ }>;
123
+ /** May throw VoiFlowOperationPending (HTTP 202): the outcome is not yet known — do not repeat under a new key. */
124
+ updateSettings(businessId: string, body?: {
125
+ "currency"?: (string) | null;
126
+ "temperament"?: (string) | null;
127
+ "disclosure"?: (string) | null;
128
+ "disclosure_line"?: (string) | null;
129
+ "disclose_upfront"?: (boolean) | null;
130
+ "webhook_url"?: (string) | null;
131
+ "enabled_workspaces"?: (("calls" | "messages" | "email")[]) | null;
132
+ "dnc_acknowledged"?: (boolean) | null;
133
+ "queueing"?: (Record<string, unknown>) | null;
134
+ "comms"?: (Record<string, unknown>) | null;
135
+ "privacy"?: (Record<string, unknown>) | null;
136
+ "approvals"?: (Record<string, unknown>) | null;
137
+ "policies"?: ({
138
+ "calling_window"?: (Record<string, unknown>) | null;
139
+ "business_hours"?: (Record<string, unknown>) | null;
140
+ "max_attempts"?: (number) | null;
141
+ "min_gap_minutes"?: (number) | null;
142
+ "marketing_contacts"?: (boolean) | null;
143
+ "approval_timeout_s"?: (number) | null;
144
+ "live_wait_s"?: (number) | null;
145
+ }) | null;
146
+ }, options?: {
147
+ idempotencyKey?: string;
148
+ }): Promise<{
149
+ "ok"?: boolean;
150
+ "changed"?: (string)[];
151
+ "warnings"?: (string)[];
152
+ }>;
153
+ }
154
+ export declare class Agents {
155
+ private readonly http;
156
+ constructor(http: HttpClient);
157
+ list(params?: {
158
+ businessId?: string;
159
+ extraQuery?: Record<string, string>;
160
+ }): AsyncGenerator<{
161
+ "id": string;
162
+ "name": string;
163
+ "status"?: string;
164
+ "description"?: string;
165
+ "direction"?: string;
166
+ "journey_id"?: string;
167
+ "voice"?: string;
168
+ "language_policy"?: Record<string, unknown>;
169
+ "knowledge_ids"?: (string)[];
170
+ "guardrails"?: (string)[];
171
+ "purpose_tags"?: (string)[];
172
+ "temperament"?: string;
173
+ "tone"?: string;
174
+ "greeting"?: string;
175
+ "persona"?: string;
176
+ "organization"?: string;
177
+ "success_criteria"?: string;
178
+ "created_ts"?: number;
179
+ "updated_ts"?: number;
180
+ }, void, void>;
181
+ /** May throw VoiFlowOperationPending (HTTP 202): the outcome is not yet known — do not repeat under a new key. */
182
+ create(body?: {
183
+ "name"?: (string) | null;
184
+ "description"?: (string) | null;
185
+ "channel"?: ("voice" | "whatsapp" | "sms" | "email") | null;
186
+ "account_id"?: (string) | null;
187
+ "direction"?: ("inbound" | "outbound" | "both") | null;
188
+ "journey_id"?: (string) | null;
189
+ "journey_lane"?: (string) | null;
190
+ "journey_approach"?: (string) | null;
191
+ "purpose_tags"?: ((string)[]) | null;
192
+ "voice"?: (string) | null;
193
+ "voice_intent"?: (string) | null;
194
+ "language_policy"?: (Record<string, unknown>) | null;
195
+ "greeting"?: (string) | null;
196
+ "persona"?: (string) | null;
197
+ "tone"?: (string) | null;
198
+ "temperament"?: (string) | null;
199
+ "counterpart_expectation"?: (string) | null;
200
+ "success_criteria"?: (string) | null;
201
+ "guardrails"?: ((string)[]) | null;
202
+ "must_not_invent"?: ((string)[]) | null;
203
+ "business_facts"?: ((string)[]) | null;
204
+ "knowledge_ids"?: ((string)[]) | null;
205
+ "model_tier"?: (string) | null;
206
+ "presentations"?: (Record<string, unknown>) | null;
207
+ "status"?: ("draft" | "live" | "paused") | null;
208
+ }, options?: {
209
+ businessId?: string;
210
+ idempotencyKey?: string;
211
+ }): Promise<{
212
+ "id": string;
213
+ "name": string;
214
+ "status"?: string;
215
+ "description"?: string;
216
+ "direction"?: string;
217
+ "journey_id"?: string;
218
+ "voice"?: string;
219
+ "language_policy"?: Record<string, unknown>;
220
+ "knowledge_ids"?: (string)[];
221
+ "guardrails"?: (string)[];
222
+ "purpose_tags"?: (string)[];
223
+ "temperament"?: string;
224
+ "tone"?: string;
225
+ "greeting"?: string;
226
+ "persona"?: string;
227
+ "organization"?: string;
228
+ "success_criteria"?: string;
229
+ "created_ts"?: number;
230
+ "updated_ts"?: number;
231
+ }>;
232
+ retrieve(agentId: string, params?: {
233
+ businessId?: string;
234
+ extraQuery?: Record<string, string>;
235
+ }): Promise<{
236
+ "id": string;
237
+ "name": string;
238
+ "status"?: string;
239
+ "description"?: string;
240
+ "direction"?: string;
241
+ "journey_id"?: string;
242
+ "voice"?: string;
243
+ "language_policy"?: Record<string, unknown>;
244
+ "knowledge_ids"?: (string)[];
245
+ "guardrails"?: (string)[];
246
+ "purpose_tags"?: (string)[];
247
+ "temperament"?: string;
248
+ "tone"?: string;
249
+ "greeting"?: string;
250
+ "persona"?: string;
251
+ "organization"?: string;
252
+ "success_criteria"?: string;
253
+ "created_ts"?: number;
254
+ "updated_ts"?: number;
255
+ }>;
256
+ /** May throw VoiFlowOperationPending (HTTP 202): the outcome is not yet known — do not repeat under a new key. */
257
+ update(agentId: string, body?: {
258
+ "name"?: (string) | null;
259
+ "description"?: (string) | null;
260
+ "channel"?: ("voice" | "whatsapp" | "sms" | "email") | null;
261
+ "account_id"?: (string) | null;
262
+ "direction"?: ("inbound" | "outbound" | "both") | null;
263
+ "journey_id"?: (string) | null;
264
+ "journey_lane"?: (string) | null;
265
+ "journey_approach"?: (string) | null;
266
+ "purpose_tags"?: ((string)[]) | null;
267
+ "voice"?: (string) | null;
268
+ "voice_intent"?: (string) | null;
269
+ "language_policy"?: (Record<string, unknown>) | null;
270
+ "greeting"?: (string) | null;
271
+ "persona"?: (string) | null;
272
+ "tone"?: (string) | null;
273
+ "temperament"?: (string) | null;
274
+ "counterpart_expectation"?: (string) | null;
275
+ "success_criteria"?: (string) | null;
276
+ "guardrails"?: ((string)[]) | null;
277
+ "must_not_invent"?: ((string)[]) | null;
278
+ "business_facts"?: ((string)[]) | null;
279
+ "knowledge_ids"?: ((string)[]) | null;
280
+ "model_tier"?: (string) | null;
281
+ "presentations"?: (Record<string, unknown>) | null;
282
+ "status"?: ("draft" | "live" | "paused") | null;
283
+ }, options?: {
284
+ businessId?: string;
285
+ idempotencyKey?: string;
286
+ }): Promise<{
287
+ "id": string;
288
+ "name": string;
289
+ "status"?: string;
290
+ "description"?: string;
291
+ "direction"?: string;
292
+ "journey_id"?: string;
293
+ "voice"?: string;
294
+ "language_policy"?: Record<string, unknown>;
295
+ "knowledge_ids"?: (string)[];
296
+ "guardrails"?: (string)[];
297
+ "purpose_tags"?: (string)[];
298
+ "temperament"?: string;
299
+ "tone"?: string;
300
+ "greeting"?: string;
301
+ "persona"?: string;
302
+ "organization"?: string;
303
+ "success_criteria"?: string;
304
+ "created_ts"?: number;
305
+ "updated_ts"?: number;
306
+ }>;
307
+ /** May throw VoiFlowOperationPending (HTTP 202): the outcome is not yet known — do not repeat under a new key. */
308
+ delete(agentId: string, options?: {
309
+ businessId?: string;
310
+ idempotencyKey?: string;
311
+ }): Promise<Fields>;
312
+ /** May throw VoiFlowOperationPending (HTTP 202): the outcome is not yet known — do not repeat under a new key. */
313
+ publish(agentId: string, body?: {
314
+ "account_id"?: (string) | null;
315
+ }, options?: {
316
+ businessId?: string;
317
+ idempotencyKey?: string;
318
+ }): Promise<{
319
+ "id": string;
320
+ "name": string;
321
+ "status"?: string;
322
+ "description"?: string;
323
+ "direction"?: string;
324
+ "journey_id"?: string;
325
+ "voice"?: string;
326
+ "language_policy"?: Record<string, unknown>;
327
+ "knowledge_ids"?: (string)[];
328
+ "guardrails"?: (string)[];
329
+ "purpose_tags"?: (string)[];
330
+ "temperament"?: string;
331
+ "tone"?: string;
332
+ "greeting"?: string;
333
+ "persona"?: string;
334
+ "organization"?: string;
335
+ "success_criteria"?: string;
336
+ "created_ts"?: number;
337
+ "updated_ts"?: number;
338
+ }>;
339
+ voiceOptions(agentId: string, params?: {
340
+ businessId?: string;
341
+ extraQuery?: Record<string, string>;
342
+ }): Promise<Fields>;
343
+ }
344
+ export declare class Journeys {
345
+ private readonly http;
346
+ constructor(http: HttpClient);
347
+ list(params?: {
348
+ businessId?: string;
349
+ extraQuery?: Record<string, string>;
350
+ }): AsyncGenerator<{
351
+ "id": string;
352
+ "name": string;
353
+ "call_type"?: string;
354
+ "channel"?: string;
355
+ "enabled_channels"?: (string)[];
356
+ "draft_version"?: number;
357
+ "latest_version"?: number;
358
+ "published_version"?: number;
359
+ "agent_ids"?: (string)[];
360
+ "created_ts"?: number;
361
+ "updated_ts"?: number;
362
+ }, void, void>;
363
+ /** May throw VoiFlowOperationPending (HTTP 202): the outcome is not yet known — do not repeat under a new key. */
364
+ create(body?: {
365
+ "name"?: string;
366
+ "call_type"?: string;
367
+ "channel"?: "" | "voice" | "messages" | "email";
368
+ }, options?: {
369
+ businessId?: string;
370
+ idempotencyKey?: string;
371
+ }): Promise<{
372
+ "id": string;
373
+ "name": string;
374
+ "call_type"?: string;
375
+ "channel"?: string;
376
+ "enabled_channels"?: (string)[];
377
+ "draft_version"?: number;
378
+ "latest_version"?: number;
379
+ "published_version"?: number;
380
+ "agent_ids"?: (string)[];
381
+ "created_ts"?: number;
382
+ "updated_ts"?: number;
383
+ }>;
384
+ retrieve(journeyId: string, params?: {
385
+ businessId?: string;
386
+ extraQuery?: Record<string, string>;
387
+ }): Promise<{
388
+ "id": string;
389
+ "name": string;
390
+ "call_type"?: string;
391
+ "channel"?: string;
392
+ "enabled_channels"?: (string)[];
393
+ "draft_version"?: number;
394
+ "latest_version"?: number;
395
+ "published_version"?: number;
396
+ "agent_ids"?: (string)[];
397
+ "created_ts"?: number;
398
+ "updated_ts"?: number;
399
+ }>;
400
+ /** May throw VoiFlowOperationPending (HTTP 202): the outcome is not yet known — do not repeat under a new key. */
401
+ update(journeyId: string, body?: {
402
+ "name"?: (string) | null;
403
+ "call_type"?: (string) | null;
404
+ }, options?: {
405
+ businessId?: string;
406
+ idempotencyKey?: string;
407
+ }): Promise<{
408
+ "id": string;
409
+ "name": string;
410
+ "call_type"?: string;
411
+ "channel"?: string;
412
+ "enabled_channels"?: (string)[];
413
+ "draft_version"?: number;
414
+ "latest_version"?: number;
415
+ "published_version"?: number;
416
+ "agent_ids"?: (string)[];
417
+ "created_ts"?: number;
418
+ "updated_ts"?: number;
419
+ }>;
420
+ draft(journeyId: string, params?: {
421
+ businessId?: string;
422
+ extraQuery?: Record<string, string>;
423
+ }): Promise<{
424
+ "journey_id"?: string;
425
+ "version"?: number;
426
+ "source"?: string;
427
+ "notes"?: string;
428
+ "lanes"?: Record<string, unknown>;
429
+ "source_meta"?: Record<string, unknown>;
430
+ "created_ts"?: number;
431
+ }>;
432
+ /** May throw VoiFlowOperationPending (HTTP 202): the outcome is not yet known — do not repeat under a new key. */
433
+ saveDraft(journeyId: string, body: {
434
+ "lanes": Record<string, unknown>;
435
+ "source_meta"?: Record<string, unknown>;
436
+ "notes"?: string;
437
+ }, options?: {
438
+ businessId?: string;
439
+ idempotencyKey?: string;
440
+ }): Promise<{
441
+ "journey_id"?: string;
442
+ "version"?: number;
443
+ "source"?: string;
444
+ "notes"?: string;
445
+ "lanes"?: Record<string, unknown>;
446
+ "source_meta"?: Record<string, unknown>;
447
+ "created_ts"?: number;
448
+ }>;
449
+ /** May throw VoiFlowOperationPending (HTTP 202): the outcome is not yet known — do not repeat under a new key. */
450
+ createVersion(journeyId: string, body: {
451
+ "lanes": Record<string, unknown>;
452
+ "source_meta"?: Record<string, unknown>;
453
+ "notes"?: string;
454
+ }, options?: {
455
+ businessId?: string;
456
+ idempotencyKey?: string;
457
+ }): Promise<{
458
+ "journey_id"?: string;
459
+ "version"?: number;
460
+ "source"?: string;
461
+ "notes"?: string;
462
+ "lanes"?: Record<string, unknown>;
463
+ "source_meta"?: Record<string, unknown>;
464
+ "created_ts"?: number;
465
+ }>;
466
+ retrieveVersion(journeyId: string, version: string, params?: {
467
+ businessId?: string;
468
+ extraQuery?: Record<string, string>;
469
+ }): Promise<{
470
+ "journey_id"?: string;
471
+ "version"?: number;
472
+ "source"?: string;
473
+ "notes"?: string;
474
+ "lanes"?: Record<string, unknown>;
475
+ "source_meta"?: Record<string, unknown>;
476
+ "created_ts"?: number;
477
+ }>;
478
+ /** May throw VoiFlowOperationPending (HTTP 202): the outcome is not yet known — do not repeat under a new key. */
479
+ publish(journeyId: string, body: {
480
+ "version": number;
481
+ }, options?: {
482
+ businessId?: string;
483
+ idempotencyKey?: string;
484
+ }): Promise<{
485
+ "id": string;
486
+ "name": string;
487
+ "call_type"?: string;
488
+ "channel"?: string;
489
+ "enabled_channels"?: (string)[];
490
+ "draft_version"?: number;
491
+ "latest_version"?: number;
492
+ "published_version"?: number;
493
+ "agent_ids"?: (string)[];
494
+ "created_ts"?: number;
495
+ "updated_ts"?: number;
496
+ }>;
497
+ impact(journeyId: string, params?: {
498
+ businessId?: string;
499
+ extraQuery?: Record<string, string>;
500
+ }): Promise<{
501
+ "approaches"?: (Record<string, unknown>)[];
502
+ "open_requests"?: number;
503
+ "open_requests_by_version"?: Record<string, unknown>;
504
+ }>;
505
+ }
506
+ export declare class Connections {
507
+ private readonly http;
508
+ constructor(http: HttpClient);
509
+ list(params?: {
510
+ businessId?: string;
511
+ extraQuery?: Record<string, string>;
512
+ }): AsyncGenerator<{
513
+ "id": string;
514
+ "port"?: string;
515
+ "adapter_name"?: string;
516
+ "display_name"?: string;
517
+ "slot"?: string;
518
+ "status"?: string;
519
+ "connected_account"?: string;
520
+ "granted_scopes"?: (string)[];
521
+ "last_error_code"?: string;
522
+ "last_error_message"?: string;
523
+ "repair_action"?: string;
524
+ "provider_environment"?: string;
525
+ "verified_ts"?: number;
526
+ "created_ts"?: number;
527
+ "updated_ts"?: number;
528
+ }, void, void>;
529
+ /** May throw VoiFlowOperationPending (HTTP 202): the outcome is not yet known — do not repeat under a new key. */
530
+ create(body: {
531
+ "port": string;
532
+ "adapter_name": string;
533
+ "display_name"?: string;
534
+ "slot"?: string;
535
+ "config"?: Record<string, unknown>;
536
+ }, options?: {
537
+ businessId?: string;
538
+ idempotencyKey?: string;
539
+ }): Promise<{
540
+ "id": string;
541
+ "port"?: string;
542
+ "adapter_name"?: string;
543
+ "display_name"?: string;
544
+ "slot"?: string;
545
+ "status"?: string;
546
+ "connected_account"?: string;
547
+ "granted_scopes"?: (string)[];
548
+ "last_error_code"?: string;
549
+ "last_error_message"?: string;
550
+ "repair_action"?: string;
551
+ "provider_environment"?: string;
552
+ "verified_ts"?: number;
553
+ "created_ts"?: number;
554
+ "updated_ts"?: number;
555
+ }>;
556
+ retrieve(connectionId: string, params?: {
557
+ businessId?: string;
558
+ extraQuery?: Record<string, string>;
559
+ }): Promise<{
560
+ "id": string;
561
+ "port"?: string;
562
+ "adapter_name"?: string;
563
+ "display_name"?: string;
564
+ "slot"?: string;
565
+ "status"?: string;
566
+ "connected_account"?: string;
567
+ "granted_scopes"?: (string)[];
568
+ "last_error_code"?: string;
569
+ "last_error_message"?: string;
570
+ "repair_action"?: string;
571
+ "provider_environment"?: string;
572
+ "verified_ts"?: number;
573
+ "created_ts"?: number;
574
+ "updated_ts"?: number;
575
+ }>;
576
+ /** May throw VoiFlowOperationPending (HTTP 202): the outcome is not yet known — do not repeat under a new key. */
577
+ update(connectionId: string, body?: {
578
+ "display_name"?: (string) | null;
579
+ "config"?: (Record<string, unknown>) | null;
580
+ "status"?: ("active" | "paused") | null;
581
+ }, options?: {
582
+ businessId?: string;
583
+ idempotencyKey?: string;
584
+ }): Promise<{
585
+ "id": string;
586
+ "port"?: string;
587
+ "adapter_name"?: string;
588
+ "display_name"?: string;
589
+ "slot"?: string;
590
+ "status"?: string;
591
+ "connected_account"?: string;
592
+ "granted_scopes"?: (string)[];
593
+ "last_error_code"?: string;
594
+ "last_error_message"?: string;
595
+ "repair_action"?: string;
596
+ "provider_environment"?: string;
597
+ "verified_ts"?: number;
598
+ "created_ts"?: number;
599
+ "updated_ts"?: number;
600
+ }>;
601
+ readiness(connectionId: string, params?: {
602
+ businessId?: string;
603
+ extraQuery?: Record<string, string>;
604
+ }): Promise<{
605
+ "id"?: string;
606
+ "status"?: string;
607
+ "started_ts"?: number;
608
+ "finished_ts"?: number;
609
+ "detail"?: Record<string, unknown>;
610
+ }>;
611
+ }
612
+ export declare class Integrations {
613
+ private readonly http;
614
+ constructor(http: HttpClient);
615
+ list(params?: {
616
+ businessId?: string;
617
+ extraQuery?: Record<string, string>;
618
+ }): Promise<Fields>;
619
+ }
620
+ export declare class ChannelAccounts {
621
+ private readonly http;
622
+ constructor(http: HttpClient);
623
+ list(params?: {
624
+ businessId?: string;
625
+ extraQuery?: Record<string, string>;
626
+ }): AsyncGenerator<{
627
+ "id": string;
628
+ "channel"?: string;
629
+ "address"?: string;
630
+ "display_name"?: string;
631
+ "audience"?: string;
632
+ "enabled"?: boolean;
633
+ "connection_id"?: string;
634
+ "agent_id"?: string;
635
+ "journey_id"?: string;
636
+ "can_send"?: (boolean) | null;
637
+ "connection_status"?: string;
638
+ "effective_access"?: Record<string, unknown>;
639
+ "created_ts"?: number;
640
+ "updated_ts"?: number;
641
+ }, void, void>;
642
+ /** May throw VoiFlowOperationPending (HTTP 202): the outcome is not yet known — do not repeat under a new key. */
643
+ create(body: {
644
+ "connection_id": string;
645
+ "channel": "sms" | "whatsapp" | "email";
646
+ "address": string;
647
+ "display_name"?: string;
648
+ "audience"?: string;
649
+ "agent_id"?: string;
650
+ "journey_id"?: string;
651
+ }, options?: {
652
+ businessId?: string;
653
+ idempotencyKey?: string;
654
+ }): Promise<{
655
+ "id": string;
656
+ "channel"?: string;
657
+ "address"?: string;
658
+ "display_name"?: string;
659
+ "audience"?: string;
660
+ "enabled"?: boolean;
661
+ "connection_id"?: string;
662
+ "agent_id"?: string;
663
+ "journey_id"?: string;
664
+ "can_send"?: (boolean) | null;
665
+ "connection_status"?: string;
666
+ "effective_access"?: Record<string, unknown>;
667
+ "created_ts"?: number;
668
+ "updated_ts"?: number;
669
+ }>;
670
+ }
671
+ export declare class Lines {
672
+ private readonly http;
673
+ constructor(http: HttpClient);
674
+ /** May throw VoiFlowOperationPending (HTTP 202): the outcome is not yet known — do not repeat under a new key. */
675
+ update(lineId: string, body?: {
676
+ "label"?: (string) | null;
677
+ "role"?: ("inbound" | "outbound" | "both") | null;
678
+ "inbound_agent_id"?: (string) | null;
679
+ "agent_ids"?: ((string)[]) | null;
680
+ "answer_when_idle"?: (boolean) | null;
681
+ "dial_when_idle"?: (boolean) | null;
682
+ "priority"?: (number) | null;
683
+ "max_calls_per_hour"?: (number) | null;
684
+ "max_calls_per_day"?: (number) | null;
685
+ "audience"?: ("customer" | "staff") | null;
686
+ }, options?: {
687
+ businessId?: string;
688
+ idempotencyKey?: string;
689
+ }): Promise<{
690
+ "id": string;
691
+ "e164"?: string;
692
+ "label"?: string;
693
+ "kind"?: string;
694
+ "role"?: string;
695
+ "status"?: string;
696
+ "audience"?: string;
697
+ "health"?: string;
698
+ "inbound_agent_id"?: string;
699
+ "allocation_mode"?: string;
700
+ "capacity"?: number;
701
+ "created_ts"?: number;
702
+ }>;
703
+ list(params?: {
704
+ businessId?: string;
705
+ extraQuery?: Record<string, string>;
706
+ }): Promise<{
707
+ "id": string;
708
+ "e164"?: string;
709
+ "label"?: string;
710
+ "kind"?: string;
711
+ "role"?: string;
712
+ "status"?: string;
713
+ "audience"?: string;
714
+ "health"?: string;
715
+ "inbound_agent_id"?: string;
716
+ "allocation_mode"?: string;
717
+ "capacity"?: number;
718
+ "created_ts"?: number;
719
+ }>;
720
+ }
721
+ export declare class Contacts {
722
+ private readonly http;
723
+ constructor(http: HttpClient);
724
+ list(params?: {
725
+ search?: string;
726
+ stage?: string;
727
+ businessId?: string;
728
+ extraQuery?: Record<string, string>;
729
+ }): AsyncGenerator<{
730
+ "id": string;
731
+ "name"?: string;
732
+ "phone"?: string;
733
+ "email"?: string;
734
+ "stage"?: string;
735
+ "tags"?: (string)[];
736
+ "language"?: string;
737
+ "consent"?: (boolean) | null;
738
+ "dnc"?: boolean;
739
+ "vip"?: boolean;
740
+ "notes"?: string;
741
+ "created_ts"?: number;
742
+ "updated_ts"?: number;
743
+ }, void, void>;
744
+ /** May throw VoiFlowOperationPending (HTTP 202): the outcome is not yet known — do not repeat under a new key. */
745
+ create(body?: {
746
+ "fields"?: Record<string, unknown>;
747
+ "name"?: string;
748
+ "phone"?: string;
749
+ "email"?: string;
750
+ "stage"?: string;
751
+ "tags"?: (string)[];
752
+ "language"?: string;
753
+ "notes"?: string;
754
+ "consent"?: (boolean) | null;
755
+ }, options?: {
756
+ businessId?: string;
757
+ idempotencyKey?: string;
758
+ }): Promise<{
759
+ "id": string;
760
+ "name"?: string;
761
+ "phone"?: string;
762
+ "email"?: string;
763
+ "stage"?: string;
764
+ "tags"?: (string)[];
765
+ "language"?: string;
766
+ "consent"?: (boolean) | null;
767
+ "dnc"?: boolean;
768
+ "vip"?: boolean;
769
+ "notes"?: string;
770
+ "created_ts"?: number;
771
+ "updated_ts"?: number;
772
+ }>;
773
+ retrieve(contactId: string, params?: {
774
+ businessId?: string;
775
+ extraQuery?: Record<string, string>;
776
+ }): Promise<{
777
+ "id": string;
778
+ "name"?: string;
779
+ "phone"?: string;
780
+ "email"?: string;
781
+ "stage"?: string;
782
+ "tags"?: (string)[];
783
+ "language"?: string;
784
+ "consent"?: (boolean) | null;
785
+ "dnc"?: boolean;
786
+ "vip"?: boolean;
787
+ "notes"?: string;
788
+ "created_ts"?: number;
789
+ "updated_ts"?: number;
790
+ }>;
791
+ /** May throw VoiFlowOperationPending (HTTP 202): the outcome is not yet known — do not repeat under a new key. */
792
+ update(contactId: string, body?: {
793
+ "fields"?: Record<string, unknown>;
794
+ "name"?: string;
795
+ "phone"?: string;
796
+ "email"?: string;
797
+ "stage"?: string;
798
+ "tags"?: (string)[];
799
+ "language"?: string;
800
+ "notes"?: string;
801
+ "consent"?: (boolean) | null;
802
+ }, options?: {
803
+ businessId?: string;
804
+ idempotencyKey?: string;
805
+ }): Promise<{
806
+ "id": string;
807
+ "name"?: string;
808
+ "phone"?: string;
809
+ "email"?: string;
810
+ "stage"?: string;
811
+ "tags"?: (string)[];
812
+ "language"?: string;
813
+ "consent"?: (boolean) | null;
814
+ "dnc"?: boolean;
815
+ "vip"?: boolean;
816
+ "notes"?: string;
817
+ "created_ts"?: number;
818
+ "updated_ts"?: number;
819
+ }>;
820
+ /** May throw VoiFlowOperationPending (HTTP 202): the outcome is not yet known — do not repeat under a new key. */
821
+ setDnc(contactId: string, body?: {
822
+ "dnc"?: boolean;
823
+ "reason"?: string;
824
+ }, options?: {
825
+ businessId?: string;
826
+ idempotencyKey?: string;
827
+ }): Promise<{
828
+ "id": string;
829
+ "name"?: string;
830
+ "phone"?: string;
831
+ "email"?: string;
832
+ "stage"?: string;
833
+ "tags"?: (string)[];
834
+ "language"?: string;
835
+ "consent"?: (boolean) | null;
836
+ "dnc"?: boolean;
837
+ "vip"?: boolean;
838
+ "notes"?: string;
839
+ "created_ts"?: number;
840
+ "updated_ts"?: number;
841
+ }>;
842
+ }
843
+ export declare class Enquiries {
844
+ private readonly http;
845
+ constructor(http: HttpClient);
846
+ list(params?: {
847
+ state?: string;
848
+ businessId?: string;
849
+ extraQuery?: Record<string, string>;
850
+ }): AsyncGenerator<{
851
+ "id": string;
852
+ "title"?: string;
853
+ "status"?: string;
854
+ "goal"?: string;
855
+ "contact_id"?: string;
856
+ "owner_agent_id"?: string;
857
+ "journey_id"?: string;
858
+ "journey_version"?: number;
859
+ "campaign_id"?: string;
860
+ "run_id"?: string;
861
+ "ai_paused"?: boolean;
862
+ "milestones"?: (unknown)[];
863
+ "created_ts"?: number;
864
+ "updated_ts"?: number;
865
+ "closed_ts"?: number;
866
+ }, void, void>;
867
+ retrieve(requestId: string, params?: {
868
+ businessId?: string;
869
+ extraQuery?: Record<string, string>;
870
+ }): Promise<{
871
+ "id": string;
872
+ "title"?: string;
873
+ "status"?: string;
874
+ "goal"?: string;
875
+ "contact_id"?: string;
876
+ "owner_agent_id"?: string;
877
+ "journey_id"?: string;
878
+ "journey_version"?: number;
879
+ "campaign_id"?: string;
880
+ "run_id"?: string;
881
+ "ai_paused"?: boolean;
882
+ "milestones"?: (unknown)[];
883
+ "created_ts"?: number;
884
+ "updated_ts"?: number;
885
+ "closed_ts"?: number;
886
+ }>;
887
+ }
888
+ export declare class Appointments {
889
+ private readonly http;
890
+ constructor(http: HttpClient);
891
+ list(params?: {
892
+ fromMs?: string;
893
+ toMs?: string;
894
+ businessId?: string;
895
+ extraQuery?: Record<string, string>;
896
+ }): AsyncGenerator<{
897
+ "id": string;
898
+ "title"?: string;
899
+ "status"?: string;
900
+ "service"?: string;
901
+ "starts_at_ms"?: number;
902
+ "duration_min"?: number;
903
+ "timezone"?: string;
904
+ "location"?: string;
905
+ "contact_id"?: string;
906
+ "contact_name"?: string;
907
+ "phone"?: string;
908
+ "resource_id"?: string;
909
+ "party_size"?: number;
910
+ "notes"?: string;
911
+ "source"?: string;
912
+ "created_ts"?: number;
913
+ "updated_ts"?: number;
914
+ }, void, void>;
915
+ /** May throw VoiFlowOperationPending (HTTP 202): the outcome is not yet known — do not repeat under a new key. */
916
+ create(body: {
917
+ "starts_at_ms": number;
918
+ "duration_min"?: number;
919
+ "service"?: string;
920
+ "title"?: string;
921
+ "contact_id"?: string;
922
+ "contact_name"?: string;
923
+ "phone"?: string;
924
+ "resource_id"?: string;
925
+ "party_size"?: number;
926
+ "location"?: string;
927
+ "notes"?: string;
928
+ "timezone"?: string;
929
+ }, options?: {
930
+ businessId?: string;
931
+ idempotencyKey?: string;
932
+ }): Promise<{
933
+ "id": string;
934
+ "title"?: string;
935
+ "status"?: string;
936
+ "service"?: string;
937
+ "starts_at_ms"?: number;
938
+ "duration_min"?: number;
939
+ "timezone"?: string;
940
+ "location"?: string;
941
+ "contact_id"?: string;
942
+ "contact_name"?: string;
943
+ "phone"?: string;
944
+ "resource_id"?: string;
945
+ "party_size"?: number;
946
+ "notes"?: string;
947
+ "source"?: string;
948
+ "created_ts"?: number;
949
+ "updated_ts"?: number;
950
+ }>;
951
+ }
952
+ export declare class Calendar {
953
+ private readonly http;
954
+ constructor(http: HttpClient);
955
+ availability(params?: {
956
+ fromMs?: string;
957
+ toMs?: string;
958
+ resourceId?: string;
959
+ service?: string;
960
+ businessId?: string;
961
+ extraQuery?: Record<string, string>;
962
+ }): Promise<{
963
+ "available"?: boolean;
964
+ "slots"?: (Record<string, unknown>)[];
965
+ "unavailable_slots"?: (Record<string, unknown>)[];
966
+ }>;
967
+ resources(params?: {
968
+ businessId?: string;
969
+ extraQuery?: Record<string, string>;
970
+ }): Promise<{
971
+ "id": string;
972
+ "name"?: string;
973
+ "kind"?: string;
974
+ "active"?: boolean;
975
+ "capacity"?: number;
976
+ "slot_minutes"?: number;
977
+ "specializations"?: (unknown)[];
978
+ "tier"?: string;
979
+ "notes"?: string;
980
+ }>;
981
+ }
982
+ export declare class Knowledge {
983
+ private readonly http;
984
+ constructor(http: HttpClient);
985
+ list(params?: {
986
+ businessId?: string;
987
+ extraQuery?: Record<string, string>;
988
+ }): AsyncGenerator<{
989
+ "id": string;
990
+ "kind"?: string;
991
+ "question"?: string;
992
+ "answer"?: string;
993
+ "content"?: string;
994
+ "agent_id"?: string;
995
+ "campaign_ids"?: (string)[];
996
+ "available_channels"?: (string)[];
997
+ "last_reviewed_ts"?: number;
998
+ "review_by"?: number;
999
+ "updated_ts"?: number;
1000
+ }, void, void>;
1001
+ /** May throw VoiFlowOperationPending (HTTP 202): the outcome is not yet known — do not repeat under a new key. */
1002
+ create(body?: {
1003
+ "kind"?: "fact" | "qa" | "policy" | "content";
1004
+ "question"?: string;
1005
+ "answer"?: string;
1006
+ "content"?: string;
1007
+ "agent_id"?: string;
1008
+ "available_channels"?: ("voice" | "sms" | "whatsapp" | "email" | "internal")[];
1009
+ }, options?: {
1010
+ businessId?: string;
1011
+ idempotencyKey?: string;
1012
+ }): Promise<{
1013
+ "id": string;
1014
+ "kind"?: string;
1015
+ "question"?: string;
1016
+ "answer"?: string;
1017
+ "content"?: string;
1018
+ "agent_id"?: string;
1019
+ "campaign_ids"?: (string)[];
1020
+ "available_channels"?: (string)[];
1021
+ "last_reviewed_ts"?: number;
1022
+ "review_by"?: number;
1023
+ "updated_ts"?: number;
1024
+ }>;
1025
+ /** May throw VoiFlowOperationPending (HTTP 202): the outcome is not yet known — do not repeat under a new key. */
1026
+ update(itemId: string, body?: {
1027
+ "kind"?: "fact" | "qa" | "policy" | "content";
1028
+ "question"?: string;
1029
+ "answer"?: string;
1030
+ "content"?: string;
1031
+ "agent_id"?: string;
1032
+ "available_channels"?: ("voice" | "sms" | "whatsapp" | "email" | "internal")[];
1033
+ }, options?: {
1034
+ businessId?: string;
1035
+ idempotencyKey?: string;
1036
+ }): Promise<{
1037
+ "id": string;
1038
+ "kind"?: string;
1039
+ "question"?: string;
1040
+ "answer"?: string;
1041
+ "content"?: string;
1042
+ "agent_id"?: string;
1043
+ "campaign_ids"?: (string)[];
1044
+ "available_channels"?: (string)[];
1045
+ "last_reviewed_ts"?: number;
1046
+ "review_by"?: number;
1047
+ "updated_ts"?: number;
1048
+ }>;
1049
+ /** May throw VoiFlowOperationPending (HTTP 202): the outcome is not yet known — do not repeat under a new key. */
1050
+ publish(itemId: string, options?: {
1051
+ businessId?: string;
1052
+ idempotencyKey?: string;
1053
+ }): Promise<{
1054
+ "id": string;
1055
+ "kind"?: string;
1056
+ "question"?: string;
1057
+ "answer"?: string;
1058
+ "content"?: string;
1059
+ "agent_id"?: string;
1060
+ "campaign_ids"?: (string)[];
1061
+ "available_channels"?: (string)[];
1062
+ "last_reviewed_ts"?: number;
1063
+ "review_by"?: number;
1064
+ "updated_ts"?: number;
1065
+ }>;
1066
+ }
1067
+ export declare class Files {
1068
+ private readonly http;
1069
+ constructor(http: HttpClient);
1070
+ list(params?: {
1071
+ businessId?: string;
1072
+ extraQuery?: Record<string, string>;
1073
+ }): AsyncGenerator<{
1074
+ "id": string;
1075
+ "title"?: string;
1076
+ "description"?: string;
1077
+ "state"?: string;
1078
+ "current_version_id"?: string;
1079
+ "share_original"?: boolean;
1080
+ "agent_id"?: string;
1081
+ "available_channels"?: (string)[];
1082
+ "created_ts"?: number;
1083
+ "updated_ts"?: number;
1084
+ }, void, void>;
1085
+ /** Multipart upload: `file` is the document; `metadata` is optional JSON (title, description, ...). */
1086
+ upload(file: Blob | Uint8Array, options?: {
1087
+ filename?: string;
1088
+ contentType?: string;
1089
+ metadata?: Record<string, unknown>;
1090
+ businessId?: string;
1091
+ idempotencyKey?: string;
1092
+ }): Promise<{
1093
+ "id": string;
1094
+ "title"?: string;
1095
+ "description"?: string;
1096
+ "state"?: string;
1097
+ "current_version_id"?: string;
1098
+ "share_original"?: boolean;
1099
+ "agent_id"?: string;
1100
+ "available_channels"?: (string)[];
1101
+ "created_ts"?: number;
1102
+ "updated_ts"?: number;
1103
+ }>;
1104
+ retrieve(docId: string, params?: {
1105
+ businessId?: string;
1106
+ extraQuery?: Record<string, string>;
1107
+ }): Promise<{
1108
+ "id": string;
1109
+ "title"?: string;
1110
+ "description"?: string;
1111
+ "state"?: string;
1112
+ "current_version_id"?: string;
1113
+ "share_original"?: boolean;
1114
+ "agent_id"?: string;
1115
+ "available_channels"?: (string)[];
1116
+ "created_ts"?: number;
1117
+ "updated_ts"?: number;
1118
+ }>;
1119
+ /** The stored original as raw bytes. */
1120
+ download(docId: string, params?: {
1121
+ businessId?: string;
1122
+ }): Promise<BinaryResponse>;
1123
+ }
1124
+ export declare class Projects {
1125
+ private readonly http;
1126
+ constructor(http: HttpClient);
1127
+ list(params?: {
1128
+ businessId?: string;
1129
+ extraQuery?: Record<string, string>;
1130
+ }): AsyncGenerator<{
1131
+ "id": string;
1132
+ "name": string;
1133
+ "purpose"?: string;
1134
+ "status"?: string;
1135
+ "success_measure"?: string;
1136
+ "created_ts"?: number;
1137
+ "updated_ts"?: number;
1138
+ }, void, void>;
1139
+ /** May throw VoiFlowOperationPending (HTTP 202): the outcome is not yet known — do not repeat under a new key. */
1140
+ create(body: {
1141
+ "name": string;
1142
+ "purpose"?: string;
1143
+ "success_measure"?: "" | "booking" | "goal_met";
1144
+ "status"?: string;
1145
+ }, options?: {
1146
+ businessId?: string;
1147
+ idempotencyKey?: string;
1148
+ }): Promise<{
1149
+ "id": string;
1150
+ "name": string;
1151
+ "purpose"?: string;
1152
+ "status"?: string;
1153
+ "success_measure"?: string;
1154
+ "created_ts"?: number;
1155
+ "updated_ts"?: number;
1156
+ }>;
1157
+ }
1158
+ export declare class Campaigns {
1159
+ private readonly http;
1160
+ constructor(http: HttpClient);
1161
+ list(params?: {
1162
+ projectId?: string;
1163
+ status?: string;
1164
+ businessId?: string;
1165
+ extraQuery?: Record<string, string>;
1166
+ }): AsyncGenerator<{
1167
+ "id": string;
1168
+ "name": string;
1169
+ "status"?: string;
1170
+ "channel"?: string;
1171
+ "approach_label"?: string;
1172
+ "mission_text"?: string;
1173
+ "account_id"?: string;
1174
+ "run_id"?: string;
1175
+ "revision"?: number;
1176
+ "created_ts"?: number;
1177
+ }, void, void>;
1178
+ /** May throw VoiFlowOperationPending (HTTP 202): the outcome is not yet known — do not repeat under a new key. */
1179
+ create(body: {
1180
+ "name": string;
1181
+ "channel"?: "voice" | "whatsapp" | "sms" | "email";
1182
+ "account_id"?: string;
1183
+ "journey_id"?: string;
1184
+ "journey_version"?: string;
1185
+ "mission_text"?: string;
1186
+ "call_type"?: string;
1187
+ "audience"?: Record<string, unknown>;
1188
+ "calling_window"?: Record<string, unknown>;
1189
+ "weekdays"?: (string)[];
1190
+ "starts_on"?: string;
1191
+ "ends_on"?: string;
1192
+ "max_attempts"?: number;
1193
+ "min_gap_minutes"?: number;
1194
+ "max_per_day"?: number;
1195
+ "max_parallel"?: number;
1196
+ "agent_id"?: string;
1197
+ "agent_ids"?: (string)[];
1198
+ "line_ids"?: (string)[];
1199
+ "temperament"?: string;
1200
+ "agent_language_rule"?: Record<string, unknown>;
1201
+ "delivery_config"?: Record<string, unknown>;
1202
+ }, options?: {
1203
+ businessId?: string;
1204
+ idempotencyKey?: string;
1205
+ }): Promise<{
1206
+ "id": string;
1207
+ "name": string;
1208
+ "status"?: string;
1209
+ "channel"?: string;
1210
+ "approach_label"?: string;
1211
+ "mission_text"?: string;
1212
+ "account_id"?: string;
1213
+ "run_id"?: string;
1214
+ "revision"?: number;
1215
+ "created_ts"?: number;
1216
+ }>;
1217
+ retrieve(campaignId: string, params?: {
1218
+ businessId?: string;
1219
+ extraQuery?: Record<string, string>;
1220
+ }): Promise<{
1221
+ "id": string;
1222
+ "name": string;
1223
+ "status"?: string;
1224
+ "channel"?: string;
1225
+ "approach_label"?: string;
1226
+ "mission_text"?: string;
1227
+ "account_id"?: string;
1228
+ "run_id"?: string;
1229
+ "revision"?: number;
1230
+ "created_ts"?: number;
1231
+ }>;
1232
+ /** May throw VoiFlowOperationPending (HTTP 202): the outcome is not yet known — do not repeat under a new key. */
1233
+ update(campaignId: string, body?: {
1234
+ "name"?: (string) | null;
1235
+ "channel"?: ("voice" | "whatsapp" | "sms" | "email") | null;
1236
+ "account_id"?: (string) | null;
1237
+ "journey_id"?: (string) | null;
1238
+ "journey_version"?: (string) | null;
1239
+ "mission_text"?: (string) | null;
1240
+ "call_type"?: (string) | null;
1241
+ "audience"?: (Record<string, unknown>) | null;
1242
+ "calling_window"?: (Record<string, unknown>) | null;
1243
+ "weekdays"?: ((string)[]) | null;
1244
+ "starts_on"?: (string) | null;
1245
+ "ends_on"?: (string) | null;
1246
+ "max_attempts"?: (number) | null;
1247
+ "min_gap_minutes"?: (number) | null;
1248
+ "max_per_day"?: (number) | null;
1249
+ "max_parallel"?: (number) | null;
1250
+ "agent_id"?: (string) | null;
1251
+ "agent_ids"?: ((string)[]) | null;
1252
+ "line_ids"?: ((string)[]) | null;
1253
+ "temperament"?: (string) | null;
1254
+ "agent_language_rule"?: (Record<string, unknown>) | null;
1255
+ "delivery_config"?: (Record<string, unknown>) | null;
1256
+ }, options?: {
1257
+ businessId?: string;
1258
+ idempotencyKey?: string;
1259
+ }): Promise<{
1260
+ "id": string;
1261
+ "name": string;
1262
+ "status"?: string;
1263
+ "channel"?: string;
1264
+ "approach_label"?: string;
1265
+ "mission_text"?: string;
1266
+ "account_id"?: string;
1267
+ "run_id"?: string;
1268
+ "revision"?: number;
1269
+ "created_ts"?: number;
1270
+ }>;
1271
+ /** May throw VoiFlowOperationPending (HTTP 202): the outcome is not yet known — do not repeat under a new key. */
1272
+ setStatus(campaignId: string, body: {
1273
+ "status": "running" | "paused" | "done";
1274
+ "reason"?: string;
1275
+ }, options?: {
1276
+ businessId?: string;
1277
+ idempotencyKey?: string;
1278
+ }): Promise<{
1279
+ "id": string;
1280
+ "name": string;
1281
+ "status"?: string;
1282
+ "channel"?: string;
1283
+ "approach_label"?: string;
1284
+ "mission_text"?: string;
1285
+ "account_id"?: string;
1286
+ "run_id"?: string;
1287
+ "revision"?: number;
1288
+ "created_ts"?: number;
1289
+ }>;
1290
+ stats(campaignId: string, params?: {
1291
+ businessId?: string;
1292
+ extraQuery?: Record<string, string>;
1293
+ }): Promise<{
1294
+ "total"?: number;
1295
+ "by_status"?: Record<string, unknown>;
1296
+ "outcomes"?: Record<string, unknown>;
1297
+ }>;
1298
+ }
1299
+ export declare class Runs {
1300
+ private readonly http;
1301
+ constructor(http: HttpClient);
1302
+ retrieve(runId: string, params?: {
1303
+ businessId?: string;
1304
+ extraQuery?: Record<string, string>;
1305
+ }): Promise<{
1306
+ "id": string;
1307
+ "name"?: string;
1308
+ "status"?: string;
1309
+ "group_id"?: string;
1310
+ "started_ts"?: number;
1311
+ "finished_ts"?: number;
1312
+ "finish_reason"?: string;
1313
+ "unfinished_count"?: number;
1314
+ "created_ts"?: number;
1315
+ }>;
1316
+ stats(runId: string, params?: {
1317
+ businessId?: string;
1318
+ extraQuery?: Record<string, string>;
1319
+ }): Promise<{
1320
+ "total"?: number;
1321
+ "by_status"?: Record<string, unknown>;
1322
+ "outcomes"?: Record<string, unknown>;
1323
+ }>;
1324
+ /** May throw VoiFlowOperationPending (HTTP 202): the outcome is not yet known — do not repeat under a new key. */
1325
+ create(body: {
1326
+ "group_id": string;
1327
+ "name"?: string;
1328
+ "approaches"?: ((Record<string, unknown>)[]) | null;
1329
+ "acknowledged_overlap"?: boolean;
1330
+ }, options?: {
1331
+ businessId?: string;
1332
+ idempotencyKey?: string;
1333
+ }): Promise<{
1334
+ "id": string;
1335
+ "name"?: string;
1336
+ "status"?: string;
1337
+ "group_id"?: string;
1338
+ "started_ts"?: number;
1339
+ "finished_ts"?: number;
1340
+ "finish_reason"?: string;
1341
+ "unfinished_count"?: number;
1342
+ "created_ts"?: number;
1343
+ }>;
1344
+ }
1345
+ export declare class Calls {
1346
+ private readonly http;
1347
+ constructor(http: HttpClient);
1348
+ list(params?: {
1349
+ agentId?: string;
1350
+ direction?: string;
1351
+ days?: string;
1352
+ businessId?: string;
1353
+ extraQuery?: Record<string, string>;
1354
+ }): AsyncGenerator<{
1355
+ "call_id": string;
1356
+ "status"?: string;
1357
+ "direction"?: string;
1358
+ "outcome"?: string;
1359
+ "summary"?: string;
1360
+ "agent_id"?: string;
1361
+ "agent_name"?: string;
1362
+ "contact_id"?: string;
1363
+ "contact_name"?: string;
1364
+ "from_number"?: string;
1365
+ "did"?: string;
1366
+ "line_id"?: string;
1367
+ "journey_id"?: string;
1368
+ "journey_version"?: number;
1369
+ "campaign_id"?: string;
1370
+ "minutes"?: number;
1371
+ "started_ts"?: number;
1372
+ "ended_ts"?: number;
1373
+ "close_cause"?: string;
1374
+ }, void, void>;
1375
+ /** May throw VoiFlowOperationPending (HTTP 202): the outcome is not yet known — do not repeat under a new key. */
1376
+ create(body: {
1377
+ "agent_id": string;
1378
+ "contact_id"?: string;
1379
+ "mission"?: string;
1380
+ "call_type"?: string;
1381
+ }, options?: {
1382
+ businessId?: string;
1383
+ idempotencyKey?: string;
1384
+ }): Promise<{
1385
+ "call_id": string;
1386
+ "business_id"?: string;
1387
+ "status"?: string;
1388
+ "mode"?: string;
1389
+ "max_call_minutes"?: number;
1390
+ "events_url"?: string;
1391
+ }>;
1392
+ retrieve(callId: string, params?: {
1393
+ businessId?: string;
1394
+ extraQuery?: Record<string, string>;
1395
+ }): Promise<{
1396
+ "call_id": string;
1397
+ "status"?: string;
1398
+ "direction"?: string;
1399
+ "outcome"?: string;
1400
+ "summary"?: string;
1401
+ "agent_id"?: string;
1402
+ "agent_name"?: string;
1403
+ "contact_id"?: string;
1404
+ "contact_name"?: string;
1405
+ "from_number"?: string;
1406
+ "did"?: string;
1407
+ "line_id"?: string;
1408
+ "journey_id"?: string;
1409
+ "journey_version"?: number;
1410
+ "campaign_id"?: string;
1411
+ "minutes"?: number;
1412
+ "started_ts"?: number;
1413
+ "ended_ts"?: number;
1414
+ "close_cause"?: string;
1415
+ }>;
1416
+ /** May throw VoiFlowOperationPending (HTTP 202): the outcome is not yet known — do not repeat under a new key. */
1417
+ end(callId: string, options?: {
1418
+ businessId?: string;
1419
+ idempotencyKey?: string;
1420
+ }): Promise<{
1421
+ "call_id": string;
1422
+ "business_id"?: string;
1423
+ "status"?: string;
1424
+ }>;
1425
+ /** May throw VoiFlowOperationPending (HTTP 202): the outcome is not yet known — do not repeat under a new key. */
1426
+ steer(callId: string, body: {
1427
+ "text": string;
1428
+ }, options?: {
1429
+ businessId?: string;
1430
+ idempotencyKey?: string;
1431
+ }): Promise<{
1432
+ "call_id": string;
1433
+ "business_id"?: string;
1434
+ "status"?: string;
1435
+ }>;
1436
+ transcript(callId: string, params?: {
1437
+ businessId?: string;
1438
+ extraQuery?: Record<string, string>;
1439
+ }): AsyncGenerator<{
1440
+ "seq"?: number;
1441
+ "speaker"?: string;
1442
+ "text"?: string;
1443
+ "ts"?: number;
1444
+ }, void, void>;
1445
+ recording(callId: string, params?: {
1446
+ businessId?: string;
1447
+ extraQuery?: Record<string, string>;
1448
+ }): Promise<{
1449
+ "status"?: string;
1450
+ "url"?: string;
1451
+ "capture_started_ts"?: number;
1452
+ }>;
1453
+ stream(params: {
1454
+ call: string;
1455
+ businessId?: string;
1456
+ }, options?: {
1457
+ signal?: AbortSignal;
1458
+ lastEventId?: string;
1459
+ }): AsyncGenerator<SSEEvent, void, void>;
1460
+ }
1461
+ export declare class Conversations {
1462
+ private readonly http;
1463
+ constructor(http: HttpClient);
1464
+ list(params?: {
1465
+ channel?: string;
1466
+ contactId?: string;
1467
+ state?: string;
1468
+ businessId?: string;
1469
+ extraQuery?: Record<string, string>;
1470
+ }): AsyncGenerator<{
1471
+ "id": string;
1472
+ "channel"?: string;
1473
+ "state"?: string;
1474
+ "ownership"?: string;
1475
+ "account_id"?: string;
1476
+ "contact_id"?: string;
1477
+ "agent_id"?: string;
1478
+ "journey_id"?: string;
1479
+ "peer_endpoint"?: string;
1480
+ "unread_count"?: number;
1481
+ "has_inbound"?: boolean;
1482
+ "has_outbound"?: boolean;
1483
+ "last_activity_ts"?: number;
1484
+ "created_ts"?: number;
1485
+ }, void, void>;
1486
+ /** May throw VoiFlowOperationPending (HTTP 202): the outcome is not yet known — do not repeat under a new key. */
1487
+ create(body: {
1488
+ "channel": "sms" | "whatsapp" | "email";
1489
+ "account_id": string;
1490
+ "contact_id"?: string;
1491
+ "peer_endpoint"?: string;
1492
+ "agent_id"?: string;
1493
+ "journey_id"?: string;
1494
+ }, options?: {
1495
+ businessId?: string;
1496
+ idempotencyKey?: string;
1497
+ }): Promise<{
1498
+ "id": string;
1499
+ "channel"?: string;
1500
+ "state"?: string;
1501
+ "ownership"?: string;
1502
+ "account_id"?: string;
1503
+ "contact_id"?: string;
1504
+ "agent_id"?: string;
1505
+ "journey_id"?: string;
1506
+ "peer_endpoint"?: string;
1507
+ "unread_count"?: number;
1508
+ "has_inbound"?: boolean;
1509
+ "has_outbound"?: boolean;
1510
+ "last_activity_ts"?: number;
1511
+ "created_ts"?: number;
1512
+ }>;
1513
+ retrieve(cid: string, params?: {
1514
+ businessId?: string;
1515
+ extraQuery?: Record<string, string>;
1516
+ }): Promise<{
1517
+ "id": string;
1518
+ "channel"?: string;
1519
+ "state"?: string;
1520
+ "ownership"?: string;
1521
+ "account_id"?: string;
1522
+ "contact_id"?: string;
1523
+ "agent_id"?: string;
1524
+ "journey_id"?: string;
1525
+ "peer_endpoint"?: string;
1526
+ "unread_count"?: number;
1527
+ "has_inbound"?: boolean;
1528
+ "has_outbound"?: boolean;
1529
+ "last_activity_ts"?: number;
1530
+ "created_ts"?: number;
1531
+ }>;
1532
+ listMessages(cid: string, params?: {
1533
+ businessId?: string;
1534
+ extraQuery?: Record<string, string>;
1535
+ }): AsyncGenerator<{
1536
+ "id"?: string;
1537
+ "seq"?: number;
1538
+ "direction"?: string;
1539
+ "state"?: string;
1540
+ "body"?: string;
1541
+ "subject"?: string;
1542
+ "created_ts"?: number;
1543
+ "delivered_ts"?: number;
1544
+ "read_ts"?: number;
1545
+ "failure_reason"?: string;
1546
+ }, void, void>;
1547
+ /** May throw VoiFlowOperationPending (HTTP 202): the outcome is not yet known — do not repeat under a new key. */
1548
+ sendMessage(cid: string, body?: {
1549
+ "body"?: string;
1550
+ "template_name"?: string;
1551
+ "template_variables"?: Record<string, string>;
1552
+ "file_ids"?: (string)[];
1553
+ "subject"?: string;
1554
+ }, options?: {
1555
+ businessId?: string;
1556
+ idempotencyKey?: string;
1557
+ }): Promise<{
1558
+ "id"?: string;
1559
+ "seq"?: number;
1560
+ "direction"?: string;
1561
+ "state"?: string;
1562
+ "body"?: string;
1563
+ "subject"?: string;
1564
+ "created_ts"?: number;
1565
+ "delivered_ts"?: number;
1566
+ "read_ts"?: number;
1567
+ "failure_reason"?: string;
1568
+ }>;
1569
+ /** May throw VoiFlowOperationPending (HTTP 202): the outcome is not yet known — do not repeat under a new key. */
1570
+ takeover(cid: string, options?: {
1571
+ businessId?: string;
1572
+ idempotencyKey?: string;
1573
+ }): Promise<{
1574
+ "id": string;
1575
+ "channel"?: string;
1576
+ "state"?: string;
1577
+ "ownership"?: string;
1578
+ "account_id"?: string;
1579
+ "contact_id"?: string;
1580
+ "agent_id"?: string;
1581
+ "journey_id"?: string;
1582
+ "peer_endpoint"?: string;
1583
+ "unread_count"?: number;
1584
+ "has_inbound"?: boolean;
1585
+ "has_outbound"?: boolean;
1586
+ "last_activity_ts"?: number;
1587
+ "created_ts"?: number;
1588
+ }>;
1589
+ /** May throw VoiFlowOperationPending (HTTP 202): the outcome is not yet known — do not repeat under a new key. */
1590
+ resumeAi(cid: string, options?: {
1591
+ businessId?: string;
1592
+ idempotencyKey?: string;
1593
+ }): Promise<{
1594
+ "id": string;
1595
+ "channel"?: string;
1596
+ "state"?: string;
1597
+ "ownership"?: string;
1598
+ "account_id"?: string;
1599
+ "contact_id"?: string;
1600
+ "agent_id"?: string;
1601
+ "journey_id"?: string;
1602
+ "peer_endpoint"?: string;
1603
+ "unread_count"?: number;
1604
+ "has_inbound"?: boolean;
1605
+ "has_outbound"?: boolean;
1606
+ "last_activity_ts"?: number;
1607
+ "created_ts"?: number;
1608
+ }>;
1609
+ }
1610
+ export declare class AiWork {
1611
+ private readonly http;
1612
+ constructor(http: HttpClient);
1613
+ list(params?: {
1614
+ state?: string;
1615
+ channel?: string;
1616
+ contactId?: string;
1617
+ originKind?: string;
1618
+ originId?: string;
1619
+ fromTs?: string;
1620
+ toTs?: string;
1621
+ businessId?: string;
1622
+ extraQuery?: Record<string, string>;
1623
+ }): AsyncGenerator<{
1624
+ "id": string;
1625
+ "title"?: string;
1626
+ "detail"?: string;
1627
+ "promise_kind"?: string;
1628
+ "action_kind"?: string;
1629
+ "status"?: string;
1630
+ "execution_state"?: string;
1631
+ "action_channel"?: string;
1632
+ "wait_reason"?: string;
1633
+ "completion_policy"?: string;
1634
+ "outcome"?: string;
1635
+ "result"?: (unknown) | null;
1636
+ "schedule"?: Record<string, unknown>;
1637
+ "overdue"?: boolean;
1638
+ "overdue_ms"?: number;
1639
+ "dependencies"?: (unknown)[];
1640
+ "moved_from_channel"?: (string) | null;
1641
+ "account_id"?: string;
1642
+ "contact_id"?: string;
1643
+ "call_id"?: string;
1644
+ "operation_id"?: string;
1645
+ "origin_ref"?: Record<string, unknown>;
1646
+ "due_ts"?: number;
1647
+ "created_ts"?: number;
1648
+ "closed_ts"?: number;
1649
+ }, void, void>;
1650
+ retrieve(promiseId: string, params?: {
1651
+ businessId?: string;
1652
+ extraQuery?: Record<string, string>;
1653
+ }): Promise<{
1654
+ "id": string;
1655
+ "title"?: string;
1656
+ "detail"?: string;
1657
+ "promise_kind"?: string;
1658
+ "action_kind"?: string;
1659
+ "status"?: string;
1660
+ "execution_state"?: string;
1661
+ "action_channel"?: string;
1662
+ "wait_reason"?: string;
1663
+ "completion_policy"?: string;
1664
+ "outcome"?: string;
1665
+ "result"?: (unknown) | null;
1666
+ "schedule"?: Record<string, unknown>;
1667
+ "overdue"?: boolean;
1668
+ "overdue_ms"?: number;
1669
+ "dependencies"?: (unknown)[];
1670
+ "moved_from_channel"?: (string) | null;
1671
+ "account_id"?: string;
1672
+ "contact_id"?: string;
1673
+ "call_id"?: string;
1674
+ "operation_id"?: string;
1675
+ "origin_ref"?: Record<string, unknown>;
1676
+ "due_ts"?: number;
1677
+ "created_ts"?: number;
1678
+ "closed_ts"?: number;
1679
+ }>;
1680
+ /** May throw VoiFlowOperationPending (HTTP 202): the outcome is not yet known — do not repeat under a new key. */
1681
+ cancel(promiseId: string, options?: {
1682
+ businessId?: string;
1683
+ idempotencyKey?: string;
1684
+ }): Promise<{
1685
+ "id": string;
1686
+ "title"?: string;
1687
+ "detail"?: string;
1688
+ "promise_kind"?: string;
1689
+ "action_kind"?: string;
1690
+ "status"?: string;
1691
+ "execution_state"?: string;
1692
+ "action_channel"?: string;
1693
+ "wait_reason"?: string;
1694
+ "completion_policy"?: string;
1695
+ "outcome"?: string;
1696
+ "result"?: (unknown) | null;
1697
+ "schedule"?: Record<string, unknown>;
1698
+ "overdue"?: boolean;
1699
+ "overdue_ms"?: number;
1700
+ "dependencies"?: (unknown)[];
1701
+ "moved_from_channel"?: (string) | null;
1702
+ "account_id"?: string;
1703
+ "contact_id"?: string;
1704
+ "call_id"?: string;
1705
+ "operation_id"?: string;
1706
+ "origin_ref"?: Record<string, unknown>;
1707
+ "due_ts"?: number;
1708
+ "created_ts"?: number;
1709
+ "closed_ts"?: number;
1710
+ }>;
1711
+ /** May throw VoiFlowOperationPending (HTTP 202): the outcome is not yet known — do not repeat under a new key. */
1712
+ requeue(promiseId: string, options?: {
1713
+ businessId?: string;
1714
+ idempotencyKey?: string;
1715
+ }): Promise<{
1716
+ "id": string;
1717
+ "title"?: string;
1718
+ "detail"?: string;
1719
+ "promise_kind"?: string;
1720
+ "action_kind"?: string;
1721
+ "status"?: string;
1722
+ "execution_state"?: string;
1723
+ "action_channel"?: string;
1724
+ "wait_reason"?: string;
1725
+ "completion_policy"?: string;
1726
+ "outcome"?: string;
1727
+ "result"?: (unknown) | null;
1728
+ "schedule"?: Record<string, unknown>;
1729
+ "overdue"?: boolean;
1730
+ "overdue_ms"?: number;
1731
+ "dependencies"?: (unknown)[];
1732
+ "moved_from_channel"?: (string) | null;
1733
+ "account_id"?: string;
1734
+ "contact_id"?: string;
1735
+ "call_id"?: string;
1736
+ "operation_id"?: string;
1737
+ "origin_ref"?: Record<string, unknown>;
1738
+ "due_ts"?: number;
1739
+ "created_ts"?: number;
1740
+ "closed_ts"?: number;
1741
+ }>;
1742
+ }
1743
+ export declare class WebhookEndpoints {
1744
+ private readonly http;
1745
+ constructor(http: HttpClient);
1746
+ list(params?: {
1747
+ businessId?: string;
1748
+ extraQuery?: Record<string, string>;
1749
+ }): AsyncGenerator<{
1750
+ "id": string;
1751
+ "business_id": string;
1752
+ "url": string;
1753
+ "event_types"?: (string)[];
1754
+ "enabled"?: boolean;
1755
+ "description"?: string;
1756
+ "environment"?: string;
1757
+ "disabled_reason"?: string;
1758
+ "created_ts"?: number;
1759
+ "last_delivery_ts"?: number;
1760
+ }, void, void>;
1761
+ /** May throw VoiFlowOperationPending (HTTP 202): the outcome is not yet known — do not repeat under a new key. */
1762
+ create(body: {
1763
+ "url": string;
1764
+ "event_types"?: (string)[];
1765
+ "description"?: string;
1766
+ }, options?: {
1767
+ businessId?: string;
1768
+ idempotencyKey?: string;
1769
+ }): Promise<{
1770
+ "id": string;
1771
+ "business_id": string;
1772
+ "url": string;
1773
+ "event_types"?: (string)[];
1774
+ "enabled"?: boolean;
1775
+ "description"?: string;
1776
+ "environment"?: string;
1777
+ "disabled_reason"?: string;
1778
+ "created_ts"?: number;
1779
+ "last_delivery_ts"?: number;
1780
+ "secret"?: string;
1781
+ "secret_redacted"?: boolean;
1782
+ }>;
1783
+ retrieve(endpointId: string, params?: {
1784
+ businessId?: string;
1785
+ extraQuery?: Record<string, string>;
1786
+ }): Promise<{
1787
+ "id": string;
1788
+ "business_id": string;
1789
+ "url": string;
1790
+ "event_types"?: (string)[];
1791
+ "enabled"?: boolean;
1792
+ "description"?: string;
1793
+ "environment"?: string;
1794
+ "disabled_reason"?: string;
1795
+ "created_ts"?: number;
1796
+ "last_delivery_ts"?: number;
1797
+ }>;
1798
+ /** May throw VoiFlowOperationPending (HTTP 202): the outcome is not yet known — do not repeat under a new key. */
1799
+ update(endpointId: string, body?: {
1800
+ "url"?: (string) | null;
1801
+ "event_types"?: ((string)[]) | null;
1802
+ "enabled"?: (boolean) | null;
1803
+ "description"?: (string) | null;
1804
+ }, options?: {
1805
+ businessId?: string;
1806
+ idempotencyKey?: string;
1807
+ }): Promise<{
1808
+ "id": string;
1809
+ "business_id": string;
1810
+ "url": string;
1811
+ "event_types"?: (string)[];
1812
+ "enabled"?: boolean;
1813
+ "description"?: string;
1814
+ "environment"?: string;
1815
+ "disabled_reason"?: string;
1816
+ "created_ts"?: number;
1817
+ "last_delivery_ts"?: number;
1818
+ }>;
1819
+ /** May throw VoiFlowOperationPending (HTTP 202): the outcome is not yet known — do not repeat under a new key. */
1820
+ delete(endpointId: string, options?: {
1821
+ businessId?: string;
1822
+ idempotencyKey?: string;
1823
+ }): Promise<{
1824
+ "id": string;
1825
+ "business_id": string;
1826
+ "url": string;
1827
+ "event_types"?: (string)[];
1828
+ "enabled"?: boolean;
1829
+ "description"?: string;
1830
+ "environment"?: string;
1831
+ "disabled_reason"?: string;
1832
+ "created_ts"?: number;
1833
+ "last_delivery_ts"?: number;
1834
+ }>;
1835
+ /** May throw VoiFlowOperationPending (HTTP 202): the outcome is not yet known — do not repeat under a new key. */
1836
+ rotateSecret(endpointId: string, options?: {
1837
+ businessId?: string;
1838
+ idempotencyKey?: string;
1839
+ }): Promise<{
1840
+ "id": string;
1841
+ "business_id": string;
1842
+ "url": string;
1843
+ "event_types"?: (string)[];
1844
+ "enabled"?: boolean;
1845
+ "description"?: string;
1846
+ "environment"?: string;
1847
+ "disabled_reason"?: string;
1848
+ "created_ts"?: number;
1849
+ "last_delivery_ts"?: number;
1850
+ "secret"?: string;
1851
+ "secret_redacted"?: boolean;
1852
+ }>;
1853
+ listDeliveries(endpointId: string, params?: {
1854
+ businessId?: string;
1855
+ extraQuery?: Record<string, string>;
1856
+ }): AsyncGenerator<{
1857
+ "id": string;
1858
+ "endpoint_id": string;
1859
+ "event_id": string;
1860
+ "event_type"?: string;
1861
+ "attempt"?: number;
1862
+ "status"?: string;
1863
+ "response_status"?: number;
1864
+ "error"?: string;
1865
+ "next_attempt_ts"?: number;
1866
+ "occurred_ts"?: number;
1867
+ "created_ts"?: number;
1868
+ "completed_ts"?: number;
1869
+ "replayed"?: boolean;
1870
+ }, void, void>;
1871
+ }
1872
+ export declare class Events {
1873
+ private readonly http;
1874
+ constructor(http: HttpClient);
1875
+ list(params?: {
1876
+ eventType?: string;
1877
+ businessId?: string;
1878
+ extraQuery?: Record<string, string>;
1879
+ }): AsyncGenerator<{
1880
+ "id": string;
1881
+ "type": string;
1882
+ "business_id": string;
1883
+ "environment"?: string;
1884
+ "occurred_ts"?: number;
1885
+ "redacted"?: boolean;
1886
+ }, void, void>;
1887
+ /** May throw VoiFlowOperationPending (HTTP 202): the outcome is not yet known — do not repeat under a new key. */
1888
+ replay(eventId: string, options?: {
1889
+ endpointId?: string;
1890
+ businessId?: string;
1891
+ idempotencyKey?: string;
1892
+ }): Promise<{
1893
+ "id": string;
1894
+ "endpoint_id": string;
1895
+ "event_id": string;
1896
+ "event_type"?: string;
1897
+ "attempt"?: number;
1898
+ "status"?: string;
1899
+ "response_status"?: number;
1900
+ "error"?: string;
1901
+ "next_attempt_ts"?: number;
1902
+ "occurred_ts"?: number;
1903
+ "created_ts"?: number;
1904
+ "completed_ts"?: number;
1905
+ "replayed"?: boolean;
1906
+ }>;
1907
+ }
1908
+ export declare class Sessions {
1909
+ private readonly http;
1910
+ constructor(http: HttpClient);
1911
+ /** May throw VoiFlowOperationPending (HTTP 202): the outcome is not yet known — do not repeat under a new key. */
1912
+ create(body: {
1913
+ "agent_id": string;
1914
+ "contact_id"?: string;
1915
+ "metadata"?: Record<string, string>;
1916
+ }, options?: {
1917
+ businessId?: string;
1918
+ idempotencyKey?: string;
1919
+ }): Promise<{
1920
+ "session_id": string;
1921
+ "business_id"?: string;
1922
+ "agent_id"?: string;
1923
+ "client_token"?: string;
1924
+ "client_token_redacted"?: boolean;
1925
+ "transport_url"?: string;
1926
+ "expires_in_s"?: number;
1927
+ "events_url"?: string;
1928
+ }>;
1929
+ }
1930
+ export declare class Usage {
1931
+ private readonly http;
1932
+ constructor(http: HttpClient);
1933
+ get(params?: {
1934
+ days?: string;
1935
+ fromMs?: string;
1936
+ toMs?: string;
1937
+ businessId?: string;
1938
+ extraQuery?: Record<string, string>;
1939
+ }): Promise<{
1940
+ "total_calls"?: number;
1941
+ "total_minutes"?: number;
1942
+ "days"?: (Record<string, unknown>)[];
1943
+ "outcomes"?: Record<string, unknown>;
1944
+ "by_model"?: (Record<string, unknown>)[];
1945
+ }>;
1946
+ costs(params?: {
1947
+ days?: string;
1948
+ businessId?: string;
1949
+ extraQuery?: Record<string, string>;
1950
+ }): Promise<{
1951
+ "currency"?: string;
1952
+ "total"?: number;
1953
+ "items"?: (Record<string, unknown>)[];
1954
+ }>;
1955
+ }
1956
+ export declare class Operations {
1957
+ private readonly http;
1958
+ constructor(http: HttpClient);
1959
+ retrieve(operationId: string, params?: {
1960
+ extraQuery?: Record<string, string>;
1961
+ }): Promise<Fields>;
1962
+ }
1963
+ export declare class Limits {
1964
+ private readonly http;
1965
+ constructor(http: HttpClient);
1966
+ get(params?: {
1967
+ extraQuery?: Record<string, string>;
1968
+ }): Promise<Fields>;
1969
+ }
1970
+ /** One property per published resource group; VoiFlowClient extends this. */
1971
+ export declare class GeneratedResources {
1972
+ readonly businesses: Businesses;
1973
+ readonly agents: Agents;
1974
+ readonly journeys: Journeys;
1975
+ readonly connections: Connections;
1976
+ readonly integrations: Integrations;
1977
+ readonly channelAccounts: ChannelAccounts;
1978
+ readonly lines: Lines;
1979
+ readonly contacts: Contacts;
1980
+ readonly enquiries: Enquiries;
1981
+ readonly appointments: Appointments;
1982
+ readonly calendar: Calendar;
1983
+ readonly knowledge: Knowledge;
1984
+ readonly files: Files;
1985
+ readonly projects: Projects;
1986
+ readonly campaigns: Campaigns;
1987
+ readonly runs: Runs;
1988
+ readonly calls: Calls;
1989
+ readonly conversations: Conversations;
1990
+ readonly aiWork: AiWork;
1991
+ readonly webhookEndpoints: WebhookEndpoints;
1992
+ readonly events: Events;
1993
+ readonly sessions: Sessions;
1994
+ readonly usage: Usage;
1995
+ readonly operations: Operations;
1996
+ readonly limits: Limits;
1997
+ constructor(http: HttpClient);
1998
+ }
1999
+ export {};