Represents the Karya API client for interacting with the Karya REST API. Provides methods for creating and managing users, plans, and retrieving plan details.

Constructors

Methods

  • Cancels a specified plan by ID.

    Parameters

    • planId: string

      The ID of the plan to cancel.

    Returns Promise<Plan>

    A promise that resolves to the cancelled plan.

  • Closes the HTTP client connection. This method is a placeholder as the Axios client does not require explicit closure.

    Returns Promise<void>

    A promise that resolves when the client is closed (no actual action is performed).

  • Retrieves the details of a specific user by username.

    Parameters

    • username: string

      The username of the user to retrieve.

    Returns Promise<User>

    A promise that resolves to the user object.

  • Retrieves a list of plans associated with a specific user.

    Parameters

    • userId: string

      The ID of the user whose plans are to be retrieved.

    • page: number

      The page number of the results to retrieve.

    Returns Promise<ListPlanResponse>

    A promise that resolves to a list of plans for the user.