npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@embed-ai/types

v0.1.4

Published

TypeScript types for Embed AI APIs

Readme

@embed-ai/types

TypeScript types for Embed AI APIs, providing comprehensive type definitions for Farcaster feed management, AI labeling, and content filtering.

Installation

bun install @embed-ai/types effect

Note: effect is a peer dependency and must be installed alongside @embed-ai/types

Usage

Basic Import (All Types)

import type { ForYou, ForYouResponse, FeedOptions } from '@embed-ai/types'

Organized Imports by Category

Feed Types

import type { ForYou, ForYouReranked, popular, trendingNow } from '@embed-ai/types/feeds'

AI Labeling Types

import type { LabelsForItems, LabelsForText, LabelsForUsers } from '@embed-ai/types/labels'

Search and Filtering Types

import type { SemanticSearch, Similar, TopicParam, FiltersParam } from '@embed-ai/types/search'

User Feed Types

import type { UsersFeedForChannel, UsersFeedForItem, UsersFeedForTopic } from '@embed-ai/types/users'

Response Types

import type { ForYouResponse, ForYouApiResponse } from '@embed-ai/types/responses'

Effect Schemas for Runtime Validation

The package also exports Effect schemas for runtime validation and parsing:

import { ForYou, ForYouEncoded } from '@embed-ai/types'

// Runtime validation
const result = ForYou.decode(inputData)
if (result._tag === 'Right') {
  // Valid data
  const validatedData = result.right
} else {
  // Invalid data
  console.error('Validation failed:', result.left)
}

// Encoding for API requests
const encodedData = ForYouEncoded.encode(data)

Available Schemas

  • Request Schemas: ForYou, ForYouReranked, popular, trendingNow, etc.
  • Response Schemas: ForYouResponse, ForYouApiResponse
  • Filter Schemas: FiltersParam, PromotionFiltersParam, ScoringParam
  • Label Schemas: LabelsForItems, LabelsForText, LabelsForUsers
  • Search Schemas: SemanticSearch, Similar, TopicParam

Each schema has a corresponding *Encoded version for API serialization.

Feed Management Types

import type { 
  CreateFeedOptions, 
  FeedCreateUpdateResponse, 
  FeedGetResponse,
  ListFeedsResponse,
  UpdateFeedOptions 
} from '@embed-ai/types'

Complete Example

import type { 
  ForYou, 
  ForYouResponse, 
  FiltersParam,
  LabelsForItems 
} from '@embed-ai/types'

// Or use organized imports
import type { ForYou, ForYouResponse } from '@embed-ai/types/feeds'
import type { FiltersParam } from '@embed-ai/types/search'
import type { LabelsForItems } from '@embed-ai/types/labels'

// Runtime validation
import { ForYou as ForYouSchema } from '@embed-ai/types'
const validationResult = ForYouSchema.decode(requestData)

Type Categories

Request Parameters

  • Feed Types: ForYou, ForYouReranked, popular, trendingNow
  • Filter Types: FiltersParam, PromotionFiltersParam, ScoringParam
  • Search Types: SemanticSearch, Similar, TopicParam
  • User Feed Types: UsersFeedForChannel, UsersFeedForItem, UsersFeedForTopic, UsersFeedSimilar, UsersSemanticSearch
  • Label Types: LabelsForItems, LabelsForText, LabelsForUsers, LabelsTopItems, LabelsTopUsers

Response Types

  • Feed Responses: ForYouResponse, ForYouApiResponse
  • Feed Management: FeedCreateUpdateResponse, FeedGetResponse, ListFeedsResponse

Configuration Types

  • Feed Management: CreateFeedOptions, UpdateFeedOptions
  • Parameters: AILabelsFilterParam, ColdstartParam, Empty, FallbackFeedsParam, FeedDiversityConfigParam

Package Structure

The package provides both a flat export (all types from root) and organized subpath exports:

  • @embed-ai/types - All types and schemas
  • @embed-ai/types/feeds - Feed-related types and schemas
  • @embed-ai/types/labels - AI labeling types and schemas
  • @embed-ai/types/search - Search and filtering types and schemas
  • @embed-ai/types/users - User feed types and schemas
  • @embed-ai/types/responses - Response types and schemas

License

BSD-3-Clause