chore: add missing since and featureFlag tags (#13926)

This commit is contained in:
Shahed Nasser
2025-10-31 16:17:19 +02:00
committed by GitHub
parent 604ff55a5b
commit 0fd9f27ca5
17 changed files with 50 additions and 2 deletions

View File

@@ -149,6 +149,9 @@ decorators:
- StoreGiftCardInvitation
StoreTransactionGroup:
- StoreStoreCreditAccount
AdminProductImage:
- AdminProduct
- AdminProductVariant
theme:
openapi:
theme:

View File

@@ -7,6 +7,8 @@ export const addImageToVariantsStepId = "add-image-to-variants"
/**
* This step adds an image to one or more product variants.
*
* @since 2.11.2
*
* @example
* const data = addImageToVariantsStep({
* image_id: "img_123",

View File

@@ -7,6 +7,8 @@ export const addImagesToVariantStepId = "add-images-to-variant"
/**
* This step adds one or more images to a product variant.
*
* @since 2.11.2
*
* @example
* const data = addImagesToVariantStep({
* variant_id: "variant_123",

View File

@@ -7,6 +7,8 @@ export const removeImageFromVariantsStepId = "remove-image-from-variants"
/**
* This step removes an image from one or more product variants.
*
* @since 2.11.2
*
* @example
* const data = removeImageFromVariantsStep({
* image_id: "img_123",

View File

@@ -7,6 +7,8 @@ export const removeImagesFromVariantStepId = "remove-images-from-variant"
/**
* This step removes one or more images from a product variant.
*
* @since 2.11.2
*
* @example
* const data = removeImagesFromVariantStep({
* variant_id: "variant_123",

View File

@@ -55,6 +55,8 @@ export const batchImageVariantsWorkflowId = "batch-image-variants"
* You can use this workflow within your own customizations or custom workflows to manage image-variant associations in bulk.
* This is also useful when writing a [seed script](https://docs.medusajs.com/learn/fundamentals/custom-cli-scripts/seed-data) or a custom import script.
*
* @since 2.11.2
*
* @example
* const { result } = await batchImageVariantsWorkflow(container)
* .run({

View File

@@ -55,6 +55,8 @@ export const batchVariantImagesWorkflowId = "batch-variant-images"
* You can use this workflow within your own customizations or custom workflows to manage variant-image associations in bulk.
* This is also useful when writing a [seed script](https://docs.medusajs.com/learn/fundamentals/custom-cli-scripts/seed-data) or a custom import script.
*
* @since 2.11.2
*
* @example
* const { result } = await batchVariantImagesWorkflow(container)
* .run({

View File

@@ -1081,6 +1081,8 @@ export class Product {
* [Batch Image Variants](https://docs.medusajs.com/api/admin#products_postproductsidimagesimage_idvariantsbatch)
* API route.
*
* @since 2.11.2
*
* @param productId - The product's ID.
* @param imageId - The image's ID.
* @param body - The variants to add or remove from the image.
@@ -1117,6 +1119,8 @@ export class Product {
* [Batch Variant Images](https://docs.medusajs.com/api/admin#products_postproductsidvariantsvariant_idimagesbatch)
* API route.
*
* @since 2.11.2
*
* @param productId - The product's ID.
* @param variantId - The variant's ID.
* @param body - The images to add or remove from the variant.

View File

@@ -4,8 +4,9 @@ import { Modules } from "@medusajs/framework/utils"
/**
* Get the index information for all entities that are indexed and their sync state
* @param req
* @param res
*
* @since 2.11.2
* @featureFlag index
*/
export const GET = async (
req: AuthenticatedMedusaRequest<void>,

View File

@@ -2,6 +2,10 @@ import { AuthenticatedMedusaRequest, MedusaResponse } from "@medusajs/framework"
import { HttpTypes } from "@medusajs/framework/types"
import { Modules } from "@medusajs/framework/utils"
/**
* @since 2.11.2
* @featureFlag index
*/
export const POST = async (
req: AuthenticatedMedusaRequest<HttpTypes.AdminIndexSyncPayload>,
res: MedusaResponse

View File

@@ -5,6 +5,9 @@ import {
} from "@medusajs/framework/http"
import { HttpTypes } from "@medusajs/framework/types"
/**
* @since 2.11.2
*/
export const POST = async (
req: AuthenticatedMedusaRequest<HttpTypes.AdminBatchImageVariantRequest>,
res: MedusaResponse<HttpTypes.AdminBatchImageVariantResponse>

View File

@@ -5,6 +5,9 @@ import {
} from "@medusajs/framework/http"
import { HttpTypes } from "@medusajs/framework/types"
/**
* @since 2.11.2
*/
export const POST = async (
req: AuthenticatedMedusaRequest<HttpTypes.AdminBatchVariantImagesRequest>,
res: MedusaResponse<HttpTypes.AdminBatchVariantImagesResponse>

View File

@@ -17,6 +17,9 @@ type StoreVariantRetrieveRequest =
StoreRequestWithContext<HttpTypes.StoreProductVariantParams> &
AuthenticatedMedusaRequest<StoreProductVariantParamsType>
/**
* @since 2.11.2
*/
export const GET = async (
req: StoreVariantRetrieveRequest,
res: MedusaResponse<HttpTypes.StoreProductVariantResponse>

View File

@@ -15,6 +15,9 @@ type StoreVariantListRequest =
StoreRequestWithContext<HttpTypes.StoreProductVariantParams> &
AuthenticatedMedusaRequest<HttpTypes.StoreProductVariantParams>
/**
* @since 2.11.2
*/
export const GET = async (
req: StoreVariantListRequest,
res: MedusaResponse<HttpTypes.StoreProductVariantListResponse>

View File

@@ -14,6 +14,9 @@ const ProductImage = model
product: model.belongsTo(() => Product, {
mappedBy: "images",
}),
/**
* @since 2.11.2
*/
variants: model.manyToMany(() => ProductVariant, {
mappedBy: "images",
pivotEntity: () => ProductVariantProductImage,

View File

@@ -2,6 +2,9 @@ import { model } from "@medusajs/framework/utils"
import ProductVariant from "./product-variant"
import ProductImage from "./product-image"
/**
* @since 2.11.2
*/
const ProductVariantProductImage = model.define("ProductVariantProductImage", {
id: model.id({ prefix: "pvpi" }).primaryKey(),
variant: model.belongsTo(() => ProductVariant, {

View File

@@ -22,6 +22,9 @@ const ProductVariant = model
width: model.number().nullable(),
metadata: model.json().nullable(),
variant_rank: model.number().default(0).nullable(),
/**
* @since 2.11.2
*/
thumbnail: model.text().nullable(),
product: model
.belongsTo(() => Product, {
@@ -29,6 +32,9 @@ const ProductVariant = model
})
.searchable()
.nullable(),
/**
* @since 2.11.2
*/
images: model.manyToMany(() => ProductImage, {
mappedBy: "variants",
pivotEntity: () => ProductVariantProductImage,