chore: improvements of TSDocs of link steps (#14261)

This commit is contained in:
Shahed Nasser
2025-12-09 16:59:15 +02:00
committed by GitHub
parent 0084460765
commit cc84b9ac49
4 changed files with 15 additions and 14 deletions

View File

@@ -5,17 +5,17 @@ import { createStep, StepResponse } from "@medusajs/framework/workflows-sdk"
export const createLinksStepId = "create-remote-links"
/**
* This step creates remote links between two records of linked data models.
* This step creates links between two records of linked data models.
*
* Learn more in the [Remote Link documentation.](https://docs.medusajs.com/learn/fundamentals/module-links/remote-link#create-link).
* Learn more in the [Link documentation.](https://docs.medusajs.com/learn/fundamentals/module-links/link#create-link).
*
* @example
* createRemoteLinkStep([{
* [Modules.PRODUCT]: {
* product_id: "prod_123",
* },
* "helloModuleService": {
* my_custom_id: "mc_123",
* blog: {
* post_id: "post_123",
* },
* }])
*/

View File

@@ -9,17 +9,17 @@ export type DismissRemoteLinksStepInput = LinkDefinition | LinkDefinition[]
// TODO: add ability for this step to restore links from only foreign keys
export const dismissRemoteLinkStepId = "dismiss-remote-links"
/**
* This step removes remote links between two records of linked data models.
* This step removes links between two records of linked data models.
*
* Learn more in the [Remote Link documentation.](https://docs.medusajs.com/learn/fundamentals/module-links/remote-link#dismiss-link).
* Learn more in the [Link documentation.](https://docs.medusajs.com/learn/fundamentals/module-links/link#dismiss-link).
*
* @example
* dismissRemoteLinkStep([{
* [Modules.PRODUCT]: {
* product_id: "prod_123",
* },
* "helloModuleService": {
* my_custom_id: "mc_123",
* blog: {
* post_id: "post_123",
* },
* }])
*/

View File

@@ -7,9 +7,9 @@ type RemoveRemoteLinksStepInput = DeleteEntityInput | DeleteEntityInput[]
export const removeRemoteLinkStepId = "remove-remote-links"
/**
* This step deletes linked records of a record.
* This step deletes linked records of a record if cascade deletion is enabled.
*
* Learn more in the [Remote Link documentation](https://docs.medusajs.com/learn/fundamentals/module-links/remote-link#cascade-delete-linked-records)
* Learn more in the [Link documentation](https://docs.medusajs.com/learn/fundamentals/module-links/link#cascade-delete-linked-records)
*
* @example
* removeRemoteLinkStep([{

View File

@@ -8,9 +8,10 @@ import { StepResponse, createStep } from "@medusajs/framework/workflows-sdk"
export const updateRemoteLinksStepId = "update-remote-links-step"
/**
* This step updates remote links between two records of linked data models.
* This step updates links between two records of linked data models. This is useful to update
* links with additional data such as metadata.
*
* Learn more in the [Remote Link documentation.](https://docs.medusajs.com/learn/fundamentals/module-links/remote-link#create-link).
* Learn more in the [Link documentation.](https://docs.medusajs.com/learn/fundamentals/module-links/link#update-links).
*
* @example
* const data = updateRemoteLinksStep([
@@ -18,8 +19,8 @@ export const updateRemoteLinksStepId = "update-remote-links-step"
* [Modules.PRODUCT]: {
* product_id: "prod_321",
* },
* "helloModuleService": {
* my_custom_id: "mc_321",
* blog: {
* post_id: "post_321",
* },
* data: {
* metadata: {