@bugbug-io/sdk
    Preparing search index...

    Class ComponentsModule

    Components module for managing reusable test components

    Index

    Constructors

    Methods

    Constructors

    • Parameters

      • client: BugBugApiClient

      Returns ComponentsModule

    Methods

    • List all components with optional filtering and pagination

      Parameters

      • options: {
            query?: string;
            cursor?: string;
            pageSize?: number;
            ordering?: "-created" | "-name" | "created" | "name";
        } & RequestOptions = {}

        Query options including search query, page, and page size

      Returns Promise<GroupsListResponse>

      Paginated list of components with nested structure

      // List all components
      const components = await sdk.components.list();

      // Search for specific components
      const loginComponents = await sdk.components.list({
      query: 'login',
      cursor: nextToken,
      pageSize: 50
      });
    • Fetch component usage — how many tests reference this component and which.

      Parameters

      • componentId: string

        UUID of the component.

      • options: RequestOptions = {}

      Returns Promise<{ usage?: number; testsIds?: string[] }>

      { usage, testsIds } from GET /components/{id}/usage/.