Skip to content

feat(frappe-api): add PUT, PATCH, and DELETE methods to FrappeClient #42

Description

@rohansaini-02

Problem

The current implementation of FrappeClient in poc-frappe-api/src/FrappeClient.ts only supports get and post requests. To provide full REST method coverage and allow the sync engine or offline app to perform resource mutations (e.g., updating student progress, deleting draft responses), we need to support full REST capabilities.

Proposed Solution

Extend the FrappeClient wrapper with standard method signatures for the remaining HTTP verbs:

async put<T>(url: string, data?: any, config?: AxiosRequestConfig): Promise<T>

(Similar signatures should be implemented for patch and delete operations).

  • The wrappers should preserve the existing typed response behavior used by the current get and post implementations.
  • The new methods should follow the same request/response normalization and interceptor flow already used by existing client methods (such as credentials injection and handling auth errors).

Acceptance Criteria

  • FrappeClient implements and exports standard typed put, patch, and delete methods.
  • Existing interceptors (e.g., authentication insertion) execute correctly for all new HTTP methods.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions