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

    Class ProfilesModule

    Profiles module — list and resolve BugBug run profiles.

    Run profiles bundle browser/device/region settings used when starting a test or suite run. resolveId is the most commonly-used helper: it accepts either a UUID (passthrough) or a profile name (looked up).

    Index

    Constructors

    • Parameters

      • client: BugBugApiClient

      Returns ProfilesModule

    Methods

    • List run profiles, one page at a time.

      Parameters

      • options: { cursor?: string; pageSize?: number } & RequestOptions = {}
        • Optionalcursor?: string

          Opaque cursor returned as nextToken by the previous page.

        • OptionalpageSize?: number

          Items per page.

      Returns Promise<ProfilesListResponse>

      Paginated ProfilesListResponse (validated via Zod).

      On Zod validation failure.

    • Fetch a single profile by ID.

      Parameters

      Returns Promise<{ id: string; name: string; isDefault?: boolean }>

      When no profile matches profileId.

    • Find a profile by name across all pages.

      Parameters

      Returns Promise<{ id: string; name: string; isDefault?: boolean } | null>

      The matching profile, or null when no profile has that name.

    • Fetch every profile across all pages.

      Internally follows nextToken until the API signals exhaustion. For large tenants this can issue multiple sequential requests; cache the result where possible.

      Parameters

      Returns Promise<{ id: string; name: string; isDefault?: boolean }[]>

    • Return the profile flagged isDefault, falling back to the first profile.

      Parameters

      Returns Promise<{ id: string; name: string; isDefault?: boolean } | null>

      The default Profile, or null when the tenant has no profiles.

    • Resolve a profile name or UUID to a profile UUID suitable for the runProfileId field on a run request.

      • UUID input → returned unchanged with no API call.
      • Name input → looked up via findByName.

      Parameters

      • profileNameOrId: string

        Human-readable profile name (e.g. "Production") or UUID.

      • options: RequestOptions = {}

      Returns Promise<string>

      The matching profile UUID.

      When profileNameOrId is not a UUID and no profile has that name.

      const profileId = await sdk.profiles.resolveId('Production');
      await sdk.tests.startRun(testId, { profileName: profileId });