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

Update api context to match shopware administration #369

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

akf-bw
Copy link

@akf-bw akf-bw commented Nov 11, 2024

What?

  • This PR moves the ApiContext type from admin-sdk/src/_internals/data/EntityCollection.ts to admin-sdk/src/context/index.ts and also updates it with the missing fields of the shopware administration (language.parentId, currencyId & versionId)
  • This PR depreciates the old ApiContext type in admin-sdk/src/_internals/data/EntityCollection.ts

Why?

  • Currently the fields of the ApiContext type in the EntityCollection & the ContextState.api type in the shopware administration mismatch
  • Because of this mismatch some typescript types can't match in the administration

How?

  • I moved the ApiContext type from admin-sdk/src/_internals/data/EntityCollection.ts to admin-sdk/src/context/index.ts
  • For backwards compatibility, I kept the ApiContext type in the EntityCollection, but I've marked it as deprecated so it can be removed with a future update

Anything Else?

  • As soon as this PR has been merged I like to open a new PR in the https://github.com/shopware/shopware repository to use the ApiContext type from the meteor-admin-sdk package in the Context.api type instead of the own defined type in the shopware administration

Copy link

vercel bot commented Nov 11, 2024

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

Name Status Preview Comments Updated (UTC)
meteor-admin-sdk-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 12, 2024 0:07am

Copy link

vercel bot commented Nov 11, 2024

@akf-bw is attempting to deploy a commit to the Shopware Frontends Team on Vercel.

A member of the Team first needs to authorize it.

@akf-bw
Copy link
Author

akf-bw commented Nov 11, 2024

@seggewiss @jleifeld Could you please take a look at this? 💙

As soon as this PR has been merged & the package been updated, I like to open a new PR in the https://github.com/shopware/shopware repository to use the ApiContext type from the meteor-admin-sdk package in the Context.api type instead of the own defined type in the shopware administration

seggewiss
seggewiss previously approved these changes Nov 12, 2024
@seggewiss seggewiss requested a review from jleifeld November 12, 2024 08:59
@akf-bw
Copy link
Author

akf-bw commented Nov 25, 2024

@seggewiss @jleifeld Are there any updates on this?

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.

2 participants