refactor: Renamed document assets to files#76
Merged
Conversation
Pull Request Test Coverage Report for Build 22070747680Details
💛 - Coveralls |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR renames the “document” asset concept to “file” across the Keymaster stack (server routes + swagger, TypeScript client/library APIs, Python SDK, CLIs, UIs, and tests) to align terminology and payload keys.
Changes:
- Renames Keymaster APIs from
*Documentto*Fileand updates data shape from{ document: ... }to{ file: ... }. - Moves REST endpoints from
/api/v1/documentsto/api/v1/files(server + clients) and updates Swagger accordingly. - Updates CLI commands/docs/tests across TS, Python, and multiple UIs to use “file” naming.
Reviewed changes
Copilot reviewed 29 out of 29 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/keymaster/file.test.ts | Updates unit tests to call createFile/updateFile/getFile/testFile and assert { file: ... } payloads. |
| tests/keymaster/client.test.ts | Updates KeymasterClient HTTP tests to use /files endpoints and *File methods. |
| tests/kc_help_reference.txt | Updates CLI help snapshot to show create-asset-file / update-asset-file. |
| services/keymaster/server/src/keymaster-api.ts | Renames REST routes + swagger docs from /documents to /files and switches server to keymaster.*File. |
| services/keymaster/client/src/KeymasterUI.js | Renames UI state/actions from documents to files and switches API calls to *File. |
| services/gatekeeper/client/src/KeymasterUI.js | Same “documents” → “files” UI refactor as Keymaster client UI. |
| scripts/archon-cli.js | Renames CLI commands and switches to createFile/updateFile. |
| python/keymaster_sdk/tests/test_keymaster_sdk.py | Updates Python SDK tests to use create_file/get_file/update_file/test_file. |
| python/keymaster_sdk/src/keymaster_sdk/keymaster_sdk.py | Renames SDK functions and changes REST paths to /files. |
| python/keymaster_sdk/src/keymaster_sdk/init.py | Re-exports renamed Python SDK functions. |
| packages/keymaster/src/types.ts | Updates public TS interface method names from Documents → Files. |
| packages/keymaster/src/keymaster.ts | Renames implementation methods and changes stored asset key to file, plus default filename to "file". |
| packages/keymaster/src/keymaster-client.ts | Renames client methods and updates HTTP paths/response fields to /files + { file: ... }. |
| packages/keymaster/src/cli.ts | Renames CLI commands and updates calls to createFile/updateFile. |
| packages/keymaster/README.md | Updates CLI command docs from document to file. |
| doc/03-clients/01-cli/README.md | Updates CLI docs from document to file. |
| apps/react-wallet/src/contexts/VariablesProvider.tsx | Renames documentList state to fileList. |
| apps/react-wallet/src/contexts/UIContext.tsx | Updates alias categorization logic to detect data.file and set fileList. |
| apps/react-wallet/src/components/FileTab.tsx | Refactors the “Document” tab UI/component to operate on files (data.file, createFile/updateFile). |
| apps/react-wallet/src/components/AssetsTab.tsx | Switches assets sub-tab from “documents” to “files” and renders FileTab. |
| apps/react-wallet/src/components/AliasedDIDs.tsx | Updates icon/kind classification from document → file. |
| apps/react-wallet/src/BrowserContent.tsx | Updates asset tab routing list to include "files" instead of "documents". |
| apps/chrome-extension/src/contexts/VariablesProvider.tsx | Renames documentList state to fileList. |
| apps/chrome-extension/src/contexts/UIContext.tsx | Updates alias categorization logic to detect data.file and set fileList. |
| apps/chrome-extension/src/components/FileTab.tsx | Refactors the “Document” tab UI/component to operate on files (data.file, createFile/updateFile). |
| apps/chrome-extension/src/components/BrowserContent.tsx | Updates asset tab routing list to include "files" instead of "documents". |
| apps/chrome-extension/src/components/AssetsTab.tsx | Switches assets sub-tab from “documents” to “files” and renders FileTab. |
| apps/chrome-extension/src/components/AliasedDIDs.tsx | Updates icon/kind classification from document → file. |
| README.md | Updates top-level CLI command list from document to file. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
No description provided.