lumnisai 0.1.9 → 0.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +67 -0
- package/dist/index.d.cts +56 -1
- package/dist/index.d.mts +56 -1
- package/dist/index.d.ts +56 -1
- package/dist/index.mjs +67 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -757,6 +757,73 @@ class MessagingResource {
|
|
|
757
757
|
request
|
|
758
758
|
);
|
|
759
759
|
}
|
|
760
|
+
/**
|
|
761
|
+
* Delete a single conversation and all its messages.
|
|
762
|
+
*
|
|
763
|
+
* @param conversationId - UUID of the conversation to delete
|
|
764
|
+
* @param userId - User ID or email
|
|
765
|
+
* @returns DeleteConversationResponse with success status and conversation_id
|
|
766
|
+
* @throws MessagingNotFoundError if conversation not found (404)
|
|
767
|
+
* @throws MessagingValidationError if conversation_id is invalid (400)
|
|
768
|
+
*/
|
|
769
|
+
async deleteConversation(conversationId, userId) {
|
|
770
|
+
try {
|
|
771
|
+
const queryParams = new URLSearchParams();
|
|
772
|
+
queryParams.append("user_id", userId);
|
|
773
|
+
return await this.http.delete(
|
|
774
|
+
`/messaging/conversations/${encodeURIComponent(conversationId)}?${queryParams.toString()}`
|
|
775
|
+
);
|
|
776
|
+
} catch (error) {
|
|
777
|
+
if (error instanceof NotFoundError) {
|
|
778
|
+
throw new MessagingNotFoundError(
|
|
779
|
+
`Conversation ${conversationId} not found`
|
|
780
|
+
);
|
|
781
|
+
}
|
|
782
|
+
if (error instanceof ValidationError) {
|
|
783
|
+
throw new MessagingValidationError(
|
|
784
|
+
`Invalid conversation ID: ${conversationId}`
|
|
785
|
+
);
|
|
786
|
+
}
|
|
787
|
+
throw error;
|
|
788
|
+
}
|
|
789
|
+
}
|
|
790
|
+
/**
|
|
791
|
+
* Delete all conversations for a project.
|
|
792
|
+
*
|
|
793
|
+
* **Warning:** This permanently deletes conversations and messages.
|
|
794
|
+
* Consider using unlinkConversationsFromProject() instead.
|
|
795
|
+
*
|
|
796
|
+
* @param projectId - UUID of the project
|
|
797
|
+
* @param userId - User ID or email
|
|
798
|
+
* @returns DeleteConversationsByProjectResponse with deleted count
|
|
799
|
+
*/
|
|
800
|
+
async deleteConversationsByProject(projectId, userId) {
|
|
801
|
+
const queryParams = new URLSearchParams();
|
|
802
|
+
queryParams.append("project_id", projectId);
|
|
803
|
+
queryParams.append("user_id", userId);
|
|
804
|
+
return this.http.delete(
|
|
805
|
+
`/messaging/conversations?${queryParams.toString()}`
|
|
806
|
+
);
|
|
807
|
+
}
|
|
808
|
+
/**
|
|
809
|
+
* Unlink conversations from a project without deleting them.
|
|
810
|
+
*
|
|
811
|
+
* This preserves conversation history by setting project_id = NULL.
|
|
812
|
+
* Recommended approach when deleting a project.
|
|
813
|
+
*
|
|
814
|
+
* @param projectId - UUID of the project
|
|
815
|
+
* @param userId - User ID or email
|
|
816
|
+
* @returns UnlinkConversationsResponse with unlinked count
|
|
817
|
+
*/
|
|
818
|
+
async unlinkConversationsFromProject(projectId, userId) {
|
|
819
|
+
const queryParams = new URLSearchParams();
|
|
820
|
+
queryParams.append("project_id", projectId);
|
|
821
|
+
queryParams.append("user_id", userId);
|
|
822
|
+
return this.http.post(
|
|
823
|
+
`/messaging/conversations/unlink-project?${queryParams.toString()}`,
|
|
824
|
+
null
|
|
825
|
+
);
|
|
826
|
+
}
|
|
760
827
|
}
|
|
761
828
|
|
|
762
829
|
class ModelPreferencesResource {
|
package/dist/index.d.cts
CHANGED
|
@@ -1626,6 +1626,29 @@ interface BatchSendResponse {
|
|
|
1626
1626
|
failed: number;
|
|
1627
1627
|
queued: number;
|
|
1628
1628
|
}
|
|
1629
|
+
/**
|
|
1630
|
+
* Response from deleting a single conversation
|
|
1631
|
+
*/
|
|
1632
|
+
interface DeleteConversationResponse {
|
|
1633
|
+
success: boolean;
|
|
1634
|
+
conversation_id: string;
|
|
1635
|
+
}
|
|
1636
|
+
/**
|
|
1637
|
+
* Response from deleting conversations by project
|
|
1638
|
+
*/
|
|
1639
|
+
interface DeleteConversationsByProjectResponse {
|
|
1640
|
+
success: boolean;
|
|
1641
|
+
project_id: string;
|
|
1642
|
+
deleted_count: number;
|
|
1643
|
+
}
|
|
1644
|
+
/**
|
|
1645
|
+
* Response from unlinking conversations from project
|
|
1646
|
+
*/
|
|
1647
|
+
interface UnlinkConversationsResponse {
|
|
1648
|
+
success: boolean;
|
|
1649
|
+
project_id: string;
|
|
1650
|
+
unlinked_count: number;
|
|
1651
|
+
}
|
|
1629
1652
|
|
|
1630
1653
|
declare class MessagingResource {
|
|
1631
1654
|
private readonly http;
|
|
@@ -1728,6 +1751,38 @@ declare class MessagingResource {
|
|
|
1728
1751
|
* Send multiple drafts with rate limiting
|
|
1729
1752
|
*/
|
|
1730
1753
|
sendBatchDrafts(userId: string, request: BatchSendRequest): Promise<BatchSendResponse>;
|
|
1754
|
+
/**
|
|
1755
|
+
* Delete a single conversation and all its messages.
|
|
1756
|
+
*
|
|
1757
|
+
* @param conversationId - UUID of the conversation to delete
|
|
1758
|
+
* @param userId - User ID or email
|
|
1759
|
+
* @returns DeleteConversationResponse with success status and conversation_id
|
|
1760
|
+
* @throws MessagingNotFoundError if conversation not found (404)
|
|
1761
|
+
* @throws MessagingValidationError if conversation_id is invalid (400)
|
|
1762
|
+
*/
|
|
1763
|
+
deleteConversation(conversationId: string, userId: string): Promise<DeleteConversationResponse>;
|
|
1764
|
+
/**
|
|
1765
|
+
* Delete all conversations for a project.
|
|
1766
|
+
*
|
|
1767
|
+
* **Warning:** This permanently deletes conversations and messages.
|
|
1768
|
+
* Consider using unlinkConversationsFromProject() instead.
|
|
1769
|
+
*
|
|
1770
|
+
* @param projectId - UUID of the project
|
|
1771
|
+
* @param userId - User ID or email
|
|
1772
|
+
* @returns DeleteConversationsByProjectResponse with deleted count
|
|
1773
|
+
*/
|
|
1774
|
+
deleteConversationsByProject(projectId: string, userId: string): Promise<DeleteConversationsByProjectResponse>;
|
|
1775
|
+
/**
|
|
1776
|
+
* Unlink conversations from a project without deleting them.
|
|
1777
|
+
*
|
|
1778
|
+
* This preserves conversation history by setting project_id = NULL.
|
|
1779
|
+
* Recommended approach when deleting a project.
|
|
1780
|
+
*
|
|
1781
|
+
* @param projectId - UUID of the project
|
|
1782
|
+
* @param userId - User ID or email
|
|
1783
|
+
* @returns UnlinkConversationsResponse with unlinked count
|
|
1784
|
+
*/
|
|
1785
|
+
unlinkConversationsFromProject(projectId: string, userId: string): Promise<UnlinkConversationsResponse>;
|
|
1731
1786
|
}
|
|
1732
1787
|
|
|
1733
1788
|
declare class ModelPreferencesResource {
|
|
@@ -2321,4 +2376,4 @@ declare class ProgressTracker {
|
|
|
2321
2376
|
declare function verifyWebhookSignature(payload: string, signature: string, secret: string): boolean;
|
|
2322
2377
|
|
|
2323
2378
|
export = LumnisClient;
|
|
2324
|
-
export { type AgentConfig, type ApiKeyMode, type ApiKeyModeRequest, type ApiKeyModeResponse, type ApiProvider, type AppEnabledResponse, type AppliedFilters, type AppsListResponse, type ArtifactObject, type ArtifactsListResponse, AuthenticationError, type BaseResource, type BatchCheckConnectionRequest, type BatchConnectionRequest, type BatchConnectionResponse, type BatchConnectionStatus, type BatchConnectionStatusResponse, type BatchDraftRequest, type BatchDraftResponse, type BatchSendRequest, type BatchSendResponse, type BillingStatus, type BulkDeleteRequest, type BulkDeleteResponse, type BulkUploadResponse, type CancelResponseResponse, ChannelType, type CheckAppEnabledParams, type CheckLinkedInConnectionRequest, type ChunkingStrategy, type ConnectionAcceptedData, type ConnectionCallbackRequest, type ConnectionCallbackResponse, type ConnectionInfo, type ConnectionStatus, type ConnectionStatusResponse, type ConnectionSummary, type ContentType, type ConversationDetail, ConversationStatus, type ConversationSummary, type CreateDraftRequest, type CreateFeedbackRequest, type CreateFeedbackResponse, type CreateResponseRequest, type CreateResponseResponse, type CreateThreadRequest, type DatabaseStatus, type DeleteApiKeyResponse, type DisconnectRequest, type DisconnectResponse, type DraftResponse, DraftStatus, type DuplicateHandling, type Email, type EmailThreadSummary, type ErrorResponse, ExternalAPIKeysResource, type ExternalApiKeyResponse, type FeedbackListResponse, type FeedbackObject, type FeedbackType, type FileAttachment, type FileChunk, type FileContentResponse, type FileListResponse, type FileMetadata, type FileScope, type FileScopeUpdateRequest, type FileSearchRequest, type FileSearchResponse, type FileSearchResult, type FileStatisticsResponse, type FileUploadResponse, FilesResource, type FilterLogic, type FilterValue, type GetConnectionStatusParams, type GetToolsRequest, type GetToolsResponse, type GetUserConnectionsParams, type InitiateConnectionRequest, type InitiateConnectionResponse, IntegrationsResource, InternalServerError, type LinkedInConnectionStatus, type LinkedInCreditsResponse, type LinkedInSendRequest, LinkedInSubscriptionType, type ListProvidersResponse, LocalFileNotSupportedError, LumnisClient, type LumnisClientOptions, LumnisError, type LumnisErrorOptions, type MCPScope, type MCPServerCreateRequest, type MCPServerListResponse, type MCPServerResponse, type MCPServerUpdateRequest, MCPServersResource, type MCPToolListResponse, type MCPToolResponse, type MCPTransport, type Message, type MessageReceivedData, type MessageResponse, type MessageSentData, MessageType, MessagingAPIError, MessagingConnectionError, MessagingNotFoundError, MessagingResource, MessagingSendError, MessagingValidationError, type ModelAvailability, type ModelOverrides, type ModelPreferenceCreate, type ModelPreferencesBulkUpdate, ModelPreferencesResource, type ModelProvider, type ModelType, NetworkDistance, NoDataSourcesError, NotFoundError, OutreachMethod, type PaginationInfo, type PaginationParams, PeopleDataSource, PeopleResource, type PeopleSearchRequest, type PeopleSearchResponse, type PersonResult, type Plan, type ProcessingStatus, type ProcessingStatusResponse, type ProgressEntry, ProgressTracker, type ProspectConnectionCheck, type ProspectInfo, type ProspectSyncIdentifier, type ProspectSyncResult, ProviderType, QueueItemStatus, type QuickPeopleSearchOutput, RateLimitError, type RateLimitErrorOptions, type ResponseArtifact, type ResponseListResponse, type ResponseObject, type ResponseStatus, ResponsesResource, type SalaryRange, type Scope, type SelectedSkill, type SendMessageRequest, type SendMessageResponse, type SendReplyRequest, type SendResult, type SkillAnalyticsRequest, type SkillEffectivenessMetrics, type SkillGuidelineBase, type SkillGuidelineCreate, type SkillGuidelineListResponse, type SkillGuidelineResponse, type SkillGuidelineUpdate, type SkillRetrievalMetadata, type SkillUsageBase, type SkillUsageCreate, type SkillUsageListResponse, type SkillUsageResponse, type SkillUsageUpdate, SkillsResource, SourcesNotAvailableError, type SpecializedAgentParams, type SpecializedAgentType, type StoreApiKeyRequest, type SyncJobResponse, SyncJobStatus, type SyncProspectRequest, type SyncProspectResponse, type SyncRequest, type SyncStats, type TenantDetailsResponse, TenantInfoResource, type TenantModelPreference, type TenantModelPreferencesResponse, type TestConnectionResponse, type ThreadListResponse, type ThreadObject, type ThreadResponsesParams, ThreadsResource, type ToolInfo, type UUID, type UpdateAppStatusParams, type UpdateAppStatusResponse, type UpdateLinkedInSubscriptionRequest, type UpdateThreadRequest, type UserConnectionsResponse, type UserCreateRequest, type UserDeleteResponse, type UserIdentifier, type UserListResponse, type UserResponse, type UserUpdateRequest, UsersResource, ValidationError, type WebhookEvent, type WebhookPayload, displayProgress, formatProgressEntry, verifyWebhookSignature };
|
|
2379
|
+
export { type AgentConfig, type ApiKeyMode, type ApiKeyModeRequest, type ApiKeyModeResponse, type ApiProvider, type AppEnabledResponse, type AppliedFilters, type AppsListResponse, type ArtifactObject, type ArtifactsListResponse, AuthenticationError, type BaseResource, type BatchCheckConnectionRequest, type BatchConnectionRequest, type BatchConnectionResponse, type BatchConnectionStatus, type BatchConnectionStatusResponse, type BatchDraftRequest, type BatchDraftResponse, type BatchSendRequest, type BatchSendResponse, type BillingStatus, type BulkDeleteRequest, type BulkDeleteResponse, type BulkUploadResponse, type CancelResponseResponse, ChannelType, type CheckAppEnabledParams, type CheckLinkedInConnectionRequest, type ChunkingStrategy, type ConnectionAcceptedData, type ConnectionCallbackRequest, type ConnectionCallbackResponse, type ConnectionInfo, type ConnectionStatus, type ConnectionStatusResponse, type ConnectionSummary, type ContentType, type ConversationDetail, ConversationStatus, type ConversationSummary, type CreateDraftRequest, type CreateFeedbackRequest, type CreateFeedbackResponse, type CreateResponseRequest, type CreateResponseResponse, type CreateThreadRequest, type DatabaseStatus, type DeleteApiKeyResponse, type DeleteConversationResponse, type DeleteConversationsByProjectResponse, type DisconnectRequest, type DisconnectResponse, type DraftResponse, DraftStatus, type DuplicateHandling, type Email, type EmailThreadSummary, type ErrorResponse, ExternalAPIKeysResource, type ExternalApiKeyResponse, type FeedbackListResponse, type FeedbackObject, type FeedbackType, type FileAttachment, type FileChunk, type FileContentResponse, type FileListResponse, type FileMetadata, type FileScope, type FileScopeUpdateRequest, type FileSearchRequest, type FileSearchResponse, type FileSearchResult, type FileStatisticsResponse, type FileUploadResponse, FilesResource, type FilterLogic, type FilterValue, type GetConnectionStatusParams, type GetToolsRequest, type GetToolsResponse, type GetUserConnectionsParams, type InitiateConnectionRequest, type InitiateConnectionResponse, IntegrationsResource, InternalServerError, type LinkedInConnectionStatus, type LinkedInCreditsResponse, type LinkedInSendRequest, LinkedInSubscriptionType, type ListProvidersResponse, LocalFileNotSupportedError, LumnisClient, type LumnisClientOptions, LumnisError, type LumnisErrorOptions, type MCPScope, type MCPServerCreateRequest, type MCPServerListResponse, type MCPServerResponse, type MCPServerUpdateRequest, MCPServersResource, type MCPToolListResponse, type MCPToolResponse, type MCPTransport, type Message, type MessageReceivedData, type MessageResponse, type MessageSentData, MessageType, MessagingAPIError, MessagingConnectionError, MessagingNotFoundError, MessagingResource, MessagingSendError, MessagingValidationError, type ModelAvailability, type ModelOverrides, type ModelPreferenceCreate, type ModelPreferencesBulkUpdate, ModelPreferencesResource, type ModelProvider, type ModelType, NetworkDistance, NoDataSourcesError, NotFoundError, OutreachMethod, type PaginationInfo, type PaginationParams, PeopleDataSource, PeopleResource, type PeopleSearchRequest, type PeopleSearchResponse, type PersonResult, type Plan, type ProcessingStatus, type ProcessingStatusResponse, type ProgressEntry, ProgressTracker, type ProspectConnectionCheck, type ProspectInfo, type ProspectSyncIdentifier, type ProspectSyncResult, ProviderType, QueueItemStatus, type QuickPeopleSearchOutput, RateLimitError, type RateLimitErrorOptions, type ResponseArtifact, type ResponseListResponse, type ResponseObject, type ResponseStatus, ResponsesResource, type SalaryRange, type Scope, type SelectedSkill, type SendMessageRequest, type SendMessageResponse, type SendReplyRequest, type SendResult, type SkillAnalyticsRequest, type SkillEffectivenessMetrics, type SkillGuidelineBase, type SkillGuidelineCreate, type SkillGuidelineListResponse, type SkillGuidelineResponse, type SkillGuidelineUpdate, type SkillRetrievalMetadata, type SkillUsageBase, type SkillUsageCreate, type SkillUsageListResponse, type SkillUsageResponse, type SkillUsageUpdate, SkillsResource, SourcesNotAvailableError, type SpecializedAgentParams, type SpecializedAgentType, type StoreApiKeyRequest, type SyncJobResponse, SyncJobStatus, type SyncProspectRequest, type SyncProspectResponse, type SyncRequest, type SyncStats, type TenantDetailsResponse, TenantInfoResource, type TenantModelPreference, type TenantModelPreferencesResponse, type TestConnectionResponse, type ThreadListResponse, type ThreadObject, type ThreadResponsesParams, ThreadsResource, type ToolInfo, type UUID, type UnlinkConversationsResponse, type UpdateAppStatusParams, type UpdateAppStatusResponse, type UpdateLinkedInSubscriptionRequest, type UpdateThreadRequest, type UserConnectionsResponse, type UserCreateRequest, type UserDeleteResponse, type UserIdentifier, type UserListResponse, type UserResponse, type UserUpdateRequest, UsersResource, ValidationError, type WebhookEvent, type WebhookPayload, displayProgress, formatProgressEntry, verifyWebhookSignature };
|
package/dist/index.d.mts
CHANGED
|
@@ -1626,6 +1626,29 @@ interface BatchSendResponse {
|
|
|
1626
1626
|
failed: number;
|
|
1627
1627
|
queued: number;
|
|
1628
1628
|
}
|
|
1629
|
+
/**
|
|
1630
|
+
* Response from deleting a single conversation
|
|
1631
|
+
*/
|
|
1632
|
+
interface DeleteConversationResponse {
|
|
1633
|
+
success: boolean;
|
|
1634
|
+
conversation_id: string;
|
|
1635
|
+
}
|
|
1636
|
+
/**
|
|
1637
|
+
* Response from deleting conversations by project
|
|
1638
|
+
*/
|
|
1639
|
+
interface DeleteConversationsByProjectResponse {
|
|
1640
|
+
success: boolean;
|
|
1641
|
+
project_id: string;
|
|
1642
|
+
deleted_count: number;
|
|
1643
|
+
}
|
|
1644
|
+
/**
|
|
1645
|
+
* Response from unlinking conversations from project
|
|
1646
|
+
*/
|
|
1647
|
+
interface UnlinkConversationsResponse {
|
|
1648
|
+
success: boolean;
|
|
1649
|
+
project_id: string;
|
|
1650
|
+
unlinked_count: number;
|
|
1651
|
+
}
|
|
1629
1652
|
|
|
1630
1653
|
declare class MessagingResource {
|
|
1631
1654
|
private readonly http;
|
|
@@ -1728,6 +1751,38 @@ declare class MessagingResource {
|
|
|
1728
1751
|
* Send multiple drafts with rate limiting
|
|
1729
1752
|
*/
|
|
1730
1753
|
sendBatchDrafts(userId: string, request: BatchSendRequest): Promise<BatchSendResponse>;
|
|
1754
|
+
/**
|
|
1755
|
+
* Delete a single conversation and all its messages.
|
|
1756
|
+
*
|
|
1757
|
+
* @param conversationId - UUID of the conversation to delete
|
|
1758
|
+
* @param userId - User ID or email
|
|
1759
|
+
* @returns DeleteConversationResponse with success status and conversation_id
|
|
1760
|
+
* @throws MessagingNotFoundError if conversation not found (404)
|
|
1761
|
+
* @throws MessagingValidationError if conversation_id is invalid (400)
|
|
1762
|
+
*/
|
|
1763
|
+
deleteConversation(conversationId: string, userId: string): Promise<DeleteConversationResponse>;
|
|
1764
|
+
/**
|
|
1765
|
+
* Delete all conversations for a project.
|
|
1766
|
+
*
|
|
1767
|
+
* **Warning:** This permanently deletes conversations and messages.
|
|
1768
|
+
* Consider using unlinkConversationsFromProject() instead.
|
|
1769
|
+
*
|
|
1770
|
+
* @param projectId - UUID of the project
|
|
1771
|
+
* @param userId - User ID or email
|
|
1772
|
+
* @returns DeleteConversationsByProjectResponse with deleted count
|
|
1773
|
+
*/
|
|
1774
|
+
deleteConversationsByProject(projectId: string, userId: string): Promise<DeleteConversationsByProjectResponse>;
|
|
1775
|
+
/**
|
|
1776
|
+
* Unlink conversations from a project without deleting them.
|
|
1777
|
+
*
|
|
1778
|
+
* This preserves conversation history by setting project_id = NULL.
|
|
1779
|
+
* Recommended approach when deleting a project.
|
|
1780
|
+
*
|
|
1781
|
+
* @param projectId - UUID of the project
|
|
1782
|
+
* @param userId - User ID or email
|
|
1783
|
+
* @returns UnlinkConversationsResponse with unlinked count
|
|
1784
|
+
*/
|
|
1785
|
+
unlinkConversationsFromProject(projectId: string, userId: string): Promise<UnlinkConversationsResponse>;
|
|
1731
1786
|
}
|
|
1732
1787
|
|
|
1733
1788
|
declare class ModelPreferencesResource {
|
|
@@ -2320,4 +2375,4 @@ declare class ProgressTracker {
|
|
|
2320
2375
|
*/
|
|
2321
2376
|
declare function verifyWebhookSignature(payload: string, signature: string, secret: string): boolean;
|
|
2322
2377
|
|
|
2323
|
-
export { type AgentConfig, type ApiKeyMode, type ApiKeyModeRequest, type ApiKeyModeResponse, type ApiProvider, type AppEnabledResponse, type AppliedFilters, type AppsListResponse, type ArtifactObject, type ArtifactsListResponse, AuthenticationError, type BaseResource, type BatchCheckConnectionRequest, type BatchConnectionRequest, type BatchConnectionResponse, type BatchConnectionStatus, type BatchConnectionStatusResponse, type BatchDraftRequest, type BatchDraftResponse, type BatchSendRequest, type BatchSendResponse, type BillingStatus, type BulkDeleteRequest, type BulkDeleteResponse, type BulkUploadResponse, type CancelResponseResponse, ChannelType, type CheckAppEnabledParams, type CheckLinkedInConnectionRequest, type ChunkingStrategy, type ConnectionAcceptedData, type ConnectionCallbackRequest, type ConnectionCallbackResponse, type ConnectionInfo, type ConnectionStatus, type ConnectionStatusResponse, type ConnectionSummary, type ContentType, type ConversationDetail, ConversationStatus, type ConversationSummary, type CreateDraftRequest, type CreateFeedbackRequest, type CreateFeedbackResponse, type CreateResponseRequest, type CreateResponseResponse, type CreateThreadRequest, type DatabaseStatus, type DeleteApiKeyResponse, type DisconnectRequest, type DisconnectResponse, type DraftResponse, DraftStatus, type DuplicateHandling, type Email, type EmailThreadSummary, type ErrorResponse, ExternalAPIKeysResource, type ExternalApiKeyResponse, type FeedbackListResponse, type FeedbackObject, type FeedbackType, type FileAttachment, type FileChunk, type FileContentResponse, type FileListResponse, type FileMetadata, type FileScope, type FileScopeUpdateRequest, type FileSearchRequest, type FileSearchResponse, type FileSearchResult, type FileStatisticsResponse, type FileUploadResponse, FilesResource, type FilterLogic, type FilterValue, type GetConnectionStatusParams, type GetToolsRequest, type GetToolsResponse, type GetUserConnectionsParams, type InitiateConnectionRequest, type InitiateConnectionResponse, IntegrationsResource, InternalServerError, type LinkedInConnectionStatus, type LinkedInCreditsResponse, type LinkedInSendRequest, LinkedInSubscriptionType, type ListProvidersResponse, LocalFileNotSupportedError, LumnisClient, type LumnisClientOptions, LumnisError, type LumnisErrorOptions, type MCPScope, type MCPServerCreateRequest, type MCPServerListResponse, type MCPServerResponse, type MCPServerUpdateRequest, MCPServersResource, type MCPToolListResponse, type MCPToolResponse, type MCPTransport, type Message, type MessageReceivedData, type MessageResponse, type MessageSentData, MessageType, MessagingAPIError, MessagingConnectionError, MessagingNotFoundError, MessagingResource, MessagingSendError, MessagingValidationError, type ModelAvailability, type ModelOverrides, type ModelPreferenceCreate, type ModelPreferencesBulkUpdate, ModelPreferencesResource, type ModelProvider, type ModelType, NetworkDistance, NoDataSourcesError, NotFoundError, OutreachMethod, type PaginationInfo, type PaginationParams, PeopleDataSource, PeopleResource, type PeopleSearchRequest, type PeopleSearchResponse, type PersonResult, type Plan, type ProcessingStatus, type ProcessingStatusResponse, type ProgressEntry, ProgressTracker, type ProspectConnectionCheck, type ProspectInfo, type ProspectSyncIdentifier, type ProspectSyncResult, ProviderType, QueueItemStatus, type QuickPeopleSearchOutput, RateLimitError, type RateLimitErrorOptions, type ResponseArtifact, type ResponseListResponse, type ResponseObject, type ResponseStatus, ResponsesResource, type SalaryRange, type Scope, type SelectedSkill, type SendMessageRequest, type SendMessageResponse, type SendReplyRequest, type SendResult, type SkillAnalyticsRequest, type SkillEffectivenessMetrics, type SkillGuidelineBase, type SkillGuidelineCreate, type SkillGuidelineListResponse, type SkillGuidelineResponse, type SkillGuidelineUpdate, type SkillRetrievalMetadata, type SkillUsageBase, type SkillUsageCreate, type SkillUsageListResponse, type SkillUsageResponse, type SkillUsageUpdate, SkillsResource, SourcesNotAvailableError, type SpecializedAgentParams, type SpecializedAgentType, type StoreApiKeyRequest, type SyncJobResponse, SyncJobStatus, type SyncProspectRequest, type SyncProspectResponse, type SyncRequest, type SyncStats, type TenantDetailsResponse, TenantInfoResource, type TenantModelPreference, type TenantModelPreferencesResponse, type TestConnectionResponse, type ThreadListResponse, type ThreadObject, type ThreadResponsesParams, ThreadsResource, type ToolInfo, type UUID, type UpdateAppStatusParams, type UpdateAppStatusResponse, type UpdateLinkedInSubscriptionRequest, type UpdateThreadRequest, type UserConnectionsResponse, type UserCreateRequest, type UserDeleteResponse, type UserIdentifier, type UserListResponse, type UserResponse, type UserUpdateRequest, UsersResource, ValidationError, type WebhookEvent, type WebhookPayload, LumnisClient as default, displayProgress, formatProgressEntry, verifyWebhookSignature };
|
|
2378
|
+
export { type AgentConfig, type ApiKeyMode, type ApiKeyModeRequest, type ApiKeyModeResponse, type ApiProvider, type AppEnabledResponse, type AppliedFilters, type AppsListResponse, type ArtifactObject, type ArtifactsListResponse, AuthenticationError, type BaseResource, type BatchCheckConnectionRequest, type BatchConnectionRequest, type BatchConnectionResponse, type BatchConnectionStatus, type BatchConnectionStatusResponse, type BatchDraftRequest, type BatchDraftResponse, type BatchSendRequest, type BatchSendResponse, type BillingStatus, type BulkDeleteRequest, type BulkDeleteResponse, type BulkUploadResponse, type CancelResponseResponse, ChannelType, type CheckAppEnabledParams, type CheckLinkedInConnectionRequest, type ChunkingStrategy, type ConnectionAcceptedData, type ConnectionCallbackRequest, type ConnectionCallbackResponse, type ConnectionInfo, type ConnectionStatus, type ConnectionStatusResponse, type ConnectionSummary, type ContentType, type ConversationDetail, ConversationStatus, type ConversationSummary, type CreateDraftRequest, type CreateFeedbackRequest, type CreateFeedbackResponse, type CreateResponseRequest, type CreateResponseResponse, type CreateThreadRequest, type DatabaseStatus, type DeleteApiKeyResponse, type DeleteConversationResponse, type DeleteConversationsByProjectResponse, type DisconnectRequest, type DisconnectResponse, type DraftResponse, DraftStatus, type DuplicateHandling, type Email, type EmailThreadSummary, type ErrorResponse, ExternalAPIKeysResource, type ExternalApiKeyResponse, type FeedbackListResponse, type FeedbackObject, type FeedbackType, type FileAttachment, type FileChunk, type FileContentResponse, type FileListResponse, type FileMetadata, type FileScope, type FileScopeUpdateRequest, type FileSearchRequest, type FileSearchResponse, type FileSearchResult, type FileStatisticsResponse, type FileUploadResponse, FilesResource, type FilterLogic, type FilterValue, type GetConnectionStatusParams, type GetToolsRequest, type GetToolsResponse, type GetUserConnectionsParams, type InitiateConnectionRequest, type InitiateConnectionResponse, IntegrationsResource, InternalServerError, type LinkedInConnectionStatus, type LinkedInCreditsResponse, type LinkedInSendRequest, LinkedInSubscriptionType, type ListProvidersResponse, LocalFileNotSupportedError, LumnisClient, type LumnisClientOptions, LumnisError, type LumnisErrorOptions, type MCPScope, type MCPServerCreateRequest, type MCPServerListResponse, type MCPServerResponse, type MCPServerUpdateRequest, MCPServersResource, type MCPToolListResponse, type MCPToolResponse, type MCPTransport, type Message, type MessageReceivedData, type MessageResponse, type MessageSentData, MessageType, MessagingAPIError, MessagingConnectionError, MessagingNotFoundError, MessagingResource, MessagingSendError, MessagingValidationError, type ModelAvailability, type ModelOverrides, type ModelPreferenceCreate, type ModelPreferencesBulkUpdate, ModelPreferencesResource, type ModelProvider, type ModelType, NetworkDistance, NoDataSourcesError, NotFoundError, OutreachMethod, type PaginationInfo, type PaginationParams, PeopleDataSource, PeopleResource, type PeopleSearchRequest, type PeopleSearchResponse, type PersonResult, type Plan, type ProcessingStatus, type ProcessingStatusResponse, type ProgressEntry, ProgressTracker, type ProspectConnectionCheck, type ProspectInfo, type ProspectSyncIdentifier, type ProspectSyncResult, ProviderType, QueueItemStatus, type QuickPeopleSearchOutput, RateLimitError, type RateLimitErrorOptions, type ResponseArtifact, type ResponseListResponse, type ResponseObject, type ResponseStatus, ResponsesResource, type SalaryRange, type Scope, type SelectedSkill, type SendMessageRequest, type SendMessageResponse, type SendReplyRequest, type SendResult, type SkillAnalyticsRequest, type SkillEffectivenessMetrics, type SkillGuidelineBase, type SkillGuidelineCreate, type SkillGuidelineListResponse, type SkillGuidelineResponse, type SkillGuidelineUpdate, type SkillRetrievalMetadata, type SkillUsageBase, type SkillUsageCreate, type SkillUsageListResponse, type SkillUsageResponse, type SkillUsageUpdate, SkillsResource, SourcesNotAvailableError, type SpecializedAgentParams, type SpecializedAgentType, type StoreApiKeyRequest, type SyncJobResponse, SyncJobStatus, type SyncProspectRequest, type SyncProspectResponse, type SyncRequest, type SyncStats, type TenantDetailsResponse, TenantInfoResource, type TenantModelPreference, type TenantModelPreferencesResponse, type TestConnectionResponse, type ThreadListResponse, type ThreadObject, type ThreadResponsesParams, ThreadsResource, type ToolInfo, type UUID, type UnlinkConversationsResponse, type UpdateAppStatusParams, type UpdateAppStatusResponse, type UpdateLinkedInSubscriptionRequest, type UpdateThreadRequest, type UserConnectionsResponse, type UserCreateRequest, type UserDeleteResponse, type UserIdentifier, type UserListResponse, type UserResponse, type UserUpdateRequest, UsersResource, ValidationError, type WebhookEvent, type WebhookPayload, LumnisClient as default, displayProgress, formatProgressEntry, verifyWebhookSignature };
|
package/dist/index.d.ts
CHANGED
|
@@ -1626,6 +1626,29 @@ interface BatchSendResponse {
|
|
|
1626
1626
|
failed: number;
|
|
1627
1627
|
queued: number;
|
|
1628
1628
|
}
|
|
1629
|
+
/**
|
|
1630
|
+
* Response from deleting a single conversation
|
|
1631
|
+
*/
|
|
1632
|
+
interface DeleteConversationResponse {
|
|
1633
|
+
success: boolean;
|
|
1634
|
+
conversation_id: string;
|
|
1635
|
+
}
|
|
1636
|
+
/**
|
|
1637
|
+
* Response from deleting conversations by project
|
|
1638
|
+
*/
|
|
1639
|
+
interface DeleteConversationsByProjectResponse {
|
|
1640
|
+
success: boolean;
|
|
1641
|
+
project_id: string;
|
|
1642
|
+
deleted_count: number;
|
|
1643
|
+
}
|
|
1644
|
+
/**
|
|
1645
|
+
* Response from unlinking conversations from project
|
|
1646
|
+
*/
|
|
1647
|
+
interface UnlinkConversationsResponse {
|
|
1648
|
+
success: boolean;
|
|
1649
|
+
project_id: string;
|
|
1650
|
+
unlinked_count: number;
|
|
1651
|
+
}
|
|
1629
1652
|
|
|
1630
1653
|
declare class MessagingResource {
|
|
1631
1654
|
private readonly http;
|
|
@@ -1728,6 +1751,38 @@ declare class MessagingResource {
|
|
|
1728
1751
|
* Send multiple drafts with rate limiting
|
|
1729
1752
|
*/
|
|
1730
1753
|
sendBatchDrafts(userId: string, request: BatchSendRequest): Promise<BatchSendResponse>;
|
|
1754
|
+
/**
|
|
1755
|
+
* Delete a single conversation and all its messages.
|
|
1756
|
+
*
|
|
1757
|
+
* @param conversationId - UUID of the conversation to delete
|
|
1758
|
+
* @param userId - User ID or email
|
|
1759
|
+
* @returns DeleteConversationResponse with success status and conversation_id
|
|
1760
|
+
* @throws MessagingNotFoundError if conversation not found (404)
|
|
1761
|
+
* @throws MessagingValidationError if conversation_id is invalid (400)
|
|
1762
|
+
*/
|
|
1763
|
+
deleteConversation(conversationId: string, userId: string): Promise<DeleteConversationResponse>;
|
|
1764
|
+
/**
|
|
1765
|
+
* Delete all conversations for a project.
|
|
1766
|
+
*
|
|
1767
|
+
* **Warning:** This permanently deletes conversations and messages.
|
|
1768
|
+
* Consider using unlinkConversationsFromProject() instead.
|
|
1769
|
+
*
|
|
1770
|
+
* @param projectId - UUID of the project
|
|
1771
|
+
* @param userId - User ID or email
|
|
1772
|
+
* @returns DeleteConversationsByProjectResponse with deleted count
|
|
1773
|
+
*/
|
|
1774
|
+
deleteConversationsByProject(projectId: string, userId: string): Promise<DeleteConversationsByProjectResponse>;
|
|
1775
|
+
/**
|
|
1776
|
+
* Unlink conversations from a project without deleting them.
|
|
1777
|
+
*
|
|
1778
|
+
* This preserves conversation history by setting project_id = NULL.
|
|
1779
|
+
* Recommended approach when deleting a project.
|
|
1780
|
+
*
|
|
1781
|
+
* @param projectId - UUID of the project
|
|
1782
|
+
* @param userId - User ID or email
|
|
1783
|
+
* @returns UnlinkConversationsResponse with unlinked count
|
|
1784
|
+
*/
|
|
1785
|
+
unlinkConversationsFromProject(projectId: string, userId: string): Promise<UnlinkConversationsResponse>;
|
|
1731
1786
|
}
|
|
1732
1787
|
|
|
1733
1788
|
declare class ModelPreferencesResource {
|
|
@@ -2321,4 +2376,4 @@ declare class ProgressTracker {
|
|
|
2321
2376
|
declare function verifyWebhookSignature(payload: string, signature: string, secret: string): boolean;
|
|
2322
2377
|
|
|
2323
2378
|
export = LumnisClient;
|
|
2324
|
-
export { type AgentConfig, type ApiKeyMode, type ApiKeyModeRequest, type ApiKeyModeResponse, type ApiProvider, type AppEnabledResponse, type AppliedFilters, type AppsListResponse, type ArtifactObject, type ArtifactsListResponse, AuthenticationError, type BaseResource, type BatchCheckConnectionRequest, type BatchConnectionRequest, type BatchConnectionResponse, type BatchConnectionStatus, type BatchConnectionStatusResponse, type BatchDraftRequest, type BatchDraftResponse, type BatchSendRequest, type BatchSendResponse, type BillingStatus, type BulkDeleteRequest, type BulkDeleteResponse, type BulkUploadResponse, type CancelResponseResponse, ChannelType, type CheckAppEnabledParams, type CheckLinkedInConnectionRequest, type ChunkingStrategy, type ConnectionAcceptedData, type ConnectionCallbackRequest, type ConnectionCallbackResponse, type ConnectionInfo, type ConnectionStatus, type ConnectionStatusResponse, type ConnectionSummary, type ContentType, type ConversationDetail, ConversationStatus, type ConversationSummary, type CreateDraftRequest, type CreateFeedbackRequest, type CreateFeedbackResponse, type CreateResponseRequest, type CreateResponseResponse, type CreateThreadRequest, type DatabaseStatus, type DeleteApiKeyResponse, type DisconnectRequest, type DisconnectResponse, type DraftResponse, DraftStatus, type DuplicateHandling, type Email, type EmailThreadSummary, type ErrorResponse, ExternalAPIKeysResource, type ExternalApiKeyResponse, type FeedbackListResponse, type FeedbackObject, type FeedbackType, type FileAttachment, type FileChunk, type FileContentResponse, type FileListResponse, type FileMetadata, type FileScope, type FileScopeUpdateRequest, type FileSearchRequest, type FileSearchResponse, type FileSearchResult, type FileStatisticsResponse, type FileUploadResponse, FilesResource, type FilterLogic, type FilterValue, type GetConnectionStatusParams, type GetToolsRequest, type GetToolsResponse, type GetUserConnectionsParams, type InitiateConnectionRequest, type InitiateConnectionResponse, IntegrationsResource, InternalServerError, type LinkedInConnectionStatus, type LinkedInCreditsResponse, type LinkedInSendRequest, LinkedInSubscriptionType, type ListProvidersResponse, LocalFileNotSupportedError, LumnisClient, type LumnisClientOptions, LumnisError, type LumnisErrorOptions, type MCPScope, type MCPServerCreateRequest, type MCPServerListResponse, type MCPServerResponse, type MCPServerUpdateRequest, MCPServersResource, type MCPToolListResponse, type MCPToolResponse, type MCPTransport, type Message, type MessageReceivedData, type MessageResponse, type MessageSentData, MessageType, MessagingAPIError, MessagingConnectionError, MessagingNotFoundError, MessagingResource, MessagingSendError, MessagingValidationError, type ModelAvailability, type ModelOverrides, type ModelPreferenceCreate, type ModelPreferencesBulkUpdate, ModelPreferencesResource, type ModelProvider, type ModelType, NetworkDistance, NoDataSourcesError, NotFoundError, OutreachMethod, type PaginationInfo, type PaginationParams, PeopleDataSource, PeopleResource, type PeopleSearchRequest, type PeopleSearchResponse, type PersonResult, type Plan, type ProcessingStatus, type ProcessingStatusResponse, type ProgressEntry, ProgressTracker, type ProspectConnectionCheck, type ProspectInfo, type ProspectSyncIdentifier, type ProspectSyncResult, ProviderType, QueueItemStatus, type QuickPeopleSearchOutput, RateLimitError, type RateLimitErrorOptions, type ResponseArtifact, type ResponseListResponse, type ResponseObject, type ResponseStatus, ResponsesResource, type SalaryRange, type Scope, type SelectedSkill, type SendMessageRequest, type SendMessageResponse, type SendReplyRequest, type SendResult, type SkillAnalyticsRequest, type SkillEffectivenessMetrics, type SkillGuidelineBase, type SkillGuidelineCreate, type SkillGuidelineListResponse, type SkillGuidelineResponse, type SkillGuidelineUpdate, type SkillRetrievalMetadata, type SkillUsageBase, type SkillUsageCreate, type SkillUsageListResponse, type SkillUsageResponse, type SkillUsageUpdate, SkillsResource, SourcesNotAvailableError, type SpecializedAgentParams, type SpecializedAgentType, type StoreApiKeyRequest, type SyncJobResponse, SyncJobStatus, type SyncProspectRequest, type SyncProspectResponse, type SyncRequest, type SyncStats, type TenantDetailsResponse, TenantInfoResource, type TenantModelPreference, type TenantModelPreferencesResponse, type TestConnectionResponse, type ThreadListResponse, type ThreadObject, type ThreadResponsesParams, ThreadsResource, type ToolInfo, type UUID, type UpdateAppStatusParams, type UpdateAppStatusResponse, type UpdateLinkedInSubscriptionRequest, type UpdateThreadRequest, type UserConnectionsResponse, type UserCreateRequest, type UserDeleteResponse, type UserIdentifier, type UserListResponse, type UserResponse, type UserUpdateRequest, UsersResource, ValidationError, type WebhookEvent, type WebhookPayload, displayProgress, formatProgressEntry, verifyWebhookSignature };
|
|
2379
|
+
export { type AgentConfig, type ApiKeyMode, type ApiKeyModeRequest, type ApiKeyModeResponse, type ApiProvider, type AppEnabledResponse, type AppliedFilters, type AppsListResponse, type ArtifactObject, type ArtifactsListResponse, AuthenticationError, type BaseResource, type BatchCheckConnectionRequest, type BatchConnectionRequest, type BatchConnectionResponse, type BatchConnectionStatus, type BatchConnectionStatusResponse, type BatchDraftRequest, type BatchDraftResponse, type BatchSendRequest, type BatchSendResponse, type BillingStatus, type BulkDeleteRequest, type BulkDeleteResponse, type BulkUploadResponse, type CancelResponseResponse, ChannelType, type CheckAppEnabledParams, type CheckLinkedInConnectionRequest, type ChunkingStrategy, type ConnectionAcceptedData, type ConnectionCallbackRequest, type ConnectionCallbackResponse, type ConnectionInfo, type ConnectionStatus, type ConnectionStatusResponse, type ConnectionSummary, type ContentType, type ConversationDetail, ConversationStatus, type ConversationSummary, type CreateDraftRequest, type CreateFeedbackRequest, type CreateFeedbackResponse, type CreateResponseRequest, type CreateResponseResponse, type CreateThreadRequest, type DatabaseStatus, type DeleteApiKeyResponse, type DeleteConversationResponse, type DeleteConversationsByProjectResponse, type DisconnectRequest, type DisconnectResponse, type DraftResponse, DraftStatus, type DuplicateHandling, type Email, type EmailThreadSummary, type ErrorResponse, ExternalAPIKeysResource, type ExternalApiKeyResponse, type FeedbackListResponse, type FeedbackObject, type FeedbackType, type FileAttachment, type FileChunk, type FileContentResponse, type FileListResponse, type FileMetadata, type FileScope, type FileScopeUpdateRequest, type FileSearchRequest, type FileSearchResponse, type FileSearchResult, type FileStatisticsResponse, type FileUploadResponse, FilesResource, type FilterLogic, type FilterValue, type GetConnectionStatusParams, type GetToolsRequest, type GetToolsResponse, type GetUserConnectionsParams, type InitiateConnectionRequest, type InitiateConnectionResponse, IntegrationsResource, InternalServerError, type LinkedInConnectionStatus, type LinkedInCreditsResponse, type LinkedInSendRequest, LinkedInSubscriptionType, type ListProvidersResponse, LocalFileNotSupportedError, LumnisClient, type LumnisClientOptions, LumnisError, type LumnisErrorOptions, type MCPScope, type MCPServerCreateRequest, type MCPServerListResponse, type MCPServerResponse, type MCPServerUpdateRequest, MCPServersResource, type MCPToolListResponse, type MCPToolResponse, type MCPTransport, type Message, type MessageReceivedData, type MessageResponse, type MessageSentData, MessageType, MessagingAPIError, MessagingConnectionError, MessagingNotFoundError, MessagingResource, MessagingSendError, MessagingValidationError, type ModelAvailability, type ModelOverrides, type ModelPreferenceCreate, type ModelPreferencesBulkUpdate, ModelPreferencesResource, type ModelProvider, type ModelType, NetworkDistance, NoDataSourcesError, NotFoundError, OutreachMethod, type PaginationInfo, type PaginationParams, PeopleDataSource, PeopleResource, type PeopleSearchRequest, type PeopleSearchResponse, type PersonResult, type Plan, type ProcessingStatus, type ProcessingStatusResponse, type ProgressEntry, ProgressTracker, type ProspectConnectionCheck, type ProspectInfo, type ProspectSyncIdentifier, type ProspectSyncResult, ProviderType, QueueItemStatus, type QuickPeopleSearchOutput, RateLimitError, type RateLimitErrorOptions, type ResponseArtifact, type ResponseListResponse, type ResponseObject, type ResponseStatus, ResponsesResource, type SalaryRange, type Scope, type SelectedSkill, type SendMessageRequest, type SendMessageResponse, type SendReplyRequest, type SendResult, type SkillAnalyticsRequest, type SkillEffectivenessMetrics, type SkillGuidelineBase, type SkillGuidelineCreate, type SkillGuidelineListResponse, type SkillGuidelineResponse, type SkillGuidelineUpdate, type SkillRetrievalMetadata, type SkillUsageBase, type SkillUsageCreate, type SkillUsageListResponse, type SkillUsageResponse, type SkillUsageUpdate, SkillsResource, SourcesNotAvailableError, type SpecializedAgentParams, type SpecializedAgentType, type StoreApiKeyRequest, type SyncJobResponse, SyncJobStatus, type SyncProspectRequest, type SyncProspectResponse, type SyncRequest, type SyncStats, type TenantDetailsResponse, TenantInfoResource, type TenantModelPreference, type TenantModelPreferencesResponse, type TestConnectionResponse, type ThreadListResponse, type ThreadObject, type ThreadResponsesParams, ThreadsResource, type ToolInfo, type UUID, type UnlinkConversationsResponse, type UpdateAppStatusParams, type UpdateAppStatusResponse, type UpdateLinkedInSubscriptionRequest, type UpdateThreadRequest, type UserConnectionsResponse, type UserCreateRequest, type UserDeleteResponse, type UserIdentifier, type UserListResponse, type UserResponse, type UserUpdateRequest, UsersResource, ValidationError, type WebhookEvent, type WebhookPayload, displayProgress, formatProgressEntry, verifyWebhookSignature };
|
package/dist/index.mjs
CHANGED
|
@@ -749,6 +749,73 @@ class MessagingResource {
|
|
|
749
749
|
request
|
|
750
750
|
);
|
|
751
751
|
}
|
|
752
|
+
/**
|
|
753
|
+
* Delete a single conversation and all its messages.
|
|
754
|
+
*
|
|
755
|
+
* @param conversationId - UUID of the conversation to delete
|
|
756
|
+
* @param userId - User ID or email
|
|
757
|
+
* @returns DeleteConversationResponse with success status and conversation_id
|
|
758
|
+
* @throws MessagingNotFoundError if conversation not found (404)
|
|
759
|
+
* @throws MessagingValidationError if conversation_id is invalid (400)
|
|
760
|
+
*/
|
|
761
|
+
async deleteConversation(conversationId, userId) {
|
|
762
|
+
try {
|
|
763
|
+
const queryParams = new URLSearchParams();
|
|
764
|
+
queryParams.append("user_id", userId);
|
|
765
|
+
return await this.http.delete(
|
|
766
|
+
`/messaging/conversations/${encodeURIComponent(conversationId)}?${queryParams.toString()}`
|
|
767
|
+
);
|
|
768
|
+
} catch (error) {
|
|
769
|
+
if (error instanceof NotFoundError) {
|
|
770
|
+
throw new MessagingNotFoundError(
|
|
771
|
+
`Conversation ${conversationId} not found`
|
|
772
|
+
);
|
|
773
|
+
}
|
|
774
|
+
if (error instanceof ValidationError) {
|
|
775
|
+
throw new MessagingValidationError(
|
|
776
|
+
`Invalid conversation ID: ${conversationId}`
|
|
777
|
+
);
|
|
778
|
+
}
|
|
779
|
+
throw error;
|
|
780
|
+
}
|
|
781
|
+
}
|
|
782
|
+
/**
|
|
783
|
+
* Delete all conversations for a project.
|
|
784
|
+
*
|
|
785
|
+
* **Warning:** This permanently deletes conversations and messages.
|
|
786
|
+
* Consider using unlinkConversationsFromProject() instead.
|
|
787
|
+
*
|
|
788
|
+
* @param projectId - UUID of the project
|
|
789
|
+
* @param userId - User ID or email
|
|
790
|
+
* @returns DeleteConversationsByProjectResponse with deleted count
|
|
791
|
+
*/
|
|
792
|
+
async deleteConversationsByProject(projectId, userId) {
|
|
793
|
+
const queryParams = new URLSearchParams();
|
|
794
|
+
queryParams.append("project_id", projectId);
|
|
795
|
+
queryParams.append("user_id", userId);
|
|
796
|
+
return this.http.delete(
|
|
797
|
+
`/messaging/conversations?${queryParams.toString()}`
|
|
798
|
+
);
|
|
799
|
+
}
|
|
800
|
+
/**
|
|
801
|
+
* Unlink conversations from a project without deleting them.
|
|
802
|
+
*
|
|
803
|
+
* This preserves conversation history by setting project_id = NULL.
|
|
804
|
+
* Recommended approach when deleting a project.
|
|
805
|
+
*
|
|
806
|
+
* @param projectId - UUID of the project
|
|
807
|
+
* @param userId - User ID or email
|
|
808
|
+
* @returns UnlinkConversationsResponse with unlinked count
|
|
809
|
+
*/
|
|
810
|
+
async unlinkConversationsFromProject(projectId, userId) {
|
|
811
|
+
const queryParams = new URLSearchParams();
|
|
812
|
+
queryParams.append("project_id", projectId);
|
|
813
|
+
queryParams.append("user_id", userId);
|
|
814
|
+
return this.http.post(
|
|
815
|
+
`/messaging/conversations/unlink-project?${queryParams.toString()}`,
|
|
816
|
+
null
|
|
817
|
+
);
|
|
818
|
+
}
|
|
752
819
|
}
|
|
753
820
|
|
|
754
821
|
class ModelPreferencesResource {
|