chore: add missing since and featureFlag tags (#13926)
This commit is contained in:
1 parent
604ff55a5b
commit
0fd9f27ca5
17 files changed
+50
-2
No files matched your search
@@ -149,6 +149,9 @@ decorators:
|
|||||||
- StoreGiftCardInvitation
|
- StoreGiftCardInvitation
|
||||||
StoreTransactionGroup:
|
StoreTransactionGroup:
|
||||||
- StoreStoreCreditAccount
|
- StoreStoreCreditAccount
|
||||||
|
AdminProductImage:
|
||||||
|
- AdminProduct
|
||||||
|
- AdminProductVariant
|
||||||
theme:
|
theme:
|
||||||
openapi:
|
openapi:
|
||||||
theme:
|
theme:
|
||||||
|
|||||||
@@ -7,6 +7,8 @@ export const addImageToVariantsStepId = "add-image-to-variants"
|
|||||||
/**
|
/**
|
||||||
* This step adds an image to one or more product variants.
|
* This step adds an image to one or more product variants.
|
||||||
*
|
*
|
||||||
|
* @since 2.11.2
|
||||||
|
*
|
||||||
* @example
|
* @example
|
||||||
* const data = addImageToVariantsStep({
|
* const data = addImageToVariantsStep({
|
||||||
* image_id: "img_123",
|
* image_id: "img_123",
|
||||||
|
|||||||
@@ -7,6 +7,8 @@ export const addImagesToVariantStepId = "add-images-to-variant"
|
|||||||
/**
|
/**
|
||||||
* This step adds one or more images to a product variant.
|
* This step adds one or more images to a product variant.
|
||||||
*
|
*
|
||||||
|
* @since 2.11.2
|
||||||
|
*
|
||||||
* @example
|
* @example
|
||||||
* const data = addImagesToVariantStep({
|
* const data = addImagesToVariantStep({
|
||||||
* variant_id: "variant_123",
|
* variant_id: "variant_123",
|
||||||
|
|||||||
@@ -7,6 +7,8 @@ export const removeImageFromVariantsStepId = "remove-image-from-variants"
|
|||||||
/**
|
/**
|
||||||
* This step removes an image from one or more product variants.
|
* This step removes an image from one or more product variants.
|
||||||
*
|
*
|
||||||
|
* @since 2.11.2
|
||||||
|
*
|
||||||
* @example
|
* @example
|
||||||
* const data = removeImageFromVariantsStep({
|
* const data = removeImageFromVariantsStep({
|
||||||
* image_id: "img_123",
|
* image_id: "img_123",
|
||||||
|
|||||||
@@ -7,6 +7,8 @@ export const removeImagesFromVariantStepId = "remove-images-from-variant"
|
|||||||
/**
|
/**
|
||||||
* This step removes one or more images from a product variant.
|
* This step removes one or more images from a product variant.
|
||||||
*
|
*
|
||||||
|
* @since 2.11.2
|
||||||
|
*
|
||||||
* @example
|
* @example
|
||||||
* const data = removeImagesFromVariantStep({
|
* const data = removeImagesFromVariantStep({
|
||||||
* variant_id: "variant_123",
|
* variant_id: "variant_123",
|
||||||
|
|||||||
@@ -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.
|
* 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.
|
* 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
|
* @example
|
||||||
* const { result } = await batchImageVariantsWorkflow(container)
|
* const { result } = await batchImageVariantsWorkflow(container)
|
||||||
* .run({
|
* .run({
|
||||||
|
|||||||
@@ -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.
|
* 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.
|
* 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
|
* @example
|
||||||
* const { result } = await batchVariantImagesWorkflow(container)
|
* const { result } = await batchVariantImagesWorkflow(container)
|
||||||
* .run({
|
* .run({
|
||||||
|
|||||||
@@ -1081,6 +1081,8 @@ export class Product {
|
|||||||
* [Batch Image Variants](https://docs.medusajs.com/api/admin#products_postproductsidimagesimage_idvariantsbatch)
|
* [Batch Image Variants](https://docs.medusajs.com/api/admin#products_postproductsidimagesimage_idvariantsbatch)
|
||||||
* API route.
|
* API route.
|
||||||
*
|
*
|
||||||
|
* @since 2.11.2
|
||||||
|
*
|
||||||
* @param productId - The product's ID.
|
* @param productId - The product's ID.
|
||||||
* @param imageId - The image's ID.
|
* @param imageId - The image's ID.
|
||||||
* @param body - The variants to add or remove from the image.
|
* @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)
|
* [Batch Variant Images](https://docs.medusajs.com/api/admin#products_postproductsidvariantsvariant_idimagesbatch)
|
||||||
* API route.
|
* API route.
|
||||||
*
|
*
|
||||||
|
* @since 2.11.2
|
||||||
|
*
|
||||||
* @param productId - The product's ID.
|
* @param productId - The product's ID.
|
||||||
* @param variantId - The variant's ID.
|
* @param variantId - The variant's ID.
|
||||||
* @param body - The images to add or remove from the variant.
|
* @param body - The images to add or remove from the variant.
|
||||||
|
|||||||
@@ -4,8 +4,9 @@ import { Modules } from "@medusajs/framework/utils"
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the index information for all entities that are indexed and their sync state
|
* 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 (
|
export const GET = async (
|
||||||
req: AuthenticatedMedusaRequest<void>,
|
req: AuthenticatedMedusaRequest<void>,
|
||||||
|
|||||||
@@ -2,6 +2,10 @@ import { AuthenticatedMedusaRequest, MedusaResponse } from "@medusajs/framework"
|
|||||||
import { HttpTypes } from "@medusajs/framework/types"
|
import { HttpTypes } from "@medusajs/framework/types"
|
||||||
import { Modules } from "@medusajs/framework/utils"
|
import { Modules } from "@medusajs/framework/utils"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @since 2.11.2
|
||||||
|
* @featureFlag index
|
||||||
|
*/
|
||||||
export const POST = async (
|
export const POST = async (
|
||||||
req: AuthenticatedMedusaRequest<HttpTypes.AdminIndexSyncPayload>,
|
req: AuthenticatedMedusaRequest<HttpTypes.AdminIndexSyncPayload>,
|
||||||
res: MedusaResponse
|
res: MedusaResponse
|
||||||
|
|||||||
@@ -5,6 +5,9 @@ import {
|
|||||||
} from "@medusajs/framework/http"
|
} from "@medusajs/framework/http"
|
||||||
import { HttpTypes } from "@medusajs/framework/types"
|
import { HttpTypes } from "@medusajs/framework/types"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @since 2.11.2
|
||||||
|
*/
|
||||||
export const POST = async (
|
export const POST = async (
|
||||||
req: AuthenticatedMedusaRequest<HttpTypes.AdminBatchImageVariantRequest>,
|
req: AuthenticatedMedusaRequest<HttpTypes.AdminBatchImageVariantRequest>,
|
||||||
res: MedusaResponse<HttpTypes.AdminBatchImageVariantResponse>
|
res: MedusaResponse<HttpTypes.AdminBatchImageVariantResponse>
|
||||||
|
|||||||
+3
@@ -5,6 +5,9 @@ import {
|
|||||||
} from "@medusajs/framework/http"
|
} from "@medusajs/framework/http"
|
||||||
import { HttpTypes } from "@medusajs/framework/types"
|
import { HttpTypes } from "@medusajs/framework/types"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @since 2.11.2
|
||||||
|
*/
|
||||||
export const POST = async (
|
export const POST = async (
|
||||||
req: AuthenticatedMedusaRequest<HttpTypes.AdminBatchVariantImagesRequest>,
|
req: AuthenticatedMedusaRequest<HttpTypes.AdminBatchVariantImagesRequest>,
|
||||||
res: MedusaResponse<HttpTypes.AdminBatchVariantImagesResponse>
|
res: MedusaResponse<HttpTypes.AdminBatchVariantImagesResponse>
|
||||||
|
|||||||
@@ -17,6 +17,9 @@ type StoreVariantRetrieveRequest =
|
|||||||
StoreRequestWithContext<HttpTypes.StoreProductVariantParams> &
|
StoreRequestWithContext<HttpTypes.StoreProductVariantParams> &
|
||||||
AuthenticatedMedusaRequest<StoreProductVariantParamsType>
|
AuthenticatedMedusaRequest<StoreProductVariantParamsType>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @since 2.11.2
|
||||||
|
*/
|
||||||
export const GET = async (
|
export const GET = async (
|
||||||
req: StoreVariantRetrieveRequest,
|
req: StoreVariantRetrieveRequest,
|
||||||
res: MedusaResponse<HttpTypes.StoreProductVariantResponse>
|
res: MedusaResponse<HttpTypes.StoreProductVariantResponse>
|
||||||
|
|||||||
@@ -15,6 +15,9 @@ type StoreVariantListRequest =
|
|||||||
StoreRequestWithContext<HttpTypes.StoreProductVariantParams> &
|
StoreRequestWithContext<HttpTypes.StoreProductVariantParams> &
|
||||||
AuthenticatedMedusaRequest<HttpTypes.StoreProductVariantParams>
|
AuthenticatedMedusaRequest<HttpTypes.StoreProductVariantParams>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @since 2.11.2
|
||||||
|
*/
|
||||||
export const GET = async (
|
export const GET = async (
|
||||||
req: StoreVariantListRequest,
|
req: StoreVariantListRequest,
|
||||||
res: MedusaResponse<HttpTypes.StoreProductVariantListResponse>
|
res: MedusaResponse<HttpTypes.StoreProductVariantListResponse>
|
||||||
|
|||||||
@@ -14,6 +14,9 @@ const ProductImage = model
|
|||||||
product: model.belongsTo(() => Product, {
|
product: model.belongsTo(() => Product, {
|
||||||
mappedBy: "images",
|
mappedBy: "images",
|
||||||
}),
|
}),
|
||||||
|
/**
|
||||||
|
* @since 2.11.2
|
||||||
|
*/
|
||||||
variants: model.manyToMany(() => ProductVariant, {
|
variants: model.manyToMany(() => ProductVariant, {
|
||||||
mappedBy: "images",
|
mappedBy: "images",
|
||||||
pivotEntity: () => ProductVariantProductImage,
|
pivotEntity: () => ProductVariantProductImage,
|
||||||
|
|||||||
@@ -2,6 +2,9 @@ import { model } from "@medusajs/framework/utils"
|
|||||||
import ProductVariant from "./product-variant"
|
import ProductVariant from "./product-variant"
|
||||||
import ProductImage from "./product-image"
|
import ProductImage from "./product-image"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @since 2.11.2
|
||||||
|
*/
|
||||||
const ProductVariantProductImage = model.define("ProductVariantProductImage", {
|
const ProductVariantProductImage = model.define("ProductVariantProductImage", {
|
||||||
id: model.id({ prefix: "pvpi" }).primaryKey(),
|
id: model.id({ prefix: "pvpi" }).primaryKey(),
|
||||||
variant: model.belongsTo(() => ProductVariant, {
|
variant: model.belongsTo(() => ProductVariant, {
|
||||||
|
|||||||
@@ -22,6 +22,9 @@ const ProductVariant = model
|
|||||||
width: model.number().nullable(),
|
width: model.number().nullable(),
|
||||||
metadata: model.json().nullable(),
|
metadata: model.json().nullable(),
|
||||||
variant_rank: model.number().default(0).nullable(),
|
variant_rank: model.number().default(0).nullable(),
|
||||||
|
/**
|
||||||
|
* @since 2.11.2
|
||||||
|
*/
|
||||||
thumbnail: model.text().nullable(),
|
thumbnail: model.text().nullable(),
|
||||||
product: model
|
product: model
|
||||||
.belongsTo(() => Product, {
|
.belongsTo(() => Product, {
|
||||||
@@ -29,6 +32,9 @@ const ProductVariant = model
|
|||||||
})
|
})
|
||||||
.searchable()
|
.searchable()
|
||||||
.nullable(),
|
.nullable(),
|
||||||
|
/**
|
||||||
|
* @since 2.11.2
|
||||||
|
*/
|
||||||
images: model.manyToMany(() => ProductImage, {
|
images: model.manyToMany(() => ProductImage, {
|
||||||
mappedBy: "variants",
|
mappedBy: "variants",
|
||||||
pivotEntity: () => ProductVariantProductImage,
|
pivotEntity: () => ProductVariantProductImage,
|
||||||
|
|||||||
Reference in new issue
Block a user