The complete open source platform to run your entire marketplace. Storefront, vendor panel, admin console, and integrations in one enterprise-grade platform you own.
TypeScript b2b-marketplacecomposable-commerceecommerceenterpriseheadless-commercemarketplacemedusamedusajsmulti-vendortypescript
fix: correct registry paths, dependencies, and docs for v2.0 (#791)
Jakub Sieradzki17051f0d0b7d
diff --git a/packages/registry/package.json b/packages/registry/package.jsonindex 3098694e4..fb873dfd7 100644--- a/packages/registry/package.json+++ b/packages/registry/package.json@@ -6,8 +6,8 @@"scripts": {"build": "tsc","dev": "tsc --watch",- "build:registry": "bunx @mercurjs/cli@canary registry:build",- "codegen": "bunx @mercurjs/cli@canary registry:codegen"+ "build:registry": "bunx @mercurjs/cli@latest registry:build",+ "codegen": "bunx @mercurjs/cli@latest registry:codegen"},"dependencies": {"@medusajs/framework": "^2.13.3",diff --git a/packages/registry/r/algolia.json b/packages/registry/r/algolia.jsonindex 2a0a53b65..4fceba65e 100644--- a/packages/registry/r/algolia.json+++ b/packages/registry/r/algolia.json@@ -6,7 +6,7 @@"algoliasearch"],"registryDependencies": [],- "docs": "## Configuration\n\nAdd the algolia module to your `medusa-config.ts`:\n\n```ts\nmodules: [\n {\n resolve: './modules/algolia',\n options: {\n appId: process.env.ALGOLIA_APP_ID,\n apiKey: process.env.ALGOLIA_API_KEY,\n },\n },\n]\n```\n\n## Environment Variables\n\n```\nALGOLIA_APP_ID=your_algolia_app_id\nALGOLIA_API_KEY=your_algolia_admin_api_key\n```\n\n## Middlewares\n\nAdd algolia middlewares to your `api/middlewares.ts`:\n\n```ts\nimport { defineMiddlewares } from \"@medusajs/medusa\";\nimport { algoliaMiddlewares } from \"./store/products/search/middlewares\";\n\nexport default defineMiddlewares({\n routes: [...algoliaMiddlewares],\n});\n```\n\nIf you already have a `middlewares.ts` file, merge the algolia middleware imports and spread them into your existing `routes` array.\n\n## Database Migrations\n\nAfter installing the block, run migrations for the new links:\n\n```bash\nnpx medusa db:migrate\n```\n\n## Run codegen\n\nAfter installing, regenerate SDK types:\n\n```bash\nnpx @mercurjs/cli@canary codegen\n```",+ "docs": "## Configuration\n\nAdd the algolia module to your `medusa-config.ts`:\n\n```ts\nmodules: [\n {\n resolve: './modules/algolia',\n options: {\n appId: process.env.ALGOLIA_APP_ID,\n apiKey: process.env.ALGOLIA_API_KEY,\n },\n },\n]\n```\n\n## Environment Variables\n\n```\nALGOLIA_APP_ID=your_algolia_app_id\nALGOLIA_API_KEY=your_algolia_admin_api_key\n```\n\n## Middlewares\n\nAdd algolia middlewares to your `api/middlewares.ts`:\n\n```ts\nimport { defineMiddlewares } from \"@medusajs/medusa\";\nimport { algoliaMiddlewares } from \"./store/products/search/middlewares\";\n\nexport default defineMiddlewares({\n routes: [...algoliaMiddlewares],\n});\n```\n\nIf you already have a `middlewares.ts` file, merge the algolia middleware imports and spread them into your existing `routes` array.\n\n## Database Migrations\n\nAfter installing the block, run migrations for the new links:\n\n```bash\nnpx medusa db:migrate\n```\n\n## Run codegen\n\nAfter installing, regenerate SDK types:\n\n```bash\nnpx @mercurjs/cli@latest codegen\n```","categories": ["module","workflow",diff --git a/packages/registry/r/product-import-export.json b/packages/registry/r/product-import-export.jsonindex 1629a9222..72b3d895f 100644--- a/packages/registry/r/product-import-export.json+++ b/packages/registry/r/product-import-export.json@@ -8,7 +8,7 @@"@medusajs/core-flows"],"registryDependencies": [],- "docs": "## Product Import/Export Block\n\n### Configuration\n\nNo additional modules needed — uses built-in Medusa product CSV steps.\n\n### Middleware Setup\n\nAdd the import middleware to your `api/middlewares.ts`:\n\n```ts\nimport { defineMiddlewares } from '@medusajs/medusa'\nimport { productImportExportMiddlewares } from './vendor/products/middlewares'\n\nexport default defineMiddlewares({\n routes: [...productImportExportMiddlewares],\n})\n```\n\n### Run codegen\n\nAfter installing the block, regenerate SDK types:\n\n```bash\nnpx @mercurjs/cli@canary codegen\n```\n\n### Vendor Navigation\n\nThe block includes a `products/page.tsx` that overrides the default product list page, adding Import and Export buttons in the header. The buttons open drawer routes at `/products/import` and `/products/export`.",+ "docs": "## Product Import/Export Block\n\n### Configuration\n\nNo additional modules needed — uses built-in Medusa product CSV steps.\n\n### Middleware Setup\n\nAdd the import middleware to your `api/middlewares.ts`:\n\n```ts\nimport { defineMiddlewares } from '@medusajs/medusa'\nimport { productImportExportMiddlewares } from './vendor/products/middlewares'\n\nexport default defineMiddlewares({\n routes: [...productImportExportMiddlewares],\n})\n```\n\n### Run codegen\n\nAfter installing the block, regenerate SDK types:\n\n```bash\nnpx @mercurjs/cli@latest codegen\n```\n\n### Vendor Navigation\n\nThe block includes a `products/page.tsx` that overrides the default product list page, adding Import and Export buttons in the header. The buttons open drawer routes at `/products/import` and `/products/export`.","categories": ["api","workflow",diff --git a/packages/registry/r/registry.json b/packages/registry/r/registry.jsonindex b42f28547..0f9a669a3 100644--- a/packages/registry/r/registry.json+++ b/packages/registry/r/registry.json@@ -228,7 +228,7 @@"@medusajs/core-flows"],"registryDependencies": [],- "docs": "## Product Import/Export Block\n\n### Configuration\n\nNo additional modules needed — uses built-in Medusa product CSV steps.\n\n### Middleware Setup\n\nAdd the import middleware to your `api/middlewares.ts`:\n\n```ts\nimport { defineMiddlewares } from '@medusajs/medusa'\nimport { productImportExportMiddlewares } from './vendor/products/middlewares'\n\nexport default defineMiddlewares({\n routes: [...productImportExportMiddlewares],\n})\n```\n\n### Run codegen\n\nAfter installing the block, regenerate SDK types:\n\n```bash\nnpx @mercurjs/cli@canary codegen\n```\n\n### Vendor Navigation\n\nThe block includes a `products/page.tsx` that overrides the default product list page, adding Import and Export buttons in the header. The buttons open drawer routes at `/products/import` and `/products/export`.",+ "docs": "## Product Import/Export Block\n\n### Configuration\n\nNo additional modules needed — uses built-in Medusa product CSV steps.\n\n### Middleware Setup\n\nAdd the import middleware to your `api/middlewares.ts`:\n\n```ts\nimport { defineMiddlewares } from '@medusajs/medusa'\nimport { productImportExportMiddlewares } from './vendor/products/middlewares'\n\nexport default defineMiddlewares({\n routes: [...productImportExportMiddlewares],\n})\n```\n\n### Run codegen\n\nAfter installing the block, regenerate SDK types:\n\n```bash\nnpx @mercurjs/cli@latest codegen\n```\n\n### Vendor Navigation\n\nThe block includes a `products/page.tsx` that overrides the default product list page, adding Import and Export buttons in the header. The buttons open drawer routes at `/products/import` and `/products/export`.","files": [{"path": "product-import-export/workflows/steps/get-seller-products.ts",@@ -306,7 +306,7 @@"react-jwt"],"registryDependencies": [],- "docs": "## Configuration\n\nAdd the member module to your `medusa-config.ts`:\n\n```ts\nimport { ContainerRegistrationKeys } from \"@medusajs/framework/utils\"\n\nmodules: [\n {\n resolve: './modules/member',\n dependencies: [ContainerRegistrationKeys.QUERY],\n },\n]\n```\n\n## Middlewares\n\nAdd the team management middlewares to your `api/middlewares.ts`:\n\n```ts\nimport { defineMiddlewares } from \"@medusajs/medusa\";\nimport { vendorMembersMiddlewares } from \"./vendor/members/middlewares\";\nimport { vendorInvitesMiddlewares } from \"./vendor/invites/middlewares\";\n\nexport default defineMiddlewares({\n routes: [...vendorMembersMiddlewares, ...vendorInvitesMiddlewares],\n});\n```\n\nIf you already have a `middlewares.ts` file, merge the middleware imports and spread them into your existing `routes` array.\n\n## Database Migrations\n\nAfter installing the block and adding the module configuration, generate and run the migrations to create the necessary tables in your database:\n\n```bash\nnpx medusa db:generate member\nnpx medusa db:migrate\n```\n\n## Run codegen\n\nAfter installing the block, regenerate SDK types:\n\n```bash\nnpx @mercurjs/cli@canary codegen\n```",+ "docs": "## Configuration\n\nAdd the member module to your `medusa-config.ts`:\n\n```ts\nimport { ContainerRegistrationKeys } from \"@medusajs/framework/utils\"\n\nmodules: [\n {\n resolve: './modules/member',\n dependencies: [ContainerRegistrationKeys.QUERY],\n },\n]\n```\n\n## Middlewares\n\nAdd the team management middlewares to your `api/middlewares.ts`:\n\n```ts\nimport { defineMiddlewares } from \"@medusajs/medusa\";\nimport { vendorMembersMiddlewares } from \"./vendor/members/middlewares\";\nimport { vendorInvitesMiddlewares } from \"./vendor/invites/middlewares\";\n\nexport default defineMiddlewares({\n routes: [...vendorMembersMiddlewares, ...vendorInvitesMiddlewares],\n});\n```\n\nIf you already have a `middlewares.ts` file, merge the middleware imports and spread them into your existing `routes` array.\n\n## Database Migrations\n\nAfter installing the block and adding the module configuration, generate and run the migrations to create the necessary tables in your database:\n\n```bash\nnpx medusa db:generate member\nnpx medusa db:migrate\n```\n\n## Run codegen\n\nAfter installing the block, regenerate SDK types:\n\n```bash\nnpx @mercurjs/cli@latest codegen\n```","files": [{"path": "team-management/modules/member/index.ts",@@ -481,7 +481,7 @@"description": "Customer wishlist with product bookmarking, pricing context, and store API endpoints.","dependencies": [],"registryDependencies": [],- "docs": "## Configuration\n\nAdd the wishlist module to your `medusa-config.ts`:\n\n```ts\nmodules: [\n {\n resolve: './modules/wishlist',\n },\n]\n```\n\n## Database Migrations\n\nAfter installing the block and adding the module configuration, generate and run the migrations to create the necessary tables in your database:\n\n```bash\nnpx medusa db:generate wishlist\nnpx medusa db:migrate\n```\n\n## Middlewares\n\nAdd the wishlist middlewares to your `api/middlewares.ts`:\n\n```ts\nimport { defineMiddlewares } from \"@medusajs/medusa\";\nimport { storeWishlistMiddlewares } from \"./store/wishlist/middlewares\";\n\nexport default defineMiddlewares({\n routes: [...storeWishlistMiddlewares],\n});\n```\n\nIf you already have a `middlewares.ts` file, merge the wishlist middleware imports and spread them into your existing `routes` array.\n\n## Run codegen\n\nAfter installing the block, regenerate SDK types:\n\n```bash\nnpx @mercurjs/cli@canary codegen\n```",+ "docs": "## Configuration\n\nAdd the wishlist module to your `medusa-config.ts`:\n\n```ts\nmodules: [\n {\n resolve: './modules/wishlist',\n },\n]\n```\n\n## Database Migrations\n\nAfter installing the block and adding the module configuration, generate and run the migrations to create the necessary tables in your database:\n\n```bash\nnpx medusa db:generate wishlist\nnpx medusa db:migrate\n```\n\n## Middlewares\n\nAdd the wishlist middlewares to your `api/middlewares.ts`:\n\n```ts\nimport { defineMiddlewares } from \"@medusajs/medusa\";\nimport { storeWishlistMiddlewares } from \"./store/wishlist/middlewares\";\n\nexport default defineMiddlewares({\n routes: [...storeWishlistMiddlewares],\n});\n```\n\nIf you already have a `middlewares.ts` file, merge the wishlist middleware imports and spread them into your existing `routes` array.\n\n## Run codegen\n\nAfter installing the block, regenerate SDK types:\n\n```bash\nnpx @mercurjs/cli@latest codegen\n```","files": [{"path": "wishlist/modules/wishlist/index.ts",@@ -563,7 +563,7 @@"description": "Vendor notification feed with bell icon in navbar and vendor API endpoint.","dependencies": [],"registryDependencies": [],- "docs": "## Vendor Notifications\n\nThis block adds vendor notifications: a bell icon in the navbar and a `GET /vendor/notifications` API endpoint.\n\n### 1. Notification Provider\n\nAdd the `seller_feed` channel to the local notification provider in `medusa-config.ts`:\n\n```ts\n{\n resolve: '@medusajs/medusa/notification',\n options: {\n providers: [\n {\n resolve: '@medusajs/medusa/notification-local',\n id: 'local',\n options: {\n channels: ['feed', 'seller_feed']\n }\n }\n ]\n }\n}\n```\n\n### 2. Middleware Setup\n\nImport `vendorNotificationMiddlewares` and add it to your `src/api/middlewares.ts`:\n\n```ts\nimport { defineMiddlewares } from \"@medusajs/medusa\";\nimport { vendorNotificationMiddlewares } from \"./vendor/notifications/middlewares\";\n\nexport default defineMiddlewares({\n routes: [\n // ...your existing middlewares,\n ...vendorNotificationMiddlewares,\n ],\n});\n```\n\n### 3. TopbarActions Component\n\nRegister the `TopbarActions` component in your vendor app's `vite.config.ts`:\n\n```ts\nimport { mercurDashboardPlugin } from '@mercurjs/dashboard-sdk'\n\nexport default defineConfig({\n plugins: [\n react(),\n mercurDashboardPlugin({\n medusaConfigPath: '../../packages/api/medusa-config.ts',\n components: {\n TopbarActions: './components/topbar-actions',\n },\n }),\n ],\n})\n```\n\n### 4. Sending Notifications\n\nCreate a subscriber to send notifications to sellers. Example (`src/subscribers/seller-product-notification.ts`):\n\n```ts\nimport type { SubscriberArgs, SubscriberConfig } from \"@medusajs/framework\"\nimport { ContainerRegistrationKeys, Modules } from \"@medusajs/framework/utils\"\n\nexport default async function handler({\n event: { data },\n container,\n}: SubscriberArgs<{ id: string }>) {\n const query = container.resolve(ContainerRegistrationKeys.QUERY)\n const notificationService = container.resolve(Modules.NOTIFICATION)\n\n // Example: look up the seller linked to a product\n const { data: [product] } = await query.graph({\n entity: \"product\",\n fields: [\"id\", \"title\", \"seller.*\"],\n filters: { id: data.id },\n })\n\n if (!product?.seller?.id) return\n\n await notificationService.createNotifications({\n to: product.seller.id,\n channel: \"seller_feed\",\n template: \"product-created\",\n data: {\n title: \"Product created\",\n description: `Your product \\\"${product.title}\\\" has been created.`,\n },\n })\n}\n\nexport const config: SubscriberConfig = {\n event: \"product.created\",\n}\n```\n\n### 5. Run codegen\n\n```bash\nnpx @mercurjs/cli@canary codegen\n```",+ "docs": "## Vendor Notifications\n\nThis block adds vendor notifications: a bell icon in the navbar and a `GET /vendor/notifications` API endpoint.\n\n### 1. Notification Provider\n\nAdd the `seller_feed` channel to the local notification provider in `medusa-config.ts`:\n\n```ts\n{\n resolve: '@medusajs/medusa/notification',\n options: {\n providers: [\n {\n resolve: '@medusajs/medusa/notification-local',\n id: 'local',\n options: {\n channels: ['feed', 'seller_feed']\n }\n }\n ]\n }\n}\n```\n\n### 2. Middleware Setup\n\nImport `vendorNotificationMiddlewares` and add it to your `src/api/middlewares.ts`:\n\n```ts\nimport { defineMiddlewares } from \"@medusajs/medusa\";\nimport { vendorNotificationMiddlewares } from \"./vendor/notifications/middlewares\";\n\nexport default defineMiddlewares({\n routes: [\n // ...your existing middlewares,\n ...vendorNotificationMiddlewares,\n ],\n});\n```\n\n### 3. TopbarActions Component\n\nRegister the `TopbarActions` component in your vendor app's `vite.config.ts`:\n\n```ts\nimport { mercurDashboardPlugin } from '@mercurjs/dashboard-sdk'\n\nexport default defineConfig({\n plugins: [\n react(),\n mercurDashboardPlugin({\n medusaConfigPath: '../../packages/api/medusa-config.ts',\n components: {\n TopbarActions: './components/topbar-actions',\n },\n }),\n ],\n})\n```\n\n### 4. Sending Notifications\n\nCreate a subscriber to send notifications to sellers. Example (`src/subscribers/seller-product-notification.ts`):\n\n```ts\nimport type { SubscriberArgs, SubscriberConfig } from \"@medusajs/framework\"\nimport { ContainerRegistrationKeys, Modules } from \"@medusajs/framework/utils\"\n\nexport default async function handler({\n event: { data },\n container,\n}: SubscriberArgs<{ id: string }>) {\n const query = container.resolve(ContainerRegistrationKeys.QUERY)\n const notificationService = container.resolve(Modules.NOTIFICATION)\n\n // Example: look up the seller linked to a product\n const { data: [product] } = await query.graph({\n entity: \"product\",\n fields: [\"id\", \"title\", \"seller.*\"],\n filters: { id: data.id },\n })\n\n if (!product?.seller?.id) return\n\n await notificationService.createNotifications({\n to: product.seller.id,\n channel: \"seller_feed\",\n template: \"product-created\",\n data: {\n title: \"Product created\",\n description: `Your product \\\"${product.title}\\\" has been created.`,\n },\n })\n}\n\nexport const config: SubscriberConfig = {\n event: \"product.created\",\n}\n```\n\n### 5. Run codegen\n\n```bash\nnpx @mercurjs/cli@latest codegen\n```","files": [{"path": "vendor-notifications/api/middlewares.ts",@@ -606,7 +606,7 @@"algoliasearch"],"registryDependencies": [],- "docs": "## Configuration\n\nAdd the algolia module to your `medusa-config.ts`:\n\n```ts\nmodules: [\n {\n resolve: './modules/algolia',\n options: {\n appId: process.env.ALGOLIA_APP_ID,\n apiKey: process.env.ALGOLIA_API_KEY,\n },\n },\n]\n```\n\n## Environment Variables\n\n```\nALGOLIA_APP_ID=your_algolia_app_id\nALGOLIA_API_KEY=your_algolia_admin_api_key\n```\n\n## Middlewares\n\nAdd algolia middlewares to your `api/middlewares.ts`:\n\n```ts\nimport { defineMiddlewares } from \"@medusajs/medusa\";\nimport { algoliaMiddlewares } from \"./store/products/search/middlewares\";\n\nexport default defineMiddlewares({\n routes: [...algoliaMiddlewares],\n});\n```\n\nIf you already have a `middlewares.ts` file, merge the algolia middleware imports and spread them into your existing `routes` array.\n\n## Database Migrations\n\nAfter installing the block, run migrations for the new links:\n\n```bash\nnpx medusa db:migrate\n```\n\n## Run codegen\n\nAfter installing, regenerate SDK types:\n\n```bash\nnpx @mercurjs/cli@canary codegen\n```",+ "docs": "## Configuration\n\nAdd the algolia module to your `medusa-config.ts`:\n\n```ts\nmodules: [\n {\n resolve: './modules/algolia',\n options: {\n appId: process.env.ALGOLIA_APP_ID,\n apiKey: process.env.ALGOLIA_API_KEY,\n },\n },\n]\n```\n\n## Environment Variables\n\n```\nALGOLIA_APP_ID=your_algolia_app_id\nALGOLIA_API_KEY=your_algolia_admin_api_key\n```\n\n## Middlewares\n\nAdd algolia middlewares to your `api/middlewares.ts`:\n\n```ts\nimport { defineMiddlewares } from \"@medusajs/medusa\";\nimport { algoliaMiddlewares } from \"./store/products/search/middlewares\";\n\nexport default defineMiddlewares({\n routes: [...algoliaMiddlewares],\n});\n```\n\nIf you already have a `middlewares.ts` file, merge the algolia middleware imports and spread them into your existing `routes` array.\n\n## Database Migrations\n\nAfter installing the block, run migrations for the new links:\n\n```bash\nnpx medusa db:migrate\n```\n\n## Run codegen\n\nAfter installing, regenerate SDK types:\n\n```bash\nnpx @mercurjs/cli@latest codegen\n```","files": [{"path": "algolia/modules/algolia/index.ts",@@ -697,7 +697,7 @@"description": "Admin approval system powered by the Custom Fields module. Admins can list, review, accept or reject entity requests.","dependencies": [],"registryDependencies": [],- "docs": "## Prerequisites\n\nThis block requires the **Custom Fields module** (`@mercurjs/core-plugin/modules/custom-fields`). Make sure it is registered in your `medusa-config.ts`.\n\n## Configuration\n\nAdd request-related custom fields to the entities you want to support approval workflows for. Product already has a built-in `status` field, so you only need to configure custom fields for other entities.\n\nAdd these fields to your Custom Fields module options in `medusa-config.ts`:\n\n```ts\n{\n resolve: \"@mercurjs/core-plugin/modules/custom-fields\",\n options: {\n customFields: {\n ProductCollection: {\n request_status: {\n type: \"enum\",\n enum: [\"draft\", \"pending\", \"accepted\", \"rejected\"],\n defaultValue: \"draft\",\n },\n submitter_id: { type: \"string\", nullable: true },\n reviewer_id: { type: \"string\", nullable: true },\n reviewer_note: { type: \"text\", nullable: true },\n },\n // Add the same fields to other entities as needed:\n // ProductCategory, ProductType, ProductTag\n },\n },\n}\n```\n\n## Middlewares\n\nAdd the request middlewares to your `api/middlewares.ts`:\n\n```ts\nimport { defineMiddlewares } from \"@medusajs/medusa\";\nimport { adminRequestsMiddlewares } from \"./admin/requests/middlewares\";\nimport { vendorProductCollectionRequestsMiddlewares } from \"./vendor/requests/product-collections/middlewares\";\nimport { vendorProductCategoryRequestsMiddlewares } from \"./vendor/requests/product-categories/middlewares\";\nimport { vendorProductTypeRequestsMiddlewares } from \"./vendor/requests/product-types/middlewares\";\nimport { vendorProductTagRequestsMiddlewares } from \"./vendor/requests/product-tags/middlewares\";\n\nexport default defineMiddlewares({\n routes: [\n ...adminRequestsMiddlewares,\n ...vendorProductCollectionRequestsMiddlewares,\n ...vendorProductCategoryRequestsMiddlewares,\n ...vendorProductTypeRequestsMiddlewares,\n ...vendorProductTagRequestsMiddlewares,\n ],\n});\n```\n\nIf you already have a `middlewares.ts` file, merge the middleware imports and spread them into your existing `routes` array.\n\n## Database Migrations\n\nAfter updating the custom fields configuration, run migrations:\n\n```bash\nnpx medusa db:migrate\n```\n\n## Run codegen\n\nAfter installing the block, regenerate SDK types:\n\n```bash\nnpx @mercurjs/cli@canary codegen\n```\n\n## API Endpoints\n\n### Admin\n\n- `GET /admin/requests/:type` — List entities with request custom fields (filterable by `request_status`, `submitter_id`)\n- `GET /admin/requests/:type/:id` — Retrieve entity with request custom fields\n- `POST /admin/requests/:type/:id/accept` — Accept a request\n- `POST /admin/requests/:type/:id/reject` — Reject a request\n\nSupported `:type` values: `product_collection`, `product_category`, `product_type`, `product_tag`\n\n### Vendor\n\n- `GET /vendor/requests/product-collections` — List vendor's collection requests\n- `POST /vendor/requests/product-collections` — Create a collection request\n- `GET /vendor/requests/product-categories` — List vendor's category requests\n- `POST /vendor/requests/product-categories` — Create a category request\n- `GET /vendor/requests/product-types` — List vendor's type requests\n- `POST /vendor/requests/product-types` — Create a type request\n- `GET /vendor/requests/product-tags` — List vendor's tag requests\n- `POST /vendor/requests/product-tags` — Create a tag request",+ "docs": "## Prerequisites\n\nThis block requires the **Custom Fields module** (`@mercurjs/core-plugin/modules/custom-fields`). Make sure it is registered in your `medusa-config.ts`.\n\n## Configuration\n\nAdd request-related custom fields to the entities you want to support approval workflows for. Product already has a built-in `status` field, so you only need to configure custom fields for other entities.\n\nAdd these fields to your Custom Fields module options in `medusa-config.ts`:\n\n```ts\n{\n resolve: \"@mercurjs/core-plugin/modules/custom-fields\",\n options: {\n customFields: {\n ProductCollection: {\n request_status: {\n type: \"enum\",\n enum: [\"draft\", \"pending\", \"accepted\", \"rejected\"],\n defaultValue: \"draft\",\n },\n submitter_id: { type: \"string\", nullable: true },\n reviewer_id: { type: \"string\", nullable: true },\n reviewer_note: { type: \"text\", nullable: true },\n },\n // Add the same fields to other entities as needed:\n // ProductCategory, ProductType, ProductTag\n },\n },\n}\n```\n\n## Middlewares\n\nAdd the request middlewares to your `api/middlewares.ts`:\n\n```ts\nimport { defineMiddlewares } from \"@medusajs/medusa\";\nimport { adminRequestsMiddlewares } from \"./admin/requests/middlewares\";\nimport { vendorProductCollectionRequestsMiddlewares } from \"./vendor/requests/product-collections/middlewares\";\nimport { vendorProductCategoryRequestsMiddlewares } from \"./vendor/requests/product-categories/middlewares\";\nimport { vendorProductTypeRequestsMiddlewares } from \"./vendor/requests/product-types/middlewares\";\nimport { vendorProductTagRequestsMiddlewares } from \"./vendor/requests/product-tags/middlewares\";\n\nexport default defineMiddlewares({\n routes: [\n ...adminRequestsMiddlewares,\n ...vendorProductCollectionRequestsMiddlewares,\n ...vendorProductCategoryRequestsMiddlewares,\n ...vendorProductTypeRequestsMiddlewares,\n ...vendorProductTagRequestsMiddlewares,\n ],\n});\n```\n\nIf you already have a `middlewares.ts` file, merge the middleware imports and spread them into your existing `routes` array.\n\n## Database Migrations\n\nAfter updating the custom fields configuration, run migrations:\n\n```bash\nnpx medusa db:migrate\n```\n\n## Run codegen\n\nAfter installing the block, regenerate SDK types:\n\n```bash\nnpx @mercurjs/cli@latest codegen\n```\n\n## API Endpoints\n\n### Admin\n\n- `GET /admin/requests/:type` — List entities with request custom fields (filterable by `request_status`, `submitter_id`)\n- `GET /admin/requests/:type/:id` — Retrieve entity with request custom fields\n- `POST /admin/requests/:type/:id/accept` — Accept a request\n- `POST /admin/requests/:type/:id/reject` — Reject a request\n\nSupported `:type` values: `product_collection`, `product_category`, `product_type`, `product_tag`\n\n### Vendor\n\n- `GET /vendor/requests/product-collections` — List vendor's collection requests\n- `POST /vendor/requests/product-collections` — Create a collection request\n- `GET /vendor/requests/product-categories` — List vendor's category requests\n- `POST /vendor/requests/product-categories` — Create a category request\n- `GET /vendor/requests/product-types` — List vendor's type requests\n- `POST /vendor/requests/product-types` — Create a type request\n- `GET /vendor/requests/product-tags` — List vendor's tag requests\n- `POST /vendor/requests/product-tags` — Create a tag request","files": [{"path": "requests/types/index.ts",@@ -964,7 +964,7 @@"@talkjs/react"],"registryDependencies": [],- "docs": "## Vendor Chat (TalkJS)\n\nThis block adds a TalkJS chat integration for vendors, exposing a `GET /vendor/talkjs` endpoint that retrieves conversations for the authenticated seller and a Messages page in the vendor portal.\n\n### Environment Variables\n\nAdd the following to your `.env`:\n\n```\nVITE_TALK_JS_APP_ID=your_talkjs_app_id\nTALKJS_SECRET_API_KEY=your_talkjs_secret_api_key\n```\n\n### Vite Configuration\n\nAdd the `__TALK_JS_APP_ID__` define to your vendor portal's `vite.config.ts`:\n\n```ts\nconst TALK_JS_APP_ID = env.VITE_TALK_JS_APP_ID || \"\"\n\nexport default defineConfig({\n // ...\n define: {\n __TALK_JS_APP_ID__: JSON.stringify(TALK_JS_APP_ID),\n },\n})\n```\n\n### Run codegen\n\nAfter installing the block, regenerate SDK types:\n\n```bash\nnpx @mercurjs/cli@canary codegen\n```",+ "docs": "## Vendor Chat (TalkJS)\n\nThis block adds a TalkJS chat integration for vendors, exposing a `GET /vendor/talkjs` endpoint that retrieves conversations for the authenticated seller and a Messages page in the vendor portal.\n\n### Environment Variables\n\nAdd the following to your `.env`:\n\n```\nVITE_TALK_JS_APP_ID=your_talkjs_app_id\nTALKJS_SECRET_API_KEY=your_talkjs_secret_api_key\n```\n\n### Vite Configuration\n\nAdd the `__TALK_JS_APP_ID__` define to your vendor portal's `vite.config.ts`:\n\n```ts\nconst TALK_JS_APP_ID = env.VITE_TALK_JS_APP_ID || \"\"\n\nexport default defineConfig({\n // ...\n define: {\n __TALK_JS_APP_ID__: JSON.stringify(TALK_JS_APP_ID),\n },\n})\n```\n\n### Run codegen\n\nAfter installing the block, regenerate SDK types:\n\n```bash\nnpx @mercurjs/cli@latest codegen\n```","files": [{"path": "vendor-chat/api/vendor/talkjs/route.ts",diff --git a/packages/registry/r/requests.json b/packages/registry/r/requests.jsonindex 725d4ecd9..bbf87cac0 100644--- a/packages/registry/r/requests.json+++ b/packages/registry/r/requests.json@@ -4,7 +4,7 @@"description": "Admin approval system powered by the Custom Fields module. Admins can list, review, accept or reject entity requests.","dependencies": [],"registryDependencies": [],- "docs": "## Prerequisites\n\nThis block requires the **Custom Fields module** (`@mercurjs/core-plugin/modules/custom-fields`). Make sure it is registered in your `medusa-config.ts`.\n\n## Configuration\n\nAdd request-related custom fields to the entities you want to support approval workflows for. Product already has a built-in `status` field, so you only need to configure custom fields for other entities.\n\nAdd these fields to your Custom Fields module options in `medusa-config.ts`:\n\n```ts\n{\n resolve: \"@mercurjs/core-plugin/modules/custom-fields\",\n options: {\n customFields: {\n ProductCollection: {\n request_status: {\n type: \"enum\",\n enum: [\"draft\", \"pending\", \"accepted\", \"rejected\"],\n defaultValue: \"draft\",\n },\n submitter_id: { type: \"string\", nullable: true },\n reviewer_id: { type: \"string\", nullable: true },\n reviewer_note: { type: \"text\", nullable: true },\n },\n // Add the same fields to other entities as needed:\n // ProductCategory, ProductType, ProductTag\n },\n },\n}\n```\n\n## Middlewares\n\nAdd the request middlewares to your `api/middlewares.ts`:\n\n```ts\nimport { defineMiddlewares } from \"@medusajs/medusa\";\nimport { adminRequestsMiddlewares } from \"./admin/requests/middlewares\";\nimport { vendorProductCollectionRequestsMiddlewares } from \"./vendor/requests/product-collections/middlewares\";\nimport { vendorProductCategoryRequestsMiddlewares } from \"./vendor/requests/product-categories/middlewares\";\nimport { vendorProductTypeRequestsMiddlewares } from \"./vendor/requests/product-types/middlewares\";\nimport { vendorProductTagRequestsMiddlewares } from \"./vendor/requests/product-tags/middlewares\";\n\nexport default defineMiddlewares({\n routes: [\n ...adminRequestsMiddlewares,\n ...vendorProductCollectionRequestsMiddlewares,\n ...vendorProductCategoryRequestsMiddlewares,\n ...vendorProductTypeRequestsMiddlewares,\n ...vendorProductTagRequestsMiddlewares,\n ],\n});\n```\n\nIf you already have a `middlewares.ts` file, merge the middleware imports and spread them into your existing `routes` array.\n\n## Database Migrations\n\nAfter updating the custom fields configuration, run migrations:\n\n```bash\nnpx medusa db:migrate\n```\n\n## Run codegen\n\nAfter installing the block, regenerate SDK types:\n\n```bash\nnpx @mercurjs/cli@canary codegen\n```\n\n## API Endpoints\n\n### Admin\n\n- `GET /admin/requests/:type` — List entities with request custom fields (filterable by `request_status`, `submitter_id`)\n- `GET /admin/requests/:type/:id` — Retrieve entity with request custom fields\n- `POST /admin/requests/:type/:id/accept` — Accept a request\n- `POST /admin/requests/:type/:id/reject` — Reject a request\n\nSupported `:type` values: `product_collection`, `product_category`, `product_type`, `product_tag`\n\n### Vendor\n\n- `GET /vendor/requests/product-collections` — List vendor's collection requests\n- `POST /vendor/requests/product-collections` — Create a collection request\n- `GET /vendor/requests/product-categories` — List vendor's category requests\n- `POST /vendor/requests/product-categories` — Create a category request\n- `GET /vendor/requests/product-types` — List vendor's type requests\n- `POST /vendor/requests/product-types` — Create a type request\n- `GET /vendor/requests/product-tags` — List vendor's tag requests\n- `POST /vendor/requests/product-tags` — Create a tag request",+ "docs": "## Prerequisites\n\nThis block requires the **Custom Fields module** (`@mercurjs/core-plugin/modules/custom-fields`). Make sure it is registered in your `medusa-config.ts`.\n\n## Configuration\n\nAdd request-related custom fields to the entities you want to support approval workflows for. Product already has a built-in `status` field, so you only need to configure custom fields for other entities.\n\nAdd these fields to your Custom Fields module options in `medusa-config.ts`:\n\n```ts\n{\n resolve: \"@mercurjs/core-plugin/modules/custom-fields\",\n options: {\n customFields: {\n ProductCollection: {\n request_status: {\n type: \"enum\",\n enum: [\"draft\", \"pending\", \"accepted\", \"rejected\"],\n defaultValue: \"draft\",\n },\n submitter_id: { type: \"string\", nullable: true },\n reviewer_id: { type: \"string\", nullable: true },\n reviewer_note: { type: \"text\", nullable: true },\n },\n // Add the same fields to other entities as needed:\n // ProductCategory, ProductType, ProductTag\n },\n },\n}\n```\n\n## Middlewares\n\nAdd the request middlewares to your `api/middlewares.ts`:\n\n```ts\nimport { defineMiddlewares } from \"@medusajs/medusa\";\nimport { adminRequestsMiddlewares } from \"./admin/requests/middlewares\";\nimport { vendorProductCollectionRequestsMiddlewares } from \"./vendor/requests/product-collections/middlewares\";\nimport { vendorProductCategoryRequestsMiddlewares } from \"./vendor/requests/product-categories/middlewares\";\nimport { vendorProductTypeRequestsMiddlewares } from \"./vendor/requests/product-types/middlewares\";\nimport { vendorProductTagRequestsMiddlewares } from \"./vendor/requests/product-tags/middlewares\";\n\nexport default defineMiddlewares({\n routes: [\n ...adminRequestsMiddlewares,\n ...vendorProductCollectionRequestsMiddlewares,\n ...vendorProductCategoryRequestsMiddlewares,\n ...vendorProductTypeRequestsMiddlewares,\n ...vendorProductTagRequestsMiddlewares,\n ],\n});\n```\n\nIf you already have a `middlewares.ts` file, merge the middleware imports and spread them into your existing `routes` array.\n\n## Database Migrations\n\nAfter updating the custom fields configuration, run migrations:\n\n```bash\nnpx medusa db:migrate\n```\n\n## Run codegen\n\nAfter installing the block, regenerate SDK types:\n\n```bash\nnpx @mercurjs/cli@latest codegen\n```\n\n## API Endpoints\n\n### Admin\n\n- `GET /admin/requests/:type` — List entities with request custom fields (filterable by `request_status`, `submitter_id`)\n- `GET /admin/requests/:type/:id` — Retrieve entity with request custom fields\n- `POST /admin/requests/:type/:id/accept` — Accept a request\n- `POST /admin/requests/:type/:id/reject` — Reject a request\n\nSupported `:type` values: `product_collection`, `product_category`, `product_type`, `product_tag`\n\n### Vendor\n\n- `GET /vendor/requests/product-collections` — List vendor's collection requests\n- `POST /vendor/requests/product-collections` — Create a collection request\n- `GET /vendor/requests/product-categories` — List vendor's category requests\n- `POST /vendor/requests/product-categories` — Create a category request\n- `GET /vendor/requests/product-types` — List vendor's type requests\n- `POST /vendor/requests/product-types` — Create a type request\n- `GET /vendor/requests/product-tags` — List vendor's tag requests\n- `POST /vendor/requests/product-tags` — Create a tag request","categories": ["api","workflow"diff --git a/packages/registry/r/team-management.json b/packages/registry/r/team-management.jsonindex 5f4ef7295..f64fbfc7d 100644--- a/packages/registry/r/team-management.json+++ b/packages/registry/r/team-management.json@@ -8,7 +8,7 @@"react-jwt"],"registryDependencies": [],- "docs": "## Configuration\n\nAdd the member module to your `medusa-config.ts`:\n\n```ts\nimport { ContainerRegistrationKeys } from \"@medusajs/framework/utils\"\n\nmodules: [\n {\n resolve: './modules/member',\n dependencies: [ContainerRegistrationKeys.QUERY],\n },\n]\n```\n\n## Middlewares\n\nAdd the team management middlewares to your `api/middlewares.ts`:\n\n```ts\nimport { defineMiddlewares } from \"@medusajs/medusa\";\nimport { vendorMembersMiddlewares } from \"./vendor/members/middlewares\";\nimport { vendorInvitesMiddlewares } from \"./vendor/invites/middlewares\";\n\nexport default defineMiddlewares({\n routes: [...vendorMembersMiddlewares, ...vendorInvitesMiddlewares],\n});\n```\n\nIf you already have a `middlewares.ts` file, merge the middleware imports and spread them into your existing `routes` array.\n\n## Database Migrations\n\nAfter installing the block and adding the module configuration, generate and run the migrations to create the necessary tables in your database:\n\n```bash\nnpx medusa db:generate member\nnpx medusa db:migrate\n```\n\n## Run codegen\n\nAfter installing the block, regenerate SDK types:\n\n```bash\nnpx @mercurjs/cli@canary codegen\n```",+ "docs": "## Configuration\n\nAdd the member module to your `medusa-config.ts`:\n\n```ts\nimport { ContainerRegistrationKeys } from \"@medusajs/framework/utils\"\n\nmodules: [\n {\n resolve: './modules/member',\n dependencies: [ContainerRegistrationKeys.QUERY],\n },\n]\n```\n\n## Middlewares\n\nAdd the team management middlewares to your `api/middlewares.ts`:\n\n```ts\nimport { defineMiddlewares } from \"@medusajs/medusa\";\nimport { vendorMembersMiddlewares } from \"./vendor/members/middlewares\";\nimport { vendorInvitesMiddlewares } from \"./vendor/invites/middlewares\";\n\nexport default defineMiddlewares({\n routes: [...vendorMembersMiddlewares, ...vendorInvitesMiddlewares],\n});\n```\n\nIf you already have a `middlewares.ts` file, merge the middleware imports and spread them into your existing `routes` array.\n\n## Database Migrations\n\nAfter installing the block and adding the module configuration, generate and run the migrations to create the necessary tables in your database:\n\n```bash\nnpx medusa db:generate member\nnpx medusa db:migrate\n```\n\n## Run codegen\n\nAfter installing the block, regenerate SDK types:\n\n```bash\nnpx @mercurjs/cli@latest codegen\n```","categories": ["module","workflow",diff --git a/packages/registry/r/vendor-chat.json b/packages/registry/r/vendor-chat.jsonindex 313e76e96..130d59ff4 100644--- a/packages/registry/r/vendor-chat.json+++ b/packages/registry/r/vendor-chat.json@@ -6,7 +6,7 @@"@talkjs/react"],"registryDependencies": [],- "docs": "## Vendor Chat (TalkJS)\n\nThis block adds a TalkJS chat integration for vendors, exposing a `GET /vendor/talkjs` endpoint that retrieves conversations for the authenticated seller and a Messages page in the vendor portal.\n\n### Environment Variables\n\nAdd the following to your `.env`:\n\n```\nVITE_TALK_JS_APP_ID=your_talkjs_app_id\nTALKJS_SECRET_API_KEY=your_talkjs_secret_api_key\n```\n\n### Vite Configuration\n\nAdd the `__TALK_JS_APP_ID__` define to your vendor portal's `vite.config.ts`:\n\n```ts\nconst TALK_JS_APP_ID = env.VITE_TALK_JS_APP_ID || \"\"\n\nexport default defineConfig({\n // ...\n define: {\n __TALK_JS_APP_ID__: JSON.stringify(TALK_JS_APP_ID),\n },\n})\n```\n\n### Run codegen\n\nAfter installing the block, regenerate SDK types:\n\n```bash\nnpx @mercurjs/cli@canary codegen\n```",+ "docs": "## Vendor Chat (TalkJS)\n\nThis block adds a TalkJS chat integration for vendors, exposing a `GET /vendor/talkjs` endpoint that retrieves conversations for the authenticated seller and a Messages page in the vendor portal.\n\n### Environment Variables\n\nAdd the following to your `.env`:\n\n```\nVITE_TALK_JS_APP_ID=your_talkjs_app_id\nTALKJS_SECRET_API_KEY=your_talkjs_secret_api_key\n```\n\n### Vite Configuration\n\nAdd the `__TALK_JS_APP_ID__` define to your vendor portal's `vite.config.ts`:\n\n```ts\nconst TALK_JS_APP_ID = env.VITE_TALK_JS_APP_ID || \"\"\n\nexport default defineConfig({\n // ...\n define: {\n __TALK_JS_APP_ID__: JSON.stringify(TALK_JS_APP_ID),\n },\n})\n```\n\n### Run codegen\n\nAfter installing the block, regenerate SDK types:\n\n```bash\nnpx @mercurjs/cli@latest codegen\n```","categories": ["api","vendor"diff --git a/packages/registry/r/vendor-notifications.json b/packages/registry/r/vendor-notifications.jsonindex 5cb0d03d5..02211e37b 100644--- a/packages/registry/r/vendor-notifications.json+++ b/packages/registry/r/vendor-notifications.json@@ -4,7 +4,7 @@"description": "Vendor notification feed with bell icon in navbar and vendor API endpoint.","dependencies": [],"registryDependencies": [],- "docs": "## Vendor Notifications\n\nThis block adds vendor notifications: a bell icon in the navbar and a `GET /vendor/notifications` API endpoint.\n\n### 1. Notification Provider\n\nAdd the `seller_feed` channel to the local notification provider in `medusa-config.ts`:\n\n```ts\n{\n resolve: '@medusajs/medusa/notification',\n options: {\n providers: [\n {\n resolve: '@medusajs/medusa/notification-local',\n id: 'local',\n options: {\n channels: ['feed', 'seller_feed']\n }\n }\n ]\n }\n}\n```\n\n### 2. Middleware Setup\n\nImport `vendorNotificationMiddlewares` and add it to your `src/api/middlewares.ts`:\n\n```ts\nimport { defineMiddlewares } from \"@medusajs/medusa\";\nimport { vendorNotificationMiddlewares } from \"./vendor/notifications/middlewares\";\n\nexport default defineMiddlewares({\n routes: [\n // ...your existing middlewares,\n ...vendorNotificationMiddlewares,\n ],\n});\n```\n\n### 3. TopbarActions Component\n\nRegister the `TopbarActions` component in your vendor app's `vite.config.ts`:\n\n```ts\nimport { mercurDashboardPlugin } from '@mercurjs/dashboard-sdk'\n\nexport default defineConfig({\n plugins: [\n react(),\n mercurDashboardPlugin({\n medusaConfigPath: '../../packages/api/medusa-config.ts',\n components: {\n TopbarActions: './components/topbar-actions',\n },\n }),\n ],\n})\n```\n\n### 4. Sending Notifications\n\nCreate a subscriber to send notifications to sellers. Example (`src/subscribers/seller-product-notification.ts`):\n\n```ts\nimport type { SubscriberArgs, SubscriberConfig } from \"@medusajs/framework\"\nimport { ContainerRegistrationKeys, Modules } from \"@medusajs/framework/utils\"\n\nexport default async function handler({\n event: { data },\n container,\n}: SubscriberArgs<{ id: string }>) {\n const query = container.resolve(ContainerRegistrationKeys.QUERY)\n const notificationService = container.resolve(Modules.NOTIFICATION)\n\n // Example: look up the seller linked to a product\n const { data: [product] } = await query.graph({\n entity: \"product\",\n fields: [\"id\", \"title\", \"seller.*\"],\n filters: { id: data.id },\n })\n\n if (!product?.seller?.id) return\n\n await notificationService.createNotifications({\n to: product.seller.id,\n channel: \"seller_feed\",\n template: \"product-created\",\n data: {\n title: \"Product created\",\n description: `Your product \\\"${product.title}\\\" has been created.`,\n },\n })\n}\n\nexport const config: SubscriberConfig = {\n event: \"product.created\",\n}\n```\n\n### 5. Run codegen\n\n```bash\nnpx @mercurjs/cli@canary codegen\n```",+ "docs": "## Vendor Notifications\n\nThis block adds vendor notifications: a bell icon in the navbar and a `GET /vendor/notifications` API endpoint.\n\n### 1. Notification Provider\n\nAdd the `seller_feed` channel to the local notification provider in `medusa-config.ts`:\n\n```ts\n{\n resolve: '@medusajs/medusa/notification',\n options: {\n providers: [\n {\n resolve: '@medusajs/medusa/notification-local',\n id: 'local',\n options: {\n channels: ['feed', 'seller_feed']\n }\n }\n ]\n }\n}\n```\n\n### 2. Middleware Setup\n\nImport `vendorNotificationMiddlewares` and add it to your `src/api/middlewares.ts`:\n\n```ts\nimport { defineMiddlewares } from \"@medusajs/medusa\";\nimport { vendorNotificationMiddlewares } from \"./vendor/notifications/middlewares\";\n\nexport default defineMiddlewares({\n routes: [\n // ...your existing middlewares,\n ...vendorNotificationMiddlewares,\n ],\n});\n```\n\n### 3. TopbarActions Component\n\nRegister the `TopbarActions` component in your vendor app's `vite.config.ts`:\n\n```ts\nimport { mercurDashboardPlugin } from '@mercurjs/dashboard-sdk'\n\nexport default defineConfig({\n plugins: [\n react(),\n mercurDashboardPlugin({\n medusaConfigPath: '../../packages/api/medusa-config.ts',\n components: {\n TopbarActions: './components/topbar-actions',\n },\n }),\n ],\n})\n```\n\n### 4. Sending Notifications\n\nCreate a subscriber to send notifications to sellers. Example (`src/subscribers/seller-product-notification.ts`):\n\n```ts\nimport type { SubscriberArgs, SubscriberConfig } from \"@medusajs/framework\"\nimport { ContainerRegistrationKeys, Modules } from \"@medusajs/framework/utils\"\n\nexport default async function handler({\n event: { data },\n container,\n}: SubscriberArgs<{ id: string }>) {\n const query = container.resolve(ContainerRegistrationKeys.QUERY)\n const notificationService = container.resolve(Modules.NOTIFICATION)\n\n // Example: look up the seller linked to a product\n const { data: [product] } = await query.graph({\n entity: \"product\",\n fields: [\"id\", \"title\", \"seller.*\"],\n filters: { id: data.id },\n })\n\n if (!product?.seller?.id) return\n\n await notificationService.createNotifications({\n to: product.seller.id,\n channel: \"seller_feed\",\n template: \"product-created\",\n data: {\n title: \"Product created\",\n description: `Your product \\\"${product.title}\\\" has been created.`,\n },\n })\n}\n\nexport const config: SubscriberConfig = {\n event: \"product.created\",\n}\n```\n\n### 5. Run codegen\n\n```bash\nnpx @mercurjs/cli@latest codegen\n```","categories": ["api","vendor"diff --git a/packages/registry/r/wishlist.json b/packages/registry/r/wishlist.jsonindex f8465eaee..5ca722819 100644--- a/packages/registry/r/wishlist.json+++ b/packages/registry/r/wishlist.json@@ -4,7 +4,7 @@"description": "Customer wishlist with product bookmarking, pricing context, and store API endpoints.","dependencies": [],"registryDependencies": [],- "docs": "## Configuration\n\nAdd the wishlist module to your `medusa-config.ts`:\n\n```ts\nmodules: [\n {\n resolve: './modules/wishlist',\n },\n]\n```\n\n## Database Migrations\n\nAfter installing the block and adding the module configuration, generate and run the migrations to create the necessary tables in your database:\n\n```bash\nnpx medusa db:generate wishlist\nnpx medusa db:migrate\n```\n\n## Middlewares\n\nAdd the wishlist middlewares to your `api/middlewares.ts`:\n\n```ts\nimport { defineMiddlewares } from \"@medusajs/medusa\";\nimport { storeWishlistMiddlewares } from \"./store/wishlist/middlewares\";\n\nexport default defineMiddlewares({\n routes: [...storeWishlistMiddlewares],\n});\n```\n\nIf you already have a `middlewares.ts` file, merge the wishlist middleware imports and spread them into your existing `routes` array.\n\n## Run codegen\n\nAfter installing the block, regenerate SDK types:\n\n```bash\nnpx @mercurjs/cli@canary codegen\n```",+ "docs": "## Configuration\n\nAdd the wishlist module to your `medusa-config.ts`:\n\n```ts\nmodules: [\n {\n resolve: './modules/wishlist',\n },\n]\n```\n\n## Database Migrations\n\nAfter installing the block and adding the module configuration, generate and run the migrations to create the necessary tables in your database:\n\n```bash\nnpx medusa db:generate wishlist\nnpx medusa db:migrate\n```\n\n## Middlewares\n\nAdd the wishlist middlewares to your `api/middlewares.ts`:\n\n```ts\nimport { defineMiddlewares } from \"@medusajs/medusa\";\nimport { storeWishlistMiddlewares } from \"./store/wishlist/middlewares\";\n\nexport default defineMiddlewares({\n routes: [...storeWishlistMiddlewares],\n});\n```\n\nIf you already have a `middlewares.ts` file, merge the wishlist middleware imports and spread them into your existing `routes` array.\n\n## Run codegen\n\nAfter installing the block, regenerate SDK types:\n\n```bash\nnpx @mercurjs/cli@latest codegen\n```","categories": ["module","workflow",diff --git a/packages/registry/registry.json b/packages/registry/registry.jsonindex b42f28547..0f9a669a3 100644--- a/packages/registry/registry.json+++ b/packages/registry/registry.json@@ -228,7 +228,7 @@"@medusajs/core-flows"],"registryDependencies": [],- "docs": "## Product Import/Export Block\n\n### Configuration\n\nNo additional modules needed — uses built-in Medusa product CSV steps.\n\n### Middleware Setup\n\nAdd the import middleware to your `api/middlewares.ts`:\n\n```ts\nimport { defineMiddlewares } from '@medusajs/medusa'\nimport { productImportExportMiddlewares } from './vendor/products/middlewares'\n\nexport default defineMiddlewares({\n routes: [...productImportExportMiddlewares],\n})\n```\n\n### Run codegen\n\nAfter installing the block, regenerate SDK types:\n\n```bash\nnpx @mercurjs/cli@canary codegen\n```\n\n### Vendor Navigation\n\nThe block includes a `products/page.tsx` that overrides the default product list page, adding Import and Export buttons in the header. The buttons open drawer routes at `/products/import` and `/products/export`.",+ "docs": "## Product Import/Export Block\n\n### Configuration\n\nNo additional modules needed — uses built-in Medusa product CSV steps.\n\n### Middleware Setup\n\nAdd the import middleware to your `api/middlewares.ts`:\n\n```ts\nimport { defineMiddlewares } from '@medusajs/medusa'\nimport { productImportExportMiddlewares } from './vendor/products/middlewares'\n\nexport default defineMiddlewares({\n routes: [...productImportExportMiddlewares],\n})\n```\n\n### Run codegen\n\nAfter installing the block, regenerate SDK types:\n\n```bash\nnpx @mercurjs/cli@latest codegen\n```\n\n### Vendor Navigation\n\nThe block includes a `products/page.tsx` that overrides the default product list page, adding Import and Export buttons in the header. The buttons open drawer routes at `/products/import` and `/products/export`.","files": [{"path": "product-import-export/workflows/steps/get-seller-products.ts",@@ -306,7 +306,7 @@"react-jwt"],"registryDependencies": [],- "docs": "## Configuration\n\nAdd the member module to your `medusa-config.ts`:\n\n```ts\nimport { ContainerRegistrationKeys } from \"@medusajs/framework/utils\"\n\nmodules: [\n {\n resolve: './modules/member',\n dependencies: [ContainerRegistrationKeys.QUERY],\n },\n]\n```\n\n## Middlewares\n\nAdd the team management middlewares to your `api/middlewares.ts`:\n\n```ts\nimport { defineMiddlewares } from \"@medusajs/medusa\";\nimport { vendorMembersMiddlewares } from \"./vendor/members/middlewares\";\nimport { vendorInvitesMiddlewares } from \"./vendor/invites/middlewares\";\n\nexport default defineMiddlewares({\n routes: [...vendorMembersMiddlewares, ...vendorInvitesMiddlewares],\n});\n```\n\nIf you already have a `middlewares.ts` file, merge the middleware imports and spread them into your existing `routes` array.\n\n## Database Migrations\n\nAfter installing the block and adding the module configuration, generate and run the migrations to create the necessary tables in your database:\n\n```bash\nnpx medusa db:generate member\nnpx medusa db:migrate\n```\n\n## Run codegen\n\nAfter installing the block, regenerate SDK types:\n\n```bash\nnpx @mercurjs/cli@canary codegen\n```",+ "docs": "## Configuration\n\nAdd the member module to your `medusa-config.ts`:\n\n```ts\nimport { ContainerRegistrationKeys } from \"@medusajs/framework/utils\"\n\nmodules: [\n {\n resolve: './modules/member',\n dependencies: [ContainerRegistrationKeys.QUERY],\n },\n]\n```\n\n## Middlewares\n\nAdd the team management middlewares to your `api/middlewares.ts`:\n\n```ts\nimport { defineMiddlewares } from \"@medusajs/medusa\";\nimport { vendorMembersMiddlewares } from \"./vendor/members/middlewares\";\nimport { vendorInvitesMiddlewares } from \"./vendor/invites/middlewares\";\n\nexport default defineMiddlewares({\n routes: [...vendorMembersMiddlewares, ...vendorInvitesMiddlewares],\n});\n```\n\nIf you already have a `middlewares.ts` file, merge the middleware imports and spread them into your existing `routes` array.\n\n## Database Migrations\n\nAfter installing the block and adding the module configuration, generate and run the migrations to create the necessary tables in your database:\n\n```bash\nnpx medusa db:generate member\nnpx medusa db:migrate\n```\n\n## Run codegen\n\nAfter installing the block, regenerate SDK types:\n\n```bash\nnpx @mercurjs/cli@latest codegen\n```","files": [{"path": "team-management/modules/member/index.ts",@@ -481,7 +481,7 @@"description": "Customer wishlist with product bookmarking, pricing context, and store API endpoints.","dependencies": [],"registryDependencies": [],- "docs": "## Configuration\n\nAdd the wishlist module to your `medusa-config.ts`:\n\n```ts\nmodules: [\n {\n resolve: './modules/wishlist',\n },\n]\n```\n\n## Database Migrations\n\nAfter installing the block and adding the module configuration, generate and run the migrations to create the necessary tables in your database:\n\n```bash\nnpx medusa db:generate wishlist\nnpx medusa db:migrate\n```\n\n## Middlewares\n\nAdd the wishlist middlewares to your `api/middlewares.ts`:\n\n```ts\nimport { defineMiddlewares } from \"@medusajs/medusa\";\nimport { storeWishlistMiddlewares } from \"./store/wishlist/middlewares\";\n\nexport default defineMiddlewares({\n routes: [...storeWishlistMiddlewares],\n});\n```\n\nIf you already have a `middlewares.ts` file, merge the wishlist middleware imports and spread them into your existing `routes` array.\n\n## Run codegen\n\nAfter installing the block, regenerate SDK types:\n\n```bash\nnpx @mercurjs/cli@canary codegen\n```",+ "docs": "## Configuration\n\nAdd the wishlist module to your `medusa-config.ts`:\n\n```ts\nmodules: [\n {\n resolve: './modules/wishlist',\n },\n]\n```\n\n## Database Migrations\n\nAfter installing the block and adding the module configuration, generate and run the migrations to create the necessary tables in your database:\n\n```bash\nnpx medusa db:generate wishlist\nnpx medusa db:migrate\n```\n\n## Middlewares\n\nAdd the wishlist middlewares to your `api/middlewares.ts`:\n\n```ts\nimport { defineMiddlewares } from \"@medusajs/medusa\";\nimport { storeWishlistMiddlewares } from \"./store/wishlist/middlewares\";\n\nexport default defineMiddlewares({\n routes: [...storeWishlistMiddlewares],\n});\n```\n\nIf you already have a `middlewares.ts` file, merge the wishlist middleware imports and spread them into your existing `routes` array.\n\n## Run codegen\n\nAfter installing the block, regenerate SDK types:\n\n```bash\nnpx @mercurjs/cli@latest codegen\n```","files": [{"path": "wishlist/modules/wishlist/index.ts",@@ -563,7 +563,7 @@"description": "Vendor notification feed with bell icon in navbar and vendor API endpoint.","dependencies": [],"registryDependencies": [],- "docs": "## Vendor Notifications\n\nThis block adds vendor notifications: a bell icon in the navbar and a `GET /vendor/notifications` API endpoint.\n\n### 1. Notification Provider\n\nAdd the `seller_feed` channel to the local notification provider in `medusa-config.ts`:\n\n```ts\n{\n resolve: '@medusajs/medusa/notification',\n options: {\n providers: [\n {\n resolve: '@medusajs/medusa/notification-local',\n id: 'local',\n options: {\n channels: ['feed', 'seller_feed']\n }\n }\n ]\n }\n}\n```\n\n### 2. Middleware Setup\n\nImport `vendorNotificationMiddlewares` and add it to your `src/api/middlewares.ts`:\n\n```ts\nimport { defineMiddlewares } from \"@medusajs/medusa\";\nimport { vendorNotificationMiddlewares } from \"./vendor/notifications/middlewares\";\n\nexport default defineMiddlewares({\n routes: [\n // ...your existing middlewares,\n ...vendorNotificationMiddlewares,\n ],\n});\n```\n\n### 3. TopbarActions Component\n\nRegister the `TopbarActions` component in your vendor app's `vite.config.ts`:\n\n```ts\nimport { mercurDashboardPlugin } from '@mercurjs/dashboard-sdk'\n\nexport default defineConfig({\n plugins: [\n react(),\n mercurDashboardPlugin({\n medusaConfigPath: '../../packages/api/medusa-config.ts',\n components: {\n TopbarActions: './components/topbar-actions',\n },\n }),\n ],\n})\n```\n\n### 4. Sending Notifications\n\nCreate a subscriber to send notifications to sellers. Example (`src/subscribers/seller-product-notification.ts`):\n\n```ts\nimport type { SubscriberArgs, SubscriberConfig } from \"@medusajs/framework\"\nimport { ContainerRegistrationKeys, Modules } from \"@medusajs/framework/utils\"\n\nexport default async function handler({\n event: { data },\n container,\n}: SubscriberArgs<{ id: string }>) {\n const query = container.resolve(ContainerRegistrationKeys.QUERY)\n const notificationService = container.resolve(Modules.NOTIFICATION)\n\n // Example: look up the seller linked to a product\n const { data: [product] } = await query.graph({\n entity: \"product\",\n fields: [\"id\", \"title\", \"seller.*\"],\n filters: { id: data.id },\n })\n\n if (!product?.seller?.id) return\n\n await notificationService.createNotifications({\n to: product.seller.id,\n channel: \"seller_feed\",\n template: \"product-created\",\n data: {\n title: \"Product created\",\n description: `Your product \\\"${product.title}\\\" has been created.`,\n },\n })\n}\n\nexport const config: SubscriberConfig = {\n event: \"product.created\",\n}\n```\n\n### 5. Run codegen\n\n```bash\nnpx @mercurjs/cli@canary codegen\n```",+ "docs": "## Vendor Notifications\n\nThis block adds vendor notifications: a bell icon in the navbar and a `GET /vendor/notifications` API endpoint.\n\n### 1. Notification Provider\n\nAdd the `seller_feed` channel to the local notification provider in `medusa-config.ts`:\n\n```ts\n{\n resolve: '@medusajs/medusa/notification',\n options: {\n providers: [\n {\n resolve: '@medusajs/medusa/notification-local',\n id: 'local',\n options: {\n channels: ['feed', 'seller_feed']\n }\n }\n ]\n }\n}\n```\n\n### 2. Middleware Setup\n\nImport `vendorNotificationMiddlewares` and add it to your `src/api/middlewares.ts`:\n\n```ts\nimport { defineMiddlewares } from \"@medusajs/medusa\";\nimport { vendorNotificationMiddlewares } from \"./vendor/notifications/middlewares\";\n\nexport default defineMiddlewares({\n routes: [\n // ...your existing middlewares,\n ...vendorNotificationMiddlewares,\n ],\n});\n```\n\n### 3. TopbarActions Component\n\nRegister the `TopbarActions` component in your vendor app's `vite.config.ts`:\n\n```ts\nimport { mercurDashboardPlugin } from '@mercurjs/dashboard-sdk'\n\nexport default defineConfig({\n plugins: [\n react(),\n mercurDashboardPlugin({\n medusaConfigPath: '../../packages/api/medusa-config.ts',\n components: {\n TopbarActions: './components/topbar-actions',\n },\n }),\n ],\n})\n```\n\n### 4. Sending Notifications\n\nCreate a subscriber to send notifications to sellers. Example (`src/subscribers/seller-product-notification.ts`):\n\n```ts\nimport type { SubscriberArgs, SubscriberConfig } from \"@medusajs/framework\"\nimport { ContainerRegistrationKeys, Modules } from \"@medusajs/framework/utils\"\n\nexport default async function handler({\n event: { data },\n container,\n}: SubscriberArgs<{ id: string }>) {\n const query = container.resolve(ContainerRegistrationKeys.QUERY)\n const notificationService = container.resolve(Modules.NOTIFICATION)\n\n // Example: look up the seller linked to a product\n const { data: [product] } = await query.graph({\n entity: \"product\",\n fields: [\"id\", \"title\", \"seller.*\"],\n filters: { id: data.id },\n })\n\n if (!product?.seller?.id) return\n\n await notificationService.createNotifications({\n to: product.seller.id,\n channel: \"seller_feed\",\n template: \"product-created\",\n data: {\n title: \"Product created\",\n description: `Your product \\\"${product.title}\\\" has been created.`,\n },\n })\n}\n\nexport const config: SubscriberConfig = {\n event: \"product.created\",\n}\n```\n\n### 5. Run codegen\n\n```bash\nnpx @mercurjs/cli@latest codegen\n```","files": [{"path": "vendor-notifications/api/middlewares.ts",@@ -606,7 +606,7 @@"algoliasearch"],"registryDependencies": [],- "docs": "## Configuration\n\nAdd the algolia module to your `medusa-config.ts`:\n\n```ts\nmodules: [\n {\n resolve: './modules/algolia',\n options: {\n appId: process.env.ALGOLIA_APP_ID,\n apiKey: process.env.ALGOLIA_API_KEY,\n },\n },\n]\n```\n\n## Environment Variables\n\n```\nALGOLIA_APP_ID=your_algolia_app_id\nALGOLIA_API_KEY=your_algolia_admin_api_key\n```\n\n## Middlewares\n\nAdd algolia middlewares to your `api/middlewares.ts`:\n\n```ts\nimport { defineMiddlewares } from \"@medusajs/medusa\";\nimport { algoliaMiddlewares } from \"./store/products/search/middlewares\";\n\nexport default defineMiddlewares({\n routes: [...algoliaMiddlewares],\n});\n```\n\nIf you already have a `middlewares.ts` file, merge the algolia middleware imports and spread them into your existing `routes` array.\n\n## Database Migrations\n\nAfter installing the block, run migrations for the new links:\n\n```bash\nnpx medusa db:migrate\n```\n\n## Run codegen\n\nAfter installing, regenerate SDK types:\n\n```bash\nnpx @mercurjs/cli@canary codegen\n```",+ "docs": "## Configuration\n\nAdd the algolia module to your `medusa-config.ts`:\n\n```ts\nmodules: [\n {\n resolve: './modules/algolia',\n options: {\n appId: process.env.ALGOLIA_APP_ID,\n apiKey: process.env.ALGOLIA_API_KEY,\n },\n },\n]\n```\n\n## Environment Variables\n\n```\nALGOLIA_APP_ID=your_algolia_app_id\nALGOLIA_API_KEY=your_algolia_admin_api_key\n```\n\n## Middlewares\n\nAdd algolia middlewares to your `api/middlewares.ts`:\n\n```ts\nimport { defineMiddlewares } from \"@medusajs/medusa\";\nimport { algoliaMiddlewares } from \"./store/products/search/middlewares\";\n\nexport default defineMiddlewares({\n routes: [...algoliaMiddlewares],\n});\n```\n\nIf you already have a `middlewares.ts` file, merge the algolia middleware imports and spread them into your existing `routes` array.\n\n## Database Migrations\n\nAfter installing the block, run migrations for the new links:\n\n```bash\nnpx medusa db:migrate\n```\n\n## Run codegen\n\nAfter installing, regenerate SDK types:\n\n```bash\nnpx @mercurjs/cli@latest codegen\n```","files": [{"path": "algolia/modules/algolia/index.ts",@@ -697,7 +697,7 @@"description": "Admin approval system powered by the Custom Fields module. Admins can list, review, accept or reject entity requests.","dependencies": [],"registryDependencies": [],- "docs": "## Prerequisites\n\nThis block requires the **Custom Fields module** (`@mercurjs/core-plugin/modules/custom-fields`). Make sure it is registered in your `medusa-config.ts`.\n\n## Configuration\n\nAdd request-related custom fields to the entities you want to support approval workflows for. Product already has a built-in `status` field, so you only need to configure custom fields for other entities.\n\nAdd these fields to your Custom Fields module options in `medusa-config.ts`:\n\n```ts\n{\n resolve: \"@mercurjs/core-plugin/modules/custom-fields\",\n options: {\n customFields: {\n ProductCollection: {\n request_status: {\n type: \"enum\",\n enum: [\"draft\", \"pending\", \"accepted\", \"rejected\"],\n defaultValue: \"draft\",\n },\n submitter_id: { type: \"string\", nullable: true },\n reviewer_id: { type: \"string\", nullable: true },\n reviewer_note: { type: \"text\", nullable: true },\n },\n // Add the same fields to other entities as needed:\n // ProductCategory, ProductType, ProductTag\n },\n },\n}\n```\n\n## Middlewares\n\nAdd the request middlewares to your `api/middlewares.ts`:\n\n```ts\nimport { defineMiddlewares } from \"@medusajs/medusa\";\nimport { adminRequestsMiddlewares } from \"./admin/requests/middlewares\";\nimport { vendorProductCollectionRequestsMiddlewares } from \"./vendor/requests/product-collections/middlewares\";\nimport { vendorProductCategoryRequestsMiddlewares } from \"./vendor/requests/product-categories/middlewares\";\nimport { vendorProductTypeRequestsMiddlewares } from \"./vendor/requests/product-types/middlewares\";\nimport { vendorProductTagRequestsMiddlewares } from \"./vendor/requests/product-tags/middlewares\";\n\nexport default defineMiddlewares({\n routes: [\n ...adminRequestsMiddlewares,\n ...vendorProductCollectionRequestsMiddlewares,\n ...vendorProductCategoryRequestsMiddlewares,\n ...vendorProductTypeRequestsMiddlewares,\n ...vendorProductTagRequestsMiddlewares,\n ],\n});\n```\n\nIf you already have a `middlewares.ts` file, merge the middleware imports and spread them into your existing `routes` array.\n\n## Database Migrations\n\nAfter updating the custom fields configuration, run migrations:\n\n```bash\nnpx medusa db:migrate\n```\n\n## Run codegen\n\nAfter installing the block, regenerate SDK types:\n\n```bash\nnpx @mercurjs/cli@canary codegen\n```\n\n## API Endpoints\n\n### Admin\n\n- `GET /admin/requests/:type` — List entities with request custom fields (filterable by `request_status`, `submitter_id`)\n- `GET /admin/requests/:type/:id` — Retrieve entity with request custom fields\n- `POST /admin/requests/:type/:id/accept` — Accept a request\n- `POST /admin/requests/:type/:id/reject` — Reject a request\n\nSupported `:type` values: `product_collection`, `product_category`, `product_type`, `product_tag`\n\n### Vendor\n\n- `GET /vendor/requests/product-collections` — List vendor's collection requests\n- `POST /vendor/requests/product-collections` — Create a collection request\n- `GET /vendor/requests/product-categories` — List vendor's category requests\n- `POST /vendor/requests/product-categories` — Create a category request\n- `GET /vendor/requests/product-types` — List vendor's type requests\n- `POST /vendor/requests/product-types` — Create a type request\n- `GET /vendor/requests/product-tags` — List vendor's tag requests\n- `POST /vendor/requests/product-tags` — Create a tag request",+ "docs": "## Prerequisites\n\nThis block requires the **Custom Fields module** (`@mercurjs/core-plugin/modules/custom-fields`). Make sure it is registered in your `medusa-config.ts`.\n\n## Configuration\n\nAdd request-related custom fields to the entities you want to support approval workflows for. Product already has a built-in `status` field, so you only need to configure custom fields for other entities.\n\nAdd these fields to your Custom Fields module options in `medusa-config.ts`:\n\n```ts\n{\n resolve: \"@mercurjs/core-plugin/modules/custom-fields\",\n options: {\n customFields: {\n ProductCollection: {\n request_status: {\n type: \"enum\",\n enum: [\"draft\", \"pending\", \"accepted\", \"rejected\"],\n defaultValue: \"draft\",\n },\n submitter_id: { type: \"string\", nullable: true },\n reviewer_id: { type: \"string\", nullable: true },\n reviewer_note: { type: \"text\", nullable: true },\n },\n // Add the same fields to other entities as needed:\n // ProductCategory, ProductType, ProductTag\n },\n },\n}\n```\n\n## Middlewares\n\nAdd the request middlewares to your `api/middlewares.ts`:\n\n```ts\nimport { defineMiddlewares } from \"@medusajs/medusa\";\nimport { adminRequestsMiddlewares } from \"./admin/requests/middlewares\";\nimport { vendorProductCollectionRequestsMiddlewares } from \"./vendor/requests/product-collections/middlewares\";\nimport { vendorProductCategoryRequestsMiddlewares } from \"./vendor/requests/product-categories/middlewares\";\nimport { vendorProductTypeRequestsMiddlewares } from \"./vendor/requests/product-types/middlewares\";\nimport { vendorProductTagRequestsMiddlewares } from \"./vendor/requests/product-tags/middlewares\";\n\nexport default defineMiddlewares({\n routes: [\n ...adminRequestsMiddlewares,\n ...vendorProductCollectionRequestsMiddlewares,\n ...vendorProductCategoryRequestsMiddlewares,\n ...vendorProductTypeRequestsMiddlewares,\n ...vendorProductTagRequestsMiddlewares,\n ],\n});\n```\n\nIf you already have a `middlewares.ts` file, merge the middleware imports and spread them into your existing `routes` array.\n\n## Database Migrations\n\nAfter updating the custom fields configuration, run migrations:\n\n```bash\nnpx medusa db:migrate\n```\n\n## Run codegen\n\nAfter installing the block, regenerate SDK types:\n\n```bash\nnpx @mercurjs/cli@latest codegen\n```\n\n## API Endpoints\n\n### Admin\n\n- `GET /admin/requests/:type` — List entities with request custom fields (filterable by `request_status`, `submitter_id`)\n- `GET /admin/requests/:type/:id` — Retrieve entity with request custom fields\n- `POST /admin/requests/:type/:id/accept` — Accept a request\n- `POST /admin/requests/:type/:id/reject` — Reject a request\n\nSupported `:type` values: `product_collection`, `product_category`, `product_type`, `product_tag`\n\n### Vendor\n\n- `GET /vendor/requests/product-collections` — List vendor's collection requests\n- `POST /vendor/requests/product-collections` — Create a collection request\n- `GET /vendor/requests/product-categories` — List vendor's category requests\n- `POST /vendor/requests/product-categories` — Create a category request\n- `GET /vendor/requests/product-types` — List vendor's type requests\n- `POST /vendor/requests/product-types` — Create a type request\n- `GET /vendor/requests/product-tags` — List vendor's tag requests\n- `POST /vendor/requests/product-tags` — Create a tag request","files": [{"path": "requests/types/index.ts",@@ -964,7 +964,7 @@"@talkjs/react"],"registryDependencies": [],- "docs": "## Vendor Chat (TalkJS)\n\nThis block adds a TalkJS chat integration for vendors, exposing a `GET /vendor/talkjs` endpoint that retrieves conversations for the authenticated seller and a Messages page in the vendor portal.\n\n### Environment Variables\n\nAdd the following to your `.env`:\n\n```\nVITE_TALK_JS_APP_ID=your_talkjs_app_id\nTALKJS_SECRET_API_KEY=your_talkjs_secret_api_key\n```\n\n### Vite Configuration\n\nAdd the `__TALK_JS_APP_ID__` define to your vendor portal's `vite.config.ts`:\n\n```ts\nconst TALK_JS_APP_ID = env.VITE_TALK_JS_APP_ID || \"\"\n\nexport default defineConfig({\n // ...\n define: {\n __TALK_JS_APP_ID__: JSON.stringify(TALK_JS_APP_ID),\n },\n})\n```\n\n### Run codegen\n\nAfter installing the block, regenerate SDK types:\n\n```bash\nnpx @mercurjs/cli@canary codegen\n```",+ "docs": "## Vendor Chat (TalkJS)\n\nThis block adds a TalkJS chat integration for vendors, exposing a `GET /vendor/talkjs` endpoint that retrieves conversations for the authenticated seller and a Messages page in the vendor portal.\n\n### Environment Variables\n\nAdd the following to your `.env`:\n\n```\nVITE_TALK_JS_APP_ID=your_talkjs_app_id\nTALKJS_SECRET_API_KEY=your_talkjs_secret_api_key\n```\n\n### Vite Configuration\n\nAdd the `__TALK_JS_APP_ID__` define to your vendor portal's `vite.config.ts`:\n\n```ts\nconst TALK_JS_APP_ID = env.VITE_TALK_JS_APP_ID || \"\"\n\nexport default defineConfig({\n // ...\n define: {\n __TALK_JS_APP_ID__: JSON.stringify(TALK_JS_APP_ID),\n },\n})\n```\n\n### Run codegen\n\nAfter installing the block, regenerate SDK types:\n\n```bash\nnpx @mercurjs/cli@latest codegen\n```","files": [{"path": "vendor-chat/api/vendor/talkjs/route.ts",diff --git a/templates/basic/.ai/skills/mercur-blocks/SKILL.md b/templates/basic/.ai/skills/mercur-blocks/SKILL.mdindex 2f4ff0a6b..6623a6165 100644--- a/templates/basic/.ai/skills/mercur-blocks/SKILL.md+++ b/templates/basic/.ai/skills/mercur-blocks/SKILL.md@@ -26,40 +26,59 @@ Think about block impact by alias destination, not just by name.2. View the block before installation.3. Identify which aliases and workspaces it will touch.4. Add the block.-5. Inspect the installed files.-6. Run the smallest relevant verification set.+5. When CLI asks to overwrite `middlewares.ts` — **always decline** and merge manually.+6. Inspect the installed files and the block docs output.+7. Apply all configuration from the block docs (middleware, medusa-config, env vars, migrations).+8. Run the smallest relevant verification set.## Post-install checklist- Did files land under `packages/api/src`, `apps/admin/src`, or `apps/vendor/src`?- Does `packages/api/medusa-config.ts` need module or provider registration?-- Did the block add API routes that require codegen?-- Did the block add UI routes that require admin or vendor build verification?-- Did the block docs require env vars, middleware, or config changes?--## Verification before handoff--After completing post-install config, always start the project and confirm it comes up clean before reporting the work as done:--1. Start the backend: `npx medusa develop` (from `packages/api`)-2. Watch the output for startup errors — module resolution failures, migration errors, missing env vars.-3. If the block added admin or vendor UI, start the relevant panel and confirm the build succeeds.-4. Fix any issues found before handing off. Do not report the work as complete if the project does not start.--Only mark the task complete when the project starts without errors.+- Did the block docs specify middleware to add to `src/api/middlewares.ts`?+ - Check the **actual export names and paths** in the installed middleware files — block docs may have wrong paths.+ - Verify the import path matches `./actual/folder/middlewares` not a generic path from docs.+- Did the block add custom modules that need `db:generate <module>` and `db:migrate`?+ - Even if docs don't mention migrations, check if the module has a `models/` directory — if it does, migrations are needed.+- Did the block add UI routes? They must be under `src/routes/` (not `src/pages/`) for the dashboard SDK to detect them.+- Did the block add UI pages that need `export const config: RouteConfig` for sidebar visibility?+- Did the block docs require env vars, plugin options, or config changes?+- Did the block specify npm dependencies? Install any that CLI didn't handle automatically.++## Known issues with block docs++Block docs may contain inaccurate information. Always verify:+- **Middleware import paths**: docs may reference generic paths like `./admin/middlewares` when the actual file is at `./admin/<feature>/middlewares`.+- **Middleware export names**: check the actual `export const` name in the installed file.+- **Missing dependencies**: some blocks import npm packages not listed in their `dependencies` array.+- **Missing migration instructions**: some blocks with custom modules don't mention `db:generate` / `db:migrate` in docs.+- **File conflicts**: multiple blocks may try to write the same file (e.g. workflow hooks). Decline overwrites and merge manually.++## Middleware merging++When adding a block's middleware to `src/api/middlewares.ts`:+1. Read the actual installed middleware file to get the correct export name and path.+2. Add the import to the existing `middlewares.ts`.+3. Spread it into the existing `routes` array.++Do NOT accept CLI's middleware overwrite — it replaces the entire file.## Useful commands```bash-npx @mercurjs/cli@canary search --query <keyword>-npx @mercurjs/cli@canary view <block>-npx @mercurjs/cli@canary add <block>-npx @mercurjs/cli@canary diff <block>+npx @mercurjs/cli@latest search --query <keyword>+npx @mercurjs/cli@latest view <block>+npx @mercurjs/cli@latest add <block>+npx @mercurjs/cli@latest diff <block>```+Run CLI commands from the project root where `blocks.json` lives.+Run `medusa` commands (db:generate, db:migrate) from `packages/api`.+## Avoid- adding blocks without reviewing their docs first+- accepting middleware.ts overwrite from CLI- ignoring config or env follow-up after install- skipping `diff` when reviewing block updates-- reporting work as complete before verifying the project starts+- trusting docs blindly — verify import paths and dependencies against installed filesdiff --git a/templates/basic/.ai/skills/mercur-cli/SKILL.md b/templates/basic/.ai/skills/mercur-cli/SKILL.mdindex 2057f71d5..05bc00869 100644--- a/templates/basic/.ai/skills/mercur-cli/SKILL.md+++ b/templates/basic/.ai/skills/mercur-cli/SKILL.md@@ -31,14 +31,14 @@ Use this skill when:### Discover and inspect a block```bash-npx @mercurjs/cli@canary search --query <keyword>-npx @mercurjs/cli@canary view <block-name>+npx @mercurjs/cli@latest search --query <keyword>+npx @mercurjs/cli@latest view <block-name>```### Add a block```bash-npx @mercurjs/cli@canary add <block-name>+npx @mercurjs/cli@latest add <block-name>```**Important:** When CLI asks to overwrite `middlewares.ts`, always decline (`n`) and merge manually.@@ -46,7 +46,7 @@ npx @mercurjs/cli@canary add <block-name>### Check local drift```bash-npx @mercurjs/cli@canary diff <block-name>+npx @mercurjs/cli@latest diff <block-name>```## After `add`diff --git a/templates/basic/.ai/skills/migration-guide/SKILL.md b/templates/basic/.ai/skills/migration-guide/SKILL.mdindex 9e769ca68..5d623c76a 100644--- a/templates/basic/.ai/skills/migration-guide/SKILL.md+++ b/templates/basic/.ai/skills/migration-guide/SKILL.md@@ -127,7 +127,7 @@ Port in this order:After each group: run `bun medusa develop` and verify server starts.-After API routes: run `bunx @mercurjs/cli@canary codegen`.+After API routes: run `bunx @mercurjs/cli@latest codegen`.After dashboard: run `bun vite build` in `apps/admin` and `apps/vendor`.diff --git a/templates/basic/CLAUDE.md b/templates/basic/CLAUDE.mdindex 98689936e..72a08b5f4 100644--- a/templates/basic/CLAUDE.md+++ b/templates/basic/CLAUDE.md@@ -15,7 +15,7 @@ This starter does not require a spec-first workflow. Teams can add planning artiBefore implementing any new marketplace feature from scratch, always search the official Mercur registry:```bash-npx @mercurjs/cli@canary search --query <keyword>+npx @mercurjs/cli@latest search --query <keyword>```Many common features (reviews, team management, wishlists, notifications, chat, CSV import/export, approval flows, Algolia search) are already available as registry blocks. Installing a block is always faster and safer than building from scratch. Use the `mercur-blocks` skill when a block looks like a match.