docs: docs for next release (#13621)

* docs: docs for next release

* changes to opentelemetry dependencies

* document plugin env variables

* document admin changes

* fix vale error

* add version notes

* document campaign budget updates

* document campaign changes in user guide

* document chages in cluster mode cli

* documented once promotion allocation

* document multiple API keys support
This commit is contained in:
Shahed Nasser
2025-10-21 10:32:08 +03:00
committed by GitHub
parent f38f0f9aca
commit ed715813a5
54 changed files with 1621 additions and 252 deletions
@@ -36,6 +36,12 @@ This reference assumes you've already resolved the data model repository, as exp
## Create Records
<Note>
As of [Medusa v2.11.0](https://github.com/medusajs/medusa/releases/tag/v2.11.0), MikroORM dependencies are included in the `@medusajs/framework` package. If you're using an older version of Medusa, change the import statement to `@mikro-orm/knex`.
</Note>
```ts
import {
InjectTransactionManager,
@@ -43,7 +49,7 @@ import {
MedusaService,
} from "@medusajs/framework/utils"
import { Context, InferTypeOf, DAL } from "@medusajs/framework/types"
import { EntityManager } from "@mikro-orm/knex"
import { EntityManager } from "@medusajs/framework/@mikro-orm/knex"
import Post from "./models/post"
class BlogModuleService extends MedusaService({
@@ -35,6 +35,12 @@ This reference assumes you've already resolved the data model repository, as exp
## Delete Record by ID
<Note>
As of [Medusa v2.11.0](https://github.com/medusajs/medusa/releases/tag/v2.11.0), MikroORM dependencies are included in the `@medusajs/framework` package. If you're using an older version of Medusa, change the import statement to `@mikro-orm/knex`.
</Note>
```ts
import {
InjectTransactionManager,
@@ -42,7 +48,7 @@ import {
MedusaService,
} from "@medusajs/framework/utils"
import { Context, InferTypeOf, DAL } from "@medusajs/framework/types"
import { EntityManager } from "@mikro-orm/knex"
import { EntityManager } from "@medusajs/framework/@mikro-orm/knex"
import Post from "./models/post"
class BlogModuleService extends MedusaService({
@@ -92,7 +98,7 @@ import {
MedusaService,
} from "@medusajs/framework/utils"
import { Context, InferTypeOf, DAL } from "@medusajs/framework/types"
import { EntityManager } from "@mikro-orm/knex"
import { EntityManager } from "@medusajs/framework/@mikro-orm/knex"
import Post from "./models/post"
class BlogModuleService extends MedusaService({
@@ -106,7 +106,7 @@ import {
MedusaService,
} from "@medusajs/framework/utils"
import { Context, InferTypeOf, DAL } from "@medusajs/framework/types"
import { EntityManager } from "@mikro-orm/knex"
import { EntityManager } from "@medusajs/framework/@mikro-orm/knex"
import Post from "./models/post"
class BlogModuleService extends MedusaService({
@@ -149,7 +149,7 @@ import {
MedusaService,
} from "@medusajs/framework/utils"
import { Context, InferTypeOf, DAL } from "@medusajs/framework/types"
import { EntityManager } from "@mikro-orm/knex"
import { EntityManager } from "@medusajs/framework/@mikro-orm/knex"
import Post from "./models/post"
class BlogModuleService extends MedusaService({
@@ -213,7 +213,7 @@ import {
MedusaService,
} from "@medusajs/framework/utils"
import { Context, InferTypeOf, DAL } from "@medusajs/framework/types"
import { EntityManager } from "@mikro-orm/knex"
import { EntityManager } from "@medusajs/framework/@mikro-orm/knex"
import Post from "./models/post"
class BlogModuleService extends MedusaService({
@@ -285,7 +285,7 @@ import {
MedusaService,
} from "@medusajs/framework/utils"
import { Context, InferTypeOf, DAL } from "@medusajs/framework/types"
import { EntityManager } from "@mikro-orm/knex"
import { EntityManager } from "@medusajs/framework/@mikro-orm/knex"
import Post from "./models/post"
class BlogModuleService extends MedusaService({
@@ -349,7 +349,7 @@ import {
MedusaService,
} from "@medusajs/framework/utils"
import { Context, InferTypeOf, DAL } from "@medusajs/framework/types"
import { EntityManager } from "@mikro-orm/knex"
import { EntityManager } from "@medusajs/framework/@mikro-orm/knex"
import Post from "./models/post"
class BlogModuleService extends MedusaService({
@@ -403,6 +403,12 @@ The method returns an array of records. The number of records is less than or eq
## Sort Records
<Note>
As of [Medusa v2.11.0](https://github.com/medusajs/medusa/releases/tag/v2.11.0), MikroORM dependencies are included in the `@medusajs/framework` package. If you're using an older version of Medusa, change the import statement to `@mikro-orm/knex`.
</Note>
```ts title="src/modules/blog/service.ts"
import {
InjectTransactionManager,
@@ -410,7 +416,7 @@ import {
MedusaService,
} from "@medusajs/framework/utils"
import { Context, InferTypeOf, DAL } from "@medusajs/framework/types"
import { EntityManager } from "@mikro-orm/knex"
import { EntityManager } from "@medusajs/framework/@mikro-orm/knex"
import Post from "./models/post"
class BlogModuleService extends MedusaService({
@@ -99,6 +99,12 @@ This reference assumes you've already resolved the data model repository, as exp
To retrieve a list of records matching a set of filters, use the `findAndCount` method of the data model repository:
<Note>
As of [Medusa v2.11.0](https://github.com/medusajs/medusa/releases/tag/v2.11.0), MikroORM dependencies are included in the `@medusajs/framework` package. If you're using an older version of Medusa, change the import statement to `@mikro-orm/knex`.
</Note>
```ts title="src/modules/blog/service.ts"
import {
InjectTransactionManager,
@@ -106,7 +112,7 @@ import {
MedusaService,
} from "@medusajs/framework/utils"
import { Context, InferTypeOf, DAL } from "@medusajs/framework/types"
import { EntityManager } from "@mikro-orm/knex"
import { EntityManager } from "@medusajs/framework/@mikro-orm/knex"
import Post from "./models/post"
class BlogModuleService extends MedusaService({
@@ -156,7 +162,7 @@ import {
MedusaService,
} from "@medusajs/framework/utils"
import { Context, InferTypeOf, DAL } from "@medusajs/framework/types"
import { EntityManager } from "@mikro-orm/knex"
import { EntityManager } from "@medusajs/framework/@mikro-orm/knex"
import Post from "./models/post"
class BlogModuleService extends MedusaService({
@@ -226,7 +232,7 @@ import {
MedusaService,
} from "@medusajs/framework/utils"
import { Context, InferTypeOf, DAL } from "@medusajs/framework/types"
import { EntityManager } from "@mikro-orm/knex"
import { EntityManager } from "@medusajs/framework/@mikro-orm/knex"
import Post from "./models/post"
class BlogModuleService extends MedusaService({
@@ -306,7 +312,7 @@ import {
MedusaService,
} from "@medusajs/framework/utils"
import { Context, InferTypeOf, DAL } from "@medusajs/framework/types"
import { EntityManager } from "@mikro-orm/knex"
import { EntityManager } from "@medusajs/framework/@mikro-orm/knex"
import Post from "./models/post"
class BlogModuleService extends MedusaService({
@@ -378,7 +384,7 @@ import {
MedusaService,
} from "@medusajs/framework/utils"
import { Context, InferTypeOf, DAL } from "@medusajs/framework/types"
import { EntityManager } from "@mikro-orm/knex"
import { EntityManager } from "@medusajs/framework/@mikro-orm/knex"
import Post from "./models/post"
class BlogModuleService extends MedusaService({
@@ -439,7 +445,7 @@ import {
MedusaService,
} from "@medusajs/framework/utils"
import { Context, InferTypeOf, DAL } from "@medusajs/framework/types"
import { EntityManager } from "@mikro-orm/knex"
import { EntityManager } from "@medusajs/framework/@mikro-orm/knex"
import Post from "./models/post"
class BlogModuleService extends MedusaService({
@@ -37,6 +37,12 @@ This reference assumes you've already resolved the data model repository, as exp
## Restore Record by ID
<Note>
As of [Medusa v2.11.0](https://github.com/medusajs/medusa/releases/tag/v2.11.0), MikroORM dependencies are included in the `@medusajs/framework` package. If you're using an older version of Medusa, change the import statement to `@mikro-orm/knex`.
</Note>
```ts
import {
InjectTransactionManager,
@@ -44,7 +50,7 @@ import {
MedusaService,
} from "@medusajs/framework/utils"
import { Context, InferTypeOf, DAL } from "@medusajs/framework/types"
import { EntityManager } from "@mikro-orm/knex"
import { EntityManager } from "@medusajs/framework/@mikro-orm/knex"
import Post from "./models/post"
class BlogModuleService extends MedusaService({
@@ -140,7 +146,7 @@ import {
MedusaService,
} from "@medusajs/framework/utils"
import { Context, InferTypeOf, DAL } from "@medusajs/framework/types"
import { EntityManager } from "@mikro-orm/knex"
import { EntityManager } from "@medusajs/framework/@mikro-orm/knex"
import Post from "./models/post"
class BlogModuleService extends MedusaService({
@@ -236,7 +242,7 @@ import {
MedusaService,
} from "@medusajs/framework/utils"
import { Context, InferTypeOf, DAL } from "@medusajs/framework/types"
import { EntityManager } from "@mikro-orm/knex"
import { EntityManager } from "@medusajs/framework/@mikro-orm/knex"
import Post from "./models/post"
class BlogModuleService extends MedusaService({
@@ -39,6 +39,12 @@ This reference assumes you've already resolved the data model repository, as exp
## Soft-Delete Record by ID
<Note>
As of [Medusa v2.11.0](https://github.com/medusajs/medusa/releases/tag/v2.11.0), MikroORM dependencies are included in the `@medusajs/framework` package. If you're using an older version of Medusa, change the import statement to `@mikro-orm/knex`.
</Note>
```ts
import {
InjectTransactionManager,
@@ -46,7 +52,7 @@ import {
MedusaService,
} from "@medusajs/framework/utils"
import { Context, InferTypeOf, DAL } from "@medusajs/framework/types"
import { EntityManager } from "@mikro-orm/knex"
import { EntityManager } from "@medusajs/framework/@mikro-orm/knex"
import Post from "./models/post"
class BlogModuleService extends MedusaService({
@@ -142,7 +148,7 @@ import {
MedusaService,
} from "@medusajs/framework/utils"
import { Context, InferTypeOf, DAL } from "@medusajs/framework/types"
import { EntityManager } from "@mikro-orm/knex"
import { EntityManager } from "@medusajs/framework/@mikro-orm/knex"
import Post from "./models/post"
class BlogModuleService extends MedusaService({
@@ -238,7 +244,7 @@ import {
MedusaService,
} from "@medusajs/framework/utils"
import { Context, InferTypeOf, DAL } from "@medusajs/framework/types"
import { EntityManager } from "@mikro-orm/knex"
import { EntityManager } from "@medusajs/framework/@mikro-orm/knex"
import Post from "./models/post"
class BlogModuleService extends MedusaService({
@@ -50,6 +50,12 @@ This reference assumes you've already resolved the data model repository, as exp
## Update Records
<Note>
As of [Medusa v2.11.0](https://github.com/medusajs/medusa/releases/tag/v2.11.0), MikroORM dependencies are included in the `@medusajs/framework` package. If you're using an older version of Medusa, change the import statement to `@mikro-orm/knex`.
</Note>
```ts
import {
InjectTransactionManager,
@@ -57,7 +63,7 @@ import {
MedusaService,
} from "@medusajs/framework/utils"
import { Context, InferTypeOf, DAL } from "@medusajs/framework/types"
import { EntityManager } from "@mikro-orm/knex"
import { EntityManager } from "@medusajs/framework/@mikro-orm/knex"
import Post from "./models/post"
class BlogModuleService extends MedusaService({
@@ -35,6 +35,12 @@ This reference assumes you've already resolved the data model repository, as exp
## Upsert Records
<Note>
As of [Medusa v2.11.0](https://github.com/medusajs/medusa/releases/tag/v2.11.0), MikroORM dependencies are included in the `@medusajs/framework` package. If you're using an older version of Medusa, change the import statement to `@mikro-orm/knex`.
</Note>
```ts
import {
InjectTransactionManager,
@@ -42,7 +48,7 @@ import {
MedusaService,
} from "@medusajs/framework/utils"
import { Context, InferTypeOf, DAL } from "@medusajs/framework/types"
import { EntityManager } from "@mikro-orm/knex"
import { EntityManager } from "@medusajs/framework/@mikro-orm/knex"
import Post from "./models/post"
class BlogModuleService extends MedusaService({
@@ -41,6 +41,12 @@ This reference assumes you've already resolved the data model repository, as exp
## Upsert Records
<Note>
As of [Medusa v2.11.0](https://github.com/medusajs/medusa/releases/tag/v2.11.0), MikroORM dependencies are included in the `@medusajs/framework` package. If you're using an older version of Medusa, change the import statement to `@mikro-orm/knex`.
</Note>
```ts
import {
InjectTransactionManager,
@@ -48,7 +54,7 @@ import {
MedusaService,
} from "@medusajs/framework/utils"
import { Context, InferTypeOf, DAL } from "@medusajs/framework/types"
import { EntityManager } from "@mikro-orm/knex"
import { EntityManager } from "@medusajs/framework/@mikro-orm/knex"
import Post from "./models/post"
class BlogModuleService extends MedusaService({