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