docs: rename remoteLink and remoteQueryConfig (#10836)

* docs: rename remoteLink and remoteQueryConfig

* change version number
This commit is contained in:
Shahed Nasser
2025-01-07 14:43:12 +02:00
committed by GitHub
parent f5f4d417c0
commit 38223e5104
28 changed files with 223 additions and 212 deletions
+15 -15
View File
@@ -1784,7 +1784,7 @@ export default defineLink(
Then, to set the custom column when creating or updating a link between records:
```ts
await remoteLink.create({
await link.create({
[Modules.PRODUCT]: {
product_id: "123",
},
@@ -1819,7 +1819,7 @@ Learn more in [this documentation](!docs!/learn/fundamentals/module-links/custom
### Create Link Between Records
To create a link between two records using remote link:
To create a link between two records using Link:
```ts
import { Modules } from "@medusajs/framework/utils"
@@ -1827,7 +1827,7 @@ import { HELLO_MODULE } from "../../modules/hello"
// ...
await remoteLink.create({
await link.create({
[Modules.PRODUCT]: {
product_id: "prod_123",
},
@@ -1837,11 +1837,11 @@ await remoteLink.create({
})
```
Learn more in [this documentation](!docs!/learn/fundamentals/module-links/remote-link#create-link).
Learn more in [this documentation](!docs!/learn/fundamentals/module-links/link#create-link).
### Dismiss Link Between Records
To dismiss links between records using remote link:
To dismiss links between records using Link:
```ts
import { Modules } from "@medusajs/framework/utils"
@@ -1849,7 +1849,7 @@ import { HELLO_MODULE } from "../../modules/hello"
// ...
await remoteLink.dismiss({
await link.dismiss({
[Modules.PRODUCT]: {
product_id: "prod_123",
},
@@ -1859,7 +1859,7 @@ await remoteLink.dismiss({
})
```
Learn more in [this documentation](!docs!/learn/fundamentals/module-links/remote-link#dismiss-link).
Learn more in [this documentation](!docs!/learn/fundamentals/module-links/link#dismiss-link).
### Cascade Delete Linked Records
@@ -1872,14 +1872,14 @@ import { Modules } from "@medusajs/framework/utils"
await productModuleService.deleteVariants([variant.id])
await remoteLink.delete({
await link.delete({
[Modules.PRODUCT]: {
product_id: "prod_123",
},
})
```
Learn more in [this documentation](!docs!/learn/fundamentals/module-links/remote-link#cascade-delete-linked-records).
Learn more in [this documentation](!docs!/learn/fundamentals/module-links/link#cascade-delete-linked-records).
### Restore Linked Records
@@ -1892,14 +1892,14 @@ import { Modules } from "@medusajs/framework/utils"
await productModuleService.restoreProducts(["prod_123"])
await remoteLink.restore({
await link.restore({
[Modules.PRODUCT]: {
product_id: "prod_123",
},
})
```
Learn more in [this documentation](!docs!/learn/fundamentals/module-links/remote-link#restore-linked-records).
Learn more in [this documentation](!docs!/learn/fundamentals/module-links/link#restore-linked-records).
---
@@ -3703,13 +3703,13 @@ const paymentCollection =
amount: 5000,
})
// resolve the remote link
const remoteLink = container.resolve(
ContainerRegistrationKeys
// resolve Link
const link = container.resolve(
ContainerRegistrationKeys.LINK
)
// create a link between the cart and payment collection
remoteLink.create({
link.create({
[Modules.CART]: {
cart_id: "cart_123",
},