feat(gooddata-sdk): [AUTO] add knowledge document list/patch SDK wrapper#1438
Closed
yenkins-admin wants to merge 2 commits intomasterfrom
Closed
feat(gooddata-sdk): [AUTO] add knowledge document list/patch SDK wrapper#1438yenkins-admin wants to merge 2 commits intomasterfrom
yenkins-admin wants to merge 2 commits intomasterfrom
Conversation
Adds CatalogKnowledgeDocumentMetadata, CatalogListKnowledgeDocumentsResponse, and CatalogPatchKnowledgeDocumentRequest model classes under catalog/knowledge/, plus list_knowledge_documents() and patch_knowledge_document() service methods on ComputeService to expose the new API client endpoints (LX-2095, LX-2103). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1438 +/- ##
==========================================
+ Coverage 77.24% 77.29% +0.04%
==========================================
Files 227 230 +3
Lines 14672 14737 +65
==========================================
+ Hits 11334 11391 +57
- Misses 3338 3346 +8 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Adds SDK wrapper layer for knowledge document list (with cursor-based pagination) and patch (enable/disable, title, scopes) operations, exposing the newly regenerated API client endpoints through the gooddata-sdk.
P010 | Workflow: https://github.com/gooddata/gdc-nas/actions/runs/23194184862
What changed in gdc-nas
Three commits added new capabilities to the knowledge documents subsystem in afm-exec-api and gen-ai:
dd45e5dfeat(gen-ai): enable/disable knowledge docs for AI use — NewPATCH /documents/{filename}endpoint withPatchKnowledgeDocumentRequestDto(isDisabled, title, scopes);is_disabledoptional bool field added toKnowledgeDocumentMetadataproto; newpatch_knowledge_documentRPC on GenAIService (LX-2095)0bcddedfeat(gen-ai): pagination for knowledge doc listing —GET /documentsgainssize,pageToken,metaIncludequery params;ListKnowledgeDocumentsResponseDtogainstotalCountandnextPageTokenfields (LX-2103)e52f451feat(gen-ai): pass knowledge doc read permission — Server-sideREAD_KNOWLEDGE_DOCUMENTSpermission check in AIController; no new SDK surface required (LX-2110)What was implemented in SDK
Created a new
catalog/knowledgepackage with three@attrs.definewrapper classes that wrap the regenerated API client DTOs:CatalogKnowledgeDocumentMetadata— wrapsKnowledgeDocumentMetadataDto, includesfilename,title,is_disabled,scopesCatalogListKnowledgeDocumentsResponse— wrapsListKnowledgeDocumentsResponseDto, includesdocuments,total_count,next_page_tokenCatalogPatchKnowledgeDocumentRequest— wrapsPatchKnowledgeDocumentRequestDto, all fields optional (is_disabled,title,scopes)Added two service methods to
ComputeService:list_knowledge_documents(workspace_id, *, size, page_token, meta_include)— forwards optional pagination params via conditional kwargspatch_knowledge_document(workspace_id, filename, patch_request)— callsactions_api.patch_documentAll three classes exported from
gooddata_sdk/__init__.py. 14/14 unit tests pass.Files modified
packages/gooddata-sdk/src/gooddata_sdk/__init__.pypackages/gooddata-sdk/src/gooddata_sdk/catalog/knowledge/__init__.pypackages/gooddata-sdk/src/gooddata_sdk/catalog/knowledge/model/__init__.pypackages/gooddata-sdk/src/gooddata_sdk/catalog/knowledge/model/knowledge_document.pypackages/gooddata-sdk/src/gooddata_sdk/compute/service.pypackages/gooddata-sdk/tests/catalog/knowledge/__init__.pypackages/gooddata-sdk/tests/catalog/knowledge/test_knowledge_documents.pyJIRA: PENDING (Jira ticket will be created after review)
Risk: Low