@babelforce/manager-sdk 0.4.0 → 0.17.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/dist/index.d.ts CHANGED
@@ -40,15 +40,61 @@ declare function passwordGrant(opts: {
40
40
  }): Promise<TokenResponse>;
41
41
 
42
42
  /**
43
- * Named babelforce environment the SDK can target. Use the `baseUrl` option to target other
44
- * (e.g. per-customer or non-production) hosts.
43
+ * Automatic request retries for the manager SDK.
44
+ *
45
+ * The facade wraps the underlying `fetch` so transient failures — network errors and a small set of
46
+ * "try again" status codes (429/502/503/504) — are retried with exponential backoff and jitter,
47
+ * honouring a `Retry-After` header when present. Retries are on by default; pass `retry: false` to
48
+ * {@link ManagerClientOptions} to disable, or a {@link RetryOptions} object to tune.
49
+ */
50
+ /** Tuning for {@link withRetry}. */
51
+ interface RetryOptions {
52
+ /** Max retry attempts after the initial request. Default `2`. Set `0` to disable. */
53
+ maxRetries?: number;
54
+ /** Base backoff delay in ms; grows exponentially per attempt. Default `250`. */
55
+ baseDelayMs?: number;
56
+ /** Upper bound for any single backoff delay, in ms. Also caps `Retry-After`. Default `10000`. */
57
+ maxDelayMs?: number;
58
+ /** Response status codes that trigger a retry. Default `[429, 502, 503, 504]`. */
59
+ retryStatusCodes?: number[];
60
+ }
61
+ /**
62
+ * Wrap a `fetch` so transient failures are retried. Non-idempotent methods (POST/PATCH) are only
63
+ * retried on `429` — where the server has explicitly rejected the request without acting on it — to
64
+ * avoid duplicating side effects. Returns the original `fetch` unchanged when retries are disabled.
45
65
  */
46
- type Environment = 'production';
66
+ declare function withRetry(fetchImpl: typeof fetch, opts?: RetryOptions): typeof fetch;
47
67
 
48
68
  /**
49
69
  * A role associated with the Account
50
70
  */
