chore(core-flows,modules-sdk): add TSDocs to helper steps (#8355)

This commit is contained in:
Shahed Nasser
2024-07-30 18:59:02 +03:00
committed by GitHub
parent 1066499402
commit 848d0892d9
6 changed files with 223 additions and 4 deletions

View File

@@ -9,11 +9,22 @@ import { MedusaModule } from "./medusa-module"
import { convertRecordsToLinkDefinition } from "./utils/convert-data-to-link-definition"
import { linkingErrorMessage } from "./utils/linking-error"
/**
* The details of a data model's record whose linked records should be deleted. Usually used after the
* data model's record is deleted.
*
* The key is the data model's name. Its value is an object that has the ID of the data model's record.
*/
export type DeleteEntityInput = {
[moduleName: string | Modules]: Record<string, string | string[]>
}
export type RestoreEntityInput = DeleteEntityInput
/**
* A link for two records of linked data models.
*
* The keys are the names of each module, and their value is an object that holds the ID of the linked data model's record.
*/
export type LinkDefinition = {
[moduleName: string]: {
// TODO: changing this to any temporarily as the "data" attribute is not being picked up correctly