Skip to content
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

New fields for documents and list of documents by document type #406

Open
wants to merge 21 commits into
base: develop
Choose a base branch
from

Conversation

owl352
Copy link
Collaborator

@owl352 owl352 commented Dec 30, 2024

Issue

For new design we need additional data in response from documents endpoints, like document type name
Also we need new endpoint, which contains transactions for documents

Things done

  • Firstly was added new fields for documents:
    • document type name
    • prefunded balance
    • identity contract nonce
  • Also after new indexer update, old queris for documents not works correctly and were made fixes for queries
  • While I'm making this, also have been realised new endpoint, which allows to get documents from data contract by document type_name
  • And for new tab on PE, was added new endpoint, which contains transaction for document (create/replace/delete and etc.)
  • Reanmed some fields
  • Fixed potential sql injections
  • Also optimization for sql queries
  • For new and reworked old endpoints were updated documentation and tests
  • Updated tests and fixtures for default revision = 1, because revision = 0 can be only when document deleted

@owl352 owl352 added the backend Related to backend (API) label Dec 30, 2024
@owl352 owl352 self-assigned this Dec 30, 2024
Copy link

vercel bot commented Dec 30, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
platform-explorer ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 7, 2025 0:15am

@owl352 owl352 marked this pull request as draft December 30, 2024 18:12
@owl352 owl352 marked this pull request as ready for review December 30, 2024 20:02
# Conflicts:
#	packages/api/README.md
#	packages/api/src/controllers/DocumentsController.js
#	packages/api/src/controllers/IdentitiesController.js
#	packages/api/src/dao/DocumentsDAO.js
#	packages/api/src/dao/IdentitiesDAO.js
#	packages/api/src/models/Document.js
#	packages/api/src/schemas.js
#	packages/api/src/server.js
#	packages/api/src/utils.js
#	packages/api/test/integration/documents.spec.js
#	packages/frontend/src/app/api/content.md
@owl352 owl352 marked this pull request as draft January 3, 2025 09:57
@owl352 owl352 marked this pull request as ready for review January 3, 2025 10:47
@owl352 owl352 linked an issue Jan 6, 2025 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Related to backend (API)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Document count mismatch
1 participant