51
- type AccountRole = 'manager' | 'owner' | 'reporter' | 'user' | 'agent' | 'supervisor' | 'sales' | 'router' | 'scheduler';
71
+ type AccountRole$1 = 'manager' | 'owner' | 'reporter' | 'user' | 'agent' | 'supervisor' | 'sales' | 'router' | 'scheduler';
72
+ type ActionProxyResponse = {
73
+ success?: boolean;
74
+ message?: string;
75
+ response?: ActionProxyResponseResponse;
76
+ /**
77
+ * Session-Map
78
+ */
79
+ session?: {
80
+ [key: string]: unknown;
81
+ };
82
+ };
83
+ type ActionProxyResponseResponse = {
84
+ /**
85
+ * The Body of the response
86
+ */
87
+ body: unknown;
88
+ /**
89
+ * The Content-Type of the response body
90
+ */
91
+ contentType?: string;
92
+ };
93
+ type AddOutboundLeadRequest = {
94
+ uid: string;
95
+ number: string;
96
+ rank?: number;
97
+ };
52
98
  type Agent = {
53
99
  /**
54
100
  * The unique Identifier (UUID) of the object
@@ -146,6 +192,20 @@ type AgentPresence = {
146
192
  label: string;
147
193
  name: string;
148
194
  };
195
+ type AgentShort = {
196
+ /**
197
+ * The unique Identifier (UUID) of the object
198
+ */
199
+ id: string;
200
+ /**
201
+ * The Name of the selected Agent
202
+ */
203
+ name: string;
204
+ /**
205
+ * The Phonenumber of the selected Agents
206
+ */
207
+ number: string;
208
+ };
149
209
  type AgentStatus = {
150
210
  enabled: boolean;
151
211
  available: boolean;
@@ -392,6 +452,55 @@ type AudioPlayerApplicationUpdateBody = {
392
452
  settings?: AudioPlayerApplicationSettings;
393
453
  module: 'audioPlayer';
394
454
  };
455
+ type AuditLog = {
456
+ /**
457
+ * The unique Identifier (UUID) of the object
458
+ */
459
+ id: string;
460
+ dateCreated: string;
461
+ /**
462
+ * Username of user who carried out the request
463
+ */
464
+ user: string;
465
+ /**
466
+ * API resource URI
467
+ */
468
+ uri: string;
469
+ method: AuditLogMethod;
470
+ operation: AuditLogOperation;
471
+ /**
472
+ * Human-friendly resource name
473
+ */
474
+ resource: string;
475
+ /**
476
+ * The unique Identifier (UUID) of the object
477
+ */
478
+ resourceUuid: string;
479
+ /**
480
+ * JSON string representing request body
481
+ */
482
+ resourcePayload: string;
483
+ /**
484
+ * JSON string representing resource item state prior to request
485
+ */
486
+ itemBefore: string;
487
+ /**
488
+ * JSON string representing resource item state after the request
489
+ */
490
+ itemAfter: string;
491
+ /**
492
+ * Resource item URI
493
+ */
494
+ _url: string;
495
+ };
496
+ /**
497
+ * HTTP method of request
498
+ */
499
+ type AuditLogMethod = 'PUT' | 'POST' | 'DELETE';
500
+ /**
501
+ * Human-readable description of the request type
502
+ */
503
+ type AuditLogOperation = 'UPDATE' | 'CREATE' | 'DELETE';
395
504
  type AutomationAction = {
396
505
  name: string;
397
506
  type: string;
@@ -404,6 +513,78 @@ type AutomationTrigger = {
404
513
  */
405
514
  id: string;
406
515
  };
516
+ type AvailableExpression = {
517
+ name: string;
518
+ label: string;
519
+ type: string;
520
+ group: string;
521
+ groupLabel: string;
522
+ formatDescription: string;
523
+ };
524
+ type Babeldesk = {
525
+ /**
526
+ * The unique Identifier (UUID) of the object
527
+ */
528
+ id: string;
529
+ dateCreated?: string;
530
+ label?: string;
531
+ users?: Array<ManagedUserEmail>;
532
+ /**
533
+ * A List of Roles which are associated with the current User
534
+ */
535
+ roles?: Array<AccountRole$1>;
536
+ /**
537
+ * A List of babeldesk widget instances
538
+ */
539
+ widgets?: Array<BabeldeskWidgetInstance>;
540
+ };
541
+ type BabeldeskItemResponse = {
542
+ item: Babeldesk;
543
+ /**
544
+ * Whether the Request was successful or not
545
+ */
546
+ success: boolean;
547
+ };
548
+ type BabeldeskWidget = {
549
+ /**
550
+ * The unique Identifier (UUID) of the object
551
+ */
552
+ id: string;
553
+ dateCreated?: string;
554
+ type?: string;
555
+ label?: string;
556
+ iframeSource?: string;
557
+ /**
558
+ * A List of babeldesk widget metrics
559
+ */
560
+ metrics?: Array<BabeldeskWidgetMetric>;
561
+ };
562
+ type BabeldeskWidgetInstance = {
563
+ posX?: number;
564
+ posY?: number;
565
+ width?: number;
566
+ height?: number;
567
+ /**
568
+ * The unique Identifier (UUID) of the object
569
+ */
570
+ widget?: string;
571
+ };
572
+ type BabeldeskWidgetItemResponse = {
573
+ item: BabeldeskWidget;
574
+ /**
575
+ * Whether the Request was successful or not
576
+ */
577
+ success: boolean;
578
+ };
579
+ type BabeldeskWidgetMetric = {
580
+ name?: string;
581
+ type?: string;
582
+ fields?: Array<string>;
583
+ /**
584
+ * A list of call states
585
+ */
586
+ states?: Array<CallState>;
587
+ };
407
588
  type BaseAutomation = {
408
589
  /**
409
590
  * The unique Identifier (UUID) of the object
@@ -422,6 +603,47 @@ type BaseAutomation = {
422
603
  */
423
604
  tags?: Array<Tag>;
424
605
  };
606
+ type BusinessHour = {
607
+ /**
608
+ * The unique Identifier (UUID) of the object
609
+ */
610
+ id: string;
611
+ name: string;
612
+ enabled?: boolean;
613
+ timeZone: string;
614
+ /**
615
+ * A List of Tags describing an Object
616
+ */
617
+ tags?: Array<Tag>;
618
+ };
619
+ type BusinessHourItemResponse = {
620
+ item: BusinessHour;
621
+ /**
622
+ * Whether the Request was successful or not
623
+ */
624
+ success: boolean;
625
+ };
626
+ type Calendar = {
627
+ /**
628
+ * The unique Identifier (UUID) of the object
629
+ */
630
+ id: string;
631
+ name: string;
632
+ timeZone: string;
633
+ enabled?: boolean;
634
+ dateCount?: number;
635
+ /**
636
+ * A List of Tags describing an Object
637
+ */
638
+ tags?: Array<Tag>;
639
+ };
640
+ type CalendarItemResponse = {
641
+ item: Calendar;
642
+ /**
643
+ * Whether the Request was successful or not
644
+ */
645
+ success: boolean;
646
+ };
425
647
  type Call = {
426
648
  /**
427
649
  * The unique Identifier (UUID) of the object
@@ -491,113 +713,353 @@ type CallBridgedAgent = {
491
713
  };
492
714
  type CallDomain = 'internal' | 'external' | 'other';
493
715
  type CallFinishReason = 'unknown' | 'hangup' | 'passive-hangup' | 'system-hangup' | 'failed' | 'timeout' | 'unreachable' | 'busy' | 'declined' | 'canceled' | 'transferred' | 'network-unreachable' | 'unallocated-number' | 'invalid-number' | 'no-answer' | 'dropped';
716
+ type CallItemResponse = {
717
+ item: Call;
718
+ /**
719
+ * Whether the Request was successful or not
720
+ */
721
+ success: boolean;
722
+ };
494
723
  type CallSource = 'queue' | 'webrtc' | 'api' | 'dialer' | 'dial' | 'transfer' | 'test' | 'conference';
495
724
  /**
496
725
  * One Call State
497
726
  */
498
727
  type CallState = 'init' | 'scheduled' | 'ringing' | 'in-progress' | 'queued' | 'bridged' | 'canceled' | 'busy' | 'no-answer' | 'purged' | 'completed' | 'failed';
499
728
  type CallType = 'inbound' | 'outbound';
500
- type CreateManagedUserRequest = {
501
- password?: string;
502
- email: string;
503
- activated?: boolean;
729
+ type CampaignListOrder = 'DOWN' | 'UP' | 'UP RANK' | 'DOWN RANK';
730
+ type Conference = {
504
731
  /**
505
- * A List of Roles which are associated with the current User
732
+ * The unique Identifier (UUID) of the object
506
733
  */
507
- roles: Array<AccountRole>;
734
+ id: string;
735
+ state: ConferenceState;
736
+ dateCreated: string;
737
+ lastUpdated: string;
738
+ moderator: ConferenceMember;
739
+ members: Array<ConferenceMember>;
508
740
  };
509
- type DefaultTextToSpeechSettings = {
510
- language?: string;
511
- voice?: string;
512
- provider?: 'google' | 'azure';
741
+ type ConferenceAgent = {
742
+ /**
743
+ * The unique Identifier (UUID) of the object
744
+ */
745
+ id: string;
746
+ name: string;
747
+ number: string;
513
748
  };
514
- type DefaultV2MessageResponse = {
515
- message?: string;
749
+ type ConferenceItemResponse = {
750
+ item: Conference;
516
751
  /**
517
- * Whether or not the request was successful
752
+ * Whether the Request was successful or not
518
753
  */
519
754
  success: boolean;
520
755
  };
521
- type DispatchLocalAutomationsResponse = {
522
- success?: boolean;
756
+ type ConferenceMember = {
757
+ /**
758
+ * The unique Identifier (UUID) of the object
759
+ */
760
+ id: string;
761
+ state: ConferenceMemberState;
762
+ dateCreated: string;
763
+ lastUpdated: string;
764
+ agent?: ConferenceAgent;
765
+ call: Call;
766
+ hold?: boolean;
767
+ isModerator: boolean;
523
768
  };
524
- type FileReference = {
769
+ type ConferenceMemberState = 'pending' | 'added' | 'removed';
770
+ type ConferenceState = 'created' | 'finished';
771
+ type Conversation = {
525
772
  /**
526
773
  * The unique Identifier (UUID) of the object
527
774
  */
528
775
  id: string;
529
- state: FileState;
530
- name: string;
531
- size: number;
532
- contentType: string;
776
+ dateCreated?: string;
777
+ state?: ConversationState;
778
+ phone?: string;
533
779
  };
534
- type FileState = 'created' | 'storing' | 'stored' | 'failed' | 'deleted' | 'missing';
535
- type InputReaderApplication = {
780
+ type ConversationEvent = {
536
781
  /**
537
782
  * The unique Identifier (UUID) of the object
538
783
  */
539
784
  id: string;
785
+ /**
786
+ * The unique Identifier (UUID) of the object
787
+ */
788
+ conversationId?: string;
789
+ type: ConversationEventType;
540
790
  name: string;
541
- friendlyName?: string;
542
- enabled: boolean;
543
- dateCreated: string;
544
- lastUpdated: string;
545
791
  /**
546
- * A List of Tags describing an Object
792
+ * Level of Detail
547
793
  */
548
- tags: Array<Tag>;
549
- routings: Array<ApplicationRouting>;
550
- settings: InputReaderApplicationSettings;
551
- module: 'inputReader';
794
+ lod?: number;
795
+ dateCreated?: string;
796
+ call?: Call;
797
+ agent?: AgentShort;
552
798
  };
553
- type InputReaderApplicationSettings = {
554
- flowEndApplication?: ResourceReference;
555
- prompts?: Array<ApplicationPrompt>;
556
- resultVariableName: string;
557
- terminationDigit?: InputReaderTerminationDigit;
558
- readTimeout?: number;
559
- min?: number;
560
- max?: number;
561
- maxRetries?: number;
562
- ignoreNoInput?: boolean;
799
+ type ConversationEventItemResponse = {
800
+ item: ConversationEvent;
801
+ /**
802
+ * Whether the Request was successful or not
803
+ */
804
+ success: boolean;
563
805
  };
564
- type InputReaderApplicationUpdateBody = {
565
- name?: string;
566
- friendlyName?: string;
567
- enabled?: boolean;
806
+ type ConversationEventType = 'call' | 'sms' | 'queue' | 'application' | 'integration' | 'agent' | 'external';
807
+ type ConversationItemResponse = {
808
+ item: Conversation;
568
809
  /**
569
- * A List of Tags describing an Object
810
+ * Whether the Request was successful or not
570
811
  */
571
- tags?: Array<Tag>;
572
- routings?: Array<ApplicationRouting>;
573
- settings?: InputReaderApplicationSettings;
574
- module: 'inputReader';
812
+ success: boolean;
575
813
  };
576
- type InputReaderTerminationDigit = 'NONE' | 'ANY' | 'ASTERISK' | 'HASH' | 'KEY_0' | 'KEY_1' | 'KEY_2' | 'KEY_3' | 'KEY_4' | 'KEY_5' | 'KEY_6' | 'KEY_7' | 'KEY_8' | 'KEY_9';
577
- type InputReaderV2Application = {
814
+ /**
815
+ * Key-Values of Variables
816
+ */
817
+ type ConversationSessionVariables = {
818
+ [key: string]: unknown;
819
+ };
820
+ type ConversationSessionVariablesItemResponse = {
578
821
  /**
579
- * The unique Identifier (UUID) of the object
822
+ * Key-Values of Variables
580
823
  */
581
- id: string;
824
+ item: {
825
+ [key: string]: unknown;
826
+ };
827
+ /**
828
+ * Whether the Request was successful or not
829
+ */
830
+ success: boolean;
831
+ };
832
+ type ConversationState = 'open' | 'closed';
833
+ type CreateCampaignRequest = {
582
834
  name: string;
583
- friendlyName?: string;
584
- enabled: boolean;
585
- dateCreated: string;
586
- lastUpdated: string;
835
+ active: boolean;
836
+ testMode: boolean;
837
+ displayNumber: string;
838
+ listOrder: CampaignListOrder;
839
+ callRatio?: number;
840
+ };
841
+ type CreateManagedUserRequest = {
842
+ password?: string;
843
+ email: string;
844
+ activated?: boolean;
587
845
  /**
588
- * A List of Tags describing an Object
846
+ * A List of Roles which are associated with the current User
589
847
  */
590
- tags: Array<Tag>;
591
- routings: Array<ApplicationRouting>;
592
- settings: InputReaderV2ApplicationSettings;
593
- module: 'inputReader.v2';
848
+ roles: Array<AccountRole$1>;
594
849
  };
595
- type InputReaderV2ApplicationSettings = {
596
- flowEndApplication?: ResourceReference;
597
- prompts?: Array<ApplicationPrompt>;
598
- textToSpeech?: DefaultTextToSpeechSettings;
599
- routes?: Array<ApplicationRoutesInner>;
600
- resultVariableName: string;
850
+ type CreateOutboundListRequest = {
851
+ name: string;
852
+ };
853
+ type CreateTestCallRequest = {
854
+ /**
855
+ * The unique Identifier (UUID) of the object
856
+ */
857
+ id?: string;
858
+ /**
859
+ * The unique Identifier (UUID) of the object
860
+ */
861
+ agentId?: string;
862
+ fromNumber: string;
863
+ toNumber: string;
864
+ duration?: number;
865
+ session?: {
866
+ [key: string]: unknown;
867
+ };
868
+ };
869
+ type CustomEventRequest = {
870
+ name: string;
871
+ /**
872
+ * A List of Tags describing an Object
873
+ */
874
+ tags?: Array<Tag>;
875
+ };
876
+ type DefaultTextToSpeechSettings = {
877
+ language?: string;
878
+ voice?: string;
879
+ provider?: 'google' | 'azure';
880
+ };
881
+ type DefaultV2MessageResponse = {
882
+ message?: string;
883
+ /**
884
+ * Whether or not the request was successful
885
+ */
886
+ success: boolean;
887
+ };
888
+ type DispatchLocalAutomationsResponse = {
889
+ success?: boolean;
890
+ };
891
+ type DownloadPhonebookEntriesResponse = string;
892
+ type EvaluateExpression = {
893
+ /**
894
+ * The ID of a Call to add to the context
895
+ */
896
+ callId?: string;
897
+ /**
898
+ * The ID of an Agent to add to the context
899
+ */
900
+ agentId?: string;
901
+ /**
902
+ * The ID on an Integration to add to the context
903
+ */
904
+ integrationId?: string;
905
+ /**
906
+ * Some text with multiple expressions in curly brakets where all expressions will be replaced with their value
907
+ */
908
+ text?: string;
909
+ /**
910
+ * The Expression to evaluate
911
+ */
912
+ expression?: string;
913
+ };
914
+ type EvaluateExpressionResponse = {
915
+ success: boolean;
916
+ /**
917
+ * The Text Body with all expressions replaced
918
+ */
919
+ text?: string;
920
+ /**
921
+ * The evaluated Content of the Expression
922
+ */
923
+ evaluated?: unknown;
924
+ message: string;
925
+ };
926
+ type Event = {
927
+ /**
928
+ * The unique Identifier (UUID) of the object
929
+ */
930
+ id: string;
931
+ type: EventType;
932
+ /**
933
+ * The specific Event in relation to its type category
934
+ */
935
+ name: string;
936
+ /**
937
+ * Unique identifier of an Event
938
+ */
939
+ code: string;
940
+ label: string;
941
+ /**
942
+ * A List of Tags describing an Object
943
+ */
944
+ tags?: Array<Tag>;
945
+ };
946
+ type EventItemResponse = {
947
+ item: Event;
948
+ /**
949
+ * Whether the Request was successful or not
950
+ */
951
+ success: boolean;
952
+ };
953
+ /**
954
+ * The Event category
955
+ */
956
+ type EventType = 'AGENT' | 'CALL' | 'CUSTOM' | 'MESSAGE' | 'RECORDING' | 'SMS' | 'TRANSACTION';
957
+ type FileReference = {
958
+ /**
959
+ * The unique Identifier (UUID) of the object
960
+ */
961
+ id: string;
962
+ state: FileState;
963
+ name: string;
964
+ size: number;
965
+ contentType: string;
966
+ };
967
+ type FileState = 'created' | 'storing' | 'stored' | 'failed' | 'deleted' | 'missing';
968
+ type GetIntegrationProviderLogoResponse = {
969
+ /**
970
+ * Whether or not the request was successful
971
+ */
972
+ success?: boolean;
973
+ item?: GetIntegrationProviderLogoResponseItem;
974
+ };
975
+ type GetIntegrationProviderLogoResponseItem = {
976
+ /**
977
+ * base64-encoded image data
978
+ */
979
+ base64?: string;
980
+ };
981
+ type GlobalAutomation = BaseAutomation & GlobalAutomationEmbeddedEvent;
982
+ type GlobalAutomationEmbeddedEvent = {
983
+ event?: GlobalAutomationEvent;
984
+ };
985
+ type GlobalAutomationEvent = {
986
+ name: string;
987
+ type: string;
988
+ provider?: string;
989
+ };
990
+ type GlobalAutomationItemResponse = {
991
+ item: GlobalAutomation;
992
+ /**
993
+ * Whether the Request was successful or not
994
+ */
995
+ success: boolean;
996
+ };
997
+ type InputReaderApplication = {
998
+ /**
999
+ * The unique Identifier (UUID) of the object
1000
+ */
1001
+ id: string;
1002
+ name: string;
1003
+ friendlyName?: string;
1004
+ enabled: boolean;
1005
+ dateCreated: string;
1006
+ lastUpdated: string;
1007
+ /**
1008
+ * A List of Tags describing an Object
1009
+ */
1010
+ tags: Array<Tag>;
1011
+ routings: Array<ApplicationRouting>;
1012
+ settings: InputReaderApplicationSettings;
1013
+ module: 'inputReader';
1014
+ };
1015
+ type InputReaderApplicationSettings = {
1016
+ flowEndApplication?: ResourceReference;
1017
+ prompts?: Array<ApplicationPrompt>;
1018
+ resultVariableName: string;
1019
+ terminationDigit?: InputReaderTerminationDigit;
1020
+ readTimeout?: number;
1021
+ min?: number;
1022
+ max?: number;
1023
+ maxRetries?: number;
1024
+ ignoreNoInput?: boolean;
1025
+ };
1026
+ type InputReaderApplicationUpdateBody = {
1027
+ name?: string;
1028
+ friendlyName?: string;
1029
+ enabled?: boolean;
1030
+ /**
1031
+ * A List of Tags describing an Object
1032
+ */
1033
+ tags?: Array<Tag>;
1034
+ routings?: Array<ApplicationRouting>;
1035
+ settings?: InputReaderApplicationSettings;
1036
+ module: 'inputReader';
1037
+ };
1038
+ type InputReaderTerminationDigit = 'NONE' | 'ANY' | 'ASTERISK' | 'HASH' | 'KEY_0' | 'KEY_1' | 'KEY_2' | 'KEY_3' | 'KEY_4' | 'KEY_5' | 'KEY_6' | 'KEY_7' | 'KEY_8' | 'KEY_9';
1039
+ type InputReaderV2Application = {
1040
+ /**
1041
+ * The unique Identifier (UUID) of the object
1042
+ */
1043
+ id: string;
1044
+ name: string;
1045
+ friendlyName?: string;
1046
+ enabled: boolean;
1047
+ dateCreated: string;
1048
+ lastUpdated: string;
1049
+ /**
1050
+ * A List of Tags describing an Object
1051
+ */
1052
+ tags: Array<Tag>;
1053
+ routings: Array<ApplicationRouting>;
1054
+ settings: InputReaderV2ApplicationSettings;
1055
+ module: 'inputReader.v2';
1056
+ };
1057
+ type InputReaderV2ApplicationSettings = {
1058
+ flowEndApplication?: ResourceReference;
1059
+ prompts?: Array<ApplicationPrompt>;
1060
+ textToSpeech?: DefaultTextToSpeechSettings;
1061
+ routes?: Array<ApplicationRoutesInner>;
1062
+ resultVariableName: string;
601
1063
  bargeIn?: InputReaderV2ApplicationSettingsBargeIn;
602
1064
  dtmf?: InputReaderV2ApplicationSettingsDtmf;
603
1065
  voice?: InputReaderV2ApplicationSettingsVoice;
@@ -654,10 +1116,142 @@ type InputReaderV2ApplicationUpdateBody = {
654
1116
  module: 'inputReader.v2';
655
1117
  };
656
1118
  type InputReaderV2TerminationDigit = 'ASTERISK' | 'HASH';
1119
+ type Integration = {
1120
+ /**
1121
+ * The unique Identifier (UUID) of the object
1122
+ */
1123
+ id: string;
1124
+ name: string;
1125
+ label: string;
1126
+ type: string;
1127
+ provider?: IntegrationProvider;
1128
+ color?: string;
1129
+ enabled?: boolean;
1130
+ config: {
1131
+ [key: string]: unknown;
1132
+ };
1133
+ /**
1134
+ * A List of Tags describing an Object
1135
+ */
1136
+ tags?: Array<Tag>;
1137
+ };
1138
+ type IntegrationAddAssociationResponse = {
1139
+ success?: boolean;
1140
+ message?: string;
1141
+ };
1142
+ type IntegrationAvailable = IntegrationAvailableLegacy | IntegrationAvailableCustom;
1143
+ type IntegrationAvailableBase = {
1144
+ type: IntegrationType;
1145
+ name: string;
1146
+ provider: IntegrationProvider;
1147
+ };
1148
+ type IntegrationAvailableCustom = IntegrationAvailableBase & {
1149
+ /**
1150
+ * Integration provider label
1151
+ */
1152
+ label: string;
1153
+ /**
1154
+ * List of integration provider capabilities
1155
+ */
1156
+ capabilities: Array<IntegrationCapability>;
1157
+ pagination: IntegrationPaginationType;
1158
+ };
1159
+ type IntegrationAvailableLegacy = IntegrationAvailableBase & {
1160
+ legacy: boolean;
1161
+ };
1162
+ type IntegrationCapability = 'babelforce.users' | 'babelforce.enduser' | 'babelforce.scripting' | 'babelforce.tasks' | 'agent.triggerable';
1163
+ type IntegrationCreateRequest = {
1164
+ name: string;
1165
+ label: string;
1166
+ type: string;
1167
+ provider?: IntegrationProvider;
1168
+ color?: string;
1169
+ enabled?: boolean;
1170
+ config: {
1171
+ [key: string]: unknown;
1172
+ };
1173
+ /**
1174
+ * A List of Tags describing an Object
1175
+ */
1176
+ tags: Array<Tag>;
1177
+ };
1178
+ type IntegrationDispatchActionRequest = {
1179
+ params?: {
1180
+ [key: string]: unknown;
1181
+ };
1182
+ context?: {
1183
+ [key: string]: unknown;
1184
+ };
1185
+ };
1186
+ type IntegrationDispatchActionResponse = {
1187
+ action: string;
1188
+ params: {
1189
+ [key: string]: unknown;
1190
+ };
1191
+ context: {
1192
+ [key: string]: unknown;
1193
+ };
1194
+ data: ActionProxyResponse;
1195
+ };
1196
+ type IntegrationItemResponse = {
1197
+ item: Integration;
1198
+ /**
1199
+ * Whether the Request was successful or not
1200
+ */
1201
+ success: boolean;
1202
+ };
1203
+ type IntegrationListAvailableIntegrationsResponse = {
1204
+ items: Array<IntegrationAvailable>;
1205
+ /**
1206
+ * Whether or not the request was successful
1207
+ */
1208
+ success: boolean;
1209
+ };
1210
+ type IntegrationPaginationType = 'page' | 'cursor';
1211
+ type IntegrationProvider = 'awaken_dispatch' | 'awaken_scripting' | 'babelforce' | 'babelforce.events' | 'babelforce.sessions' | 'babelforce.storage' | 'babelforce.tasks' | 'babelforce.transcripts' | 'cti' | 'custom' | 'deepsearch' | 'deepsearch_v2' | 'dummy' | 'dummy-integration' | 'freshdesk' | 'gcloud_dialogflow' | 'geckoboard' | 'kustomer' | 'microsoft_clu' | 'microsoft_dynamics' | 'microsoft_teams' | 'microsoft_teams_messages' | 'pushover' | 'salesforce' | 'sendbird_chat' | 'spotify' | 'sugarcrm' | 'surfly' | 'thunderhead_one' | 'vonage_messages' | 'waboxapp' | 'webhooktest' | 'zendesk' | 'zendesk_v2' | 'zohocrm';
1212
+ type IntegrationRemoveAssociationResponse = {
1213
+ success?: boolean;
1214
+ message?: string;
1215
+ };
1216
+ type IntegrationSessionVariable = {
1217
+ action: string;
1218
+ variables?: Array<VariableDefinition>;
1219
+ };
1220
+ type IntegrationSessionVariableItemsResponse = {
1221
+ items?: Array<IntegrationSessionVariable>;
1222
+ };
1223
+ type IntegrationType = 'zendesk' | 'custom';
1224
+ type IntegrationUpdateRequest = {
1225
+ name?: string;
1226
+ label?: string;
1227
+ type?: string;
1228
+ provider?: IntegrationProvider;
1229
+ color?: string;
1230
+ enabled?: boolean;
1231
+ config?: {
1232
+ [key: string]: unknown;
1233
+ };
1234
+ /**
1235
+ * A List of Tags describing an Object
1236
+ */
1237
+ tags?: Array<Tag>;
1238
+ };
657
1239
  type IvrModule = 'agentQueue' | 'agentic' | 'audioPlayer' | 'consumerQueue' | 'inputReader' | 'inputReader.v2' | 'promptPlayer' | 'recording' | 'simpleMenu' | 'speechToText' | 'switchNode' | 'textToSpeech' | 'transfer';
658
1240
  type ListModulesResponse = {
659
1241
  items: Array<IvrModule>;
660
1242
  };
1243
+ type LiveLog = {
1244
+ /**
1245
+ * The unique Identifier (UUID) of the object
1246
+ */
1247
+ id: string;
1248
+ time?: number;
1249
+ category: LiveLogCategory;
1250
+ level: LiveLogLevel;
1251
+ message: string;
1252
+ };
1253
+ type LiveLogCategory = 'ACTIONS' | 'APPLICATION' | 'VOICE_APPLICATIONS' | 'TRIGGERS' | 'EXPRESSIONS' | 'EVENT_TRIGGERS' | 'DIALER' | 'AGENT' | 'STORAGE' | 'VOICE' | 'TRANSACTION' | 'API';
1254
+ type LiveLogLevel = 'INFO' | 'DEBUG' | 'ERROR' | 'WARN' | 'TRACE';
661
1255
  type LocalAutomation = BaseAutomation;
662
1256
  type LocalAutomationDispatch = {
663
1257
  /**
@@ -682,8 +1276,9 @@ type ManagedUser = {
682
1276
  /**
683
1277
  * A List of Roles which are associated with the current User
684
1278
  */
685
- roles: Array<AccountRole>;
1279
+ roles: Array<AccountRole$1>;
686
1280
  };
1281
+ type ManagedUserEmail = string;
687
1282
  type ManagedUserItemResponse = {
688
1283
  item: ManagedUser;
689
1284
  /**
@@ -771,18 +1366,165 @@ type MetricTimeRange = 'TODAY' | 'YESTERDAY' | 'LAST_DAY' | 'LAST_24_HOURS' | 'L
771
1366
  * The unique Identifier (UUID) of the object
772
1367
  */
773
1368
  type ObjectUuid = string;
774
- type PromptPlayerApplication = {
1369
+ type OutboundCampaign = {
775
1370
  /**
776
1371
  * The unique Identifier (UUID) of the object
777
1372
  */
778
1373
  id: string;
779
1374
  name: string;
780
- friendlyName?: string;
781
- enabled: boolean;
782
- dateCreated: string;
783
- lastUpdated: string;
1375
+ active: boolean;
1376
+ displayNumber: string;
1377
+ testMode: boolean;
1378
+ leadList?: OutboundCampaignLeadList;
1379
+ listOrder: CampaignListOrder;
1380
+ callRatio: number;
1381
+ };
1382
+ type OutboundCampaignItemResponse = {
1383
+ item: OutboundCampaign;
784
1384
  /**
785
- * A List of Tags describing an Object
1385
+ * Whether the Request was successful or not
1386
+ */
1387
+ success: boolean;
1388
+ };
1389
+ type OutboundCampaignLeadList = {
1390
+ /**
1391
+ * The unique Identifier (UUID) of the object
1392
+ */
1393
+ id: string;
1394
+ name: string;
1395
+ };
1396
+ type OutboundLead = {
1397
+ /**
1398
+ * The unique Identifier (UUID) of the object
1399
+ */
1400
+ id: string;
1401
+ /**
1402
+ * The unique Identifier (UUID) of the object
1403
+ */
1404
+ listId: string;
1405
+ uid: string;
1406
+ number: string;
1407
+ number2?: string;
1408
+ number3?: string;
1409
+ callerId: string;
1410
+ status: string;
1411
+ callCount: number;
1412
+ duration: number;
1413
+ calledSinceReset: boolean;
1414
+ rank: number;
1415
+ dateCreated: string;
1416
+ lastUpdated: string;
1417
+ data: {
1418
+ [key: string]: unknown;
1419
+ };
1420
+ };
1421
+ type OutboundLeadItemResponse = {
1422
+ item: OutboundLead;
1423
+ /**
1424
+ * Whether the Request was successful or not
1425
+ */
1426
+ success: boolean;
1427
+ };
1428
+ type OutboundList = {
1429
+ /**
1430
+ * The unique Identifier (UUID) of the object
1431
+ */
1432
+ id: string;
1433
+ name: string;
1434
+ count?: number;
1435
+ campaignId?: string;
1436
+ };
1437
+ type OutboundListItemResponse = {
1438
+ item: OutboundList;
1439
+ /**
1440
+ * Whether the Request was successful or not
1441
+ */
1442
+ success: boolean;
1443
+ };
1444
+ type PhonebookCsvFile = {
1445
+ file: Blob | File;
1446
+ };
1447
+ type PhonebookEntry = {
1448
+ /**
1449
+ * The unique Identifier (UUID) of the object
1450
+ */
1451
+ id: string;
1452
+ /**
1453
+ * A Label for the Phonebook-Entry
1454
+ */
1455
+ label: string;
1456
+ /**
1457
+ * The Telephone-Number
1458
+ */
1459
+ number: string;
1460
+ /**
1461
+ * A List of Tags describing an Object
1462
+ */
1463
+ tags?: Array<Tag>;
1464
+ };
1465
+ type PhonebookEntryItemResponse = {
1466
+ item: PhonebookEntry;
1467
+ /**
1468
+ * Whether the Request was successful or not
1469
+ */
1470
+ success: boolean;
1471
+ };
1472
+ type Prompt = {
1473
+ /**
1474
+ * The unique Identifier (UUID) of the object
1475
+ */
1476
+ id: string;
1477
+ label: string;
1478
+ text?: string;
1479
+ locale?: string;
1480
+ dateCreated: string;
1481
+ lastUpdated: string;
1482
+ /**
1483
+ * Whether this Prompt is a Default-Prompt
1484
+ */
1485
+ default?: boolean;
1486
+ /**
1487
+ * The Key of the Prompt
1488
+ */
1489
+ key: string;
1490
+ /**
1491
+ * The Duration of the Prompt in milliseconds
1492
+ */
1493
+ duration?: number;
1494
+ /**
1495
+ * The public URL of the Prompt
1496
+ */
1497
+ url: string;
1498
+ /**
1499
+ * A List of Tags describing an Object
1500
+ */
1501
+ tags?: Array<Tag>;
1502
+ file: FileReference;
1503
+ };
1504
+ type PromptAudioFile = {
1505
+ file: Blob | File;
1506
+ filename?: string;
1507
+ label?: string;
1508
+ };
1509
+ type PromptItemResponse = {
1510
+ item: Prompt;
1511
+ /**
1512
+ * Whether the Request was successful or not
1513
+ */
1514
+ success: boolean;
1515
+ };
1516
+ type PromptPlayerApplication = {
1517
+ /**
1518
+ * The unique Identifier (UUID) of the object
1519
+ */
1520
+ id: string;
1521
+ name: string;
1522
+ friendlyName?: string;
1523
+ enabled: boolean;
1524
+ dateCreated: string;
1525
+ lastUpdated: string;
1526
+ /**
1527
+ * A List of Tags describing an Object
786
1528
  */
787
1529
  tags: Array<Tag>;
788
1530
  routings: Array<ApplicationRouting>;
@@ -807,6 +1549,21 @@ type PromptPlayerApplicationUpdateBody = {
807
1549
  settings?: PromptPlayerApplicationSettings;
808
1550
  module: 'promptPlayer';
809
1551
  };
1552
+ type Queue = {
1553
+ /**
1554
+ * The unique Identifier (UUID) of the object
1555
+ */
1556
+ id: string;
1557
+ name: string;
1558
+ maxDialCount?: number;
1559
+ wrapUpTime?: number;
1560
+ defaultRingTimeout?: number;
1561
+ maxSize?: number;
1562
+ /**
1563
+ * A List of Tags describing an Object
1564
+ */
1565
+ tags?: Array<Tag>;
1566
+ };
810
1567
  type QueueAgentApplication = {
811
1568
  /**
812
1569
  * The unique Identifier (UUID) of the object
@@ -885,6 +1642,81 @@ type QueueConsumerApplicationUpdateBody = {
885
1642
  settings?: QueueConsumerApplicationSettings;
886
1643
  module: 'consumerQueue';
887
1644
  };
1645
+ type QueueItemResponse = {
1646
+ item: Queue;
1647
+ /**
1648
+ * Whether the Request was successful or not
1649
+ */
1650
+ success: boolean;
1651
+ };
1652
+ type QueueSelection = {
1653
+ /**
1654
+ * The unique Identifier (UUID) of the object
1655
+ */
1656
+ id: string;
1657
+ label: string;
1658
+ enabled: boolean;
1659
+ continueOnMatch: boolean;
1660
+ continueOnEmpty: boolean;
1661
+ selectLastAgent?: boolean;
1662
+ priority: number;
1663
+ dateCreated: string;
1664
+ lastUpdated: string;
1665
+ trigger: Trigger;
1666
+ groups: Array<QueueSelectionGroup>;
1667
+ tags: Array<QueueSelectionTag>;
1668
+ agents: Array<QueueSelectionAgent>;
1669
+ };
1670
+ type QueueSelectionAgent = {
1671
+ /**
1672
+ * The unique Identifier (UUID) of the object
1673
+ */
1674
+ id: string;
1675
+ agent: QueueSelectionAgentAgent;
1676
+ };
1677
+ type QueueSelectionAgentAgent = {
1678
+ /**
1679
+ * The unique Identifier (UUID) of the object
1680
+ */
1681
+ id: string;
1682
+ sourceId: string;
1683
+ dateCreated: string;
1684
+ lastUpdated: string;
1685
+ name: string;
1686
+ enabled: boolean;
1687
+ state: string;
1688
+ number: string;
1689
+ };
1690
+ type QueueSelectionGroup = {
1691
+ /**
1692
+ * The unique Identifier (UUID) of the object
1693
+ */
1694
+ id: string;
1695
+ group: AgentGroup;
1696
+ };
1697
+ type QueueSelectionItemResponse = {
1698
+ item: QueueSelection;
1699
+ /**
1700
+ * Whether the Request was successful or not
1701
+ */
1702
+ success: boolean;
1703
+ };
1704
+ type QueueSelectionModificationResponse = QueueSelectionItemResponse & {
1705
+ message?: string;
1706
+ };
1707
+ type QueueSelectionResponse = {
1708
+ agents: Array<AgentShort>;
1709
+ };
1710
+ type QueueSelectionTag = {
1711
+ /**
1712
+ * The unique Identifier (UUID) of the object
1713
+ */
1714
+ id: string;
1715
+ /**
1716
+ * A Tag describing an Object
1717
+ */
1718
+ tag: string;
1719
+ };
888
1720
  type Recording = {
889
1721
  /**
890
1722
  * The unique Identifier (UUID) of the object
@@ -1060,6 +1892,27 @@ type RestCreateAgentGroup = {
1060
1892
  */
1061
1893
  tags?: Array<Tag>;
1062
1894
  };
1895
+ type RestCreateBabeldesk = {
1896
+ label?: string;
1897
+ users?: Array<ManagedUserEmail>;
1898
+ /**
1899
+ * A List of Roles which are associated with the current User
1900
+ */
1901
+ roles?: Array<AccountRole$1>;
1902
+ /**
1903
+ * A List of babeldesk widget instances
1904
+ */
1905
+ widgets?: Array<BabeldeskWidgetInstance>;
1906
+ };
1907
+ type RestCreateBabeldeskWidget = {
1908
+ type?: string;
1909
+ label?: string;
1910
+ iframeSource?: string;
1911
+ /**
1912
+ * A List of babeldesk widget metrics
1913
+ */
1914
+ metrics?: Array<BabeldeskWidgetMetric>;
1915
+ };
1063
1916
  type RestCreateBaseAutomation = {
1064
1917
  priority: number;
1065
1918
  label: string;
@@ -1074,7 +1927,94 @@ type RestCreateBaseAutomation = {
1074
1927
  */
1075
1928
  tags?: Array<Tag>;
1076
1929
  };
1930
+ type RestCreateBusinessHour = {
1931
+ name: string;
1932
+ enabled?: boolean;
1933
+ timeZone: string;
1934
+ /**
1935
+ * A List of Tags describing an Object
1936
+ */
1937
+ tags?: Array<Tag>;
1938
+ };
1939
+ type RestCreateCalendar = {
1940
+ name: string;
1941
+ timeZone: string;
1942
+ enabled?: boolean;
1943
+ dateCount?: number;
1944
+ /**
1945
+ * A List of Tags describing an Object
1946
+ */
1947
+ tags?: Array<Tag>;
1948
+ };
1949
+ type RestCreateConversation = {
1950
+ state?: ConversationState;
1951
+ phone?: string;
1952
+ };
1953
+ type RestCreateGlobalAutomation = RestCreateBaseAutomation & RestCreateGlobalAutomationEmbeddedEvent;
1954
+ type RestCreateGlobalAutomationEmbeddedEvent = {
1955
+ event?: GlobalAutomationEvent;
1956
+ };
1077
1957
  type RestCreateLocalAutomation = RestCreateBaseAutomation;
1958
+ type RestCreatePhonebookEntry = {
1959
+ /**
1960
+ * A Label for the Phonebook-Entry
1961
+ */
1962
+ label: string;
1963
+ /**
1964
+ * The Telephone-Number
1965
+ */
1966
+ number: string;
1967
+ /**
1968
+ * A List of Tags describing an Object
1969
+ */
1970
+ tags?: Array<Tag>;
1971
+ };
1972
+ type RestCreateQueue = {
1973
+ name: string;
1974
+ maxDialCount?: number;
1975
+ wrapUpTime?: number;
1976
+ defaultRingTimeout?: number;
1977
+ maxSize?: number;
1978
+ /**
1979
+ * A List of Tags describing an Object
1980
+ */
1981
+ tags?: Array<Tag>;
1982
+ };
1983
+ type RestCreateQueueSelection = {
1984
+ label: string;
1985
+ enabled?: boolean;
1986
+ continueOnMatch?: boolean;
1987
+ continueOnEmpty?: boolean;
1988
+ selectLastAgent?: boolean;
1989
+ priority?: number;
1990
+ trigger: Trigger;
1991
+ groups?: Array<QueueSelectionGroup>;
1992
+ tags?: Array<QueueSelectionTag>;
1993
+ agents?: Array<QueueSelectionAgent>;
1994
+ };
1995
+ type RestCreateRouting = {
1996
+ application: RestCreateRoutingApplication;
1997
+ number: RestCreateRoutingApplication;
1998
+ /**
1999
+ * A List of Tags describing an Object
2000
+ */
2001
+ tags?: Array<Tag>;
2002
+ };
2003
+ type RestCreateRoutingApplication = {
2004
+ /**
2005
+ * The unique Identifier (UUID) of the object
2006
+ */
2007
+ id?: string;
2008
+ };
2009
+ type RestCreateTrigger = {
2010
+ name: string;
2011
+ type: TriggerType;
2012
+ conditions: Array<TriggerCondition>;
2013
+ /**
2014
+ * A List of Tags describing an Object
2015
+ */
2016
+ tags?: Array<Tag>;
2017
+ };
1078
2018
  type RestUpdateAgent = {
1079
2019
  /**
1080
2020
  * The ID of the external System the Agent was created from
@@ -1127,6 +2067,27 @@ type RestUpdateAgentGroup = {
1127
2067
  */
1128
2068
  tags?: Array<Tag>;
1129
2069
  };
2070
+ type RestUpdateBabeldesk = {
2071
+ label?: string;
2072
+ users?: Array<ManagedUserEmail>;
2073
+ /**
2074
+ * A List of Roles which are associated with the current User
2075
+ */
2076
+ roles?: Array<AccountRole$1>;
2077
+ /**
2078
+ * A List of babeldesk widget instances
2079
+ */
2080
+ widgets?: Array<BabeldeskWidgetInstance>;
2081
+ };
2082
+ type RestUpdateBabeldeskWidget = {
2083
+ type?: string;
2084
+ label?: string;
2085
+ iframeSource?: string;
2086
+ /**
2087
+ * A List of babeldesk widget metrics
2088
+ */
2089
+ metrics?: Array<BabeldeskWidgetMetric>;
2090
+ };
1130
2091
  type RestUpdateBaseAutomation = {
1131
2092
  priority?: number;
1132
2093
  label?: string;
@@ -1141,17 +2102,197 @@ type RestUpdateBaseAutomation = {
1141
2102
  */
1142
2103
  tags?: Array<Tag>;
1143
2104
  };
1144
- type RestUpdateLocalAutomation = RestUpdateBaseAutomation;
1145
- type SettingsAppCustomerLogging = {
1146
- enabled: boolean;
1147
- };
1148
- type SettingsAppConversations = {
1149
- conversationScope: 'OWN' | 'GROUP' | 'ALL';
1150
- autoClose: boolean;
2105
+ type RestUpdateBusinessHour = {
2106
+ name?: string;
2107
+ enabled?: boolean;
2108
+ timeZone?: string;
2109
+ /**
2110
+ * A List of Tags describing an Object
2111
+ */
2112
+ tags?: Array<Tag>;
1151
2113
  };
1152
- type SettingsAppIntegrations = {
1153
- taskIntegration: string | null;
1154
- conversationTaskKey: string | null;
2114
+ type RestUpdateCalendar = {
2115
+ name?: string;
2116
+ timeZone?: string;
2117
+ enabled?: boolean;
2118
+ dateCount?: number;
2119
+ /**
2120
+ * A List of Tags describing an Object
2121
+ */
2122
+ tags?: Array<Tag>;
2123
+ };
2124
+ type RestUpdateConversation = {
2125
+ state?: ConversationState;
2126
+ phone?: string;
2127
+ };
2128
+ type RestUpdateGlobalAutomation = RestUpdateBaseAutomation & RestUpdateGlobalAutomationEmbeddedEvent;
2129
+ type RestUpdateGlobalAutomationEmbeddedEvent = {
2130
+ event?: GlobalAutomationEvent;
2131
+ };
2132
+ type RestUpdateLocalAutomation = RestUpdateBaseAutomation;
2133
+ type RestUpdatePhonebookEntry = {
2134
+ /**
2135
+ * A Label for the Phonebook-Entry
2136
+ */
2137
+ label?: string;
2138
+ /**
2139
+ * The Telephone-Number
2140
+ */
2141
+ number?: string;
2142
+ /**
2143
+ * A List of Tags describing an Object
2144
+ */
2145
+ tags?: Array<Tag>;
2146
+ };
2147
+ type RestUpdatePrompt = {
2148
+ label?: string;
2149
+ text?: string;
2150
+ locale?: string;
2151
+ /**
2152
+ * Whether this Prompt is a Default-Prompt
2153
+ */
2154
+ default?: boolean;
2155
+ /**
2156
+ * The Key of the Prompt
2157
+ */
2158
+ key?: string;
2159
+ /**
2160
+ * The Duration of the Prompt in milliseconds
2161
+ */
2162
+ duration?: number;
2163
+ /**
2164
+ * The public URL of the Prompt
2165
+ */
2166
+ url?: string;
2167
+ /**
2168
+ * A List of Tags describing an Object
2169
+ */
2170
+ tags?: Array<Tag>;
2171
+ file?: FileReference;
2172
+ };
2173
+ type RestUpdateQueue = {
2174
+ name?: string;
2175
+ maxDialCount?: number;
2176
+ wrapUpTime?: number;
2177
+ defaultRingTimeout?: number;
2178
+ maxSize?: number;
2179
+ /**
2180
+ * A List of Tags describing an Object
2181
+ */
2182
+ tags?: Array<Tag>;
2183
+ };
2184
+ type RestUpdateQueueSelection = {
2185
+ label?: string;
2186
+ enabled?: boolean;
2187
+ continueOnMatch?: boolean;
2188
+ continueOnEmpty?: boolean;
2189
+ selectLastAgent?: boolean;
2190
+ priority?: number;
2191
+ trigger?: Trigger;
2192
+ groups?: Array<QueueSelectionGroup>;
2193
+ tags?: Array<QueueSelectionTag>;
2194
+ agents?: Array<QueueSelectionAgent>;
2195
+ };
2196
+ type RestUpdateRouting = {
2197
+ application?: RestCreateRoutingApplication;
2198
+ number?: RestCreateRoutingApplication;
2199
+ /**
2200
+ * A List of Tags describing an Object
2201
+ */
2202
+ tags?: Array<Tag>;
2203
+ };
2204
+ type RestUpdateTrigger = {
2205
+ name?: string;
2206
+ type?: TriggerType;
2207
+ conditions?: Array<TriggerCondition>;
2208
+ /**
2209
+ * A List of Tags describing an Object
2210
+ */
2211
+ tags?: Array<Tag>;
2212
+ };
2213
+ type Routing = {
2214
+ /**
2215
+ * The unique Identifier (UUID) of the object
2216
+ */
2217
+ id: string;
2218
+ application: RestCreateRoutingApplication;
2219
+ number: RestCreateRoutingApplication;
2220
+ /**
2221
+ * A List of Tags describing an Object
2222
+ */
2223
+ tags?: Array<Tag>;
2224
+ };
2225
+ type RoutingItemResponse = {
2226
+ item: Routing;
2227
+ /**
2228
+ * Whether the Request was successful or not
2229
+ */
2230
+ success: boolean;
2231
+ };
2232
+ type ServiceNumber = {
2233
+ /**
2234
+ * The unique Identifier (UUID) of the object
2235
+ */
2236
+ id: string;
2237
+ number?: string;
2238
+ /**
2239
+ * If SMS Capability is enabled
2240
+ */
2241
+ sms?: boolean;
2242
+ /**
2243
+ * If the Number is enabled
2244
+ */
2245
+ enabled?: boolean;
2246
+ /**
2247
+ * A List of Tags describing an Object
2248
+ */
2249
+ tags?: Array<Tag>;
2250
+ };
2251
+ type ServiceNumberItemResponse = {
2252
+ item: ServiceNumber;
2253
+ /**
2254
+ * Whether the Request was successful or not
2255
+ */
2256
+ success: boolean;
2257
+ };
2258
+ type SessionResponse = {
2259
+ item?: SessionResponseItem;
2260
+ success?: boolean;
2261
+ };
2262
+ type SessionResponseItem = {
2263
+ id?: string;
2264
+ valid?: boolean;
2265
+ /**
2266
+ * When the session was created
2267
+ */
2268
+ created?: number;
2269
+ /**
2270
+ * When the session was last accessed
2271
+ */
2272
+ last_access?: number;
2273
+ /**
2274
+ * Property containing session variables as key-value pairs
2275
+ */
2276
+ data?: {
2277
+ [key: string]: unknown;
2278
+ };
2279
+ };
2280
+ type SetCallSessionVariablesRequest = {
2281
+ [key: string]: unknown;
2282
+ };
2283
+ type SetCallSessionVariablesResponse = {
2284
+ success?: boolean;
2285
+ };
2286
+ type SettingsAppCustomerLogging = {
2287
+ enabled: boolean;
2288
+ };
2289
+ type SettingsAppConversations = {
2290
+ conversationScope: 'OWN' | 'GROUP' | 'ALL';
2291
+ autoClose: boolean;
2292
+ };
2293
+ type SettingsAppIntegrations = {
2294
+ taskIntegration: string | null;
2295
+ conversationTaskKey: string | null;
1155
2296
  scriptingIntegration: string | null;
1156
2297
  conversationScriptKey: string | null;
1157
2298
  conversationScriptCampaignKey: string | null;
@@ -1245,6 +2386,37 @@ type SimpleMenuItem = {
1245
2386
  application: ResourceReference;
1246
2387
  };
1247
2388
  type SimpleReportingReportType = 'inbound' | 'outbound' | 'dialer';
2389
+ type Sms = {
2390
+ /**
2391
+ * The unique Identifier (UUID) of the object
2392
+ */
2393
+ id: string;
2394
+ /**
2395
+ * The unique Identifier (UUID) of the object
2396
+ */
2397
+ conversationId: string;
2398
+ /**
2399
+ * The unique Identifier (UUID) of the object
2400
+ */
2401
+ agentId?: string;
2402
+ dateCreated: string;
2403
+ type: SmsType;
2404
+ from: string;
2405
+ to: string;
2406
+ state: SmsState;
2407
+ source: SmsSource;
2408
+ text?: string;
2409
+ };
2410
+ type SmsItemResponse = {
2411
+ item: Sms;
2412
+ /**
2413
+ * Whether the Request was successful or not
2414
+ */
2415
+ success: boolean;
2416
+ };
2417
+ type SmsSource = 'api' | 'inbound' | 'action' | 'test';
2418
+ type SmsState = 'unknown' | 'queued' | 'processing' | 'failed' | 'validation_failed' | 'sent' | 'received' | 'received_transaction' | 'merged';
2419
+ type SmsType = 'inbound' | 'outbound';
1248
2420
  type SpeechToTextApplication = {
1249
2421
  /**
1250
2422
  * The unique Identifier (UUID) of the object
@@ -1331,6 +2503,62 @@ type SwitchNodeTrigger = {
1331
2503
  * A Tag describing an Object
1332
2504
  */
1333
2505
  type Tag = string;
2506
+ type TestTriggersRequest = TestTriggersRequest1 | TestTriggersRequest2;
2507
+ type TestTriggersRequest1 = {
2508
+ /**
2509
+ * List of Triggers to test
2510
+ */
2511
+ triggers?: Array<TestTriggersRequest1TriggersInner>;
2512
+ /**
2513
+ * Additional Context for Trigger Evaluation
2514
+ */
2515
+ context?: {
2516
+ [key: string]: unknown;
2517
+ };
2518
+ };
2519
+ type TestTriggersRequest1TriggersInner = {
2520
+ /**
2521
+ * The unique Identifier (UUID) of the object
2522
+ */
2523
+ id?: string;
2524
+ };
2525
+ type TestTriggersRequest2 = {
2526
+ type: TriggerType;
2527
+ expressions: {
2528
+ [key: string]: unknown;
2529
+ };
2530
+ conditions: Array<TestTriggersRequest2Condition>;
2531
+ };
2532
+ type TestTriggersRequest2Condition = {
2533
+ expression: string;
2534
+ expectation?: string;
2535
+ operator: TriggerOperator;
2536
+ };
2537
+ type TestTriggersResponse = {
2538
+ success: boolean;
2539
+ test?: TestTriggersTestModeResponse;
2540
+ triggers: Array<TestTriggersResponseTrigger>;
2541
+ };
2542
+ type TestTriggersResponseTrigger = {
2543
+ /**
2544
+ * The unique Identifier (UUID) of the object
2545
+ */
2546
+ id: string;
2547
+ /**
2548
+ * Whether the trigger has been evaluated positively
2549
+ */
2550
+ triggered: boolean;
2551
+ };
2552
+ type TestTriggersTestModeResponse = {
2553
+ conditionResults: Array<TestTriggersTestModeResultItem>;
2554
+ triggered: boolean;
2555
+ };
2556
+ type TestTriggersTestModeResultItem = {
2557
+ expression: string;
2558
+ operator: TriggerOperator;
2559
+ expectation: unknown;
2560
+ value: boolean;
2561
+ };
1334
2562
  type TextToSpeechApplication = {
1335
2563
  /**
1336
2564
  * The unique Identifier (UUID) of the object
@@ -1406,6 +2634,37 @@ type TransferApplicationUpdateBody = {
1406
2634
  settings?: TransferApplicationSettings;
1407
2635
  module: 'transfer';
1408
2636
  };
2637
+ type Trigger = {
2638
+ /**
2639
+ * The unique Identifier (UUID) of the object
2640
+ */
2641
+ id: string;
2642
+ name: string;
2643
+ type: TriggerType;
2644
+ conditions: Array<TriggerCondition>;
2645
+ /**
2646
+ * A List of Tags describing an Object
2647
+ */
2648
+ tags?: Array<Tag>;
2649
+ };
2650
+ type TriggerCondition = {
2651
+ /**
2652
+ * The unique Identifier (UUID) of the object
2653
+ */
2654
+ id?: string;
2655
+ expression: string;
2656
+ operator: TriggerOperator;
2657
+ expectation: string;
2658
+ };
2659
+ type TriggerItemResponse = {
2660
+ item: Trigger;
2661
+ /**
2662
+ * Whether the Request was successful or not
2663
+ */
2664
+ success: boolean;
2665
+ };
2666
+ type TriggerOperator = 'EQ' | 'NEQ' | 'GT' | 'GE' | 'LT' | 'LE' | 'REGEXP' | 'LIKE' | 'GIVEN' | 'NOT_GIVEN' | 'STARTS_WITH' | 'ENDS_WITH' | 'CONTAINS' | 'NOT_CONTAINS' | 'IS_NULL' | 'IS_NOT_NULL' | 'EVALUABLE' | 'NOT_EVALUABLE';
2667
+ type TriggerType = 'ALL' | 'ANY';
1409
2668
  /**
1410
2669
  * Unix timestamp
1411
2670
  */
@@ -1417,6 +2676,30 @@ type UpdateAgentStatusRequest = {
1417
2676
  type UpdateAgentStatusRequestPresence = {
1418
2677
  name?: string;
1419
2678
  };
2679
+ type UpdateCampaignRequest = {
2680
+ name?: string;
2681
+ active?: boolean;
2682
+ testMode?: boolean;
2683
+ displayNumber?: string;
2684
+ listOrder?: CampaignListOrder;
2685
+ callRatio?: number;
2686
+ };
2687
+ type UpdateSessionVariablesRequest = {
2688
+ [key: string]: unknown;
2689
+ };
2690
+ type VariableDefinition = {
2691
+ key: string;
2692
+ label?: string;
2693
+ description?: string;
2694
+ example?: string;
2695
+ };
2696
+ type VariableDefinitionItemsResponse = {
2697
+ /**
2698
+ * Whether or not the request was successful
2699
+ */
2700
+ success: boolean;
2701
+ items: Array<VariableDefinition>;
2702
+ };
1420
2703
  type ListReportingCallsDomainParameter = CallDomain | Array<CallDomain>;
1421
2704
  type ListReportingCallsFinishReasonParameter = CallFinishReason | Array<CallFinishReason>;
1422
2705
  type ListReportingCallsIdParameter = ObjectUuid | Array<ObjectUuid>;
@@ -1426,70 +2709,193 @@ type ListReportingCallsToParameter = ReportingNumberFilter | Array<ReportingNumb
1426
2709
  type ListReportingCallsTypeParameter = CallType | Array<CallType>;
1427
2710
  type RestCreateAgentBody = RestCreateAgent;
1428
2711
  type RestCreateAgentGroupBody = RestCreateAgentGroup;
2712
+ type RestCreateBabeldeskBody = RestCreateBabeldesk;
2713
+ type RestCreateBabeldeskWidgetBody = RestCreateBabeldeskWidget;
2714
+ type RestCreateBusinessHourBody = RestCreateBusinessHour;
2715
+ type RestCreateCalendarBody = RestCreateCalendar;
2716
+ type RestCreateConversationBody = RestCreateConversation;
2717
+ type RestCreateGlobalAutomationBody = RestCreateGlobalAutomation;
1429
2718
  type RestCreateLocalAutomationBody = RestCreateLocalAutomation;
2719
+ type RestCreatePhonebookEntryBody = RestCreatePhonebookEntry;
2720
+ type RestCreateQueueBody = RestCreateQueue;
2721
+ type RestCreateQueueSelectionBody = RestCreateQueueSelection;
2722
+ type RestCreateRoutingBody = RestCreateRouting;
2723
+ type RestCreateTriggerBody = RestCreateTrigger;
1430
2724
  type RestUpdateAgentBody = RestUpdateAgent;
1431
2725
  type RestUpdateAgentGroupBody = RestUpdateAgentGroup;
2726
+ type RestUpdateBabeldeskBody = RestUpdateBabeldesk;
2727
+ type RestUpdateBabeldeskWidgetBody = RestUpdateBabeldeskWidget;
2728
+ type RestUpdateBusinessHourBody = RestUpdateBusinessHour;
2729
+ type RestUpdateCalendarBody = RestUpdateCalendar;
2730
+ type RestUpdateConversationBody = RestUpdateConversation;
2731
+ type RestUpdateGlobalAutomationBody = RestUpdateGlobalAutomation;
1432
2732
  type RestUpdateLocalAutomationBody = RestUpdateLocalAutomation;
1433
- type ListReportingCallsData = {
2733
+ type RestUpdatePhonebookEntryBody = RestUpdatePhonebookEntry;
2734
+ type RestUpdatePromptBody = RestUpdatePrompt;
2735
+ type RestUpdateQueueBody = RestUpdateQueue;
2736
+ type RestUpdateQueueSelectionBody = RestUpdateQueueSelection;
2737
+ type RestUpdateRoutingBody = RestUpdateRouting;
2738
+ type RestUpdateTriggerBody = RestUpdateTrigger;
2739
+ type CreateTestCall = CreateTestCallRequest;
2740
+ type ListAuditLogsData = {
1434
2741
  body?: never;
1435
2742
  path?: never;
1436
2743
  query?: {
1437
2744
  /**
1438
- * Parameter [page]
2745
+ * Unix timestamp start date filter
1439
2746
  */
1440
- page?: number;
2747
+ 'filters.dateCreated.start'?: number;
1441
2748
  /**
1442
- * Parameter [max]
2749
+ * Unix timestamp end date filter
1443
2750
  */
1444
- max?: number;
2751
+ 'filters.dateCreated.end'?: number;
1445
2752
  /**
1446
- * Parameter [sessionId]
2753
+ * Maximum items to return
1447
2754
  */
1448
- sessionId?: ObjectUuid;
2755
+ max?: number;
1449
2756
  /**
1450
- * Parameter [conversationId]
2757
+ * Items list page number
1451
2758
  */
1452
- conversationId?: ObjectUuid;
2759
+ page?: number;
1453
2760
  /**
1454
- * Parameter [id]
2761
+ * Field to sort items by
1455
2762
  */
1456
- id?: ListReportingCallsIdParameter;
2763
+ sort?: string;
1457
2764
  /**
1458
- * Parameter [parentId]
2765
+ * Sort order
1459
2766
  */
1460
- parentId?: ListReportingCallsIdParameter;
2767
+ order?: string;
1461
2768
  /**
1462
- * Parameter [type]
2769
+ * Filter by `operation`
1463
2770
  */
1464
- type?: ListReportingCallsTypeParameter;
2771
+ 'filters.operation'?: AuditLogOperation;
1465
2772
  /**
1466
- * Parameter [from]
2773
+ * Filter by `resource`
1467
2774
  */
1468
- from?: ReportingNumberFilter;
2775
+ 'filters.resource'?: string;
2776
+ };
2777
+ url: '/api/v2/audit/request';
2778
+ };
2779
+ type ListBabeldesksData = {
2780
+ body?: never;
2781
+ path?: never;
2782
+ query?: {
1469
2783
  /**
1470
- * Parameter [fromNumber]
2784
+ * Parameter [page]
1471
2785
  */
1472
- fromNumber?: ReportingNumberFilter;
2786
+ page?: number;
1473
2787
  /**
1474
- * Parameter [to]
2788
+ * Parameter [max]
1475
2789
  */
1476
- to?: ListReportingCallsToParameter;
2790
+ max?: number;
2791
+ };
2792
+ url: '/api/v2/babeldesk/dashboards';
2793
+ };
2794
+ type ListBabeldeskWidgetsData = {
2795
+ body?: never;
2796
+ path?: never;
2797
+ query?: {
1477
2798
  /**
1478
- * Parameter [toNumber]
2799
+ * Parameter [page]
1479
2800
  */
1480
- toNumber?: ListReportingCallsToParameter;
2801
+ page?: number;
1481
2802
  /**
1482
- * Parameter [time.start]
2803
+ * Parameter [max]
1483
2804
  */
1484
- 'time.start'?: UnixTimestamp;
2805
+ max?: number;
2806
+ };
2807
+ url: '/api/v2/babeldesk/widgets';
2808
+ };
2809
+ type ListBusinessHoursData = {
2810
+ body?: never;
2811
+ path?: never;
2812
+ query?: {
1485
2813
  /**
1486
- * Parameter [time.end]
2814
+ * Parameter [page]
1487
2815
  */
1488
- 'time.end'?: UnixTimestamp;
2816
+ page?: number;
1489
2817
  /**
1490
- * Parameter [agentId]
2818
+ * Parameter [max]
1491
2819
  */
1492
- agentId?: ListReportingCallsIdParameter;
2820
+ max?: number;
2821
+ };
2822
+ url: '/api/v2/business-hours';
2823
+ };
2824
+ type ListCalendarsData = {
2825
+ body?: never;
2826
+ path?: never;
2827
+ query?: {
2828
+ /**
2829
+ * Parameter [page]
2830
+ */
2831
+ page?: number;
2832
+ /**
2833
+ * Parameter [max]
2834
+ */
2835
+ max?: number;
2836
+ };
2837
+ url: '/api/v2/calendars';
2838
+ };
2839
+ type ListReportingCallsData = {
2840
+ body?: never;
2841
+ path?: never;
2842
+ query?: {
2843
+ /**
2844
+ * Parameter [page]
2845
+ */
2846
+ page?: number;
2847
+ /**
2848
+ * Parameter [max]
2849
+ */
2850
+ max?: number;
2851
+ /**
2852
+ * Parameter [sessionId]
2853
+ */
2854
+ sessionId?: ObjectUuid;
2855
+ /**
2856
+ * Parameter [conversationId]
2857
+ */
2858
+ conversationId?: ObjectUuid;
2859
+ /**
2860
+ * Parameter [id]
2861
+ */
2862
+ id?: ListReportingCallsIdParameter;
2863
+ /**
2864
+ * Parameter [parentId]
2865
+ */
2866
+ parentId?: ListReportingCallsIdParameter;
2867
+ /**
2868
+ * Parameter [type]
2869
+ */
2870
+ type?: ListReportingCallsTypeParameter;
2871
+ /**
2872
+ * Parameter [from]
2873
+ */
2874
+ from?: ReportingNumberFilter;
2875
+ /**
2876
+ * Parameter [fromNumber]
2877
+ */
2878
+ fromNumber?: ReportingNumberFilter;
2879
+ /**
2880
+ * Parameter [to]
2881
+ */
2882
+ to?: ListReportingCallsToParameter;
2883
+ /**
2884
+ * Parameter [toNumber]
2885
+ */
2886
+ toNumber?: ListReportingCallsToParameter;
2887
+ /**
2888
+ * Parameter [time.start]
2889
+ */
2890
+ 'time.start'?: UnixTimestamp;
2891
+ /**
2892
+ * Parameter [time.end]
2893
+ */
2894
+ 'time.end'?: UnixTimestamp;
2895
+ /**
2896
+ * Parameter [agentId]
2897
+ */
2898
+ agentId?: ListReportingCallsIdParameter;
1493
2899
  /**
1494
2900
  * Free Text Query
1495
2901
  */
@@ -1728,33 +3134,403 @@ type ListAllSimpleReportingCallsData = {
1728
3134
  };
1729
3135
  url: '/api/v2/calls/reporting/simple';
1730
3136
  };
3137
+ type ListConferencesData = {
3138
+ body?: never;
3139
+ path?: never;
3140
+ query?: {
3141
+ /**
3142
+ * Parameter [page]
3143
+ */
3144
+ page?: number;
3145
+ /**
3146
+ * Parameter [max]
3147
+ */
3148
+ max?: number;
3149
+ };
3150
+ url: '/api/v2/conferences';
3151
+ };
3152
+ type ListConversationsData = {
3153
+ body?: never;
3154
+ path?: never;
3155
+ query?: {
3156
+ /**
3157
+ * Parameter [page]
3158
+ */
3159
+ page?: number;
3160
+ /**
3161
+ * Parameter [max]
3162
+ */
3163
+ max?: number;
3164
+ /**
3165
+ * Filter by associated phone number
3166
+ */
3167
+ phone?: string;
3168
+ /**
3169
+ * Filter by conversation state
3170
+ */
3171
+ state?: ConversationState;
3172
+ };
3173
+ url: '/api/v2/conversations';
3174
+ };
3175
+ type ListGlobalAutomationsData = {
3176
+ body?: never;
3177
+ path?: never;
3178
+ query?: {
3179
+ /**
3180
+ * Parameter [page]
3181
+ */
3182
+ page?: number;
3183
+ /**
3184
+ * Parameter [max]
3185
+ */
3186
+ max?: number;
3187
+ };
3188
+ url: '/api/v2/events/triggers';
3189
+ };
3190
+ type ListIntegrationsData = {
3191
+ body?: never;
3192
+ path?: never;
3193
+ query?: {
3194
+ /**
3195
+ * Parameter [page]
3196
+ */
3197
+ page?: number;
3198
+ /**
3199
+ * Parameter [max]
3200
+ */
3201
+ max?: number;
3202
+ };
3203
+ url: '/api/v2/integrations';
3204
+ };
3205
+ type ListServiceNumbersData = {
3206
+ body?: never;
3207
+ path?: never;
3208
+ query?: {
3209
+ /**
3210
+ * Parameter [page]
3211
+ */
3212
+ page?: number;
3213
+ /**
3214
+ * Parameter [max]
3215
+ */
3216
+ max?: number;
3217
+ };
3218
+ url: '/api/v2/numbers';
3219
+ };
3220
+ type ListPhonebookEntrysData = {
3221
+ body?: never;
3222
+ path?: never;
3223
+ query?: {
3224
+ /**
3225
+ * Parameter [page]
3226
+ */
3227
+ page?: number;
3228
+ /**
3229
+ * Parameter [max]
3230
+ */
3231
+ max?: number;
3232
+ };
3233
+ url: '/api/v2/phonebook';
3234
+ };
3235
+ type ListPromptsData = {
3236
+ body?: never;
3237
+ path?: never;
3238
+ query?: {
3239
+ /**
3240
+ * Parameter [page]
3241
+ */
3242
+ page?: number;
3243
+ /**
3244
+ * Parameter [max]
3245
+ */
3246
+ max?: number;
3247
+ };
3248
+ url: '/api/v2/prompts';
3249
+ };
3250
+ type ListQueuesData = {
3251
+ body?: never;
3252
+ path?: never;
3253
+ query?: {
3254
+ /**
3255
+ * Parameter [page]
3256
+ */
3257
+ page?: number;
3258
+ /**
3259
+ * Parameter [max]
3260
+ */
3261
+ max?: number;
3262
+ };
3263
+ url: '/api/v2/queues';
3264
+ };
3265
+ type ListRoutingsData = {
3266
+ body?: never;
3267
+ path?: never;
3268
+ query?: {
3269
+ /**
3270
+ * Parameter [page]
3271
+ */
3272
+ page?: number;
3273
+ /**
3274
+ * Parameter [max]
3275
+ */
3276
+ max?: number;
3277
+ };
3278
+ url: '/api/v2/routings';
3279
+ };
3280
+ type ListSmssData = {
3281
+ body?: never;
3282
+ path?: never;
3283
+ query?: {
3284
+ /**
3285
+ * Parameter [page]
3286
+ */
3287
+ page?: number;
3288
+ /**
3289
+ * Parameter [max]
3290
+ */
3291
+ max?: number;
3292
+ };
3293
+ url: '/api/v2/sms';
3294
+ };
3295
+ type ListTriggersData = {
3296
+ body?: never;
3297
+ path?: never;
3298
+ query?: {
3299
+ /**
3300
+ * Parameter [page]
3301
+ */
3302
+ page?: number;
3303
+ /**
3304
+ * Parameter [max]
3305
+ */
3306
+ max?: number;
3307
+ };
3308
+ url: '/api/v2/triggers';
3309
+ };
3310
+
3311
+ interface ListUsersQuery {
3312
+ /** Filter by email address. */
3313
+ email?: string;
3314
+ }
3315
+ /** User management — `/api/v2/users`. */
3316
+ declare class UsersResource {
3317
+ private readonly client;
3318
+ constructor(client: Client);
3319
+ /**
3320
+ * List users, auto-paginating across pages.
3321
+ *
3322
+ * ```ts
3323
+ * for await (const user of mgr.users.list()) console.log(user.email);
3324
+ * ```
3325
+ */
3326
+ list(query?: ListUsersQuery): AsyncGenerator<ManagedUser>;
3327
+ /** Collect every user into an array (convenience over {@link list}). */
3328
+ listAll(query?: ListUsersQuery): Promise<ManagedUser[]>;
3329
+ /** Create a user. */
3330
+ create(user: CreateManagedUserRequest): Promise<ManagedUserItemResponse>;
3331
+ /** Enable the given users (by email). */
3332
+ enable(emails: string[]): Promise<void>;
3333
+ /** Disable the given users (by email). */
3334
+ disable(emails: string[]): Promise<void>;
3335
+ /** Delete the given users (by email). */
3336
+ delete(emails: string[]): Promise<void>;
3337
+ /** Trigger a password-reset email for the given users (by email). */
3338
+ resetPasswords(emails: string[]): Promise<void>;
3339
+ /** List the role names that can be assigned to users. */
3340
+ listRoles(): Promise<AccountRole$1[]>;
3341
+ /** Grant the given roles to the given users (by email). */
3342
+ addRoles(emails: string[], roles: AccountRole$1[]): Promise<void>;
3343
+ /** Revoke the given roles from the given users (by email). */
3344
+ removeRoles(emails: string[], roles: AccountRole$1[]): Promise<void>;
3345
+ }
3346
+
3347
+ /**
3348
+ * Babelforce Account
3349
+ */
3350
+ type Account = {
3351
+ /**
3352
+ * The unique Identifier (UUID) of the object
3353
+ */
3354
+ id: string;
3355
+ /**
3356
+ * The Name of the Company
3357
+ */
3358
+ name: string;
3359
+ roles: AccountRole;
3360
+ };
3361
+ /**
3362
+ * A role associated with the Account
3363
+ */
3364
+ type AccountRole = 'manager' | 'owner' | 'reporter' | 'user' | 'agent' | 'supervisor' | 'sales' | 'router' | 'scheduler';
3365
+ type User = {
3366
+ /**
3367
+ * The unique Identifier (UUID) of the object
3368
+ */
3369
+ id: string;
3370
+ username: string;
3371
+ /**
3372
+ * A List of Roles which are associated with the current User
3373
+ */
3374
+ roles: Array<AccountRole>;
3375
+ account: UserAccount;
3376
+ };
3377
+ /**
3378
+ * A Company User Account
3379
+ */
3380
+ type UserAccount = {
3381
+ /**
3382
+ * The unique Identifier (UUID) of the object
3383
+ */
3384
+ id: string;
3385
+ /**
3386
+ * The Name of the Company associated with that User
3387
+ */
3388
+ company: string;
3389
+ };
3390
+ /**
3391
+ * User & associated customer account information
3392
+ */
3393
+ type UserCustomer = {
3394
+ user: UserCustomerUser;
3395
+ customer: UserCustomerCustomer;
3396
+ };
3397
+ type UserCustomerItemResponse = {
3398
+ item: UserCustomer;
3399
+ /**
3400
+ * Whether the Request was successful or not
3401
+ */
3402
+ success: boolean;
3403
+ };
3404
+ /**
3405
+ * A user's customer account details
3406
+ */
3407
+ type UserCustomerCustomer = {
3408
+ /**
3409
+ * The unique Identifier (UUID) of the object
3410
+ */
3411
+ id: string;
3412
+ /**
3413
+ * The name of the company associated with the user
3414
+ */
3415
+ company: string;
3416
+ /**
3417
+ * The contact number for the user's customer account
3418
+ */
3419
+ phone: string;
3420
+ /**
3421
+ * Customer account owner's first name
3422
+ */
3423
+ firstName: string;
3424
+ /**
3425
+ * Customer account owner's last name
3426
+ */
3427
+ lastName: string;
3428
+ /**
3429
+ * Customer account owner's email
3430
+ */
3431
+ email: string;
3432
+ dateCreated: string;
3433
+ settings: UserCustomerCustomerSettings;
3434
+ apis: UserCustomerCustomerApis;
3435
+ };
3436
+ /**
3437
+ * API access information for the user's customer account
3438
+ */
3439
+ type UserCustomerCustomerApis = {
3440
+ babelforce: UserCustomerCustomerApisBabelforce;
3441
+ stream: UserCustomerCustomerApisStream;
3442
+ };
3443
+ /**
3444
+ * REST API access credentials
3445
+ */
3446
+ type UserCustomerCustomerApisBabelforce = {
3447
+ /**
3448
+ * The unique Identifier (UUID) of the object
3449
+ */
3450
+ accessId: string;
3451
+ /**
3452
+ * The unique Identifier (UUID) of the object
3453
+ */
3454
+ accessToken: string;
3455
+ };
3456
+ /**
3457
+ * Stream API access information
3458
+ */
3459
+ type UserCustomerCustomerApisStream = {
3460
+ /**
3461
+ * Push API token
3462
+ */
3463
+ token: string;
3464
+ dateCreated: string;
3465
+ lastUpdated: string;
3466
+ };
3467
+ /**
3468
+ * User's customer account settings
3469
+ */
3470
+ type UserCustomerCustomerSettings = {
3471
+ /**
3472
+ * Whether the user's customer account is enabled or not
3473
+ */
3474
+ enabled: boolean;
3475
+ /**
3476
+ * Whether the user's customer account is an expired trial account or not
3477
+ */
3478
+ isTrialExpired: boolean;
3479
+ trialExpirationDate: string;
3480
+ /**
3481
+ * Timezone of the user's customer account
3482
+ */
3483
+ defaultTimeZone: string;
3484
+ };
3485
+ /**
3486
+ * Basic user information
3487
+ */
3488
+ type UserCustomerUser = {
3489
+ /**
3490
+ * The unique Identifier (UUID) of the object
3491
+ */
3492
+ id?: string;
3493
+ /**
3494
+ * User's email username
3495
+ */
3496
+ username?: string;
3497
+ /**
3498
+ * A List of Roles which are associated with the current User
3499
+ */
3500
+ roles?: Array<AccountRole>;
3501
+ /**
3502
+ * Whether or not the user account has expired
3503
+ */
3504
+ expired?: boolean;
3505
+ };
3506
+ type UserItemResponse = {
3507
+ item: User;
3508
+ /**
3509
+ * Whether the Request was successful or not
3510
+ */
3511
+ success: boolean;
3512
+ };
1731
3513
 
1732
- interface ListUsersQuery {
1733
- /** Filter by email address. */
1734
- email?: string;
1735
- }
1736
- /** User management — `/api/v2/users`. */
1737
- declare class UsersResource {
3514
+ /**
3515
+ * The authenticated principal — the current user, the accounts they can access, and self-service
3516
+ * password reset. Backed by `/api/v2/user`.
3517
+ *
3518
+ * ```ts
3519
+ * const { item: user } = await mgr.me.get();
3520
+ * const accounts = await mgr.me.accounts();
3521
+ * ```
3522
+ */
3523
+ declare class MeResource {
1738
3524
  private readonly client;
1739
3525
  constructor(client: Client);
1740
- /**
1741
- * List users, auto-paginating across pages.
1742
- *
1743
- * ```ts
1744
- * for await (const user of mgr.users.list()) console.log(user.email);
1745
- * ```
1746
- */
1747
- list(query?: ListUsersQuery): AsyncGenerator<ManagedUser>;
1748
- /** Collect every user into an array (convenience over {@link list}). */
1749
- listAll(query?: ListUsersQuery): Promise<ManagedUser[]>;
1750
- /** Create a user. */
1751
- create(user: CreateManagedUserRequest): Promise<ManagedUserItemResponse>;
1752
- /** Enable the given users (by email). */
1753
- enable(emails: string[]): Promise<void>;
1754
- /** Disable the given users (by email). */
1755
- disable(emails: string[]): Promise<void>;
1756
- /** Delete the given users (by email). */
1757
- delete(emails: string[]): Promise<void>;
3526
+ /** Get the current user. */
3527
+ get(): Promise<UserItemResponse>;
3528
+ /** Get the current user together with their account (customer) information. */
3529
+ customer(): Promise<UserCustomerItemResponse>;
3530
+ /** List the accounts the current user can access. */
3531
+ accounts(): Promise<Account[]>;
3532
+ /** Request a password-reset email for the current user. */
3533
+ resetPassword(): Promise<void>;
1758
3534
  }
1759
3535
 
1760
3536
  interface ListAgentsQuery {
@@ -1842,11 +3618,20 @@ type SimpleReportingCallsQuery = Omit<NonNullable<ListAllSimpleReportingCallsDat
1842
3618
  /** Page size (the API's `max`); defaults to the server default. */
1843
3619
  pageSize?: number;
1844
3620
  };
1845
- /** Call reporting and (future) call control — `/api/v2/calls`. */
3621
+ /** Call reporting and call control — `/api/v2/calls`. */
1846
3622
  declare class CallsResource {
3623
+ private readonly client;
1847
3624
  /** Call reporting — `/api/v2/calls/reporting`. */
1848
3625
  readonly reporting: ReportingResource;
1849
3626
  constructor(client: Client);
3627
+ /** Get a single call by id. */
3628
+ get(id: string): Promise<CallItemResponse>;
3629
+ /** Hang up a live call; returns the updated call. */
3630
+ hangup(id: string): Promise<CallItemResponse>;
3631
+ /** Create an inbound test call. */
3632
+ createTestCall(body: CreateTestCall): Promise<CallItemResponse>;
3633
+ /** Set session variables on a call. */
3634
+ setSessionVariables(id: string, variables: SetCallSessionVariablesRequest): Promise<SetCallSessionVariablesResponse>;
1850
3635
  }
1851
3636
  /** Call reporting — `/api/v2/calls/reporting`. */
1852
3637
  declare class ReportingResource {
@@ -2089,6 +3874,12 @@ type ActionSetting = {
2089
3874
  async?: boolean;
2090
3875
  timeout?: Milliseconds;
2091
3876
  };
3877
+ type AgentActions = 'Accept' | 'Reject' | 'Complete';
3878
+ type AgentLocking = 'unlock';
3879
+ type AgentLockState = {
3880
+ agent_id?: Id;
3881
+ state?: 'locked' | 'unlocked';
3882
+ };
2092
3883
  type TaskStateEvents = 'on_scheduled' | 'on_rescheduled' | 'on_selecting' | 'on_accepted' | 'on_rejected' | 'on_assigned' | 'on_processing' | 'on_pending' | 'on_completed' | 'on_canceled' | 'on_failed';
2093
3884
  type TaskState = 'Scheduled' | 'Rescheduled' | 'Selecting' | 'Accepted' | 'Rejected' | 'Assigned' | 'Processing' | 'Pending' | 'Completed' | 'Canceled' | 'Failed';
2094
3885
  type Actions = {
@@ -2147,16 +3938,135 @@ type Task = BaseTask & {
2147
3938
  has_error?: _Error;
2148
3939
  };
2149
3940
  type InterruptionTargetStates = 'Completed' | 'Canceled' | 'Failed';
3941
+ type PageMetadata$1 = {
3942
+ page?: number;
3943
+ per_page?: number;
3944
+ page_count?: number;
3945
+ total_count?: number;
3946
+ };
2150
3947
  type ManualActionRequest = {
2151
3948
  reason: string;
2152
3949
  };
2153
3950
  type TemplateOverride = {
2154
3951
  [key: string]: unknown;
2155
3952
  };
3953
+ type AccountSelectionConfiguration = {
3954
+ accept_timeout?: AcceptTimeout;
3955
+ complete_timeout?: CompleteTimeout;
3956
+ expire_in?: ExpireIn;
3957
+ reschedule_delay?: RescheduleDelay;
3958
+ selection_engine?: SelectionEngine;
3959
+ };
3960
+ type SecretPrefixes = Array<string>;
3961
+ type SecretKeys = Array<string>;
3962
+ type TestActionInput = {
3963
+ task?: {
3964
+ [key: string]: unknown;
3965
+ };
3966
+ context?: {
3967
+ [key: string]: unknown;
3968
+ };
3969
+ };
3970
+ type TestActionOutput = {
3971
+ events?: unknown;
3972
+ context?: {
3973
+ [key: string]: unknown;
3974
+ };
3975
+ };
3976
+ type TestActionResult = {
3977
+ actions?: Action;
3978
+ input?: TestActionInput;
3979
+ output?: TestActionOutput;
3980
+ };
3981
+ type TestAction = {
3982
+ actions?: Action;
3983
+ input?: TestActionInput;
3984
+ };
3985
+ type ScriptResponses = Script;
3986
+ type ScriptType = 'js' | 'codeblock' | 'template' | 'babelforce.codeblock' | 'babelforce.template';
3987
+ type ScriptFileMetadataRequest = {
3988
+ name?: string;
3989
+ id?: Id;
3990
+ };
3991
+ type ScriptFileMetadata = ScriptFileMetadataRequest & {
3992
+ [key: string]: unknown;
3993
+ };
3994
+ type Script = {
3995
+ file: ScriptFile;
3996
+ metadata?: ScriptFileMetadata;
3997
+ };
3998
+ type ScriptFile = string;
3999
+ type ScriptList = {
4000
+ _metadata?: PageMetadata$1;
4001
+ records?: Array<ScriptFileMetadata>;
4002
+ };
4003
+ type TaskJournalEntry = {
4004
+ state?: TaskState;
4005
+ meta?: {
4006
+ [key: string]: unknown;
4007
+ };
4008
+ at?: TimestampInMsUtc;
4009
+ };
4010
+ type TaskTypes = Array<TaskType>;
4011
+ type TaskTimeSeries = {
4012
+ type?: TaskType;
4013
+ start?: DateTime;
4014
+ end?: DateTime;
4015
+ rate?: Rate;
4016
+ /**
4017
+ * A ordered list of n time series entries ordered from newest [0] to oldest [n]. Each entry represents a specific Any values that are 0 are omitted.
4018
+ */
4019
+ timeseries?: Array<TimeSeriesEntry>;
4020
+ };
4021
+ type TimeSeriesEntry = {
4022
+ at?: DateTime;
4023
+ tasks?: number;
4024
+ errors_per_task?: number;
4025
+ };
4026
+ type DateTime = string;
4027
+ /**
4028
+ * Rate of the contained time series.
4029
+ */
4030
+ type Rate = '60s' | '1h' | '1d';
4031
+ type TaskJournal = {
4032
+ journal?: Array<TaskJournalEntry>;
4033
+ id?: Id;
4034
+ created_at?: TimestampInMsUtc;
4035
+ scheduled_at?: TimestampInMsUtc;
4036
+ total_duration?: TimestampInMsUtc;
4037
+ accept_duration?: TimestampInMsUtc;
4038
+ };
4039
+ type AgentJournal = {
4040
+ id?: Id;
4041
+ interaction_frequency?: {
4042
+ [key: string]: unknown;
4043
+ };
4044
+ journal?: unknown;
4045
+ };
4046
+ type InteractionDurations = {
4047
+ agent_id?: Id;
4048
+ meta?: unknown;
4049
+ items?: unknown;
4050
+ };
4051
+ type LogsResponse = LogsList | PagedLogsList;
4052
+ type PagedLogsList = {
4053
+ _metadata?: PageMetadata$1;
4054
+ records?: Array<{
4055
+ [key: string]: unknown;
4056
+ }>;
4057
+ };
4058
+ type LogsList = {
4059
+ items?: Array<{
4060
+ [key: string]: unknown;
4061
+ }>;
4062
+ };
2156
4063
  type SubmitTaskBody = SubmitTask;
2157
4064
  type UpdateTaskBody = Task;
2158
4065
  type ManualAction = ManualActionRequest;
2159
4066
  type TaskTemplateOverrides = TemplateOverride;
4067
+ type TestActionRequest = TestAction;
4068
+ type SubmitScript = Script;
4069
+ type SelectionConfigurationRequest = AccountSelectionConfiguration;
2160
4070
 
2161
4071
  type PageMetadata = {
2162
4072
  page?: number;
@@ -2206,7 +4116,29 @@ declare class TasksResource {
2206
4116
  private readonly client;
2207
4117
  /** Recurring task schedules — `/api/v3/tasks/schedules`. */
2208
4118
  readonly schedules: TaskSchedulesResource;
4119
+ /** Task scripts — `/api/v3/tasks/scripts`. */
4120
+ readonly scripts: TaskScriptsResource;
4121
+ /** Task secrets — `/api/v3/tasks/configurations/secrets`. */
4122
+ readonly secrets: TaskSecretsResource;
4123
+ /** Account task-selection configuration — `/api/v3/tasks/configurations/selection`. */
4124
+ readonly selectionConfig: TaskSelectionConfigResource;
4125
+ /** Task & agent metrics — `/api/v3/tasks/metrics`. */
4126
+ readonly metrics: TaskMetricsResource;
2209
4127
  constructor(client: Client);
4128
+ /** Task usage time series. */
4129
+ usage(): Promise<TaskTimeSeries>;
4130
+ /** The available task usage types. */
4131
+ usageTypes(): Promise<TaskTypes>;
4132
+ /** Customer task logs. */
4133
+ logs(): Promise<LogsResponse>;
4134
+ /** Test a task action without dispatching it. */
4135
+ testAction(body: TestActionRequest): Promise<TestActionResult>;
4136
+ /** Transition a task to a new state. @deprecated by the API; prefer {@link interrupt}. */
4137
+ changeState(taskId: string, taskState: TaskState): Promise<void>;
4138
+ /** Perform an agent action on a task (accept / reject / complete). */
4139
+ agentAction(taskId: string, agentAction: AgentActions, action: ManualAction): Promise<Task>;
4140
+ /** Change the agent task-locking state. */
4141
+ setAgentLock(lockState: AgentLocking): Promise<AgentLockState>;
2210
4142
  /**
2211
4143
  * List tasks, auto-paginating across pages.
2212
4144
  *
@@ -2241,18 +4173,563 @@ declare class TaskSchedulesResource {
2241
4173
  /** Delete a task schedule by name. */
2242
4174
  delete(taskScheduleName: string): Promise<void>;
2243
4175
  }
4176
+ /** Task scripts (custom code by type) — `/api/v3/tasks/scripts`. */
4177
+ declare class TaskScriptsResource {
4178
+ private readonly client;
4179
+ constructor(client: Client);
4180
+ /** List scripts of a given type. */
4181
+ list(type: ScriptType): Promise<ScriptList>;
4182
+ /** Get a script by type and code id. */
4183
+ get(type: ScriptType, codeId: string): Promise<ScriptResponses>;
4184
+ /** Create a script of a given type. */
4185
+ submit(type: ScriptType, body: SubmitScript): Promise<ScriptResponses>;
4186
+ /** Update a script. */
4187
+ update(type: ScriptType, codeId: string, body: SubmitScript): Promise<ScriptResponses>;
4188
+ /** Delete a script. */
4189
+ delete(type: ScriptType, codeId: string): Promise<void>;
4190
+ }
4191
+ /** Task secrets, grouped by prefix — `/api/v3/tasks/configurations/secrets`. */
4192
+ declare class TaskSecretsResource {
4193
+ private readonly client;
4194
+ constructor(client: Client);
4195
+ /** List the secret prefixes. */
4196
+ listPrefixes(): Promise<SecretPrefixes>;
4197
+ /** List the secret keys under a prefix. */
4198
+ listKeys(prefix: string): Promise<SecretKeys>;
4199
+ /** Create secrets under a prefix. */
4200
+ create(prefix: string, secrets: Record<string, unknown>): Promise<void>;
4201
+ /** Patch (merge) secrets under a prefix. */
4202
+ patch(prefix: string, secrets: Record<string, unknown>): Promise<void>;
4203
+ /** Delete the given secret keys under a prefix. */
4204
+ deleteKeys(prefix: string, keys: SecretKeys): Promise<void>;
4205
+ }
4206
+ /** Account task-selection configuration — `/api/v3/tasks/configurations/selection`. */
4207
+ declare class TaskSelectionConfigResource {
4208
+ private readonly client;
4209
+ constructor(client: Client);
4210
+ /** Read the current selection configuration. */
4211
+ read(): Promise<AccountSelectionConfiguration>;
4212
+ /** Create the selection configuration. */
4213
+ create(body: SelectionConfigurationRequest): Promise<AccountSelectionConfiguration>;
4214
+ /** Update the selection configuration. */
4215
+ update(body: SelectionConfigurationRequest): Promise<AccountSelectionConfiguration>;
4216
+ /** Delete the selection configuration. */
4217
+ delete(): Promise<void>;
4218
+ }
4219
+ /** Task & agent metrics — `/api/v3/tasks/metrics`. */
4220
+ declare class TaskMetricsResource {
4221
+ private readonly client;
4222
+ constructor(client: Client);
4223
+ /** The journal (event timeline) for a single task. */
4224
+ taskJournal(taskId: string): Promise<TaskJournal>;
4225
+ /** The interaction journal for an agent. */
4226
+ agentJournal(agentId: string): Promise<AgentJournal>;
4227
+ /** Interaction durations for an agent. */
4228
+ agentInteractionDurations(agentId: string): Promise<InteractionDurations>;
4229
+ }
4230
+
4231
+ /** Filters for `sms.list` (the generated query surface minus the `page` / `max` paging controls). */
4232
+ type ListSmsQuery = Omit<NonNullable<ListSmssData['query']>, 'page' | 'max'> & {
4233
+ /** Page size (the API's `max`); defaults to the server default. */
4234
+ pageSize?: number;
4235
+ };
4236
+ /** SMS records — `/api/v2/sms`. */
4237
+ declare class SmsResource {
4238
+ private readonly client;
4239
+ constructor(client: Client);
4240
+ /** List SMS records, auto-paginating across pages. */
4241
+ list(query?: ListSmsQuery): AsyncGenerator<Sms>;
4242
+ /** Collect every SMS record into an array (convenience over {@link list}). */
4243
+ listAll(query?: ListSmsQuery): Promise<Sms[]>;
4244
+ /** Get a single SMS record by id. */
4245
+ get(id: string): Promise<SmsItemResponse>;
4246
+ }
4247
+
4248
+ /** Filters for `numbers.list` (the generated query surface minus the `page` / `max` controls). */
4249
+ type ListNumbersQuery = Omit<NonNullable<ListServiceNumbersData['query']>, 'page' | 'max'> & {
4250
+ /** Page size (the API's `max`); defaults to the server default. */
4251
+ pageSize?: number;
4252
+ };
4253
+ /** Service (phone) numbers — `/api/v2/numbers`. */
4254
+ declare class NumbersResource {
4255
+ private readonly client;
4256
+ constructor(client: Client);
4257
+ /** List service numbers, auto-paginating across pages. */
4258
+ list(query?: ListNumbersQuery): AsyncGenerator<ServiceNumber>;
4259
+ /** Collect every service number into an array (convenience over {@link list}). */
4260
+ listAll(query?: ListNumbersQuery): Promise<ServiceNumber[]>;
4261
+ /** Get a single service number by id. */
4262
+ get(id: string): Promise<ServiceNumberItemResponse>;
4263
+ /** Add tags to a service number; returns the updated number. */
4264
+ addTags(id: string, tags: Tag[]): Promise<ServiceNumberItemResponse>;
4265
+ }
4266
+
4267
+ /** Filters for `conferences.list` (the generated query surface minus the `page` / `max` controls). */
4268
+ type ListConferencesQuery = Omit<NonNullable<ListConferencesData['query']>, 'page' | 'max'> & {
4269
+ /** Page size (the API's `max`); defaults to the server default. */
4270
+ pageSize?: number;
4271
+ };
4272
+ /** Conferences — `/api/v2/conferences`. */
4273
+ declare class ConferencesResource {
4274
+ private readonly client;
4275
+ constructor(client: Client);
4276
+ /** List conferences, auto-paginating across pages. */
4277
+ list(query?: ListConferencesQuery): AsyncGenerator<Conference>;
4278
+ /** Collect every conference into an array (convenience over {@link list}). */
4279
+ listAll(query?: ListConferencesQuery): Promise<Conference[]>;
4280
+ /** Get a single conference by id. */
4281
+ get(id: string): Promise<ConferenceItemResponse>;
4282
+ }
2244
4283
 
4284
+ /** Filters for `queues.list` (the generated query surface minus the `page` / `max` controls). */
4285
+ type ListQueuesQuery = Omit<NonNullable<ListQueuesData['query']>, 'page' | 'max'> & {
4286
+ /** Page size (the API's `max`); defaults to the server default. */
4287
+ pageSize?: number;
4288
+ };
4289
+ /** Queues — `/api/v2/queues`, with a nested `selections` sub-resource. */
4290
+ declare class QueuesResource {
4291
+ private readonly client;
4292
+ /** Queue selections — `/api/v2/queues/{queueId}/selections`. */
4293
+ readonly selections: QueueSelectionsResource;
4294
+ constructor(client: Client);
4295
+ /** List queues, auto-paginating across pages. */
4296
+ list(query?: ListQueuesQuery): AsyncGenerator<Queue>;
4297
+ /** Collect every queue into an array (convenience over {@link list}). */
4298
+ listAll(query?: ListQueuesQuery): Promise<Queue[]>;
4299
+ /** Create a queue. */
4300
+ create(body: RestCreateQueueBody): Promise<QueueItemResponse>;
4301
+ /** Get a queue by id. */
4302
+ get(id: string): Promise<QueueItemResponse>;
4303
+ /** Update a queue. */
4304
+ update(id: string, body: RestUpdateQueueBody): Promise<QueueItemResponse>;
4305
+ /** Delete a queue. */
4306
+ delete(id: string): Promise<void>;
4307
+ }
4308
+ /** Queue selections (routing rules) and their agent/group/tag membership. */
4309
+ declare class QueueSelectionsResource {
4310
+ private readonly client;
4311
+ constructor(client: Client);
4312
+ /** List a queue's selections, auto-paginating across pages. */
4313
+ list(queueId: string, query?: {
4314
+ pageSize?: number;
4315
+ }): AsyncGenerator<QueueSelection>;
4316
+ /** Collect every selection for a queue into an array. */
4317
+ listAll(queueId: string, query?: {
4318
+ pageSize?: number;
4319
+ }): Promise<QueueSelection[]>;
4320
+ /** Create a selection on a queue. */
4321
+ create(queueId: string, body: RestCreateQueueSelectionBody): Promise<QueueSelectionItemResponse>;
4322
+ /** Get a selection. */
4323
+ get(queueId: string, id: string): Promise<QueueSelectionItemResponse>;
4324
+ /** Update a selection. */
4325
+ update(queueId: string, id: string, body: RestUpdateQueueSelectionBody): Promise<QueueSelectionItemResponse>;
4326
+ /** Delete a selection. */
4327
+ delete(queueId: string, id: string): Promise<void>;
4328
+ /** Resolve the agents currently selected for a queue. */
4329
+ selectAgents(queueId: string): Promise<QueueSelectionResponse>;
4330
+ /** Add an agent to a selection. */
4331
+ addAgent(queueId: string, selectionId: string, agentId: string): Promise<QueueSelectionModificationResponse>;
4332
+ /** Remove an agent from a selection. */
4333
+ removeAgent(queueId: string, selectionId: string, id: string): Promise<QueueSelectionModificationResponse>;
4334
+ /** Add an agent group to a selection. */
4335
+ addGroup(queueId: string, selectionId: string, groupId: string): Promise<QueueSelectionModificationResponse>;
4336
+ /** Remove an agent group from a selection. */
4337
+ removeGroup(queueId: string, selectionId: string, id: string): Promise<QueueSelectionModificationResponse>;
4338
+ /** Add a tag to a selection. */
4339
+ addTag(queueId: string, selectionId: string, tagId: string): Promise<QueueSelectionModificationResponse>;
4340
+ /** Remove a tag from a selection. */
4341
+ removeTag(queueId: string, selectionId: string, id: string): Promise<QueueSelectionModificationResponse>;
4342
+ }
4343
+
4344
+ /** Filters for `routing.list` (the generated query surface minus the `page` / `max` controls). */
4345
+ type ListRoutingsQuery = Omit<NonNullable<ListRoutingsData['query']>, 'page' | 'max'> & {
4346
+ /** Page size (the API's `max`); defaults to the server default. */
4347
+ pageSize?: number;
4348
+ };
4349
+ /** Routing rules — `/api/v2/routings`. */
4350
+ declare class RoutingResource {
4351
+ private readonly client;
4352
+ constructor(client: Client);
4353
+ /** List routings, auto-paginating across pages. */
4354
+ list(query?: ListRoutingsQuery): AsyncGenerator<Routing>;
4355
+ /** Collect every routing into an array (convenience over {@link list}). */
4356
+ listAll(query?: ListRoutingsQuery): Promise<Routing[]>;
4357
+ /** Create a routing. */
4358
+ create(body: RestCreateRoutingBody): Promise<RoutingItemResponse>;
4359
+ /** Get a routing by id. */
4360
+ get(id: string): Promise<RoutingItemResponse>;
4361
+ /** Update a routing. */
4362
+ update(id: string, body: RestUpdateRoutingBody): Promise<RoutingItemResponse>;
4363
+ /** Delete a routing. */
4364
+ delete(id: string): Promise<void>;
4365
+ }
4366
+
4367
+ /** Filters for `triggers.list` (the generated query surface minus the `page` / `max` controls). */
4368
+ type ListTriggersQuery = Omit<NonNullable<ListTriggersData['query']>, 'page' | 'max'> & {
4369
+ /** Page size (the API's `max`); defaults to the server default. */
4370
+ pageSize?: number;
4371
+ };
4372
+ /** Workflow triggers — `/api/v2/triggers`. */
4373
+ declare class TriggersResource {
4374
+ private readonly client;
4375
+ constructor(client: Client);
4376
+ /** List triggers, auto-paginating across pages. */
4377
+ list(query?: ListTriggersQuery): AsyncGenerator<Trigger>;
4378
+ /** Collect every trigger into an array (convenience over {@link list}). */
4379
+ listAll(query?: ListTriggersQuery): Promise<Trigger[]>;
4380
+ /** Create a trigger. */
4381
+ create(body: RestCreateTriggerBody): Promise<TriggerItemResponse>;
4382
+ /** Get a trigger by id. */
4383
+ get(id: string): Promise<TriggerItemResponse>;
4384
+ /** Update a trigger. */
4385
+ update(id: string, body: RestUpdateTriggerBody): Promise<TriggerItemResponse>;
4386
+ /** Delete a trigger. */
4387
+ delete(id: string): Promise<void>;
4388
+ /** Clone a trigger; returns the new trigger. */
4389
+ clone(id: string): Promise<TriggerItemResponse>;
4390
+ /** Test trigger conditions against a sample payload. `testMode` runs without side effects. */
4391
+ test(body: TestTriggersRequest, testMode?: boolean): Promise<TestTriggersResponse>;
4392
+ }
4393
+
4394
+ /** Filters for `automations.list` (the generated query surface minus the `page` / `max` controls). */
4395
+ type ListAutomationsQuery = Omit<NonNullable<ListGlobalAutomationsData['query']>, 'page' | 'max'> & {
4396
+ /** Page size (the API's `max`); defaults to the server default. */
4397
+ pageSize?: number;
4398
+ };
4399
+ /** Global automations (event triggers) — `/api/v2/events/triggers`. */
4400
+ declare class AutomationsResource {
4401
+ private readonly client;
4402
+ constructor(client: Client);
4403
+ /** List global automations, auto-paginating across pages. */
4404
+ list(query?: ListAutomationsQuery): AsyncGenerator<GlobalAutomation>;
4405
+ /** Collect every global automation into an array (convenience over {@link list}). */
4406
+ listAll(query?: ListAutomationsQuery): Promise<GlobalAutomation[]>;
4407
+ /** Create a global automation. */
4408
+ create(body: RestCreateGlobalAutomationBody): Promise<GlobalAutomationItemResponse>;
4409
+ /** Get a global automation by id. */
4410
+ get(id: string): Promise<GlobalAutomationItemResponse>;
4411
+ /** Update a global automation. */
4412
+ update(id: string, body: RestUpdateGlobalAutomationBody): Promise<GlobalAutomationItemResponse>;
4413
+ /** Delete a global automation. */
4414
+ delete(id: string): Promise<void>;
4415
+ }
4416
+
4417
+ /** Filters for `integrations.list` (the generated query surface minus `page` / `max`). */
4418
+ type ListIntegrationsQuery = Omit<NonNullable<ListIntegrationsData['query']>, 'page' | 'max'> & {
4419
+ /** Page size (the API's `max`); defaults to the server default. */
4420
+ pageSize?: number;
4421
+ };
4422
+ /** Integrations — `/api/v2/integrations`. */
4423
+ declare class IntegrationsResource {
4424
+ private readonly client;
4425
+ constructor(client: Client);
4426
+ /** List configured integrations, auto-paginating across pages. */
4427
+ list(query?: ListIntegrationsQuery): AsyncGenerator<Integration>;
4428
+ /** Collect every integration into an array (convenience over {@link list}). */
4429
+ listAll(query?: ListIntegrationsQuery): Promise<Integration[]>;
4430
+ /** Create an integration. */
4431
+ create(body: IntegrationCreateRequest): Promise<IntegrationItemResponse>;
4432
+ /** Get an integration by id. */
4433
+ get(id: string): Promise<IntegrationItemResponse>;
4434
+ /** Update an integration. */
4435
+ update(id: string, body: IntegrationUpdateRequest): Promise<IntegrationItemResponse>;
4436
+ /** Delete an integration. */
4437
+ delete(id: string): Promise<void>;
4438
+ /** List the integration providers available to this account. */
4439
+ available(): Promise<IntegrationListAvailableIntegrationsResponse>;
4440
+ /** Associate an integration action with an object. */
4441
+ addAssociation(integrationId: string, associationId: string, actionName: string): Promise<IntegrationAddAssociationResponse>;
4442
+ /** Remove an integration action association. */
4443
+ removeAssociation(integrationId: string, associationId: string, actionName: string): Promise<IntegrationRemoveAssociationResponse>;
4444
+ /** Get a provider's logo at a given size. */
4445
+ providerLogo(providerName: IntegrationProvider, size: string): Promise<GetIntegrationProviderLogoResponse>;
4446
+ /** List the session variables a provider's actions expose. */
4447
+ providerSessionVariables(provider: string): Promise<IntegrationSessionVariableItemsResponse>;
4448
+ /** Dispatch an integration action. */
4449
+ dispatchAction(integrationId: string, action: string, body: IntegrationDispatchActionRequest): Promise<IntegrationDispatchActionResponse>;
4450
+ /** List the variables a single provider action exposes. */
4451
+ actionVariables(provider: IntegrationProvider, actionName: string): Promise<VariableDefinitionItemsResponse>;
4452
+ }
4453
+
4454
+ /** Outbound dialer lists and their leads — `/api/v2/outbound/lists`. */
4455
+ declare class OutboundResource {
4456
+ private readonly client;
4457
+ constructor(client: Client);
4458
+ /** List all outbound lists. */
4459
+ lists(): Promise<OutboundList[]>;
4460
+ /** Create an outbound list. */
4461
+ createList(body: CreateOutboundListRequest): Promise<OutboundListItemResponse>;
4462
+ /** Clear all leads from an outbound list; returns the (now empty) list. */
4463
+ clearList(id: string): Promise<OutboundListItemResponse>;
4464
+ /** Add a lead to an outbound list. */
4465
+ addLead(listId: string, body: AddOutboundLeadRequest): Promise<OutboundLeadItemResponse>;
4466
+ /** Update a lead in an outbound list. */
4467
+ updateLead(listId: string, leadId: string, body: AddOutboundLeadRequest): Promise<OutboundLeadItemResponse>;
4468
+ /** Remove a lead from an outbound list. */
4469
+ deleteLead(listId: string, leadId: string): Promise<void>;
4470
+ }
4471
+
4472
+ /** Filters for `phonebook.list` (the generated query surface minus `page` / `max`). */
4473
+ type ListPhonebookQuery = Omit<NonNullable<ListPhonebookEntrysData['query']>, 'page' | 'max'> & {
4474
+ /** Page size (the API's `max`); defaults to the server default. */
4475
+ pageSize?: number;
4476
+ };
4477
+ /** Phonebook entries — `/api/v2/phonebook`, with bulk CSV download/upload. */
4478
+ declare class PhonebookResource {
4479
+ private readonly client;
4480
+ constructor(client: Client);
4481
+ /** List phonebook entries, auto-paginating across pages. */
4482
+ list(query?: ListPhonebookQuery): AsyncGenerator<PhonebookEntry>;
4483
+ /** Collect every phonebook entry into an array (convenience over {@link list}). */
4484
+ listAll(query?: ListPhonebookQuery): Promise<PhonebookEntry[]>;
4485
+ /** Create a phonebook entry. */
4486
+ create(body: RestCreatePhonebookEntryBody): Promise<PhonebookEntryItemResponse>;
4487
+ /** Get a phonebook entry by id. */
4488
+ get(id: string): Promise<PhonebookEntryItemResponse>;
4489
+ /** Update a phonebook entry. */
4490
+ update(id: string, body: RestUpdatePhonebookEntryBody): Promise<PhonebookEntryItemResponse>;
4491
+ /** Delete a phonebook entry. */
4492
+ delete(id: string): Promise<void>;
4493
+ /** Download all phonebook entries (bulk export). */
4494
+ download(): Promise<DownloadPhonebookEntriesResponse>;
4495
+ /** Upload phonebook entries from a CSV file (bulk import). */
4496
+ upload(body: PhonebookCsvFile): Promise<void>;
4497
+ }
4498
+
4499
+ /** Outbound campaigns — `/api/v2/outbound/campaigns`. */
4500
+ declare class CampaignsResource {
4501
+ private readonly client;
4502
+ constructor(client: Client);
4503
+ /** List all outbound campaigns. */
4504
+ list(): Promise<OutboundCampaign[]>;
4505
+ /** Create a campaign. */
4506
+ create(body: CreateCampaignRequest): Promise<OutboundCampaignItemResponse>;
4507
+ /** Get a campaign by id. */
4508
+ get(id: string): Promise<OutboundCampaignItemResponse>;
4509
+ /** Update a campaign. */
4510
+ update(id: string, body: UpdateCampaignRequest): Promise<OutboundCampaignItemResponse>;
4511
+ /** Delete a campaign. */
4512
+ delete(id: string): Promise<void>;
4513
+ }
4514
+
4515
+ /** Filters for `businessHours.list` (the generated query surface minus `page` / `max`). */
4516
+ type ListBusinessHoursQuery = Omit<NonNullable<ListBusinessHoursData['query']>, 'page' | 'max'> & {
4517
+ /** Page size (the API's `max`); defaults to the server default. */
4518
+ pageSize?: number;
4519
+ };
4520
+ /** Business hours — `/api/v2/business-hours`. */
4521
+ declare class BusinessHoursResource {
4522
+ private readonly client;
4523
+ constructor(client: Client);
4524
+ /** List business-hours definitions, auto-paginating across pages. */
4525
+ list(query?: ListBusinessHoursQuery): AsyncGenerator<BusinessHour>;
4526
+ /** Collect every business-hours definition into an array (convenience over {@link list}). */
4527
+ listAll(query?: ListBusinessHoursQuery): Promise<BusinessHour[]>;
4528
+ /** Create a business-hours definition. */
4529
+ create(body: RestCreateBusinessHourBody): Promise<BusinessHourItemResponse>;
4530
+ /** Get a business-hours definition by id. */
4531
+ get(id: string): Promise<BusinessHourItemResponse>;
4532
+ /** Update a business-hours definition. */
4533
+ update(id: string, body: RestUpdateBusinessHourBody): Promise<BusinessHourItemResponse>;
4534
+ /** Delete a business-hours definition. */
4535
+ delete(id: string): Promise<void>;
4536
+ }
4537
+
4538
+ /** Filters for `calendars.list` (the generated query surface minus `page` / `max`). */
4539
+ type ListCalendarsQuery = Omit<NonNullable<ListCalendarsData['query']>, 'page' | 'max'> & {
4540
+ /** Page size (the API's `max`); defaults to the server default. */
4541
+ pageSize?: number;
4542
+ };
4543
+ /** Calendars and their dates — `/api/v2/calendars`. */
4544
+ declare class CalendarsResource {
4545
+ private readonly client;
4546
+ constructor(client: Client);
4547
+ /** List calendars, auto-paginating across pages. */
4548
+ list(query?: ListCalendarsQuery): AsyncGenerator<Calendar>;
4549
+ /** Collect every calendar into an array (convenience over {@link list}). */
4550
+ listAll(query?: ListCalendarsQuery): Promise<Calendar[]>;
4551
+ /** Create a calendar. */
4552
+ create(body: RestCreateCalendarBody): Promise<CalendarItemResponse>;
4553
+ /** Get a calendar by id. */
4554
+ get(id: string): Promise<CalendarItemResponse>;
4555
+ /** Update a calendar. */
4556
+ update(id: string, body: RestUpdateCalendarBody): Promise<CalendarItemResponse>;
4557
+ /** Delete a calendar. */
4558
+ delete(id: string): Promise<void>;
4559
+ /** Get a calendar's dates. */
4560
+ getDates(id: string): Promise<DefaultV2MessageResponse>;
4561
+ /** Add a date to a calendar. */
4562
+ addDate(id: string): Promise<DefaultV2MessageResponse>;
4563
+ }
4564
+
4565
+ /** Filters for `conversations.list` (the generated query surface minus `page` / `max`). */
4566
+ type ListConversationsQuery = Omit<NonNullable<ListConversationsData['query']>, 'page' | 'max'> & {
4567
+ /** Page size (the API's `max`); defaults to the server default. */
4568
+ pageSize?: number;
4569
+ };
4570
+ /** Conversations — `/api/v2/conversations`, with events and session variables. */
4571
+ declare class ConversationsResource {
4572
+ private readonly client;
4573
+ constructor(client: Client);
4574
+ /** List conversations, auto-paginating across pages. */
4575
+ list(query?: ListConversationsQuery): AsyncGenerator<Conversation>;
4576
+ /** Collect every conversation into an array (convenience over {@link list}). */
4577
+ listAll(query?: ListConversationsQuery): Promise<Conversation[]>;
4578
+ /** Create a conversation. */
4579
+ create(body: RestCreateConversationBody): Promise<ConversationItemResponse>;
4580
+ /** Get a conversation by id. */
4581
+ get(id: string): Promise<ConversationItemResponse>;
4582
+ /** Update a conversation. */
4583
+ update(id: string, body: RestUpdateConversationBody): Promise<ConversationItemResponse>;
4584
+ /** Delete a conversation. */
4585
+ delete(id: string): Promise<void>;
4586
+ /** List a conversation's events. */
4587
+ events(conversationId: string): Promise<ConversationEvent[]>;
4588
+ /** Get a single conversation event. */
4589
+ getEvent(conversationId: string, id: string): Promise<ConversationEventItemResponse>;
4590
+ /** Get a conversation's session variables. */
4591
+ getSession(conversationId: string): Promise<ConversationSessionVariablesItemResponse>;
4592
+ /** Update a conversation's session variables. */
4593
+ updateSession(conversationId: string, variables: ConversationSessionVariables): Promise<ConversationSessionVariablesItemResponse>;
4594
+ }
4595
+
4596
+ /** Call/automation sessions — `/api/v2/sessions`. */
4597
+ declare class SessionsResource {
4598
+ private readonly client;
4599
+ constructor(client: Client);
4600
+ /** Create a new session. */
4601
+ create(): Promise<SessionResponse>;
4602
+ /** Get a session (its variables) by id. */
4603
+ get(id: string): Promise<SessionResponse>;
4604
+ /** Update a session's variables. */
4605
+ updateVariables(id: string, variables: UpdateSessionVariablesRequest): Promise<SessionResponse>;
4606
+ }
4607
+
4608
+ /** Filters for `prompts.list` (the generated query surface minus `page` / `max`). */
4609
+ type ListPromptsQuery = Omit<NonNullable<ListPromptsData['query']>, 'page' | 'max'> & {
4610
+ /** Page size (the API's `max`); defaults to the server default. */
4611
+ pageSize?: number;
4612
+ };
4613
+ /** Audio prompts — `/api/v2/prompts`. */
4614
+ declare class PromptsResource {
4615
+ private readonly client;
4616
+ constructor(client: Client);
4617
+ /** List prompts, auto-paginating across pages. */
4618
+ list(query?: ListPromptsQuery): AsyncGenerator<Prompt>;
4619
+ /** Collect every prompt into an array (convenience over {@link list}). */
4620
+ listAll(query?: ListPromptsQuery): Promise<Prompt[]>;
4621
+ /** Get a prompt by id. */
4622
+ get(id: string): Promise<PromptItemResponse>;
4623
+ /** Upload a new audio prompt. */
4624
+ upload(body: PromptAudioFile): Promise<PromptItemResponse>;
4625
+ /** Update a prompt's metadata. */
4626
+ update(id: string, body: RestUpdatePromptBody): Promise<PromptItemResponse>;
4627
+ /** Delete a prompt. */
4628
+ delete(id: string): Promise<void>;
4629
+ }
4630
+
4631
+ /** Filters for `babeldesk.list` (the generated query surface minus `page` / `max`). */
4632
+ type ListBabeldesksQuery = Omit<NonNullable<ListBabeldesksData['query']>, 'page' | 'max'> & {
4633
+ /** Page size (the API's `max`); defaults to the server default. */
4634
+ pageSize?: number;
4635
+ };
4636
+ /** Filters for `babeldesk.widgets.list`. */
4637
+ type ListBabeldeskWidgetsQuery = Omit<NonNullable<ListBabeldeskWidgetsData['query']>, 'page' | 'max'> & {
4638
+ /** Page size (the API's `max`); defaults to the server default. */
4639
+ pageSize?: number;
4640
+ };
4641
+ /** Babeldesk dashboards — `/api/v2/babeldesk/dashboards`, with a nested `widgets` sub-resource. */
4642
+ declare class BabeldeskResource {
4643
+ private readonly client;
4644
+ /** Babeldesk widgets — `/api/v2/babeldesk/widgets`. */
4645
+ readonly widgets: BabeldeskWidgetsResource;
4646
+ constructor(client: Client);
4647
+ /** List babeldesk dashboards, auto-paginating across pages. */
4648
+ list(query?: ListBabeldesksQuery): AsyncGenerator<Babeldesk>;
4649
+ /** Collect every dashboard into an array (convenience over {@link list}). */
4650
+ listAll(query?: ListBabeldesksQuery): Promise<Babeldesk[]>;
4651
+ /** Create a dashboard. */
4652
+ create(body: RestCreateBabeldeskBody): Promise<BabeldeskItemResponse>;
4653
+ /** Get a dashboard by id. */
4654
+ get(id: string): Promise<BabeldeskItemResponse>;
4655
+ /** Update a dashboard. */
4656
+ update(id: string, body: RestUpdateBabeldeskBody): Promise<BabeldeskItemResponse>;
4657
+ /** Delete a dashboard. */
4658
+ delete(id: string): Promise<void>;
4659
+ }
4660
+ /** Babeldesk widgets — `/api/v2/babeldesk/widgets`. */
4661
+ declare class BabeldeskWidgetsResource {
4662
+ private readonly client;
4663
+ constructor(client: Client);
4664
+ /** List widgets, auto-paginating across pages. */
4665
+ list(query?: ListBabeldeskWidgetsQuery): AsyncGenerator<BabeldeskWidget>;
4666
+ /** Collect every widget into an array (convenience over {@link list}). */
4667
+ listAll(query?: ListBabeldeskWidgetsQuery): Promise<BabeldeskWidget[]>;
4668
+ /** Create a widget. */
4669
+ create(body: RestCreateBabeldeskWidgetBody): Promise<BabeldeskWidgetItemResponse>;
4670
+ /** Get a widget by id. */
4671
+ get(id: string): Promise<BabeldeskWidgetItemResponse>;
4672
+ /** Update a widget. */
4673
+ update(id: string, body: RestUpdateBabeldeskWidgetBody): Promise<BabeldeskWidgetItemResponse>;
4674
+ /** Delete a widget. */
4675
+ delete(id: string): Promise<void>;
4676
+ }
4677
+
4678
+ /** Event definitions and custom events — `/api/v2/events`. */
4679
+ declare class EventsResource {
4680
+ private readonly client;
4681
+ constructor(client: Client);
4682
+ /** List the available event definitions. */
4683
+ list(): Promise<Event[]>;
4684
+ /** Create a custom event. */
4685
+ createCustom(body: CustomEventRequest): Promise<EventItemResponse>;
4686
+ /** Delete a custom event. */
4687
+ deleteCustom(id: string): Promise<void>;
4688
+ }
4689
+
4690
+ /** Filters for `logs.audit` (the generated query surface minus `page` / `max`). */
4691
+ type ListAuditLogsQuery = Omit<NonNullable<ListAuditLogsData['query']>, 'page' | 'max'> & {
4692
+ /** Page size (the API's `max`); defaults to the server default. */
4693
+ pageSize?: number;
4694
+ };
4695
+ /** Audit and live logs — `/api/v2/audit` and `/api/v2/logs`. */
4696
+ declare class LogsResource {
4697
+ private readonly client;
4698
+ constructor(client: Client);
4699
+ /** List request audit-log entries, auto-paginating across pages. */
4700
+ audit(query?: ListAuditLogsQuery): AsyncGenerator<AuditLog>;
4701
+ /** Collect every audit-log entry into an array (convenience over {@link audit}). */
4702
+ auditAll(query?: ListAuditLogsQuery): Promise<AuditLog[]>;
4703
+ /** List the current live logs. */
4704
+ live(): Promise<LiveLog[]>;
4705
+ }
4706
+
4707
+ /** Expression catalog and evaluation — `/api/v2/expressions`. */
4708
+ declare class ExpressionsResource {
4709
+ private readonly client;
4710
+ constructor(client: Client);
4711
+ /** List the available expressions. */
4712
+ list(): Promise<AvailableExpression[]>;
4713
+ /** Evaluate an expression against a sample context. `async` dispatches automations asynchronously. */
4714
+ evaluate(body: EvaluateExpression, async?: boolean): Promise<EvaluateExpressionResponse>;
4715
+ }
4716
+
4717
+ /** Default babelforce API host. Override with {@link ManagerClientOptions.baseUrl}. */
4718
+ declare const DEFAULT_BASE_URL = "https://services.babelforce.com";
2245
4719
  interface ManagerClientOptions {
2246
- /** Named environment whose host to use. Defaults to `production`. Ignored if `baseUrl` is set. */
2247
- environment?: Environment;
2248
- /** Explicit base URL override (e.g. a per-customer host). */
4720
+ /** Base URL of the babelforce API. Defaults to {@link DEFAULT_BASE_URL}. */
2249
4721
  baseUrl?: string;
2250
4722
  /** How to authenticate. */
2251
4723
  auth: Auth;
2252
4724
  /** Extra headers added to every request. */
2253
4725
  headers?: Record<string, string>;
2254
- /** Custom fetch implementation (testing, proxies, retries). */
4726
+ /** Custom fetch implementation (testing, proxies). */
2255
4727
  fetch?: typeof fetch;
4728
+ /**
4729
+ * Automatic retry behaviour. On by default with conservative settings; pass `false` to disable
4730
+ * or a {@link RetryOptions} object to tune. Wraps {@link ManagerClientOptions.fetch} when set.
4731
+ */
4732
+ retry?: RetryOptions | false;
2256
4733
  }
2257
4734
  /**
2258
4735
  * The babelforce manager SDK client.
@@ -2262,7 +4739,6 @@ interface ManagerClientOptions {
2262
4739
  *
2263
4740
  * ```ts
2264
4741
  * const mgr = await ManagerClient.connect({
2265
- * environment: "production",
2266
4742
  * auth: { kind: "apiKey", accessId, accessToken },
2267
4743
  * });
2268
4744
  * for await (const u of mgr.users.list()) console.log(u.email);
@@ -2273,10 +4749,52 @@ declare class ManagerClient {
2273
4749
  readonly client: Client;
2274
4750
  /** User management — `/api/v2/users`. */
2275
4751
  readonly users: UsersResource;
4752
+ /** The authenticated principal (current user, accounts) — `/api/v2/user`. */
4753
+ readonly me: MeResource;
2276
4754
  /** Agent management — `/api/v2/agents`. */
2277
4755
  readonly agents: AgentsResource;
2278
- /** Call reporting — `/api/v2/calls`. */
4756
+ /** Call reporting & control — `/api/v2/calls`. */
2279
4757
  readonly calls: CallsResource;
4758
+ /** SMS records — `/api/v2/sms`. */
4759
+ readonly sms: SmsResource;
4760
+ /** Service (phone) numbers — `/api/v2/numbers`. */
4761
+ readonly numbers: NumbersResource;
4762
+ /** Conferences — `/api/v2/conferences`. */
4763
+ readonly conferences: ConferencesResource;
4764
+ /** Queues & selections — `/api/v2/queues`. */
4765
+ readonly queues: QueuesResource;
4766
+ /** Routing rules — `/api/v2/routings`. */
4767
+ readonly routing: RoutingResource;
4768
+ /** Workflow triggers — `/api/v2/triggers`. */
4769
+ readonly triggers: TriggersResource;
4770
+ /** Global automations (event triggers) — `/api/v2/events/triggers`. */
4771
+ readonly automations: AutomationsResource;
4772
+ /** Integrations — `/api/v2/integrations`. */
4773
+ readonly integrations: IntegrationsResource;
4774
+ /** Outbound dialer lists & leads — `/api/v2/outbound/lists`. */
4775
+ readonly outbound: OutboundResource;
4776
+ /** Phonebook entries — `/api/v2/phonebook`. */
4777
+ readonly phonebook: PhonebookResource;
4778
+ /** Outbound campaigns — `/api/v2/outbound/campaigns`. */
4779
+ readonly campaigns: CampaignsResource;
4780
+ /** Business hours — `/api/v2/business-hours`. */
4781
+ readonly businessHours: BusinessHoursResource;
4782
+ /** Calendars & dates — `/api/v2/calendars`. */
4783
+ readonly calendars: CalendarsResource;
4784
+ /** Conversations — `/api/v2/conversations`. */
4785
+ readonly conversations: ConversationsResource;
4786
+ /** Call/automation sessions — `/api/v2/sessions`. */
4787
+ readonly sessions: SessionsResource;
4788
+ /** Audio prompts — `/api/v2/prompts`. */
4789
+ readonly prompts: PromptsResource;
4790
+ /** Babeldesk dashboards & widgets — `/api/v2/babeldesk`. */
4791
+ readonly babeldesk: BabeldeskResource;
4792
+ /** Event definitions & custom events — `/api/v2/events`. */
4793
+ readonly events: EventsResource;
4794
+ /** Audit & live logs — `/api/v2/audit`, `/api/v2/logs`. */
4795
+ readonly logs: LogsResource;
4796
+ /** Expression catalog & evaluation — `/api/v2/expressions`. */
4797
+ readonly expressions: ExpressionsResource;
2280
4798
  /** Metrics — `/api/v2/metrics`. */
2281
4799
  readonly metrics: MetricsResource;
2282
4800
  /** Application (IVR) management — `/api/v2/applications`. */
@@ -2303,4 +4821,4 @@ declare class ManagerApiError extends Error {
2303
4821
  static from(response: Response, body: unknown): ManagerApiError;
2304
4822
  }
2305
4823
 
2306
- export { type AccountRole, type Agent, type AgentGroup, type AgentGroupItemResponse, AgentGroupsResource, type AgentItemResponse, type AgentLineStatus, type AgentStatus, AgentsResource, AppActionsResource, type Application, type ApplicationCreateBody, type ApplicationItemResponse, type ApplicationUpdateBody, ApplicationsResource, type Auth, type Call, CallsResource, type CreateManagedUserRequest, type Environment, type InterruptionTargetStates, type IvrModule, type ListAgentsQuery, type ListApplicationsQuery, type ListTasksQuery, type ListUsersQuery, type LocalAutomation, type LocalAutomationItemResponse, type ManagedUser, type ManagedUserItemResponse, ManagerApiError, ManagerClient, type ManagerClientOptions, type MetricDefinitionItemResponse, type MetricIdItemsResponse, type MetricResponse, MetricsResource, type ReportingCall, type ReportingCallsQuery, ReportingResource, type RestCreateAgentBody, type RestCreateAgentGroupBody, type RestCreateLocalAutomationBody, type RestUpdateAgentBody, type RestUpdateAgentGroupBody, type RestUpdateLocalAutomationBody, SettingAccessor, type SettingsAppAgentStatus, type SettingsAppConversations, type SettingsAppCustomerLogging, type SettingsAppIntegrations, type SettingsAuditDefault, SettingsResource, type SettingsRetentionPeriods, type SettingsTelephonyAgentInbound, type SettingsTelephonyAgentOutbound, type SettingsTelephonyAgentRecording, type SettingsTelephonyAgentWrapup, type SettingsTelephonyPostCall, type SettingsUiI18N, type SimpleReportingCallsQuery, type SimpleReportingReportType, type SubmitTaskBody, type SubmitTaskScheduleBody, type Task, type TaskSchedule, TaskSchedulesResource, type TaskTemplateOverrides, TasksResource, type TokenResponse, type UpdateAgentStatusRequest, type UpdateTaskBody, UsersResource, passwordGrant };
4824
+ export { type Account, type AccountRole$1 as AccountRole, type AddOutboundLeadRequest, type Agent, type AgentGroup, type AgentGroupItemResponse, AgentGroupsResource, type AgentItemResponse, type AgentLineStatus, type AgentStatus, AgentsResource, AppActionsResource, type Application, type ApplicationCreateBody, type ApplicationItemResponse, type ApplicationUpdateBody, ApplicationsResource, type Auth, AutomationsResource, type Babeldesk, type BabeldeskItemResponse, BabeldeskResource, type BabeldeskWidget, type BabeldeskWidgetItemResponse, BabeldeskWidgetsResource, type BusinessHour, type BusinessHourItemResponse, BusinessHoursResource, type Calendar, type CalendarItemResponse, CalendarsResource, type Call, type CallItemResponse, CallsResource, CampaignsResource, type Conference, type ConferenceItemResponse, ConferencesResource, type Conversation, type ConversationEvent, type ConversationItemResponse, type ConversationSessionVariables, ConversationsResource, type CreateCampaignRequest, type CreateManagedUserRequest, type CreateOutboundListRequest, type CreateTestCall, DEFAULT_BASE_URL, EventsResource, ExpressionsResource, type GlobalAutomation, type GlobalAutomationItemResponse, type Integration, type IntegrationCreateRequest, type IntegrationItemResponse, type IntegrationProvider, type IntegrationUpdateRequest, IntegrationsResource, type InterruptionTargetStates, type IvrModule, type ListAgentsQuery, type ListApplicationsQuery, type ListAuditLogsQuery, type ListAutomationsQuery, type ListBabeldeskWidgetsQuery, type ListBabeldesksQuery, type ListBusinessHoursQuery, type ListCalendarsQuery, type ListConferencesQuery, type ListConversationsQuery, type ListIntegrationsQuery, type ListNumbersQuery, type ListPhonebookQuery, type ListPromptsQuery, type ListQueuesQuery, type ListRoutingsQuery, type ListSmsQuery, type ListTasksQuery, type ListTriggersQuery, type ListUsersQuery, type LocalAutomation, type LocalAutomationItemResponse, LogsResource, type ManagedUser, type ManagedUserItemResponse, ManagerApiError, ManagerClient, type ManagerClientOptions, MeResource, type MetricDefinitionItemResponse, type MetricIdItemsResponse, type MetricResponse, MetricsResource, NumbersResource, type OutboundCampaign, type OutboundCampaignItemResponse, type OutboundLeadItemResponse, type OutboundList, type OutboundListItemResponse, OutboundResource, type PhonebookCsvFile, type PhonebookEntry, type PhonebookEntryItemResponse, PhonebookResource, type Prompt, type PromptAudioFile, type PromptItemResponse, PromptsResource, type Queue, type QueueItemResponse, type QueueSelection, type QueueSelectionItemResponse, QueueSelectionsResource, QueuesResource, type ReportingCall, type ReportingCallsQuery, ReportingResource, type RestCreateAgentBody, type RestCreateAgentGroupBody, type RestCreateBabeldeskBody, type RestCreateBabeldeskWidgetBody, type RestCreateBusinessHourBody, type RestCreateCalendarBody, type RestCreateConversationBody, type RestCreateGlobalAutomationBody, type RestCreateLocalAutomationBody, type RestCreatePhonebookEntryBody, type RestCreateQueueBody, type RestCreateQueueSelectionBody, type RestCreateRoutingBody, type RestCreateTriggerBody, type RestUpdateAgentBody, type RestUpdateAgentGroupBody, type RestUpdateBabeldeskBody, type RestUpdateBabeldeskWidgetBody, type RestUpdateBusinessHourBody, type RestUpdateCalendarBody, type RestUpdateConversationBody, type RestUpdateGlobalAutomationBody, type RestUpdateLocalAutomationBody, type RestUpdatePhonebookEntryBody, type RestUpdatePromptBody, type RestUpdateQueueBody, type RestUpdateQueueSelectionBody, type RestUpdateRoutingBody, type RestUpdateTriggerBody, type RetryOptions, type Routing, type RoutingItemResponse, RoutingResource, type ServiceNumber, type ServiceNumberItemResponse, type SessionResponse, SessionsResource, SettingAccessor, type SettingsAppAgentStatus, type SettingsAppConversations, type SettingsAppCustomerLogging, type SettingsAppIntegrations, type SettingsAuditDefault, SettingsResource, type SettingsRetentionPeriods, type SettingsTelephonyAgentInbound, type SettingsTelephonyAgentOutbound, type SettingsTelephonyAgentRecording, type SettingsTelephonyAgentWrapup, type SettingsTelephonyPostCall, type SettingsUiI18N, type SimpleReportingCallsQuery, type SimpleReportingReportType, type Sms, type SmsItemResponse, SmsResource, type SubmitTaskBody, type SubmitTaskScheduleBody, type Tag, type Task, TaskMetricsResource, type TaskSchedule, TaskSchedulesResource, TaskScriptsResource, TaskSecretsResource, TaskSelectionConfigResource, type TaskTemplateOverrides, TasksResource, type TokenResponse, type Trigger, type TriggerItemResponse, TriggersResource, type UpdateAgentStatusRequest, type UpdateCampaignRequest, type UpdateSessionVariablesRequest, type UpdateTaskBody, type User, type UserCustomer, type UserCustomerItemResponse, type UserItemResponse, UsersResource, passwordGrant, withRetry };