cf-service-sdk 0.0.46 → 0.0.48

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.
@@ -93,6 +93,34 @@ export type Scalars = {
93
93
  output: any;
94
94
  };
95
95
  };
96
+ /** Response type for AI agent chat. */
97
+ export type AiAgentChatResponse = {
98
+ __typename?: 'AIAgentChatResponse';
99
+ conversationId?: Maybe<Scalars['String']['output']>;
100
+ error?: Maybe<Scalars['String']['output']>;
101
+ requiresExecution?: Maybe<Scalars['Boolean']['output']>;
102
+ response?: Maybe<Scalars['String']['output']>;
103
+ success?: Maybe<Scalars['Boolean']['output']>;
104
+ toolCalls?: Maybe<Array<Maybe<ToolCallType>>>;
105
+ toolResults?: Maybe<Array<Maybe<ToolResultType>>>;
106
+ };
107
+ /** Response type for continuing after tool execution. */
108
+ export type AiAgentContinueResponse = {
109
+ __typename?: 'AIAgentContinueResponse';
110
+ error?: Maybe<Scalars['String']['output']>;
111
+ requiresExecution?: Maybe<Scalars['Boolean']['output']>;
112
+ response?: Maybe<Scalars['String']['output']>;
113
+ success?: Maybe<Scalars['Boolean']['output']>;
114
+ toolCalls?: Maybe<Array<Maybe<ToolCallType>>>;
115
+ toolResults?: Maybe<Array<Maybe<ToolResultType>>>;
116
+ };
117
+ /** Response type for tool execution. */
118
+ export type AiAgentExecuteResponse = {
119
+ __typename?: 'AIAgentExecuteResponse';
120
+ error?: Maybe<Scalars['String']['output']>;
121
+ results?: Maybe<Array<Maybe<ToolResultType>>>;
122
+ success?: Maybe<Scalars['Boolean']['output']>;
123
+ };
96
124
  /** AcceptInvitation - Accept an invitation to join an account */
