fix: resolve API errors in getDocumentInfo and applyParagraphStyle#25
Merged
a-bonus merged 1 commit intoa-bonus:mainfrom Nov 29, 2025
Merged
fix: resolve API errors in getDocumentInfo and applyParagraphStyle#25a-bonus merged 1 commit intoa-bonus:mainfrom
a-bonus merged 1 commit intoa-bonus:mainfrom
Conversation
- getDocumentInfo: Remove 'permissions' and 'alternateLink' fields that cause 'Invalid field selection' errors for Google Docs files - applyParagraphStyle: Fix alignment enum to use START/END instead of LEFT/RIGHT per Google Docs API internationalization requirements - applyParagraphStyle: Simplify target parameter by removing redundant applyToContainingParagraph field (was always true)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes critical API errors that prevented
getDocumentInfoandapplyParagraphStyletools from working correctly with Google Docs files.Changes
getDocumentInfo
permissionsandalternateLinkfields from Drive API requestapplyParagraphStyle
Fixed: Change alignment enum from
LEFT/RIGHTtoSTART/ENDReason: Google Docs API requires START/END per internationalization standards
START= left for LTR languages, right for RTL languagesEND= right for LTR languages, left for RTL languagesImpact: Prevents "Invalid value for ParagraphStyle.alignment" errors
Simplified: Remove redundant
applyToContainingParagraphfield from target parameterReason: Field was always
trueand served no purposeImpact: Cleaner parameter schema, same functionality
Testing
getDocumentInforeturns metadata without errorsapplyParagraphStyleaccepts START/END alignment valuesBreaking Changes
applyParagraphStylemust useSTART/ENDinstead ofLEFT/RIGHTfor alignment. Note that the old values caused API errors anyway, so this is effectively a bug fix rather than a breaking change.