Skip to content

Conversation

Siddhantsingh1230
Copy link
Contributor

@Siddhantsingh1230 Siddhantsingh1230 commented Mar 29, 2025

Summary

This PR adds six new API methods to the frappe-js-sdk for interacting with Frappe documents. Additionally, the README has been updated to include usage examples for these methods.

Changes Introduced

  • Added the following API methods:

    1. getValue - Fetch single or multiple field values from a document based on filters.
    2. setValue - Set single or multiple field values in a document.
    3. renameDoc - Rename an existing document.
    4. getSingleValue - Retrieve a field value from a Single Doctype.
    5. submit - Submit a document.
    6. cancel - Cancel a document.
  • Updated db/types

    • Add FieldName type to support new API methods.
  • Updated the README with:

    • Code examples for the newly added methods.
    • Parameter descriptions and expected outputs.

How to Test

  • Call each method with appropriate parameters and ensure they return expected results.
  • Verify that the README examples execute correctly without errors.

Notes

  • These changes enhance the SDK’s usability by providing essential document operations.
  • Ensure that backend permissions allow necessary CRUD operations for testing.

@nikkothari22

@nikkothari22 nikkothari22 merged commit 6d539fd into The-Commit-Company:main Apr 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants