Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Update various fixes
Description
Update various fixes pull notes individually as well
1 Initialization & Authentication:
• Takes batch_size and optional access_token as parameters
• Uses the HubSpot API to authenticate and get the portal ID
• Constructs base URLs for tickets
2 Main Processing Methods:
• _process_all_notes: Fetches standalone notes from HubSpot
• Uses pagination (100 items per page)
• Filters notes by date range if specified
• Creates Document objects with note content and metadata
• _process_tickets: Core method for processing tickets
• Fetches tickets with associated contacts and notes
• Uses pagination to handle large datasets
• Processes each ticket's content, associated emails, and notes
• Creates Document objects with combined content
3 Document Generation:
• Creates standardized Document objects containing:
• Unique IDs
• Content sections with links
• Source identification (HUBSPOT)
• Semantic identifiers (titles/subjects)
• Updated timestamps
• Relevant metadata
4 Interface Implementation:
• load_from_state(): Full data load
• poll_source(): Incremental updates based on time range
5 Error Handling:
• Handles missing credentials
• Deals with None values in ticket subjects and note content
• Properly formats associated data