New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@embed-ai/types

Package Overview
Dependencies
Maintainers
4
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@embed-ai/types

TypeScript types for Embed AI APIs

latest
Source
npmnpm
Version
0.1.4
Version published
Maintainers
4
Created
Source

@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

FAQs

Package last updated on 15 Feb 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts