Core interface for Teleprompter SDK implementations. Defines the contract for managing prompt templates including CRUD operations and versioning.

interface TeleprompterSDK {
    deletePrompt(id: string): Promise<void>;
    getPrompt(id: string): Promise<Prompt>;
    getPromptVersions(id: string): Promise<Prompt[]>;
    listPrompts(): Promise<Prompt[]>;
    rollbackPrompt(id: string, version: number): Promise<void>;
    writePrompt(prompt: PromptInput): Promise<void>;
}

Implemented by

Methods

  • Deletes a prompt by its ID

    Parameters

    • id: string

      The unique identifier of the prompt to delete

    Returns Promise<void>

    Promise that resolves when the deletion completes

  • Retrieves a specific prompt by its ID

    Parameters

    • id: string

      The unique identifier of the prompt

    Returns Promise<Prompt>

    Promise resolving to the prompt

  • Retrieves all versions of a specific prompt

    Parameters

    • id: string

      The unique identifier of the prompt

    Returns Promise<Prompt[]>

    Promise resolving to an array of all prompt versions

  • Retrieves all available prompts

    Returns Promise<Prompt[]>

    Promise resolving to an array of all prompts

  • Rolls back a prompt to a previous version

    Parameters

    • id: string

      The unique identifier of the prompt

    • version: number

      The version number to roll back to

    Returns Promise<void>

    Promise that resolves when the rollback completes

  • Creates a new prompt or updates an existing one

    Parameters

    Returns Promise<void>

    Promise that resolves when the operation completes