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

fix(core-flows, types, medusa): fix batch delete types in workflows and routes #8974

Merged
merged 5 commits into from
Sep 4, 2024

Conversation

shahednasser
Copy link
Member

@shahednasser shahednasser commented Sep 3, 2024

  • Fix the returned data of batch delete steps / workflows for deleted records to just be the array of IDs.
  • Add a new type BatchResponse for API routes to have a different shape for deleted records
  • Update batch delete helpers to return the expected shape for API routes

Copy link

vercel bot commented Sep 3, 2024

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

Name Status Preview Comments Updated (UTC)
api-reference 🔄 Building (Inspect) Visit Preview 💬 Add feedback Sep 4, 2024 7:14am
medusa-dashboard ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 4, 2024 7:14am
5 Skipped Deployments
Name Status Preview Comments Updated (UTC)
api-reference-v2 ⬜️ Ignored (Inspect) Visit Preview Sep 4, 2024 7:14am
docs-ui ⬜️ Ignored (Inspect) Visit Preview Sep 4, 2024 7:14am
docs-v2 ⬜️ Ignored (Inspect) Visit Preview Sep 4, 2024 7:14am
medusa-docs ⬜️ Ignored (Inspect) Visit Preview Sep 4, 2024 7:14am
resources-docs ⬜️ Ignored (Inspect) Visit Preview Sep 4, 2024 7:14am

Copy link

changeset-bot bot commented Sep 3, 2024

⚠️ No Changeset found

Latest commit: f532804

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Comment on lines 37 to 39
ids,
object: "shipping_option_rule",
deleted: true,
Copy link
Contributor

Choose a reason for hiding this comment

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

thought: think this should just be the IDs ... this shape is very specific to how we want to respond in the HTTP layer

Copy link
Member Author

Choose a reason for hiding this comment

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

I took this shape from other workflows, and it's also the expected response type for deleting the shipping option rule and multiple similar API routes.

I'll update the return types then of these workflows / API routes

Copy link
Contributor

Choose a reason for hiding this comment

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

The return value should have this shape in the API Routes, but not in the workflows

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes I meant to update the API routes for the changes in the workflows

@shahednasser shahednasser changed the title fix(core-flows): fix returned value of batch deleting shipping option rules fix(core-flows, types, medusa): fix batch delete types in workflows and routes Sep 4, 2024
Copy link
Contributor

@olivermrbl olivermrbl left a comment

Choose a reason for hiding this comment

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

LGTM

@kodiakhq kodiakhq bot merged commit ee3580e into develop Sep 4, 2024
23 checks passed
@olivermrbl olivermrbl deleted the fix/shipping-option-rule-delete branch September 4, 2024 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants