refactor!: Refactor Extension for Multi-Collection Support
Change Summary
Features Added
• Multi-Collection Support: Dynamically generate functions for multiple Firestore collections and subcollections
• Collection-Specific Configuration: Individual field filtering, flattening settings, and Typesense collection mapping per Firestore collection
• Subcollection Support: Handle nested collections with path parameters (e.g., users/{userId}/books)
• Enhanced Field Filtering: Pipe-separated field lists for granular control over indexed data
• Centralized Document Processing: New createTypesenseDocument and handleDocumentIndexing functions for consistent document handling
• Context Parameter Extraction: Automatically extract and include path placeholders in indexed documents
Configuration Updates
• New Environment Variables: FIRESTORE_COLLECTION_PATHS, TYPESENSE_COLLECTION_NAMES, FIRESTORE_COLLECTION_FIELDS_LIST, FLATTEN_NESTED_DOCUMENTS_LIST
• Enhanced Extension Configuration: Updated extension.yaml with multi-collection parameters and validation
• Test Environment Configs: Multiple test configuration files for different scenarios
Testing Enhancements
• Update tests to utilize the TestEnvironment class to avoid manual copying of environment files to the functions dir
Breaking Changes
• Configuration Format: New multi-collection configuration format replaces single-collection setup • Environment Variables: Updated parameter names and structure for multi-collection support • Function Generation: Dynamic function generation replaces static single-function approach
PR Checklist
- [x] I have read and signed the Contributor License Agreement.
Implement #121
Any updates?