🔪 Extraction Target
Extract all product operations from the 19,843-line index.mjs into a focused ProductService class. Direct migration.
📁 Methods to Extract
// All of these get ripped out and moved to ProductService
getProducts()
getProduct()
createProduct()
updateProduct()
deleteProduct()
getProductBarcodes()
addProductBarcode()
// ... and any other product-related methods
🎯 Definition of Done
⚡ Implementation
// services/ProductService.js
export class ProductService extends BaseService {
async getProducts() {
// Direct copy from index.mjs - no changes
}
async createProduct(product) {
// Direct copy from index.mjs - no changes
}
async addProductBarcode(productId, barcode) {
// Direct copy from index.mjs - no changes
}
// ... rest of product methods
}
🚫 NOT in Scope
- Backward compatibility
- Deprecation warnings
- Proxy methods in GrocyClient
- Changing method signatures
- Adding new features
💀 Breaking Changes
Yes. Modernize.
Related to
Parent issue: #11
🔪 Extraction Target
Extract all product operations from the 19,843-line index.mjs into a focused ProductService class. Direct migration.
📁 Methods to Extract
🎯 Definition of Done
services/ProductService.jsextending BaseService⚡ Implementation
🚫 NOT in Scope
💀 Breaking Changes
Yes. Modernize.
Related to
Parent issue: #11