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
chore: v2.0.0-canary.93
vholik582c83884f57
diff --git a/.github/workflows/release.yml b/.github/workflows/release.ymlindex b5f2b2f20..f61a601f7 100644--- a/.github/workflows/release.yml+++ b/.github/workflows/release.yml@@ -35,7 +35,7 @@ jobs:- name: Publish to npmrun: |- for dir in packages/*/; do+ for dir in packages/*/ packages/providers/*/; doif [ -f "$dir/package.json" ] && ! grep -q '"private": true' "$dir/package.json"; thenecho "Publishing $dir..."cd "$dir"diff --git a/apps/docs/v2/core-concepts/seller.mdx b/apps/docs/v2/core-concepts/seller.mdxindex 15f82e719..928f79057 100644--- a/apps/docs/v2/core-concepts/seller.mdx+++ b/apps/docs/v2/core-concepts/seller.mdx@@ -19,6 +19,22 @@ PENDING → ACTIVE → (optionally) SUSPENDED2. **ACTIVE** — An admin approves the seller. Only active sellers' products appear in the storefront and can be purchased.3. **SUSPENDED** — An admin can suspend a seller at any time, removing their products from sale.+### Auto-approve sellers++By default, new sellers start as `PENDING` and require manual admin approval. You can configure the seller module to automatically approve sellers on creation by passing the `autoApprove` option:++```ts+// medusa-config.ts+{+ resolve: "./modules/seller",+ options: {+ autoApprove: true,+ },+}+```++When `autoApprove` is `true`, new sellers are created with `ACTIVE` status immediately, skipping the manual approval step. If an explicit status is provided during creation, it takes precedence over this option.+### Seller profileEach seller has a profile with:diff --git a/packages/admin/package.json b/packages/admin/package.jsonindex a2fb97154..58c632715 100644--- a/packages/admin/package.json+++ b/packages/admin/package.json@@ -29,8 +29,8 @@"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0"},"dependencies": {- "@mercurjs/dashboard-shared": "2.0.0-canary.92",- "@mercurjs/client": "2.0.0-canary.92",+ "@mercurjs/dashboard-shared": "2.0.0-canary.93",+ "@mercurjs/client": "2.0.0-canary.93","@ariakit/react": "^0.4.15","@babel/runtime": "^7.26.10","@dnd-kit/core": "^6.1.0",diff --git a/packages/cli/package.json b/packages/cli/package.jsonindex 111be8fff..a5ee08efb 100644--- a/packages/cli/package.json+++ b/packages/cli/package.json@@ -1,6 +1,6 @@{"name": "@mercurjs/cli",- "version": "2.0.0-canary.92",+ "version": "2.0.0-canary.93","repository": {"type": "git","url": "https://github.com/mercurjs/mercur",@@ -63,7 +63,7 @@"vite": "^5.4.21","@medusajs/admin-bundler": "2.13.3","@medusajs/framework": "2.13.3",- "@mercurjs/dashboard-sdk": "2.0.0-canary.92"+ "@mercurjs/dashboard-sdk": "2.0.0-canary.93"},"devDependencies": {"@types/fs-extra": "^11.0.4",diff --git a/packages/client/package.json b/packages/client/package.jsonindex 7fc93f569..f1606ee59 100644--- a/packages/client/package.json+++ b/packages/client/package.json@@ -1,6 +1,6 @@{"name": "@mercurjs/client",- "version": "2.0.0-canary.92",+ "version": "2.0.0-canary.93","repository": {"type": "git","url": "https://github.com/mercurjs/mercur",diff --git a/packages/core-plugin/package.json b/packages/core-plugin/package.jsonindex a278063a0..88ba4c0e9 100644--- a/packages/core-plugin/package.json+++ b/packages/core-plugin/package.json@@ -1,6 +1,6 @@{"name": "@mercurjs/core-plugin",- "version": "2.0.0-canary.92",+ "version": "2.0.0-canary.93","repository": {"type": "git","url": "https://github.com/mercurjs/mercur",diff --git a/packages/core-plugin/src/modules/seller/service.ts b/packages/core-plugin/src/modules/seller/service.tsindex fe9fb07e4..e19b8d472 100644--- a/packages/core-plugin/src/modules/seller/service.ts+++ b/packages/core-plugin/src/modules/seller/service.ts@@ -6,11 +6,12 @@ import {MedusaError,MedusaService,toHandle,- InjectTransactionManager+ InjectTransactionManager,+ isDefined} from "@medusajs/framework/utils"import { OrderGroup, Seller } from "./models"import { OrderGroupRepository } from "./repositories"-import { OrderGroupDTO } from "@mercurjs/types"+import { OrderGroupDTO, SellerModuleOptions, SellerStatus } from "@mercurjs/types"type InjectedDependencies = {orderGroupRepository: OrderGroupRepository@@ -23,13 +24,18 @@ class SellerModuleService extends MedusaService({}) {protected readonly orderGroupRepository_: OrderGroupRepositoryprotected readonly baseRepository_: DAL.RepositoryService+ protected readonly options_: Required<SellerModuleOptions>- constructor({ orderGroupRepository, baseRepository }: InjectedDependencies) {+ constructor({ orderGroupRepository, baseRepository }: InjectedDependencies, options?: SellerModuleOptions) {// @ts-ignore// eslint-disable-next-line prefer-rest-paramssuper(...arguments)this.orderGroupRepository_ = orderGroupRepositorythis.baseRepository_ = baseRepository+ this.options_ = {+ autoApprove: false,+ ...(options ?? {}),+ }}@InjectTransactionManager()@@ -50,6 +56,10 @@ class SellerModuleService extends MedusaService({if (!sellerData.handle && sellerData.name) {sellerData.handle = toHandle(sellerData.name)}++ if (this.options_.autoApprove && !isDefined(sellerData.status)) {+ sellerData.status = SellerStatus.ACTIVE+ }}// @ts-ignorediff --git a/packages/dashboard-sdk/package.json b/packages/dashboard-sdk/package.jsonindex 56e308f1b..a1e61771e 100644--- a/packages/dashboard-sdk/package.json+++ b/packages/dashboard-sdk/package.json@@ -1,6 +1,6 @@{"name": "@mercurjs/dashboard-sdk",- "version": "2.0.0-canary.92",+ "version": "2.0.0-canary.93","repository": {"type": "git","url": "https://github.com/mercurjs/mercur",diff --git a/packages/dashboard-shared/package.json b/packages/dashboard-shared/package.jsonindex 03ed62c0d..3b7d912b5 100644--- a/packages/dashboard-shared/package.json+++ b/packages/dashboard-shared/package.json@@ -1,6 +1,6 @@{"name": "@mercurjs/dashboard-shared",- "version": "2.0.0-canary.92",+ "version": "2.0.0-canary.93","repository": {"type": "git","url": "https://github.com/mercurjs/mercur",@@ -23,7 +23,7 @@"build": "tsup"},"dependencies": {- "@mercurjs/client": "2.0.0-canary.92",+ "@mercurjs/client": "2.0.0-canary.93","@ariakit/react": "^0.4.15","@babel/runtime": "^7.26.10","@dnd-kit/core": "^6.1.0",diff --git a/packages/providers/payout-stripe-connect/package.json b/packages/providers/payout-stripe-connect/package.jsonindex c0e407737..2a6e4f026 100644--- a/packages/providers/payout-stripe-connect/package.json+++ b/packages/providers/payout-stripe-connect/package.json@@ -1,8 +1,8 @@{"name": "@mercurjs/payout-stripe-connect",- "version": "2.0.0-canary.89",+ "version": "2.0.0-canary.93","description": "Stripe Connect payment provider for Mercur",- "private": true,+ "private": false,"repository": {"type": "git","url": "https://github.com/mercurjs/mercur",@@ -18,7 +18,7 @@},"devDependencies": {"@medusajs/framework": "2.13.4",- "@mercurjs/types": "2.0.0-canary.89"+ "@mercurjs/types": "2.0.0-canary.93"},"dependencies": {"stripe": "^15.5.0"diff --git a/packages/types/package.json b/packages/types/package.jsonindex d4b9a5c33..1d69eb926 100644--- a/packages/types/package.json+++ b/packages/types/package.json@@ -1,6 +1,6 @@{"name": "@mercurjs/types",- "version": "2.0.0-canary.92",+ "version": "2.0.0-canary.93","repository": {"type": "git","url": "https://github.com/mercurjs/mercur",diff --git a/packages/types/src/seller/common.ts b/packages/types/src/seller/common.tsindex 3a70b1cc8..e9ca0cf86 100644--- a/packages/types/src/seller/common.ts+++ b/packages/types/src/seller/common.ts@@ -4,6 +4,10 @@ export enum SellerStatus {SUSPENDED = "suspended",}+export interface SellerModuleOptions {+ autoApprove?: boolean+}+export type SellerDTO = {id: stringname: stringdiff --git a/packages/vendor/package.json b/packages/vendor/package.jsonindex 5f22527ec..b5a52cdcf 100644--- a/packages/vendor/package.json+++ b/packages/vendor/package.json@@ -1,6 +1,6 @@{"name": "@mercurjs/vendor",- "version": "2.0.0-canary.92",+ "version": "2.0.0-canary.93","repository": {"type": "git","url": "https://github.com/mercurjs/mercur",@@ -29,8 +29,8 @@"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0"},"dependencies": {- "@mercurjs/dashboard-shared": "2.0.0-canary.92",- "@mercurjs/client": "2.0.0-canary.92",+ "@mercurjs/dashboard-shared": "2.0.0-canary.93",+ "@mercurjs/client": "2.0.0-canary.93","@ariakit/react": "^0.4.15","@babel/runtime": "^7.26.10","@dnd-kit/core": "^6.1.0",