-
Notifications
You must be signed in to change notification settings - Fork 2.1k
fix: issue with custom methods in new module #7056
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: issue with custom methods in new module #7056
Conversation
🦋 Changeset detectedLatest commit: 212aa87 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 |
| * Generates a `RequestSender` function configured according to the provided options. | ||
| * | ||
| * @remarks | ||
| * This function abstracts away the details of constructing request URLs, merging configurations, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we just link to the RequestSender interface docs? I feel like you're repeating here what you've just written there
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
imo this function might be used directly by the developers so it would be good to have it in here as well :)
Co-authored-by: Łukasz Śliwa <39009379+lsliwaradioluz@users.noreply.github.com>
* refactor: rename module dir to modules * feat: new SDK module - moduleFromEndpoints * Update packages/sdk/src/__tests__/integration/modules/moduleFromEndpoints.spec.ts Co-authored-by: Tomasz Góral <tomasz.gl69@gmail.com> * feat: HTTP Client for moduleForEndpoints (#7053) * feat: default behaviour of HTTP Client * remove isomorphic-fetch from depts * full implementation of HTTP client * test: update tests based on the review * fix issue with URL class and urls as paths * add test for axios * add computed headers to http client * update tsdocs * feat: add customizable error handler (#7054) * feat: default behaviour of HTTP Client * remove isomorphic-fetch from depts * full implementation of HTTP client * feat: add customizable error handler * await error handler * update error handler due to feedback * update tsdocs * refactor default http client * use unknown instead of any * add method name to error handler * update tsdocs * apply review suggestions * refactor: simplification & improve tsdocs (#7055) * feat: default behaviour of HTTP Client * remove isomorphic-fetch from depts * full implementation of HTTP client * feat: add customizable error handler * await error handler * refactor: improve tsdocs * test non-object params * add comment * add module types to api extractor * fix: issue with custom methods in new module (#7056) * feat: default behaviour of HTTP Client * remove isomorphic-fetch from depts * full implementation of HTTP client * feat: add customizable error handler * await error handler * refactor: improve tsdocs * fix: issue with custom methods in new module * test: additonal tests * fix issue with losing tsdocs * rename file * missing import * include credentials * Update packages/sdk/src/modules/moduleFromEndpoints/types.ts Co-authored-by: Łukasz Śliwa <39009379+lsliwaradioluz@users.noreply.github.com> --------- Co-authored-by: Łukasz Śliwa <39009379+lsliwaradioluz@users.noreply.github.com> * update tsdocs * rename module to middlewareModule --------- Co-authored-by: Tomasz Góral <tomasz.gl69@gmail.com> Co-authored-by: Łukasz Śliwa <39009379+lsliwaradioluz@users.noreply.github.com>
* refactor: rename module dir to modules * feat: new SDK module - moduleFromEndpoints * feat: default behaviour of HTTP Client * remove isomorphic-fetch from depts * full implementation of HTTP client * feat: add customizable error handler * await error handler * refactor: improve tsdocs * fix: issue with custom methods in new module * test: additonal tests * fix issue with losing tsdocs * prerelease * fix header type * revert last fix * chore: bump package * refactor: use moduleFromEndpoints in next * refactor: update shared * refactor: update nuxt package * refactor: easeier setup * chore: fix version * Update packages/sdk/src/__tests__/integration/modules/moduleFromEndpoints.spec.ts Co-authored-by: Tomasz Góral <tomasz.gl69@gmail.com> * feat: HTTP Client for moduleForEndpoints (#7053) * feat: default behaviour of HTTP Client * remove isomorphic-fetch from depts * full implementation of HTTP client * test: update tests based on the review * fix issue with URL class and urls as paths * add test for axios * add computed headers to http client * update tsdocs * feat: add customizable error handler (#7054) * feat: default behaviour of HTTP Client * remove isomorphic-fetch from depts * full implementation of HTTP client * feat: add customizable error handler * await error handler * update error handler due to feedback * update tsdocs * refactor default http client * use unknown instead of any * add method name to error handler * update tsdocs * apply review suggestions * refactor: simplification & improve tsdocs (#7055) * feat: default behaviour of HTTP Client * remove isomorphic-fetch from depts * full implementation of HTTP client * feat: add customizable error handler * await error handler * refactor: improve tsdocs * test non-object params * add comment * add module types to api extractor * fix: issue with custom methods in new module (#7056) * feat: default behaviour of HTTP Client * remove isomorphic-fetch from depts * full implementation of HTTP client * feat: add customizable error handler * await error handler * refactor: improve tsdocs * fix: issue with custom methods in new module * test: additonal tests * fix issue with losing tsdocs * rename file * missing import * include credentials * Update packages/sdk/src/modules/moduleFromEndpoints/types.ts Co-authored-by: Łukasz Śliwa <39009379+lsliwaradioluz@users.noreply.github.com> --------- Co-authored-by: Łukasz Śliwa <39009379+lsliwaradioluz@users.noreply.github.com> * bump version * use new version * refactor: use getRequestHeaders naming for both nuxt and next * update tsdocs * rename module to middlewareModule * bump sdk package * use middlewareModule naming * use strict mode in storefront packages * deprecate getCookieHeader * refactor * first try to fix the yarn.lock * add prettier * revert * update sdk package * exit pre mode and refactor * add prettier * add changelogs and bump packages * apply review suggestions * apply review suggestions pt2 --------- Co-authored-by: Tomasz Góral <tomasz.gl69@gmail.com> Co-authored-by: Łukasz Śliwa <39009379+lsliwaradioluz@users.noreply.github.com>
🔗 Linked issue
❓ Type of change
📚 Description
Fix the issue with extensions and new module.
Additionally, rename getHttpClient into getRequestSender to avoid conflicts.
📝 Checklist