Skip to content

The complete open source platform to run your entire marketplace. Storefront, vendor panel, admin console, and integrations in one enterprise-grade platform you own.

fix: revert getDisplayFulfillmentItems and remove apps/api

vholik13dcd26a01e8
diff --git a/apps/api/.env.template b/apps/api/.env.template
deleted file mode 100644
index 85fc46ac0..000000000
--- a/apps/api/.env.template
+++ /dev/null
@@ -1,9 +0,0 @@
-STORE_CORS=http://localhost:8000,https://docs.medusajs.com
-ADMIN_CORS=http://localhost:7000,http://localhost:9000
-VENDOR_CORS=http://localhost:7001
-AUTH_CORS=http://localhost:7000,http://localhost:7001,http://localhost:9000
-REDIS_URL=redis://localhost:6379
-JWT_SECRET=supersecret
-COOKIE_SECRET=supersecret
-DATABASE_URL=
-
diff --git a/apps/api/.env.test b/apps/api/.env.test
deleted file mode 100644
index e69de29bb..000000000
diff --git a/apps/api/.gitignore b/apps/api/.gitignore
deleted file mode 100644
index 7aa216915..000000000
--- a/apps/api/.gitignore
+++ /dev/null
@@ -1,26 +0,0 @@
-/dist
-.env
-.DS_Store
-/uploads
-/node_modules
-yarn-error.log
-
-.idea
-
-coverage
-
-!src/**
-
-./tsconfig.tsbuildinfo
-medusa-db.sql
-build
-.cache
-
-.yarn/*
-!.yarn/patches
-!.yarn/plugins
-!.yarn/releases
-!.yarn/sdks
-!.yarn/versions
-
-.medusa
\ No newline at end of file
diff --git a/apps/api/.mercur/_generated/index.ts b/apps/api/.mercur/_generated/index.ts
deleted file mode 100644
index 54aa1e45f..000000000
--- a/apps/api/.mercur/_generated/index.ts
+++ /dev/null
@@ -1,698 +0,0 @@
-// This file is generated automatically by Mercur CLI
-// Do not edit this file manually
-
-export type Routes = {
- admin: {
- apiKeys: typeof import("@medusajs/medusa/api/admin/api-keys/route") & {
- $id: typeof import("@medusajs/medusa/api/admin/api-keys/[id]/route") & {
- revoke: typeof import("@medusajs/medusa/api/admin/api-keys/[id]/revoke/route");
- salesChannels: typeof import("@medusajs/medusa/api/admin/api-keys/[id]/sales-channels/route");
- };
- };
- campaigns: typeof import("@medusajs/medusa/api/admin/campaigns/route") & {
- $id: typeof import("@medusajs/medusa/api/admin/campaigns/[id]/route") & {
- promotions: typeof import("@medusajs/medusa/api/admin/campaigns/[id]/promotions/route");
- };
- };
- claims: typeof import("@medusajs/medusa/api/admin/claims/route") & {
- $id: typeof import("@medusajs/medusa/api/admin/claims/[id]/route") & {
- cancel: typeof import("@medusajs/medusa/api/admin/claims/[id]/cancel/route");
- claimItems: typeof import("@medusajs/medusa/api/admin/claims/[id]/claim-items/route") & {
- $actionId: typeof import("@medusajs/medusa/api/admin/claims/[id]/claim-items/[action_id]/route");
- };
- inbound: {
- items: typeof import("@medusajs/medusa/api/admin/claims/[id]/inbound/items/route") & {
- $actionId: typeof import("@medusajs/medusa/api/admin/claims/[id]/inbound/items/[action_id]/route");
- };
- shippingMethod: typeof import("@medusajs/medusa/api/admin/claims/[id]/inbound/shipping-method/route") & {
- $actionId: typeof import("@medusajs/medusa/api/admin/claims/[id]/inbound/shipping-method/[action_id]/route");
- };
- };
- outbound: {
- items: typeof import("@medusajs/medusa/api/admin/claims/[id]/outbound/items/route") & {
- $actionId: typeof import("@medusajs/medusa/api/admin/claims/[id]/outbound/items/[action_id]/route");
- };
- shippingMethod: typeof import("@medusajs/medusa/api/admin/claims/[id]/outbound/shipping-method/route") & {
- $actionId: typeof import("@medusajs/medusa/api/admin/claims/[id]/outbound/shipping-method/[action_id]/route");
- };
- };
- request: typeof import("@medusajs/medusa/api/admin/claims/[id]/request/route");
- };
- };
- collections: typeof import("@medusajs/medusa/api/admin/collections/route") & {
- $id: typeof import("@medusajs/medusa/api/admin/collections/[id]/route") & {
- products: typeof import("@medusajs/medusa/api/admin/collections/[id]/products/route");
- };
- };
- currencies: typeof import("@medusajs/medusa/api/admin/currencies/route") & {
- $code: typeof import("@medusajs/medusa/api/admin/currencies/[code]/route");
- };
- customerGroups: typeof import("@medusajs/medusa/api/admin/customer-groups/route") & {
- $id: typeof import("@medusajs/medusa/api/admin/customer-groups/[id]/route") & {
- customers: typeof import("@medusajs/medusa/api/admin/customer-groups/[id]/customers/route");
- };
- };
- customers: typeof import("@medusajs/medusa/api/admin/customers/route") & {
- $id: typeof import("@medusajs/medusa/api/admin/customers/[id]/route") & {
- addresses: typeof import("@medusajs/medusa/api/admin/customers/[id]/addresses/route") & {
- $addressId: typeof import("@medusajs/medusa/api/admin/customers/[id]/addresses/[address_id]/route");
- };
- customerGroups: typeof import("@medusajs/medusa/api/admin/customers/[id]/customer-groups/route");
- };
- };
- draftOrders: typeof import("@medusajs/medusa/api/admin/draft-orders/route") & {
- $id: typeof import("@medusajs/medusa/api/admin/draft-orders/[id]/route") & {
- convertToOrder: typeof import("@medusajs/medusa/api/admin/draft-orders/[id]/convert-to-order/route");
- edit: typeof import("@medusajs/medusa/api/admin/draft-orders/[id]/edit/route") & {
- confirm: typeof import("@medusajs/medusa/api/admin/draft-orders/[id]/edit/confirm/route");
- items: typeof import("@medusajs/medusa/api/admin/draft-orders/[id]/edit/items/route") & {
- $actionId: typeof import("@medusajs/medusa/api/admin/draft-orders/[id]/edit/items/[action_id]/route");
- item: {
- $itemId: typeof import("@medusajs/medusa/api/admin/draft-orders/[id]/edit/items/item/[item_id]/route");
- };
- };
- promotions: typeof import("@medusajs/medusa/api/admin/draft-orders/[id]/edit/promotions/route");
- request: typeof import("@medusajs/medusa/api/admin/draft-orders/[id]/edit/request/route");
- shippingMethods: typeof import("@medusajs/medusa/api/admin/draft-orders/[id]/edit/shipping-methods/route") & {
- $actionId: typeof import("@medusajs/medusa/api/admin/draft-orders/[id]/edit/shipping-methods/[action_id]/route");
- method: {
- $methodId: typeof import("@medusajs/medusa/api/admin/draft-orders/[id]/edit/shipping-methods/method/[method_id]/route");
- };
- };
- };
- };
- };
- exchanges: typeof import("@medusajs/medusa/api/admin/exchanges/route") & {
- $id: typeof import("@medusajs/medusa/api/admin/exchanges/[id]/route") & {
- cancel: typeof import("@medusajs/medusa/api/admin/exchanges/[id]/cancel/route");
- inbound: {
- items: typeof import("@medusajs/medusa/api/admin/exchanges/[id]/inbound/items/route") & {
- $actionId: typeof import("@medusajs/medusa/api/admin/exchanges/[id]/inbound/items/[action_id]/route");
- };
- shippingMethod: typeof import("@medusajs/medusa/api/admin/exchanges/[id]/inbound/shipping-method/route") & {
- $actionId: typeof import("@medusajs/medusa/api/admin/exchanges/[id]/inbound/shipping-method/[action_id]/route");
- };
- };
- outbound: {
- items: typeof import("@medusajs/medusa/api/admin/exchanges/[id]/outbound/items/route") & {
- $actionId: typeof import("@medusajs/medusa/api/admin/exchanges/[id]/outbound/items/[action_id]/route");
- };
- shippingMethod: typeof import("@medusajs/medusa/api/admin/exchanges/[id]/outbound/shipping-method/route") & {
- $actionId: typeof import("@medusajs/medusa/api/admin/exchanges/[id]/outbound/shipping-method/[action_id]/route");
- };
- };
- request: typeof import("@medusajs/medusa/api/admin/exchanges/[id]/request/route");
- };
- };
- featureFlags: typeof import("@medusajs/medusa/api/admin/feature-flags/route");
- fulfillmentProviders: typeof import("@medusajs/medusa/api/admin/fulfillment-providers/route") & {
- $id: {
- options: typeof import("@medusajs/medusa/api/admin/fulfillment-providers/[id]/options/route");
- };
- };
- fulfillmentSets: {
- $id: typeof import("@medusajs/medusa/api/admin/fulfillment-sets/[id]/route") & {
- serviceZones: typeof import("@medusajs/medusa/api/admin/fulfillment-sets/[id]/service-zones/route") & {
- $zoneId: typeof import("@medusajs/medusa/api/admin/fulfillment-sets/[id]/service-zones/[zone_id]/route");
- };
- };
- };
- fulfillments: typeof import("@medusajs/medusa/api/admin/fulfillments/route") & {
- $id: {
- cancel: typeof import("@medusajs/medusa/api/admin/fulfillments/[id]/cancel/route");
- shipment: typeof import("@medusajs/medusa/api/admin/fulfillments/[id]/shipment/route");
- };
- };
- index: {
- details: typeof import("@medusajs/medusa/api/admin/index/details/route");
- sync: typeof import("@medusajs/medusa/api/admin/index/sync/route");
- };
- inventoryItems: typeof import("@medusajs/medusa/api/admin/inventory-items/route") & {
- $id: typeof import("@medusajs/medusa/api/admin/inventory-items/[id]/route") & {
- locationLevels: typeof import("@medusajs/medusa/api/admin/inventory-items/[id]/location-levels/route") & {
- $locationId: typeof import("@medusajs/medusa/api/admin/inventory-items/[id]/location-levels/[location_id]/route");
- batch: typeof import("@medusajs/medusa/api/admin/inventory-items/[id]/location-levels/batch/route");
- };
- };
- locationLevels: {
- batch: typeof import("@medusajs/medusa/api/admin/inventory-items/location-levels/batch/route");
- };
- };
- invites: typeof import("@medusajs/medusa/api/admin/invites/route") & {
- $id: typeof import("@medusajs/medusa/api/admin/invites/[id]/route") & {
- resend: typeof import("@medusajs/medusa/api/admin/invites/[id]/resend/route");
- };
- accept: typeof import("@medusajs/medusa/api/admin/invites/accept/route");
- };
- locales: typeof import("@medusajs/medusa/api/admin/locales/route") & {
- $code: typeof import("@medusajs/medusa/api/admin/locales/[code]/route");
- };
- notifications: typeof import("@medusajs/medusa/api/admin/notifications/route") & {
- $id: typeof import("@medusajs/medusa/api/admin/notifications/[id]/route");
- };
- orderChanges: {
- $id: typeof import("@medusajs/medusa/api/admin/order-changes/[id]/route");
- };
- orderEdits: typeof import("@medusajs/medusa/api/admin/order-edits/route") & {
- $id: typeof import("@medusajs/medusa/api/admin/order-edits/[id]/route") & {
- confirm: typeof import("@medusajs/medusa/api/admin/order-edits/[id]/confirm/route");
- items: typeof import("@medusajs/medusa/api/admin/order-edits/[id]/items/route") & {
- $actionId: typeof import("@medusajs/medusa/api/admin/order-edits/[id]/items/[action_id]/route");
- item: {
- $itemId: typeof import("@medusajs/medusa/api/admin/order-edits/[id]/items/item/[item_id]/route");
- };
- };
- request: typeof import("@medusajs/medusa/api/admin/order-edits/[id]/request/route");
- shippingMethod: typeof import("@medusajs/medusa/api/admin/order-edits/[id]/shipping-method/route") & {
- $actionId: typeof import("@medusajs/medusa/api/admin/order-edits/[id]/shipping-method/[action_id]/route");
- };
- };
- };
- orders: typeof import("@mercurjs/core-plugin/api/admin/orders/route") & {
- $id: typeof import("@medusajs/medusa/api/admin/orders/[id]/route") & {
- archive: typeof import("@medusajs/medusa/api/admin/orders/[id]/archive/route");
- cancel: typeof import("@medusajs/medusa/api/admin/orders/[id]/cancel/route");
- changes: typeof import("@medusajs/medusa/api/admin/orders/[id]/changes/route");
- complete: typeof import("@medusajs/medusa/api/admin/orders/[id]/complete/route");
- creditLines: typeof import("@medusajs/medusa/api/admin/orders/[id]/credit-lines/route");
- fulfillments: typeof import("@medusajs/medusa/api/admin/orders/[id]/fulfillments/route") & {
- $fulfillmentId: {
- cancel: typeof import("@medusajs/medusa/api/admin/orders/[id]/fulfillments/[fulfillment_id]/cancel/route");
- markAsDelivered: typeof import("@medusajs/medusa/api/admin/orders/[id]/fulfillments/[fulfillment_id]/mark-as-delivered/route");
- shipments: typeof import("@medusajs/medusa/api/admin/orders/[id]/fulfillments/[fulfillment_id]/shipments/route");
- };
- };
- lineItems: typeof import("@medusajs/medusa/api/admin/orders/[id]/line-items/route");
- preview: typeof import("@medusajs/medusa/api/admin/orders/[id]/preview/route");
- shippingOptions: typeof import("@medusajs/medusa/api/admin/orders/[id]/shipping-options/route");
- transfer: typeof import("@medusajs/medusa/api/admin/orders/[id]/transfer/route") & {
- cancel: typeof import("@medusajs/medusa/api/admin/orders/[id]/transfer/cancel/route");
- };
- };
- export: typeof import("@medusajs/medusa/api/admin/orders/export/route");
- };
- paymentCollections: typeof import("@medusajs/medusa/api/admin/payment-collections/route") & {
- $id: typeof import("@medusajs/medusa/api/admin/payment-collections/[id]/route") & {
- markAsPaid: typeof import("@medusajs/medusa/api/admin/payment-collections/[id]/mark-as-paid/route");
- };
- };
- payments: typeof import("@medusajs/medusa/api/admin/payments/route") & {
- $id: typeof import("@medusajs/medusa/api/admin/payments/[id]/route") & {
- capture: typeof import("@medusajs/medusa/api/admin/payments/[id]/capture/route");
- refund: typeof import("@medusajs/medusa/api/admin/payments/[id]/refund/route");
- };
- paymentProviders: typeof import("@medusajs/medusa/api/admin/payments/payment-providers/route");
- };
- plugins: typeof import("@medusajs/medusa/api/admin/plugins/route");
- priceLists: typeof import("@medusajs/medusa/api/admin/price-lists/route") & {
- $id: typeof import("@medusajs/medusa/api/admin/price-lists/[id]/route") & {
- prices: typeof import("@medusajs/medusa/api/admin/price-lists/[id]/prices/route") & {
- batch: typeof import("@medusajs/medusa/api/admin/price-lists/[id]/prices/batch/route");
- };
- products: typeof import("@medusajs/medusa/api/admin/price-lists/[id]/products/route");
- };
- };
- pricePreferences: typeof import("@medusajs/medusa/api/admin/price-preferences/route") & {
- $id: typeof import("@medusajs/medusa/api/admin/price-preferences/[id]/route");
- };
- productCategories: typeof import("@medusajs/medusa/api/admin/product-categories/route") & {
- $id: typeof import("@medusajs/medusa/api/admin/product-categories/[id]/route") & {
- products: typeof import("@medusajs/medusa/api/admin/product-categories/[id]/products/route");
- };
- };
- productTags: typeof import("@medusajs/medusa/api/admin/product-tags/route") & {
- $id: typeof import("@medusajs/medusa/api/admin/product-tags/[id]/route");
- };
- productTypes: typeof import("@medusajs/medusa/api/admin/product-types/route") & {
- $id: typeof import("@medusajs/medusa/api/admin/product-types/[id]/route");
- };
- productVariants: typeof import("@medusajs/medusa/api/admin/product-variants/route");
- products: typeof import("@mercurjs/core-plugin/api/admin/products/route") & {
- $id: typeof import("@medusajs/medusa/api/admin/products/[id]/route") & {
- images: {
- $imageId: {
- variants: {
- batch: typeof import("@medusajs/medusa/api/admin/products/[id]/images/[image_id]/variants/batch/route");
- };
- };
- };
- options: typeof import("@medusajs/medusa/api/admin/products/[id]/options/route") & {
- $optionId: typeof import("@medusajs/medusa/api/admin/products/[id]/options/[option_id]/route");
- };
- variants: typeof import("@medusajs/medusa/api/admin/products/[id]/variants/route") & {
- $variantId: typeof import("@medusajs/medusa/api/admin/products/[id]/variants/[variant_id]/route") & {
- images: {
- batch: typeof import("@medusajs/medusa/api/admin/products/[id]/variants/[variant_id]/images/batch/route");
- };
- inventoryItems: typeof import("@medusajs/medusa/api/admin/products/[id]/variants/[variant_id]/inventory-items/route") & {
- $inventoryItemId: typeof import("@medusajs/medusa/api/admin/products/[id]/variants/[variant_id]/inventory-items/[inventory_item_id]/route");
- };
- };
- batch: typeof import("@medusajs/medusa/api/admin/products/[id]/variants/batch/route");
- inventoryItems: {
- batch: typeof import("@medusajs/medusa/api/admin/products/[id]/variants/inventory-items/batch/route");
- };
- };
- };
- batch: typeof import("@medusajs/medusa/api/admin/products/batch/route");
- export: typeof import("@medusajs/medusa/api/admin/products/export/route");
- import: typeof import("@medusajs/medusa/api/admin/products/import/route") & {
- $transactionId: {
- confirm: typeof import("@medusajs/medusa/api/admin/products/import/[transaction_id]/confirm/route");
- };
- };
- imports: typeof import("@medusajs/medusa/api/admin/products/imports/route") & {
- $transactionId: {
- confirm: typeof import("@medusajs/medusa/api/admin/products/imports/[transaction_id]/confirm/route");
- };
- };
- };
- promotions: typeof import("@medusajs/medusa/api/admin/promotions/route") & {
- $id: typeof import("@medusajs/medusa/api/admin/promotions/[id]/route") & {
- $ruleType: typeof import("@medusajs/medusa/api/admin/promotions/[id]/[rule_type]/route");
- buyRules: {
- batch: typeof import("@medusajs/medusa/api/admin/promotions/[id]/buy-rules/batch/route");
- };
- rules: {
- batch: typeof import("@medusajs/medusa/api/admin/promotions/[id]/rules/batch/route");
- };
- targetRules: {
- batch: typeof import("@medusajs/medusa/api/admin/promotions/[id]/target-rules/batch/route");
- };
- };
- ruleAttributeOptions: {
- $ruleType: typeof import("@medusajs/medusa/api/admin/promotions/rule-attribute-options/[rule_type]/route");
- };
- ruleValueOptions: {
- $ruleType: {
- $ruleAttributeId: typeof import("@medusajs/medusa/api/admin/promotions/rule-value-options/[rule_type]/[rule_attribute_id]/route");
- };
- };
- };
- rbac: {
- policies: typeof import("@medusajs/medusa/api/admin/rbac/policies/route") & {
- $id: typeof import("@medusajs/medusa/api/admin/rbac/policies/[id]/route");
- };
- roles: typeof import("@medusajs/medusa/api/admin/rbac/roles/route") & {
- $id: typeof import("@medusajs/medusa/api/admin/rbac/roles/[id]/route") & {
- policies: typeof import("@medusajs/medusa/api/admin/rbac/roles/[id]/policies/route") & {
- $policyId: typeof import("@medusajs/medusa/api/admin/rbac/roles/[id]/policies/[policy_id]/route");
- };
- };
- };
- };
- refundReasons: typeof import("@medusajs/medusa/api/admin/refund-reasons/route") & {
- $id: typeof import("@medusajs/medusa/api/admin/refund-reasons/[id]/route");
- };
- regions: typeof import("@medusajs/medusa/api/admin/regions/route") & {
- $id: typeof import("@medusajs/medusa/api/admin/regions/[id]/route");
- };
- reservations: typeof import("@medusajs/medusa/api/admin/reservations/route") & {
- $id: typeof import("@medusajs/medusa/api/admin/reservations/[id]/route");
- };
- returnReasons: typeof import("@medusajs/medusa/api/admin/return-reasons/route") & {
- $id: typeof import("@medusajs/medusa/api/admin/return-reasons/[id]/route");
- };
- returns: typeof import("@medusajs/medusa/api/admin/returns/route") & {
- $id: typeof import("@medusajs/medusa/api/admin/returns/[id]/route") & {
- cancel: typeof import("@medusajs/medusa/api/admin/returns/[id]/cancel/route");
- dismissItems: typeof import("@medusajs/medusa/api/admin/returns/[id]/dismiss-items/route") & {
- $actionId: typeof import("@medusajs/medusa/api/admin/returns/[id]/dismiss-items/[action_id]/route");
- };
- receive: typeof import("@medusajs/medusa/api/admin/returns/[id]/receive/route") & {
- confirm: typeof import("@medusajs/medusa/api/admin/returns/[id]/receive/confirm/route");
- };
- receiveItems: typeof import("@medusajs/medusa/api/admin/returns/[id]/receive-items/route") & {
- $actionId: typeof import("@medusajs/medusa/api/admin/returns/[id]/receive-items/[action_id]/route");
- };
- request: typeof import("@medusajs/medusa/api/admin/returns/[id]/request/route");
- requestItems: typeof import("@medusajs/medusa/api/admin/returns/[id]/request-items/route") & {
- $actionId: typeof import("@medusajs/medusa/api/admin/returns/[id]/request-items/[action_id]/route");
- };
- shippingMethod: typeof import("@medusajs/medusa/api/admin/returns/[id]/shipping-method/route") & {
- $actionId: typeof import("@medusajs/medusa/api/admin/returns/[id]/shipping-method/[action_id]/route");
- };
- };
- };
- salesChannels: typeof import("@medusajs/medusa/api/admin/sales-channels/route") & {
- $id: typeof import("@medusajs/medusa/api/admin/sales-channels/[id]/route") & {
- products: typeof import("@medusajs/medusa/api/admin/sales-channels/[id]/products/route");
- };
- };
- shippingOptionTypes: typeof import("@medusajs/medusa/api/admin/shipping-option-types/route") & {
- $id: typeof import("@medusajs/medusa/api/admin/shipping-option-types/[id]/route");
- };
- shippingOptions: typeof import("@medusajs/medusa/api/admin/shipping-options/route") & {
- $id: typeof import("@medusajs/medusa/api/admin/shipping-options/[id]/route") & {
- rules: {
- batch: typeof import("@medusajs/medusa/api/admin/shipping-options/[id]/rules/batch/route");
- };
- };
- };
- shippingProfiles: typeof import("@medusajs/medusa/api/admin/shipping-profiles/route") & {
- $id: typeof import("@medusajs/medusa/api/admin/shipping-profiles/[id]/route");
- };
- stockLocations: typeof import("@medusajs/medusa/api/admin/stock-locations/route") & {
- $id: typeof import("@medusajs/medusa/api/admin/stock-locations/[id]/route") & {
- fulfillmentProviders: typeof import("@medusajs/medusa/api/admin/stock-locations/[id]/fulfillment-providers/route");
- fulfillmentSets: typeof import("@medusajs/medusa/api/admin/stock-locations/[id]/fulfillment-sets/route");
- salesChannels: typeof import("@medusajs/medusa/api/admin/stock-locations/[id]/sales-channels/route");
- };
- };
- stores: typeof import("@medusajs/medusa/api/admin/stores/route") & {
- $id: typeof import("@medusajs/medusa/api/admin/stores/[id]/route");
- };
- taxProviders: typeof import("@medusajs/medusa/api/admin/tax-providers/route");
- taxRates: typeof import("@medusajs/medusa/api/admin/tax-rates/route") & {
- $id: typeof import("@medusajs/medusa/api/admin/tax-rates/[id]/route") & {
- rules: typeof import("@medusajs/medusa/api/admin/tax-rates/[id]/rules/route") & {
- $ruleId: typeof import("@medusajs/medusa/api/admin/tax-rates/[id]/rules/[rule_id]/route");
- };
- };
- };
- taxRegions: typeof import("@medusajs/medusa/api/admin/tax-regions/route") & {
- $id: typeof import("@medusajs/medusa/api/admin/tax-regions/[id]/route");
- };
- translations: typeof import("@medusajs/medusa/api/admin/translations/route") & {
- batch: typeof import("@medusajs/medusa/api/admin/translations/batch/route");
- entities: typeof import("@medusajs/medusa/api/admin/translations/entities/route");
- settings: typeof import("@medusajs/medusa/api/admin/translations/settings/route") & {
- batch: typeof import("@medusajs/medusa/api/admin/translations/settings/batch/route");
- };
- statistics: typeof import("@medusajs/medusa/api/admin/translations/statistics/route");
- };
- uploads: typeof import("@medusajs/medusa/api/admin/uploads/route") & {
- $id: typeof import("@medusajs/medusa/api/admin/uploads/[id]/route");
- presignedUrls: typeof import("@medusajs/medusa/api/admin/uploads/presigned-urls/route");
- };
- users: typeof import("@medusajs/medusa/api/admin/users/route") & {
- $id: typeof import("@medusajs/medusa/api/admin/users/[id]/route");
- me: typeof import("@medusajs/medusa/api/admin/users/me/route");
- };
- views: {
- $entity: {
- columns: typeof import("@medusajs/medusa/api/admin/views/[entity]/columns/route");
- configurations: typeof import("@medusajs/medusa/api/admin/views/[entity]/configurations/route") & {
- $id: typeof import("@medusajs/medusa/api/admin/views/[entity]/configurations/[id]/route");
- active: typeof import("@medusajs/medusa/api/admin/views/[entity]/configurations/active/route");
- };
- };
- };
- workflowsExecutions: typeof import("@medusajs/medusa/api/admin/workflows-executions/route") & {
- $id: typeof import("@medusajs/medusa/api/admin/workflows-executions/[id]/route");
- $workflowId: {
- $transactionId: typeof import("@medusajs/medusa/api/admin/workflows-executions/[workflow_id]/[transaction_id]/route") & {
- $stepId: {
- subscribe: typeof import("@medusajs/medusa/api/admin/workflows-executions/[workflow_id]/[transaction_id]/[step_id]/subscribe/route");
- };
- };
- run: typeof import("@medusajs/medusa/api/admin/workflows-executions/[workflow_id]/run/route");
- steps: {
- failure: typeof import("@medusajs/medusa/api/admin/workflows-executions/[workflow_id]/steps/failure/route");
- success: typeof import("@medusajs/medusa/api/admin/workflows-executions/[workflow_id]/steps/success/route");
- };
- subscribe: typeof import("@medusajs/medusa/api/admin/workflows-executions/[workflow_id]/subscribe/route");
- };
- };
- commissionRates: typeof import("@mercurjs/core-plugin/api/admin/commission-rates/route") & {
- $id: typeof import("@mercurjs/core-plugin/api/admin/commission-rates/[id]/route") & {
- rules: typeof import("@mercurjs/core-plugin/api/admin/commission-rates/[id]/rules/route");
- };
- };
- orderGroups: typeof import("@mercurjs/core-plugin/api/admin/order-groups/route") & {
- $id: typeof import("@mercurjs/core-plugin/api/admin/order-groups/[id]/route");
- };
- payouts: typeof import("@mercurjs/core-plugin/api/admin/payouts/route") & {
- $id: typeof import("@mercurjs/core-plugin/api/admin/payouts/[id]/route");
- };
- sellers: typeof import("@mercurjs/core-plugin/api/admin/sellers/route") & {
- $id: typeof import("@mercurjs/core-plugin/api/admin/sellers/[id]/route");
- };
- custom: typeof import("../../src/api/admin/custom/route");
- };
- auth: {
- $actorType: {
- $authProvider: typeof import("@medusajs/medusa/api/auth/[actor_type]/[auth_provider]/route") & {
- callback: typeof import("@medusajs/medusa/api/auth/[actor_type]/[auth_provider]/callback/route");
- register: typeof import("@medusajs/medusa/api/auth/[actor_type]/[auth_provider]/register/route");
- resetPassword: typeof import("@medusajs/medusa/api/auth/[actor_type]/[auth_provider]/reset-password/route");
- update: typeof import("@medusajs/medusa/api/auth/[actor_type]/[auth_provider]/update/route");
- };
- };
- session: typeof import("@medusajs/medusa/api/auth/session/route");
- token: {
- refresh: typeof import("@medusajs/medusa/api/auth/token/refresh/route");
- };
- };
- store: {
- carts: typeof import("@medusajs/medusa/api/store/carts/route") & {
- $id: typeof import("@medusajs/medusa/api/store/carts/[id]/route") & {
- complete: typeof import("@mercurjs/core-plugin/api/store/carts/[id]/complete/route");
- customer: typeof import("@medusajs/medusa/api/store/carts/[id]/customer/route");
- lineItems: typeof import("@medusajs/medusa/api/store/carts/[id]/line-items/route") & {
- $lineId: typeof import("@medusajs/medusa/api/store/carts/[id]/line-items/[line_id]/route");
- };
- promotions: typeof import("@mercurjs/core-plugin/api/store/carts/[id]/promotions/route");
- shippingMethods: typeof import("@mercurjs/core-plugin/api/store/carts/[id]/shipping-methods/route");
- taxes: typeof import("@medusajs/medusa/api/store/carts/[id]/taxes/route");
- };
- };
- collections: typeof import("@medusajs/medusa/api/store/collections/route") & {
- $id: typeof import("@medusajs/medusa/api/store/collections/[id]/route");
- };
- currencies: typeof import("@medusajs/medusa/api/store/currencies/route") & {
- $code: typeof import("@medusajs/medusa/api/store/currencies/[code]/route");
- };
- customers: typeof import("@medusajs/medusa/api/store/customers/route") & {
- me: typeof import("@medusajs/medusa/api/store/customers/me/route") & {
- addresses: typeof import("@medusajs/medusa/api/store/customers/me/addresses/route") & {
- $addressId: typeof import("@medusajs/medusa/api/store/customers/me/addresses/[address_id]/route");
- };
- };
- };
- locales: typeof import("@medusajs/medusa/api/store/locales/route");
- orders: typeof import("@medusajs/medusa/api/store/orders/route") & {
- $id: typeof import("@medusajs/medusa/api/store/orders/[id]/route") & {
- transfer: {
- accept: typeof import("@medusajs/medusa/api/store/orders/[id]/transfer/accept/route");
- cancel: typeof import("@medusajs/medusa/api/store/orders/[id]/transfer/cancel/route");
- decline: typeof import("@medusajs/medusa/api/store/orders/[id]/transfer/decline/route");
- request: typeof import("@medusajs/medusa/api/store/orders/[id]/transfer/request/route");
- };
- };
- };
- paymentCollections: typeof import("@medusajs/medusa/api/store/payment-collections/route") & {
- $id: {
- paymentSessions: typeof import("@medusajs/medusa/api/store/payment-collections/[id]/payment-sessions/route");
- };
- };
- paymentProviders: typeof import("@medusajs/medusa/api/store/payment-providers/route");
- productCategories: typeof import("@medusajs/medusa/api/store/product-categories/route") & {
- $id: typeof import("@medusajs/medusa/api/store/product-categories/[id]/route");
- };
- productTags: typeof import("@medusajs/medusa/api/store/product-tags/route") & {
- $id: typeof import("@medusajs/medusa/api/store/product-tags/[id]/route");
- };
- productTypes: typeof import("@medusajs/medusa/api/store/product-types/route") & {
- $id: typeof import("@medusajs/medusa/api/store/product-types/[id]/route");
- };
- productVariants: typeof import("@medusajs/medusa/api/store/product-variants/route") & {
- $id: typeof import("@medusajs/medusa/api/store/product-variants/[id]/route");
- };
- products: typeof import("@medusajs/medusa/api/store/products/route") & {
- $id: typeof import("@medusajs/medusa/api/store/products/[id]/route");
- };
- regions: typeof import("@medusajs/medusa/api/store/regions/route") & {
- $id: typeof import("@medusajs/medusa/api/store/regions/[id]/route");
- };
- returnReasons: typeof import("@medusajs/medusa/api/store/return-reasons/route") & {
- $id: typeof import("@medusajs/medusa/api/store/return-reasons/[id]/route");
- };
- returns: typeof import("@medusajs/medusa/api/store/returns/route");
- shippingOptions: typeof import("@mercurjs/core-plugin/api/store/shipping-options/route") & {
- $id: {
- calculate: typeof import("@medusajs/medusa/api/store/shipping-options/[id]/calculate/route");
- };
- };
- orderGroups: typeof import("@mercurjs/core-plugin/api/store/order-groups/route") & {
- $id: typeof import("@mercurjs/core-plugin/api/store/order-groups/[id]/route");
- };
- sellers: typeof import("@mercurjs/core-plugin/api/store/sellers/route") & {
- $id: typeof import("@mercurjs/core-plugin/api/store/sellers/[id]/route");
- };
- custom: typeof import("../../src/api/store/custom/route");
- };
- vendor: {
- campaigns: typeof import("@mercurjs/core-plugin/api/vendor/campaigns/route") & {
- $id: typeof import("@mercurjs/core-plugin/api/vendor/campaigns/[id]/route") & {
- promotions: typeof import("@mercurjs/core-plugin/api/vendor/campaigns/[id]/promotions/route");
- };
- };
- collections: typeof import("@mercurjs/core-plugin/api/vendor/collections/route") & {
- $id: typeof import("@mercurjs/core-plugin/api/vendor/collections/[id]/route") & {
- products: typeof import("@mercurjs/core-plugin/api/vendor/collections/[id]/products/route");
- };
- };
- currencies: typeof import("@mercurjs/core-plugin/api/vendor/currencies/route") & {
- $code: typeof import("@mercurjs/core-plugin/api/vendor/currencies/[code]/route");
- };
- customers: typeof import("@mercurjs/core-plugin/api/vendor/customers/route") & {
- $id: typeof import("@mercurjs/core-plugin/api/vendor/customers/[id]/route");
- };
- fulfillmentSets: {
- $id: typeof import("@mercurjs/core-plugin/api/vendor/fulfillment-sets/[id]/route") & {
- serviceZones: typeof import("@mercurjs/core-plugin/api/vendor/fulfillment-sets/[id]/service-zones/route") & {
- $zoneId: typeof import("@mercurjs/core-plugin/api/vendor/fulfillment-sets/[id]/service-zones/[zone_id]/route");
- };
- };
- };
- inventoryItems: typeof import("@mercurjs/core-plugin/api/vendor/inventory-items/route") & {
- $id: typeof import("@mercurjs/core-plugin/api/vendor/inventory-items/[id]/route") & {
- locationLevels: typeof import("@mercurjs/core-plugin/api/vendor/inventory-items/[id]/location-levels/route") & {
- $locationId: typeof import("@mercurjs/core-plugin/api/vendor/inventory-items/[id]/location-levels/[location_id]/route");
- batch: typeof import("@mercurjs/core-plugin/api/vendor/inventory-items/[id]/location-levels/batch/route");
- };
- };
- };
- orders: typeof import("@mercurjs/core-plugin/api/vendor/orders/route") & {
- $id: typeof import("@mercurjs/core-plugin/api/vendor/orders/[id]/route") & {
- cancel: typeof import("@mercurjs/core-plugin/api/vendor/orders/[id]/cancel/route");
- changes: typeof import("@mercurjs/core-plugin/api/vendor/orders/[id]/changes/route");
- complete: typeof import("@mercurjs/core-plugin/api/vendor/orders/[id]/complete/route");
- fulfillments: typeof import("@mercurjs/core-plugin/api/vendor/orders/[id]/fulfillments/route") & {
- $fulfillmentId: {
- cancel: typeof import("@mercurjs/core-plugin/api/vendor/orders/[id]/fulfillments/[fulfillment_id]/cancel/route");
- markAsDelivered: typeof import("@mercurjs/core-plugin/api/vendor/orders/[id]/fulfillments/[fulfillment_id]/mark-as-delivered/route");
- shipments: typeof import("@mercurjs/core-plugin/api/vendor/orders/[id]/fulfillments/[fulfillment_id]/shipments/route");
- };
- };
- preview: typeof import("@mercurjs/core-plugin/api/vendor/orders/[id]/preview/route");
- };
- };
- payments: typeof import("@mercurjs/core-plugin/api/vendor/payments/route") & {
- $id: typeof import("@mercurjs/core-plugin/api/vendor/payments/[id]/route") & {
- capture: typeof import("@mercurjs/core-plugin/api/vendor/payments/[id]/capture/route");
- refund: typeof import("@mercurjs/core-plugin/api/vendor/payments/[id]/refund/route");
- };
- paymentProviders: typeof import("@mercurjs/core-plugin/api/vendor/payments/payment-providers/route");
- };
- payoutAccounts: typeof import("@mercurjs/core-plugin/api/vendor/payout-accounts/route") & {
- $id: typeof import("@mercurjs/core-plugin/api/vendor/payout-accounts/[id]/route") & {
- onboarding: typeof import("@mercurjs/core-plugin/api/vendor/payout-accounts/[id]/onboarding/route");
- };
- };
- payouts: typeof import("@mercurjs/core-plugin/api/vendor/payouts/route") & {
- $id: typeof import("@mercurjs/core-plugin/api/vendor/payouts/[id]/route");
- };
- priceLists: typeof import("@mercurjs/core-plugin/api/vendor/price-lists/route") & {
- $id: typeof import("@mercurjs/core-plugin/api/vendor/price-lists/[id]/route") & {
- products: typeof import("@mercurjs/core-plugin/api/vendor/price-lists/[id]/products/route");
- };
- };
- pricePreferences: typeof import("@mercurjs/core-plugin/api/vendor/price-preferences/route") & {
- $id: typeof import("@mercurjs/core-plugin/api/vendor/price-preferences/[id]/route");
- };
- productCategories: typeof import("@mercurjs/core-plugin/api/vendor/product-categories/route") & {
- $id: typeof import("@mercurjs/core-plugin/api/vendor/product-categories/[id]/route") & {
- products: typeof import("@mercurjs/core-plugin/api/vendor/product-categories/[id]/products/route");
- };
- };
- productTags: typeof import("@mercurjs/core-plugin/api/vendor/product-tags/route") & {
- $id: typeof import("@mercurjs/core-plugin/api/vendor/product-tags/[id]/route");
- };
- productTypes: typeof import("@mercurjs/core-plugin/api/vendor/product-types/route") & {
- $id: typeof import("@mercurjs/core-plugin/api/vendor/product-types/[id]/route");
- };
- products: typeof import("@mercurjs/core-plugin/api/vendor/products/route") & {
- $id: typeof import("@mercurjs/core-plugin/api/vendor/products/[id]/route") & {
- options: typeof import("@mercurjs/core-plugin/api/vendor/products/[id]/options/route") & {
- $optionId: typeof import("@mercurjs/core-plugin/api/vendor/products/[id]/options/[option_id]/route");
- };
- variants: typeof import("@mercurjs/core-plugin/api/vendor/products/[id]/variants/route") & {
- $variantId: typeof import("@mercurjs/core-plugin/api/vendor/products/[id]/variants/[variant_id]/route");
- };
- };
- };
- promotions: typeof import("@mercurjs/core-plugin/api/vendor/promotions/route") & {
- $id: typeof import("@mercurjs/core-plugin/api/vendor/promotions/[id]/route") & {
- $ruleType: typeof import("@mercurjs/core-plugin/api/vendor/promotions/[id]/[rule_type]/route");
- buyRules: {
- batch: typeof import("@mercurjs/core-plugin/api/vendor/promotions/[id]/buy-rules/batch/route");
- };
- rules: {
- batch: typeof import("@mercurjs/core-plugin/api/vendor/promotions/[id]/rules/batch/route");
- };
- targetRules: {
- batch: typeof import("@mercurjs/core-plugin/api/vendor/promotions/[id]/target-rules/batch/route");
- };
- };
- ruleAttributeOptions: {
- $ruleType: typeof import("@mercurjs/core-plugin/api/vendor/promotions/rule-attribute-options/[rule_type]/route");
- };
- ruleValueOptions: {
- $ruleType: {
- $ruleAttributeId: typeof import("@mercurjs/core-plugin/api/vendor/promotions/rule-value-options/[rule_type]/[rule_attribute_id]/route");
- };
- };
- };
- refundReasons: typeof import("@mercurjs/core-plugin/api/vendor/refund-reasons/route") & {
- $id: typeof import("@mercurjs/core-plugin/api/vendor/refund-reasons/[id]/route");
- };
- regions: typeof import("@mercurjs/core-plugin/api/vendor/regions/route") & {
- $id: typeof import("@mercurjs/core-plugin/api/vendor/regions/[id]/route");
- };
- returnReasons: typeof import("@mercurjs/core-plugin/api/vendor/return-reasons/route") & {
- $id: typeof import("@mercurjs/core-plugin/api/vendor/return-reasons/[id]/route");
- };
- returns: typeof import("@mercurjs/core-plugin/api/vendor/returns/route") & {
- $id: typeof import("@mercurjs/core-plugin/api/vendor/returns/[id]/route") & {
- cancel: typeof import("@mercurjs/core-plugin/api/vendor/returns/[id]/cancel/route");
- dismissItems: typeof import("@mercurjs/core-plugin/api/vendor/returns/[id]/dismiss-items/route") & {
- $actionId: typeof import("@mercurjs/core-plugin/api/vendor/returns/[id]/dismiss-items/[action_id]/route");
- };
- receive: typeof import("@mercurjs/core-plugin/api/vendor/returns/[id]/receive/route") & {
- confirm: typeof import("@mercurjs/core-plugin/api/vendor/returns/[id]/receive/confirm/route");
- };
- receiveItems: typeof import("@mercurjs/core-plugin/api/vendor/returns/[id]/receive-items/route") & {
- $actionId: typeof import("@mercurjs/core-plugin/api/vendor/returns/[id]/receive-items/[action_id]/route");
- };
- request: typeof import("@mercurjs/core-plugin/api/vendor/returns/[id]/request/route");
- requestItems: typeof import("@mercurjs/core-plugin/api/vendor/returns/[id]/request-items/route") & {
- $actionId: typeof import("@mercurjs/core-plugin/api/vendor/returns/[id]/request-items/[action_id]/route");
- };
- shippingMethod: typeof import("@mercurjs/core-plugin/api/vendor/returns/[id]/shipping-method/route") & {
- $actionId: typeof import("@mercurjs/core-plugin/api/vendor/returns/[id]/shipping-method/[action_id]/route");
- };
- };
- };
- salesChannels: typeof import("@mercurjs/core-plugin/api/vendor/sales-channels/route") & {
- $id: typeof import("@mercurjs/core-plugin/api/vendor/sales-channels/[id]/route") & {
- products: typeof import("@mercurjs/core-plugin/api/vendor/sales-channels/[id]/products/route");
- };
- };
- sellers: typeof import("@mercurjs/core-plugin/api/vendor/sellers/route") & {
- me: typeof import("@mercurjs/core-plugin/api/vendor/sellers/me/route");
- };
- shippingOptionTypes: typeof import("@mercurjs/core-plugin/api/vendor/shipping-option-types/route") & {
- $id: typeof import("@mercurjs/core-plugin/api/vendor/shipping-option-types/[id]/route");
- };
- shippingOptions: typeof import("@mercurjs/core-plugin/api/vendor/shipping-options/route") & {
- $id: typeof import("@mercurjs/core-plugin/api/vendor/shipping-options/[id]/route") & {
- rules: {
- batch: typeof import("@mercurjs/core-plugin/api/vendor/shipping-options/[id]/rules/batch/route");
- };
- };
- };
- shippingProfiles: typeof import("@mercurjs/core-plugin/api/vendor/shipping-profiles/route") & {
- $id: typeof import("@mercurjs/core-plugin/api/vendor/shipping-profiles/[id]/route");
- };
- stockLocations: typeof import("@mercurjs/core-plugin/api/vendor/stock-locations/route") & {
- $id: typeof import("@mercurjs/core-plugin/api/vendor/stock-locations/[id]/route") & {
- fulfillmentProviders: typeof import("@mercurjs/core-plugin/api/vendor/stock-locations/[id]/fulfillment-providers/route");
- fulfillmentSets: typeof import("@mercurjs/core-plugin/api/vendor/stock-locations/[id]/fulfillment-sets/route");
- salesChannels: typeof import("@mercurjs/core-plugin/api/vendor/stock-locations/[id]/sales-channels/route");
- };
- };
- uploads: typeof import("@mercurjs/core-plugin/api/vendor/uploads/route");
- };
-};
diff --git a/apps/api/.npmrc b/apps/api/.npmrc
deleted file mode 100644
index a4b432ef1..000000000
--- a/apps/api/.npmrc
+++ /dev/null
@@ -1,5 +0,0 @@
-public-hoist-pattern[]=*@medusajs/*
-public-hoist-pattern[]=@tanstack/react-query
-public-hoist-pattern[]=react-i18next
-public-hoist-pattern[]=react-router-dom
-auto-install-peers=true
\ No newline at end of file
diff --git a/apps/api/README.md b/apps/api/README.md
deleted file mode 100644
index 755571263..000000000
--- a/apps/api/README.md
+++ /dev/null
@@ -1,62 +0,0 @@
-<p align="center">
- <a href="https://www.medusajs.com">
- <picture>
- <source media="(prefers-color-scheme: dark)" srcset="https://user-images.githubusercontent.com/59018053/229103275-b5e482bb-4601-46e6-8142-244f531cebdb.svg">
- <source media="(prefers-color-scheme: light)" srcset="https://user-images.githubusercontent.com/59018053/229103726-e5b529a3-9b3f-4970-8a1f-c6af37f087bf.svg">
- <img alt="Medusa logo" src="https://user-images.githubusercontent.com/59018053/229103726-e5b529a3-9b3f-4970-8a1f-c6af37f087bf.svg">
- </picture>
- </a>
-</p>
-<h1 align="center">
- Medusa
-</h1>
-
-<h4 align="center">
- <a href="https://docs.medusajs.com">Documentation</a> |
- <a href="https://www.medusajs.com">Website</a>
-</h4>
-
-<p align="center">
- Building blocks for digital commerce
-</p>
-<p align="center">
- <a href="https://github.com/medusajs/medusa/blob/master/CONTRIBUTING.md">
- <img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat" alt="PRs welcome!" />
- </a>
- <a href="https://www.producthunt.com/posts/medusa"><img src="https://img.shields.io/badge/Product%20Hunt-%231%20Product%20of%20the%20Day-%23DA552E" alt="Product Hunt"></a>
- <a href="https://discord.gg/xpCwq3Kfn8">
- <img src="https://img.shields.io/badge/chat-on%20discord-7289DA.svg" alt="Discord Chat" />
- </a>
- <a href="https://twitter.com/intent/follow?screen_name=medusajs">
- <img src="https://img.shields.io/twitter/follow/medusajs.svg?label=Follow%20@medusajs" alt="Follow @medusajs" />
- </a>
-</p>
-
-## Compatibility
-
-This starter is compatible with versions >= 2 of `@medusajs/medusa`.
-
-## Getting Started
-
-Visit the [Quickstart Guide](https://docs.medusajs.com/learn/installation) to set up a server.
-
-Visit the [Docs](https://docs.medusajs.com/learn/installation#get-started) to learn more about our system requirements.
-
-## What is Medusa
-
-Medusa is a set of commerce modules and tools that allow you to build rich, reliable, and performant commerce applications without reinventing core commerce logic. The modules can be customized and used to build advanced ecommerce stores, marketplaces, or any product that needs foundational commerce primitives. All modules are open-source and freely available on npm.
-
-Learn more about [Medusa’s architecture](https://docs.medusajs.com/learn/introduction/architecture) and [commerce modules](https://docs.medusajs.com/learn/fundamentals/modules/commerce-modules) in the Docs.
-
-## Community & Contributions
-
-The community and core team are available in [GitHub Discussions](https://github.com/medusajs/medusa/discussions), where you can ask for support, discuss roadmap, and share ideas.
-
-Join our [Discord server](https://discord.com/invite/medusajs) to meet other community members.
-
-## Other channels
-
-- [GitHub Issues](https://github.com/medusajs/medusa/issues)
-- [Twitter](https://twitter.com/medusajs)
-- [LinkedIn](https://www.linkedin.com/company/medusajs)
-- [Medusa Blog](https://medusajs.com/blog/)
diff --git a/apps/api/instrumentation.ts b/apps/api/instrumentation.ts
deleted file mode 100644
index a70d3b9c0..000000000
--- a/apps/api/instrumentation.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-// Uncomment this file to enable instrumentation and observability using OpenTelemetry
-// Refer to the docs for installation instructions: https://docs.medusajs.com/learn/debugging-and-testing/instrumentation
-
-// import { registerOtel } from "@medusajs/medusa"
-// // If using an exporter other than Zipkin, require it here.
-// import { ZipkinExporter } from "@opentelemetry/exporter-zipkin"
-
-// // If using an exporter other than Zipkin, initialize it here.
-// const exporter = new ZipkinExporter({
-// serviceName: 'my-medusa-project',
-// })
-
-// export function register() {
-// registerOtel({
-// serviceName: 'medusajs',
-// // pass exporter
-// exporter,
-// instrument: {
-// http: true,
-// workflows: true,
-// query: true
-// },
-// })
-// }
\ No newline at end of file
diff --git a/apps/api/integration-tests/http/README.md b/apps/api/integration-tests/http/README.md
deleted file mode 100644
index 0451685d1..000000000
--- a/apps/api/integration-tests/http/README.md
+++ /dev/null
@@ -1,29 +0,0 @@
-# Integration Tests
-
-The `medusa-test-utils` package provides utility functions to create integration tests for your API routes and workflows.
-
-For example:
-
-```ts
-import { medusaIntegrationTestRunner } from "medusa-test-utils"
-
-medusaIntegrationTestRunner({
- testSuite: ({ api, getContainer }) => {
- describe("Custom endpoints", () => {
- describe("GET /store/custom", () => {
- it("returns correct message", async () => {
- const response = await api.get(
- `/store/custom`
- )
-
- expect(response.status).toEqual(200)
- expect(response.data).toHaveProperty("message")
- expect(response.data.message).toEqual("Hello, World!")
- })
- })
- })
- }
-})
-```
-
-Learn more in [this documentation](https://docs.medusajs.com/learn/debugging-and-testing/testing-tools/integration-tests).
\ No newline at end of file
diff --git a/apps/api/integration-tests/http/health.spec.ts b/apps/api/integration-tests/http/health.spec.ts
deleted file mode 100644
index 655f98023..000000000
--- a/apps/api/integration-tests/http/health.spec.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-import { medusaIntegrationTestRunner } from "@medusajs/test-utils"
-jest.setTimeout(60 * 1000)
-
-medusaIntegrationTestRunner({
- inApp: true,
- env: {},
- testSuite: ({ api }) => {
- describe("Ping", () => {
- it("ping the server health endpoint", async () => {
- const response = await api.get('/health')
- expect(response.status).toEqual(200)
- })
- })
- },
-})
\ No newline at end of file
diff --git a/apps/api/integration-tests/setup.js b/apps/api/integration-tests/setup.js
deleted file mode 100644
index b4a31f847..000000000
--- a/apps/api/integration-tests/setup.js
+++ /dev/null
@@ -1,3 +0,0 @@
-const { MetadataStorage } = require("@medusajs/framework/mikro-orm/core")
-
-MetadataStorage.clear()
\ No newline at end of file
diff --git a/apps/api/jest.config.js b/apps/api/jest.config.js
deleted file mode 100644
index d53947ef6..000000000
--- a/apps/api/jest.config.js
+++ /dev/null
@@ -1,27 +0,0 @@
-const { loadEnv } = require("@medusajs/utils");
-loadEnv("test", process.cwd());
-
-module.exports = {
- transform: {
- "^.+\\.[jt]s$": [
- "@swc/jest",
- {
- jsc: {
- parser: { syntax: "typescript", decorators: true },
- },
- },
- ],
- },
- testEnvironment: "node",
- moduleFileExtensions: ["js", "ts", "json"],
- modulePathIgnorePatterns: ["dist/", "<rootDir>/.medusa/"],
- setupFiles: ["./integration-tests/setup.js"],
-};
-
-if (process.env.TEST_TYPE === "integration:http") {
- module.exports.testMatch = ["**/integration-tests/http/*.spec.[jt]s"];
-} else if (process.env.TEST_TYPE === "integration:modules") {
- module.exports.testMatch = ["**/src/modules/*/__tests__/**/*.[jt]s"];
-} else if (process.env.TEST_TYPE === "unit") {
- module.exports.testMatch = ["**/src/**/__tests__/**/*.unit.spec.[jt]s"];
-}
diff --git a/apps/api/medusa-config.ts b/apps/api/medusa-config.ts
deleted file mode 100644
index 71f86d8b2..000000000
--- a/apps/api/medusa-config.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-import { loadEnv, defineConfig } from '@medusajs/framework/utils'
-
-loadEnv(process.env.NODE_ENV || 'development', process.cwd())
-
-module.exports = defineConfig({
- admin: {
- },
- projectConfig: {
- databaseUrl: process.env.DATABASE_URL,
- http: {
- storeCors: process.env.STORE_CORS!,
- adminCors: process.env.ADMIN_CORS!,
- authCors: process.env.AUTH_CORS!,
- // @ts-expect-error: vendorCors is not defined in medusa config module
- vendorCors: process.env.VENDOR_CORS!,
- jwtSecret: process.env.JWT_SECRET || "supersecret",
- cookieSecret: process.env.COOKIE_SECRET || "supersecret",
- }
- },
- plugins: [{
- resolve: "@mercurjs/core-plugin",
- options: {}
- }]
-})
diff --git a/apps/api/package.json b/apps/api/package.json
deleted file mode 100644
index ef7eff3b9..000000000
--- a/apps/api/package.json
+++ /dev/null
@@ -1,59 +0,0 @@
-{
- "name": "@acme/api",
- "version": "0.0.1",
- "description": "A starter for Medusa projects.",
- "author": "Medusa (https://medusajs.com)",
- "license": "MIT",
- "keywords": [
- "sqlite",
- "postgres",
- "typescript",
- "ecommerce",
- "headless",
- "medusa"
- ],
- "scripts": {
- "build": "npx @mercurjs/cli@canary codegen && medusa build",
- "seed": "medusa exec ./src/scripts/seed.ts",
- "start": "medusa start",
- "dev:medusa": "medusa develop",
- "dev": "concurrently --kill-others npm:dev:*",
- "dev:codegen": "npx @mercurjs/cli@canary codegen --watch",
- "test:integration:http": "TEST_TYPE=integration:http NODE_OPTIONS=--experimental-vm-modules jest --silent=false --runInBand --forceExit",
- "test:integration:modules": "TEST_TYPE=integration:modules NODE_OPTIONS=--experimental-vm-modules jest --silent=false --runInBand --forceExit",
- "test:unit": "TEST_TYPE=unit NODE_OPTIONS=--experimental-vm-modules jest --silent --runInBand --forceExit"
- },
- "dependencies": {
- "@medusajs/admin-sdk": "^2.13.3",
- "@medusajs/cli": "^2.13.3",
- "@medusajs/framework": "^2.13.3",
- "@medusajs/dashboard": "^2.13.3",
- "@medusajs/admin-shared": "^2.13.3",
- "@medusajs/medusa": "^2.13.3",
- "@medusajs/draft-order": "2.13.3",
- "@mercurjs/core-plugin": "*",
- "@mercurjs/types": "*",
- "zod": "3.25.76"
- },
- "devDependencies": {
- "@medusajs/test-utils": "^2.13.3",
- "@swc/core": "^1.7.28",
- "@swc/jest": "^0.2.36",
- "@types/jest": "^29.5.13",
- "@types/node": "^20.12.11",
- "@types/react": "^18.3.2",
- "@types/react-dom": "^18.2.25",
- "jest": "^29.7.0",
- "prop-types": "^15.8.1",
- "react": "^18.3.1",
- "react-dom": "^18.3.1",
- "ts-node": "^10.9.2",
- "concurrently": "^9.2.1",
- "typescript": "5.9.3",
- "vite": "^5.4.21",
- "yalc": "^1.0.0-pre.53"
- },
- "engines": {
- "node": ">=20"
- }
-}
\ No newline at end of file
diff --git a/apps/api/src/api/README.md b/apps/api/src/api/README.md
deleted file mode 100644
index 46e20920d..000000000
--- a/apps/api/src/api/README.md
+++ /dev/null
@@ -1,135 +0,0 @@
-# Custom API Routes
-
-An API Route is a REST API endpoint.
-
-An API Route is created in a TypeScript or JavaScript file under the `/src/api` directory of your Medusa application. The file’s name must be `route.ts` or `route.js`.
-
-> Learn more about API Routes in [this documentation](https://docs.medusajs.com/learn/fundamentals/api-routes)
-
-For example, to create a `GET` API Route at `/store/hello-world`, create the file `src/api/store/hello-world/route.ts` with the following content:
-
-```ts
-import type { MedusaRequest, MedusaResponse } from "@medusajs/framework/http";
-
-export async function GET(req: MedusaRequest, res: MedusaResponse) {
- res.json({
- message: "Hello world!",
- });
-}
-```
-
-## Supported HTTP methods
-
-The file based routing supports the following HTTP methods:
-
-- GET
-- POST
-- PUT
-- PATCH
-- DELETE
-- OPTIONS
-- HEAD
-
-You can define a handler for each of these methods by exporting a function with the name of the method in the paths `route.ts` file.
-
-For example:
-
-```ts
-import type { MedusaRequest, MedusaResponse } from "@medusajs/framework/http";
-
-export async function GET(req: MedusaRequest, res: MedusaResponse) {
- // Handle GET requests
-}
-
-export async function POST(req: MedusaRequest, res: MedusaResponse) {
- // Handle POST requests
-}
-
-export async function PUT(req: MedusaRequest, res: MedusaResponse) {
- // Handle PUT requests
-}
-```
-
-## Parameters
-
-To create an API route that accepts a path parameter, create a directory within the route's path whose name is of the format `[param]`.
-
-For example, if you want to define a route that takes a `productId` parameter, you can do so by creating a file called `/api/products/[productId]/route.ts`:
-
-```ts
-import type {
- MedusaRequest,
- MedusaResponse,
-} from "@medusajs/framework/http"
-
-export async function GET(req: MedusaRequest, res: MedusaResponse) {
- const { productId } = req.params;
-
- res.json({
- message: `You're looking for product ${productId}`
- })
-}
-```
-
-To create an API route that accepts multiple path parameters, create within the file's path multiple directories whose names are of the format `[param]`.
-
-For example, if you want to define a route that takes both a `productId` and a `variantId` parameter, you can do so by creating a file called `/api/products/[productId]/variants/[variantId]/route.ts`.
-
-## Using the container
-
-The Medusa container is available on `req.scope`. Use it to access modules' main services and other registered resources:
-
-```ts
-import type {
- MedusaRequest,
- MedusaResponse,
-} from "@medusajs/framework/http"
-
-export const GET = async (
- req: MedusaRequest,
- res: MedusaResponse
-) => {
- const productModuleService = req.scope.resolve("product")
-
- const [, count] = await productModuleService.listAndCount()
-
- res.json({
- count,
- })
-}
-```
-
-## Middleware
-
-You can apply middleware to your routes by creating a file called `/api/middlewares.ts`. This file must export a configuration object with what middleware you want to apply to which routes.
-
-For example, if you want to apply a custom middleware function to the `/store/custom` route, you can do so by adding the following to your `/api/middlewares.ts` file:
-
-```ts
-import { defineMiddlewares } from "@medusajs/framework/http"
-import type {
- MedusaRequest,
- MedusaResponse,
- MedusaNextFunction,
-} from "@medusajs/framework/http";
-
-async function logger(
- req: MedusaRequest,
- res: MedusaResponse,
- next: MedusaNextFunction
-) {
- console.log("Request received");
- next();
-}
-
-export default defineMiddlewares({
- routes: [
- {
- matcher: "/store/custom",
- middlewares: [logger],
- },
- ],
-})
-```
-
-The `matcher` property can be either a string or a regular expression. The `middlewares` property accepts an array of middleware functions.
diff --git a/apps/api/src/api/admin/custom/route.ts b/apps/api/src/api/admin/custom/route.ts
deleted file mode 100644
index 9e2e618c3..000000000
--- a/apps/api/src/api/admin/custom/route.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http";
-
-export async function GET(
- req: MedusaRequest,
- res: MedusaResponse
-) {
- res.sendStatus(200);
-}
diff --git a/apps/api/src/api/middlewares.ts b/apps/api/src/api/middlewares.ts
deleted file mode 100644
index 8e54557d4..000000000
--- a/apps/api/src/api/middlewares.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-import { defineMiddlewares } from "@medusajs/medusa";
-
-export default defineMiddlewares({
- routes: [],
-});
\ No newline at end of file
diff --git a/apps/api/src/api/store/custom/route.ts b/apps/api/src/api/store/custom/route.ts
deleted file mode 100644
index 9e2e618c3..000000000
--- a/apps/api/src/api/store/custom/route.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http";
-
-export async function GET(
- req: MedusaRequest,
- res: MedusaResponse
-) {
- res.sendStatus(200);
-}
diff --git a/apps/api/src/jobs/README.md b/apps/api/src/jobs/README.md
deleted file mode 100644
index fc743a10d..000000000
--- a/apps/api/src/jobs/README.md
+++ /dev/null
@@ -1,38 +0,0 @@
-# Custom scheduled jobs
-
-A scheduled job is a function executed at a specified interval of time in the background of your Medusa application.
-
-> Learn more about scheduled jobs in [this documentation](https://docs.medusajs.com/learn/fundamentals/scheduled-jobs).
-
-A scheduled job is created in a TypeScript or JavaScript file under the `src/jobs` directory.
-
-For example, create the file `src/jobs/hello-world.ts` with the following content:
-
-```ts
-import {
- MedusaContainer
-} from "@medusajs/framework/types";
-
-export default async function myCustomJob(container: MedusaContainer) {
- const productService = container.resolve("product")
-
- const products = await productService.listAndCountProducts();
-
- // Do something with the products
-}
-
-export const config = {
- name: "daily-product-report",
- schedule: "0 0 * * *", // Every day at midnight
-};
-```
-
-A scheduled job file must export:
-
-- The function to be executed whenever it’s time to run the scheduled job.
-- A configuration object defining the job. It has three properties:
- - `name`: a unique name for the job.
- - `schedule`: a [cron expression](https://crontab.guru/).
- - `numberOfExecutions`: an optional integer, specifying how many times the job will execute before being removed
-
-The `handler` is a function that accepts one parameter, `container`, which is a `MedusaContainer` instance used to resolve services.
diff --git a/apps/api/src/links/README.md b/apps/api/src/links/README.md
deleted file mode 100644
index 018aa59d1..000000000
--- a/apps/api/src/links/README.md
+++ /dev/null
@@ -1,26 +0,0 @@
-# Module Links
-
-A module link forms an association between two data models of different modules, while maintaining module isolation.
-
-> Learn more about links in [this documentation](https://docs.medusajs.com/learn/fundamentals/module-links)
-
-For example:
-
-```ts
-import BlogModule from "../modules/blog"
-import ProductModule from "@medusajs/medusa/product"
-import { defineLink } from "@medusajs/framework/utils"
-
-export default defineLink(
- ProductModule.linkable.product,
- BlogModule.linkable.post
-)
-```
-
-This defines a link between the Product Module's `product` data model and the Blog Module (custom module)'s `post` data model.
-
-Then, in the Medusa application, run the following command to sync the links to the database:
-
-```bash
-npx medusa db:migrate
-```
\ No newline at end of file
diff --git a/apps/api/src/modules/README.md b/apps/api/src/modules/README.md
deleted file mode 100644
index b85ad1544..000000000
--- a/apps/api/src/modules/README.md
+++ /dev/null
@@ -1,117 +0,0 @@
-# Custom Module
-
-A module is a package of reusable functionalities. It can be integrated into your Medusa application without affecting the overall system. You can create a module as part of a plugin.
-
-> Learn more about modules in [this documentation](https://docs.medusajs.com/learn/fundamentals/modules).
-
-To create a module:
-
-## 1. Create a Data Model
-
-A data model represents a table in the database. You create a data model in a TypeScript or JavaScript file under the `models` directory of a module.
-
-For example, create the file `src/modules/blog/models/post.ts` with the following content:
-
-```ts
-import { model } from "@medusajs/framework/utils"
-
-const Post = model.define("post", {
- id: model.id().primaryKey(),
- title: model.text(),
-})
-
-export default Post
-```
-
-## 2. Create a Service
-
-A module must define a service. A service is a TypeScript or JavaScript class holding methods related to a business logic or commerce functionality.
-
-For example, create the file `src/modules/blog/service.ts` with the following content:
-
-```ts
-import { MedusaService } from "@medusajs/framework/utils"
-import Post from "./models/post"
-
-class BlogModuleService extends MedusaService({
- Post,
-}){
-}
-
-export default BlogModuleService
-```
-
-## 3. Export Module Definition
-
-A module must have an `index.ts` file in its root directory that exports its definition. The definition specifies the main service of the module.
-
-For example, create the file `src/modules/blog/index.ts` with the following content:
-
-```ts
-import BlogModuleService from "./service"
-import { Module } from "@medusajs/framework/utils"
-
-export const BLOG_MODULE = "blog"
-
-export default Module(BLOG_MODULE, {
- service: BlogModuleService,
-})
-```
-
-## 4. Add Module to Medusa's Configurations
-
-To start using the module, add it to `medusa-config.ts`:
-
-```ts
-module.exports = defineConfig({
- projectConfig: {
- // ...
- },
- modules: [
- {
- resolve: "./src/modules/blog",
- },
- ],
-})
-```
-
-## 5. Generate and Run Migrations
-
-To generate migrations for your module, run the following command:
-
-```bash
-npx medusa db:generate blog
-```
-
-Then, to run migrations, run the following command:
-
-```bash
-npx medusa db:migrate
-```
-
-## Use Module
-
-You can use the module in customizations within the Medusa application, such as workflows and API routes.
-
-For example, to use the module in an API route:
-
-```ts
-import { MedusaRequest, MedusaResponse } from "@medusajs/framework"
-import BlogModuleService from "../../../modules/blog/service"
-import { BLOG_MODULE } from "../../../modules/blog"
-
-export async function GET(
- req: MedusaRequest,
- res: MedusaResponse
-): Promise<void> {
- const blogModuleService: BlogModuleService = req.scope.resolve(
- BLOG_MODULE
- )
-
- const posts = await blogModuleService.listPosts()
-
- res.json({
- posts
- })
-}
-```
diff --git a/apps/api/src/scripts/README.md b/apps/api/src/scripts/README.md
deleted file mode 100644
index 8a3efa427..000000000
--- a/apps/api/src/scripts/README.md
+++ /dev/null
@@ -1,63 +0,0 @@
-# Custom CLI Script
-
-A custom CLI script is a function to execute through Medusa's CLI tool. This is useful when creating custom Medusa tooling to run as a CLI tool.
-
-> Learn more about custom CLI scripts in [this documentation](https://docs.medusajs.com/learn/fundamentals/custom-cli-scripts).
-
-## How to Create a Custom CLI Script?
-
-To create a custom CLI script, create a TypeScript or JavaScript file under the `src/scripts` directory. The file must default export a function.
-
-For example, create the file `src/scripts/my-script.ts` with the following content:
-
-```ts title="src/scripts/my-script.ts"
-import {
- ExecArgs,
-} from "@medusajs/framework/types"
-
-export default async function myScript ({
- container
-}: ExecArgs) {
- const productModuleService = container.resolve("product")
-
- const [, count] = await productModuleService.listAndCountProducts()
-
- console.log(`You have ${count} product(s)`)
-}
-```
-
-The function receives as a parameter an object having a `container` property, which is an instance of the Medusa Container. Use it to resolve resources in your Medusa application.
-
----
-
-## How to Run Custom CLI Script?
-
-To run the custom CLI script, run the `exec` command:
-
-```bash
-npx medusa exec ./src/scripts/my-script.ts
-```
-
----
-
-## Custom CLI Script Arguments
-
-Your script can accept arguments from the command line. Arguments are passed to the function's object parameter in the `args` property.
-
-For example:
-
-```ts
-import { ExecArgs } from "@medusajs/framework/types"
-
-export default async function myScript ({
- args
-}: ExecArgs) {
- console.log(`The arguments you passed: ${args}`)
-}
-```
-
-Then, pass the arguments in the `exec` command after the file path:
-
-```bash
-npx medusa exec ./src/scripts/my-script.ts arg1 arg2
-```
\ No newline at end of file
diff --git a/apps/api/src/scripts/seed.ts b/apps/api/src/scripts/seed.ts
deleted file mode 100644
index 55ed271c5..000000000
--- a/apps/api/src/scripts/seed.ts
+++ /dev/null
@@ -1,1094 +0,0 @@
-import {
- CreateInventoryLevelInput,
- ExecArgs,
- IAuthModuleService,
-} from "@medusajs/framework/types";
-import {
- ContainerRegistrationKeys,
- Modules,
- ProductStatus,
-} from "@medusajs/framework/utils";
-import {
- createWorkflow,
- transform,
- WorkflowResponse,
-} from "@medusajs/framework/workflows-sdk";
-import {
- createApiKeysWorkflow,
- createInventoryLevelsWorkflow,
- createProductCategoriesWorkflow,
- createProductsWorkflow,
- createRegionsWorkflow,
- createSalesChannelsWorkflow,
- createShippingOptionsWorkflow,
- createShippingProfilesWorkflow,
- createStockLocationsWorkflow,
- createTaxRegionsWorkflow,
- linkSalesChannelsToApiKeyWorkflow,
- linkSalesChannelsToStockLocationWorkflow,
- updateStoresStep,
- updateStoresWorkflow,
-} from "@medusajs/medusa/core-flows";
-import { ApiKey } from "../../.medusa/types/query-entry-points";
-import { MercurModules } from "@mercurjs/types";
-
-const updateStoreCurrencies = createWorkflow(
- "update-store-currencies",
- (input: {
- supported_currencies: { currency_code: string; is_default?: boolean }[];
- store_id: string;
- }) => {
- const normalizedInput = transform({ input }, (data) => {
- return {
- selector: { id: data.input.store_id },
- update: {
- supported_currencies: data.input.supported_currencies.map(
- (currency) => {
- return {
- currency_code: currency.currency_code,
- is_default: currency.is_default ?? false,
- };
- }
- ),
- },
- };
- });
-
- const stores = updateStoresStep(normalizedInput);
-
- return new WorkflowResponse(stores);
- }
-);
-
-export default async function seedDemoData({ container }: ExecArgs) {
- const logger = container.resolve(ContainerRegistrationKeys.LOGGER);
- const link = container.resolve(ContainerRegistrationKeys.LINK);
- const query = container.resolve(ContainerRegistrationKeys.QUERY);
- const fulfillmentModuleService = container.resolve(Modules.FULFILLMENT);
- const salesChannelModuleService = container.resolve(Modules.SALES_CHANNEL);
- const storeModuleService = container.resolve(Modules.STORE);
-
- const countries = ["gb", "de", "dk", "se", "fr", "es", "it"];
-
- logger.info("Seeding store data...");
- const [store] = await storeModuleService.listStores();
- let defaultSalesChannel = await salesChannelModuleService.listSalesChannels({
- name: "Default Sales Channel",
- });
-
- if (!defaultSalesChannel.length) {
- // create the default sales channel
- const { result: salesChannelResult } = await createSalesChannelsWorkflow(
- container
- ).run({
- input: {
- salesChannelsData: [
- {
- name: "Default Sales Channel",
- },
- ],
- },
- });
- defaultSalesChannel = salesChannelResult;
- }
-
- await updateStoreCurrencies(container).run({
- input: {
- store_id: store.id,
- supported_currencies: [
- {
- currency_code: "eur",
- is_default: true,
- },
- {
- currency_code: "usd",
- },
- ],
- },
- });
-
- await updateStoresWorkflow(container).run({
- input: {
- selector: { id: store.id },
- update: {
- default_sales_channel_id: defaultSalesChannel[0].id,
- },
- },
- });
- logger.info("Seeding region data...");
- const regionModuleService = container.resolve(Modules.REGION);
-
- // Check if any of the countries are already assigned to a region
- const existingRegions = await regionModuleService.listRegions({}, {
- relations: ["countries"],
- });
-
- const assignedCountries = new Set<string>();
- for (const r of existingRegions) {
- for (const c of r.countries || []) {
- assignedCountries.add(c.iso_2);
- }
- }
-
- const unassignedCountries = countries.filter(c => !assignedCountries.has(c));
-
- let region;
- if (unassignedCountries.length === 0) {
- // All countries already assigned - find the region that has most of our countries
- region = existingRegions.find(r =>
- r.countries?.some(c => countries.includes(c.iso_2))
- ) || existingRegions[0];
- logger.info("Countries already assigned to a region, skipping region creation.");
- } else if (unassignedCountries.length < countries.length) {
- // Some countries assigned, some not - only create with unassigned ones
- logger.info(`Some countries already assigned, creating region with: ${unassignedCountries.join(", ")}`);
- const { result: regionResult } = await createRegionsWorkflow(container).run({
- input: {
- regions: [
- {
- name: "Europe",
- currency_code: "eur",
- countries: unassignedCountries,
- payment_providers: ["pp_system_default"],
- },
- ],
- },
- });
- region = regionResult[0];
- } else {
- // No countries assigned - create full region
- const { result: regionResult } = await createRegionsWorkflow(container).run({
- input: {
- regions: [
- {
- name: "Europe",
- currency_code: "eur",
- countries,
- payment_providers: ["pp_system_default"],
- },
- ],
- },
- });
- region = regionResult[0];
- }
- logger.info("Finished seeding regions.");
-
- logger.info("Seeding tax regions...");
- const taxModuleService = container.resolve(Modules.TAX);
- const existingTaxRegions = await taxModuleService.listTaxRegions();
- const existingCountryCodes = new Set(existingTaxRegions.map((tr) => tr.country_code));
- const countriesToCreate = countries.filter((c) => !existingCountryCodes.has(c));
-
- if (countriesToCreate.length > 0) {
- await createTaxRegionsWorkflow(container).run({
- input: countriesToCreate.map((country_code) => ({
- country_code,
- provider_id: "tp_system",
- })),
- });
- } else {
- logger.info("Tax regions already exist, skipping.");
- }
- logger.info("Finished seeding tax regions.");
-
- logger.info("Seeding stock location data...");
- const stockLocationModule = container.resolve(Modules.STOCK_LOCATION);
- const existingStockLocations = await stockLocationModule.listStockLocations({
- name: "European Warehouse",
- });
-
- let stockLocation;
- if (existingStockLocations.length) {
- stockLocation = existingStockLocations[0];
- logger.info("Stock location 'European Warehouse' already exists, skipping.");
- } else {
- const { result: stockLocationResult } = await createStockLocationsWorkflow(
- container
- ).run({
- input: {
- locations: [
- {
- name: "European Warehouse",
- address: {
- city: "Copenhagen",
- country_code: "DK",
- address_1: "",
- },
- },
- ],
- },
- });
- stockLocation = stockLocationResult[0];
- }
-
- await updateStoresWorkflow(container).run({
- input: {
- selector: { id: store.id },
- update: {
- default_location_id: stockLocation.id,
- },
- },
- });
-
- // Link stock location to fulfillment provider (idempotent)
- try {
- await link.create({
- [Modules.STOCK_LOCATION]: {
- stock_location_id: stockLocation.id,
- },
- [Modules.FULFILLMENT]: {
- fulfillment_provider_id: "manual_manual",
- },
- });
- } catch (error: unknown) {
- // Ignore if link already exists
- if (!(error instanceof Error && error.message.includes("already exists"))) {
- throw error;
- }
- logger.info("Stock location already linked to fulfillment provider, skipping.");
- }
-
- logger.info("Seeding fulfillment data...");
- const shippingProfiles = await fulfillmentModuleService.listShippingProfiles({
- type: "default",
- });
- let shippingProfile = shippingProfiles.length ? shippingProfiles[0] : null;
-
- if (!shippingProfile) {
- const { result: shippingProfileResult } =
- await createShippingProfilesWorkflow(container).run({
- input: {
- data: [
- {
- name: "Default Shipping Profile",
- type: "default",
- },
- ],
- },
- });
- shippingProfile = shippingProfileResult[0];
- }
-
- const existingFulfillmentSets = await fulfillmentModuleService.listFulfillmentSets({
- name: "European Warehouse delivery",
- });
-
- let fulfillmentSet;
- if (existingFulfillmentSets.length) {
- fulfillmentSet = existingFulfillmentSets[0];
- logger.info("Fulfillment set 'European Warehouse delivery' already exists, skipping.");
- } else {
- fulfillmentSet = await fulfillmentModuleService.createFulfillmentSets({
- name: "European Warehouse delivery",
- type: "shipping",
- service_zones: [
- {
- name: "Europe",
- geo_zones: [
- {
- country_code: "gb",
- type: "country",
- },
- {
- country_code: "de",
- type: "country",
- },
- {
- country_code: "dk",
- type: "country",
- },
- {
- country_code: "se",
- type: "country",
- },
- {
- country_code: "fr",
- type: "country",
- },
- {
- country_code: "es",
- type: "country",
- },
- {
- country_code: "it",
- type: "country",
- },
- ],
- },
- ],
- });
-
- try {
- await link.create({
- [Modules.STOCK_LOCATION]: {
- stock_location_id: stockLocation.id,
- },
- [Modules.FULFILLMENT]: {
- fulfillment_set_id: fulfillmentSet.id,
- },
- });
- } catch (error: unknown) {
- if (!(error instanceof Error && error.message.includes("already exists"))) {
- throw error;
- }
- }
-
- await createShippingOptionsWorkflow(container).run({
- input: [
- {
- name: "Standard Shipping",
- price_type: "flat",
- provider_id: "manual_manual",
- service_zone_id: fulfillmentSet.service_zones[0].id,
- shipping_profile_id: shippingProfile.id,
- type: {
- label: "Standard",
- description: "Ship in 2-3 days.",
- code: "standard",
- },
- prices: [
- {
- currency_code: "usd",
- amount: 10,
- },
- {
- currency_code: "eur",
- amount: 10,
- },
- {
- region_id: region.id,
- amount: 10,
- },
- ],
- rules: [
- {
- attribute: "enabled_in_store",
- value: "true",
- operator: "eq",
- },
- {
- attribute: "is_return",
- value: "false",
- operator: "eq",
- },
- ],
- },
- {
- name: "Express Shipping",
- price_type: "flat",
- provider_id: "manual_manual",
- service_zone_id: fulfillmentSet.service_zones[0].id,
- shipping_profile_id: shippingProfile.id,
- type: {
- label: "Express",
- description: "Ship in 24 hours.",
- code: "express",
- },
- prices: [
- {
- currency_code: "usd",
- amount: 10,
- },
- {
- currency_code: "eur",
- amount: 10,
- },
- {
- region_id: region.id,
- amount: 10,
- },
- ],
- rules: [
- {
- attribute: "enabled_in_store",
- value: "true",
- operator: "eq",
- },
- {
- attribute: "is_return",
- value: "false",
- operator: "eq",
- },
- ],
- },
- ],
- });
- }
- logger.info("Finished seeding fulfillment data.");
-
- // Link sales channel to stock location (idempotent - workflow handles duplicates)
- try {
- await linkSalesChannelsToStockLocationWorkflow(container).run({
- input: {
- id: stockLocation.id,
- add: [defaultSalesChannel[0].id],
- },
- });
- } catch (error: unknown) {
- // Ignore if link already exists
- if (!(error instanceof Error && error.message.includes("already"))) {
- throw error;
- }
- logger.info("Sales channel already linked to stock location, skipping.");
- }
- logger.info("Finished seeding stock location data.");
-
- logger.info("Seeding publishable API key data...");
- let publishableApiKey: ApiKey | null = null;
- const { data } = await query.graph({
- entity: "api_key",
- fields: ["id"],
- filters: {
- type: "publishable",
- },
- });
-
- publishableApiKey = data?.[0];
-
- if (!publishableApiKey) {
- const {
- result: [publishableApiKeyResult],
- } = await createApiKeysWorkflow(container).run({
- input: {
- api_keys: [
- {
- title: "Webshop",
- type: "publishable",
- created_by: "",
- },
- ],
- },
- });
-
- publishableApiKey = publishableApiKeyResult as ApiKey;
- }
-
- // Link sales channel to API key (idempotent)
- try {
- await linkSalesChannelsToApiKeyWorkflow(container).run({
- input: {
- id: publishableApiKey.id,
- add: [defaultSalesChannel[0].id],
- },
- });
- } catch (error: unknown) {
- // Ignore if link already exists
- if (!(error instanceof Error && error.message.includes("already"))) {
- throw error;
- }
- logger.info("Sales channel already linked to API key, skipping.");
- }
- logger.info("Finished seeding publishable API key data.");
-
- logger.info("Seeding product data...");
-
- const productCategoryModule = container.resolve(Modules.PRODUCT);
- const categoryNames = ["Shirts", "Sweatshirts", "Pants", "Merch"];
- const existingCategories = await productCategoryModule.listProductCategories({
- name: categoryNames,
- });
-
- let categoryResult;
- if (existingCategories.length === categoryNames.length) {
- categoryResult = existingCategories;
- logger.info("Product categories already exist, skipping.");
- } else {
- const categoriesToCreate = categoryNames.filter(
- (name) => !existingCategories.find((c) => c.name === name)
- );
- const { result: newCategories } = await createProductCategoriesWorkflow(
- container
- ).run({
- input: {
- product_categories: categoriesToCreate.map((name) => ({
- name,
- is_active: true,
- })),
- },
- });
- categoryResult = [...existingCategories, ...newCategories];
- }
-
- const productHandles = ["t-shirt", "sweatshirt", "sweatpants", "shorts"];
- const existingProducts = await productCategoryModule.listProducts({
- handle: productHandles,
- });
-
- if (existingProducts.length === productHandles.length) {
- logger.info("Products already exist, skipping.");
- } else {
- await createProductsWorkflow(container).run({
- input: {
- products: [
- {
- title: "Medusa T-Shirt",
- category_ids: [
- categoryResult.find((cat: { name: string }) => cat.name === "Shirts")!.id,
- ],
- description:
- "Reimagine the feeling of a classic T-shirt. With our cotton T-shirts, everyday essentials no longer have to be ordinary.",
- handle: "t-shirt",
- weight: 400,
- status: ProductStatus.PUBLISHED,
- shipping_profile_id: shippingProfile.id,
- images: [
- {
- url: "https://medusa-public-images.s3.eu-west-1.amazonaws.com/tee-black-front.png",
- },
- {
- url: "https://medusa-public-images.s3.eu-west-1.amazonaws.com/tee-black-back.png",
- },
- {
- url: "https://medusa-public-images.s3.eu-west-1.amazonaws.com/tee-white-front.png",
- },
- {
- url: "https://medusa-public-images.s3.eu-west-1.amazonaws.com/tee-white-back.png",
- },
- ],
- options: [
- {
- title: "Size",
- values: ["S", "M", "L", "XL"],
- },
- {
- title: "Color",
- values: ["Black", "White"],
- },
- ],
- variants: [
- {
- title: "S / Black",
- sku: "SHIRT-S-BLACK",
- options: {
- Size: "S",
- Color: "Black",
- },
- prices: [
- {
- amount: 10,
- currency_code: "eur",
- },
- {
- amount: 15,
- currency_code: "usd",
- },
- ],
- },
- {
- title: "S / White",
- sku: "SHIRT-S-WHITE",
- options: {
- Size: "S",
- Color: "White",
- },
- prices: [
- {
- amount: 10,
- currency_code: "eur",
- },
- {
- amount: 15,
- currency_code: "usd",
- },
- ],
- },
- {
- title: "M / Black",
- sku: "SHIRT-M-BLACK",
- options: {
- Size: "M",
- Color: "Black",
- },
- prices: [
- {
- amount: 10,
- currency_code: "eur",
- },
- {
- amount: 15,
- currency_code: "usd",
- },
- ],
- },
- {
- title: "M / White",
- sku: "SHIRT-M-WHITE",
- options: {
- Size: "M",
- Color: "White",
- },
- prices: [
- {
- amount: 10,
- currency_code: "eur",
- },
- {
- amount: 15,
- currency_code: "usd",
- },
- ],
- },
- {
- title: "L / Black",
- sku: "SHIRT-L-BLACK",
- options: {
- Size: "L",
- Color: "Black",
- },
- prices: [
- {
- amount: 10,
- currency_code: "eur",
- },
- {
- amount: 15,
- currency_code: "usd",
- },
- ],
- },
- {
- title: "L / White",
- sku: "SHIRT-L-WHITE",
- options: {
- Size: "L",
- Color: "White",
- },
- prices: [
- {
- amount: 10,
- currency_code: "eur",
- },
- {
- amount: 15,
- currency_code: "usd",
- },
- ],
- },
- {
- title: "XL / Black",
- sku: "SHIRT-XL-BLACK",
- options: {
- Size: "XL",
- Color: "Black",
- },
- prices: [
- {
- amount: 10,
- currency_code: "eur",
- },
- {
- amount: 15,
- currency_code: "usd",
- },
- ],
- },
- {
- title: "XL / White",
- sku: "SHIRT-XL-WHITE",
- options: {
- Size: "XL",
- Color: "White",
- },
- prices: [
- {
- amount: 10,
- currency_code: "eur",
- },
- {
- amount: 15,
- currency_code: "usd",
- },
- ],
- },
- ],
- sales_channels: [
- {
- id: defaultSalesChannel[0].id,
- },
- ],
- },
- {
- title: "Medusa Sweatshirt",
- category_ids: [
- categoryResult.find((cat: { name: string }) => cat.name === "Sweatshirts")!.id,
- ],
- description:
- "Reimagine the feeling of a classic sweatshirt. With our cotton sweatshirt, everyday essentials no longer have to be ordinary.",
- handle: "sweatshirt",
- weight: 400,
- status: ProductStatus.PUBLISHED,
- shipping_profile_id: shippingProfile.id,
- images: [
- {
- url: "https://medusa-public-images.s3.eu-west-1.amazonaws.com/sweatshirt-vintage-front.png",
- },
- {
- url: "https://medusa-public-images.s3.eu-west-1.amazonaws.com/sweatshirt-vintage-back.png",
- },
- ],
- options: [
- {
- title: "Size",
- values: ["S", "M", "L", "XL"],
- },
- ],
- variants: [
- {
- title: "S",
- sku: "SWEATSHIRT-S",
- options: {
- Size: "S",
- },
- prices: [
- {
- amount: 10,
- currency_code: "eur",
- },
- {
- amount: 15,
- currency_code: "usd",
- },
- ],
- },
- {
- title: "M",
- sku: "SWEATSHIRT-M",
- options: {
- Size: "M",
- },
- prices: [
- {
- amount: 10,
- currency_code: "eur",
- },
- {
- amount: 15,
- currency_code: "usd",
- },
- ],
- },
- {
- title: "L",
- sku: "SWEATSHIRT-L",
- options: {
- Size: "L",
- },
- prices: [
- {
- amount: 10,
- currency_code: "eur",
- },
- {
- amount: 15,
- currency_code: "usd",
- },
- ],
- },
- {
- title: "XL",
- sku: "SWEATSHIRT-XL",
- options: {
- Size: "XL",
- },
- prices: [
- {
- amount: 10,
- currency_code: "eur",
- },
- {
- amount: 15,
- currency_code: "usd",
- },
- ],
- },
- ],
- sales_channels: [
- {
- id: defaultSalesChannel[0].id,
- },
- ],
- },
- {
- title: "Medusa Sweatpants",
- category_ids: [
- categoryResult.find((cat: { name: string }) => cat.name === "Pants")!.id,
- ],
- description:
- "Reimagine the feeling of classic sweatpants. With our cotton sweatpants, everyday essentials no longer have to be ordinary.",
- handle: "sweatpants",
- weight: 400,
- status: ProductStatus.PUBLISHED,
- shipping_profile_id: shippingProfile.id,
- images: [
- {
- url: "https://medusa-public-images.s3.eu-west-1.amazonaws.com/sweatpants-gray-front.png",
- },
- {
- url: "https://medusa-public-images.s3.eu-west-1.amazonaws.com/sweatpants-gray-back.png",
- },
- ],
- options: [
- {
- title: "Size",
- values: ["S", "M", "L", "XL"],
- },
- ],
- variants: [
- {
- title: "S",
- sku: "SWEATPANTS-S",
- options: {
- Size: "S",
- },
- prices: [
- {
- amount: 10,
- currency_code: "eur",
- },
- {
- amount: 15,
- currency_code: "usd",
- },
- ],
- },
- {
- title: "M",
- sku: "SWEATPANTS-M",
- options: {
- Size: "M",
- },
- prices: [
- {
- amount: 10,
- currency_code: "eur",
- },
- {
- amount: 15,
- currency_code: "usd",
- },
- ],
- },
- {
- title: "L",
- sku: "SWEATPANTS-L",
- options: {
- Size: "L",
- },
- prices: [
- {
- amount: 10,
- currency_code: "eur",
- },
- {
- amount: 15,
- currency_code: "usd",
- },
- ],
- },
- {
- title: "XL",
- sku: "SWEATPANTS-XL",
- options: {
- Size: "XL",
- },
- prices: [
- {
- amount: 10,
- currency_code: "eur",
- },
- {
- amount: 15,
- currency_code: "usd",
- },
- ],
- },
- ],
- sales_channels: [
- {
- id: defaultSalesChannel[0].id,
- },
- ],
- },
- {
- title: "Medusa Shorts",
- category_ids: [
- categoryResult.find((cat: { name: string }) => cat.name === "Merch")!.id,
- ],
- description:
- "Reimagine the feeling of classic shorts. With our cotton shorts, everyday essentials no longer have to be ordinary.",
- handle: "shorts",
- weight: 400,
- status: ProductStatus.PUBLISHED,
- shipping_profile_id: shippingProfile.id,
- images: [
- {
- url: "https://medusa-public-images.s3.eu-west-1.amazonaws.com/shorts-vintage-front.png",
- },
- {
- url: "https://medusa-public-images.s3.eu-west-1.amazonaws.com/shorts-vintage-back.png",
- },
- ],
- options: [
- {
- title: "Size",
- values: ["S", "M", "L", "XL"],
- },
- ],
- variants: [
- {
- title: "S",
- sku: "SHORTS-S",
- options: {
- Size: "S",
- },
- prices: [
- {
- amount: 10,
- currency_code: "eur",
- },
- {
- amount: 15,
- currency_code: "usd",
- },
- ],
- },
- {
- title: "M",
- sku: "SHORTS-M",
- options: {
- Size: "M",
- },
- prices: [
- {
- amount: 10,
- currency_code: "eur",
- },
- {
- amount: 15,
- currency_code: "usd",
- },
- ],
- },
- {
- title: "L",
- sku: "SHORTS-L",
- options: {
- Size: "L",
- },
- prices: [
- {
- amount: 10,
- currency_code: "eur",
- },
- {
- amount: 15,
- currency_code: "usd",
- },
- ],
- },
- {
- title: "XL",
- sku: "SHORTS-XL",
- options: {
- Size: "XL",
- },
- prices: [
- {
- amount: 10,
- currency_code: "eur",
- },
- {
- amount: 15,
- currency_code: "usd",
- },
- ],
- },
- ],
- sales_channels: [
- {
- id: defaultSalesChannel[0].id,
- },
- ],
- },
- ],
- },
- });
- }
- logger.info("Finished seeding product data.");
-
- logger.info("Seeding inventory levels.");
-
- const { data: inventoryItems } = await query.graph({
- entity: "inventory_item",
- fields: ["id"],
- });
-
- const inventoryModule = container.resolve(Modules.INVENTORY);
- const existingLevels = await inventoryModule.listInventoryLevels({
- location_id: stockLocation.id,
- });
- const existingItemIds = new Set(existingLevels.map((l) => l.inventory_item_id));
-
- const inventoryLevels: CreateInventoryLevelInput[] = [];
- for (const inventoryItem of inventoryItems) {
- if (!existingItemIds.has(inventoryItem.id)) {
- const inventoryLevel = {
- location_id: stockLocation.
- id,
- stocked_quantity: 1000000,
- inventory_item_id: inventoryItem.id,
- };
- inventoryLevels.push(inventoryLevel);
- }
- }
-
- if (inventoryLevels.length > 0) {
- await createInventoryLevelsWorkflow(container).run({
- input: {
- inventory_levels: inventoryLevels,
- },
- });
- } else {
- logger.info("Inventory levels already exist, skipping.");
- }
-
- logger.info("Finished seeding inventory levels data.");
-
- logger.info("Seeding seller data...");
- const sellerEmail = "[email protected]";
- const sellerModule = container.resolve(MercurModules.SELLER)
- const authModule: IAuthModuleService = container.resolve(Modules.AUTH);
-
- const existingSellers = await sellerModule.listSellers({
- email: sellerEmail,
- });
-
- if (existingSellers.length) {
- logger.info("Seller already exists, skipping.");
- } else {
- const seller = await sellerModule.createSellers({
- name: "Test Seller",
- email: sellerEmail,
- });
-
- const authResult = await authModule.register("emailpass", {
- body: { email: sellerEmail, password: "supersecret" },
- });
-
- if (!authResult.success || !authResult.authIdentity) {
- throw new Error(
- `Failed to register seller auth identity: ${authResult.error}`
- );
- }
-
- await authModule.updateAuthIdentities({
- id: authResult.authIdentity.id,
- app_metadata: {
- seller_id: seller.id,
- },
- });
-
- logger.info("Seller created with email: [email protected] / password: supersecret");
- }
- logger.info("Finished seeding seller data.");
-}
diff --git a/apps/api/src/subscribers/README.md b/apps/api/src/subscribers/README.md
deleted file mode 100644
index b1b6ad64f..000000000
--- a/apps/api/src/subscribers/README.md
+++ /dev/null
@@ -1,61 +0,0 @@
-# Custom subscribers
-
-Subscribers handle events emitted in the Medusa application.
-
-> Learn more about Subscribers in [this documentation](https://docs.medusajs.com/learn/fundamentals/events-and-subscribers).
-
-The subscriber is created in a TypeScript or JavaScript file under the `src/subscribers` directory.
-
-For example, create the file `src/subscribers/product-created.ts` with the following content:
-
-```ts
-import {
- type SubscriberConfig,
-} from "@medusajs/framework"
-
-// subscriber function
-export default async function productCreateHandler() {
- console.log("A product was created")
-}
-
-// subscriber config
-export const config: SubscriberConfig = {
- event: "product.created",
-}
-```
-
-A subscriber file must export:
-
-- The subscriber function that is an asynchronous function executed whenever the associated event is triggered.
-- A configuration object defining the event this subscriber is listening to.
-
-## Subscriber Parameters
-
-A subscriber receives an object having the following properties:
-
-- `event`: An object holding the event's details. It has a `data` property, which is the event's data payload.
-- `container`: The Medusa container. Use it to resolve modules' main services and other registered resources.
-
-```ts
-import type {
- SubscriberArgs,
- SubscriberConfig,
-} from "@medusajs/framework"
-
-export default async function productCreateHandler({
- event: { data },
- container,
-}: SubscriberArgs<{ id: string }>) {
- const productId = data.id
-
- const productModuleService = container.resolve("product")
-
- const product = await productModuleService.retrieveProduct(productId)
-
- console.log(`The product ${product.title} was created`)
-}
-
-export const config: SubscriberConfig = {
- event: "product.created",
-}
-```
\ No newline at end of file
diff --git a/apps/api/src/workflows/README.md b/apps/api/src/workflows/README.md
deleted file mode 100644
index 24d7e1ab1..000000000
--- a/apps/api/src/workflows/README.md
+++ /dev/null
@@ -1,81 +0,0 @@
-# Custom Workflows
-
-A workflow is a series of queries and actions that complete a task.
-
-The workflow is created in a TypeScript or JavaScript file under the `src/workflows` directory.
-
-> Learn more about workflows in [this documentation](https://docs.medusajs.com/learn/fundamentals/workflows).
-
-For example:
-
-```ts
-import {
- createStep,
- createWorkflow,
- WorkflowResponse,
- StepResponse,
-} from "@medusajs/framework/workflows-sdk"
-
-const step1 = createStep("step-1", async () => {
- return new StepResponse(`Hello from step one!`)
-})
-
-type WorkflowInput = {
- name: string
-}
-
-const step2 = createStep(
- "step-2",
- async ({ name }: WorkflowInput) => {
- return new StepResponse(`Hello ${name} from step two!`)
- }
-)
-
-type WorkflowOutput = {
- message1: string
- message2: string
-}
-
-const helloWorldWorkflow = createWorkflow(
- "hello-world",
- (input: WorkflowInput) => {
- const greeting1 = step1()
- const greeting2 = step2(input)
-
- return new WorkflowResponse({
- message1: greeting1,
- message2: greeting2
- })
- }
-)
-
-export default helloWorldWorkflow
-```
-
-## Execute Workflow
-
-You can execute the workflow from other resources, such as API routes, scheduled jobs, or subscribers.
-
-For example, to execute the workflow in an API route:
-
-```ts
-import type {
- MedusaRequest,
- MedusaResponse,
-} from "@medusajs/framework"
-import myWorkflow from "../../../workflows/hello-world"
-
-export async function GET(
- req: MedusaRequest,
- res: MedusaResponse
-) {
- const { result } = await myWorkflow(req.scope)
- .run({
- input: {
- name: req.query.name as string,
- },
- })
-
- res.send(result)
-}
-```
diff --git a/apps/api/tsconfig.json b/apps/api/tsconfig.json
deleted file mode 100644
index 27bc845bf..000000000
--- a/apps/api/tsconfig.json
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- "compilerOptions": {
- "target": "ES2021",
- "esModuleInterop": true,
- "module": "Node16",
- "moduleResolution": "Node16",
- "emitDecoratorMetadata": true,
- "experimentalDecorators": true,
- "skipLibCheck": true,
- "skipDefaultLibCheck": true,
- "declaration": false,
- "sourceMap": false,
- "inlineSourceMap": true,
- "outDir": "./.medusa/server",
- "rootDir": "./",
- "jsx": "react-jsx",
- "forceConsistentCasingInFileNames": true,
- "resolveJsonModule": true,
- "checkJs": false,
- "strictNullChecks": true
- },
- "ts-node": {
- "swc": true
- },
- "include": [
- "**/*",
- ".medusa/types/*"
- ],
- "exclude": [
- "node_modules",
- ".medusa/server",
- ".medusa/admin",
- ".cache"
- ]
-}
diff --git a/packages/admin/src/pages/orders/order-detail/components/order-activity-section/order-timeline.tsx b/packages/admin/src/pages/orders/order-detail/components/order-activity-section/order-timeline.tsx
index 367246f37..a0213479c 100644
--- a/packages/admin/src/pages/orders/order-detail/components/order-activity-section/order-timeline.tsx
+++ b/packages/admin/src/pages/orders/order-detail/components/order-activity-section/order-timeline.tsx
@@ -30,7 +30,6 @@ import { useCancelReturn, useReturns } from "../../../../../hooks/api/returns";
import { useDate } from "../../../../../hooks/use-date";
import { getFormattedAddress } from "../../../../../lib/addresses";
import { getStylizedAmount } from "../../../../../lib/money-amount-helpers";
-import { getDisplayFulfillmentItems } from "../../../../../lib/order-item";
import { getPaymentsFromOrder } from "../../../../../lib/orders";
import ActivityItems from "./activity-items";
import ChangeDetailsTooltip from "./change-details-tooltip";
@@ -765,10 +764,10 @@ const FulfillmentCreatedBody = ({
}) => {
const { t } = useTranslation();
- const numberOfItems = getDisplayFulfillmentItems(
- fulfillment.items || [],
- itemsMap,
- ).reduce((acc, item) => acc + item.quantity, 0);
+ const numberOfItems = (fulfillment.items || []).reduce(
+ (acc, item) => acc + item.quantity,
+ 0,
+ );
return (
<div>