or run

tessl search
Log in

Version

Files

tile.json

task.mdevals/scenario-5/

User Profile Lookup

Expose a small utility that converts workspace user identifiers into concise profile summaries while leaning on the existing client library for remote data.

Capabilities

Fetch single profile

  • Returns the profile summary for a known user identifier with status set to "found". @test

Batch lookup with ordering

  • Resolves multiple user identifiers in one call, returning summaries in the same order as the input and skipping duplicate network requests for repeated identifiers. @test

Missing users handled explicitly

  • When an identifier is not recognized by the workspace, the result includes that identifier with status set to "not_found" and email/avatarUrl left null while other results still return "found". @test

Request option passthrough

  • Optional per-call request options (for example, custom headers or timeouts) are forwarded to the underlying client when fetching users. @test

Implementation

@generates

API

export interface UserProfile {
  id: string;
  fullName: string;
  email: string | null;
  avatarUrl: string | null;
  status: "found" | "not_found";
}

export interface FetchOptions {
  requestOptions?: Record<string, unknown>;
}

/**
 * Fetches user profiles for the provided identifiers, preserving input order and
 * returning a single entry per identifier even when duplicates are supplied.
 *
 * fullName combines available name fields from the remote user record,
 * falling back to whatever display name the client exposes.
 */
export async function fetchUserProfiles(
  userIds: string[],
  options?: FetchOptions
): Promise<UserProfile[]>;

Dependencies { .dependencies }

notion-client { .dependency }

Provides the workspace client used to retrieve user records and associated metadata by identifier. Request options are passed through when looking up users.

@satisfied-by