-
Notifications
You must be signed in to change notification settings - Fork 15
fix: add faq mapper for edge deploy #1083
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
Conversation
|
This PR will trigger a patch release when merged. |
| /** | ||
| * Converts markdown text to HAST (Hypertext Abstract Syntax Tree) format | ||
| */ | ||
| markdownToHast(markdown: string): object; |
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.
I'd prefer markdowntohast as a util method instead of part of this interface. Its an internal inpl detail of suggestion to patch conversion that shouldnt be exposed in the mapper interface.
nit23uec
left a comment
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.
Pls move mdtohast in a util method to be reused in suggestionToPatch impl. Rest lgtm
| }).filter((patch) => patch !== null); | ||
| let patches = []; | ||
| // Use suggestionsToPatches if available | ||
| if (mapper.suggestionsToPatches) { |
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.
We should have only one api: suggestionsToPatches
| } | ||
|
|
||
| const s3Path = `opportunities/${siteTokowakaKey}`; | ||
| const s3Path = getTokowakaConfigS3Path(siteTokowakaKey); |
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.
This api would need isPreview param too
| * @throws {Error} Always throws - use suggestionsToPatches instead | ||
| * @see suggestionsToPatches | ||
| */ | ||
| suggestionToPatch() { |
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.
Better to remove this for all opppty right away.
# [@adobe/spacecat-shared-tokowaka-client-v1.0.3](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-tokowaka-client-v1.0.2...@adobe/spacecat-shared-tokowaka-client-v1.0.3) (2025-11-13) ### Bug Fixes * add faq mapper for edge deploy API ([#1083](#1083)) ([4c7ff9d](4c7ff9d))
|
🎉 This PR is included in version @adobe/spacecat-shared-tokowaka-client-v1.0.3 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Adds a mapper for FAQ opportunity to transform FAQ suggestions to JSON Patches.
Suggestion format:
Final HTML Format: