cf-service-sdk 0.0.45 → 0.0.47

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,32 @@ 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
+ };
106
+ /** Response type for continuing after tool execution. */
107
+ export type AiAgentContinueResponse = {
108
+ __typename?: 'AIAgentContinueResponse';
109
+ error?: Maybe<Scalars['String']['output']>;
110
+ requiresExecution?: Maybe<Scalars['Boolean']['output']>;
111
+ response?: Maybe<Scalars['String']['output']>;
112
+ success?: Maybe<Scalars['Boolean']['output']>;
113
+ toolCalls?: Maybe<Array<Maybe<ToolCallType>>>;
114
+ };
115
+ /** Response type for tool execution. */
116
+ export type AiAgentExecuteResponse = {
117
+ __typename?: 'AIAgentExecuteResponse';
118
+ error?: Maybe<Scalars['String']['output']>;
119
+ results?: Maybe<Array<Maybe<ToolResultType>>>;
120
+ success?: Maybe<Scalars['Boolean']['output']>;
121
+ };
96
122
  /** AcceptInvitation - Accept an invitation to join an account */
97
123
  export type AcceptInvitation = {
98
124
  __typename?: 'AcceptInvitation';
@@ -151,6 +177,15 @@ export type AddSegmentToCampaign = {
151
177
  success?: Maybe<Scalars['Boolean']['output']>;
152
178
  };
153
179
  /** An enumeration. */
180
+ export declare enum AgentConversationMessageRoleChoices {
181
+ /** Assistant */
182
+ Assistant = "ASSISTANT",
183
+ /** System */
184
+ System = "SYSTEM",
185
+ /** User */
186
+ User = "USER"
187
+ }
188
+ /** An enumeration. */
154
189
  export declare enum AppAccountInvitationStatusChoices {
155
190
  /** Accepted */
156
191
  Accepted = "ACCEPTED",
@@ -1150,6 +1185,36 @@ export type ContactStatsType = {
1150
1185
  /** Total number of emails replied to */
1151
1186
  totalReplied?: Maybe<Scalars['Int']['output']>;
1152
1187
  };
1188
+ /** Type for conversation history list. */
1189
+ export type ConversationHistoryType = {
1190
+ __typename?: 'ConversationHistoryType';
1191
+ conversations?: Maybe<Array<Maybe<ConversationType>>>;
1192
+ totalCount?: Maybe<Scalars['Int']['output']>;
1193
+ };
1194
+ /** GraphQL type for ConversationMessage model. */
1195
+ export type ConversationMessageType = Node & {
1196
+ __typename?: 'ConversationMessageType';
1197
+ content: Scalars['JSONString']['output'];
1198
+ conversation?: Maybe<ConversationType>;
1199
+ createdAt: Scalars['DateTime']['output'];
1200
+ /** The ID of the object */
1201
+ id: Scalars['ID']['output'];
1202
+ role: AgentConversationMessageRoleChoices;
1203
+ /** Tool calls made by the assistant */
1204
+ toolCalls?: Maybe<Scalars['JSONString']['output']>;
1205
+ /** Results from tool executions */
1206
+ toolResults?: Maybe<Scalars['JSONString']['output']>;
1207
+ };
1208
+ /** GraphQL type for Conversation model. */
1209
+ export type ConversationType = Node & {
1210
+ __typename?: 'ConversationType';
1211
+ createdAt: Scalars['DateTime']['output'];
1212
+ /** The ID of the object */
1213
+ id: Scalars['ID']['output'];
1214
+ messages?: Maybe<Array<Maybe<ConversationMessageType>>>;
1215
+ updatedAt: Scalars['DateTime']['output'];
1216
+ user?: Maybe<UserType>;
1217
+ };
1153
1218
  export type CreateCallCampaign = {
1154
1219
  __typename?: 'CreateCallCampaign';
1155
1220
  callCampaign?: Maybe<CallCampaignObject>;
@@ -1282,6 +1347,12 @@ export type DeleteContact = {
1282
1347
  __typename?: 'DeleteContact';
1283
1348
  success?: Maybe<Scalars['Boolean']['output']>;
1284
1349
  };
1350
+ /** Mutation for deleting a conversation. */
1351
+ export type DeleteConversation = {
1352
+ __typename?: 'DeleteConversation';
1353
+ message?: Maybe<Scalars['String']['output']>;
1354
+ success?: Maybe<Scalars['Boolean']['output']>;
1355
+ };
1285
1356
  /** DeleteEmailTemplate - Delete an email template (only if owned by user's account) */
1286
1357
  export type DeleteEmailTemplate = {
1287
1358
  __typename?: 'DeleteEmailTemplate';
@@ -1545,6 +1616,12 @@ export type Mutation = {
1545
1616
  addContactsToSegment?: Maybe<AddContactsToSegment>;
1546
1617
  addSegmentToCallCampaign?: Maybe<AddSegmentToCallCampaign>;
1547
1618
  addSegmentToCampaign?: Maybe<AddSegmentToCampaign>;
1619
+ /** Mutation for chatting with the AI agent. */
1620
+ aiAgentChat?: Maybe<AiAgentChatResponse>;
1621
+ /** Mutation for continuing conversation after tool execution. */
1622
+ aiAgentContinue?: Maybe<AiAgentContinueResponse>;
1623
+ /** Mutation for executing tool calls. */
1624
+ aiAgentExecute?: Maybe<AiAgentExecuteResponse>;
1548
1625
  cancelCampaign?: Maybe<CancelCampaign>;
1549
1626
  /** CancelInvitation - Cancel a pending invitation (admin only) */
1550
1627
  cancelInvitation?: Maybe<CancelInvitation>;
@@ -1571,6 +1648,8 @@ export type Mutation = {
1571
1648
  deleteCompany?: Maybe<DeleteCompany>;
1572
1649
  deleteCompanyNote?: Maybe<DeleteCompanyNote>;
1573
1650
  deleteContact?: Maybe<DeleteContact>;
1651
+ /** Mutation for deleting a conversation. */
1652
+ deleteConversation?: Maybe<DeleteConversation>;
1574
1653
  /** DeleteEmailTemplate - Delete an email template (only if owned by user's account) */
1575
1654
  deleteEmailTemplate?: Maybe<DeleteEmailTemplate>;
1576
1655
  /** Delete a notification */
@@ -1669,6 +1748,22 @@ export type MutationAddSegmentToCampaignArgs = {
1669
1748
  segmentId: Scalars['ID']['input'];
1670
1749
  };
1671
1750
  /** Mutations */
1751
+ export type MutationAiAgentChatArgs = {
1752
+ conversationId?: InputMaybe<Scalars['String']['input']>;
1753
+ enableTools?: InputMaybe<Scalars['Boolean']['input']>;
1754
+ message: Scalars['String']['input'];
1755
+ };
1756
+ /** Mutations */
1757
+ export type MutationAiAgentContinueArgs = {
1758
+ conversationId: Scalars['String']['input'];
1759
+ toolResults: Array<InputMaybe<Scalars['JSONString']['input']>>;
1760
+ };
1761
+ /** Mutations */
1762
+ export type MutationAiAgentExecuteArgs = {
1763
+ conversationId: Scalars['String']['input'];
1764
+ toolCalls: Array<InputMaybe<Scalars['JSONString']['input']>>;
1765
+ };
1766
+ /** Mutations */
1672
1767
  export type MutationCancelCampaignArgs = {
1673
1768
  id: Scalars['ID']['input'];
1674
1769
  };
@@ -1745,6 +1840,10 @@ export type MutationDeleteContactArgs = {
1745
1840
  id?: InputMaybe<Scalars['ID']['input']>;
1746
1841
  };
1747
1842
  /** Mutations */
1843
+ export type MutationDeleteConversationArgs = {
1844
+ conversationId: Scalars['String']['input'];
1845
+ };
1846
+ /** Mutations */
1748
1847
  export type MutationDeleteEmailTemplateArgs = {
1749
1848
  uuid: Scalars['UUID']['input'];
1750
1849
  };
@@ -1945,6 +2044,11 @@ export type MyInvitationsType = {
1945
2044
  status: Scalars['String']['output'];
1946
2045
  token: Scalars['String']['output'];
1947
2046
  };
2047
+ /** An object with an ID */
2048
+ export type Node = {
2049
+ /** The ID of the object */
2050
+ id: Scalars['ID']['output'];
2051
+ };
1948
2052
  /** GraphQL type for Notification model */
1949
2053
  export type NotificationType = {
1950
2054
  __typename?: 'NotificationType';
@@ -2159,6 +2263,8 @@ export type Query = {
2159
2263
  contacts?: Maybe<Array<Maybe<ContactObject>>>;
2160
2264
  /** Get paginated list of contacts in a segment */
2161
2265
  contactsInSegment?: Maybe<PaginatedContactList>;
2266
+ conversation?: Maybe<ConversationType>;
2267
+ conversationHistory?: Maybe<ConversationHistoryType>;
2162
2268
  currentAccount?: Maybe<AccountType>;
2163
2269
  /** Get dashboard statistics across different features */
2164
2270
  dashboardStats?: Maybe<DashboardStatsType>;
@@ -2288,6 +2394,15 @@ export type QueryContactsInSegmentArgs = {
2288
2394
  segmentId: Scalars['ID']['input'];
2289
2395
  };
2290
2396
  /** Query */
2397
+ export type QueryConversationArgs = {
2398
+ conversationId: Scalars['String']['input'];
2399
+ };
2400
+ /** Query */
2401
+ export type QueryConversationHistoryArgs = {
2402
+ limit?: InputMaybe<Scalars['Int']['input']>;
2403
+ offset?: InputMaybe<Scalars['Int']['input']>;
2404
+ };
2405
+ /** Query */
2291
2406
  export type QueryDashboardStatsArgs = {
2292
2407
  endDate?: InputMaybe<Scalars['DateTime']['input']>;
2293
2408
  startDate?: InputMaybe<Scalars['DateTime']['input']>;
@@ -2644,6 +2759,23 @@ export type TasksResponse = {
2644
2759
  pagination?: Maybe<PaginationInfo>;
2645
2760
  stats?: Maybe<TaskStatsObject>;
2646
2761
  };
2762
+ /** Type for tool calls. */
2763
+ export type ToolCallType = {
2764
+ __typename?: 'ToolCallType';
2765
+ id?: Maybe<Scalars['String']['output']>;
2766
+ input?: Maybe<Scalars['JSONString']['output']>;
2767
+ name?: Maybe<Scalars['String']['output']>;
2768
+ type?: Maybe<Scalars['String']['output']>;
2769
+ };
2770
+ /** Type for tool execution results. */
2771
+ export type ToolResultType = {
2772
+ __typename?: 'ToolResultType';
2773
+ error?: Maybe<Scalars['String']['output']>;
2774
+ result?: Maybe<Scalars['JSONString']['output']>;
2775
+ success?: Maybe<Scalars['Boolean']['output']>;
2776
+ toolUseId?: Maybe<Scalars['String']['output']>;
2777
+ type?: Maybe<Scalars['String']['output']>;
2778
+ };
2647
2779
  export type UsStateData = {
2648
2780
  __typename?: 'USStateData';
2649
2781
  /** State abbreviation */
@@ -3049,6 +3181,70 @@ export type AddSegmentToCampaignMutation = {
3049
3181
  } | null;
3050
3182
  } | null;
3051
3183
  };
3184
+ export type AiAgentChatMutationVariables = Exact<{
3185
+ conversationId?: InputMaybe<Scalars['String']['input']>;
3186
+ enableTools?: InputMaybe<Scalars['Boolean']['input']>;
3187
+ message: Scalars['String']['input'];
3188
+ }>;
3189
+ export type AiAgentChatMutation = {
3190
+ __typename?: 'Mutation';
3191
+ aiAgentChat?: {
3192
+ __typename?: 'AIAgentChatResponse';
3193
+ success?: boolean | null;
3194
+ conversationId?: string | null;
3195
+ response?: string | null;
3196
+ requiresExecution?: boolean | null;
3197
+ error?: string | null;
3198
+ toolCalls?: Array<{
3199
+ __typename?: 'ToolCallType';
3200
+ type?: string | null;
3201
+ id?: string | null;
3202
+ name?: string | null;
3203
+ input?: any | null;
3204
+ } | null> | null;
3205
+ } | null;
3206
+ };
3207
+ export type AiAgentContinueMutationVariables = Exact<{
3208
+ conversationId: Scalars['String']['input'];
3209
+ toolResults: Array<InputMaybe<Scalars['JSONString']['input']>> | InputMaybe<Scalars['JSONString']['input']>;
3210
+ }>;
3211
+ export type AiAgentContinueMutation = {
3212
+ __typename?: 'Mutation';
3213
+ aiAgentContinue?: {
3214
+ __typename?: 'AIAgentContinueResponse';
3215
+ success?: boolean | null;
3216
+ response?: string | null;
3217
+ requiresExecution?: boolean | null;
3218
+ error?: string | null;
3219
+ toolCalls?: Array<{
3220
+ __typename?: 'ToolCallType';
3221
+ type?: string | null;
3222
+ id?: string | null;
3223
+ name?: string | null;
3224
+ input?: any | null;
3225
+ } | null> | null;
3226
+ } | null;
3227
+ };
3228
+ export type AiAgentExecuteMutationVariables = Exact<{
3229
+ conversationId: Scalars['String']['input'];
3230
+ toolCalls: Array<InputMaybe<Scalars['JSONString']['input']>> | InputMaybe<Scalars['JSONString']['input']>;
3231
+ }>;
3232
+ export type AiAgentExecuteMutation = {
3233
+ __typename?: 'Mutation';
3234
+ aiAgentExecute?: {
3235
+ __typename?: 'AIAgentExecuteResponse';
3236
+ success?: boolean | null;
3237
+ error?: string | null;
3238
+ results?: Array<{
3239
+ __typename?: 'ToolResultType';
3240
+ toolUseId?: string | null;
3241
+ type?: string | null;
3242
+ success?: boolean | null;
3243
+ result?: any | null;
3244
+ error?: string | null;
3245
+ } | null> | null;
3246
+ } | null;
3247
+ };
3052
3248
  export type CancelCampaignMutationVariables = Exact<{
3053
3249
  id: Scalars['ID']['input'];
3054
3250
  }>;
@@ -4848,6 +5044,17 @@ export type DeleteContactMutation = {
4848
5044
  success?: boolean | null;
4849
5045
  } | null;
4850
5046
  };
5047
+ export type DeleteConversationMutationVariables = Exact<{
5048
+ conversationId: Scalars['String']['input'];
5049
+ }>;
5050
+ export type DeleteConversationMutation = {
5051
+ __typename?: 'Mutation';
5052
+ deleteConversation?: {
5053
+ __typename?: 'DeleteConversation';
5054
+ success?: boolean | null;
5055
+ message?: string | null;
5056
+ } | null;
5057
+ };
4851
5058
  export type DeleteEmailTemplateMutationVariables = Exact<{
4852
5059
  uuid: Scalars['UUID']['input'];
4853
5060
  }>;
@@ -10673,6 +10880,69 @@ export type ContactsInSegmentQuery = {
10673
10880
  } | null;
10674
10881
  } | null;
10675
10882
  };
10883
+ export type ConversationQueryVariables = Exact<{
10884
+ conversationId: Scalars['String']['input'];
10885
+ }>;
10886
+ export type ConversationQuery = {
10887
+ __typename?: 'Query';
10888
+ conversation?: {
10889
+ __typename?: 'ConversationType';
10890
+ id: string;
10891
+ createdAt: any;
10892
+ updatedAt: any;
10893
+ user?: {
10894
+ __typename?: 'UserType';
10895
+ id?: string | null;
10896
+ email?: string | null;
10897
+ firstName?: string | null;
10898
+ lastName?: string | null;
10899
+ picture?: string | null;
10900
+ } | null;
10901
+ messages?: Array<{
10902
+ __typename?: 'ConversationMessageType';
10903
+ id: string;
10904
+ role: AgentConversationMessageRoleChoices;
10905
+ content: any;
10906
+ toolCalls?: any | null;
10907
+ toolResults?: any | null;
10908
+ createdAt: any;
10909
+ } | null> | null;
10910
+ } | null;
10911
+ };
10912
+ export type ConversationHistoryQueryVariables = Exact<{
10913
+ limit?: InputMaybe<Scalars['Int']['input']>;
10914
+ offset?: InputMaybe<Scalars['Int']['input']>;
10915
+ }>;
10916
+ export type ConversationHistoryQuery = {
10917
+ __typename?: 'Query';
10918
+ conversationHistory?: {
10919
+ __typename?: 'ConversationHistoryType';
10920
+ totalCount?: number | null;
10921
+ conversations?: Array<{
10922
+ __typename?: 'ConversationType';
10923
+ id: string;
10924
+ createdAt: any;
10925
+ updatedAt: any;
10926
+ user?: {
10927
+ __typename?: 'UserType';
10928
+ id?: string | null;
10929
+ email?: string | null;
10930
+ firstName?: string | null;
10931
+ lastName?: string | null;
10932
+ picture?: string | null;
10933
+ } | null;
10934
+ messages?: Array<{
10935
+ __typename?: 'ConversationMessageType';
10936
+ id: string;
10937
+ role: AgentConversationMessageRoleChoices;
10938
+ content: any;
10939
+ toolCalls?: any | null;
10940
+ toolResults?: any | null;
10941
+ createdAt: any;
10942
+ } | null> | null;
10943
+ } | null> | null;
10944
+ } | null;
10945
+ };
10676
10946
  export type CurrentAccountQueryVariables = Exact<{
10677
10947
  [key: string]: never;
10678
10948
  }>;
@@ -12218,6 +12488,89 @@ export declare function useAddSegmentToCampaignMutation(baseOptions?: Apollo.Mut
12218
12488
  export type AddSegmentToCampaignMutationHookResult = ReturnType<typeof useAddSegmentToCampaignMutation>;
12219
12489
  export type AddSegmentToCampaignMutationResult = Apollo.MutationResult<AddSegmentToCampaignMutation>;
12220
12490
  export type AddSegmentToCampaignMutationOptions = Apollo.BaseMutationOptions<AddSegmentToCampaignMutation, AddSegmentToCampaignMutationVariables>;
12491
+ export declare const AiAgentChatDocument: Apollo.DocumentNode;
12492
+ export type AiAgentChatMutationFn = Apollo.MutationFunction<AiAgentChatMutation, AiAgentChatMutationVariables>;
12493
+ /**
12494
+ * __useAiAgentChatMutation__
12495
+ *
12496
+ * To run a mutation, you first call `useAiAgentChatMutation` within a React component and pass it any options that fit your needs.
12497
+ * When your component renders, `useAiAgentChatMutation` returns a tuple that includes:
12498
+ * - A mutate function that you can call at any time to execute the mutation
12499
+ * - An object with fields that represent the current status of the mutation's execution
12500
+ *
12501
+ * @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;
12502
+ *
12503
+ * @example
12504
+ * const [aiAgentChatMutation, { data, loading, error }] = useAiAgentChatMutation({
12505
+ * variables: {
12506
+ * conversationId: // value for 'conversationId'
12507
+ * enableTools: // value for 'enableTools'
12508
+ * message: // value for 'message'
12509
+ * },
12510
+ * });
12511
+ */
12512
+ export declare function useAiAgentChatMutation(baseOptions?: Apollo.MutationHookOptions<AiAgentChatMutation, AiAgentChatMutationVariables>): Apollo.MutationTuple<AiAgentChatMutation, Exact<{
12513
+ conversationId?: InputMaybe<Scalars["String"]["input"]>;
12514
+ enableTools?: InputMaybe<Scalars["Boolean"]["input"]>;
12515
+ message: Scalars["String"]["input"];
12516
+ }>, Apollo.DefaultContext, Apollo.ApolloCache<any>>;
12517
+ export type AiAgentChatMutationHookResult = ReturnType<typeof useAiAgentChatMutation>;
12518
+ export type AiAgentChatMutationResult = Apollo.MutationResult<AiAgentChatMutation>;
12519
+ export type AiAgentChatMutationOptions = Apollo.BaseMutationOptions<AiAgentChatMutation, AiAgentChatMutationVariables>;
12520
+ export declare const AiAgentContinueDocument: Apollo.DocumentNode;
12521
+ export type AiAgentContinueMutationFn = Apollo.MutationFunction<AiAgentContinueMutation, AiAgentContinueMutationVariables>;
12522
+ /**
12523
+ * __useAiAgentContinueMutation__
12524
+ *
12525
+ * To run a mutation, you first call `useAiAgentContinueMutation` within a React component and pass it any options that fit your needs.
12526
+ * When your component renders, `useAiAgentContinueMutation` returns a tuple that includes:
12527
+ * - A mutate function that you can call at any time to execute the mutation
12528
+ * - An object with fields that represent the current status of the mutation's execution
12529
+ *
12530
+ * @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;
12531
+ *
12532
+ * @example
12533
+ * const [aiAgentContinueMutation, { data, loading, error }] = useAiAgentContinueMutation({
12534
+ * variables: {
12535
+ * conversationId: // value for 'conversationId'
12536
+ * toolResults: // value for 'toolResults'
12537
+ * },
12538
+ * });
12539
+ */
12540
+ export declare function useAiAgentContinueMutation(baseOptions?: Apollo.MutationHookOptions<AiAgentContinueMutation, AiAgentContinueMutationVariables>): Apollo.MutationTuple<AiAgentContinueMutation, Exact<{
12541
+ conversationId: Scalars["String"]["input"];
12542
+ toolResults: Array<InputMaybe<Scalars["JSONString"]["input"]>> | InputMaybe<Scalars["JSONString"]["input"]>;
12543
+ }>, Apollo.DefaultContext, Apollo.ApolloCache<any>>;
12544
+ export type AiAgentContinueMutationHookResult = ReturnType<typeof useAiAgentContinueMutation>;
12545
+ export type AiAgentContinueMutationResult = Apollo.MutationResult<AiAgentContinueMutation>;
12546
+ export type AiAgentContinueMutationOptions = Apollo.BaseMutationOptions<AiAgentContinueMutation, AiAgentContinueMutationVariables>;
12547
+ export declare const AiAgentExecuteDocument: Apollo.DocumentNode;
12548
+ export type AiAgentExecuteMutationFn = Apollo.MutationFunction<AiAgentExecuteMutation, AiAgentExecuteMutationVariables>;
12549
+ /**
12550
+ * __useAiAgentExecuteMutation__
12551
+ *
12552
+ * To run a mutation, you first call `useAiAgentExecuteMutation` within a React component and pass it any options that fit your needs.
12553
+ * When your component renders, `useAiAgentExecuteMutation` returns a tuple that includes:
12554
+ * - A mutate function that you can call at any time to execute the mutation
12555
+ * - An object with fields that represent the current status of the mutation's execution
12556
+ *
12557
+ * @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;
12558
+ *
12559
+ * @example
12560
+ * const [aiAgentExecuteMutation, { data, loading, error }] = useAiAgentExecuteMutation({
12561
+ * variables: {
12562
+ * conversationId: // value for 'conversationId'
12563
+ * toolCalls: // value for 'toolCalls'
12564
+ * },
12565
+ * });
12566
+ */
12567
+ export declare function useAiAgentExecuteMutation(baseOptions?: Apollo.MutationHookOptions<AiAgentExecuteMutation, AiAgentExecuteMutationVariables>): Apollo.MutationTuple<AiAgentExecuteMutation, Exact<{
12568
+ conversationId: Scalars["String"]["input"];
12569
+ toolCalls: Array<InputMaybe<Scalars["JSONString"]["input"]>> | InputMaybe<Scalars["JSONString"]["input"]>;
12570
+ }>, Apollo.DefaultContext, Apollo.ApolloCache<any>>;
12571
+ export type AiAgentExecuteMutationHookResult = ReturnType<typeof useAiAgentExecuteMutation>;
12572
+ export type AiAgentExecuteMutationResult = Apollo.MutationResult<AiAgentExecuteMutation>;
12573
+ export type AiAgentExecuteMutationOptions = Apollo.BaseMutationOptions<AiAgentExecuteMutation, AiAgentExecuteMutationVariables>;
12221
12574
  export declare const CancelCampaignDocument: Apollo.DocumentNode;
12222
12575
  export type CancelCampaignMutationFn = Apollo.MutationFunction<CancelCampaignMutation, CancelCampaignMutationVariables>;
12223
12576
  /**
@@ -12717,6 +13070,31 @@ export declare function useDeleteContactMutation(baseOptions?: Apollo.MutationHo
12717
13070
  export type DeleteContactMutationHookResult = ReturnType<typeof useDeleteContactMutation>;
12718
13071
  export type DeleteContactMutationResult = Apollo.MutationResult<DeleteContactMutation>;
12719
13072
  export type DeleteContactMutationOptions = Apollo.BaseMutationOptions<DeleteContactMutation, DeleteContactMutationVariables>;
13073
+ export declare const DeleteConversationDocument: Apollo.DocumentNode;
13074
+ export type DeleteConversationMutationFn = Apollo.MutationFunction<DeleteConversationMutation, DeleteConversationMutationVariables>;
13075
+ /**
13076
+ * __useDeleteConversationMutation__
13077
+ *
13078
+ * To run a mutation, you first call `useDeleteConversationMutation` within a React component and pass it any options that fit your needs.
13079
+ * When your component renders, `useDeleteConversationMutation` returns a tuple that includes:
13080
+ * - A mutate function that you can call at any time to execute the mutation
13081
+ * - An object with fields that represent the current status of the mutation's execution
13082
+ *
13083
+ * @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;
13084
+ *
13085
+ * @example
13086
+ * const [deleteConversationMutation, { data, loading, error }] = useDeleteConversationMutation({
13087
+ * variables: {
13088
+ * conversationId: // value for 'conversationId'
13089
+ * },
13090
+ * });
13091
+ */
13092
+ export declare function useDeleteConversationMutation(baseOptions?: Apollo.MutationHookOptions<DeleteConversationMutation, DeleteConversationMutationVariables>): Apollo.MutationTuple<DeleteConversationMutation, Exact<{
13093
+ conversationId: Scalars["String"]["input"];
13094
+ }>, Apollo.DefaultContext, Apollo.ApolloCache<any>>;
13095
+ export type DeleteConversationMutationHookResult = ReturnType<typeof useDeleteConversationMutation>;
13096
+ export type DeleteConversationMutationResult = Apollo.MutationResult<DeleteConversationMutation>;
13097
+ export type DeleteConversationMutationOptions = Apollo.BaseMutationOptions<DeleteConversationMutation, DeleteConversationMutationVariables>;
12720
13098
  export declare const DeleteEmailTemplateDocument: Apollo.DocumentNode;
12721
13099
  export type DeleteEmailTemplateMutationFn = Apollo.MutationFunction<DeleteEmailTemplateMutation, DeleteEmailTemplateMutationVariables>;
12722
13100
  /**
@@ -14603,6 +14981,75 @@ export type ContactsInSegmentQueryHookResult = ReturnType<typeof useContactsInSe
14603
14981
  export type ContactsInSegmentLazyQueryHookResult = ReturnType<typeof useContactsInSegmentLazyQuery>;
14604
14982
  export type ContactsInSegmentSuspenseQueryHookResult = ReturnType<typeof useContactsInSegmentSuspenseQuery>;
14605
14983
  export type ContactsInSegmentQueryResult = Apollo.QueryResult<ContactsInSegmentQuery, ContactsInSegmentQueryVariables>;
14984
+ export declare const ConversationDocument: Apollo.DocumentNode;
14985
+ /**
14986
+ * __useConversationQuery__
14987
+ *
14988
+ * To run a query within a React component, call `useConversationQuery` and pass it any options that fit your needs.
14989
+ * When your component renders, `useConversationQuery` returns an object from Apollo Client that contains loading, error, and data properties
14990
+ * you can use to render your UI.
14991
+ *
14992
+ * @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;
14993
+ *
14994
+ * @example
14995
+ * const { data, loading, error } = useConversationQuery({
14996
+ * variables: {
14997
+ * conversationId: // value for 'conversationId'
14998
+ * },
14999
+ * });
15000
+ */
15001
+ export declare function useConversationQuery(baseOptions: Apollo.QueryHookOptions<ConversationQuery, ConversationQueryVariables> & ({
15002
+ variables: ConversationQueryVariables;
15003
+ skip?: boolean;
15004
+ } | {
15005
+ skip: boolean;
15006
+ })): Apollo.QueryResult<ConversationQuery, Exact<{
15007
+ conversationId: Scalars["String"]["input"];
15008
+ }>>;
15009
+ export declare function useConversationLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<ConversationQuery, ConversationQueryVariables>): Apollo.LazyQueryResultTuple<ConversationQuery, Exact<{
15010
+ conversationId: Scalars["String"]["input"];
15011
+ }>>;
15012
+ export declare function useConversationSuspenseQuery(baseOptions?: Apollo.SkipToken | Apollo.SuspenseQueryHookOptions<ConversationQuery, ConversationQueryVariables>): Apollo.UseSuspenseQueryResult<ConversationQuery | undefined, Exact<{
15013
+ conversationId: Scalars["String"]["input"];
15014
+ }>>;
15015
+ export type ConversationQueryHookResult = ReturnType<typeof useConversationQuery>;
15016
+ export type ConversationLazyQueryHookResult = ReturnType<typeof useConversationLazyQuery>;
15017
+ export type ConversationSuspenseQueryHookResult = ReturnType<typeof useConversationSuspenseQuery>;
15018
+ export type ConversationQueryResult = Apollo.QueryResult<ConversationQuery, ConversationQueryVariables>;
15019
+ export declare const ConversationHistoryDocument: Apollo.DocumentNode;
15020
+ /**
15021
+ * __useConversationHistoryQuery__
15022
+ *
15023
+ * To run a query within a React component, call `useConversationHistoryQuery` and pass it any options that fit your needs.
15024
+ * When your component renders, `useConversationHistoryQuery` returns an object from Apollo Client that contains loading, error, and data properties
15025
+ * you can use to render your UI.
15026
+ *
15027
+ * @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;
15028
+ *
15029
+ * @example
15030
+ * const { data, loading, error } = useConversationHistoryQuery({
15031
+ * variables: {
15032
+ * limit: // value for 'limit'
15033
+ * offset: // value for 'offset'
15034
+ * },
15035
+ * });
15036
+ */
15037
+ export declare function useConversationHistoryQuery(baseOptions?: Apollo.QueryHookOptions<ConversationHistoryQuery, ConversationHistoryQueryVariables>): Apollo.QueryResult<ConversationHistoryQuery, Exact<{
15038
+ limit?: InputMaybe<Scalars["Int"]["input"]>;
15039
+ offset?: InputMaybe<Scalars["Int"]["input"]>;
15040
+ }>>;
15041
+ export declare function useConversationHistoryLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<ConversationHistoryQuery, ConversationHistoryQueryVariables>): Apollo.LazyQueryResultTuple<ConversationHistoryQuery, Exact<{
15042
+ limit?: InputMaybe<Scalars["Int"]["input"]>;
15043
+ offset?: InputMaybe<Scalars["Int"]["input"]>;
15044
+ }>>;
15045
+ export declare function useConversationHistorySuspenseQuery(baseOptions?: Apollo.SkipToken | Apollo.SuspenseQueryHookOptions<ConversationHistoryQuery, ConversationHistoryQueryVariables>): Apollo.UseSuspenseQueryResult<ConversationHistoryQuery | undefined, Exact<{
15046
+ limit?: InputMaybe<Scalars["Int"]["input"]>;
15047
+ offset?: InputMaybe<Scalars["Int"]["input"]>;
15048
+ }>>;
15049
+ export type ConversationHistoryQueryHookResult = ReturnType<typeof useConversationHistoryQuery>;
15050
+ export type ConversationHistoryLazyQueryHookResult = ReturnType<typeof useConversationHistoryLazyQuery>;
15051
+ export type ConversationHistorySuspenseQueryHookResult = ReturnType<typeof useConversationHistorySuspenseQuery>;
15052
+ export type ConversationHistoryQueryResult = Apollo.QueryResult<ConversationHistoryQuery, ConversationHistoryQueryVariables>;
14606
15053
  export declare const CurrentAccountDocument: Apollo.DocumentNode;
14607
15054
  /**
14608
15055
  * __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,125 @@ 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
+ requiresExecution
849
+ error
850
+ }
851
+ }
852
+ `;
853
+ /**
854
+ * __useAiAgentChatMutation__
855
+ *
856
+ * To run a mutation, you first call `useAiAgentChatMutation` within a React component and pass it any options that fit your needs.
857
+ * When your component renders, `useAiAgentChatMutation` returns a tuple that includes:
858
+ * - A mutate function that you can call at any time to execute the mutation
859
+ * - An object with fields that represent the current status of the mutation's execution
860
+ *
861
+ * @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;
862
+ *
863
+ * @example
864
+ * const [aiAgentChatMutation, { data, loading, error }] = useAiAgentChatMutation({
865
+ * variables: {
866
+ * conversationId: // value for 'conversationId'
867
+ * enableTools: // value for 'enableTools'
868
+ * message: // value for 'message'
869
+ * },
870
+ * });
871
+ */
872
+ function useAiAgentChatMutation(baseOptions) {
873
+ const options = { ...defaultOptions, ...baseOptions };
874
+ return Apollo.useMutation(exports.AiAgentChatDocument, options);
875
+ }
876
+ exports.AiAgentContinueDocument = (0, client_1.gql) `
877
+ mutation AiAgentContinue($conversationId: String!, $toolResults: [JSONString]!) {
878
+ aiAgentContinue(conversationId: $conversationId, toolResults: $toolResults) {
879
+ success
880
+ response
881
+ toolCalls {
882
+ type
883
+ id
884
+ name
885
+ input
886
+ }
887
+ requiresExecution
888
+ error
889
+ }
890
+ }
891
+ `;
892
+ /**
893
+ * __useAiAgentContinueMutation__
894
+ *
895
+ * To run a mutation, you first call `useAiAgentContinueMutation` within a React component and pass it any options that fit your needs.
896
+ * When your component renders, `useAiAgentContinueMutation` returns a tuple that includes:
897
+ * - A mutate function that you can call at any time to execute the mutation
898
+ * - An object with fields that represent the current status of the mutation's execution
899
+ *
900
+ * @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;
901
+ *
902
+ * @example
903
+ * const [aiAgentContinueMutation, { data, loading, error }] = useAiAgentContinueMutation({
904
+ * variables: {
905
+ * conversationId: // value for 'conversationId'
906
+ * toolResults: // value for 'toolResults'
907
+ * },
908
+ * });
909
+ */
910
+ function useAiAgentContinueMutation(baseOptions) {
911
+ const options = { ...defaultOptions, ...baseOptions };
912
+ return Apollo.useMutation(exports.AiAgentContinueDocument, options);
913
+ }
914
+ exports.AiAgentExecuteDocument = (0, client_1.gql) `
915
+ mutation AiAgentExecute($conversationId: String!, $toolCalls: [JSONString]!) {
916
+ aiAgentExecute(conversationId: $conversationId, toolCalls: $toolCalls) {
917
+ success
918
+ results {
919
+ toolUseId
920
+ type
921
+ success
922
+ result
923
+ error
924
+ }
925
+ error
926
+ }
927
+ }
928
+ `;
929
+ /**
930
+ * __useAiAgentExecuteMutation__
931
+ *
932
+ * To run a mutation, you first call `useAiAgentExecuteMutation` within a React component and pass it any options that fit your needs.
933
+ * When your component renders, `useAiAgentExecuteMutation` returns a tuple that includes:
934
+ * - A mutate function that you can call at any time to execute the mutation
935
+ * - An object with fields that represent the current status of the mutation's execution
936
+ *
937
+ * @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;
938
+ *
939
+ * @example
940
+ * const [aiAgentExecuteMutation, { data, loading, error }] = useAiAgentExecuteMutation({
941
+ * variables: {
942
+ * conversationId: // value for 'conversationId'
943
+ * toolCalls: // value for 'toolCalls'
944
+ * },
945
+ * });
946
+ */
947
+ function useAiAgentExecuteMutation(baseOptions) {
948
+ const options = { ...defaultOptions, ...baseOptions };
949
+ return Apollo.useMutation(exports.AiAgentExecuteDocument, options);
950
+ }
812
951
  exports.CancelCampaignDocument = (0, client_1.gql) `
813
952
  mutation CancelCampaign($id: ID!) {
814
953
  cancelCampaign(id: $id) {
@@ -2852,6 +2991,35 @@ function useDeleteContactMutation(baseOptions) {
2852
2991
  const options = { ...defaultOptions, ...baseOptions };
2853
2992
  return Apollo.useMutation(exports.DeleteContactDocument, options);
2854
2993
  }
2994
+ exports.DeleteConversationDocument = (0, client_1.gql) `
2995
+ mutation DeleteConversation($conversationId: String!) {
2996
+ deleteConversation(conversationId: $conversationId) {
2997
+ success
2998
+ message
2999
+ }
3000
+ }
3001
+ `;
3002
+ /**
3003
+ * __useDeleteConversationMutation__
3004
+ *
3005
+ * To run a mutation, you first call `useDeleteConversationMutation` within a React component and pass it any options that fit your needs.
3006
+ * When your component renders, `useDeleteConversationMutation` returns a tuple that includes:
3007
+ * - A mutate function that you can call at any time to execute the mutation
3008
+ * - An object with fields that represent the current status of the mutation's execution
3009
+ *
3010
+ * @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;
3011
+ *
3012
+ * @example
3013
+ * const [deleteConversationMutation, { data, loading, error }] = useDeleteConversationMutation({
3014
+ * variables: {
3015
+ * conversationId: // value for 'conversationId'
3016
+ * },
3017
+ * });
3018
+ */
3019
+ function useDeleteConversationMutation(baseOptions) {
3020
+ const options = { ...defaultOptions, ...baseOptions };
3021
+ return Apollo.useMutation(exports.DeleteConversationDocument, options);
3022
+ }
2855
3023
  exports.DeleteEmailTemplateDocument = (0, client_1.gql) `
2856
3024
  mutation DeleteEmailTemplate($uuid: UUID!) {
2857
3025
  deleteEmailTemplate(uuid: $uuid) {
@@ -9628,6 +9796,114 @@ function useContactsInSegmentSuspenseQuery(baseOptions) {
9628
9796
  const options = baseOptions === Apollo.skipToken ? baseOptions : { ...defaultOptions, ...baseOptions };
9629
9797
  return Apollo.useSuspenseQuery(exports.ContactsInSegmentDocument, options);
9630
9798
  }
9799
+ exports.ConversationDocument = (0, client_1.gql) `
9800
+ query Conversation($conversationId: String!) {
9801
+ conversation(conversationId: $conversationId) {
9802
+ id
9803
+ user {
9804
+ id
9805
+ email
9806
+ firstName
9807
+ lastName
9808
+ picture
9809
+ }
9810
+ createdAt
9811
+ updatedAt
9812
+ messages {
9813
+ id
9814
+ role
9815
+ content
9816
+ toolCalls
9817
+ toolResults
9818
+ createdAt
9819
+ }
9820
+ }
9821
+ }
9822
+ `;
9823
+ /**
9824
+ * __useConversationQuery__
9825
+ *
9826
+ * To run a query within a React component, call `useConversationQuery` and pass it any options that fit your needs.
9827
+ * When your component renders, `useConversationQuery` returns an object from Apollo Client that contains loading, error, and data properties
9828
+ * you can use to render your UI.
9829
+ *
9830
+ * @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;
9831
+ *
9832
+ * @example
9833
+ * const { data, loading, error } = useConversationQuery({
9834
+ * variables: {
9835
+ * conversationId: // value for 'conversationId'
9836
+ * },
9837
+ * });
9838
+ */
9839
+ function useConversationQuery(baseOptions) {
9840
+ const options = { ...defaultOptions, ...baseOptions };
9841
+ return Apollo.useQuery(exports.ConversationDocument, options);
9842
+ }
9843
+ function useConversationLazyQuery(baseOptions) {
9844
+ const options = { ...defaultOptions, ...baseOptions };
9845
+ return Apollo.useLazyQuery(exports.ConversationDocument, options);
9846
+ }
9847
+ function useConversationSuspenseQuery(baseOptions) {
9848
+ const options = baseOptions === Apollo.skipToken ? baseOptions : { ...defaultOptions, ...baseOptions };
9849
+ return Apollo.useSuspenseQuery(exports.ConversationDocument, options);
9850
+ }
9851
+ exports.ConversationHistoryDocument = (0, client_1.gql) `
9852
+ query ConversationHistory($limit: Int, $offset: Int) {
9853
+ conversationHistory(limit: $limit, offset: $offset) {
9854
+ conversations {
9855
+ id
9856
+ user {
9857
+ id
9858
+ email
9859
+ firstName
9860
+ lastName
9861
+ picture
9862
+ }
9863
+ createdAt
9864
+ updatedAt
9865
+ messages {
9866
+ id
9867
+ role
9868
+ content
9869
+ toolCalls
9870
+ toolResults
9871
+ createdAt
9872
+ }
9873
+ }
9874
+ totalCount
9875
+ }
9876
+ }
9877
+ `;
9878
+ /**
9879
+ * __useConversationHistoryQuery__
9880
+ *
9881
+ * To run a query within a React component, call `useConversationHistoryQuery` and pass it any options that fit your needs.
9882
+ * When your component renders, `useConversationHistoryQuery` returns an object from Apollo Client that contains loading, error, and data properties
9883
+ * you can use to render your UI.
9884
+ *
9885
+ * @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;
9886
+ *
9887
+ * @example
9888
+ * const { data, loading, error } = useConversationHistoryQuery({
9889
+ * variables: {
9890
+ * limit: // value for 'limit'
9891
+ * offset: // value for 'offset'
9892
+ * },
9893
+ * });
9894
+ */
9895
+ function useConversationHistoryQuery(baseOptions) {
9896
+ const options = { ...defaultOptions, ...baseOptions };
9897
+ return Apollo.useQuery(exports.ConversationHistoryDocument, options);
9898
+ }
9899
+ function useConversationHistoryLazyQuery(baseOptions) {
9900
+ const options = { ...defaultOptions, ...baseOptions };
9901
+ return Apollo.useLazyQuery(exports.ConversationHistoryDocument, options);
9902
+ }
9903
+ function useConversationHistorySuspenseQuery(baseOptions) {
9904
+ const options = baseOptions === Apollo.skipToken ? baseOptions : { ...defaultOptions, ...baseOptions };
9905
+ return Apollo.useSuspenseQuery(exports.ConversationHistoryDocument, options);
9906
+ }
9631
9907
  exports.CurrentAccountDocument = (0, client_1.gql) `
9632
9908
  query CurrentAccount {
9633
9909
  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,55 @@ 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
+ requiresExecution
4049
+ error
4050
+ }
4051
+ }`;
4052
+ exports.AI_AGENT_EXECUTE = (0, client_1.gql) `
4053
+ mutation AiAgentExecute($conversationId: String!, $toolCalls: [JSONString]!) {
4054
+ aiAgentExecute(conversationId: $conversationId, toolCalls: $toolCalls) {
4055
+ success
4056
+ results {
4057
+ toolUseId
4058
+ type
4059
+ success
4060
+ result
4061
+ error
4062
+ }
4063
+ error
4064
+ }
4065
+ }`;
4066
+ exports.AI_AGENT_CONTINUE = (0, client_1.gql) `
4067
+ mutation AiAgentContinue($conversationId: String!, $toolResults: [JSONString]!) {
4068
+ aiAgentContinue(conversationId: $conversationId, toolResults: $toolResults) {
4069
+ success
4070
+ response
4071
+ toolCalls {
4072
+ type
4073
+ id
4074
+ name
4075
+ input
4076
+ }
4077
+ requiresExecution
4078
+ error
4079
+ }
4080
+ }`;
4081
+ exports.DELETE_CONVERSATION = (0, client_1.gql) `
4082
+ mutation DeleteConversation($conversationId: String!) {
4083
+ deleteConversation(conversationId: $conversationId) {
4084
+ success
4085
+ message
4086
+ }
4087
+ }`;
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.45",
3
+ "version": "0.0.47",
4
4
  "type": "commonjs",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",