EntryHandler class to manage entries in a specified template.

Constructors

Methods

  • Creates a new entry based on the given template and data.

    Parameters

    • templateIdOrName: string

      The ID or name of the template to use for the entry creation.

    • data: EntryCreateBody

      The data to create the new entry.

    Returns Promise<Entry>

    The newly created entry.

  • Deletes an entry by its ID based on the specified template.

    Parameters

    • entryId: string

      The unique identifier of the entry to be deleted.

    • templateIdOrName: string

      The ID or name of the template associated with the entry.

    Returns Promise<Entry>

    A promise that resolves to the deleted entry.

  • Retrieves all parsed entries for a given template. If caching is enabled and skipCache is not set to true, the method will attempt to retrieve data from the cache before making a network request.

    Parameters

    • templateIdOrName: string

      The ID or name of the template to retrieve entries for.

    • OptionalskipCache: boolean

      Optional. If true, bypasses the cache and fetches fresh data.

    Returns Promise<EntryParsed[]>

    • A promise that resolves to an array of parsed entries.
  • Retrieves all lightweight (lite) entries for a given template. If caching is enabled and skipCache is not set to true, the method will attempt to retrieve data from the cache before making a network request.

    Parameters

    • templateIdOrName: string

      The ID or name of the template.

    • OptionalskipCache: boolean

      Optional. If true, bypasses the cache and fetches fresh data.

    Returns Promise<EntryLite[]>

    A promise that resolves to an array of lightweight entries.

  • Fetches all raw entries associated with a given template identifier or name. If caching is enabled and skipCache is not set to true, the method will attempt to retrieve data from the cache before making a network request.

    Parameters

    • templateIdOrName: string

      The template identifier or name to retrieve the entries for.

    • OptionalskipCache: boolean

      Optional. If true, bypasses the cache and fetches directly from the source.

    Returns Promise<Entry[]>

    • A promise that resolves to an array of Entry objects.
  • Retrieves an entry by its ID and template name or ID. If caching is enabled and skipCache is not set to true, the method will attempt to retrieve data from the cache before making a network request.

    Parameters

    • entryId: string

      The ID of the entry to be retrieved.

    • templateIdOrName: string

      The template ID or name associated with the entry.

    • OptionalskipCache: boolean

      Optional. If true, bypasses the cache and fetches directly from the source.

    Returns Promise<EntryParsed>

    • A promise that resolves to the retrieved entry.
  • Retrieves a lite version of an entry by its ID and template name or ID. If caching is enabled and skipCache is not set to true, the method will attempt to retrieve data from the cache before making a network request.

    Parameters

    • entryId: string

      The ID of the entry to retrieve.

    • templateIdOrName: string

      The ID or name of the template associated with the entry.

    • OptionalskipCache: boolean

      Optional. If true, bypasses the cache and fetches directly from the source.

    Returns Promise<EntryLite>

    A promise that resolves to the lite version of the entry.

  • Retrieves a raw entry by its ID and template name or ID. If caching is enabled and skipCache is not set to true, the method will attempt to retrieve data from the cache before making a network request.

    Parameters

    • entryId: string

      The ID of the entry to be retrieved.

    • templateIdOrName: string

      The template ID or name associated with the entry.

    • OptionalskipCache: boolean

      Optional. If true, bypasses the cache and fetches directly from the source.

    Returns Promise<Entry>

    • A promise that resolves to the retrieved entry.
  • Updates an entry using the provided template identifier or name and data.

    Parameters

    • templateIdOrName: string

      The identifier or name of the template to use for the update.

    • data: EntryUpdateBody

      The data to update the entry with.

    Returns Promise<Entry>

    The updated entry.