@graph8/sdk 0.3.0 → 0.4.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/react.d.mts CHANGED
@@ -2,6 +2,128 @@ import * as _jitsu_js from '@jitsu/js';
2
2
  import * as react_jsx_runtime from 'react/jsx-runtime';
3
3
  import { ReactNode } from 'react';
4
4
 
5
+ /**
6
+ * Inbox channel — `email`, `sms`, or `linkedin` (HeyReach internally).
7
+ * Defaults to `email` on routes that accept this as a query param.
8
+ */
9
+ type InboxChannel = "email" | "sms" | "linkedin";
10
+ interface InboxContact {
11
+ name?: string | null;
12
+ email?: string | null;
13
+ company?: string | null;
14
+ [key: string]: unknown;
15
+ }
16
+ interface InboxTag {
17
+ id: string;
18
+ name: string;
19
+ }
20
+ interface InboxAssignee {
21
+ email: string;
22
+ name?: string | null;
23
+ [key: string]: unknown;
24
+ }
25
+ interface InboxMessage {
26
+ message_id: string | null;
27
+ from_address: string | null;
28
+ to_addresses: string[];
29
+ content: string | null;
30
+ /** "USER", "AI", or "OTHER". */
31
+ responder: string | null;
32
+ date: string | null;
33
+ is_draft: boolean;
34
+ }
35
+ interface InboxThread {
36
+ id: string;
37
+ /** "email", "sms", or "linkedin". */
38
+ channel: string;
39
+ subject: string | null;
40
+ contact: InboxContact | null;
41
+ messages: InboxMessage[];
42
+ /** "open", "responded", "ai_responded", etc. */
43
+ status: string | null;
44
+ tags: InboxTag[];
45
+ assignees: InboxAssignee[];
46
+ created_at: string | null;
47
+ updated_at: string | null;
48
+ }
49
+ interface InboxListParams {
50
+ channel?: InboxChannel;
51
+ sequence_id?: string;
52
+ /** Filter by thread status (e.g. "open", "responded", "ai_responded"). */
53
+ status?: string;
54
+ /** Filter by assignee email. */
55
+ assignee?: string;
56
+ /** Filter by tag ID. */
57
+ tag?: string;
58
+ page?: number;
59
+ /** Default 50, max 100. */
60
+ page_size?: number;
61
+ }
62
+ interface InboxAssignResult {
63
+ assigned: boolean;
64
+ assignee: string;
65
+ count: number;
66
+ [key: string]: unknown;
67
+ }
68
+ interface InboxTagResult {
69
+ tagged: boolean;
70
+ tag_count: number;
71
+ [key: string]: unknown;
72
+ }
73
+ interface InboxDraft {
74
+ /** HTML body. */
75
+ content: string;
76
+ /** Plain-text alternative, if available. */
77
+ plain_content: string | null;
78
+ /** Credits charged for AI generation. */
79
+ credits_charged: number;
80
+ }
81
+ interface InboxSendParams {
82
+ body: string;
83
+ channel: InboxChannel;
84
+ subject?: string;
85
+ /** Recipient override — email, phone, or LinkedIn ID. */
86
+ to?: string;
87
+ /** Sender override — mailbox email, Twilio number, or LinkedIn account ID. */
88
+ from_address?: string;
89
+ }
90
+ interface InboxSendResult {
91
+ message_id: string | null;
92
+ status: string;
93
+ channel: string;
94
+ }
95
+ /**
96
+ * Inbox API — read + reply to multi-channel inbox threads (email, SMS, LinkedIn/HeyReach).
97
+ * Requires API key (server-side).
98
+ *
99
+ * Backed by:
100
+ * GET /api/v1/inbox
101
+ * GET /api/v1/inbox/{reply_id}
102
+ * POST /api/v1/inbox/{reply_id}/assign
103
+ * POST /api/v1/inbox/{reply_id}/tag
104
+ * GET /api/v1/inbox/{reply_id}/draft (charges credits, 402 on insufficient balance)
105
+ * POST /api/v1/inbox/{reply_id}/send
106
+ */
107
+ declare const createInboxClient: (apiKey: string, apiUrl?: string) => {
108
+ /** List inbox threads across email, SMS, and LinkedIn. */
109
+ list(params?: InboxListParams): Promise<{
110
+ data: InboxThread[];
111
+ }>;
112
+ /** Get a single inbox thread. Defaults to email channel. */
113
+ get(replyId: string, channel?: InboxChannel): Promise<InboxThread>;
114
+ /** Assign a user to an inbox thread. */
115
+ assign(replyId: string, assigneeEmail: string, channel?: InboxChannel): Promise<InboxAssignResult>;
116
+ /** Attach tag IDs to an inbox thread. */
117
+ tag(replyId: string, tagIds: string[], channel?: InboxChannel): Promise<InboxTagResult>;
118
+ /**
119
+ * Generate an AI draft reply for a thread.
120
+ * Charges credits — server returns 402 if balance is insufficient.
121
+ */
122
+ draft(replyId: string, channel?: InboxChannel): Promise<InboxDraft>;
123
+ /** Send a reply through email, SMS, or LinkedIn. */
124
+ send(replyId: string, payload: InboxSendParams): Promise<InboxSendResult>;
125
+ };
126
+
5
127
  interface Deal {
6
128
  id: string | null;
7
129
  name: string | null;
@@ -81,7 +203,7 @@ interface ContactDeal {
81
203
  owner_id: string | null;
82
204
  created_at: string | null;
83
205
  }
84
- interface PaginationMeta {
206
+ interface PaginationMeta$1 {
85
207
  page: number;
86
208
  limit: number;
87
209
  total: number;
@@ -108,7 +230,7 @@ declare const createDealsClient: (apiKey: string, apiUrl?: string) => {
108
230
  /** List deals org-wide with optional filters and pagination. */
109
231
  list(params?: DealListParams): Promise<{
110
232
  data: Deal[];
111
- pagination?: PaginationMeta;
233
+ pagination?: PaginationMeta$1;
112
234
  }>;
113
235
  /** Create a new deal. */
114
236
  create(deal: DealCreateParams): Promise<Deal>;
@@ -624,20 +746,276 @@ interface CallAnalysis {
624
746
  }
625
747
  type VoiceEvent = "connected" | "transcription" | "ended" | "error";
626
748
  type VoiceCallback = (data: Record<string, unknown>) => void;
749
+ interface VoicePagination {
750
+ total_items: number;
751
+ total_pages: number;
752
+ current_page: number;
753
+ page_size: number;
754
+ }
755
+ interface DialerSessionSummary {
756
+ session_id: string;
757
+ status: string | null;
758
+ user_id: string | null;
759
+ user_email: string | null;
760
+ org_id: string | null;
761
+ from_phone: string | null;
762
+ campaign_id: string | null;
763
+ campaign_builder_campaign_id: string | null;
764
+ name: string | null;
765
+ session_metadata: Record<string, unknown> | null;
766
+ total_calls: number | null;
767
+ created_at: string | null;
768
+ updated_at: string | null;
769
+ contact_ids: unknown[];
770
+ }
771
+ interface DialerSessionsListResult {
772
+ sessions: DialerSessionSummary[];
773
+ pagination: VoicePagination;
774
+ }
775
+ interface DialerSessionsListParams {
776
+ page?: number;
777
+ /** Default 50, max 200. */
778
+ page_size?: number;
779
+ /** Comma-separated status list (e.g. "ACTIVE,PAUSED"). */
780
+ status?: string;
781
+ user_email?: string;
782
+ /** Substring search on session name. */
783
+ name?: string;
784
+ campaign_id?: string;
785
+ list_id?: string;
786
+ list_name?: string;
787
+ /** ISO 8601 timestamp. */
788
+ date_from?: string;
789
+ /** ISO 8601 timestamp. */
790
+ date_to?: string;
791
+ sort_by?: string;
792
+ /** Default "desc". */
793
+ sort_order?: "asc" | "desc";
794
+ }
795
+ interface DialerStatsParams {
796
+ session_id?: string;
797
+ user_email?: string;
798
+ /** YYYY-MM-DD. */
799
+ date_from?: string;
800
+ /** YYYY-MM-DD. */
801
+ date_to?: string;
802
+ /** Default "DAILY". */
803
+ aggregation?: "DAILY" | "TOTAL";
804
+ }
805
+ interface DialerReportFilters {
806
+ session_id: string | null;
807
+ user_email: string | null;
808
+ org_id: string | null;
809
+ date_from: string | null;
810
+ date_to: string | null;
811
+ aggregation: string | null;
812
+ }
813
+ interface DialerReportMetric {
814
+ date: string | null;
815
+ sdr_name: string | null;
816
+ org_id: string | null;
817
+ list_title: string | null;
818
+ total_dials: number;
819
+ total_connections: number;
820
+ connection_rate: number;
821
+ total_voicemails: number;
822
+ voicemail_rate: number;
823
+ talk_time_minutes: number;
824
+ avg_call_duration_minutes: number;
825
+ dispositions: Record<string, unknown> | null;
826
+ success_rate: number;
827
+ unique_sessions: number;
828
+ avg_calls_per_session: number;
829
+ redial_count: number;
830
+ redial_success_rate: number | null;
831
+ peak_calling_hour: number | null;
832
+ total_callbacks: number;
833
+ }
834
+ interface DialerStatsResult {
835
+ filters: DialerReportFilters;
836
+ metrics: DialerReportMetric[];
837
+ summary: DialerReportMetric | null;
838
+ }
839
+ interface DialerNumberInfo {
840
+ number: string;
841
+ /** Default "ai". */
842
+ inbound_type: string;
843
+ /** Default "twilio". */
844
+ telephony_provider: string;
845
+ calls_today: number;
846
+ calls_7d: number;
847
+ connect_rate_7d: number;
848
+ is_valid: boolean;
849
+ daily_limit: number;
850
+ assigned_to: string | null;
851
+ created_at: string | null;
852
+ }
853
+ interface DialerNumbersListResult {
854
+ numbers: DialerNumberInfo[];
855
+ }
856
+ interface MissedCallback {
857
+ id: string | number | null;
858
+ caller_phone: string | null;
859
+ inbound_number: string | null;
860
+ first_name: string | null;
861
+ last_name: string | null;
862
+ email: string | null;
863
+ contact_id: string | number | null;
864
+ parallel_session_id: string | null;
865
+ created_at: string | null;
866
+ call_duration: number | null;
867
+ is_callback: boolean;
868
+ }
869
+ interface MissedCallbacksResult {
870
+ missed_callbacks: MissedCallback[];
871
+ count: number;
872
+ }
873
+ interface CallGradingResult {
874
+ room_name: string;
875
+ /** "ready" or "pending". */
876
+ status: string;
877
+ grading: Record<string, unknown> | null;
878
+ reviewed: boolean;
879
+ reviewed_at: string | null;
880
+ }
881
+ interface DialerAgentSummary {
882
+ agent_id: string;
883
+ agent_name: string | null;
884
+ /** "SDR", etc. */
885
+ role: string | null;
886
+ agent_status: string | null;
887
+ /** "agent" or "twin". */
888
+ entity_type: string | null;
889
+ description: string | null;
890
+ phone: string | null;
891
+ is_template: boolean;
892
+ }
893
+ interface DialerAgentsListResult {
894
+ agents: DialerAgentSummary[];
895
+ total_count: number;
896
+ }
897
+ interface DialerAgentsListParams {
898
+ /** e.g. "SDR". */
899
+ role?: string;
900
+ agent_status?: string;
901
+ /** "agent" or "twin". */
902
+ entity_type?: "agent" | "twin";
903
+ /** Substring filter on name/description. */
904
+ search?: string;
905
+ }
906
+ interface DialerSessionCreateParams {
907
+ /** 1-200 chars. */
908
+ name: string;
909
+ /** Org's dialer phone (E.164, 9-16 chars). */
910
+ from_phone: string;
911
+ /** Contact list ID (stored in session metadata). */
912
+ list_id?: string;
913
+ /** Display title for the source list. */
914
+ list_title?: string;
915
+ /** V2 agent UUID. */
916
+ agent_id?: string;
917
+ /** V1 fallback name. Defaults to "default_agent". */
918
+ agent_name?: string;
919
+ /** "agent" or "twin". */
920
+ entity_type?: "agent" | "twin";
921
+ /** Campaign Builder UUID. */
922
+ studio_campaign_id?: string;
923
+ /** IANA timezone (e.g. "America/New_York"). */
924
+ user_timezone?: string;
925
+ /** Per-session voicemail-skip override. null/omit = use SDR default. */
926
+ skip_voicemails?: boolean;
927
+ }
928
+ interface DialerSessionCreateResult {
929
+ session_id: string;
930
+ status: string;
931
+ name: string | null;
932
+ org_id: string | null;
933
+ user_id: string | null;
934
+ user_email: string | null;
935
+ from_phone: string | null;
936
+ session_metadata: Record<string, unknown> | null;
937
+ total_calls: number;
938
+ created_at: string | null;
939
+ message: string | null;
940
+ }
941
+ /** "ACTIVE" resumes, "PAUSED" pauses, "COMPLETED" stops. "FAILED" is rejected. */
942
+ type DialerSessionStatus = "ACTIVE" | "PAUSED" | "COMPLETED";
943
+ interface DialerSessionStatusUpdateResult {
944
+ session_id: string;
945
+ status: string;
946
+ message: string | null;
947
+ name: string | null;
948
+ org_id: string | null;
949
+ user_id: string | null;
950
+ user_email: string | null;
951
+ from_phone: string | null;
952
+ session_metadata: Record<string, unknown> | null;
953
+ total_calls: number;
954
+ created_at: string | null;
955
+ updated_at: string | null;
956
+ }
957
+ interface DialerSessionResumeResult extends DialerSessionStatusUpdateResult {
958
+ /** Contacts actually placed in this batch (voice caps at 4). */
959
+ dialed_count: number;
960
+ }
627
961
  /**
628
- * Voice AI - start AI voice calls, get transcriptions and analysis. Requires API key.
962
+ * Voice AI start AI voice calls, get transcriptions and analysis.
963
+ * Plus full parallel-dialer session control via the `dialer` namespace.
964
+ * Requires API key (server-side).
965
+ *
966
+ * Backed by:
967
+ * GET /api/v1/voice/dialer/sessions
968
+ * POST /api/v1/voice/dialer/sessions
969
+ * PATCH /api/v1/voice/dialer/sessions/{session_id}/status
970
+ * POST /api/v1/voice/dialer/sessions/{session_id}/resume
971
+ * GET /api/v1/voice/dialer/stats
972
+ * GET /api/v1/voice/dialer/numbers
973
+ * GET /api/v1/voice/dialer/missed-callbacks
974
+ * GET /api/v1/voice/dialer/calls/{room_name}/grading
975
+ * GET /api/v1/voice/dialer/agents
629
976
  */
630
977
  declare const createVoiceClient: (apiKey: string, apiUrl?: string) => {
631
- /** Start an AI voice session. */
978
+ /**
979
+ * Start an AI voice session.
980
+ * @deprecated Preview surface — for parallel-dialer flows use `voice.dialer.createSession()`.
981
+ */
632
982
  start(config: {
633
983
  agent?: string;
634
984
  contactId?: number;
635
985
  context?: Record<string, unknown>;
636
986
  }): Promise<VoiceSession>;
637
- /** Get call analysis for a completed session. */
987
+ /**
988
+ * Get call analysis for a completed session.
989
+ * @deprecated Preview surface — for dialer-call grading use `voice.dialer.callGrading(roomName)`.
990
+ */
638
991
  analysis(sessionId: string): Promise<CallAnalysis>;
639
992
  /** Listen for voice events. */
640
993
  on(event: VoiceEvent, callback: VoiceCallback): void;
994
+ /** Parallel-dialer session control + analytics. */
995
+ dialer: {
996
+ /** List parallel-dialer sessions with filters + pagination. */
997
+ listSessions(params?: DialerSessionsListParams): Promise<DialerSessionsListResult>;
998
+ /** Create a parallel-dialer session in PAUSED state. SDR opens UI to start dialing. */
999
+ createSession(payload: DialerSessionCreateParams): Promise<DialerSessionCreateResult>;
1000
+ /** Pause / resume / stop a dialer session via status flip. */
1001
+ updateSessionStatus(sessionId: string, status: DialerSessionStatus): Promise<DialerSessionStatusUpdateResult>;
1002
+ /**
1003
+ * Resume a PAUSED dialer session. Auto-fetches the next batch from the source list,
1004
+ * filters already-called + phoneless rows, and forwards to voice's start-session.
1005
+ * @param maxContacts 1-4 (voice caps parallel dialing at 4). Default 4.
1006
+ */
1007
+ resumeSession(sessionId: string, maxContacts?: number): Promise<DialerSessionResumeResult>;
1008
+ /** Aggregated dialer analytics (daily breakdown or total). */
1009
+ stats(params?: DialerStatsParams): Promise<DialerStatsResult>;
1010
+ /** List dialer-eligible phone numbers with 7-day stats + daily limits. */
1011
+ numbers(userEmail?: string): Promise<DialerNumbersListResult>;
1012
+ /** List missed inbound callbacks with caller / contact info. */
1013
+ missedCallbacks(limit?: number): Promise<MissedCallbacksResult>;
1014
+ /** AI grading for a single dialer call (returns "pending" while in progress). */
1015
+ callGrading(roomName: string): Promise<CallGradingResult>;
1016
+ /** List voice agents available for dialer sessions (capped at 100; no pagination). */
1017
+ agents(params?: DialerAgentsListParams): Promise<DialerAgentsListResult>;
1018
+ };
641
1019
  };
642
1020
 
643
1021
  interface AnalyticsOverview {
@@ -728,24 +1106,210 @@ declare const createCampaignsClient: (apiKey: string, apiUrl?: string) => {
728
1106
  stats(campaignId: string): Promise<CampaignStats>;
729
1107
  };
730
1108
 
731
- interface Sequence {
732
- id: string;
733
- name: string;
734
- status: string;
735
- step_count: number | null;
736
- contact_count: number | null;
737
- }
738
1109
  interface AddToSequenceConfig {
739
1110
  sequenceId: string;
740
1111
  contactIds: number[];
741
1112
  listId: number;
742
1113
  }
1114
+ interface SequenceListItem {
1115
+ id: string;
1116
+ name: string | null;
1117
+ status: string | null;
1118
+ user_email: string | null;
1119
+ step_count: number | null;
1120
+ contact_count: number | null;
1121
+ sequence_kind: string | null;
1122
+ associated_list_id: number | null;
1123
+ created_at: string | null;
1124
+ updated_at: string | null;
1125
+ }
1126
+ interface SequenceListParams {
1127
+ page?: number;
1128
+ limit?: number;
1129
+ /** Filter by sequence status (e.g. "live", "draft", "paused"). */
1130
+ status?: string;
1131
+ }
1132
+ interface SequenceDetail {
1133
+ id: string;
1134
+ name: string | null;
1135
+ description: string | null;
1136
+ status: string | null;
1137
+ user_email: string | null;
1138
+ associated_list_id: number | null;
1139
+ finish_on_reply: boolean;
1140
+ send_in_same_thread: boolean;
1141
+ wait_for_new_contacts: boolean;
1142
+ paused_at: string | null;
1143
+ resumed_at: string | null;
1144
+ created_at: string | null;
1145
+ updated_at: string | null;
1146
+ }
1147
+ interface SequenceContactItem {
1148
+ id: string | null;
1149
+ contact_id: number | null;
1150
+ state: string | null;
1151
+ current_step_order: number | null;
1152
+ created_at: string | null;
1153
+ updated_at: string | null;
1154
+ }
1155
+ interface SequenceContactsParams {
1156
+ page?: number;
1157
+ limit?: number;
1158
+ /** Filter by contact state (e.g. "active", "completed", "replied"). */
1159
+ state?: string;
1160
+ }
1161
+ interface SequenceActionResult {
1162
+ sequence_id: string;
1163
+ status: string;
1164
+ contacts_affected: number;
1165
+ }
743
1166
  /**
744
- * Sequences - manage outbound sequences. Requires API key (server-side).
1167
+ * Step type. Note: LinkedIn flows use "HEYREACH" there is no "LINKEDIN" step type.
1168
+ * Server is case-insensitive on input but stores uppercase.
1169
+ */
1170
+ type SequenceStepType = "EMAIL" | "PHONE" | "SMS" | "WHATSAPP" | "HEYREACH" | "MANUAL_DIALER";
1171
+ type SequenceStepInputType = "ON_DEMAND" | "MANUAL_TEMPLATE" | "AI_GENERATED_TEMPLATE";
1172
+ interface SequenceStepConfig {
1173
+ step_order: number;
1174
+ step_type: SequenceStepType | string;
1175
+ /** Defaults to "ON_DEMAND". */
1176
+ input_type?: SequenceStepInputType | string;
1177
+ /** Wait time before this step in seconds. Defaults to 0. */
1178
+ time_interval?: number;
1179
+ /** Template body, AI prompt, or other step-type-specific config. */
1180
+ step_data?: Record<string, unknown>;
1181
+ }
1182
+ interface SequenceChannelConfig {
1183
+ channel_id: number;
1184
+ channel_value: string;
1185
+ channel_type: string;
1186
+ channel_data?: Record<string, unknown>;
1187
+ }
1188
+ interface SequenceCreateParams {
1189
+ name: string;
1190
+ user_email: string;
1191
+ description?: string;
1192
+ finish_on_reply?: boolean;
1193
+ send_in_same_thread?: boolean;
1194
+ wait_for_new_contacts?: boolean;
1195
+ associated_list_id?: number;
1196
+ steps?: SequenceStepConfig[];
1197
+ channels?: SequenceChannelConfig[];
1198
+ campaign_id?: string;
1199
+ }
1200
+ interface SequenceCreateResult {
1201
+ id: string;
1202
+ name: string;
1203
+ status: string;
1204
+ created_at: string | null;
1205
+ }
1206
+ interface SequenceUpdateParams {
1207
+ name?: string;
1208
+ description?: string;
1209
+ is_shared?: boolean;
1210
+ finish_on_reply?: boolean;
1211
+ send_in_same_thread?: boolean;
1212
+ wait_for_new_contacts?: boolean;
1213
+ schedule_id?: string;
1214
+ appointment_id?: number;
1215
+ }
1216
+ interface SequenceStepUpdateParams {
1217
+ step_data?: Record<string, unknown>;
1218
+ time_interval?: number;
1219
+ step_type?: SequenceStepType | string;
1220
+ input_type?: SequenceStepInputType | string;
1221
+ }
1222
+ interface SequencePreviewStep {
1223
+ id: string;
1224
+ step_order: number;
1225
+ step_type: string;
1226
+ input_type: string;
1227
+ time_interval: number | null;
1228
+ step_data: Record<string, unknown> | null;
1229
+ }
1230
+ interface SequencePreviewChannel {
1231
+ id: string;
1232
+ channel_id: number | null;
1233
+ channel_value: string | null;
1234
+ channel_type: string | null;
1235
+ }
1236
+ interface SequencePreview {
1237
+ id: string;
1238
+ name: string | null;
1239
+ status: string | null;
1240
+ description: string | null;
1241
+ steps: SequencePreviewStep[];
1242
+ channels: SequencePreviewChannel[];
1243
+ }
1244
+ interface SequenceAnalytics {
1245
+ overview: Record<string, unknown>;
1246
+ performance: Record<string, unknown>;
1247
+ engagement: Record<string, unknown>;
1248
+ timeline: Record<string, unknown>[];
1249
+ contact_distribution: Record<string, unknown>;
1250
+ step_breakdown: Record<string, unknown>[];
1251
+ step_creation_methods: Record<string, unknown>[];
1252
+ sender_distribution: Record<string, unknown>[];
1253
+ }
1254
+ interface PaginationMeta {
1255
+ page: number;
1256
+ limit: number;
1257
+ total: number;
1258
+ has_next: boolean;
1259
+ }
1260
+ /**
1261
+ * Sequences API — list, create, run, pause, update, analyze multi-channel sequences.
1262
+ * Requires API key (server-side).
1263
+ *
1264
+ * Backed by:
1265
+ * GET /api/v1/sequences
1266
+ * POST /api/v1/sequences
1267
+ * GET /api/v1/sequences/{sequence_id}
1268
+ * PATCH /api/v1/sequences/{sequence_id}
1269
+ * DELETE /api/v1/sequences/{sequence_id}
1270
+ * GET /api/v1/sequences/{sequence_id}/contacts
1271
+ * POST /api/v1/sequences/{sequence_id}/contacts
1272
+ * POST /api/v1/sequences/{sequence_id}/run
1273
+ * POST /api/v1/sequences/{sequence_id}/pause
1274
+ * POST /api/v1/sequences/{sequence_id}/resume
1275
+ * PATCH /api/v1/sequences/{sequence_id}/steps/{step_id}
1276
+ * GET /api/v1/sequences/{sequence_id}/preview
1277
+ * GET /api/v1/sequences/{sequence_id}/analytics
745
1278
  */
746
1279
  declare const createSequencesClient: (apiKey: string, apiUrl?: string) => {
747
- list(page?: number, limit?: number): Promise<Sequence[]>;
748
- add(config: AddToSequenceConfig): Promise<void>;
1280
+ /** List sequences with pagination + optional status filter. */
1281
+ list: {
1282
+ (): Promise<SequenceListItem[]>;
1283
+ (page: number, limit?: number): Promise<SequenceListItem[]>;
1284
+ (params: SequenceListParams): Promise<SequenceListItem[]>;
1285
+ };
1286
+ /** Get full sequence details by ID. */
1287
+ get(sequenceId: string): Promise<SequenceDetail>;
1288
+ /** List contacts enrolled in a sequence. Filter by state (e.g. "active", "replied"). */
1289
+ contacts(sequenceId: string, params?: SequenceContactsParams): Promise<{
1290
+ data: SequenceContactItem[];
1291
+ pagination?: PaginationMeta;
1292
+ }>;
1293
+ /** Add contacts to a sequence (V2 queuing). Live or drafted sequences only. */
1294
+ add(config: AddToSequenceConfig): Promise<SequenceActionResult>;
1295
+ /** Create a new sequence with optional steps + channels. */
1296
+ create(payload: SequenceCreateParams): Promise<SequenceCreateResult>;
1297
+ /** Update sequence metadata. Rejected (409) if sequence is in a transitional status. */
1298
+ update(sequenceId: string, fields: SequenceUpdateParams): Promise<SequenceActionResult>;
1299
+ /** Update a single step within a sequence. */
1300
+ updateStep(sequenceId: string, stepId: string, fields: SequenceStepUpdateParams): Promise<SequenceActionResult>;
1301
+ /** Soft-delete (archive) a sequence. */
1302
+ delete(sequenceId: string): Promise<SequenceActionResult>;
1303
+ /** Run/start a DRAFTED sequence (V2 orchestration). */
1304
+ run(sequenceId: string): Promise<SequenceActionResult>;
1305
+ /** Pause a live sequence. */
1306
+ pause(sequenceId: string): Promise<SequenceActionResult>;
1307
+ /** Resume a paused sequence. */
1308
+ resume(sequenceId: string): Promise<SequenceActionResult>;
1309
+ /** Read-only sequence preview with all steps + channels (no enrollment). */
1310
+ preview(sequenceId: string): Promise<SequencePreview>;
1311
+ /** Comprehensive analytics for a sequence. */
1312
+ analytics(sequenceId: string): Promise<SequenceAnalytics>;
749
1313
  };
750
1314
 
751
1315
  interface PersonEnrichment {
@@ -1076,6 +1640,7 @@ declare const useG8: () => {
1076
1640
  _tasks: ReturnType<typeof createTasksClient> | null;
1077
1641
  _fields: ReturnType<typeof createFieldsClient> | null;
1078
1642
  _deals: ReturnType<typeof createDealsClient> | null;
1643
+ _inbox: ReturnType<typeof createInboxClient> | null;
1079
1644
  init(config: G8Config): void;
1080
1645
  track(event: string, properties?: TrackProperties): void;
1081
1646
  identify(userId: string, properties?: IdentifyProperties): void;
@@ -1129,8 +1694,26 @@ declare const useG8: () => {
1129
1694
  search(filters: SearchFilter[], page?: number, limit?: number): Promise<SearchResults>;
1130
1695
  };
1131
1696
  get sequences(): {
1132
- list(page?: number, limit?: number): Promise<Sequence[]>;
1133
- add(config: AddToSequenceConfig): Promise<void>;
1697
+ list: {
1698
+ (): Promise<SequenceListItem[]>;
1699
+ (page: number, limit?: number): Promise<SequenceListItem[]>;
1700
+ (params: SequenceListParams): Promise<SequenceListItem[]>;
1701
+ };
1702
+ get(sequenceId: string): Promise<SequenceDetail>;
1703
+ contacts(sequenceId: string, params?: SequenceContactsParams): Promise<{
1704
+ data: SequenceContactItem[];
1705
+ pagination?: PaginationMeta;
1706
+ }>;
1707
+ add(config: AddToSequenceConfig): Promise<SequenceActionResult>;
1708
+ create(payload: SequenceCreateParams): Promise<SequenceCreateResult>;
1709
+ update(sequenceId: string, fields: SequenceUpdateParams): Promise<SequenceActionResult>;
1710
+ updateStep(sequenceId: string, stepId: string, fields: SequenceStepUpdateParams): Promise<SequenceActionResult>;
1711
+ delete(sequenceId: string): Promise<SequenceActionResult>;
1712
+ run(sequenceId: string): Promise<SequenceActionResult>;
1713
+ pause(sequenceId: string): Promise<SequenceActionResult>;
1714
+ resume(sequenceId: string): Promise<SequenceActionResult>;
1715
+ preview(sequenceId: string): Promise<SequencePreview>;
1716
+ analytics(sequenceId: string): Promise<SequenceAnalytics>;
1134
1717
  };
1135
1718
  get campaigns(): {
1136
1719
  list(page?: number, limit?: number): Promise<Campaign[]>;
@@ -1164,6 +1747,17 @@ declare const useG8: () => {
1164
1747
  }): Promise<VoiceSession>;
1165
1748
  analysis(sessionId: string): Promise<CallAnalysis>;
1166
1749
  on(event: "error" | "ended" | "connected" | "transcription", callback: (data: Record<string, unknown>) => void): void;
1750
+ dialer: {
1751
+ listSessions(params?: DialerSessionsListParams): Promise<DialerSessionsListResult>;
1752
+ createSession(payload: DialerSessionCreateParams): Promise<DialerSessionCreateResult>;
1753
+ updateSessionStatus(sessionId: string, status: DialerSessionStatus): Promise<DialerSessionStatusUpdateResult>;
1754
+ resumeSession(sessionId: string, maxContacts?: number): Promise<DialerSessionResumeResult>;
1755
+ stats(params?: DialerStatsParams): Promise<DialerStatsResult>;
1756
+ numbers(userEmail?: string): Promise<DialerNumbersListResult>;
1757
+ missedCallbacks(limit?: number): Promise<MissedCallbacksResult>;
1758
+ callGrading(roomName: string): Promise<CallGradingResult>;
1759
+ agents(params?: DialerAgentsListParams): Promise<DialerAgentsListResult>;
1760
+ };
1167
1761
  };
1168
1762
  get pages(): {
1169
1763
  clone(url: string): Promise<LandingPage>;
@@ -1294,7 +1888,7 @@ declare const useG8: () => {
1294
1888
  }>;
1295
1889
  list(params?: DealListParams): Promise<{
1296
1890
  data: Deal[];
1297
- pagination?: PaginationMeta;
1891
+ pagination?: PaginationMeta$1;
1298
1892
  }>;
1299
1893
  create(deal: DealCreateParams): Promise<Deal>;
1300
1894
  get(dealId: string): Promise<Deal>;
@@ -1311,6 +1905,16 @@ declare const useG8: () => {
1311
1905
  data: ContactDeal[];
1312
1906
  }>;
1313
1907
  };
1908
+ get inbox(): {
1909
+ list(params?: InboxListParams): Promise<{
1910
+ data: InboxThread[];
1911
+ }>;
1912
+ get(replyId: string, channel?: InboxChannel): Promise<InboxThread>;
1913
+ assign(replyId: string, assigneeEmail: string, channel?: InboxChannel): Promise<InboxAssignResult>;
1914
+ tag(replyId: string, tagIds: string[], channel?: InboxChannel): Promise<InboxTagResult>;
1915
+ draft(replyId: string, channel?: InboxChannel): Promise<InboxDraft>;
1916
+ send(replyId: string, payload: InboxSendParams): Promise<InboxSendResult>;
1917
+ };
1314
1918
  get initialized(): boolean;
1315
1919
  _assertInit(): void;
1316
1920
  _assertKey(module: string): void;