New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat(modules-sdk): define link #7022
base: develop
Are you sure you want to change the base?
Conversation
carlos-r-l-rodrigues
commented
Apr 9, 2024
•
edited
edited
🦋 Changeset detectedLatest commit: 1bd087e The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
3 Ignored Deployments
|
/snapshot-this |
🚀 A snapshot release has been made for this PRTest the snapshots by updating your yarn add @medusajs/admin@7.1.13-snapshot-20240409114424 yarn add @medusajs/admin-ui@2.1.14-snapshot-20240409114424 yarn add @medusajs/api-key@0.1.2-snapshot-20240409114424 yarn add @medusajs/cache-redis@1.9.1-snapshot-20240409114424 yarn add @medusajs/core-flows@0.0.9-snapshot-20240409114424 yarn add create-medusa-app@1.2.8-snapshot-20240409114424 yarn add @medusajs/currency@0.1.2-snapshot-20240409114424 yarn add @medusajs/customer@0.0.3-snapshot-20240409114424 yarn add @medusajs/event-bus-redis@1.8.13-snapshot-20240409114424 yarn add @medusajs/link-modules@0.2.11-snapshot-20240409114424 yarn add @medusajs/medusa@1.21.0-snapshot-20240409114424 yarn add medusa-react@9.0.17-snapshot-20240409114424 yarn add medusa-test-utils@1.1.44-snapshot-20240409114424 yarn add @medusajs/modules-sdk@1.12.11-snapshot-20240409114424 yarn add @medusajs/orchestration@0.5.7-snapshot-20240409114424 yarn add @medusajs/payment@0.0.3-snapshot-20240409114424 yarn add @medusajs/pricing@0.2.0-snapshot-20240409114424 yarn add @medusajs/product@0.4.0-snapshot-20240409114424 yarn add @medusajs/promotion@0.0.4-snapshot-20240409114424 yarn add @medusajs/stock-location-next@0.0.3-snapshot-20240409114424 yarn add @medusajs/types@1.12.0-snapshot-20240409114424 yarn add @medusajs/utils@1.12.0-snapshot-20240409114424 yarn add @medusajs/workflow-engine-inmemory@0.0.4-snapshot-20240409114424 yarn add @medusajs/workflow-engine-redis@0.0.4-snapshot-20240409114424 yarn add @medusajs/workflows-sdk@0.1.6-snapshot-20240409114424
|
Would it make sense to simplify the API of What I have in mind was something like this: // /src/links/index.ts
const someLink = {
modules: [
{
name: Modules.CART,
key: "cart_id",
},
{
name: Modules.PAYMENT,
key: "payment_collection_id",
isList: true,
},
],
options: { idPrefix: "capaycol" }
}
const someOtherLink = {
modules: [
{
name: Modules.CART,
key: "cart_id",
},
{
name: Modules.SALES_CHANNEL,
key: "sales_channel_id",
},
],
}
defineLink([ someLink, someOtherLink ]) Curious to hear what you think about this cc @srindom |
I like this approach too because at the end we have multiple extra properties that we'll need. |