refactor: unify agent marketplace to single endpoint with cursor pagination

- Replace multiple marketplace routes with unified /marketplace endpoint
  - Add query string controls: category, search, limit, cursor, promoted, requiredPermission
  - Implement cursor-based pagination replacing page-based system
  - Integrate ACL permissions for proper access control
  - Fix ObjectId constructor error in Agent model
  - Update React components to use unified useGetMarketplaceAgentsQuery hook
  - Enhance type safety and remove deprecated useDynamicAgentQuery
  - Update tests for new marketplace architecture
  -Known issues:
  see more button after category switching + Unit tests
This commit is contained in:
Danny Avila 2025-06-23 11:42:24 -04:00
parent 04008bf862
commit 608f5fe402
No known key found for this signature in database
GPG key ID: BF31EEB2C5CA0956
22 changed files with 458 additions and 1128 deletions

View file

@ -20,6 +20,8 @@ router.use(requireJwtAuth);
router.use(checkBan);
router.use(uaParser);
router.use('/marketplace', marketplace);
router.use('/', v1);
const chatRouter = express.Router();
@ -39,6 +41,5 @@ chatRouter.use('/', chat);
router.use('/chat', chatRouter);
// Add marketplace routes
router.use('/marketplace', marketplace);
module.exports = router;