97
125
  export type AcceptInvitation = {
98
126
  __typename?: 'AcceptInvitation';
@@ -151,6 +179,15 @@ export type AddSegmentToCampaign = {
151
179
  success?: Maybe<Scalars['Boolean']['output']>;
152
180
  };
153
181
  /** An enumeration. */
182
+ export declare enum AgentConversationMessageRoleChoices {
183
+ /** Assistant */
184
+ Assistant = "ASSISTANT",
185
+ /** System */
186
+ System = "SYSTEM",
187
+ /** User */
188
+ User = "USER"
189
+ }
190
+ /** An enumeration. */
154
191
  export declare enum AppAccountInvitationStatusChoices {
155
192
  /** Accepted */
156
193
  Accepted = "ACCEPTED",
@@ -1150,6 +1187,36 @@ export type ContactStatsType = {
1150
1187
  /** Total number of emails replied to */
1151
1188
  totalReplied?: Maybe<Scalars['Int']['output']>;
1152
1189
  };
1190
+ /** Type for conversation history list. */
1191
+ export type ConversationHistoryType = {
1192
+ __typename?: 'ConversationHistoryType';
1193
+ conversations?: Maybe<Array<Maybe<ConversationType>>>;
1194
+ totalCount?: Maybe<Scalars['Int']['output']>;
1195
+ };
1196
+ /** GraphQL type for ConversationMessage model. */
1197
+ export type ConversationMessageType = Node & {
1198
+ __typename?: 'ConversationMessageType';
1199
+ content: Scalars['JSONString']['output'];
1200
+ conversation?: Maybe<ConversationType>;
1201
+ createdAt: Scalars['DateTime']['output'];
1202
+ /** The ID of the object */
1203
+ id: Scalars['ID']['output'];
1204
+ role: AgentConversationMessageRoleChoices;
1205
+ /** Tool calls made by the assistant */
1206
+ toolCalls?: Maybe<Scalars['JSONString']['output']>;
1207
+ /** Results from tool executions */
1208
+ toolResults?: Maybe<Scalars['JSONString']['output']>;
1209
+ };
1210
+ /** GraphQL type for Conversation model. */
1211
+ export type ConversationType = Node & {
1212
+ __typename?: 'ConversationType';
1213
+ createdAt: Scalars['DateTime']['output'];
1214
+ /** The ID of the object */
1215
+ id: Scalars['ID']['output'];
1216
+ messages?: Maybe<Array<Maybe<ConversationMessageType>>>;
1217
+ updatedAt: Scalars['DateTime']['output'];
1218
+ user?: Maybe<UserType>;
1219
+ };
1153
1220
  export type CreateCallCampaign = {
1154
1221
  __typename?: 'CreateCallCampaign';
1155
1222
  callCampaign?: Maybe<CallCampaignObject>;
@@ -1282,6 +1349,12 @@ export type DeleteContact = {
1282
1349
  __typename?: 'DeleteContact';
1283
1350
  success?: Maybe<Scalars['Boolean']['output']>;
1284
1351
  };
1352
+ /** Mutation for deleting a conversation. */
1353
+ export type DeleteConversation = {
1354
+ __typename?: 'DeleteConversation';
1355
+ message?: Maybe<Scalars['String']['output']>;
1356
+ success?: Maybe<Scalars['Boolean']['output']>;
1357
+ };
1285
1358
  /** DeleteEmailTemplate - Delete an email template (only if owned by user's account) */
1286
1359
  export type DeleteEmailTemplate = {
1287
1360
  __typename?: 'DeleteEmailTemplate';
@@ -1545,6 +1618,12 @@ export type Mutation = {
1545
1618
  addContactsToSegment?: Maybe<AddContactsToSegment>;
1546
1619
  addSegmentToCallCampaign?: Maybe<AddSegmentToCallCampaign>;
1547
1620
  addSegmentToCampaign?: Maybe<AddSegmentToCampaign>;
1621
+ /** Mutation for chatting with the AI agent. */
1622
+ aiAgentChat?: Maybe<AiAgentChatResponse>;
1623
+ /** Mutation for continuing conversation after tool execution. */
1624
+ aiAgentContinue?: Maybe<AiAgentContinueResponse>;
1625
+ /** Mutation for executing tool calls. */
1626
+ aiAgentExecute?: Maybe<AiAgentExecuteResponse>;
1548
1627
  cancelCampaign?: Maybe<CancelCampaign>;
1549
1628
  /** CancelInvitation - Cancel a pending invitation (admin only) */
1550
1629
  cancelInvitation?: Maybe<CancelInvitation>;
@@ -1571,6 +1650,8 @@ export type Mutation = {
1571
1650
  deleteCompany?: Maybe<DeleteCompany>;
1572
1651
  deleteCompanyNote?: Maybe<DeleteCompanyNote>;
1573
1652
  deleteContact?: Maybe<DeleteContact>;
1653
+ /** Mutation for deleting a conversation. */
1654
+ deleteConversation?: Maybe<DeleteConversation>;
1574
1655
  /** DeleteEmailTemplate - Delete an email template (only if owned by user's account) */
1575
1656
  deleteEmailTemplate?: Maybe<DeleteEmailTemplate>;
1576
1657
  /** Delete a notification */
@@ -1669,6 +1750,22 @@ export type MutationAddSegmentToCampaignArgs = {
1669
1750
  segmentId: Scalars['ID']['input'];
1670
1751
  };
1671
1752
  /** Mutations */
1753
+ export type MutationAiAgentChatArgs = {
1754
+ conversationId?: InputMaybe<Scalars['String']['input']>;
1755
+ enableTools?: InputMaybe<Scalars['Boolean']['input']>;
1756
+ message: Scalars['String']['input'];
1757
+ };
1758
+ /** Mutations */
1759
+ export type MutationAiAgentContinueArgs = {
1760
+ conversationId: Scalars['String']['input'];
1761
+ toolResults: Array<InputMaybe<Scalars['JSONString']['input']>>;
1762
+ };
1763
+ /** Mutations */
1764
+ export type MutationAiAgentExecuteArgs = {
1765
+ conversationId: Scalars['String']['input'];
1766
+ toolCalls: Array<InputMaybe<Scalars['JSONString']['input']>>;
1767
+ };
1768
+ /** Mutations */
1672
1769
  export type MutationCancelCampaignArgs = {
1673
1770
  id: Scalars['ID']['input'];
1674
1771
  };
@@ -1745,6 +1842,10 @@ export type MutationDeleteContactArgs = {
1745
1842
  id?: InputMaybe<Scalars['ID']['input']>;
1746
1843
  };
1747
1844
  /** Mutations */
1845
+ export type MutationDeleteConversationArgs = {
1846
+ conversationId: Scalars['String']['input'];
1847
+ };
1848
+ /** Mutations */
1748
1849
  export type MutationDeleteEmailTemplateArgs = {
1749
1850
  uuid: Scalars['UUID']['input'];
1750
1851
  };
@@ -1945,6 +2046,11 @@ export type MyInvitationsType = {
1945
2046
  status: Scalars['String']['output'];
1946
2047
  token: Scalars['String']['output'];
1947
2048
  };
2049
+ /** An object with an ID */
2050
+ export type Node = {
2051
+ /** The ID of the object */
2052
+ id: Scalars['ID']['output'];
2053
+ };
1948
2054
  /** GraphQL type for Notification model */
1949
2055
  export type NotificationType = {
1950
2056
  __typename?: 'NotificationType';
@@ -2159,6 +2265,8 @@ export type Query = {
2159
2265
  contacts?: Maybe<Array<Maybe<ContactObject>>>;
2160
2266
  /** Get paginated list of contacts in a segment */
2161
2267
  contactsInSegment?: Maybe<PaginatedContactList>;
2268
+ conversation?: Maybe<ConversationType>;
2269
+ conversationHistory?: Maybe<ConversationHistoryType>;
2162
2270
  currentAccount?: Maybe<AccountType>;
2163
2271
  /** Get dashboard statistics across different features */
2164
2272
  dashboardStats?: Maybe<DashboardStatsType>;
@@ -2288,6 +2396,15 @@ export type QueryContactsInSegmentArgs = {
2288
2396
  segmentId: Scalars['ID']['input'];
2289
2397
  };
2290
2398
  /** Query */
2399
+ export type QueryConversationArgs = {
2400
+ conversationId: Scalars['String']['input'];
2401
+ };
2402
+ /** Query */
2403
+ export type QueryConversationHistoryArgs = {
2404
+ limit?: InputMaybe<Scalars['Int']['input']>;
2405
+ offset?: InputMaybe<Scalars['Int']['input']>;
2406
+ };
2407
+ /** Query */
2291
2408
  export type QueryDashboardStatsArgs = {
2292
2409
  endDate?: InputMaybe<Scalars['DateTime']['input']>;
2293
2410
  startDate?: InputMaybe<Scalars['DateTime']['input']>;
@@ -2644,6 +2761,23 @@ export type TasksResponse = {
2644
2761
  pagination?: Maybe<PaginationInfo>;
2645
2762
  stats?: Maybe<TaskStatsObject>;
2646
2763
  };
2764
+ /** Type for tool calls. */
2765
+ export type ToolCallType = {
2766
+ __typename?: 'ToolCallType';
2767
+ id?: Maybe<Scalars['String']['output']>;
2768
+ input?: Maybe<Scalars['JSONString']['output']>;
2769
+ name?: Maybe<Scalars['String']['output']>;
2770
+ type?: Maybe<Scalars['String']['output']>;
2771
+ };
2772
+ /** Type for tool execution results. */
2773
+ export type ToolResultType = {
2774
+ __typename?: 'ToolResultType';
2775
+ error?: Maybe<Scalars['String']['output']>;
2776
+ result?: Maybe<Scalars['JSONString']['output']>;
2777
+ success?: Maybe<Scalars['Boolean']['output']>;
2778
+ toolUseId?: Maybe<Scalars['String']['output']>;
2779
+ type?: Maybe<Scalars['String']['output']>;
2780
+ };
2647
2781
  export type UsStateData = {
2648
2782
  __typename?: 'USStateData';
2649
2783
  /** State abbreviation */
@@ -3049,6 +3183,86 @@ export type AddSegmentToCampaignMutation = {
3049
3183
  } | null;
3050
3184
  } | null;
3051
3185
  };
3186
+ export type AiAgentChatMutationVariables = Exact<{
3187
+ conversationId?: InputMaybe<Scalars['String']['input']>;
3188
+ enableTools?: InputMaybe<Scalars['Boolean']['input']>;
3189
+ message: Scalars['String']['input'];
3190
+ }>;
3191
+ export type AiAgentChatMutation = {
3192
+ __typename?: 'Mutation';
3193
+ aiAgentChat?: {
3194
+ __typename?: 'AIAgentChatResponse';
3195
+ success?: boolean | null;
3196
+ conversationId?: string | null;
3197
+ response?: string | null;
3198
+ requiresExecution?: boolean | null;
3199
+ error?: string | null;
3200
+ toolCalls?: Array<{
3201
+ __typename?: 'ToolCallType';
3202
+ type?: string | null;
3203
+ id?: string | null;
3204
+ name?: string | null;
3205
+ input?: any | null;
3206
+ } | null> | null;
3207
+ toolResults?: Array<{
3208
+ __typename?: 'ToolResultType';
3209
+ toolUseId?: string | null;
3210
+ type?: string | null;
3211
+ success?: boolean | null;
3212
+ result?: any | null;
3213
+ error?: string | null;
3214
+ } | null> | null;
3215
+ } | null;
3216
+ };
3217
+ export type AiAgentContinueMutationVariables = Exact<{
3218
+ conversationId: Scalars['String']['input'];
3219
+ toolResults: Array<InputMaybe<Scalars['JSONString']['input']>> | InputMaybe<Scalars['JSONString']['input']>;
3220
+ }>;
3221
+ export type AiAgentContinueMutation = {
3222
+ __typename?: 'Mutation';
3223
+ aiAgentContinue?: {
3224
+ __typename?: 'AIAgentContinueResponse';
3225
+ success?: boolean | null;
3226
+ response?: string | null;
3227
+ requiresExecution?: boolean | null;
3228
+ error?: string | null;
3229
+ toolCalls?: Array<{
3230
+ __typename?: 'ToolCallType';
3231
+ type?: string | null;
3232
+ id?: string | null;
3233
+ name?: string | null;
3234
+ input?: any | null;
3235
+ } | null> | null;
3236
+ toolResults?: Array<{
3237
+ __typename?: 'ToolResultType';
3238
+ toolUseId?: string | null;
3239
+ type?: string | null;
3240
+ success?: boolean | null;
3241
+ result?: any | null;
3242
+ error?: string | null;
3243
+ } | null> | null;
3244
+ } | null;
3245
+ };
3246
+ export type AiAgentExecuteMutationVariables = Exact<{
3247
+ conversationId: Scalars['String']['input'];
3248
+ toolCalls: Array<InputMaybe<Scalars['JSONString']['input']>> | InputMaybe<Scalars['JSONString']['input']>;
3249
+ }>;
3250
+ export type AiAgentExecuteMutation = {
3251
+ __typename?: 'Mutation';
3252
+ aiAgentExecute?: {
3253
+ __typename?: 'AIAgentExecuteResponse';
3254
+ success?: boolean | null;
3255
+ error?: string | null;
3256
+ results?: Array<{
3257
+ __typename?: 'ToolResultType';
3258
+ toolUseId?: string | null;
3259
+ type?: string | null;
3260
+ success?: boolean | null;
3261
+ result?: any | null;
3262
+ error?: string | null;
3263
+ } | null> | null;
3264
+ } | null;
3265
+ };
3052
3266
  export type CancelCampaignMutationVariables = Exact<{
3053
3267
  id: Scalars['ID']['input'];
3054
3268
  }>;
@@ -4848,6 +5062,17 @@ export type DeleteContactMutation = {
4848
5062
  success?: boolean | null;
4849
5063
  } | null;
4850
5064
  };
5065
+ export type DeleteConversationMutationVariables = Exact<{
5066
+ conversationId: Scalars['String']['input'];
5067
+ }>;
5068
+ export type DeleteConversationMutation = {
5069
+ __typename?: 'Mutation';
5070
+ deleteConversation?: {
5071
+ __typename?: 'DeleteConversation';
5072
+ success?: boolean | null;
5073
+ message?: string | null;
5074
+ } | null;
5075
+ };
4851
5076
  export type DeleteEmailTemplateMutationVariables = Exact<{
4852
5077
  uuid: Scalars['UUID']['input'];
4853
5078
  }>;
@@ -10673,6 +10898,69 @@ export type ContactsInSegmentQuery = {
10673
10898
  } | null;
10674
10899
  } | null;
10675
10900
  };
10901
+ export type ConversationQueryVariables = Exact<{
10902
+ conversationId: Scalars['String']['input'];
10903
+ }>;
10904
+ export type ConversationQuery = {
10905
+ __typename?: 'Query';
10906
+ conversation?: {
10907
+ __typename?: 'ConversationType';
10908
+ id: string;
10909
+ createdAt: any;
10910
+ updatedAt: any;
10911
+ user?: {
10912
+ __typename?: 'UserType';
10913
+ id?: string | null;
10914
+ email?: string | null;
10915
+ firstName?: string | null;
10916
+ lastName?: string | null;
10917
+ picture?: string | null;
10918
+ } | null;
10919
+ messages?: Array<{
10920
+ __typename?: 'ConversationMessageType';
10921
+ id: string;
10922
+ role: AgentConversationMessageRoleChoices;
10923
+ content: any;
10924
+ toolCalls?: any | null;
10925
+ toolResults?: any | null;
10926
+ createdAt: any;
10927
+ } | null> | null;
10928
+ } | null;
10929
+ };
10930
+ export type ConversationHistoryQueryVariables = Exact<{
10931
+ limit?: InputMaybe<Scalars['Int']['input']>;
10932
+ offset?: InputMaybe<Scalars['Int']['input']>;
10933
+ }>;
10934
+ export type ConversationHistoryQuery = {
10935
+ __typename?: 'Query';
10936
+ conversationHistory?: {
10937
+ __typename?: 'ConversationHistoryType';
10938
+ totalCount?: number | null;
10939
+ conversations?: Array<{
10940
+ __typename?: 'ConversationType';
10941
+ id: string;
10942
+ createdAt: any;
10943
+ updatedAt: any;
10944
+ user?: {
10945
+ __typename?: 'UserType';
10946
+ id?: string | null;
10947
+ email?: string | null;
10948
+ firstName?: string | null;
10949
+ lastName?: string | null;
10950
+ picture?: string | null;
10951
+ } | null;
10952
+ messages?: Array<{
10953
+ __typename?: 'ConversationMessageType';
10954
+ id: string;
10955
+ role: AgentConversationMessageRoleChoices;
10956
+ content: any;
10957
+ toolCalls?: any | null;
10958
+ toolResults?: any | null;
10959
+ createdAt: any;
10960
+ } | null> | null;
10961
+ } | null> | null;
10962
+ } | null;
10963
+ };
10676
10964
  export type CurrentAccountQueryVariables = Exact<{
10677
10965
  [key: string]: never;
10678
10966
  }>;
@@ -12218,6 +12506,89 @@ export declare function useAddSegmentToCampaignMutation(baseOptions?: Apollo.Mut
12218
12506
  export type AddSegmentToCampaignMutationHookResult = ReturnType<typeof useAddSegmentToCampaignMutation>;
12219
12507
  export type AddSegmentToCampaignMutationResult = Apollo.MutationResult<AddSegmentToCampaignMutation>;
12220
12508
  export type AddSegmentToCampaignMutationOptions = Apollo.BaseMutationOptions<AddSegmentToCampaignMutation, AddSegmentToCampaignMutationVariables>;
12509
+ export declare const AiAgentChatDocument: Apollo.DocumentNode;
12510
+ export type AiAgentChatMutationFn = Apollo.MutationFunction<AiAgentChatMutation, AiAgentChatMutationVariables>;
12511
+ /**
12512
+ * __useAiAgentChatMutation__
12513
+ *
12514
+ * To run a mutation, you first call `useAiAgentChatMutation` within a React component and pass it any options that fit your needs.
12515
+ * When your component renders, `useAiAgentChatMutation` returns a tuple that includes:
12516
+ * - A mutate function that you can call at any time to execute the mutation
12517
+ * - An object with fields that represent the current status of the mutation's execution
12518
+ *
12519
+ * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
12520
+ *
12521
+ * @example
12522
+ * const [aiAgentChatMutation, { data, loading, error }] = useAiAgentChatMutation({
12523
+ * variables: {
12524
+ * conversationId: // value for 'conversationId'
12525
+ * enableTools: // value for 'enableTools'
12526
+ * message: // value for 'message'
12527
+ * },
12528
+ * });
12529
+ */
12530
+ export declare function useAiAgentChatMutation(baseOptions?: Apollo.MutationHookOptions<AiAgentChatMutation, AiAgentChatMutationVariables>): Apollo.MutationTuple<AiAgentChatMutation, Exact<{
12531
+ conversationId?: InputMaybe<Scalars["String"]["input"]>;
12532
+ enableTools?: InputMaybe<Scalars["Boolean"]["input"]>;
12533
+ message: Scalars["String"]["input"];
12534
+ }>, Apollo.DefaultContext, Apollo.ApolloCache<any>>;
12535
+ export type AiAgentChatMutationHookResult = ReturnType<typeof useAiAgentChatMutation>;
12536
+ export type AiAgentChatMutationResult = Apollo.MutationResult<AiAgentChatMutation>;
12537
+ export type AiAgentChatMutationOptions = Apollo.BaseMutationOptions<AiAgentChatMutation, AiAgentChatMutationVariables>;
12538
+ export declare const AiAgentContinueDocument: Apollo.DocumentNode;
12539
+ export type AiAgentContinueMutationFn = Apollo.MutationFunction<AiAgentContinueMutation, AiAgentContinueMutationVariables>;
12540
+ /**
12541
+ * __useAiAgentContinueMutation__
12542
+ *
12543
+ * To run a mutation, you first call `useAiAgentContinueMutation` within a React component and pass it any options that fit your needs.
12544
+ * When your component renders, `useAiAgentContinueMutation` returns a tuple that includes:
12545
+ * - A mutate function that you can call at any time to execute the mutation
12546
+ * - An object with fields that represent the current status of the mutation's execution
12547
+ *
12548
+ * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
12549
+ *
12550
+ * @example
12551
+ * const [aiAgentContinueMutation, { data, loading, error }] = useAiAgentContinueMutation({
12552
+ * variables: {
12553
+ * conversationId: // value for 'conversationId'
12554
+ * toolResults: // value for 'toolResults'
12555
+ * },
12556
+ * });
12557
+ */
12558
+ export declare function useAiAgentContinueMutation(baseOptions?: Apollo.MutationHookOptions<AiAgentContinueMutation, AiAgentContinueMutationVariables>): Apollo.MutationTuple<AiAgentContinueMutation, Exact<{
12559
+ conversationId: Scalars["String"]["input"];
12560
+ toolResults: Array<InputMaybe<Scalars["JSONString"]["input"]>> | InputMaybe<Scalars["JSONString"]["input"]>;
12561
+ }>, Apollo.DefaultContext, Apollo.ApolloCache<any>>;
12562
+ export type AiAgentContinueMutationHookResult = ReturnType<typeof useAiAgentContinueMutation>;
12563
+ export type AiAgentContinueMutationResult = Apollo.MutationResult<AiAgentContinueMutation>;
12564
+ export type AiAgentContinueMutationOptions = Apollo.BaseMutationOptions<AiAgentContinueMutation, AiAgentContinueMutationVariables>;
12565
+ export declare const AiAgentExecuteDocument: Apollo.DocumentNode;
12566
+ export type AiAgentExecuteMutationFn = Apollo.MutationFunction<AiAgentExecuteMutation, AiAgentExecuteMutationVariables>;
12567
+ /**
12568
+ * __useAiAgentExecuteMutation__
12569
+ *
12570
+ * To run a mutation, you first call `useAiAgentExecuteMutation` within a React component and pass it any options that fit your needs.
12571
+ * When your component renders, `useAiAgentExecuteMutation` returns a tuple that includes:
12572
+ * - A mutate function that you can call at any time to execute the mutation
12573
+ * - An object with fields that represent the current status of the mutation's execution
12574
+ *
12575
+ * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
12576
+ *
12577
+ * @example
12578
+ * const [aiAgentExecuteMutation, { data, loading, error }] = useAiAgentExecuteMutation({
12579
+ * variables: {
12580
+ * conversationId: // value for 'conversationId'
12581
+ * toolCalls: // value for 'toolCalls'
12582
+ * },
12583
+ * });
12584
+ */
12585
+ export declare function useAiAgentExecuteMutation(baseOptions?: Apollo.MutationHookOptions<AiAgentExecuteMutation, AiAgentExecuteMutationVariables>): Apollo.MutationTuple<AiAgentExecuteMutation, Exact<{
12586
+ conversationId: Scalars["String"]["input"];
12587
+ toolCalls: Array<InputMaybe<Scalars["JSONString"]["input"]>> | InputMaybe<Scalars["JSONString"]["input"]>;
12588
+ }>, Apollo.DefaultContext, Apollo.ApolloCache<any>>;
12589
+ export type AiAgentExecuteMutationHookResult = ReturnType<typeof useAiAgentExecuteMutation>;
12590
+ export type AiAgentExecuteMutationResult = Apollo.MutationResult<AiAgentExecuteMutation>;
12591
+ export type AiAgentExecuteMutationOptions = Apollo.BaseMutationOptions<AiAgentExecuteMutation, AiAgentExecuteMutationVariables>;
12221
12592
  export declare const CancelCampaignDocument: Apollo.DocumentNode;
12222
12593
  export type CancelCampaignMutationFn = Apollo.MutationFunction<CancelCampaignMutation, CancelCampaignMutationVariables>;
12223
12594
  /**
@@ -12717,6 +13088,31 @@ export declare function useDeleteContactMutation(baseOptions?: Apollo.MutationHo
12717
13088
  export type DeleteContactMutationHookResult = ReturnType<typeof useDeleteContactMutation>;
12718
13089
  export type DeleteContactMutationResult = Apollo.MutationResult<DeleteContactMutation>;
12719
13090
  export type DeleteContactMutationOptions = Apollo.BaseMutationOptions<DeleteContactMutation, DeleteContactMutationVariables>;
13091
+ export declare const DeleteConversationDocument: Apollo.DocumentNode;
13092
+ export type DeleteConversationMutationFn = Apollo.MutationFunction<DeleteConversationMutation, DeleteConversationMutationVariables>;
13093
+ /**
13094
+ * __useDeleteConversationMutation__
13095
+ *
13096
+ * To run a mutation, you first call `useDeleteConversationMutation` within a React component and pass it any options that fit your needs.
13097
+ * When your component renders, `useDeleteConversationMutation` returns a tuple that includes:
13098
+ * - A mutate function that you can call at any time to execute the mutation
13099
+ * - An object with fields that represent the current status of the mutation's execution
13100
+ *
13101
+ * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
13102
+ *
13103
+ * @example
13104
+ * const [deleteConversationMutation, { data, loading, error }] = useDeleteConversationMutation({
13105
+ * variables: {
13106
+ * conversationId: // value for 'conversationId'
13107
+ * },
13108
+ * });
13109
+ */
13110
+ export declare function useDeleteConversationMutation(baseOptions?: Apollo.MutationHookOptions<DeleteConversationMutation, DeleteConversationMutationVariables>): Apollo.MutationTuple<DeleteConversationMutation, Exact<{
13111
+ conversationId: Scalars["String"]["input"];
13112
+ }>, Apollo.DefaultContext, Apollo.ApolloCache<any>>;
13113
+ export type DeleteConversationMutationHookResult = ReturnType<typeof useDeleteConversationMutation>;
13114
+ export type DeleteConversationMutationResult = Apollo.MutationResult<DeleteConversationMutation>;
13115
+ export type DeleteConversationMutationOptions = Apollo.BaseMutationOptions<DeleteConversationMutation, DeleteConversationMutationVariables>;
12720
13116
  export declare const DeleteEmailTemplateDocument: Apollo.DocumentNode;
12721
13117
  export type DeleteEmailTemplateMutationFn = Apollo.MutationFunction<DeleteEmailTemplateMutation, DeleteEmailTemplateMutationVariables>;
12722
13118
  /**
@@ -14603,6 +14999,75 @@ export type ContactsInSegmentQueryHookResult = ReturnType<typeof useContactsInSe
14603
14999
  export type ContactsInSegmentLazyQueryHookResult = ReturnType<typeof useContactsInSegmentLazyQuery>;
14604
15000
  export type ContactsInSegmentSuspenseQueryHookResult = ReturnType<typeof useContactsInSegmentSuspenseQuery>;
14605
15001
  export type ContactsInSegmentQueryResult = Apollo.QueryResult<ContactsInSegmentQuery, ContactsInSegmentQueryVariables>;
15002
+ export declare const ConversationDocument: Apollo.DocumentNode;
15003
+ /**
15004
+ * __useConversationQuery__
15005
+ *
15006
+ * To run a query within a React component, call `useConversationQuery` and pass it any options that fit your needs.
15007
+ * When your component renders, `useConversationQuery` returns an object from Apollo Client that contains loading, error, and data properties
15008
+ * you can use to render your UI.
15009
+ *
15010
+ * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
15011
+ *
15012
+ * @example
15013
+ * const { data, loading, error } = useConversationQuery({
15014
+ * variables: {
15015
+ * conversationId: // value for 'conversationId'
15016
+ * },
15017
+ * });
15018
+ */
15019
+ export declare function useConversationQuery(baseOptions: Apollo.QueryHookOptions<ConversationQuery, ConversationQueryVariables> & ({
15020
+ variables: ConversationQueryVariables;
15021
+ skip?: boolean;
15022
+ } | {
15023
+ skip: boolean;
15024
+ })): Apollo.QueryResult<ConversationQuery, Exact<{
15025
+ conversationId: Scalars["String"]["input"];
15026
+ }>>;
15027
+ export declare function useConversationLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<ConversationQuery, ConversationQueryVariables>): Apollo.LazyQueryResultTuple<ConversationQuery, Exact<{
15028
+ conversationId: Scalars["String"]["input"];
15029
+ }>>;
15030
+ export declare function useConversationSuspenseQuery(baseOptions?: Apollo.SkipToken | Apollo.SuspenseQueryHookOptions<ConversationQuery, ConversationQueryVariables>): Apollo.UseSuspenseQueryResult<ConversationQuery | undefined, Exact<{
15031
+ conversationId: Scalars["String"]["input"];
15032
+ }>>;
15033
+ export type ConversationQueryHookResult = ReturnType<typeof useConversationQuery>;
15034
+ export type ConversationLazyQueryHookResult = ReturnType<typeof useConversationLazyQuery>;
15035
+ export type ConversationSuspenseQueryHookResult = ReturnType<typeof useConversationSuspenseQuery>;
15036
+ export type ConversationQueryResult = Apollo.QueryResult<ConversationQuery, ConversationQueryVariables>;
15037
+ export declare const ConversationHistoryDocument: Apollo.DocumentNode;
15038
+ /**
15039
+ * __useConversationHistoryQuery__
15040
+ *
15041
+ * To run a query within a React component, call `useConversationHistoryQuery` and pass it any options that fit your needs.
15042
+ * When your component renders, `useConversationHistoryQuery` returns an object from Apollo Client that contains loading, error, and data properties
15043
+ * you can use to render your UI.
15044
+ *
15045
+ * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
15046
+ *
15047
+ * @example
15048
+ * const { data, loading, error } = useConversationHistoryQuery({
15049
+ * variables: {
15050
+ * limit: // value for 'limit'
15051
+ * offset: // value for 'offset'
15052
+ * },
15053
+ * });
15054
+ */
15055
+ export declare function useConversationHistoryQuery(baseOptions?: Apollo.QueryHookOptions<ConversationHistoryQuery, ConversationHistoryQueryVariables>): Apollo.QueryResult<ConversationHistoryQuery, Exact<{
15056
+ limit?: InputMaybe<Scalars["Int"]["input"]>;
15057
+ offset?: InputMaybe<Scalars["Int"]["input"]>;
15058
+ }>>;
15059
+ export declare function useConversationHistoryLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<ConversationHistoryQuery, ConversationHistoryQueryVariables>): Apollo.LazyQueryResultTuple<ConversationHistoryQuery, Exact<{
15060
+ limit?: InputMaybe<Scalars["Int"]["input"]>;
15061
+ offset?: InputMaybe<Scalars["Int"]["input"]>;
15062
+ }>>;
15063
+ export declare function useConversationHistorySuspenseQuery(baseOptions?: Apollo.SkipToken | Apollo.SuspenseQueryHookOptions<ConversationHistoryQuery, ConversationHistoryQueryVariables>): Apollo.UseSuspenseQueryResult<ConversationHistoryQuery | undefined, Exact<{
15064
+ limit?: InputMaybe<Scalars["Int"]["input"]>;
15065
+ offset?: InputMaybe<Scalars["Int"]["input"]>;
15066
+ }>>;
15067
+ export type ConversationHistoryQueryHookResult = ReturnType<typeof useConversationHistoryQuery>;
15068
+ export type ConversationHistoryLazyQueryHookResult = ReturnType<typeof useConversationHistoryLazyQuery>;
15069
+ export type ConversationHistorySuspenseQueryHookResult = ReturnType<typeof useConversationHistorySuspenseQuery>;
15070
+ export type ConversationHistoryQueryResult = Apollo.QueryResult<ConversationHistoryQuery, ConversationHistoryQueryVariables>;
14606
15071
  export declare const CurrentAccountDocument: Apollo.DocumentNode;
14607
15072
  /**
14608
15073
  * __useCurrentAccountQuery__
@@ -33,14 +33,17 @@ var __importStar = (this && this.__importStar) || (function () {
33
33
  };
34
34
  })();
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.MarkNotificationAsReadDocument = exports.MarkAllNotificationsAsReadDocument = exports.LoginWithMicrosoftDocument = exports.LoginWithGoogleDocument = exports.LoginDocument = exports.InviteUserDocument = exports.HideRecordDocument = exports.ForgotPasswordDocument = exports.EmailToneDocument = exports.DisconnectNylasIntegrationDocument = exports.DeleteTaskDocument = exports.DeleteSegmentDocument = exports.DeleteNotificationDocument = exports.DeleteEmailTemplateDocument = exports.DeleteContactDocument = exports.DeleteCompanyNoteDocument = exports.DeleteCompanyDocument = exports.DeleteCampaignDocument = exports.DeleteCallCampaignDocument = exports.CreateTaskDocument = exports.CreateSegmentDocument = exports.CreateNotificationDocument = exports.CreateEmailTemplateDocument = exports.CreateContactDocument = exports.CreateCompanyNoteDocument = exports.CreateCompanyDocument = exports.CreateCampaignDocument = exports.CreateCallCampaignLogDocument = exports.CreateCallCampaignDocument = exports.CompleteCampaignDocument = exports.ClearAllNotificationsDocument = exports.ChangePasswordDocument = exports.CancelInvitationDocument = exports.CancelCampaignDocument = exports.AddSegmentToCampaignDocument = exports.AddSegmentToCallCampaignDocument = exports.AddContactsToSegmentDocument = exports.AddContactsToCampaignDocument = exports.AcceptInvitationDocument = exports.SortDirection = exports.RecentHistorySortField = exports.NotificationTypeEnum = exports.ContactSortField = exports.CompanySortField = exports.CompanyNoteSortField = exports.CallCampaignLogOutcomeEnum = exports.AppNotificationNotificationTypeChoices = exports.AppEmailTemplateCampaignTypeChoices = exports.AppBusinessProfileStateChoices = exports.AppAccountInvitationStatusChoices = void 0;
37
- exports.ContactsInSegmentDocument = exports.ContactsDocument = exports.ContactDocument = exports.CompanyNotesDocument = exports.CompanyNoteDocument = exports.CompanyDocument = exports.CompaniesDocument = exports.CampaignsDocument = exports.CampaignStatsDocument = exports.CampaignLogsDocument = exports.CampaignContactsDocument = exports.CampaignAnalyticsDocument = exports.CampaignDocument = exports.CallCampaignsDocument = exports.CallCampaignReportDocument = exports.CallCampaignLogsDocument = exports.CallCampaignLogDocument = exports.CallCampaignAnalyticsDocument = exports.CallCampaignDocument = exports.BusinessProfileDocument = exports.AccountMembersDocument = exports.ValidateOtpAndResetPasswordDocument = exports.UploadFileDocument = exports.UpdateUserProfileDocument = exports.UpdateTaskDocument = exports.UpdateSegmentDocument = exports.UpdateEmailTemplateDocument = exports.UpdateContactDocument = exports.UpdateCompanyNoteDocument = exports.UpdateCompanyDocument = exports.UpdateCampaignDocument = exports.UpdateCallCampaignLogDocument = exports.UpdateCallCampaignDocument = exports.UnsubscribeFromEmailsDocument = exports.UnhideRecordDocument = exports.SubmitFeedbackDocument = exports.StartCampaignDocument = exports.SignupDocument = exports.SendTestEmailDocument = exports.SendEmailToContactDocument = exports.ScheduleCampaignDocument = exports.SaveNylasConnectionDocument = exports.RemoveSegmentFromCampaignDocument = exports.RemoveSegmentFromCallCampaignDocument = exports.RemoveMemberDocument = exports.RemoveContactsFromSegmentDocument = exports.RemoveContactsFromCampaignDocument = exports.RejectInvitationDocument = exports.PreviewCampaignEmailDocument = exports.PauseCampaignDocument = void 0;
38
- exports.UserProfileDocument = exports.UsStatesDocument = exports.UnreadNotificationsCountDocument = exports.TasksDocument = exports.TaskDocument = exports.SegmentsDocument = exports.SegmentDocument = exports.SearchContactsDocument = exports.RecentNotificationsDocument = exports.RecentHistoryDocument = exports.ProductTypesDocument = exports.ProductCategoriesDocument = exports.PendingInvitationsDocument = exports.NylasConnectionDocument = exports.NotificationsDocument = exports.NotificationDocument = exports.MyInvitationsDocument = exports.MetalTypesDocument = exports.MetalGradesDocument = exports.IndustryTypesDocument = exports.IndustrySectorsDocument = exports.EmployeeSizesDocument = exports.EmailTemplatesDocument = exports.EmailTemplateDocument = exports.DashboardStatsDocument = exports.CurrentAccountDocument = void 0;
36
+ exports.InviteUserDocument = exports.HideRecordDocument = exports.ForgotPasswordDocument = exports.EmailToneDocument = exports.DisconnectNylasIntegrationDocument = exports.DeleteTaskDocument = exports.DeleteSegmentDocument = exports.DeleteNotificationDocument = exports.DeleteEmailTemplateDocument = exports.DeleteConversationDocument = exports.DeleteContactDocument = exports.DeleteCompanyNoteDocument = exports.DeleteCompanyDocument = exports.DeleteCampaignDocument = exports.DeleteCallCampaignDocument = exports.CreateTaskDocument = exports.CreateSegmentDocument = exports.CreateNotificationDocument = exports.CreateEmailTemplateDocument = exports.CreateContactDocument = exports.CreateCompanyNoteDocument = exports.CreateCompanyDocument = exports.CreateCampaignDocument = exports.CreateCallCampaignLogDocument = exports.CreateCallCampaignDocument = exports.CompleteCampaignDocument = exports.ClearAllNotificationsDocument = exports.ChangePasswordDocument = exports.CancelInvitationDocument = exports.CancelCampaignDocument = exports.AiAgentExecuteDocument = exports.AiAgentContinueDocument = exports.AiAgentChatDocument = exports.AddSegmentToCampaignDocument = exports.AddSegmentToCallCampaignDocument = exports.AddContactsToSegmentDocument = exports.AddContactsToCampaignDocument = exports.AcceptInvitationDocument = exports.SortDirection = exports.RecentHistorySortField = exports.NotificationTypeEnum = exports.ContactSortField = exports.CompanySortField = exports.CompanyNoteSortField = exports.CallCampaignLogOutcomeEnum = exports.AppNotificationNotificationTypeChoices = exports.AppEmailTemplateCampaignTypeChoices = exports.AppBusinessProfileStateChoices = exports.AppAccountInvitationStatusChoices = exports.AgentConversationMessageRoleChoices = void 0;
37
+ exports.CompanyDocument = exports.CompaniesDocument = exports.CampaignsDocument = exports.CampaignStatsDocument = exports.CampaignLogsDocument = exports.CampaignContactsDocument = exports.CampaignAnalyticsDocument = exports.CampaignDocument = exports.CallCampaignsDocument = exports.CallCampaignReportDocument = exports.CallCampaignLogsDocument = exports.CallCampaignLogDocument = exports.CallCampaignAnalyticsDocument = exports.CallCampaignDocument = exports.BusinessProfileDocument = exports.AccountMembersDocument = exports.ValidateOtpAndResetPasswordDocument = exports.UploadFileDocument = exports.UpdateUserProfileDocument = exports.UpdateTaskDocument = exports.UpdateSegmentDocument = exports.UpdateEmailTemplateDocument = exports.UpdateContactDocument = exports.UpdateCompanyNoteDocument = exports.UpdateCompanyDocument = exports.UpdateCampaignDocument = exports.UpdateCallCampaignLogDocument = exports.UpdateCallCampaignDocument = exports.UnsubscribeFromEmailsDocument = exports.UnhideRecordDocument = exports.SubmitFeedbackDocument = exports.StartCampaignDocument = exports.SignupDocument = exports.SendTestEmailDocument = exports.SendEmailToContactDocument = exports.ScheduleCampaignDocument = exports.SaveNylasConnectionDocument = exports.RemoveSegmentFromCampaignDocument = exports.RemoveSegmentFromCallCampaignDocument = exports.RemoveMemberDocument = exports.RemoveContactsFromSegmentDocument = exports.RemoveContactsFromCampaignDocument = exports.RejectInvitationDocument = exports.PreviewCampaignEmailDocument = exports.PauseCampaignDocument = exports.MarkNotificationAsReadDocument = exports.MarkAllNotificationsAsReadDocument = exports.LoginWithMicrosoftDocument = exports.LoginWithGoogleDocument = exports.LoginDocument = void 0;
38
+ exports.UserProfileDocument = exports.UsStatesDocument = exports.UnreadNotificationsCountDocument = exports.TasksDocument = exports.TaskDocument = exports.SegmentsDocument = exports.SegmentDocument = exports.SearchContactsDocument = exports.RecentNotificationsDocument = exports.RecentHistoryDocument = exports.ProductTypesDocument = exports.ProductCategoriesDocument = exports.PendingInvitationsDocument = exports.NylasConnectionDocument = exports.NotificationsDocument = exports.NotificationDocument = exports.MyInvitationsDocument = exports.MetalTypesDocument = exports.MetalGradesDocument = exports.IndustryTypesDocument = exports.IndustrySectorsDocument = exports.EmployeeSizesDocument = exports.EmailTemplatesDocument = exports.EmailTemplateDocument = exports.DashboardStatsDocument = exports.CurrentAccountDocument = exports.ConversationHistoryDocument = exports.ConversationDocument = exports.ContactsInSegmentDocument = exports.ContactsDocument = exports.ContactDocument = exports.CompanyNotesDocument = exports.CompanyNoteDocument = void 0;
39
39
  exports.useAcceptInvitationMutation = useAcceptInvitationMutation;
40
40
  exports.useAddContactsToCampaignMutation = useAddContactsToCampaignMutation;
41
41
  exports.useAddContactsToSegmentMutation = useAddContactsToSegmentMutation;
42
42
  exports.useAddSegmentToCallCampaignMutation = useAddSegmentToCallCampaignMutation;
43
43
  exports.useAddSegmentToCampaignMutation = useAddSegmentToCampaignMutation;
44
+ exports.useAiAgentChatMutation = useAiAgentChatMutation;
45
+ exports.useAiAgentContinueMutation = useAiAgentContinueMutation;
46
+ exports.useAiAgentExecuteMutation = useAiAgentExecuteMutation;
44
47
  exports.useCancelCampaignMutation = useCancelCampaignMutation;
45
48
  exports.useCancelInvitationMutation = useCancelInvitationMutation;
46
49
  exports.useChangePasswordMutation = useChangePasswordMutation;
@@ -61,6 +64,7 @@ exports.useDeleteCampaignMutation = useDeleteCampaignMutation;
61
64
  exports.useDeleteCompanyMutation = useDeleteCompanyMutation;
62
65
  exports.useDeleteCompanyNoteMutation = useDeleteCompanyNoteMutation;
63
66
  exports.useDeleteContactMutation = useDeleteContactMutation;
67
+ exports.useDeleteConversationMutation = useDeleteConversationMutation;
64
68
  exports.useDeleteEmailTemplateMutation = useDeleteEmailTemplateMutation;
65
69
  exports.useDeleteNotificationMutation = useDeleteNotificationMutation;
66
70
  exports.useDeleteSegmentMutation = useDeleteSegmentMutation;
@@ -167,6 +171,12 @@ exports.useContactsSuspenseQuery = useContactsSuspenseQuery;
167
171
  exports.useContactsInSegmentQuery = useContactsInSegmentQuery;
168
172
  exports.useContactsInSegmentLazyQuery = useContactsInSegmentLazyQuery;
169
173
  exports.useContactsInSegmentSuspenseQuery = useContactsInSegmentSuspenseQuery;
174
+ exports.useConversationQuery = useConversationQuery;
175
+ exports.useConversationLazyQuery = useConversationLazyQuery;
176
+ exports.useConversationSuspenseQuery = useConversationSuspenseQuery;
177
+ exports.useConversationHistoryQuery = useConversationHistoryQuery;
178
+ exports.useConversationHistoryLazyQuery = useConversationHistoryLazyQuery;
179
+ exports.useConversationHistorySuspenseQuery = useConversationHistorySuspenseQuery;
170
180
  exports.useCurrentAccountQuery = useCurrentAccountQuery;
171
181
  exports.useCurrentAccountLazyQuery = useCurrentAccountLazyQuery;
172
182
  exports.useCurrentAccountSuspenseQuery = useCurrentAccountSuspenseQuery;
@@ -249,6 +259,16 @@ const client_1 = require("@apollo/client");
249
259
  const Apollo = __importStar(require("@apollo/client"));
250
260
  const defaultOptions = {};
251
261
  /** An enumeration. */
262
+ var AgentConversationMessageRoleChoices;
263
+ (function (AgentConversationMessageRoleChoices) {
264
+ /** Assistant */
265
+ AgentConversationMessageRoleChoices["Assistant"] = "ASSISTANT";
266
+ /** System */
267
+ AgentConversationMessageRoleChoices["System"] = "SYSTEM";
268
+ /** User */
269
+ AgentConversationMessageRoleChoices["User"] = "USER";
270
+ })(AgentConversationMessageRoleChoices || (exports.AgentConversationMessageRoleChoices = AgentConversationMessageRoleChoices = {}));
271
+ /** An enumeration. */
252
272
  var AppAccountInvitationStatusChoices;
253
273
  (function (AppAccountInvitationStatusChoices) {
254
274
  /** Accepted */
@@ -809,6 +829,139 @@ function useAddSegmentToCampaignMutation(baseOptions) {
809
829
  const options = { ...defaultOptions, ...baseOptions };
810
830
  return Apollo.useMutation(exports.AddSegmentToCampaignDocument, options);
811
831
  }
832
+ exports.AiAgentChatDocument = (0, client_1.gql) `
833
+ mutation AiAgentChat($conversationId: String, $enableTools: Boolean, $message: String!) {
834
+ aiAgentChat(
835
+ conversationId: $conversationId
836
+ enableTools: $enableTools
837
+ message: $message
838
+ ) {
839
+ success
840
+ conversationId
841
+ response
842
+ toolCalls {
843
+ type
844
+ id
845
+ name
846
+ input
847
+ }
848
+ toolResults {
849
+ toolUseId
850
+ type
851
+ success
852
+ result
853
+ error
854
+ }
855
+ requiresExecution
856
+ error
857
+ }
858
+ }
859
+ `;
860
+ /**
861
+ * __useAiAgentChatMutation__
862
+ *
863
+ * To run a mutation, you first call `useAiAgentChatMutation` within a React component and pass it any options that fit your needs.
864
+ * When your component renders, `useAiAgentChatMutation` returns a tuple that includes:
865
+ * - A mutate function that you can call at any time to execute the mutation
866
+ * - An object with fields that represent the current status of the mutation's execution
867
+ *
868
+ * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
869
+ *
870
+ * @example
871
+ * const [aiAgentChatMutation, { data, loading, error }] = useAiAgentChatMutation({
872
+ * variables: {
873
+ * conversationId: // value for 'conversationId'
874
+ * enableTools: // value for 'enableTools'
875
+ * message: // value for 'message'
876
+ * },
877
+ * });
878
+ */
879
+ function useAiAgentChatMutation(baseOptions) {
880
+ const options = { ...defaultOptions, ...baseOptions };
881
+ return Apollo.useMutation(exports.AiAgentChatDocument, options);
882
+ }
883
+ exports.AiAgentContinueDocument = (0, client_1.gql) `
884
+ mutation AiAgentContinue($conversationId: String!, $toolResults: [JSONString]!) {
885
+ aiAgentContinue(conversationId: $conversationId, toolResults: $toolResults) {
886
+ success
887
+ response
888
+ toolCalls {
889
+ type
890
+ id
891
+ name
892
+ input
893
+ }
894
+ toolResults {
895
+ toolUseId
896
+ type
897
+ success
898
+ result
899
+ error
900
+ }
901
+ requiresExecution
902
+ error
903
+ }
904
+ }
905
+ `;
906
+ /**
907
+ * __useAiAgentContinueMutation__
908
+ *
909
+ * To run a mutation, you first call `useAiAgentContinueMutation` within a React component and pass it any options that fit your needs.
910
+ * When your component renders, `useAiAgentContinueMutation` returns a tuple that includes:
911
+ * - A mutate function that you can call at any time to execute the mutation
912
+ * - An object with fields that represent the current status of the mutation's execution
913
+ *
914
+ * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
915
+ *
916
+ * @example
917
+ * const [aiAgentContinueMutation, { data, loading, error }] = useAiAgentContinueMutation({
918
+ * variables: {
919
+ * conversationId: // value for 'conversationId'
920
+ * toolResults: // value for 'toolResults'
921
+ * },
922
+ * });
923
+ */
924
+ function useAiAgentContinueMutation(baseOptions) {
925
+ const options = { ...defaultOptions, ...baseOptions };
926
+ return Apollo.useMutation(exports.AiAgentContinueDocument, options);
927
+ }
928
+ exports.AiAgentExecuteDocument = (0, client_1.gql) `
929
+ mutation AiAgentExecute($conversationId: String!, $toolCalls: [JSONString]!) {
930
+ aiAgentExecute(conversationId: $conversationId, toolCalls: $toolCalls) {
931
+ success
932
+ results {
933
+ toolUseId
934
+ type
935
+ success
936
+ result
937
+ error
938
+ }
939
+ error
940
+ }
941
+ }
942
+ `;
943
+ /**
944
+ * __useAiAgentExecuteMutation__
945
+ *
946
+ * To run a mutation, you first call `useAiAgentExecuteMutation` within a React component and pass it any options that fit your needs.
947
+ * When your component renders, `useAiAgentExecuteMutation` returns a tuple that includes:
948
+ * - A mutate function that you can call at any time to execute the mutation
949
+ * - An object with fields that represent the current status of the mutation's execution
950
+ *
951
+ * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
952
+ *
953
+ * @example
954
+ * const [aiAgentExecuteMutation, { data, loading, error }] = useAiAgentExecuteMutation({
955
+ * variables: {
956
+ * conversationId: // value for 'conversationId'
957
+ * toolCalls: // value for 'toolCalls'
958
+ * },
959
+ * });
960
+ */
961
+ function useAiAgentExecuteMutation(baseOptions) {
962
+ const options = { ...defaultOptions, ...baseOptions };
963
+ return Apollo.useMutation(exports.AiAgentExecuteDocument, options);
964
+ }
812
965
  exports.CancelCampaignDocument = (0, client_1.gql) `
813
966
  mutation CancelCampaign($id: ID!) {
814
967
  cancelCampaign(id: $id) {
@@ -2852,6 +3005,35 @@ function useDeleteContactMutation(baseOptions) {
2852
3005
  const options = { ...defaultOptions, ...baseOptions };
2853
3006
  return Apollo.useMutation(exports.DeleteContactDocument, options);
2854
3007
  }
3008
+ exports.DeleteConversationDocument = (0, client_1.gql) `
3009
+ mutation DeleteConversation($conversationId: String!) {
3010
+ deleteConversation(conversationId: $conversationId) {
3011
+ success
3012
+ message
3013
+ }
3014
+ }
3015
+ `;
3016
+ /**
3017
+ * __useDeleteConversationMutation__
3018
+ *
3019
+ * To run a mutation, you first call `useDeleteConversationMutation` within a React component and pass it any options that fit your needs.
3020
+ * When your component renders, `useDeleteConversationMutation` returns a tuple that includes:
3021
+ * - A mutate function that you can call at any time to execute the mutation
3022
+ * - An object with fields that represent the current status of the mutation's execution
3023
+ *
3024
+ * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
3025
+ *
3026
+ * @example
3027
+ * const [deleteConversationMutation, { data, loading, error }] = useDeleteConversationMutation({
3028
+ * variables: {
3029
+ * conversationId: // value for 'conversationId'
3030
+ * },
3031
+ * });
3032
+ */
3033
+ function useDeleteConversationMutation(baseOptions) {
3034
+ const options = { ...defaultOptions, ...baseOptions };
3035
+ return Apollo.useMutation(exports.DeleteConversationDocument, options);
3036
+ }
2855
3037
  exports.DeleteEmailTemplateDocument = (0, client_1.gql) `
2856
3038
  mutation DeleteEmailTemplate($uuid: UUID!) {
2857
3039
  deleteEmailTemplate(uuid: $uuid) {
@@ -9628,6 +9810,114 @@ function useContactsInSegmentSuspenseQuery(baseOptions) {
9628
9810
  const options = baseOptions === Apollo.skipToken ? baseOptions : { ...defaultOptions, ...baseOptions };
9629
9811
  return Apollo.useSuspenseQuery(exports.ContactsInSegmentDocument, options);
9630
9812
  }
9813
+ exports.ConversationDocument = (0, client_1.gql) `
9814
+ query Conversation($conversationId: String!) {
9815
+ conversation(conversationId: $conversationId) {
9816
+ id
9817
+ user {
9818
+ id
9819
+ email
9820
+ firstName
9821
+ lastName
9822
+ picture
9823
+ }
9824
+ createdAt
9825
+ updatedAt
9826
+ messages {
9827
+ id
9828
+ role
9829
+ content
9830
+ toolCalls
9831
+ toolResults
9832
+ createdAt
9833
+ }
9834
+ }
9835
+ }
9836
+ `;
9837
+ /**
9838
+ * __useConversationQuery__
9839
+ *
9840
+ * To run a query within a React component, call `useConversationQuery` and pass it any options that fit your needs.
9841
+ * When your component renders, `useConversationQuery` returns an object from Apollo Client that contains loading, error, and data properties
9842
+ * you can use to render your UI.
9843
+ *
9844
+ * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
9845
+ *
9846
+ * @example
9847
+ * const { data, loading, error } = useConversationQuery({
9848
+ * variables: {
9849
+ * conversationId: // value for 'conversationId'
9850
+ * },
9851
+ * });
9852
+ */
9853
+ function useConversationQuery(baseOptions) {
9854
+ const options = { ...defaultOptions, ...baseOptions };
9855
+ return Apollo.useQuery(exports.ConversationDocument, options);
9856
+ }
9857
+ function useConversationLazyQuery(baseOptions) {
9858
+ const options = { ...defaultOptions, ...baseOptions };
9859
+ return Apollo.useLazyQuery(exports.ConversationDocument, options);
9860
+ }
9861
+ function useConversationSuspenseQuery(baseOptions) {
9862
+ const options = baseOptions === Apollo.skipToken ? baseOptions : { ...defaultOptions, ...baseOptions };
9863
+ return Apollo.useSuspenseQuery(exports.ConversationDocument, options);
9864
+ }
9865
+ exports.ConversationHistoryDocument = (0, client_1.gql) `
9866
+ query ConversationHistory($limit: Int, $offset: Int) {
9867
+ conversationHistory(limit: $limit, offset: $offset) {
9868
+ conversations {
9869
+ id
9870
+ user {
9871
+ id
9872
+ email
9873
+ firstName
9874
+ lastName
9875
+ picture
9876
+ }
9877
+ createdAt
9878
+ updatedAt
9879
+ messages {
9880
+ id
9881
+ role
9882
+ content
9883
+ toolCalls
9884
+ toolResults
9885
+ createdAt
9886
+ }
9887
+ }
9888
+ totalCount
9889
+ }
9890
+ }
9891
+ `;
9892
+ /**
9893
+ * __useConversationHistoryQuery__
9894
+ *
9895
+ * To run a query within a React component, call `useConversationHistoryQuery` and pass it any options that fit your needs.
9896
+ * When your component renders, `useConversationHistoryQuery` returns an object from Apollo Client that contains loading, error, and data properties
9897
+ * you can use to render your UI.
9898
+ *
9899
+ * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
9900
+ *
9901
+ * @example
9902
+ * const { data, loading, error } = useConversationHistoryQuery({
9903
+ * variables: {
9904
+ * limit: // value for 'limit'
9905
+ * offset: // value for 'offset'
9906
+ * },
9907
+ * });
9908
+ */
9909
+ function useConversationHistoryQuery(baseOptions) {
9910
+ const options = { ...defaultOptions, ...baseOptions };
9911
+ return Apollo.useQuery(exports.ConversationHistoryDocument, options);
9912
+ }
9913
+ function useConversationHistoryLazyQuery(baseOptions) {
9914
+ const options = { ...defaultOptions, ...baseOptions };
9915
+ return Apollo.useLazyQuery(exports.ConversationHistoryDocument, options);
9916
+ }
9917
+ function useConversationHistorySuspenseQuery(baseOptions) {
9918
+ const options = baseOptions === Apollo.skipToken ? baseOptions : { ...defaultOptions, ...baseOptions };
9919
+ return Apollo.useSuspenseQuery(exports.ConversationHistoryDocument, options);
9920
+ }
9631
9921
  exports.CurrentAccountDocument = (0, client_1.gql) `
9632
9922
  query CurrentAccount {
9633
9923
  currentAccount {
@@ -66,3 +66,7 @@ export declare const UPDATE_COMPANY_NOTE: import("@apollo/client").DocumentNode;
66
66
  export declare const DELETE_COMPANY_NOTE: import("@apollo/client").DocumentNode;
67
67
  export declare const HIDE_RECORD: import("@apollo/client").DocumentNode;
68
68
  export declare const UNHIDE_RECORD: import("@apollo/client").DocumentNode;
69
+ export declare const AI_AGENT_CHAT: import("@apollo/client").DocumentNode;
70
+ export declare const AI_AGENT_EXECUTE: import("@apollo/client").DocumentNode;
71
+ export declare const AI_AGENT_CONTINUE: import("@apollo/client").DocumentNode;
72
+ export declare const DELETE_CONVERSATION: import("@apollo/client").DocumentNode;
package/dist/mutations.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.MARK_NOTIFICATION_AS_READ = exports.CREATE_NOTIFICATION = exports.DISCONNECT_NYLAS_INTEGRATION = exports.SAVE_NYLAS_CONNECTION = exports.EMAIL_TONE = exports.DELETE_EMAIL_TEMPLATE = exports.UPDATE_EMAIL_TEMPLATE = exports.CREATE_EMAIL_TEMPLATE = exports.PREVIEW_CAMPAIGN_EMAIL = exports.SCHEDULE_CAMPAIGN = exports.SEND_EMAIL_TO_CONTACT = exports.SEND_TEST_EMAIL = exports.CANCEL_CAMPAIGN = exports.COMPLETE_CAMPAIGN = exports.PAUSE_CAMPAIGN = exports.START_CAMPAIGN = exports.REMOVE_SEGMENT_FROM_CAMPAIGN = exports.ADD_SEGMENT_TO_CAMPAIGN = exports.DELETE_CAMPAIGN = exports.UPDATE_CAMPAIGN = exports.CREATE_CAMPAIGN = exports.REMOVE_CONTACTS_FROM_CAMPAIGN = exports.ADD_CONTACTS_TO_CAMPAIGN = exports.REMOVE_CONTACTS_FROM_SEGMENT = exports.ADD_CONTACTS_TO_SEGMENT = exports.DELETE_SEGMENT = exports.UPDATE_SEGMENT = exports.CREATE_SEGMENT = exports.DELETE_COMPANY = exports.UPDATE_COMPANY = exports.CREATE_COMPANY = exports.DELETE_CONTACT = exports.UPDATE_CONTACT = exports.CREATE_CONTACT = exports.SUBMIT_FEEDBACK = exports.LOGIN_WITH_MICROSOFT = exports.LOGIN_WITH_GOOGLE = exports.UNSUBSCRIBE_FROM_EMAILS = exports.VALIDATE_OTP_AND_RESET_PASSWORD = exports.CHANGE_PASSWORD = exports.UPDATE_USER_PROFILE = exports.LOGIN = exports.CANCEL_INVITATION = exports.REMOVE_MEMBER = exports.REJECT_INVITATION = exports.ACCEPT_INVITATION = exports.INVITE_USER = exports.UPLOAD_FILE = exports.FORGOT_PASSWORD = exports.SIGNUP = void 0;
4
- exports.UNHIDE_RECORD = exports.HIDE_RECORD = exports.DELETE_COMPANY_NOTE = exports.UPDATE_COMPANY_NOTE = exports.CREATE_COMPANY_NOTE = exports.UPDATE_CALL_CAMPAIGN_LOG = exports.CREATE_CALL_CAMPAIGN_LOG = exports.REMOVE_SEGMENT_FROM_CALL_CAMPAIGN = exports.ADD_SEGMENT_TO_CALL_CAMPAIGN = exports.DELETE_CALL_CAMPAIGN = exports.UPDATE_CALL_CAMPAIGN = exports.CREATE_CALL_CAMPAIGN = exports.DELETE_TASK = exports.UPDATE_TASK = exports.CREATE_TASK = exports.CLEAR_ALL_NOTIFICATIONS = exports.DELETE_NOTIFICATION = exports.MARK_ALL_NOTIFICATIONS_AS_READ = void 0;
4
+ exports.DELETE_CONVERSATION = exports.AI_AGENT_CONTINUE = exports.AI_AGENT_EXECUTE = exports.AI_AGENT_CHAT = exports.UNHIDE_RECORD = exports.HIDE_RECORD = exports.DELETE_COMPANY_NOTE = exports.UPDATE_COMPANY_NOTE = exports.CREATE_COMPANY_NOTE = exports.UPDATE_CALL_CAMPAIGN_LOG = exports.CREATE_CALL_CAMPAIGN_LOG = exports.REMOVE_SEGMENT_FROM_CALL_CAMPAIGN = exports.ADD_SEGMENT_TO_CALL_CAMPAIGN = exports.DELETE_CALL_CAMPAIGN = exports.UPDATE_CALL_CAMPAIGN = exports.CREATE_CALL_CAMPAIGN = exports.DELETE_TASK = exports.UPDATE_TASK = exports.CREATE_TASK = exports.CLEAR_ALL_NOTIFICATIONS = exports.DELETE_NOTIFICATION = exports.MARK_ALL_NOTIFICATIONS_AS_READ = void 0;
5
5
  const client_1 = require("@apollo/client");
6
6
  exports.SIGNUP = (0, client_1.gql) `
7
7
  mutation Signup($input: SignupInput!) {
@@ -4033,3 +4033,69 @@ mutation UnhideRecord($input: HiddenRecordInput!) {
4033
4033
  message
4034
4034
  }
4035
4035
  }`;
4036
+ exports.AI_AGENT_CHAT = (0, client_1.gql) `
4037
+ mutation AiAgentChat($conversationId: String, $enableTools: Boolean, $message: String!) {
4038
+ aiAgentChat(conversationId: $conversationId, enableTools: $enableTools, message: $message) {
4039
+ success
4040
+ conversationId
4041
+ response
4042
+ toolCalls {
4043
+ type
4044
+ id
4045
+ name
4046
+ input
4047
+ }
4048
+ toolResults {
4049
+ toolUseId
4050
+ type
4051
+ success
4052
+ result
4053
+ error
4054
+ }
4055
+ requiresExecution
4056
+ error
4057
+ }
4058
+ }`;
4059
+ exports.AI_AGENT_EXECUTE = (0, client_1.gql) `
4060
+ mutation AiAgentExecute($conversationId: String!, $toolCalls: [JSONString]!) {
4061
+ aiAgentExecute(conversationId: $conversationId, toolCalls: $toolCalls) {
4062
+ success
4063
+ results {
4064
+ toolUseId
4065
+ type
4066
+ success
4067
+ result
4068
+ error
4069
+ }
4070
+ error
4071
+ }
4072
+ }`;
4073
+ exports.AI_AGENT_CONTINUE = (0, client_1.gql) `
4074
+ mutation AiAgentContinue($conversationId: String!, $toolResults: [JSONString]!) {
4075
+ aiAgentContinue(conversationId: $conversationId, toolResults: $toolResults) {
4076
+ success
4077
+ response
4078
+ toolCalls {
4079
+ type
4080
+ id
4081
+ name
4082
+ input
4083
+ }
4084
+ toolResults {
4085
+ toolUseId
4086
+ type
4087
+ success
4088
+ result
4089
+ error
4090
+ }
4091
+ requiresExecution
4092
+ error
4093
+ }
4094
+ }`;
4095
+ exports.DELETE_CONVERSATION = (0, client_1.gql) `
4096
+ mutation DeleteConversation($conversationId: String!) {
4097
+ deleteConversation(conversationId: $conversationId) {
4098
+ success
4099
+ message
4100
+ }
4101
+ }`;
package/dist/queries.d.ts CHANGED
@@ -1,3 +1,5 @@
1
+ export declare const CONVERSATION_HISTORY: import("@apollo/client").DocumentNode;
2
+ export declare const CONVERSATION: import("@apollo/client").DocumentNode;
1
3
  export declare const DASHBOARD_STATS: import("@apollo/client").DocumentNode;
2
4
  export declare const RECENT_HISTORY: import("@apollo/client").DocumentNode;
3
5
  export declare const COMPANY_NOTES: import("@apollo/client").DocumentNode;
package/dist/queries.js CHANGED
@@ -1,7 +1,56 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.USER_PROFILE = exports.MY_INVITATIONS = exports.BUSINESS_PROFILE = exports.PENDING_INVITATIONS = exports.ACCOUNT_MEMBERS = exports.CURRENT_ACCOUNT = exports.EMPLOYEE_SIZES = exports.US_STATES = exports.METAL_GRADES = exports.METAL_TYPES = exports.PRODUCT_CATEGORIES = exports.PRODUCT_TYPES = exports.INDUSTRY_SECTORS = exports.INDUSTRY_TYPES = exports.CONTACT = exports.COMPANY = exports.SEARCH_CONTACTS = exports.CONTACTS = exports.COMPANIES = exports.CONTACTS_IN_SEGMENT = exports.SEGMENT = exports.SEGMENTS = exports.CAMPAIGN_CONTACTS = exports.CAMPAIGN_LOGS = exports.CAMPAIGN_ANALYTICS = exports.CAMPAIGN_STATS = exports.CAMPAIGN = exports.CAMPAIGNS = exports.EMAIL_TEMPLATES = exports.EMAIL_TEMPLATE = exports.NYLAS_CONNECTION = exports.RECENT_NOTIFICATIONS = exports.NOTIFICATION = exports.NOTIFICATIONS = exports.UNREAD_NOTIFICATIONS_COUNT = exports.TASK = exports.TASKS = exports.CALL_CAMPAIGN_REPORT = exports.CALL_CAMPAIGN_LOG = exports.CALL_CAMPAIGN_LOGS = exports.CALL_CAMPAIGN_ANALYTICS = exports.CALL_CAMPAIGN = exports.CALL_CAMPAIGNS = exports.COMPANY_NOTE = exports.COMPANY_NOTES = exports.RECENT_HISTORY = exports.DASHBOARD_STATS = void 0;
3
+ exports.USER_PROFILE = exports.MY_INVITATIONS = exports.BUSINESS_PROFILE = exports.PENDING_INVITATIONS = exports.ACCOUNT_MEMBERS = exports.CURRENT_ACCOUNT = exports.EMPLOYEE_SIZES = exports.US_STATES = exports.METAL_GRADES = exports.METAL_TYPES = exports.PRODUCT_CATEGORIES = exports.PRODUCT_TYPES = exports.INDUSTRY_SECTORS = exports.INDUSTRY_TYPES = exports.CONTACT = exports.COMPANY = exports.SEARCH_CONTACTS = exports.CONTACTS = exports.COMPANIES = exports.CONTACTS_IN_SEGMENT = exports.SEGMENT = exports.SEGMENTS = exports.CAMPAIGN_CONTACTS = exports.CAMPAIGN_LOGS = exports.CAMPAIGN_ANALYTICS = exports.CAMPAIGN_STATS = exports.CAMPAIGN = exports.CAMPAIGNS = exports.EMAIL_TEMPLATES = exports.EMAIL_TEMPLATE = exports.NYLAS_CONNECTION = exports.RECENT_NOTIFICATIONS = exports.NOTIFICATION = exports.NOTIFICATIONS = exports.UNREAD_NOTIFICATIONS_COUNT = exports.TASK = exports.TASKS = exports.CALL_CAMPAIGN_REPORT = exports.CALL_CAMPAIGN_LOG = exports.CALL_CAMPAIGN_LOGS = exports.CALL_CAMPAIGN_ANALYTICS = exports.CALL_CAMPAIGN = exports.CALL_CAMPAIGNS = exports.COMPANY_NOTE = exports.COMPANY_NOTES = exports.RECENT_HISTORY = exports.DASHBOARD_STATS = exports.CONVERSATION = exports.CONVERSATION_HISTORY = void 0;
4
4
  const client_1 = require("@apollo/client");
5
+ exports.CONVERSATION_HISTORY = (0, client_1.gql) `
6
+ query ConversationHistory($limit: Int, $offset: Int) {
7
+ conversationHistory(limit: $limit, offset: $offset) {
8
+ conversations {
9
+ id
10
+ user {
11
+ id
12
+ email
13
+ firstName
14
+ lastName
15
+ picture
16
+ }
17
+ createdAt
18
+ updatedAt
19
+ messages {
20
+ id
21
+ role
22
+ content
23
+ toolCalls
24
+ toolResults
25
+ createdAt
26
+ }
27
+ }
28
+ totalCount
29
+ }
30
+ }`;
31
+ exports.CONVERSATION = (0, client_1.gql) `
32
+ query Conversation($conversationId: String!) {
33
+ conversation(conversationId: $conversationId) {
34
+ id
35
+ user {
36
+ id
37
+ email
38
+ firstName
39
+ lastName
40
+ picture
41
+ }
42
+ createdAt
43
+ updatedAt
44
+ messages {
45
+ id
46
+ role
47
+ content
48
+ toolCalls
49
+ toolResults
50
+ createdAt
51
+ }
52
+ }
53
+ }`;
5
54
  exports.DASHBOARD_STATS = (0, client_1.gql) `
6
55
  query DashboardStats($startDate: DateTime, $endDate: DateTime) {
7
56
  dashboardStats(startDate: $startDate, endDate: $endDate) {
package/dist/sdk.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { CloudForgeClientOptions } from "./client";
2
- import { CallReportFilterInput, CompanyFilterInput, CompanyNoteFilterInput, CompanyNoteInput, CompanyNoteSortInput, CompanySortInput, ContactFilterInput, ContactSortInput, CreateCallCampaignLogMutationVariables, CreateCallCampaignMutationVariables, CreateCampaignMutationVariables, CreateCompanyMutationVariables, CreateContactMutationVariables, CreateEmailTemplateMutationVariables, CreateNotificationMutationVariables, CreateSegmentMutationVariables, CreateTaskMutationVariables, CustomContactInput, EmailToneInput, FileUploadInput, HiddenRecordInput, InvitationResponseInput, InviteUserInput, MicrosoftUserInput, PaginationInput, RecentHistoryFilterInput, RecentHistorySortInput, SaveNylasConnectionMutationVariables, SegmentFilterInput, SignupInput, SubmitFeedbackMutationVariables, TaskFilterInput, UpdateCallCampaignLogMutationVariables, UpdateCallCampaignMutationVariables, UpdateCampaignMutationVariables, UpdateCompanyMutationVariables, UpdateContactMutationVariables, UpdateEmailTemplateMutationVariables, UpdateSegmentMutationVariables, UpdateTaskMutationVariables, UpdateUserProfileMutationVariables, UserTypeInput } from "./generated/graphql";
2
+ import { CallReportFilterInput, CompanyFilterInput, CompanyNoteFilterInput, CompanyNoteInput, CompanyNoteSortInput, CompanySortInput, ContactFilterInput, ContactSortInput, CreateCallCampaignLogMutationVariables, CreateCallCampaignMutationVariables, CreateCampaignMutationVariables, CreateCompanyMutationVariables, CreateContactMutationVariables, CreateEmailTemplateMutationVariables, CreateNotificationMutationVariables, CreateSegmentMutationVariables, CreateTaskMutationVariables, CustomContactInput, EmailToneInput, FileUploadInput, HiddenRecordInput, InvitationResponseInput, InviteUserInput, MicrosoftUserInput, PaginationInput, RecentHistoryFilterInput, RecentHistorySortInput, SaveNylasConnectionMutationVariables, Scalars, SegmentFilterInput, SignupInput, SubmitFeedbackMutationVariables, TaskFilterInput, UpdateCallCampaignLogMutationVariables, UpdateCallCampaignMutationVariables, UpdateCampaignMutationVariables, UpdateCompanyMutationVariables, UpdateContactMutationVariables, UpdateEmailTemplateMutationVariables, UpdateSegmentMutationVariables, UpdateTaskMutationVariables, UpdateUserProfileMutationVariables, UserTypeInput } from "./generated/graphql";
3
3
  export declare class CloudForgeSDK {
4
4
  private client;
5
5
  private apolloClient;
@@ -13,6 +13,9 @@ export declare class CloudForgeSDK {
13
13
  addContactsToSegment(contactIds: string[], segmentId: string): Promise<import("@apollo/client").FetchResult<any>>;
14
14
  addSegmentToCallCampaign(campaignId: string, segmentId: string): Promise<import("@apollo/client").FetchResult<any>>;
15
15
  addSegmentToCampaign(campaignId: string, segmentId: string): Promise<import("@apollo/client").FetchResult<any>>;
16
+ aiAgentChat(message: string, conversationId?: string, enableTools?: boolean): Promise<import("@apollo/client").FetchResult<any>>;
17
+ aiAgentContinue(conversationId: string, toolResults: Scalars['JSONString']['input'][]): Promise<import("@apollo/client").FetchResult<any>>;
18
+ aiAgentExecute(conversationId: string, toolCalls: Scalars['JSONString']['input'][]): Promise<import("@apollo/client").FetchResult<any>>;
16
19
  cancelCampaign(id: string): Promise<import("@apollo/client").FetchResult<any>>;
17
20
  cancelInvitation(invitationId: string): Promise<import("@apollo/client").FetchResult<any>>;
18
21
  changePassword(newPassword: string): Promise<import("@apollo/client").FetchResult<any>>;
@@ -33,6 +36,7 @@ export declare class CloudForgeSDK {
33
36
  deleteCompany(id?: string): Promise<import("@apollo/client").FetchResult<any>>;
34
37
  deleteCompanyNote(id: string): Promise<import("@apollo/client").FetchResult<any>>;
35
38
  deleteContact(id?: string): Promise<import("@apollo/client").FetchResult<any>>;
39
+ deleteConversation(conversationId: string): Promise<import("@apollo/client").FetchResult<any>>;
36
40
  deleteEmailTemplate(uuid: string): Promise<import("@apollo/client").FetchResult<any>>;
37
41
  deleteNotification(notificationId: string): Promise<import("@apollo/client").FetchResult<any>>;
38
42
  deleteSegment(id: string): Promise<import("@apollo/client").FetchResult<any>>;
@@ -97,6 +101,8 @@ export declare class CloudForgeSDK {
97
101
  contact(id?: string): Promise<import("@apollo/client").ApolloQueryResult<any>>;
98
102
  contacts(): Promise<import("@apollo/client").ApolloQueryResult<any>>;
99
103
  contactsInSegment(segmentId: string, pagination?: PaginationInput): Promise<import("@apollo/client").ApolloQueryResult<any>>;
104
+ conversation(conversationId: string): Promise<import("@apollo/client").ApolloQueryResult<any>>;
105
+ conversationHistory(limit?: number, offset?: number): Promise<import("@apollo/client").ApolloQueryResult<any>>;
100
106
  currentAccount(): Promise<import("@apollo/client").ApolloQueryResult<any>>;
101
107
  dashboardStats(startDate?: string, endDate?: string): Promise<import("@apollo/client").ApolloQueryResult<any>>;
102
108
  emailTemplate(uuid: string): Promise<import("@apollo/client").ApolloQueryResult<any>>;
package/dist/sdk.js CHANGED
@@ -63,6 +63,24 @@ class CloudForgeSDK {
63
63
  variables: { campaignId, segmentId }
64
64
  });
65
65
  }
66
+ async aiAgentChat(message, conversationId, enableTools) {
67
+ return this.apolloClient.mutate({
68
+ mutation: mutations_1.AI_AGENT_CHAT,
69
+ variables: { message, conversationId, enableTools }
70
+ });
71
+ }
72
+ async aiAgentContinue(conversationId, toolResults) {
73
+ return this.apolloClient.mutate({
74
+ mutation: mutations_1.AI_AGENT_CONTINUE,
75
+ variables: { conversationId, toolResults }
76
+ });
77
+ }
78
+ async aiAgentExecute(conversationId, toolCalls) {
79
+ return this.apolloClient.mutate({
80
+ mutation: mutations_1.AI_AGENT_EXECUTE,
81
+ variables: { conversationId, toolCalls }
82
+ });
83
+ }
66
84
  async cancelCampaign(id) {
67
85
  return this.apolloClient.mutate({
68
86
  mutation: mutations_1.CANCEL_CAMPAIGN,
@@ -182,6 +200,12 @@ class CloudForgeSDK {
182
200
  variables: { id }
183
201
  });
184
202
  }
203
+ async deleteConversation(conversationId) {
204
+ return this.apolloClient.mutate({
205
+ mutation: mutations_1.DELETE_CONVERSATION,
206
+ variables: { conversationId }
207
+ });
208
+ }
185
209
  async deleteEmailTemplate(uuid) {
186
210
  return this.apolloClient.mutate({
187
211
  mutation: mutations_1.DELETE_EMAIL_TEMPLATE,
@@ -564,6 +588,18 @@ class CloudForgeSDK {
564
588
  variables: { segmentId, pagination }
565
589
  });
566
590
  }
591
+ async conversation(conversationId) {
592
+ return this.apolloClient.query({
593
+ query: queries_1.CONVERSATION,
594
+ variables: { conversationId }
595
+ });
596
+ }
597
+ async conversationHistory(limit, offset) {
598
+ return this.apolloClient.query({
599
+ query: queries_1.CONVERSATION_HISTORY,
600
+ variables: { limit, offset }
601
+ });
602
+ }
567
603
  async currentAccount() {
568
604
  return this.apolloClient.query({
569
605
  query: queries_1.CURRENT_ACCOUNT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cf-service-sdk",
3
- "version": "0.0.46",
3
+ "version": "0.0.48",
4
4
  "type": "commonjs",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",