Scan your whole stack
From OX Research Newsroom
Are you using @vicacha-devs/medusa-plugin-b2b?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v0.1.1
@vicacha-devs/medusa-plugin-b2b was last scanned on 23 Nov 2026 at version 0.1.1. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 0.1.1 LATEST | 23 Nov 2026 | No rules fired |
| 0.1.0 | 23 Nov 2026 | No rules fired |
| 0.0.1 | 23 Nov 2026 | No rules fired |
| 0.0.0-stage | 23 Nov 2026 | Not shown |
Findings for v0.1.1. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 0.1.1; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
@vicacha-devs/medusa-plugin-b2bB2B commerce capabilities for Medusa v2: companies, employees, spending limits, quote negotiation, multi-level cart approvals, and a full admin UI — all as a self-contained, droppable plugin.
Medusa compatibility:
2.18.x— keep peer dependencies aligned with your host application.
/admin/b2b/* (Medusa admin JWT) and /store/b2b/* (customer session/bearer)company_admin middleware guards company-mutating store routes| Dependency | Version |
|---|---|
@medusajs/medusa |
2.18.x |
| Node | ≥ 20 |
| pnpm | 11.x (or npm/yarn — adjust scripts accordingly) |
pnpm add @vicacha-devs/medusa-plugin-b2b
Register the plugin in medusa-config.ts:
import { defineConfig } from "@medusajs/framework/utils"
export default defineConfig({
plugins: [
{
resolve: "@vicacha-devs/medusa-plugin-b2b",
options: {},
},
],
})
Run migrations after adding the plugin:
medusa db:migrate
A seed script is included to create default customer groups, a B2B sales channel, and a base region with shipping options:
medusa exec ./src/scripts/seed-b2b-data.ts
The plugin ships with @/* path aliases for both backend and admin code.
| Context | Alias | Resolves to |
|---|---|---|
| Backend (server) | @/* |
src/* |
| Admin (React) | @/* |
src/admin/* |
TypeScript — aliases are configured in both tsconfig.json (backend) and src/admin/tsconfig.json (admin) and take effect immediately for type-checking.
Build — the build script runs tsc-alias after medusa plugin:build to rewrite alias paths in the compiled .js output:
pnpm build # medusa plugin:build → tsc-alias rewrite
pnpm resolve:aliases # run the alias rewrite step in isolation
Admin Vite — to resolve @/* aliases in the admin bundle, add the following to the host application's medusa-config.ts:
import path from "path"
export default defineConfig({
admin: {
vite: () => ({
resolve: {
alias: {
"@": path.resolve(
__dirname,
"node_modules/@vicacha-devs/medusa-plugin-b2b/src/admin"
),
},
},
}),
},
})
The plugin registers three custom modules and a set of entity links that tie them to Medusa's core data model.
Medusa Core
Cart ──────────── (link) ─────────────── b2b_approval
Order ──────────── (link) ──┐ ├─ Approval (N per cart, type: admin | sales_manager)
Customer ──────── (link) ───┤ ├─ ApprovalSettings (1 per company)
CustomerGroup ──── (link) ──┘ └─ ApprovalStatus (1 per cart)
│
│ b2b_company
└──────────────── Company
├─ Employee (N)
│ └─ (link) ── Customer
└─ (link) ── CustomerGroup
└─ (link) ── Cart[]
└─ (link) ── Order[]
└─ (link) ── ApprovalSettings
b2b_quote
Quote
├─ Message[]
└─ (virtual links)
├─ draft Order
├─ Cart
├─ OrderChange
└─ Customer
Customer → POST /store/b2b/quotes → createRequestForQuoteWorkflow
├─ Snapshot cart → draft Order + OrderChange
└─ Create Quote (status: pending_merchant)
Merchant → (edit items/pricing via Order Edit)
→ POST /admin/b2b/quotes/:id/send → status: pending_customer
Customer → GET /store/b2b/quotes/:id/preview → previewOrderChange (live cost breakdown)
→ POST /store/b2b/quotes/:id/accept → customerAcceptQuoteWorkflow
├─ confirmOrderEditRequestWorkflow
└─ draft Order → PENDING (live)
→ POST /store/b2b/quotes/:id/reject → status: customer_rejected
Company admin enables requires_admin_approval on ApprovalSettings
Employee → POST /store/b2b/carts/:id/approvals → createApprovalsWorkflow
├─ Approval + ApprovalStatus records
└─ Links to Cart
Cart is now locked:
addToCartWorkflow.hooks.validate → blocks if approval pending
completeCartWorkflow.hooks.validate → blocks if pending OR spending limit exceeded
Admin → POST /admin/b2b/approvals/:id → updateApprovalsWorkflow
→ Cart unlocked, employee can complete checkout
b2b_companyManages companies and their employees.
Company
| Field | Type | Notes |
|---|---|---|
id |
string | comp_ prefix |
name |
string | |
email |
string | |
phone |
string | nullable |
address |
string | nullable |
city |
string | nullable |
state |
string | nullable |
zip |
string | nullable |
country |
string | nullable |
logo_url |
string | nullable |
currency_code |
string | nullable |
spending_limit_reset_frequency |
enum | never \| daily \| weekly \| monthly \| yearly (default: monthly) |
Employee
| Field | Type | Notes |
|---|---|---|
id |
string | emp_ prefix |
spending_limit |
BigNumber | 0 = unlimited |
is_admin |
boolean | grants company_admin role |
company_id |
FK → Company |
Service: ICompanyModuleService — full CRUD via MedusaService: createCompanies, updateCompanies, deleteCompanies, listCompanies, retrieveCompany, createEmployees, updateEmployees, deleteEmployees, listEmployees, retrieveEmployee.
b2b_quoteManages request-for-quote threads between customers and merchants.
Quote
| Field | Type | Notes |
|---|---|---|
id |
string | quo_ prefix |
status |
enum | pending_merchant \| pending_customer \| accepted \| customer_rejected \| merchant_rejected |
customer_id |
string | |
draft_order_id |
string | Medusa draft Order |
order_change_id |
string | active OrderChange |
cart_id |
string | originating Cart |
Message
| Field | Type | Notes |
|---|---|---|
id |
string | mess_ prefix |
text |
string | |
item_id |
string | nullable — optional line-item reference |
admin_id |
string | nullable — set when sent by admin |
customer_id |
string | nullable — set when sent by customer |
Service: IQuoteModuleService — full CRUD for Quote and Message.
b2b_approvalManages cart approval gates and company-level approval configuration.
ApprovalSettings
| Field | Type | Notes |
|---|---|---|
id |
string | apprset_ prefix |
company_id |
string | |
requires_admin_approval |
boolean | default: false |
requires_sales_manager_approval |
boolean | default: false |
Approval
| Field | Type | Notes |
|---|---|---|
id |
string | appr_ prefix |
cart_id |
string | |
type |
enum | admin \| sales_manager |
status |
enum | pending \| approved \| rejected |
created_by |
string | customer who submitted |
handled_by |
string | nullable — admin or manager who acted |
ApprovalStatus
Aggregate status for a cart — denormalized for fast lookup by cart hooks.
| Field | Type | Notes |
|---|---|---|
id |
string | apprstat_ prefix |
cart_id |
string | |
status |
enum | pending \| approved \| rejected |
Service: IApprovalModuleService — full CRUD + hasPendingApprovals(cartId): Promise<boolean>.
| Link | Left | Right | Cardinality |
|---|---|---|---|
employee-customer |
Employee (b2b_company) |
Customer (core) |
1 : 1 |
company-customer-group |
Company (b2b_company) |
CustomerGroup (core) |
1 : 1 |
company-carts |
Company (b2b_company) |
Cart (core) |
1 : N |
order-company |
Order (core) |
Company (b2b_company) |
1 : 1 |
company-approval-setting |
Company (b2b_company) |
ApprovalSettings (b2b_approval) |
1 : 1 |
cart-approvals |
Cart (core) |
Approval (b2b_approval) |
1 : N |
cart-approval-status |
Cart (core) |
ApprovalStatus (b2b_approval) |
1 : 1 |
Quote → Order, Cart, OrderChange, Customer, and User relationships are registered as read-only virtual links via MedusaModule.setCustomLink.
| ID | Description |
|---|---|
create-companies |
Creates a company and its linked ApprovalSettings in a single atomic operation |
update-companies |
Updates company fields |
delete-companies |
Deletes company and its associated ApprovalSettings |
add-company-to-customer-group |
Adds all current employees to the company's linked CustomerGroup |
remove-company-from-customer-group |
Removes all employees from the linked CustomerGroup |
| ID | Description |
|---|---|
create-employees |
Creates an employee record, links it to a Customer, optionally sets company_admin role, and adds the customer to the company's CustomerGroup |
update-employees |
Updates spending_limit or is_admin |
delete-employees |
Removes the employee record |
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.