@cossistant/types 0.0.31 → 0.0.32
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/api/ai-agent.d.ts +127 -1
- package/api/ai-agent.d.ts.map +1 -1
- package/api/ai-agent.js +125 -1
- package/api/ai-agent.js.map +1 -1
- package/api/common.d.ts.map +1 -1
- package/api/contact.d.ts.map +1 -1
- package/api/conversation.d.ts +6 -0
- package/api/conversation.d.ts.map +1 -1
- package/api/conversation.js +1 -0
- package/api/conversation.js.map +1 -1
- package/api/feedback.d.ts +98 -0
- package/api/feedback.d.ts.map +1 -0
- package/api/feedback.js +68 -0
- package/api/feedback.js.map +1 -0
- package/api/index.d.ts +3 -2
- package/api/index.js +3 -2
- package/api/link-source.d.ts +4 -4
- package/api/link-source.d.ts.map +1 -1
- package/api/timeline-item.d.ts +3 -0
- package/api/timeline-item.d.ts.map +1 -1
- package/api/timeline-item.js +3 -2
- package/api/timeline-item.js.map +1 -1
- package/enums.d.ts +1 -0
- package/enums.d.ts.map +1 -1
- package/enums.js +2 -1
- package/enums.js.map +1 -1
- package/index.d.ts +3 -2
- package/index.d.ts.map +1 -1
- package/index.js +3 -2
- package/package.json +1 -1
- package/realtime-events.d.ts +22 -1
- package/realtime-events.d.ts.map +1 -1
- package/realtime-events.js +22 -4
- package/realtime-events.js.map +1 -1
- package/schemas.d.ts +1 -0
- package/schemas.d.ts.map +1 -1
- package/trpc/conversation.d.ts +4 -0
- package/trpc/conversation.d.ts.map +1 -1
package/index.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { AIAgentGoal, AIModel, AIModelConfig, AI_AGENT_GOALS, AI_MODELS, AiAgentBehaviorSettings, AiAgentResponse, CreateAiAgentRequest, DeleteAiAgentRequest, GenerateBasePromptRequest, GenerateBasePromptResponse, GetAiAgentRequest, GetBehaviorSettingsRequest, GetBehaviorSettingsResponse, ToggleAiAgentActiveRequest, UpdateAiAgentRequest, UpdateBehaviorSettingsRequest, UpdateBehaviorSettingsResponse, aiAgentBehaviorSettingsSchema, aiAgentResponseSchema, createAiAgentRequestSchema, deleteAiAgentRequestSchema, generateBasePromptRequestSchema, generateBasePromptResponseSchema, getAiAgentRequestSchema, getBehaviorSettingsRequestSchema, getBehaviorSettingsResponseSchema, toggleAiAgentActiveRequestSchema, updateAiAgentRequestSchema, updateBehaviorSettingsRequestSchema, updateBehaviorSettingsResponseSchema } from "./api/ai-agent.js";
|
|
1
|
+
import { AIAgentGoal, AIModel, AIModelConfig, AI_AGENT_CORE_PROMPT_DOCUMENT_NAMES, AI_AGENT_GOALS, AI_MODELS, AiAgentBehaviorSettings, AiAgentCorePromptDocumentName, AiAgentPromptDocumentResponse, AiAgentResponse, CreateAiAgentRequest, CreateSkillDocumentRequest, DeleteAiAgentRequest, DeleteSkillDocumentRequest, GenerateBasePromptRequest, GenerateBasePromptResponse, GetAiAgentRequest, GetBehaviorSettingsRequest, GetBehaviorSettingsResponse, ListPromptDocumentsRequest, ListPromptDocumentsResponse, ToggleAiAgentActiveRequest, ToggleSkillDocumentRequest, UpdateAiAgentRequest, UpdateBehaviorSettingsRequest, UpdateBehaviorSettingsResponse, UpdateSkillDocumentRequest, UpsertCoreDocumentRequest, aiAgentBehaviorSettingsSchema, aiAgentCorePromptDocumentNameSchema, aiAgentPromptDocumentKindSchema, aiAgentPromptDocumentResponseSchema, aiAgentResponseSchema, aiAgentSkillPromptDocumentNameSchema, createAiAgentRequestSchema, createSkillDocumentRequestSchema, deleteAiAgentRequestSchema, deleteSkillDocumentRequestSchema, generateBasePromptRequestSchema, generateBasePromptResponseSchema, getAiAgentRequestSchema, getBehaviorSettingsRequestSchema, getBehaviorSettingsResponseSchema, listPromptDocumentsRequestSchema, listPromptDocumentsResponseSchema, toggleAiAgentActiveRequestSchema, toggleSkillDocumentRequestSchema, updateAiAgentRequestSchema, updateBehaviorSettingsRequestSchema, updateBehaviorSettingsResponseSchema, updateSkillDocumentRequestSchema, upsertCoreDocumentRequestSchema } from "./api/ai-agent.js";
|
|
2
2
|
import { PaginationInput, PaginationResponse, emailSchema, optionalUserIdSchema, paginationResponseSchema, paginationSchema, userIdSchema } from "./api/common.js";
|
|
3
3
|
import { Contact, ContactMetadata, ContactOrganizationResponse, ContactResponse, CreateContactOrganizationRequest, CreateContactRequest, IdentifyContactRequest, IdentifyContactResponse, UpdateContactMetadataRequest, UpdateContactOrganizationRequest, UpdateContactRequest, contactMetadataSchema, contactOrganization, contactOrganizationResponseSchema, contactResponseSchema, createContactOrganizationRequestSchema, createContactRequestSchema, identifyContactRequestSchema, identifyContactResponseSchema, updateContactMetadataRequestSchema, updateContactOrganizationRequestSchema, updateContactRequestSchema } from "./api/contact.js";
|
|
4
4
|
import { CreateConversationRequestBody, CreateConversationResponseBody, GetConversationRequest, GetConversationResponse, GetConversationSeenDataResponse, ListConversationsRequest, ListConversationsResponse, MarkConversationSeenRequestBody, MarkConversationSeenResponseBody, SetConversationTypingRequestBody, SetConversationTypingResponseBody, SubmitConversationRatingRequestBody, SubmitConversationRatingResponseBody, createConversationRequestSchema, createConversationResponseSchema, getConversationRequestSchema, getConversationResponseSchema, getConversationSeenDataResponseSchema, listConversationsRequestSchema, listConversationsResponseSchema, markConversationSeenRequestSchema, markConversationSeenResponseSchema, setConversationTypingRequestSchema, setConversationTypingResponseSchema, submitConversationRatingRequestSchema, submitConversationRatingResponseSchema } from "./api/conversation.js";
|
|
5
|
+
import { Feedback, GetFeedbackResponse, ListFeedbackRequest, ListFeedbackResponse, SubmitFeedbackRequest, SubmitFeedbackResponse, feedbackSchema, getFeedbackResponseSchema, listFeedbackRequestSchema, listFeedbackResponseSchema, submitFeedbackRequestSchema, submitFeedbackResponseSchema } from "./api/feedback.js";
|
|
5
6
|
import { ArticleKnowledgePayload, CreateKnowledgeRequest, CreateKnowledgeRestRequest, DeleteKnowledgeRequest, FaqKnowledgePayload, GetKnowledgeRequest, Knowledge, KnowledgeCreateInput, KnowledgeResponse, KnowledgeType, ListKnowledgeRequest, ListKnowledgeResponse, ListKnowledgeRestRequest, ToggleKnowledgeEntryIncludedRequest, UpdateKnowledgeRequest, UpdateKnowledgeRestRequest, UploadKnowledgeFileRequest, UrlKnowledgePayload, articleKnowledgePayloadSchema, createKnowledgeRequestSchema, createKnowledgeRestRequestSchema, deleteKnowledgeRequestSchema, faqKnowledgePayloadSchema, getKnowledgeRequestSchema, knowledgeCreateSchema, knowledgeResponseSchema, knowledgeSchema, knowledgeTypeSchema, listKnowledgeRequestSchema, listKnowledgeResponseSchema, listKnowledgeRestRequestSchema, toggleKnowledgeEntryIncludedRequestSchema, updateKnowledgeRequestSchema, updateKnowledgeRestRequestSchema, uploadKnowledgeFileRequestSchema, urlKnowledgePayloadSchema } from "./api/knowledge.js";
|
|
6
7
|
import { CancelLinkSourceRequest, CrawlProgressPage, CreateLinkSourceRequest, DeleteLinkSourceRequest, DeletePageRequest, DiscoveredPage, GetCrawlStatusRequest, GetLinkSourceRequest, GetTrainingStatsRequest, IgnorePageRequest, LinkSourceResponse, LinkSourceStatus, ListKnowledgeByLinkSourceRequest, ListLinkSourcesRequest, ListLinkSourcesResponse, RecrawlLinkSourceRequest, ReindexPageRequest, ScanSubpagesRequest, ToggleKnowledgeIncludedRequest, TrainingStatsResponse, cancelLinkSourceRequestSchema, crawlProgressPageSchema, createLinkSourceRequestSchema, deleteLinkSourceRequestSchema, deletePageRequestSchema, discoveredPageSchema, getCrawlStatusRequestSchema, getLinkSourceRequestSchema, getTrainingStatsRequestSchema, ignorePageRequestSchema, linkSourceResponseSchema, linkSourceStatusSchema, listKnowledgeByLinkSourceRequestSchema, listLinkSourcesRequestSchema, listLinkSourcesResponseSchema, recrawlLinkSourceRequestSchema, reindexPageRequestSchema, scanSubpagesRequestSchema, toggleKnowledgeIncludedRequestSchema, trainingStatsResponseSchema } from "./api/link-source.js";
|
|
7
8
|
import { ContactNotificationSettings, MEMBER_NOTIFICATION_CHANNEL_DEFINITIONS, MEMBER_NOTIFICATION_DEFINITION_MAP, MemberNotificationChannel, MemberNotificationChannelDefinition, MemberNotificationPreference, MemberNotificationSettingsResponse, UpdateMemberNotificationSettingsRequest, UpdateMemberNotificationSettingsResponse, contactNotificationChannelConfigSchema, contactNotificationSettingsSchema, getDefaultMemberNotificationPreference, memberNotificationChannelSchema, memberNotificationPreferenceSchema, memberNotificationSettingsResponseSchema, updateMemberNotificationSettingsRequestSchema, updateMemberNotificationSettingsResponseSchema } from "./api/notification.js";
|
|
@@ -40,5 +41,5 @@ type DefaultMessage = {
|
|
|
40
41
|
senderId?: string;
|
|
41
42
|
};
|
|
42
43
|
//#endregion
|
|
43
|
-
export { AIAgentGoal, AIModel, AIModelConfig, AI_AGENT_GOALS, AI_MODELS, APIKeyType, AiAgentBehaviorSettings, AiAgentResponse, AnyRealtimeEvent, ArticleKnowledgePayload, AvailableAIAgent, AvailableAIAgentSchema, AvailableHumanAgent, BlockVisitorResponse, CancelLinkSourceRequest, CheckWebsiteDomainRequest, Contact, ContactDetailResponse, ContactListItem, ContactListVisitorStatus, ContactMetadata, ContactNotificationSettings, ContactOrganizationResponse, ContactResponse, ContactVisitorSummary, type Conversation, ConversationEventType, ConversationHeader, ConversationMutationResponse, ConversationParticipationStatus, ConversationPriority, ConversationRecordResponse, type ConversationSeen, ConversationSentiment, ConversationStatus, ConversationTimelineType, CossistantConfig, CossistantError, CossistantProviderMetadata, CrawlProgressPage, CreateAiAgentRequest, CreateContactOrganizationRequest, CreateContactRequest, CreateConversationRequestBody, CreateConversationResponseBody, CreateKnowledgeRequest, CreateKnowledgeRestRequest, CreateLinkSourceRequest, CreateWebsiteApiKeyRequest, CreateWebsiteRequest, CreateWebsiteResponse, DefaultMessage, DeleteAiAgentRequest, DeleteKnowledgeRequest, DeleteLinkSourceRequest, DeletePageRequest, DiscoveredPage, FaqKnowledgePayload, FilePart, GenerateBasePromptRequest, GenerateBasePromptResponse, GenerateUploadUrlRequest, GenerateUploadUrlResponse, GetAiAgentRequest, GetBehaviorSettingsRequest, GetBehaviorSettingsResponse, GetConversationRequest, GetConversationResponse, GetConversationSeenDataResponse, GetConversationTimelineItemsRequest, GetConversationTimelineItemsResponse, GetCrawlStatusRequest, GetKnowledgeRequest, GetLinkSourceRequest, GetTrainingStatsRequest, IdentifyContactRequest, IdentifyContactResponse, IgnorePageRequest, ImagePart, InboxAnalyticsRequest, InboxAnalyticsResponse, Knowledge, KnowledgeCreateInput, KnowledgeResponse, KnowledgeType, LinkSourceResponse, LinkSourceStatus, ListByOrganizationRequest, ListContactsResponse, ListConversationsRequest, ListConversationsResponse, ListKnowledgeByLinkSourceRequest, ListKnowledgeRequest, ListKnowledgeResponse, ListKnowledgeRestRequest, ListLinkSourcesRequest, ListLinkSourcesResponse, ListVisitorPresenceResponse, MEMBER_NOTIFICATION_CHANNEL_DEFINITIONS, MEMBER_NOTIFICATION_DEFINITION_MAP, MarkConversationSeenRequestBody, MarkConversationSeenResponseBody, MemberNotificationChannel, MemberNotificationChannelDefinition, MemberNotificationPreference, MemberNotificationSettingsResponse, OrganizationResponse, PRESENCE_AWAY_WINDOW_MS, PRESENCE_ONLINE_WINDOW_MS, PRESENCE_PING_INTERVAL_MS, PaginationInput, PaginationResponse, PublicContact, PublicVisitor, PublicVisitorResponse, PublicWebsiteResponse, RealtimeEvent, RealtimeEventData, RealtimeEventPayload, RealtimeEventType, ReasoningPart, RecrawlLinkSourceRequest, ReindexPageRequest, RevokeWebsiteApiKeyRequest, ScanSubpagesRequest, SendTimelineItemRequest, SendTimelineItemResponse, SenderType, SetConversationTypingRequestBody, SetConversationTypingResponseBody, SourceDocumentPart, SourceUrlPart, StepStartPart, SubmitConversationRatingRequestBody, SubmitConversationRatingResponseBody, TextPart, TimelineItem, TimelineItemParts, TimelineItemVisibility, TimelinePartEvent, TimelinePartFile, TimelinePartImage, TimelinePartMetadata, TimelinePartText, ToggleAiAgentActiveRequest, ToggleKnowledgeEntryIncludedRequest, ToggleKnowledgeIncludedRequest, ToolPart, ToolState, TrainingStatsResponse, UpdateAiAgentRequest, UpdateBehaviorSettingsRequest, UpdateBehaviorSettingsResponse, UpdateContactMetadataRequest, UpdateContactOrganizationRequest, UpdateContactRequest, UpdateKnowledgeRequest, UpdateKnowledgeRestRequest, UpdateMemberNotificationSettingsRequest, UpdateMemberNotificationSettingsResponse, UpdateUserProfileRequest, UpdateVisitorMetadataRequest, UpdateVisitorRequest, UpdateWebsiteRequest, UploadKnowledgeFileRequest, UrlKnowledgePayload, UserResponse, Visitor, VisitorMetadata, VisitorPresenceEntry, VisitorResponse, WebsiteApiKey, WebsiteDeveloperSettingsResponse, WebsiteInstallationTarget, WebsiteListItem, WebsiteStatus, WebsiteSummary, aiAgentBehaviorSettingsSchema, aiAgentResponseSchema, articleKnowledgePayloadSchema, availableHumanAgentSchema, baseRealtimeEvent, blockVisitorResponseSchema, cancelLinkSourceRequestSchema, checkWebsiteDomainRequestSchema, contactDetailResponseSchema, contactListItemSchema, contactListVisitorStatusSchema, contactMetadataSchema, contactNotificationChannelConfigSchema, contactNotificationSettingsSchema, contactOrganization, contactOrganizationResponseSchema, contactResponseSchema, contactVisitorSummarySchema, conversationHeaderSchema, conversationMutationResponseSchema, conversationPrioritySchema, conversationRecordSchema, conversationSchema, conversationSeenSchema, conversationSentimentSchema, conversationStatusSchema, cossistantProviderMetadataSchema, crawlProgressPageSchema, createAiAgentRequestSchema, createContactOrganizationRequestSchema, createContactRequestSchema, createConversationRequestSchema, createConversationResponseSchema, createKnowledgeRequestSchema, createKnowledgeRestRequestSchema, createLinkSourceRequestSchema, createWebsiteApiKeyRequestSchema, createWebsiteRequestSchema, createWebsiteResponseSchema, deleteAiAgentRequestSchema, deleteKnowledgeRequestSchema, deleteLinkSourceRequestSchema, deletePageRequestSchema, discoveredPageSchema, emailSchema, faqKnowledgePayloadSchema, filePartSchema, generateBasePromptRequestSchema, generateBasePromptResponseSchema, generateUploadUrlRequestSchema, generateUploadUrlResponseSchema, getAiAgentRequestSchema, getBehaviorSettingsRequestSchema, getBehaviorSettingsResponseSchema, getConversationRequestSchema, getConversationResponseSchema, getConversationSeenDataResponseSchema, getConversationTimelineItemsRequestSchema, getConversationTimelineItemsResponseSchema, getCrawlStatusRequestSchema, getDefaultMemberNotificationPreference, getEventPayload, getKnowledgeRequestSchema, getLinkSourceRequestSchema, getTrainingStatsRequestSchema, identifyContactRequestSchema, identifyContactResponseSchema, ignorePageRequestSchema, imagePartSchema, inboxAnalyticsMetricsSchema, inboxAnalyticsRangeSchema, inboxAnalyticsRequestSchema, inboxAnalyticsResponseSchema, isValidEventType, knowledgeCreateSchema, knowledgeResponseSchema, knowledgeSchema, knowledgeTypeSchema, linkSourceResponseSchema, linkSourceStatusSchema, listByOrganizationRequestSchema, listContactsResponseSchema, listConversationHeadersResponseSchema, listConversationsRequestSchema, listConversationsResponseSchema, listKnowledgeByLinkSourceRequestSchema, listKnowledgeRequestSchema, listKnowledgeResponseSchema, listKnowledgeRestRequestSchema, listLinkSourcesRequestSchema, listLinkSourcesResponseSchema, listVisitorPresenceResponseSchema, markConversationSeenRequestSchema, markConversationSeenResponseSchema, memberNotificationChannelSchema, memberNotificationPreferenceSchema, memberNotificationSettingsResponseSchema, optionalUserIdSchema, organizationResponseSchema, paginationResponseSchema, paginationSchema, publicContactResponseSchema, publicVisitorResponseSchema, publicWebsiteResponseSchema, realtimeSchema, reasoningPartSchema, recrawlLinkSourceRequestSchema, reindexPageRequestSchema, revokeWebsiteApiKeyRequestSchema, scanSubpagesRequestSchema, sendTimelineItemRequestSchema, sendTimelineItemResponseSchema, setConversationTypingRequestSchema, setConversationTypingResponseSchema, sourceDocumentPartSchema, sourceUrlPartSchema, stepStartPartSchema, submitConversationRatingRequestSchema, submitConversationRatingResponseSchema, textPartSchema, timelineItemPartsSchema, timelineItemSchema, timelinePartEventSchema, timelinePartMetadataSchema, toggleAiAgentActiveRequestSchema, toggleKnowledgeEntryIncludedRequestSchema, toggleKnowledgeIncludedRequestSchema, toolPartSchema, toolStateSchema, trainingStatsResponseSchema, updateAiAgentRequestSchema, updateBehaviorSettingsRequestSchema, updateBehaviorSettingsResponseSchema, updateContactMetadataRequestSchema, updateContactOrganizationRequestSchema, updateContactRequestSchema, updateKnowledgeRequestSchema, updateKnowledgeRestRequestSchema, updateMemberNotificationSettingsRequestSchema, updateMemberNotificationSettingsResponseSchema, updateUserProfileRequestSchema, updateVisitorMetadataRequestSchema, updateVisitorRequestSchema, updateWebsiteRequestSchema, uploadContactIdSchema, uploadConversationIdSchema, uploadFileExtensionSchema, uploadFileNameSchema, uploadKnowledgeFileRequestSchema, uploadOrganizationIdSchema, uploadPathSchema, uploadScopeContactSchema, uploadScopeConversationSchema, uploadScopeSchema, uploadScopeUserSchema, uploadScopeVisitorSchema, uploadUserIdSchema, uploadVisitorIdSchema, uploadWebsiteIdSchema, urlKnowledgePayloadSchema, userIdSchema, userResponseSchema, validateRealtimeEvent, visitorMetadataSchema, visitorPresenceEntrySchema, visitorProfileSchema, visitorResponseSchema, websiteApiKeySchema, websiteDeveloperSettingsResponseSchema, websiteListItemSchema, websiteSummarySchema };
|
|
44
|
+
export { AIAgentGoal, AIModel, AIModelConfig, AI_AGENT_CORE_PROMPT_DOCUMENT_NAMES, AI_AGENT_GOALS, AI_MODELS, APIKeyType, AiAgentBehaviorSettings, AiAgentCorePromptDocumentName, AiAgentPromptDocumentResponse, AiAgentResponse, AnyRealtimeEvent, ArticleKnowledgePayload, AvailableAIAgent, AvailableAIAgentSchema, AvailableHumanAgent, BlockVisitorResponse, CancelLinkSourceRequest, CheckWebsiteDomainRequest, Contact, ContactDetailResponse, ContactListItem, ContactListVisitorStatus, ContactMetadata, ContactNotificationSettings, ContactOrganizationResponse, ContactResponse, ContactVisitorSummary, type Conversation, ConversationEventType, ConversationHeader, ConversationMutationResponse, ConversationParticipationStatus, ConversationPriority, ConversationRecordResponse, type ConversationSeen, ConversationSentiment, ConversationStatus, ConversationTimelineType, CossistantConfig, CossistantError, CossistantProviderMetadata, CrawlProgressPage, CreateAiAgentRequest, CreateContactOrganizationRequest, CreateContactRequest, CreateConversationRequestBody, CreateConversationResponseBody, CreateKnowledgeRequest, CreateKnowledgeRestRequest, CreateLinkSourceRequest, CreateSkillDocumentRequest, CreateWebsiteApiKeyRequest, CreateWebsiteRequest, CreateWebsiteResponse, DefaultMessage, DeleteAiAgentRequest, DeleteKnowledgeRequest, DeleteLinkSourceRequest, DeletePageRequest, DeleteSkillDocumentRequest, DiscoveredPage, FaqKnowledgePayload, Feedback, FilePart, GenerateBasePromptRequest, GenerateBasePromptResponse, GenerateUploadUrlRequest, GenerateUploadUrlResponse, GetAiAgentRequest, GetBehaviorSettingsRequest, GetBehaviorSettingsResponse, GetConversationRequest, GetConversationResponse, GetConversationSeenDataResponse, GetConversationTimelineItemsRequest, GetConversationTimelineItemsResponse, GetCrawlStatusRequest, GetFeedbackResponse, GetKnowledgeRequest, GetLinkSourceRequest, GetTrainingStatsRequest, IdentifyContactRequest, IdentifyContactResponse, IgnorePageRequest, ImagePart, InboxAnalyticsRequest, InboxAnalyticsResponse, Knowledge, KnowledgeCreateInput, KnowledgeResponse, KnowledgeType, LinkSourceResponse, LinkSourceStatus, ListByOrganizationRequest, ListContactsResponse, ListConversationsRequest, ListConversationsResponse, ListFeedbackRequest, ListFeedbackResponse, ListKnowledgeByLinkSourceRequest, ListKnowledgeRequest, ListKnowledgeResponse, ListKnowledgeRestRequest, ListLinkSourcesRequest, ListLinkSourcesResponse, ListPromptDocumentsRequest, ListPromptDocumentsResponse, ListVisitorPresenceResponse, MEMBER_NOTIFICATION_CHANNEL_DEFINITIONS, MEMBER_NOTIFICATION_DEFINITION_MAP, MarkConversationSeenRequestBody, MarkConversationSeenResponseBody, MemberNotificationChannel, MemberNotificationChannelDefinition, MemberNotificationPreference, MemberNotificationSettingsResponse, OrganizationResponse, PRESENCE_AWAY_WINDOW_MS, PRESENCE_ONLINE_WINDOW_MS, PRESENCE_PING_INTERVAL_MS, PaginationInput, PaginationResponse, PublicContact, PublicVisitor, PublicVisitorResponse, PublicWebsiteResponse, RealtimeEvent, RealtimeEventData, RealtimeEventPayload, RealtimeEventType, ReasoningPart, RecrawlLinkSourceRequest, ReindexPageRequest, RevokeWebsiteApiKeyRequest, ScanSubpagesRequest, SendTimelineItemRequest, SendTimelineItemResponse, SenderType, SetConversationTypingRequestBody, SetConversationTypingResponseBody, SourceDocumentPart, SourceUrlPart, StepStartPart, SubmitConversationRatingRequestBody, SubmitConversationRatingResponseBody, SubmitFeedbackRequest, SubmitFeedbackResponse, TextPart, TimelineItem, TimelineItemParts, TimelineItemVisibility, TimelinePartEvent, TimelinePartFile, TimelinePartImage, TimelinePartMetadata, TimelinePartText, ToggleAiAgentActiveRequest, ToggleKnowledgeEntryIncludedRequest, ToggleKnowledgeIncludedRequest, ToggleSkillDocumentRequest, ToolPart, ToolState, TrainingStatsResponse, UpdateAiAgentRequest, UpdateBehaviorSettingsRequest, UpdateBehaviorSettingsResponse, UpdateContactMetadataRequest, UpdateContactOrganizationRequest, UpdateContactRequest, UpdateKnowledgeRequest, UpdateKnowledgeRestRequest, UpdateMemberNotificationSettingsRequest, UpdateMemberNotificationSettingsResponse, UpdateSkillDocumentRequest, UpdateUserProfileRequest, UpdateVisitorMetadataRequest, UpdateVisitorRequest, UpdateWebsiteRequest, UploadKnowledgeFileRequest, UpsertCoreDocumentRequest, UrlKnowledgePayload, UserResponse, Visitor, VisitorMetadata, VisitorPresenceEntry, VisitorResponse, WebsiteApiKey, WebsiteDeveloperSettingsResponse, WebsiteInstallationTarget, WebsiteListItem, WebsiteStatus, WebsiteSummary, aiAgentBehaviorSettingsSchema, aiAgentCorePromptDocumentNameSchema, aiAgentPromptDocumentKindSchema, aiAgentPromptDocumentResponseSchema, aiAgentResponseSchema, aiAgentSkillPromptDocumentNameSchema, articleKnowledgePayloadSchema, availableHumanAgentSchema, baseRealtimeEvent, blockVisitorResponseSchema, cancelLinkSourceRequestSchema, checkWebsiteDomainRequestSchema, contactDetailResponseSchema, contactListItemSchema, contactListVisitorStatusSchema, contactMetadataSchema, contactNotificationChannelConfigSchema, contactNotificationSettingsSchema, contactOrganization, contactOrganizationResponseSchema, contactResponseSchema, contactVisitorSummarySchema, conversationHeaderSchema, conversationMutationResponseSchema, conversationPrioritySchema, conversationRecordSchema, conversationSchema, conversationSeenSchema, conversationSentimentSchema, conversationStatusSchema, cossistantProviderMetadataSchema, crawlProgressPageSchema, createAiAgentRequestSchema, createContactOrganizationRequestSchema, createContactRequestSchema, createConversationRequestSchema, createConversationResponseSchema, createKnowledgeRequestSchema, createKnowledgeRestRequestSchema, createLinkSourceRequestSchema, createSkillDocumentRequestSchema, createWebsiteApiKeyRequestSchema, createWebsiteRequestSchema, createWebsiteResponseSchema, deleteAiAgentRequestSchema, deleteKnowledgeRequestSchema, deleteLinkSourceRequestSchema, deletePageRequestSchema, deleteSkillDocumentRequestSchema, discoveredPageSchema, emailSchema, faqKnowledgePayloadSchema, feedbackSchema, filePartSchema, generateBasePromptRequestSchema, generateBasePromptResponseSchema, generateUploadUrlRequestSchema, generateUploadUrlResponseSchema, getAiAgentRequestSchema, getBehaviorSettingsRequestSchema, getBehaviorSettingsResponseSchema, getConversationRequestSchema, getConversationResponseSchema, getConversationSeenDataResponseSchema, getConversationTimelineItemsRequestSchema, getConversationTimelineItemsResponseSchema, getCrawlStatusRequestSchema, getDefaultMemberNotificationPreference, getEventPayload, getFeedbackResponseSchema, getKnowledgeRequestSchema, getLinkSourceRequestSchema, getTrainingStatsRequestSchema, identifyContactRequestSchema, identifyContactResponseSchema, ignorePageRequestSchema, imagePartSchema, inboxAnalyticsMetricsSchema, inboxAnalyticsRangeSchema, inboxAnalyticsRequestSchema, inboxAnalyticsResponseSchema, isValidEventType, knowledgeCreateSchema, knowledgeResponseSchema, knowledgeSchema, knowledgeTypeSchema, linkSourceResponseSchema, linkSourceStatusSchema, listByOrganizationRequestSchema, listContactsResponseSchema, listConversationHeadersResponseSchema, listConversationsRequestSchema, listConversationsResponseSchema, listFeedbackRequestSchema, listFeedbackResponseSchema, listKnowledgeByLinkSourceRequestSchema, listKnowledgeRequestSchema, listKnowledgeResponseSchema, listKnowledgeRestRequestSchema, listLinkSourcesRequestSchema, listLinkSourcesResponseSchema, listPromptDocumentsRequestSchema, listPromptDocumentsResponseSchema, listVisitorPresenceResponseSchema, markConversationSeenRequestSchema, markConversationSeenResponseSchema, memberNotificationChannelSchema, memberNotificationPreferenceSchema, memberNotificationSettingsResponseSchema, optionalUserIdSchema, organizationResponseSchema, paginationResponseSchema, paginationSchema, publicContactResponseSchema, publicVisitorResponseSchema, publicWebsiteResponseSchema, realtimeSchema, reasoningPartSchema, recrawlLinkSourceRequestSchema, reindexPageRequestSchema, revokeWebsiteApiKeyRequestSchema, scanSubpagesRequestSchema, sendTimelineItemRequestSchema, sendTimelineItemResponseSchema, setConversationTypingRequestSchema, setConversationTypingResponseSchema, sourceDocumentPartSchema, sourceUrlPartSchema, stepStartPartSchema, submitConversationRatingRequestSchema, submitConversationRatingResponseSchema, submitFeedbackRequestSchema, submitFeedbackResponseSchema, textPartSchema, timelineItemPartsSchema, timelineItemSchema, timelinePartEventSchema, timelinePartMetadataSchema, toggleAiAgentActiveRequestSchema, toggleKnowledgeEntryIncludedRequestSchema, toggleKnowledgeIncludedRequestSchema, toggleSkillDocumentRequestSchema, toolPartSchema, toolStateSchema, trainingStatsResponseSchema, updateAiAgentRequestSchema, updateBehaviorSettingsRequestSchema, updateBehaviorSettingsResponseSchema, updateContactMetadataRequestSchema, updateContactOrganizationRequestSchema, updateContactRequestSchema, updateKnowledgeRequestSchema, updateKnowledgeRestRequestSchema, updateMemberNotificationSettingsRequestSchema, updateMemberNotificationSettingsResponseSchema, updateSkillDocumentRequestSchema, updateUserProfileRequestSchema, updateVisitorMetadataRequestSchema, updateVisitorRequestSchema, updateWebsiteRequestSchema, uploadContactIdSchema, uploadConversationIdSchema, uploadFileExtensionSchema, uploadFileNameSchema, uploadKnowledgeFileRequestSchema, uploadOrganizationIdSchema, uploadPathSchema, uploadScopeContactSchema, uploadScopeConversationSchema, uploadScopeSchema, uploadScopeUserSchema, uploadScopeVisitorSchema, uploadUserIdSchema, uploadVisitorIdSchema, uploadWebsiteIdSchema, upsertCoreDocumentRequestSchema, urlKnowledgePayloadSchema, userIdSchema, userResponseSchema, validateRealtimeEvent, visitorMetadataSchema, visitorPresenceEntrySchema, visitorProfileSchema, visitorResponseSchema, websiteApiKeySchema, websiteDeveloperSettingsResponseSchema, websiteListItemSchema, websiteSummarySchema };
|
|
44
45
|
//# sourceMappingURL=index.d.ts.map
|
package/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;KAYY,gBAAA;;;;;;;;KASA,eAAA;;;YAGD;;KAGC,cAAA;EAfA,OAAA,EAAA,MAAA;EASA,UAAA,EAQC,UARc;EAMf,QAAA,CAAA,EAAA,MAAc"}
|
package/index.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { APIKeyType, ConversationEventType, ConversationParticipationStatus, ConversationPriority, ConversationSentiment, ConversationStatus, ConversationTimelineType, SenderType, TimelineItemVisibility, WebsiteInstallationTarget, WebsiteStatus } from "./enums.js";
|
|
2
|
-
import { AI_AGENT_GOALS, AI_MODELS, aiAgentBehaviorSettingsSchema, aiAgentResponseSchema, createAiAgentRequestSchema, deleteAiAgentRequestSchema, generateBasePromptRequestSchema, generateBasePromptResponseSchema, getAiAgentRequestSchema, getBehaviorSettingsRequestSchema, getBehaviorSettingsResponseSchema, toggleAiAgentActiveRequestSchema, updateAiAgentRequestSchema, updateBehaviorSettingsRequestSchema, updateBehaviorSettingsResponseSchema } from "./api/ai-agent.js";
|
|
2
|
+
import { AI_AGENT_CORE_PROMPT_DOCUMENT_NAMES, AI_AGENT_GOALS, AI_MODELS, aiAgentBehaviorSettingsSchema, aiAgentCorePromptDocumentNameSchema, aiAgentPromptDocumentKindSchema, aiAgentPromptDocumentResponseSchema, aiAgentResponseSchema, aiAgentSkillPromptDocumentNameSchema, createAiAgentRequestSchema, createSkillDocumentRequestSchema, deleteAiAgentRequestSchema, deleteSkillDocumentRequestSchema, generateBasePromptRequestSchema, generateBasePromptResponseSchema, getAiAgentRequestSchema, getBehaviorSettingsRequestSchema, getBehaviorSettingsResponseSchema, listPromptDocumentsRequestSchema, listPromptDocumentsResponseSchema, toggleAiAgentActiveRequestSchema, toggleSkillDocumentRequestSchema, updateAiAgentRequestSchema, updateBehaviorSettingsRequestSchema, updateBehaviorSettingsResponseSchema, updateSkillDocumentRequestSchema, upsertCoreDocumentRequestSchema } from "./api/ai-agent.js";
|
|
3
3
|
import { emailSchema, optionalUserIdSchema, paginationResponseSchema, paginationSchema, userIdSchema } from "./api/common.js";
|
|
4
4
|
import { contactMetadataSchema, contactOrganizationResponseSchema, contactResponseSchema, createContactOrganizationRequestSchema, createContactRequestSchema, identifyContactRequestSchema, identifyContactResponseSchema, updateContactMetadataRequestSchema, updateContactOrganizationRequestSchema, updateContactRequestSchema } from "./api/contact.js";
|
|
5
5
|
import { cossistantProviderMetadataSchema, filePartSchema, getConversationTimelineItemsRequestSchema, getConversationTimelineItemsResponseSchema, imagePartSchema, reasoningPartSchema, sendTimelineItemRequestSchema, sendTimelineItemResponseSchema, sourceDocumentPartSchema, sourceUrlPartSchema, stepStartPartSchema, textPartSchema, timelineItemPartsSchema, timelineItemSchema, timelinePartEventSchema, timelinePartMetadataSchema, toolPartSchema, toolStateSchema } from "./api/timeline-item.js";
|
|
6
6
|
import { conversationSchema, conversationSeenSchema } from "./schemas.js";
|
|
7
7
|
import { createConversationRequestSchema, createConversationResponseSchema, getConversationRequestSchema, getConversationResponseSchema, getConversationSeenDataResponseSchema, listConversationsRequestSchema, listConversationsResponseSchema, markConversationSeenRequestSchema, markConversationSeenResponseSchema, setConversationTypingRequestSchema, setConversationTypingResponseSchema, submitConversationRatingRequestSchema, submitConversationRatingResponseSchema } from "./api/conversation.js";
|
|
8
|
+
import { feedbackSchema, getFeedbackResponseSchema, listFeedbackRequestSchema, listFeedbackResponseSchema, submitFeedbackRequestSchema, submitFeedbackResponseSchema } from "./api/feedback.js";
|
|
8
9
|
import { articleKnowledgePayloadSchema, createKnowledgeRequestSchema, createKnowledgeRestRequestSchema, deleteKnowledgeRequestSchema, faqKnowledgePayloadSchema, getKnowledgeRequestSchema, knowledgeCreateSchema, knowledgeResponseSchema, knowledgeSchema, knowledgeTypeSchema, listKnowledgeRequestSchema, listKnowledgeResponseSchema, listKnowledgeRestRequestSchema, toggleKnowledgeEntryIncludedRequestSchema, updateKnowledgeRequestSchema, updateKnowledgeRestRequestSchema, uploadKnowledgeFileRequestSchema, urlKnowledgePayloadSchema } from "./api/knowledge.js";
|
|
9
10
|
import { cancelLinkSourceRequestSchema, crawlProgressPageSchema, createLinkSourceRequestSchema, deleteLinkSourceRequestSchema, deletePageRequestSchema, discoveredPageSchema, getCrawlStatusRequestSchema, getLinkSourceRequestSchema, getTrainingStatsRequestSchema, ignorePageRequestSchema, linkSourceResponseSchema, linkSourceStatusSchema, listKnowledgeByLinkSourceRequestSchema, listLinkSourcesRequestSchema, listLinkSourcesResponseSchema, recrawlLinkSourceRequestSchema, reindexPageRequestSchema, scanSubpagesRequestSchema, toggleKnowledgeIncludedRequestSchema, trainingStatsResponseSchema } from "./api/link-source.js";
|
|
10
11
|
import { MEMBER_NOTIFICATION_CHANNEL_DEFINITIONS, MEMBER_NOTIFICATION_DEFINITION_MAP, MemberNotificationChannel, contactNotificationChannelConfigSchema, contactNotificationSettingsSchema, getDefaultMemberNotificationPreference, memberNotificationChannelSchema, memberNotificationPreferenceSchema, memberNotificationSettingsResponseSchema, updateMemberNotificationSettingsRequestSchema, updateMemberNotificationSettingsResponseSchema } from "./api/notification.js";
|
|
@@ -19,4 +20,4 @@ import { baseRealtimeEvent, getEventPayload, isValidEventType, realtimeSchema, v
|
|
|
19
20
|
import { contactDetailResponseSchema, contactListItemSchema, contactListVisitorStatusSchema, contactVisitorSummarySchema, listContactsResponseSchema } from "./trpc/contact.js";
|
|
20
21
|
import { blockVisitorResponseSchema, listVisitorPresenceResponseSchema, visitorPresenceEntrySchema } from "./trpc/visitor.js";
|
|
21
22
|
|
|
22
|
-
export { AI_AGENT_GOALS, AI_MODELS, APIKeyType, AvailableAIAgentSchema, ConversationEventType, ConversationParticipationStatus, ConversationPriority, ConversationSentiment, ConversationStatus, ConversationTimelineType, MEMBER_NOTIFICATION_CHANNEL_DEFINITIONS, MEMBER_NOTIFICATION_DEFINITION_MAP, MemberNotificationChannel, PRESENCE_AWAY_WINDOW_MS, PRESENCE_ONLINE_WINDOW_MS, PRESENCE_PING_INTERVAL_MS, SenderType, TimelineItemVisibility, WebsiteInstallationTarget, WebsiteStatus, aiAgentBehaviorSettingsSchema, aiAgentResponseSchema, articleKnowledgePayloadSchema, availableHumanAgentSchema, baseRealtimeEvent, blockVisitorResponseSchema, cancelLinkSourceRequestSchema, checkWebsiteDomainRequestSchema, contactDetailResponseSchema, contactListItemSchema, contactListVisitorStatusSchema, contactMetadataSchema, contactNotificationChannelConfigSchema, contactNotificationSettingsSchema, contactOrganizationResponseSchema, contactResponseSchema, contactVisitorSummarySchema, conversationHeaderSchema, conversationMutationResponseSchema, conversationPrioritySchema, conversationRecordSchema, conversationSchema, conversationSeenSchema, conversationSentimentSchema, conversationStatusSchema, cossistantProviderMetadataSchema, crawlProgressPageSchema, createAiAgentRequestSchema, createContactOrganizationRequestSchema, createContactRequestSchema, createConversationRequestSchema, createConversationResponseSchema, createKnowledgeRequestSchema, createKnowledgeRestRequestSchema, createLinkSourceRequestSchema, createWebsiteApiKeyRequestSchema, createWebsiteRequestSchema, createWebsiteResponseSchema, deleteAiAgentRequestSchema, deleteKnowledgeRequestSchema, deleteLinkSourceRequestSchema, deletePageRequestSchema, discoveredPageSchema, emailSchema, faqKnowledgePayloadSchema, filePartSchema, generateBasePromptRequestSchema, generateBasePromptResponseSchema, generateUploadUrlRequestSchema, generateUploadUrlResponseSchema, getAiAgentRequestSchema, getBehaviorSettingsRequestSchema, getBehaviorSettingsResponseSchema, getConversationRequestSchema, getConversationResponseSchema, getConversationSeenDataResponseSchema, getConversationTimelineItemsRequestSchema, getConversationTimelineItemsResponseSchema, getCrawlStatusRequestSchema, getDefaultMemberNotificationPreference, getEventPayload, getKnowledgeRequestSchema, getLinkSourceRequestSchema, getTrainingStatsRequestSchema, identifyContactRequestSchema, identifyContactResponseSchema, ignorePageRequestSchema, imagePartSchema, inboxAnalyticsMetricsSchema, inboxAnalyticsRangeSchema, inboxAnalyticsRequestSchema, inboxAnalyticsResponseSchema, isValidEventType, knowledgeCreateSchema, knowledgeResponseSchema, knowledgeSchema, knowledgeTypeSchema, linkSourceResponseSchema, linkSourceStatusSchema, listByOrganizationRequestSchema, listContactsResponseSchema, listConversationHeadersResponseSchema, listConversationsRequestSchema, listConversationsResponseSchema, listKnowledgeByLinkSourceRequestSchema, listKnowledgeRequestSchema, listKnowledgeResponseSchema, listKnowledgeRestRequestSchema, listLinkSourcesRequestSchema, listLinkSourcesResponseSchema, listVisitorPresenceResponseSchema, markConversationSeenRequestSchema, markConversationSeenResponseSchema, memberNotificationChannelSchema, memberNotificationPreferenceSchema, memberNotificationSettingsResponseSchema, optionalUserIdSchema, organizationResponseSchema, paginationResponseSchema, paginationSchema, publicContactResponseSchema, publicVisitorResponseSchema, publicWebsiteResponseSchema, realtimeSchema, reasoningPartSchema, recrawlLinkSourceRequestSchema, reindexPageRequestSchema, revokeWebsiteApiKeyRequestSchema, scanSubpagesRequestSchema, sendTimelineItemRequestSchema, sendTimelineItemResponseSchema, setConversationTypingRequestSchema, setConversationTypingResponseSchema, sourceDocumentPartSchema, sourceUrlPartSchema, stepStartPartSchema, submitConversationRatingRequestSchema, submitConversationRatingResponseSchema, textPartSchema, timelineItemPartsSchema, timelineItemSchema, timelinePartEventSchema, timelinePartMetadataSchema, toggleAiAgentActiveRequestSchema, toggleKnowledgeEntryIncludedRequestSchema, toggleKnowledgeIncludedRequestSchema, toolPartSchema, toolStateSchema, trainingStatsResponseSchema, updateAiAgentRequestSchema, updateBehaviorSettingsRequestSchema, updateBehaviorSettingsResponseSchema, updateContactMetadataRequestSchema, updateContactOrganizationRequestSchema, updateContactRequestSchema, updateKnowledgeRequestSchema, updateKnowledgeRestRequestSchema, updateMemberNotificationSettingsRequestSchema, updateMemberNotificationSettingsResponseSchema, updateUserProfileRequestSchema, updateVisitorMetadataRequestSchema, updateVisitorRequestSchema, updateWebsiteRequestSchema, uploadContactIdSchema, uploadConversationIdSchema, uploadFileExtensionSchema, uploadFileNameSchema, uploadKnowledgeFileRequestSchema, uploadOrganizationIdSchema, uploadPathSchema, uploadScopeContactSchema, uploadScopeConversationSchema, uploadScopeSchema, uploadScopeUserSchema, uploadScopeVisitorSchema, uploadUserIdSchema, uploadVisitorIdSchema, uploadWebsiteIdSchema, urlKnowledgePayloadSchema, userIdSchema, userResponseSchema, validateRealtimeEvent, visitorMetadataSchema, visitorPresenceEntrySchema, visitorProfileSchema, visitorResponseSchema, websiteApiKeySchema, websiteDeveloperSettingsResponseSchema, websiteListItemSchema, websiteSummarySchema };
|
|
23
|
+
export { AI_AGENT_CORE_PROMPT_DOCUMENT_NAMES, AI_AGENT_GOALS, AI_MODELS, APIKeyType, AvailableAIAgentSchema, ConversationEventType, ConversationParticipationStatus, ConversationPriority, ConversationSentiment, ConversationStatus, ConversationTimelineType, MEMBER_NOTIFICATION_CHANNEL_DEFINITIONS, MEMBER_NOTIFICATION_DEFINITION_MAP, MemberNotificationChannel, PRESENCE_AWAY_WINDOW_MS, PRESENCE_ONLINE_WINDOW_MS, PRESENCE_PING_INTERVAL_MS, SenderType, TimelineItemVisibility, WebsiteInstallationTarget, WebsiteStatus, aiAgentBehaviorSettingsSchema, aiAgentCorePromptDocumentNameSchema, aiAgentPromptDocumentKindSchema, aiAgentPromptDocumentResponseSchema, aiAgentResponseSchema, aiAgentSkillPromptDocumentNameSchema, articleKnowledgePayloadSchema, availableHumanAgentSchema, baseRealtimeEvent, blockVisitorResponseSchema, cancelLinkSourceRequestSchema, checkWebsiteDomainRequestSchema, contactDetailResponseSchema, contactListItemSchema, contactListVisitorStatusSchema, contactMetadataSchema, contactNotificationChannelConfigSchema, contactNotificationSettingsSchema, contactOrganizationResponseSchema, contactResponseSchema, contactVisitorSummarySchema, conversationHeaderSchema, conversationMutationResponseSchema, conversationPrioritySchema, conversationRecordSchema, conversationSchema, conversationSeenSchema, conversationSentimentSchema, conversationStatusSchema, cossistantProviderMetadataSchema, crawlProgressPageSchema, createAiAgentRequestSchema, createContactOrganizationRequestSchema, createContactRequestSchema, createConversationRequestSchema, createConversationResponseSchema, createKnowledgeRequestSchema, createKnowledgeRestRequestSchema, createLinkSourceRequestSchema, createSkillDocumentRequestSchema, createWebsiteApiKeyRequestSchema, createWebsiteRequestSchema, createWebsiteResponseSchema, deleteAiAgentRequestSchema, deleteKnowledgeRequestSchema, deleteLinkSourceRequestSchema, deletePageRequestSchema, deleteSkillDocumentRequestSchema, discoveredPageSchema, emailSchema, faqKnowledgePayloadSchema, feedbackSchema, filePartSchema, generateBasePromptRequestSchema, generateBasePromptResponseSchema, generateUploadUrlRequestSchema, generateUploadUrlResponseSchema, getAiAgentRequestSchema, getBehaviorSettingsRequestSchema, getBehaviorSettingsResponseSchema, getConversationRequestSchema, getConversationResponseSchema, getConversationSeenDataResponseSchema, getConversationTimelineItemsRequestSchema, getConversationTimelineItemsResponseSchema, getCrawlStatusRequestSchema, getDefaultMemberNotificationPreference, getEventPayload, getFeedbackResponseSchema, getKnowledgeRequestSchema, getLinkSourceRequestSchema, getTrainingStatsRequestSchema, identifyContactRequestSchema, identifyContactResponseSchema, ignorePageRequestSchema, imagePartSchema, inboxAnalyticsMetricsSchema, inboxAnalyticsRangeSchema, inboxAnalyticsRequestSchema, inboxAnalyticsResponseSchema, isValidEventType, knowledgeCreateSchema, knowledgeResponseSchema, knowledgeSchema, knowledgeTypeSchema, linkSourceResponseSchema, linkSourceStatusSchema, listByOrganizationRequestSchema, listContactsResponseSchema, listConversationHeadersResponseSchema, listConversationsRequestSchema, listConversationsResponseSchema, listFeedbackRequestSchema, listFeedbackResponseSchema, listKnowledgeByLinkSourceRequestSchema, listKnowledgeRequestSchema, listKnowledgeResponseSchema, listKnowledgeRestRequestSchema, listLinkSourcesRequestSchema, listLinkSourcesResponseSchema, listPromptDocumentsRequestSchema, listPromptDocumentsResponseSchema, listVisitorPresenceResponseSchema, markConversationSeenRequestSchema, markConversationSeenResponseSchema, memberNotificationChannelSchema, memberNotificationPreferenceSchema, memberNotificationSettingsResponseSchema, optionalUserIdSchema, organizationResponseSchema, paginationResponseSchema, paginationSchema, publicContactResponseSchema, publicVisitorResponseSchema, publicWebsiteResponseSchema, realtimeSchema, reasoningPartSchema, recrawlLinkSourceRequestSchema, reindexPageRequestSchema, revokeWebsiteApiKeyRequestSchema, scanSubpagesRequestSchema, sendTimelineItemRequestSchema, sendTimelineItemResponseSchema, setConversationTypingRequestSchema, setConversationTypingResponseSchema, sourceDocumentPartSchema, sourceUrlPartSchema, stepStartPartSchema, submitConversationRatingRequestSchema, submitConversationRatingResponseSchema, submitFeedbackRequestSchema, submitFeedbackResponseSchema, textPartSchema, timelineItemPartsSchema, timelineItemSchema, timelinePartEventSchema, timelinePartMetadataSchema, toggleAiAgentActiveRequestSchema, toggleKnowledgeEntryIncludedRequestSchema, toggleKnowledgeIncludedRequestSchema, toggleSkillDocumentRequestSchema, toolPartSchema, toolStateSchema, trainingStatsResponseSchema, updateAiAgentRequestSchema, updateBehaviorSettingsRequestSchema, updateBehaviorSettingsResponseSchema, updateContactMetadataRequestSchema, updateContactOrganizationRequestSchema, updateContactRequestSchema, updateKnowledgeRequestSchema, updateKnowledgeRestRequestSchema, updateMemberNotificationSettingsRequestSchema, updateMemberNotificationSettingsResponseSchema, updateSkillDocumentRequestSchema, updateUserProfileRequestSchema, updateVisitorMetadataRequestSchema, updateVisitorRequestSchema, updateWebsiteRequestSchema, uploadContactIdSchema, uploadConversationIdSchema, uploadFileExtensionSchema, uploadFileNameSchema, uploadKnowledgeFileRequestSchema, uploadOrganizationIdSchema, uploadPathSchema, uploadScopeContactSchema, uploadScopeConversationSchema, uploadScopeSchema, uploadScopeUserSchema, uploadScopeVisitorSchema, uploadUserIdSchema, uploadVisitorIdSchema, uploadWebsiteIdSchema, upsertCoreDocumentRequestSchema, urlKnowledgePayloadSchema, userIdSchema, userResponseSchema, validateRealtimeEvent, visitorMetadataSchema, visitorPresenceEntrySchema, visitorProfileSchema, visitorResponseSchema, websiteApiKeySchema, websiteDeveloperSettingsResponseSchema, websiteListItemSchema, websiteSummarySchema };
|
package/package.json
CHANGED
package/realtime-events.d.ts
CHANGED
|
@@ -95,6 +95,7 @@ declare const realtimeSchema: {
|
|
|
95
95
|
message: "message";
|
|
96
96
|
event: "event";
|
|
97
97
|
identification: "identification";
|
|
98
|
+
tool: "tool";
|
|
98
99
|
}>;
|
|
99
100
|
text: z.ZodNullable<z.ZodString>;
|
|
100
101
|
parts: z.ZodArray<z.ZodUnknown>;
|
|
@@ -140,6 +141,7 @@ declare const realtimeSchema: {
|
|
|
140
141
|
message: "message";
|
|
141
142
|
event: "event";
|
|
142
143
|
identification: "identification";
|
|
144
|
+
tool: "tool";
|
|
143
145
|
}>;
|
|
144
146
|
text: z.ZodNullable<z.ZodString>;
|
|
145
147
|
tool: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -337,6 +339,7 @@ declare const realtimeSchema: {
|
|
|
337
339
|
message: "message";
|
|
338
340
|
event: "event";
|
|
339
341
|
identification: "identification";
|
|
342
|
+
tool: "tool";
|
|
340
343
|
}>;
|
|
341
344
|
text: z.ZodNullable<z.ZodString>;
|
|
342
345
|
tool: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -482,6 +485,7 @@ declare const realtimeSchema: {
|
|
|
482
485
|
message: "message";
|
|
483
486
|
event: "event";
|
|
484
487
|
identification: "identification";
|
|
488
|
+
tool: "tool";
|
|
485
489
|
}>;
|
|
486
490
|
text: z.ZodNullable<z.ZodString>;
|
|
487
491
|
tool: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -731,6 +735,22 @@ declare const realtimeSchema: {
|
|
|
731
735
|
sentimentConfidence: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
732
736
|
escalatedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
733
737
|
escalationReason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
738
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
739
|
+
open: "open";
|
|
740
|
+
resolved: "resolved";
|
|
741
|
+
spam: "spam";
|
|
742
|
+
}>>;
|
|
743
|
+
priority: z.ZodOptional<z.ZodEnum<{
|
|
744
|
+
low: "low";
|
|
745
|
+
normal: "normal";
|
|
746
|
+
high: "high";
|
|
747
|
+
urgent: "urgent";
|
|
748
|
+
}>>;
|
|
749
|
+
resolvedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
750
|
+
resolvedByUserId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
751
|
+
resolvedByAiAgentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
752
|
+
resolutionTime: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
753
|
+
deletedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
734
754
|
}, z.core.$strip>;
|
|
735
755
|
aiAgentId: z.ZodNullable<z.ZodString>;
|
|
736
756
|
}, z.core.$strip>;
|
|
@@ -832,6 +852,7 @@ declare const realtimeSchema: {
|
|
|
832
852
|
message: "message";
|
|
833
853
|
event: "event";
|
|
834
854
|
identification: "identification";
|
|
855
|
+
tool: "tool";
|
|
835
856
|
}>;
|
|
836
857
|
text: z.ZodNullable<z.ZodString>;
|
|
837
858
|
parts: z.ZodArray<z.ZodUnknown>;
|
|
@@ -917,10 +938,10 @@ declare const realtimeSchema: {
|
|
|
917
938
|
linkSourceId: z.ZodString;
|
|
918
939
|
status: z.ZodEnum<{
|
|
919
940
|
pending: "pending";
|
|
941
|
+
mapping: "mapping";
|
|
920
942
|
crawling: "crawling";
|
|
921
943
|
completed: "completed";
|
|
922
944
|
failed: "failed";
|
|
923
|
-
mapping: "mapping";
|
|
924
945
|
}>;
|
|
925
946
|
discoveredPagesCount: z.ZodOptional<z.ZodNumber>;
|
|
926
947
|
crawledPagesCount: z.ZodOptional<z.ZodNumber>;
|
package/realtime-events.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"realtime-events.d.ts","names":[],"sources":["../src/realtime-events.ts"],"sourcesContent":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"realtime-events.d.ts","names":[],"sources":["../src/realtime-events.ts"],"sourcesContent":[],"mappings":";;;cAWa,mBAAiB,CAAA,CAAA;;EAAjB,cAAA,aAKX;;;;;;;;AAL4B,cAWjB,cAXiB,EAAA;EAAA,SAAA,aAAA,aAAA,CAAA;IAWjB,SAAA,aA2WH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAEE,iBAAA,gBAAiC;KAEjC,+BAA+B,qBAAqB,CAAA,CAAE,cACzD,gBAAgB;KAGb,wBAAwB;QAC7B;WACG,qBAAqB;;KAGnB,gBAAA,WACL,oBAAoB,cAAc,KACvC;KAEU,4BAA4B,qBACvC,qBAAqB;;;;iBAKN,gCAAgC,yBACzC,mBAEJ,qBAAqB;;;;iBAQR,gBAAA,yBAAyC;iBAIzC,0BAA0B,0BAClC,cAAc,KACnB,qBAAqB"}
|
package/realtime-events.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ConversationEventType, ConversationTimelineType, TimelineItemVisibility } from "./enums.js";
|
|
1
|
+
import { ConversationEventType, ConversationStatus, ConversationTimelineType, TimelineItemVisibility } from "./enums.js";
|
|
2
2
|
import { conversationSchema } from "./schemas.js";
|
|
3
3
|
import { visitorResponseSchema } from "./api/visitor.js";
|
|
4
4
|
import { conversationHeaderSchema } from "./trpc/conversation.js";
|
|
@@ -62,7 +62,8 @@ const realtimeSchema = {
|
|
|
62
62
|
type: z.enum([
|
|
63
63
|
ConversationTimelineType.MESSAGE,
|
|
64
64
|
ConversationTimelineType.EVENT,
|
|
65
|
-
ConversationTimelineType.IDENTIFICATION
|
|
65
|
+
ConversationTimelineType.IDENTIFICATION,
|
|
66
|
+
ConversationTimelineType.TOOL
|
|
66
67
|
]),
|
|
67
68
|
text: z.string().nullable(),
|
|
68
69
|
parts: z.array(z.unknown()),
|
|
@@ -128,7 +129,23 @@ const realtimeSchema = {
|
|
|
128
129
|
]).nullable().optional(),
|
|
129
130
|
sentimentConfidence: z.number().nullable().optional(),
|
|
130
131
|
escalatedAt: z.string().nullable().optional(),
|
|
131
|
-
escalationReason: z.string().nullable().optional()
|
|
132
|
+
escalationReason: z.string().nullable().optional(),
|
|
133
|
+
status: z.enum([
|
|
134
|
+
ConversationStatus.OPEN,
|
|
135
|
+
ConversationStatus.RESOLVED,
|
|
136
|
+
ConversationStatus.SPAM
|
|
137
|
+
]).optional(),
|
|
138
|
+
priority: z.enum([
|
|
139
|
+
"low",
|
|
140
|
+
"normal",
|
|
141
|
+
"high",
|
|
142
|
+
"urgent"
|
|
143
|
+
]).optional(),
|
|
144
|
+
resolvedAt: z.string().nullable().optional(),
|
|
145
|
+
resolvedByUserId: z.string().nullable().optional(),
|
|
146
|
+
resolvedByAiAgentId: z.string().nullable().optional(),
|
|
147
|
+
resolutionTime: z.number().nullable().optional(),
|
|
148
|
+
deletedAt: z.string().nullable().optional()
|
|
132
149
|
}),
|
|
133
150
|
aiAgentId: z.string().nullable()
|
|
134
151
|
}),
|
|
@@ -194,7 +211,8 @@ const realtimeSchema = {
|
|
|
194
211
|
type: z.enum([
|
|
195
212
|
ConversationTimelineType.MESSAGE,
|
|
196
213
|
ConversationTimelineType.EVENT,
|
|
197
|
-
ConversationTimelineType.IDENTIFICATION
|
|
214
|
+
ConversationTimelineType.IDENTIFICATION,
|
|
215
|
+
ConversationTimelineType.TOOL
|
|
198
216
|
]),
|
|
199
217
|
text: z.string().nullable(),
|
|
200
218
|
parts: z.array(z.unknown()),
|
package/realtime-events.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"realtime-events.js","names":[],"sources":["../src/realtime-events.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { visitorResponseSchema } from \"./api/visitor\";\nimport {\n\tConversationEventType,\n\tConversationTimelineType,\n\tTimelineItemVisibility,\n} from \"./enums\";\nimport { conversationSchema } from \"./schemas\";\nimport { conversationHeaderSchema } from \"./trpc/conversation\";\n\nexport const baseRealtimeEvent = z.object({\n\twebsiteId: z.string(),\n\torganizationId: z.string(),\n\tvisitorId: z.string().nullable(),\n\tuserId: z.string().nullable(),\n});\n\n/**\n * Central event system for real-time communication\n * All WebSocket and Redis Pub/Sub events are defined here\n */\nexport const realtimeSchema = {\n\tuserConnected: baseRealtimeEvent.extend({\n\t\tconnectionId: z.string(),\n\t}),\n\tuserDisconnected: baseRealtimeEvent.extend({\n\t\tconnectionId: z.string(),\n\t}),\n\tvisitorConnected: baseRealtimeEvent.extend({\n\t\tvisitorId: z.string(),\n\t\tconnectionId: z.string(),\n\t}),\n\tvisitorDisconnected: baseRealtimeEvent.extend({\n\t\tvisitorId: z.string(),\n\t\tconnectionId: z.string(),\n\t}),\n\tuserPresenceUpdate: baseRealtimeEvent.extend({\n\t\tuserId: z.string(),\n\t\tstatus: z.enum([\"online\", \"away\", \"offline\"]),\n\t\tlastSeen: z.string(),\n\t}),\n\tconversationSeen: baseRealtimeEvent.extend({\n\t\tconversationId: z.string(),\n\t\taiAgentId: z.string().nullable(),\n\t\tlastSeenAt: z.string(),\n\t\t/** The type of actor who marked the conversation as seen */\n\t\tactorType: z.enum([\"visitor\", \"user\", \"ai_agent\"]),\n\t\t/** The actor's ID (matches one of userId, visitorId, or aiAgentId based on actorType) */\n\t\tactorId: z.string(),\n\t}),\n\tconversationTyping: baseRealtimeEvent.extend({\n\t\tconversationId: z.string(),\n\t\taiAgentId: z.string().nullable(),\n\t\tisTyping: z.boolean(),\n\t\tvisitorPreview: z.string().max(2000).nullable().optional(),\n\t}),\n\ttimelineItemCreated: baseRealtimeEvent.extend({\n\t\tconversationId: z.string(),\n\t\titem: z.object({\n\t\t\tid: z.string(),\n\t\t\tconversationId: z.string(),\n\t\t\torganizationId: z.string(),\n\t\t\tvisibility: z.enum([\n\t\t\t\tTimelineItemVisibility.PUBLIC,\n\t\t\t\tTimelineItemVisibility.PRIVATE,\n\t\t\t]),\n\t\t\ttype: z.enum([\n\t\t\t\tConversationTimelineType.MESSAGE,\n\t\t\t\tConversationTimelineType.EVENT,\n\t\t\t\tConversationTimelineType.IDENTIFICATION,\n\t\t\t]),\n\t\t\ttext: z.string().nullable(),\n\t\t\tparts: z.array(z.unknown()),\n\t\t\tuserId: z.string().nullable(),\n\t\t\tvisitorId: z.string().nullable(),\n\t\t\taiAgentId: z.string().nullable(),\n\t\t\tcreatedAt: z.string(),\n\t\t\tdeletedAt: z.string().nullable(),\n\t\t\ttool: z.string().nullable().optional(),\n\t\t}),\n\t}),\n\tconversationCreated: baseRealtimeEvent.extend({\n\t\tconversationId: z.string(),\n\t\tconversation: conversationSchema,\n\t\theader: conversationHeaderSchema,\n\t}),\n\tvisitorIdentified: baseRealtimeEvent.extend({\n\t\tvisitorId: z.string(),\n\t\tvisitor: visitorResponseSchema,\n\t}),\n\tconversationEventCreated: baseRealtimeEvent.extend({\n\t\tconversationId: z.string(),\n\t\taiAgentId: z.string().nullable(),\n\t\tevent: z.object({\n\t\t\tid: z.string(),\n\t\t\tconversationId: z.string(),\n\t\t\torganizationId: z.string(),\n\t\t\ttype: z.enum([\n\t\t\t\tConversationEventType.ASSIGNED,\n\t\t\t\tConversationEventType.UNASSIGNED,\n\t\t\t\tConversationEventType.PARTICIPANT_REQUESTED,\n\t\t\t\tConversationEventType.PARTICIPANT_JOINED,\n\t\t\t\tConversationEventType.PARTICIPANT_LEFT,\n\t\t\t\tConversationEventType.STATUS_CHANGED,\n\t\t\t\tConversationEventType.PRIORITY_CHANGED,\n\t\t\t\tConversationEventType.TAG_ADDED,\n\t\t\t\tConversationEventType.TAG_REMOVED,\n\t\t\t\tConversationEventType.RESOLVED,\n\t\t\t\tConversationEventType.REOPENED,\n\t\t\t\tConversationEventType.VISITOR_BLOCKED,\n\t\t\t\tConversationEventType.VISITOR_UNBLOCKED,\n\t\t\t\tConversationEventType.VISITOR_IDENTIFIED,\n\t\t\t]),\n\t\t\tactorUserId: z.string().nullable(),\n\t\t\tactorAiAgentId: z.string().nullable(),\n\t\t\ttargetUserId: z.string().nullable(),\n\t\t\ttargetAiAgentId: z.string().nullable(),\n\t\t\tmessage: z.string().nullable(),\n\t\t\tmetadata: z.record(z.string(), z.unknown()).nullable(),\n\t\t\tcreatedAt: z.string(),\n\t\t\tupdatedAt: z.string(),\n\t\t\tdeletedAt: z.string().nullable(),\n\t\t}),\n\t}),\n\t// Conversation updated (title, sentiment, escalation status changes)\n\tconversationUpdated: baseRealtimeEvent.extend({\n\t\tconversationId: z.string(),\n\t\tupdates: z.object({\n\t\t\ttitle: z.string().nullable().optional(),\n\t\t\tsentiment: z\n\t\t\t\t.enum([\"positive\", \"negative\", \"neutral\"])\n\t\t\t\t.nullable()\n\t\t\t\t.optional(),\n\t\t\tsentimentConfidence: z.number().nullable().optional(),\n\t\t\tescalatedAt: z.string().nullable().optional(),\n\t\t\tescalationReason: z.string().nullable().optional(),\n\t\t}),\n\t\taiAgentId: z.string().nullable(),\n\t}),\n\n\t// =========================================================================\n\t// AI AGENT PROCESSING EVENTS\n\t// For progressive UI updates during AI agent responses\n\t//\n\t// AUDIENCE FIELD:\n\t// - 'all': Send to both dashboard and widget\n\t// - 'dashboard': Send only to dashboard (human agents)\n\t//\n\t// Widget (visitor) connections only receive events with audience='all'\n\t// =========================================================================\n\n\t// Emitted when AI agent starts processing a message\n\taiAgentProcessingStarted: baseRealtimeEvent.extend({\n\t\tconversationId: z.string(),\n\t\taiAgentId: z.string(),\n\t\tworkflowRunId: z.string(),\n\t\t/** ID of the trigger message that started this workflow */\n\t\ttriggerMessageId: z.string(),\n\t\t/** Initial phase of processing */\n\t\tphase: z.string().optional(),\n\t\t/** Audience: 'all' = everyone, 'dashboard' = team only */\n\t\taudience: z.enum([\"all\", \"dashboard\"]).default(\"dashboard\"),\n\t}),\n\n\t// Emitted when AI agent makes a decision about whether to act\n\taiAgentDecisionMade: baseRealtimeEvent.extend({\n\t\tconversationId: z.string(),\n\t\taiAgentId: z.string(),\n\t\tworkflowRunId: z.string(),\n\t\t/** Whether the AI decided to take action */\n\t\tshouldAct: z.boolean(),\n\t\t/** Human-readable reason for the decision */\n\t\treason: z.string(),\n\t\t/** Response mode: how the AI is responding */\n\t\tmode: z.enum([\n\t\t\t\"respond_to_visitor\",\n\t\t\t\"respond_to_command\",\n\t\t\t\"background_only\",\n\t\t]),\n\t\t/** Audience: 'all' = everyone, 'dashboard' = team only */\n\t\taudience: z.enum([\"all\", \"dashboard\"]),\n\t}),\n\n\t// Emitted for progress updates during AI agent processing\n\taiAgentProcessingProgress: baseRealtimeEvent.extend({\n\t\tconversationId: z.string(),\n\t\taiAgentId: z.string(),\n\t\tworkflowRunId: z.string(),\n\t\t/** Current phase: 'thinking', 'searching', 'tool-executing', 'generating', etc. */\n\t\tphase: z.string(),\n\t\t/** Human-readable message for display (widget sees this) */\n\t\tmessage: z.string().nullable(),\n\t\t/** Tool information when phase is tool-related */\n\t\ttool: z\n\t\t\t.object({\n\t\t\t\ttoolCallId: z.string(),\n\t\t\t\ttoolName: z.string(),\n\t\t\t\t/** Tool state: partial (executing), result (success), error (failed) */\n\t\t\t\tstate: z.enum([\"partial\", \"result\", \"error\"]),\n\t\t\t})\n\t\t\t.optional(),\n\t\t/** Audience: 'all' = everyone, 'dashboard' = team only */\n\t\taudience: z.enum([\"all\", \"dashboard\"]).default(\"all\"),\n\t}),\n\n\t// Emitted when AI agent finishes processing\n\taiAgentProcessingCompleted: baseRealtimeEvent.extend({\n\t\tconversationId: z.string(),\n\t\taiAgentId: z.string(),\n\t\tworkflowRunId: z.string(),\n\t\t/** Whether processing completed successfully, was skipped, cancelled, or errored */\n\t\tstatus: z.enum([\"success\", \"skipped\", \"cancelled\", \"error\"]),\n\t\t/** Action taken (if status is 'success') */\n\t\taction: z.string().nullable().optional(),\n\t\t/** Reason for skip/cancel/error */\n\t\treason: z.string().nullable().optional(),\n\t\t/** Audience: 'all' = everyone, 'dashboard' = team only */\n\t\taudience: z.enum([\"all\", \"dashboard\"]).default(\"all\"),\n\t}),\n\n\t// =========================================================================\n\t// TIMELINE ITEM UPDATE EVENTS\n\t// For updating timeline items with new parts or state changes\n\t// =========================================================================\n\n\t// Emitted when an entire timeline item is updated (e.g., parts added)\n\ttimelineItemUpdated: baseRealtimeEvent.extend({\n\t\tconversationId: z.string(),\n\t\titem: z.object({\n\t\t\tid: z.string(),\n\t\t\tconversationId: z.string(),\n\t\t\torganizationId: z.string(),\n\t\t\tvisibility: z.enum([\n\t\t\t\tTimelineItemVisibility.PUBLIC,\n\t\t\t\tTimelineItemVisibility.PRIVATE,\n\t\t\t]),\n\t\t\ttype: z.enum([\n\t\t\t\tConversationTimelineType.MESSAGE,\n\t\t\t\tConversationTimelineType.EVENT,\n\t\t\t\tConversationTimelineType.IDENTIFICATION,\n\t\t\t]),\n\t\t\ttext: z.string().nullable(),\n\t\t\tparts: z.array(z.unknown()),\n\t\t\tuserId: z.string().nullable(),\n\t\t\tvisitorId: z.string().nullable(),\n\t\t\taiAgentId: z.string().nullable(),\n\t\t\tcreatedAt: z.string(),\n\t\t\tdeletedAt: z.string().nullable(),\n\t\t\ttool: z.string().nullable().optional(),\n\t\t}),\n\t}),\n\n\t// Emitted for granular part updates (e.g., tool state changes)\n\ttimelineItemPartUpdated: baseRealtimeEvent.extend({\n\t\tconversationId: z.string(),\n\t\ttimelineItemId: z.string(),\n\t\t/** Index of the part in the parts array */\n\t\tpartIndex: z.number(),\n\t\t/** The updated part data */\n\t\tpart: z.unknown(),\n\t}),\n\t// Web crawling events\n\tcrawlStarted: baseRealtimeEvent.extend({\n\t\tlinkSourceId: z.string(),\n\t\turl: z.string(),\n\t\tdiscoveredPages: z.array(\n\t\t\tz.object({\n\t\t\t\turl: z.string(),\n\t\t\t\ttitle: z.string().nullable(),\n\t\t\t\tdepth: z.number(),\n\t\t\t})\n\t\t),\n\t\ttotalPagesCount: z.number(),\n\t}),\n\tcrawlProgress: baseRealtimeEvent.extend({\n\t\tlinkSourceId: z.string(),\n\t\turl: z.string(),\n\t\tpage: z.object({\n\t\t\turl: z.string(),\n\t\t\ttitle: z.string().nullable(),\n\t\t\tstatus: z.enum([\"pending\", \"crawling\", \"completed\", \"failed\"]),\n\t\t\tsizeBytes: z.number().optional(),\n\t\t\terror: z.string().nullable().optional(),\n\t\t}),\n\t\tcompletedCount: z.number(),\n\t\ttotalCount: z.number(),\n\t}),\n\tcrawlCompleted: baseRealtimeEvent.extend({\n\t\tlinkSourceId: z.string(),\n\t\turl: z.string(),\n\t\tcrawledPagesCount: z.number(),\n\t\ttotalSizeBytes: z.number(),\n\t\tfailedPagesCount: z.number(),\n\t}),\n\tcrawlFailed: baseRealtimeEvent.extend({\n\t\tlinkSourceId: z.string(),\n\t\turl: z.string(),\n\t\terror: z.string(),\n\t}),\n\t// Link source updated (for status changes, etc.)\n\tlinkSourceUpdated: baseRealtimeEvent.extend({\n\t\tlinkSourceId: z.string(),\n\t\tstatus: z.enum([\"pending\", \"mapping\", \"crawling\", \"completed\", \"failed\"]),\n\t\tdiscoveredPagesCount: z.number().optional(),\n\t\tcrawledPagesCount: z.number().optional(),\n\t\ttotalSizeBytes: z.number().optional(),\n\t\terrorMessage: z.string().nullable().optional(),\n\t}),\n\t// Emitted after map phase with all discovered URLs (for real-time tree display)\n\tcrawlPagesDiscovered: baseRealtimeEvent.extend({\n\t\tlinkSourceId: z.string(),\n\t\tpages: z.array(\n\t\t\tz.object({\n\t\t\t\turl: z.string(),\n\t\t\t\tpath: z.string(),\n\t\t\t\tdepth: z.number(),\n\t\t\t})\n\t\t),\n\t}),\n\t// Emitted when each page completes scraping (for real-time updates)\n\tcrawlPageCompleted: baseRealtimeEvent.extend({\n\t\tlinkSourceId: z.string(),\n\t\tpage: z.object({\n\t\t\turl: z.string(),\n\t\t\ttitle: z.string().nullable(),\n\t\t\tsizeBytes: z.number(),\n\t\t\tknowledgeId: z.string(),\n\t\t}),\n\t}),\n\n\t// =========================================================================\n\t// AI TRAINING EVENTS\n\t// For knowledge base embedding generation and progress tracking\n\t// =========================================================================\n\n\t// Emitted when AI training starts\n\ttrainingStarted: baseRealtimeEvent.extend({\n\t\taiAgentId: z.string(),\n\t\ttotalItems: z.number(),\n\t}),\n\n\t// Emitted for progress updates during AI training\n\ttrainingProgress: baseRealtimeEvent.extend({\n\t\taiAgentId: z.string(),\n\t\tprocessedItems: z.number(),\n\t\ttotalItems: z.number(),\n\t\tcurrentItem: z\n\t\t\t.object({\n\t\t\t\tid: z.string(),\n\t\t\t\ttitle: z.string().nullable(),\n\t\t\t\ttype: z.enum([\"url\", \"faq\", \"article\"]),\n\t\t\t})\n\t\t\t.optional(),\n\t\tpercentage: z.number(),\n\t}),\n\n\t// Emitted when AI training completes successfully\n\ttrainingCompleted: baseRealtimeEvent.extend({\n\t\taiAgentId: z.string(),\n\t\ttotalItems: z.number(),\n\t\ttotalChunks: z.number(),\n\t\tduration: z.number(), // milliseconds\n\t}),\n\n\t// Emitted when AI training fails\n\ttrainingFailed: baseRealtimeEvent.extend({\n\t\taiAgentId: z.string(),\n\t\terror: z.string(),\n\t}),\n} as const;\n\nexport type RealtimeEventType = keyof typeof realtimeSchema;\n\nexport type RealtimeEventPayload<T extends RealtimeEventType> = z.infer<\n\t(typeof realtimeSchema)[T]\n>;\n\nexport type RealtimeEvent<T extends RealtimeEventType> = {\n\ttype: T;\n\tpayload: RealtimeEventPayload<T>;\n};\n\nexport type AnyRealtimeEvent = {\n\t[K in RealtimeEventType]: RealtimeEvent<K>;\n}[RealtimeEventType];\n\nexport type RealtimeEventData<T extends RealtimeEventType> =\n\tRealtimeEventPayload<T>;\n\n/**\n * Validates an event against its schema\n */\nexport function validateRealtimeEvent<T extends RealtimeEventType>(\n\ttype: T,\n\tdata: unknown\n): RealtimeEventPayload<T> {\n\tconst schema = realtimeSchema[type];\n\treturn schema.parse(data) as RealtimeEventPayload<T>;\n}\n\n/**\n * Type guard to check if a string is a valid event type\n */\nexport function isValidEventType(type: unknown): type is RealtimeEventType {\n\treturn typeof type === \"string\" && type in realtimeSchema;\n}\n\nexport function getEventPayload<T extends RealtimeEventType>(\n\tevent: RealtimeEvent<T>\n): RealtimeEventPayload<T> {\n\treturn event.payload;\n}\n"],"mappings":";;;;;;;AAUA,MAAa,oBAAoB,EAAE,OAAO;CACzC,WAAW,EAAE,QAAQ;CACrB,gBAAgB,EAAE,QAAQ;CAC1B,WAAW,EAAE,QAAQ,CAAC,UAAU;CAChC,QAAQ,EAAE,QAAQ,CAAC,UAAU;CAC7B,CAAC;;;;;AAMF,MAAa,iBAAiB;CAC7B,eAAe,kBAAkB,OAAO,EACvC,cAAc,EAAE,QAAQ,EACxB,CAAC;CACF,kBAAkB,kBAAkB,OAAO,EAC1C,cAAc,EAAE,QAAQ,EACxB,CAAC;CACF,kBAAkB,kBAAkB,OAAO;EAC1C,WAAW,EAAE,QAAQ;EACrB,cAAc,EAAE,QAAQ;EACxB,CAAC;CACF,qBAAqB,kBAAkB,OAAO;EAC7C,WAAW,EAAE,QAAQ;EACrB,cAAc,EAAE,QAAQ;EACxB,CAAC;CACF,oBAAoB,kBAAkB,OAAO;EAC5C,QAAQ,EAAE,QAAQ;EAClB,QAAQ,EAAE,KAAK;GAAC;GAAU;GAAQ;GAAU,CAAC;EAC7C,UAAU,EAAE,QAAQ;EACpB,CAAC;CACF,kBAAkB,kBAAkB,OAAO;EAC1C,gBAAgB,EAAE,QAAQ;EAC1B,WAAW,EAAE,QAA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Y,EAAE,QAAQ;EACtB,CAAC;CAGF,kBAAkB,kBAAkB,OAAO;EAC1C,WAAW,EAAE,QAAQ;EACrB,gBAAgB,EAAE,QAAQ;EAC1B,YAAY,EAAE,QAAQ;EACtB,aAAa,EACX,OAAO;GACP,IAAI,EAAE,QAAQ;GACd,OAAO,EAAE,QAAQ,CAAC,UAAU;GAC5B,MAAM,EAAE,KAAK;IAAC;IAAO;IAAO;IAAU,CAAC;GACvC,CAAC,CACD,UAAU;EACZ,YAAY,EAAE,QAAQ;EACtB,CAAC;CAGF,mBAAmB,kBAAkB,OAAO;EAC3C,WAAW,EAAE,QAAQ;EACrB,YAAY,EAAE,QAAQ;EACtB,aAAa,EAAE,QAAQ;EACvB,UAAU,EAAE,QAAQ;EACpB,CAAC;CAGF,gBAAgB,kBAAkB,OAAO;EACxC,WAAW,EAAE,QAAQ;EACrB,OAAO,EAAE,QAAQ;EACjB,CAAC;CACF;;;;AAuBD,SAAgB,sBACf,MACA,MAC0B;AAE1B,QADe,eAAe,MAChB,MAAM,KAAK;;;;;AAM1B,SAAgB,iBAAiB,MAA0C;AAC1E,QAAO,OAAO,SAAS,YAAY,QAAQ;;AAG5C,SAAgB,gBACf,OAC0B;AAC1B,QAAO,MAAM"}
|
|
1
|
+
{"version":3,"file":"realtime-events.js","names":[],"sources":["../src/realtime-events.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { visitorResponseSchema } from \"./api/visitor\";\nimport {\n\tConversationEventType,\n\tConversationStatus,\n\tConversationTimelineType,\n\tTimelineItemVisibility,\n} from \"./enums\";\nimport { conversationSchema } from \"./schemas\";\nimport { conversationHeaderSchema } from \"./trpc/conversation\";\n\nexport const baseRealtimeEvent = z.object({\n\twebsiteId: z.string(),\n\torganizationId: z.string(),\n\tvisitorId: z.string().nullable(),\n\tuserId: z.string().nullable(),\n});\n\n/**\n * Central event system for real-time communication\n * All WebSocket and Redis Pub/Sub events are defined here\n */\nexport const realtimeSchema = {\n\tuserConnected: baseRealtimeEvent.extend({\n\t\tconnectionId: z.string(),\n\t}),\n\tuserDisconnected: baseRealtimeEvent.extend({\n\t\tconnectionId: z.string(),\n\t}),\n\tvisitorConnected: baseRealtimeEvent.extend({\n\t\tvisitorId: z.string(),\n\t\tconnectionId: z.string(),\n\t}),\n\tvisitorDisconnected: baseRealtimeEvent.extend({\n\t\tvisitorId: z.string(),\n\t\tconnectionId: z.string(),\n\t}),\n\tuserPresenceUpdate: baseRealtimeEvent.extend({\n\t\tuserId: z.string(),\n\t\tstatus: z.enum([\"online\", \"away\", \"offline\"]),\n\t\tlastSeen: z.string(),\n\t}),\n\tconversationSeen: baseRealtimeEvent.extend({\n\t\tconversationId: z.string(),\n\t\taiAgentId: z.string().nullable(),\n\t\tlastSeenAt: z.string(),\n\t\t/** The type of actor who marked the conversation as seen */\n\t\tactorType: z.enum([\"visitor\", \"user\", \"ai_agent\"]),\n\t\t/** The actor's ID (matches one of userId, visitorId, or aiAgentId based on actorType) */\n\t\tactorId: z.string(),\n\t}),\n\tconversationTyping: baseRealtimeEvent.extend({\n\t\tconversationId: z.string(),\n\t\taiAgentId: z.string().nullable(),\n\t\tisTyping: z.boolean(),\n\t\tvisitorPreview: z.string().max(2000).nullable().optional(),\n\t}),\n\ttimelineItemCreated: baseRealtimeEvent.extend({\n\t\tconversationId: z.string(),\n\t\titem: z.object({\n\t\t\tid: z.string(),\n\t\t\tconversationId: z.string(),\n\t\t\torganizationId: z.string(),\n\t\t\tvisibility: z.enum([\n\t\t\t\tTimelineItemVisibility.PUBLIC,\n\t\t\t\tTimelineItemVisibility.PRIVATE,\n\t\t\t]),\n\t\t\ttype: z.enum([\n\t\t\t\tConversationTimelineType.MESSAGE,\n\t\t\t\tConversationTimelineType.EVENT,\n\t\t\t\tConversationTimelineType.IDENTIFICATION,\n\t\t\t\tConversationTimelineType.TOOL,\n\t\t\t]),\n\t\t\ttext: z.string().nullable(),\n\t\t\tparts: z.array(z.unknown()),\n\t\t\tuserId: z.string().nullable(),\n\t\t\tvisitorId: z.string().nullable(),\n\t\t\taiAgentId: z.string().nullable(),\n\t\t\tcreatedAt: z.string(),\n\t\t\tdeletedAt: z.string().nullable(),\n\t\t\ttool: z.string().nullable().optional(),\n\t\t}),\n\t}),\n\tconversationCreated: baseRealtimeEvent.extend({\n\t\tconversationId: z.string(),\n\t\tconversation: conversationSchema,\n\t\theader: conversationHeaderSchema,\n\t}),\n\tvisitorIdentified: baseRealtimeEvent.extend({\n\t\tvisitorId: z.string(),\n\t\tvisitor: visitorResponseSchema,\n\t}),\n\tconversationEventCreated: baseRealtimeEvent.extend({\n\t\tconversationId: z.string(),\n\t\taiAgentId: z.string().nullable(),\n\t\tevent: z.object({\n\t\t\tid: z.string(),\n\t\t\tconversationId: z.string(),\n\t\t\torganizationId: z.string(),\n\t\t\ttype: z.enum([\n\t\t\t\tConversationEventType.ASSIGNED,\n\t\t\t\tConversationEventType.UNASSIGNED,\n\t\t\t\tConversationEventType.PARTICIPANT_REQUESTED,\n\t\t\t\tConversationEventType.PARTICIPANT_JOINED,\n\t\t\t\tConversationEventType.PARTICIPANT_LEFT,\n\t\t\t\tConversationEventType.STATUS_CHANGED,\n\t\t\t\tConversationEventType.PRIORITY_CHANGED,\n\t\t\t\tConversationEventType.TAG_ADDED,\n\t\t\t\tConversationEventType.TAG_REMOVED,\n\t\t\t\tConversationEventType.RESOLVED,\n\t\t\t\tConversationEventType.REOPENED,\n\t\t\t\tConversationEventType.VISITOR_BLOCKED,\n\t\t\t\tConversationEventType.VISITOR_UNBLOCKED,\n\t\t\t\tConversationEventType.VISITOR_IDENTIFIED,\n\t\t\t]),\n\t\t\tactorUserId: z.string().nullable(),\n\t\t\tactorAiAgentId: z.string().nullable(),\n\t\t\ttargetUserId: z.string().nullable(),\n\t\t\ttargetAiAgentId: z.string().nullable(),\n\t\t\tmessage: z.string().nullable(),\n\t\t\tmetadata: z.record(z.string(), z.unknown()).nullable(),\n\t\t\tcreatedAt: z.string(),\n\t\t\tupdatedAt: z.string(),\n\t\t\tdeletedAt: z.string().nullable(),\n\t\t}),\n\t}),\n\t// Conversation updated (title, sentiment, escalation status changes, status changes)\n\tconversationUpdated: baseRealtimeEvent.extend({\n\t\tconversationId: z.string(),\n\t\tupdates: z.object({\n\t\t\ttitle: z.string().nullable().optional(),\n\t\t\tsentiment: z\n\t\t\t\t.enum([\"positive\", \"negative\", \"neutral\"])\n\t\t\t\t.nullable()\n\t\t\t\t.optional(),\n\t\t\tsentimentConfidence: z.number().nullable().optional(),\n\t\t\tescalatedAt: z.string().nullable().optional(),\n\t\t\tescalationReason: z.string().nullable().optional(),\n\t\t\tstatus: z\n\t\t\t\t.enum([\n\t\t\t\t\tConversationStatus.OPEN,\n\t\t\t\t\tConversationStatus.RESOLVED,\n\t\t\t\t\tConversationStatus.SPAM,\n\t\t\t\t])\n\t\t\t\t.optional(),\n\t\t\tpriority: z.enum([\"low\", \"normal\", \"high\", \"urgent\"]).optional(),\n\t\t\tresolvedAt: z.string().nullable().optional(),\n\t\t\tresolvedByUserId: z.string().nullable().optional(),\n\t\t\tresolvedByAiAgentId: z.string().nullable().optional(),\n\t\t\tresolutionTime: z.number().nullable().optional(),\n\t\t\tdeletedAt: z.string().nullable().optional(),\n\t\t}),\n\t\taiAgentId: z.string().nullable(),\n\t}),\n\n\t// =========================================================================\n\t// AI AGENT PROCESSING EVENTS\n\t// For progressive UI updates during AI agent responses\n\t//\n\t// AUDIENCE FIELD:\n\t// - 'all': Send to both dashboard and widget\n\t// - 'dashboard': Send only to dashboard (human agents)\n\t//\n\t// Widget (visitor) connections only receive events with audience='all'\n\t// =========================================================================\n\n\t// Emitted when AI agent starts processing a message\n\taiAgentProcessingStarted: baseRealtimeEvent.extend({\n\t\tconversationId: z.string(),\n\t\taiAgentId: z.string(),\n\t\tworkflowRunId: z.string(),\n\t\t/** ID of the trigger message that started this workflow */\n\t\ttriggerMessageId: z.string(),\n\t\t/** Initial phase of processing */\n\t\tphase: z.string().optional(),\n\t\t/** Audience: 'all' = everyone, 'dashboard' = team only */\n\t\taudience: z.enum([\"all\", \"dashboard\"]).default(\"dashboard\"),\n\t}),\n\n\t// Emitted when AI agent makes a decision about whether to act\n\taiAgentDecisionMade: baseRealtimeEvent.extend({\n\t\tconversationId: z.string(),\n\t\taiAgentId: z.string(),\n\t\tworkflowRunId: z.string(),\n\t\t/** Whether the AI decided to take action */\n\t\tshouldAct: z.boolean(),\n\t\t/** Human-readable reason for the decision */\n\t\treason: z.string(),\n\t\t/** Response mode: how the AI is responding */\n\t\tmode: z.enum([\n\t\t\t\"respond_to_visitor\",\n\t\t\t\"respond_to_command\",\n\t\t\t\"background_only\",\n\t\t]),\n\t\t/** Audience: 'all' = everyone, 'dashboard' = team only */\n\t\taudience: z.enum([\"all\", \"dashboard\"]),\n\t}),\n\n\t// Emitted for progress updates during AI agent processing\n\taiAgentProcessingProgress: baseRealtimeEvent.extend({\n\t\tconversationId: z.string(),\n\t\taiAgentId: z.string(),\n\t\tworkflowRunId: z.string(),\n\t\t/** Current phase: 'thinking', 'searching', 'tool-executing', 'generating', etc. */\n\t\tphase: z.string(),\n\t\t/** Human-readable message for display (widget sees this) */\n\t\tmessage: z.string().nullable(),\n\t\t/** Tool information when phase is tool-related */\n\t\ttool: z\n\t\t\t.object({\n\t\t\t\ttoolCallId: z.string(),\n\t\t\t\ttoolName: z.string(),\n\t\t\t\t/** Tool state: partial (executing), result (success), error (failed) */\n\t\t\t\tstate: z.enum([\"partial\", \"result\", \"error\"]),\n\t\t\t})\n\t\t\t.optional(),\n\t\t/** Audience: 'all' = everyone, 'dashboard' = team only */\n\t\taudience: z.enum([\"all\", \"dashboard\"]).default(\"all\"),\n\t}),\n\n\t// Emitted when AI agent finishes processing\n\taiAgentProcessingCompleted: baseRealtimeEvent.extend({\n\t\tconversationId: z.string(),\n\t\taiAgentId: z.string(),\n\t\tworkflowRunId: z.string(),\n\t\t/** Whether processing completed successfully, was skipped, cancelled, or errored */\n\t\tstatus: z.enum([\"success\", \"skipped\", \"cancelled\", \"error\"]),\n\t\t/** Action taken (if status is 'success') */\n\t\taction: z.string().nullable().optional(),\n\t\t/** Reason for skip/cancel/error */\n\t\treason: z.string().nullable().optional(),\n\t\t/** Audience: 'all' = everyone, 'dashboard' = team only */\n\t\taudience: z.enum([\"all\", \"dashboard\"]).default(\"all\"),\n\t}),\n\n\t// =========================================================================\n\t// TIMELINE ITEM UPDATE EVENTS\n\t// For updating timeline items with new parts or state changes\n\t// =========================================================================\n\n\t// Emitted when an entire timeline item is updated (e.g., parts added)\n\ttimelineItemUpdated: baseRealtimeEvent.extend({\n\t\tconversationId: z.string(),\n\t\titem: z.object({\n\t\t\tid: z.string(),\n\t\t\tconversationId: z.string(),\n\t\t\torganizationId: z.string(),\n\t\t\tvisibility: z.enum([\n\t\t\t\tTimelineItemVisibility.PUBLIC,\n\t\t\t\tTimelineItemVisibility.PRIVATE,\n\t\t\t]),\n\t\t\ttype: z.enum([\n\t\t\t\tConversationTimelineType.MESSAGE,\n\t\t\t\tConversationTimelineType.EVENT,\n\t\t\t\tConversationTimelineType.IDENTIFICATION,\n\t\t\t\tConversationTimelineType.TOOL,\n\t\t\t]),\n\t\t\ttext: z.string().nullable(),\n\t\t\tparts: z.array(z.unknown()),\n\t\t\tuserId: z.string().nullable(),\n\t\t\tvisitorId: z.string().nullable(),\n\t\t\taiAgentId: z.string().nullable(),\n\t\t\tcreatedAt: z.string(),\n\t\t\tdeletedAt: z.string().nullable(),\n\t\t\ttool: z.string().nullable().optional(),\n\t\t}),\n\t}),\n\n\t// Emitted for granular part updates (e.g., tool state changes)\n\ttimelineItemPartUpdated: baseRealtimeEvent.extend({\n\t\tconversationId: z.string(),\n\t\ttimelineItemId: z.string(),\n\t\t/** Index of the part in the parts array */\n\t\tpartIndex: z.number(),\n\t\t/** The updated part data */\n\t\tpart: z.unknown(),\n\t}),\n\t// Web crawling events\n\tcrawlStarted: baseRealtimeEvent.extend({\n\t\tlinkSourceId: z.string(),\n\t\turl: z.string(),\n\t\tdiscoveredPages: z.array(\n\t\t\tz.object({\n\t\t\t\turl: z.string(),\n\t\t\t\ttitle: z.string().nullable(),\n\t\t\t\tdepth: z.number(),\n\t\t\t})\n\t\t),\n\t\ttotalPagesCount: z.number(),\n\t}),\n\tcrawlProgress: baseRealtimeEvent.extend({\n\t\tlinkSourceId: z.string(),\n\t\turl: z.string(),\n\t\tpage: z.object({\n\t\t\turl: z.string(),\n\t\t\ttitle: z.string().nullable(),\n\t\t\tstatus: z.enum([\"pending\", \"crawling\", \"completed\", \"failed\"]),\n\t\t\tsizeBytes: z.number().optional(),\n\t\t\terror: z.string().nullable().optional(),\n\t\t}),\n\t\tcompletedCount: z.number(),\n\t\ttotalCount: z.number(),\n\t}),\n\tcrawlCompleted: baseRealtimeEvent.extend({\n\t\tlinkSourceId: z.string(),\n\t\turl: z.string(),\n\t\tcrawledPagesCount: z.number(),\n\t\ttotalSizeBytes: z.number(),\n\t\tfailedPagesCount: z.number(),\n\t}),\n\tcrawlFailed: baseRealtimeEvent.extend({\n\t\tlinkSourceId: z.string(),\n\t\turl: z.string(),\n\t\terror: z.string(),\n\t}),\n\t// Link source updated (for status changes, etc.)\n\tlinkSourceUpdated: baseRealtimeEvent.extend({\n\t\tlinkSourceId: z.string(),\n\t\tstatus: z.enum([\"pending\", \"mapping\", \"crawling\", \"completed\", \"failed\"]),\n\t\tdiscoveredPagesCount: z.number().optional(),\n\t\tcrawledPagesCount: z.number().optional(),\n\t\ttotalSizeBytes: z.number().optional(),\n\t\terrorMessage: z.string().nullable().optional(),\n\t}),\n\t// Emitted after map phase with all discovered URLs (for real-time tree display)\n\tcrawlPagesDiscovered: baseRealtimeEvent.extend({\n\t\tlinkSourceId: z.string(),\n\t\tpages: z.array(\n\t\t\tz.object({\n\t\t\t\turl: z.string(),\n\t\t\t\tpath: z.string(),\n\t\t\t\tdepth: z.number(),\n\t\t\t})\n\t\t),\n\t}),\n\t// Emitted when each page completes scraping (for real-time updates)\n\tcrawlPageCompleted: baseRealtimeEvent.extend({\n\t\tlinkSourceId: z.string(),\n\t\tpage: z.object({\n\t\t\turl: z.string(),\n\t\t\ttitle: z.string().nullable(),\n\t\t\tsizeBytes: z.number(),\n\t\t\tknowledgeId: z.string(),\n\t\t}),\n\t}),\n\n\t// =========================================================================\n\t// AI TRAINING EVENTS\n\t// For knowledge base embedding generation and progress tracking\n\t// =========================================================================\n\n\t// Emitted when AI training starts\n\ttrainingStarted: baseRealtimeEvent.extend({\n\t\taiAgentId: z.string(),\n\t\ttotalItems: z.number(),\n\t}),\n\n\t// Emitted for progress updates during AI training\n\ttrainingProgress: baseRealtimeEvent.extend({\n\t\taiAgentId: z.string(),\n\t\tprocessedItems: z.number(),\n\t\ttotalItems: z.number(),\n\t\tcurrentItem: z\n\t\t\t.object({\n\t\t\t\tid: z.string(),\n\t\t\t\ttitle: z.string().nullable(),\n\t\t\t\ttype: z.enum([\"url\", \"faq\", \"article\"]),\n\t\t\t})\n\t\t\t.optional(),\n\t\tpercentage: z.number(),\n\t}),\n\n\t// Emitted when AI training completes successfully\n\ttrainingCompleted: baseRealtimeEvent.extend({\n\t\taiAgentId: z.string(),\n\t\ttotalItems: z.number(),\n\t\ttotalChunks: z.number(),\n\t\tduration: z.number(), // milliseconds\n\t}),\n\n\t// Emitted when AI training fails\n\ttrainingFailed: baseRealtimeEvent.extend({\n\t\taiAgentId: z.string(),\n\t\terror: z.string(),\n\t}),\n} as const;\n\nexport type RealtimeEventType = keyof typeof realtimeSchema;\n\nexport type RealtimeEventPayload<T extends RealtimeEventType> = z.infer<\n\t(typeof realtimeSchema)[T]\n>;\n\nexport type RealtimeEvent<T extends RealtimeEventType> = {\n\ttype: T;\n\tpayload: RealtimeEventPayload<T>;\n};\n\nexport type AnyRealtimeEvent = {\n\t[K in RealtimeEventType]: RealtimeEvent<K>;\n}[RealtimeEventType];\n\nexport type RealtimeEventData<T extends RealtimeEventType> =\n\tRealtimeEventPayload<T>;\n\n/**\n * Validates an event against its schema\n */\nexport function validateRealtimeEvent<T extends RealtimeEventType>(\n\ttype: T,\n\tdata: unknown\n): RealtimeEventPayload<T> {\n\tconst schema = realtimeSchema[type];\n\treturn schema.parse(data) as RealtimeEventPayload<T>;\n}\n\n/**\n * Type guard to check if a string is a valid event type\n */\nexport function isValidEventType(type: unknown): type is RealtimeEventType {\n\treturn typeof type === \"string\" && type in realtimeSchema;\n}\n\nexport function getEventPayload<T extends RealtimeEventType>(\n\tevent: RealtimeEvent<T>\n): RealtimeEventPayload<T> {\n\treturn event.payload;\n}\n"],"mappings":";;;;;;;AAWA,MAAa,oBAAoB,EAAE,OAAO;CACzC,WAAW,EAAE,QAAQ;CACrB,gBAAgB,EAAE,QAAQ;CAC1B,WAAW,EAAE,QAAQ,CAAC,UAAU;CAChC,QAAQ,EAAE,QAAQ,CAAC,UAAU;CAC7B,CAAC;;;;;AAMF,MAAa,iBAAiB;CAC7B,eAAe,kBAAkB,OAAO,EACvC,cAAc,EAAE,QAAQ,EACxB,CAAC;CACF,kBAAkB,kBAAkB,OAAO,EAC1C,cAAc,EAAE,QAAQ,EACxB,CAAC;CACF,kBAAkB,kBAAkB,OAAO;EAC1C,WAAW,EAAE,QAAQ;EACrB,cAAc,EAAE,QAAQ;EACxB,CAAC;CACF,qBAAqB,kBAAkB,OAAO;EAC7C,WAAW,EAAE,QAAQ;EACrB,cAAc,EAAE,QAAQ;EACxB,CAAC;CACF,oBAAoB,kBAAkB,OAAO;EAC5C,QAAQ,EAAE,QAAQ;EAClB,QAAQ,EAAE,KAAK;GAAC;GAAU;GAAQ;GAAU,CAAC;EAC7C,UAAU,EAAE,QAAQ;EACpB,CAAC;CACF,kBAAkB,kBAAkB,OAAO;EAC1C,gBAAgB,EAAE,QAAQ;EAC1B,WAAW,EAAE,QAAQ,CAAC,UAAU;EAChC,YAAY,EAAE,QAAQ;EAEtB,WAAW,EAAE,KAAK;GAAC;GAAW;GAAQ;GAAW,CAAC;EAElD,SAAS,EAAE,QAAQ;EACnB,CAAC;CACF,oBAAoB,kBAAkB,OAAO;E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IAAA,aAUX;;;;;;;;;KAEU,SAAA,GAAY,CAAA,CAAE,aAAa;cAE1B,oBAAkB,CAAA,CAAA;;;;EAdR,SAAA,aAAA;EAAA,SAAA,aAAA;EAYX,SAAA,aAAS;EAER,MAAA,cAAA,UAmBX,CAAA
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","names":[],"sources":["../src/schemas.ts"],"sourcesContent":[],"mappings":";;;cAIa,YAAU,CAAA,CAAA;;EAAV,IAAA,aAUX;;;;;;;;;KAEU,SAAA,GAAY,CAAA,CAAE,aAAa;cAE1B,oBAAkB,CAAA,CAAA;;;;EAdR,SAAA,aAAA;EAAA,SAAA,aAAA;EAYX,SAAA,aAAS;EAER,MAAA,cAAA,UAmBX,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAEU,YAAA,GAAe,CAAA,CAAE,aAAa;cAE7B,wBAAsB,CAAA,CAAA;;;;;;;;;;;KAYvB,gBAAA,GAAmB,CAAA,CAAE,aAAa"}
|
package/trpc/conversation.d.ts
CHANGED
|
@@ -171,6 +171,7 @@ declare const conversationHeaderSchema: z.ZodObject<{
|
|
|
171
171
|
message: "message";
|
|
172
172
|
event: "event";
|
|
173
173
|
identification: "identification";
|
|
174
|
+
tool: "tool";
|
|
174
175
|
}>;
|
|
175
176
|
text: z.ZodNullable<z.ZodString>;
|
|
176
177
|
tool: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -316,6 +317,7 @@ declare const conversationHeaderSchema: z.ZodObject<{
|
|
|
316
317
|
message: "message";
|
|
317
318
|
event: "event";
|
|
318
319
|
identification: "identification";
|
|
320
|
+
tool: "tool";
|
|
319
321
|
}>;
|
|
320
322
|
text: z.ZodNullable<z.ZodString>;
|
|
321
323
|
tool: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -526,6 +528,7 @@ declare const listConversationHeadersResponseSchema: z.ZodObject<{
|
|
|
526
528
|
message: "message";
|
|
527
529
|
event: "event";
|
|
528
530
|
identification: "identification";
|
|
531
|
+
tool: "tool";
|
|
529
532
|
}>;
|
|
530
533
|
text: z.ZodNullable<z.ZodString>;
|
|
531
534
|
tool: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -671,6 +674,7 @@ declare const listConversationHeadersResponseSchema: z.ZodObject<{
|
|
|
671
674
|
message: "message";
|
|
672
675
|
event: "event";
|
|
673
676
|
identification: "identification";
|
|
677
|
+
tool: "tool";
|
|
674
678
|
}>;
|
|
675
679
|
text: z.ZodNullable<z.ZodString>;
|
|
676
680
|
tool: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation.d.ts","names":[],"sources":["../../src/trpc/conversation.ts"],"sourcesContent":[],"mappings":";;;cAUa,0BAAwB,CAAA,CAAA;;EAAxB,QAAA,EAAA,UAAA;EAMA,IAAA,EAAA,MAAA;AAOb,CAAA,CAAA;AAQa,cAfA,0BA+CX,EA/CqC,CAAA,CAAA,OA+CrC,CAAA;;;;;;cAxCW,6BAA2B,CAAA,CAAA,YAAA,CAAA,CAAA;;;;;cAQ3B,0BAAwB,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAA,SAAA,aAAA;EAAA,SAAA,aAAA;EAkCzB,SAAA,eAAA,YAA0B,CAAA;AAItC,CAAA,eAAa,CAAA;KAJD,0BAAA,GAA6B,CAAA,CAAE,aACnC;cAGK,oCAAkC,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAIlC,0BAAwB,CAAA,CAAA;;;;;IAJU,IAAA,EAAA,MAAA;EAAA,CAAA,CAAA;EAIlC,QAAA,WAAA,CAAA
|
|
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