Skip to content
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(cart): Line item adjustments #6112

Merged
merged 30 commits into from
Jan 22, 2024
Merged

Conversation

olivermrbl
Copy link
Contributor

@olivermrbl olivermrbl commented Jan 17, 2024

What

Add line item adjustments

addLineItemAdjustments(data: CreateLineItemAdjustmentDTO[]): Promise<LineItemAdjustmentLineDTO[]>
addLineItemAdjustments(data: CreateLineItemAdjustmentDTO): Promise<LineItemAdjustmentLineDTO[]>
addLineItemAdjustments(cartId: string, data: CreateLineItemAdjustmentDTO[], sharedContext?: Context): Promise<LineItemAdjustmentLineDTO[]>

Set line item adjustments

setLineItemAdjustments(cartId: string, data: (CreateLineItemAdjustmentDTO | UpdateLineItemAdjustmentDTO)[], sharedContext?: Context): Promise<LineItemAdjustmentLineDTO[]>

Remove line item adjustments

removeLineItemAdjustments(adjustmentIds: string[], sharedContext?: Context): Promise<void>
removeLineItemAdjustments(adjustmentIds: string, sharedContext?: Context): Promise<void>
removeLineItemAdjustments(selector: Partial<LineItemAdjustmentLineDTO>, sharedContext?: Context): Promise<void>

Copy link

changeset-bot bot commented Jan 17, 2024

🦋 Changeset detected

Latest commit: ec10b45

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@medusajs/types Patch
@medusajs/utils Patch

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

Copy link

vercel bot commented Jan 17, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
medusa-dashboard ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 19, 2024 2:21pm
3 Ignored Deployments
Name Status Preview Comments Updated (UTC)
api-reference ⬜️ Ignored (Inspect) Visit Preview Jan 19, 2024 2:21pm
docs-ui ⬜️ Ignored (Inspect) Visit Preview Jan 19, 2024 2:21pm
medusa-docs ⬜️ Ignored (Inspect) Visit Preview Jan 19, 2024 2:21pm

@olivermrbl olivermrbl force-pushed the feat/cart-module-item-adjustments branch from a3a8824 to ca9ed14 Compare January 17, 2024 13:07
@olivermrbl olivermrbl changed the title [wip] feat(cart): Line item adjustments feat(cart): Line item adjustments Jan 17, 2024
@olivermrbl olivermrbl marked this pull request as ready for review January 17, 2024 13:07
@olivermrbl olivermrbl requested review from a team as code owners January 17, 2024 13:07
packages/cart/src/models/adjustment-line.ts Outdated Show resolved Hide resolved
packages/cart/src/services/cart-module.ts Outdated Show resolved Hide resolved
packages/cart/src/services/cart-module.ts Outdated Show resolved Hide resolved
packages/cart/src/services/cart-module.ts Show resolved Hide resolved
packages/cart/src/services/cart-module.ts Outdated Show resolved Hide resolved
packages/cart/src/types/cart.ts Outdated Show resolved Hide resolved
packages/medusa/src/models/line-item-adjustment.ts Outdated Show resolved Hide resolved
packages/types/src/cart/mutations.ts Outdated Show resolved Hide resolved
packages/types/src/cart/service.ts Outdated Show resolved Hide resolved
@olivermrbl olivermrbl force-pushed the feat/cart-module-item-adjustments branch from 3f26250 to 636f2a8 Compare January 18, 2024 16:14
Copy link
Contributor

@riqwan riqwan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@olivermrbl olivermrbl merged commit 06b33a9 into develop Jan 22, 2024
16 checks passed
@olivermrbl olivermrbl deleted the feat/cart-module-item-adjustments branch January 22, 2024 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants