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
@@ -5,17 +5,17 @@ import { createStep, StepResponse } from "@medusajs/framework/workflows-sdk"
export const createLinksStepId = "create-remote-links" 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 * @example
* createRemoteLinkStep([{ * createRemoteLinkStep([{
* [Modules.PRODUCT]: { * [Modules.PRODUCT]: {
* product_id: "prod_123", * product_id: "prod_123",
* }, * },
* "helloModuleService": { * blog: {
* my_custom_id: "mc_123", * post_id: "post_123",
* }, * },
* }]) * }])
*/ */
@@ -9,17 +9,17 @@ export type DismissRemoteLinksStepInput = LinkDefinition | LinkDefinition[]
// TODO: add ability for this step to restore links from only foreign keys // TODO: add ability for this step to restore links from only foreign keys
export const dismissRemoteLinkStepId = "dismiss-remote-links" 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 * @example
* dismissRemoteLinkStep([{ * dismissRemoteLinkStep([{
* [Modules.PRODUCT]: { * [Modules.PRODUCT]: {
* product_id: "prod_123", * product_id: "prod_123",
* }, * },
* "helloModuleService": { * blog: {
* my_custom_id: "mc_123", * post_id: "post_123",
* }, * },
* }]) * }])
*/ */
@@ -7,9 +7,9 @@ type RemoveRemoteLinksStepInput = DeleteEntityInput | DeleteEntityInput[]
export const removeRemoteLinkStepId = "remove-remote-links" 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 * @example
* removeRemoteLinkStep([{ * removeRemoteLinkStep([{
@@ -8,9 +8,10 @@ import { StepResponse, createStep } from "@medusajs/framework/workflows-sdk"
export const updateRemoteLinksStepId = "update-remote-links-step" 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 * @example
* const data = updateRemoteLinksStep([ * const data = updateRemoteLinksStep([
@@ -18,8 +19,8 @@ export const updateRemoteLinksStepId = "update-remote-links-step"
* [Modules.PRODUCT]: { * [Modules.PRODUCT]: {
* product_id: "prod_321", * product_id: "prod_321",
* }, * },
* "helloModuleService": { * blog: {
* my_custom_id: "mc_321", * post_id: "post_321",
* }, * },
* data: { * data: {
* metadata: { * metadata: {