- Added Linker and Optimizer apps to `INSTALLED_APPS` in `settings.py`. - Configured API endpoints for Linker and Optimizer in `urls.py`. - Implemented `OptimizeContentFunction` for content optimization in the AI module. - Created prompts for content optimization and site structure generation. - Updated `OptimizerService` to utilize the new AI function for content optimization. - Developed frontend components including dashboards and content lists for Linker and Optimizer. - Integrated new routes and sidebar navigation for Linker and Optimizer in the frontend. - Enhanced content management with source and sync status filters in the Writer module. - Comprehensive test coverage added for new features and components.
33 lines
858 B
TypeScript
33 lines
858 B
TypeScript
import { fetchAPI } from '../services/api';
|
|
|
|
/**
|
|
* Linker API Client
|
|
* Functions for internal linking operations
|
|
*/
|
|
export const linkerApi = {
|
|
/**
|
|
* Process a single content item for internal linking
|
|
* @param contentId - Content ID to process
|
|
* @returns Link result with links added
|
|
*/
|
|
process: async (contentId: number) => {
|
|
return await fetchAPI('/v1/linker/process/', {
|
|
method: 'POST',
|
|
body: JSON.stringify({ content_id: contentId }),
|
|
});
|
|
},
|
|
|
|
/**
|
|
* Batch process multiple content items for internal linking
|
|
* @param contentIds - Array of content IDs to process
|
|
* @returns Array of link results
|
|
*/
|
|
batchProcess: async (contentIds: number[]) => {
|
|
return await fetchAPI('/v1/linker/batch_process/', {
|
|
method: 'POST',
|
|
body: JSON.stringify({ content_ids: contentIds }),
|
|
});
|
|
},
|
|
};
|
|
|