docs: rename remoteLink and remoteQueryConfig (#10836)

* docs: rename remoteLink and remoteQueryConfig

* change version number
This commit is contained in:
Shahed Nasser authored and GitHub committed 2025-01-07 14:43:12 +02:00
1 parent f5f4d417c0
commit 38223e5104
28 files changed
+223 -212

No files matched your search

@@ -65,19 +65,19 @@ const { data: apiKeys } = useQueryGraphStep({
</CodeTab>
</CodeTabs>
### Manage with Remote Link
### Manage with Link
To manage the sales channels of an API key, use [Remote Link](!docs!/learn/fundamentals/module-links/remote-link):
To manage the sales channels of an API key, use [Link](!docs!/learn/fundamentals/module-links/link):
<CodeTabs group="relation-link">
<CodeTab label="remoteLink.create" value="method">
<CodeTab label="link.create" value="method">
```ts
import { Modules } from "@medusajs/framework/utils"
// ...
await remoteLink.create({
await link.create({
[Modules.API_KEY]: {
api_key_id: "apk_123",
},
@@ -121,19 +121,19 @@ const { data: carts } = useQueryGraphStep({
</CodeTab>
</CodeTabs>
### Manage with Remote Link
### Manage with Link
To manage the order of a cart, use [Remote Link](!docs!/learn/fundamentals/module-links/remote-link):
To manage the order of a cart, use [Link](!docs!/learn/fundamentals/module-links/link):
<CodeTabs group="relation-link">
<CodeTab label="remoteLink.create" value="method">
<CodeTab label="link.create" value="method">
```ts
import { Modules } from "@medusajs/framework/utils"
// ...
await remoteLink.create({
await link.create({
[Modules.CART]: {
cart_id: "cart_123",
},
@@ -214,19 +214,19 @@ const { data: carts } = useQueryGraphStep({
</CodeTab>
</CodeTabs>
### Manage with Remote Link
### Manage with Link
To manage the payment collection of a cart, use [Remote Link](!docs!/learn/fundamentals/module-links/remote-link):
To manage the payment collection of a cart, use [Link](!docs!/learn/fundamentals/module-links/link):
<CodeTabs group="relation-link">
<CodeTab label="remoteLink.create" value="method">
<CodeTab label="link.create" value="method">
```ts
import { Modules } from "@medusajs/framework/utils"
// ...
await remoteLink.create({
await link.create({
[Modules.CART]: {
cart_id: "cart_123",
},
@@ -368,19 +368,19 @@ const { data: carts } = useQueryGraphStep({
</CodeTab>
</CodeTabs>
### Manage with Remote Link
### Manage with Link
To manage the promotions of a cart, use [Remote Link](!docs!/learn/fundamentals/module-links/remote-link):
To manage the promotions of a cart, use [Link](!docs!/learn/fundamentals/module-links/link):
<CodeTabs group="relation-link">
<CodeTab label="remoteLink.create" value="method">
<CodeTab label="link.create" value="method">
```ts
import { Modules } from "@medusajs/framework/utils"
// ...
await remoteLink.create({
await link.create({
[Modules.CART]: {
cart_id: "cart_123",
},
@@ -77,19 +77,19 @@ const { data: fulfillments } = useQueryGraphStep({
</CodeTab>
</CodeTabs>
### Manage with Remote Link
### Manage with Link
To manage the order of a cart, use [Remote Link](!docs!/learn/fundamentals/module-links/remote-link):
To manage the order of a cart, use [Link](!docs!/learn/fundamentals/module-links/link):
<CodeTabs group="relation-link">
<CodeTab label="remoteLink.create" value="method">
<CodeTab label="link.create" value="method">
```ts
import { Modules } from "@medusajs/framework/utils"
// ...
await remoteLink.create({
await link.create({
[Modules.ORDER]: {
order_id: "order_123",
},
@@ -170,19 +170,19 @@ const { data: shippingOptions } = useQueryGraphStep({
</CodeTab>
</CodeTabs>
### Manage with Remote Link
### Manage with Link
To manage the price set of a shipping option, use [Remote Link](!docs!/learn/fundamentals/module-links/remote-link):
To manage the price set of a shipping option, use [Link](!docs!/learn/fundamentals/module-links/link):
<CodeTabs group="relation-link">
<CodeTab label="remoteLink.create" value="method">
<CodeTab label="link.create" value="method">
```ts
import { Modules } from "@medusajs/framework/utils"
// ...
await remoteLink.create({
await link.create({
[Modules.FULFILLMENT]: {
shipping_option_id: "so_123",
},
@@ -273,19 +273,19 @@ const { data: fulfillmentSets } = useQueryGraphStep({
</CodeTab>
</CodeTabs>
### Manage with Remote Link
### Manage with Link
To manage the stock location of a fulfillment set, use [Remote Link](!docs!/learn/fundamentals/module-links/remote-link):
To manage the stock location of a fulfillment set, use [Link](!docs!/learn/fundamentals/module-links/link):
<CodeTabs group="relation-link">
<CodeTab label="remoteLink.create" value="method">
<CodeTab label="link.create" value="method">
```ts
import { Modules } from "@medusajs/framework/utils"
// ...
await remoteLink.create({
await link.create({
[Modules.STOCK_LOCATION]: {
stock_location_id: "sloc_123",
},
@@ -70,19 +70,19 @@ const { data: inventoryItems } = useQueryGraphStep({
</CodeTab>
</CodeTabs>
### Manage with Remote Link
### Manage with Link
To manage the variants of an inventory item, use [Remote Link](!docs!/learn/fundamentals/module-links/remote-link):
To manage the variants of an inventory item, use [Link](!docs!/learn/fundamentals/module-links/link):
<CodeTabs group="relation-link">
<CodeTab label="remoteLink.create" value="method">
<CodeTab label="link.create" value="method">
```ts
import { Modules } from "@medusajs/framework/utils"
// ...
await remoteLink.create({
await link.create({
[Modules.PRODUCT]: {
variant_id: "variant_123",
},
@@ -124,19 +124,19 @@ const { data: orders } = useQueryGraphStep({
</CodeTab>
</CodeTabs>
### Manage with Remote Link
### Manage with Link
To manage the cart of an order, use [Remote Link](!docs!/learn/fundamentals/module-links/remote-link):
To manage the cart of an order, use [Link](!docs!/learn/fundamentals/module-links/link):
<CodeTabs group="relation-link">
<CodeTab label="remoteLink.create" value="method">
<CodeTab label="link.create" value="method">
```ts
import { Modules } from "@medusajs/framework/utils"
// ...
await remoteLink.create({
await link.create({
[Modules.ORDER]: {
order_id: "order_123",
},
@@ -225,19 +225,19 @@ const { data: orders } = useQueryGraphStep({
</CodeTab>
</CodeTabs>
### Manage with Remote Link
### Manage with Link
To manage the fulfillments of an order, use [Remote Link](!docs!/learn/fundamentals/module-links/remote-link):
To manage the fulfillments of an order, use [Link](!docs!/learn/fundamentals/module-links/link):
<CodeTabs group="relation-link">
<CodeTab label="remoteLink.create" value="method">
<CodeTab label="link.create" value="method">
```ts
import { Modules } from "@medusajs/framework/utils"
// ...
await remoteLink.create({
await link.create({
[Modules.ORDER]: {
order_id: "order_123",
},
@@ -318,19 +318,19 @@ const { data: orders } = useQueryGraphStep({
</CodeTab>
</CodeTabs>
### Manage with Remote Link
### Manage with Link
To manage the payment collections of an order, use [Remote Link](!docs!/learn/fundamentals/module-links/remote-link):
To manage the payment collections of an order, use [Link](!docs!/learn/fundamentals/module-links/link):
<CodeTabs group="relation-link">
<CodeTab label="remoteLink.create" value="method">
<CodeTab label="link.create" value="method">
```ts
import { Modules } from "@medusajs/framework/utils"
// ...
await remoteLink.create({
await link.create({
[Modules.ORDER]: {
order_id: "order_123",
},
@@ -463,19 +463,19 @@ const { data: orders } = useQueryGraphStep({
</CodeTab>
</CodeTabs>
### Manage with Remote Link
### Manage with Link
To manage the promotion of an order, use [Remote Link](!docs!/learn/fundamentals/module-links/remote-link):
To manage the promotion of an order, use [Link](!docs!/learn/fundamentals/module-links/link):
<CodeTabs group="relation-link">
<CodeTab label="remoteLink.create" value="method">
<CodeTab label="link.create" value="method">
```ts
import { Modules } from "@medusajs/framework/utils"
// ...
await remoteLink.create({
await link.create({
[Modules.ORDER]: {
order_id: "order_123",
},
@@ -67,19 +67,19 @@ const { data: paymentCollections } = useQueryGraphStep({
</CodeTab>
</CodeTabs>
### Manage with Remote Link
### Manage with Link
To manage the payment collection of a cart, use [Remote Link](!docs!/learn/fundamentals/module-links/remote-link):
To manage the payment collection of a cart, use [Link](!docs!/learn/fundamentals/module-links/link):
<CodeTabs group="relation-link">
<CodeTab label="remoteLink.create" value="method">
<CodeTab label="link.create" value="method">
```ts
import { Modules } from "@medusajs/framework/utils"
// ...
await remoteLink.create({
await link.create({
[Modules.CART]: {
cart_id: "cart_123",
},
@@ -159,19 +159,19 @@ const { data: paymentCollections } = useQueryGraphStep({
</CodeTab>
</CodeTabs>
### Manage with Remote Link
### Manage with Link
To manage the payment collections of an order, use [Remote Link](!docs!/learn/fundamentals/module-links/remote-link):
To manage the payment collections of an order, use [Link](!docs!/learn/fundamentals/module-links/link):
<CodeTabs group="relation-link">
<CodeTab label="remoteLink.create" value="method">
<CodeTab label="link.create" value="method">
```ts
import { Modules } from "@medusajs/framework/utils"
// ...
await remoteLink.create({
await link.create({
[Modules.ORDER]: {
order_id: "order_123",
},
@@ -252,19 +252,19 @@ const { data: paymentProviders } = useQueryGraphStep({
</CodeTab>
</CodeTabs>
### Manage with Remote Link
### Manage with Link
To manage the payment providers in a region, use [Remote Link](!docs!/learn/fundamentals/module-links/remote-link):
To manage the payment providers in a region, use [Link](!docs!/learn/fundamentals/module-links/link):
<CodeTabs group="relation-link">
<CodeTab label="remoteLink.create" value="method">
<CodeTab label="link.create" value="method">
```ts
import { Modules } from "@medusajs/framework/utils"
// ...
await remoteLink.create({
await link.create({
[Modules.REGION]: {
region_id: "reg_123",
},
@@ -49,12 +49,12 @@ import {
// ...
// resolve the remote link
const remoteLink = container.resolve(
ContainerRegistrationKeys
// resolve Link
const link = container.resolve(
ContainerRegistrationKeys.LINK
)
remoteLink.create({
link.create({
[Modules.CART]: {
cart_id: "cart_123",
},
@@ -66,7 +66,7 @@ remoteLink.create({
<Note title="Tip">
Learn more about the remote link in [this documentation](!docs!/learn/fundamentals/module-links/remote-link).
Learn more about Link in [this documentation](!docs!/learn/fundamentals/module-links/link).
</Note>
@@ -64,19 +64,19 @@ const { data: priceSets } = useQueryGraphStep({
</CodeTab>
</CodeTabs>
### Manage with Remote Link
### Manage with Link
To manage the price set of a shipping option, use [Remote Link](!docs!/learn/fundamentals/module-links/remote-link):
To manage the price set of a shipping option, use [Link](!docs!/learn/fundamentals/module-links/link):
<CodeTabs group="relation-link">
<CodeTab label="remoteLink.create" value="method">
<CodeTab label="link.create" value="method">
```ts
import { Modules } from "@medusajs/framework/utils"
// ...
await remoteLink.create({
await link.create({
[Modules.FULFILLMENT]: {
shipping_option_id: "so_123",
},
@@ -161,19 +161,19 @@ const { data: priceSets } = useQueryGraphStep({
</CodeTab>
</CodeTabs>
### Manage with Remote Link
### Manage with Link
To manage the price set of a variant, use [Remote Link](!docs!/learn/fundamentals/module-links/remote-link):
To manage the price set of a variant, use [Link](!docs!/learn/fundamentals/module-links/link):
<CodeTabs group="relation-link">
<CodeTab label="remoteLink.create" value="method">
<CodeTab label="link.create" value="method">
```ts
import { Modules } from "@medusajs/framework/utils"
// ...
await remoteLink.create({
await link.create({
[Modules.PRODUCT]: {
variant_id: "variant_123",
},
@@ -129,19 +129,19 @@ const { data: variants } = useQueryGraphStep({
</CodeTab>
</CodeTabs>
### Manage with Remote Link
### Manage with Link
To manage the inventory items of a variant, use [Remote Link](!docs!/learn/fundamentals/module-links/remote-link):
To manage the inventory items of a variant, use [Link](!docs!/learn/fundamentals/module-links/link):
<CodeTabs group="relation-link">
<CodeTab label="remoteLink.create" value="method">
<CodeTab label="link.create" value="method">
```ts
import { Modules } from "@medusajs/framework/utils"
// ...
await remoteLink.create({
await link.create({
[Modules.PRODUCT]: {
variant_id: "variant_123",
},
@@ -278,19 +278,19 @@ const { data: variants } = useQueryGraphStep({
</CodeTab>
</CodeTabs>
### Manage with Remote Link
### Manage with Link
To manage the price set of a variant, use [Remote Link](!docs!/learn/fundamentals/module-links/remote-link):
To manage the price set of a variant, use [Link](!docs!/learn/fundamentals/module-links/link):
<CodeTabs group="relation-link">
<CodeTab label="remoteLink.create" value="method">
<CodeTab label="link.create" value="method">
```ts
import { Modules } from "@medusajs/framework/utils"
// ...
await remoteLink.create({
await link.create({
[Modules.PRODUCT]: {
variant_id: "variant_123",
},
@@ -371,19 +371,19 @@ const { data: products } = useQueryGraphStep({
</CodeTab>
</CodeTabs>
### Manage with Remote Link
### Manage with Link
To manage the sales channels of a product, use [Remote Link](!docs!/learn/fundamentals/module-links/remote-link):
To manage the sales channels of a product, use [Link](!docs!/learn/fundamentals/module-links/link):
<CodeTabs group="relation-link">
<CodeTab label="remoteLink.create" value="method">
<CodeTab label="link.create" value="method">
```ts
import { Modules } from "@medusajs/framework/utils"
// ...
await remoteLink.create({
await link.create({
[Modules.PRODUCT]: {
product_id: "prod_123",
},
@@ -77,19 +77,19 @@ const { data: promotions } = useQueryGraphStep({
</CodeTab>
</CodeTabs>
### Manage with Remote Link
### Manage with Link
To manage the promotions of a cart, use [Remote Link](!docs!/learn/fundamentals/module-links/remote-link):
To manage the promotions of a cart, use [Link](!docs!/learn/fundamentals/module-links/link):
<CodeTabs group="relation-link">
<CodeTab label="remoteLink.create" value="method">
<CodeTab label="link.create" value="method">
```ts
import { Modules } from "@medusajs/framework/utils"
// ...
await remoteLink.create({
await link.create({
[Modules.CART]: {
cart_id: "cart_123",
},
@@ -168,19 +168,19 @@ const { data: promotions } = useQueryGraphStep({
</CodeTab>
</CodeTabs>
### Manage with Remote Link
### Manage with Link
To manage the promotion of an order, use [Remote Link](!docs!/learn/fundamentals/module-links/remote-link):
To manage the promotion of an order, use [Link](!docs!/learn/fundamentals/module-links/link):
<CodeTabs group="relation-link">
<CodeTab label="remoteLink.create" value="method">
<CodeTab label="link.create" value="method">
```ts
import { Modules } from "@medusajs/framework/utils"
// ...
await remoteLink.create({
await link.create({
[Modules.ORDER]: {
order_id: "order_123",
},
@@ -161,19 +161,19 @@ const { data: regions } = useQueryGraphStep({
</CodeTab>
</CodeTabs>
### Manage with Remote Link
### Manage with Link
To manage the payment providers in a region, use [Remote Link](!docs!/learn/fundamentals/module-links/remote-link):
To manage the payment providers in a region, use [Link](!docs!/learn/fundamentals/module-links/link):
<CodeTabs group="relation-link">
<CodeTab label="remoteLink.create" value="method">
<CodeTab label="link.create" value="method">
```ts
import { Modules } from "@medusajs/framework/utils"
// ...
await remoteLink.create({
await link.create({
[Modules.REGION]: {
region_id: "reg_123",
},
@@ -73,19 +73,19 @@ const { data: salesChannels } = useQueryGraphStep({
</CodeTab>
</CodeTabs>
### Manage with Remote Link
### Manage with Link
To manage the sales channels of an API key, use [Remote Link](!docs!/learn/fundamentals/module-links/remote-link):
To manage the sales channels of an API key, use [Link](!docs!/learn/fundamentals/module-links/link):
<CodeTabs group="relation-link">
<CodeTab label="remoteLink.create" value="method">
<CodeTab label="link.create" value="method">
```ts
import { Modules } from "@medusajs/framework/utils"
// ...
await remoteLink.create({
await link.create({
[Modules.API_KEY]: {
api_key_id: "apk_123",
},
@@ -256,19 +256,19 @@ const { data: salesChannels } = useQueryGraphStep({
</CodeTab>
</CodeTabs>
### Manage with Remote Link
### Manage with Link
To manage the sales channels of a product, use [Remote Link](!docs!/learn/fundamentals/module-links/remote-link):
To manage the sales channels of a product, use [Link](!docs!/learn/fundamentals/module-links/link):
<CodeTabs group="relation-link">
<CodeTab label="remoteLink.create" value="method">
<CodeTab label="link.create" value="method">
```ts
import { Modules } from "@medusajs/framework/utils"
// ...
await remoteLink.create({
await link.create({
[Modules.PRODUCT]: {
product_id: "prod_123",
},
@@ -349,19 +349,19 @@ const { data: salesChannels } = useQueryGraphStep({
</CodeTab>
</CodeTabs>
### Manage with Remote Link
### Manage with Link
To manage the stock locations of a sales channel, use [Remote Link](!docs!/learn/fundamentals/module-links/remote-link):
To manage the stock locations of a sales channel, use [Link](!docs!/learn/fundamentals/module-links/link):
<CodeTabs group="relation-link">
<CodeTab label="remoteLink.create" value="method">
<CodeTab label="link.create" value="method">
```ts
import { Modules } from "@medusajs/framework/utils"
// ...
await remoteLink.create({
await link.create({
[Modules.SALES_CHANNEL]: {
sales_channel_id: "sc_123",
},
@@ -82,19 +82,19 @@ const { data: stockLocations } = useQueryGraphStep({
</CodeTab>
</CodeTabs>
### Manage with Remote Link
### Manage with Link
To manage the stock location of a fulfillment set, use [Remote Link](!docs!/learn/fundamentals/module-links/remote-link):
To manage the stock location of a fulfillment set, use [Link](!docs!/learn/fundamentals/module-links/link):
<CodeTabs group="relation-link">
<CodeTab label="remoteLink.create" value="method">
<CodeTab label="link.create" value="method">
```ts
import { Modules } from "@medusajs/framework/utils"
// ...
await remoteLink.create({
await link.create({
[Modules.STOCK_LOCATION]: {
stock_location_id: "sloc_123",
},
@@ -220,19 +220,19 @@ const { data: stockLocations } = useQueryGraphStep({
</CodeTab>
</CodeTabs>
### Manage with Remote Link
### Manage with Link
To manage the stock locations of a sales channel, use [Remote Link](!docs!/learn/fundamentals/module-links/remote-link):
To manage the stock locations of a sales channel, use [Link](!docs!/learn/fundamentals/module-links/link):
<CodeTabs group="relation-link">
<CodeTab label="remoteLink.create" value="method">
<CodeTab label="link.create" value="method">
```ts
import { Modules } from "@medusajs/framework/utils"
// ...
await remoteLink.create({
await link.create({
[Modules.SALES_CHANNEL]: {
sales_channel_id: "sc_123",
},
+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",
},
@@ -85,7 +85,7 @@ Use the `ContainerRegistrationKeys` enum imported from `@medusajs/framework/util
<Table.Row>
<Table.Cell>
Query
[Query](!docs!/learn/fundamentals/module-links/query)
</Table.Cell>
<Table.Cell>
@@ -103,17 +103,17 @@ Use the `ContainerRegistrationKeys` enum imported from `@medusajs/framework/util
<Table.Row>
<Table.Cell>
Remote Link
[Link](!docs!/learn/fundamentals/module-links/link)
</Table.Cell>
<Table.Cell>
The remote link function.
Link function to manage links between records of two modules' data models.
</Table.Cell>
<Table.Cell>
`remoteLink` or `ContainerRegistrationKeys.REMOTE_LINK`
`link` or `ContainerRegistrationKeys.LINK`
</Table.Cell>
</Table.Row>
@@ -671,7 +671,7 @@ You’ll test out the workflow in the next section.
- [How to Create a Workflow](!docs!/learn/fundamentals/workflows)
- [What is the Compensation Function](!docs!/learn/fundamentals/workflows/compensation-function)
- [Learn more about the remote link function](!docs!/learn/fundamentals/module-links/remote-link)
- [Learn more about Link functions](!docs!/learn/fundamentals/module-links/link)
---
@@ -123,14 +123,14 @@ Create workflows to implement these flows, then utilize these workflows in other
## Manage Linked Records
If you've defined links between data models of two modules, you can manage them through two functions: remote link and Query.
If you've defined links between data models of two modules, you can manage them through two tools: Link and Query.
Use the remote link to create a link between two records, and use Query to fetch data across linked data models.
Use Link to create a link between two records, and use Query to fetch data across linked data models.
<CardList itemsPerRow={2} items={[
{
href: "!docs!/learn/fundamentals/module-links/remote-link",
title: "How to Use the Remote Link",
href: "!docs!/learn/fundamentals/module-links/link",
title: "How to Use Link",
text: "Learn how to link data models of different modules.",
icon: AcademicCapSolid,
},
@@ -682,7 +682,7 @@ export const POST = async (
req: AuthenticatedMedusaRequest<RequestType>,
res: MedusaResponse
) => {
const remoteLink = req.scope.resolve("remoteLink")
const link = req.scope.resolve("link")
const marketplaceModuleService: MarketplaceModuleService =
req.scope.resolve(MARKETPLACE_MODULE)
const productModuleService: IProductModuleService = req.scope
@@ -725,7 +725,7 @@ const { result } = await createProductsWorkflow(req.scope)
})
// link product to vendor
await remoteLink.create({
await link.create({
[MARKETPLACE_MODULE]: {
vendor_id: vendorAdmin.vendor.id,
},
@@ -826,7 +826,7 @@ curl 'http://localhost:9000/vendors/products' \
### Further Reads
- [How to use Query](!docs!/learn/fundamentals/module-links/query)
- [How to use the Remote Link](!docs!/learn/fundamentals/module-links/remote-link)
- [How to use Link](!docs!/learn/fundamentals/module-links/link)
---
@@ -710,7 +710,7 @@ The workflow returns the created subscription and order.
- [How to Create a Workflow](!docs!/learn/fundamentals/workflows)
- [Learn more about the compensation function](!docs!/learn/fundamentals/workflows/compensation-function)
- [How to use the Remote Link](!docs!/learn/fundamentals/module-links/remote-link)
- [How to use Link](!docs!/learn/fundamentals/module-links/link)
---
+19 -19
View File
@@ -47,7 +47,7 @@ export const generatedEditDates = {
"app/commerce-modules/payment/module-options/page.mdx": "2024-10-15T12:51:40.574Z",
"app/commerce-modules/payment/payment/page.mdx": "2024-10-09T10:59:08.463Z",
"app/commerce-modules/payment/payment-collection/page.mdx": "2024-10-09T10:56:49.510Z",
"app/commerce-modules/payment/payment-flow/page.mdx": "2024-10-09T11:18:53.332Z",
"app/commerce-modules/payment/payment-flow/page.mdx": "2025-01-06T11:19:35.592Z",
"app/commerce-modules/payment/payment-provider/stripe/page.mdx": "2024-12-16T13:21:03.554Z",
"app/commerce-modules/payment/payment-provider/page.mdx": "2024-10-09T11:07:27.269Z",
"app/commerce-modules/payment/payment-session/page.mdx": "2024-10-09T10:58:00.960Z",
@@ -107,23 +107,23 @@ export const generatedEditDates = {
"app/deployment/page.mdx": "2024-11-25T14:31:45.277Z",
"app/integrations/page.mdx": "2024-12-16T16:46:12.395Z",
"app/medusa-cli/page.mdx": "2024-08-28T11:25:32.382Z",
"app/medusa-container-resources/page.mdx": "2024-12-09T16:18:38.852Z",
"app/medusa-container-resources/page.mdx": "2025-01-06T11:19:35.623Z",
"app/medusa-workflows-reference/page.mdx": "2024-12-09T16:22:32.129Z",
"app/nextjs-starter/page.mdx": "2025-01-06T12:19:31.143Z",
"app/recipes/b2b/page.mdx": "2024-10-03T13:07:44.153Z",
"app/recipes/commerce-automation/page.mdx": "2024-10-16T08:52:01.585Z",
"app/recipes/digital-products/examples/standard/page.mdx": "2025-01-06T09:03:35.202Z",
"app/recipes/digital-products/page.mdx": "2024-10-03T13:07:44.147Z",
"app/recipes/digital-products/examples/standard/page.mdx": "2025-01-06T11:19:35.640Z",
"app/recipes/digital-products/page.mdx": "2025-01-06T11:19:35.623Z",
"app/recipes/ecommerce/page.mdx": "2024-10-22T11:01:01.218Z",
"app/recipes/integrate-ecommerce-stack/page.mdx": "2024-12-09T13:03:35.846Z",
"app/recipes/marketplace/examples/vendors/page.mdx": "2024-12-11T10:06:16.586Z",
"app/recipes/marketplace/examples/vendors/page.mdx": "2025-01-06T11:19:35.639Z",
"app/recipes/marketplace/page.mdx": "2024-10-03T13:07:44.153Z",
"app/recipes/multi-region-store/page.mdx": "2024-10-03T13:07:13.813Z",
"app/recipes/omnichannel/page.mdx": "2024-10-03T13:07:14.384Z",
"app/recipes/oms/page.mdx": "2024-07-01T10:21:19+03:00",
"app/recipes/personalized-products/page.mdx": "2024-10-03T13:07:44.153Z",
"app/recipes/pos/page.mdx": "2024-10-03T13:07:13.964Z",
"app/recipes/subscriptions/examples/standard/page.mdx": "2024-12-11T10:05:39.227Z",
"app/recipes/subscriptions/examples/standard/page.mdx": "2025-01-06T11:19:35.640Z",
"app/recipes/subscriptions/page.mdx": "2024-10-03T13:07:44.155Z",
"app/recipes/page.mdx": "2024-07-11T15:56:41+00:00",
"app/service-factory-reference/methods/create/page.mdx": "2024-07-31T17:01:33+03:00",
@@ -2133,21 +2133,21 @@ export const generatedEditDates = {
"app/admin-components/components/forms/page.mdx": "2024-10-09T12:48:04.229Z",
"app/commerce-modules/auth/reset-password/page.mdx": "2024-12-25T13:26:32.595Z",
"app/storefront-development/customers/reset-password/page.mdx": "2024-12-19T16:32:00.724Z",
"app/commerce-modules/api-key/links-to-other-modules/page.mdx": "2024-12-24T14:36:06.109Z",
"app/commerce-modules/api-key/links-to-other-modules/page.mdx": "2025-01-06T11:19:22.450Z",
"app/commerce-modules/cart/extend/page.mdx": "2024-12-25T12:48:59.149Z",
"app/commerce-modules/cart/links-to-other-modules/page.mdx": "2024-12-24T14:46:49.847Z",
"app/commerce-modules/cart/links-to-other-modules/page.mdx": "2025-01-06T11:19:35.593Z",
"app/commerce-modules/customer/extend/page.mdx": "2024-12-25T15:54:37.789Z",
"app/commerce-modules/fulfillment/links-to-other-modules/page.mdx": "2024-12-24T14:49:54.535Z",
"app/commerce-modules/inventory/links-to-other-modules/page.mdx": "2024-12-24T14:50:25.574Z",
"app/commerce-modules/pricing/links-to-other-modules/page.mdx": "2024-12-24T14:53:39.198Z",
"app/commerce-modules/fulfillment/links-to-other-modules/page.mdx": "2025-01-06T11:19:35.593Z",
"app/commerce-modules/inventory/links-to-other-modules/page.mdx": "2025-01-06T11:19:35.600Z",
"app/commerce-modules/pricing/links-to-other-modules/page.mdx": "2025-01-06T11:19:35.607Z",
"app/commerce-modules/product/extend/page.mdx": "2024-12-11T09:07:25.252Z",
"app/commerce-modules/product/links-to-other-modules/page.mdx": "2024-12-24T14:55:21.779Z",
"app/commerce-modules/product/links-to-other-modules/page.mdx": "2025-01-06T11:19:35.606Z",
"app/commerce-modules/promotion/extend/page.mdx": "2024-12-11T09:07:24.137Z",
"app/commerce-modules/promotion/links-to-other-modules/page.mdx": "2024-12-24T14:56:11.410Z",
"app/commerce-modules/promotion/links-to-other-modules/page.mdx": "2025-01-06T11:19:35.608Z",
"app/commerce-modules/order/edit/page.mdx": "2024-10-09T08:50:05.334Z",
"app/commerce-modules/order/links-to-other-modules/page.mdx": "2024-12-24T14:52:22.813Z",
"app/commerce-modules/order/links-to-other-modules/page.mdx": "2025-01-06T11:19:35.604Z",
"app/commerce-modules/order/order-change/page.mdx": "2024-10-09T09:59:40.745Z",
"app/commerce-modules/payment/links-to-other-modules/page.mdx": "2024-12-24T14:53:08.217Z",
"app/commerce-modules/payment/links-to-other-modules/page.mdx": "2025-01-06T11:19:35.593Z",
"references/core_flows/Common/Steps_Common/functions/core_flows.Common.Steps_Common.useQueryGraphStep/page.mdx": "2024-12-25T08:43:13.528Z",
"references/core_flows/Payment/Workflows_Payment/functions/core_flows.Payment.Workflows_Payment.processPaymentWorkflow/page.mdx": "2024-12-25T08:43:15.375Z",
"references/helper_steps/functions/helper_steps.useQueryGraphStep/page.mdx": "2024-12-10T14:55:09.191Z",
@@ -2196,11 +2196,11 @@ export const generatedEditDates = {
"references/fulfillment/interfaces/fulfillment.IFulfillmentModuleService/page.mdx": "2024-12-17T16:57:25.097Z",
"references/types/CommonTypes/interfaces/types.CommonTypes.RequestQueryFields/page.mdx": "2024-12-09T13:21:32.865Z",
"references/utils/utils.ProductUtils/page.mdx": "2024-12-10T14:54:57.156Z",
"app/commerce-modules/region/links-to-other-modules/page.mdx": "2024-12-24T14:56:43.092Z",
"app/commerce-modules/sales-channel/links-to-other-modules/page.mdx": "2024-12-24T14:57:34.314Z",
"app/commerce-modules/stock-location/links-to-other-modules/page.mdx": "2024-12-24T14:58:09.715Z",
"app/commerce-modules/region/links-to-other-modules/page.mdx": "2025-01-06T11:19:35.617Z",
"app/commerce-modules/sales-channel/links-to-other-modules/page.mdx": "2025-01-06T11:19:35.620Z",
"app/commerce-modules/stock-location/links-to-other-modules/page.mdx": "2025-01-06T11:19:35.619Z",
"app/commerce-modules/store/links-to-other-modules/page.mdx": "2024-12-24T14:58:24.038Z",
"app/examples/page.mdx": "2024-12-11T09:07:47.589Z",
"app/examples/page.mdx": "2025-01-06T11:19:35.623Z",
"app/medusa-cli/commands/build/page.mdx": "2024-11-11T11:00:49.665Z",
"app/js-sdk/page.mdx": "2024-12-12T11:41:51.152Z",
"references/js_sdk/admin/Admin/properties/js_sdk.admin.Admin.apiKey/page.mdx": "2024-12-26T11:37:18.120Z",