open-index/open-npm huggingface dataset:
npm package: @goldenhippo/builder-funnel-schemas
Description: Shared TypeScript types and Builder.io model definitions for Golden Hippo funnel models
Latest version: 0.5.0

# @goldenhippo/builder-funnel-schemas

Builder.io model definitions and TypeScript content types for Golden Hippo's funnel integration. Same structure as `@goldenhippo/builder-cart-schemas` but scoped to funnel workflows.

## Table of Contents

- [Installation](#installation)
- [Using Content Types](#using-content-types)
- [Exports](#exports)
- [Current Status](#current-status)
- [Development](#development)

## Installation

```bash
npm install @goldenhippo/builder-funnel-schemas
```

## Using Content Types

Once funnel models are implemented, content types will be consumed the same way as cart schemas:

```typescript
import { fetchOneEntry } from '@builder.io/sdk-angular';
// Future imports — types will be added as funnel models are implemented
// import type { BuilderFunnelPageContent } from '@goldenhippo/builder-funnel-schemas/page';

const result = await fetchOneEntry({
  model: 'funnel-page',
  apiKey: environment.builderApiKey,
  userAttributes: { urlPath: '/funnel/step-1' },
});
```

Core types (`ModelShape`, `BuilderIOFieldTypes`, etc.) are available from `@goldenhippo/builder-types`.

## Exports

The package provides multiple entry points (currently empty, will be populated as models are added):

| Entry Point                                   | Description                                        |
| --------------------------------------------- | -------------------------------------------------- |
| `@goldenhippo/builder-funnel-schemas`         | All model creators and content types               |
| `@goldenhippo/builder-funnel-schemas/data`    | Data model creators and content types              |
| `@goldenhippo/builder-funnel-schemas/page`    | Page model creator and content types               |
| `@goldenhippo/builder-funnel-schemas/section` | Section/component model creators and content types |

## Current Status

This package is scaffolded with the same structure as `builder-cart-schemas` but does not yet contain any model definitions. Models will be added as funnel features are implemented. The directory structure is ready:

- `src/data/` — Funnel data models (empty)
- `src/section/` — Funnel section/component models (empty)
- `src/page/` — Funnel page models (empty)

See `@goldenhippo/builder-cart-schemas` for reference on the model pattern.

## Development

```bash
npm run build        # Build with tsup (CJS + ESM + declarations)
npm run dev          # Watch mode
npm run typecheck    # Type-check with tsc
npm run test         # Run tests with vitest
npm run lint         # Lint with eslint
```
npm package: @goldenhippo/builder-types
Description: Shared Builder.io type definitions for Golden Hippo schema packages
Latest version: 0.4.0

# @goldenhippo/builder-types

Shared Builder.io type definitions used by all Golden Hippo schema packages.

## Table of Contents

- [Installation](#installation)
- [Types](#types)
  - [ModelShape](#modelshape)
  - [BuilderResponseBaseData](#builderresponsebasedata)
  - [BuilderIOFieldTypes](#builderiofieldtypes)
- [Usage](#usage)
- [Development](#development)

## Installation

```bash
npm install @goldenhippo/builder-types
```

## Types

### ModelShape

Defines the structure of a Builder.io content model for registration via the API:

```typescript
interface ModelShape {
  name: string; // Unique model identifier
  displayName: string; // UI display name
  kind: 'data' | 'component' | 'page';
  helperText?: string;
  contentTitleField?: string; // Which field displays as the title
  fields: BuilderIOFieldTypes[];
  editingUrlLogic?: string; // Custom URL logic (JavaScript)
  hideFromUI?: boolean;
}
```

### BuilderResponseBaseData

Base interface for all content type `data` properties. Extends Builder.io's content structure:

```typescript
interface BuilderResponseBaseData {
  blocks?: BuilderElement[];
  inputs?: Input[];
  state?: Record<string, any>;
  [key: string]: any;
}
```

### BuilderIOFieldTypes

Union type covering all Builder.io field configurations:

- **Text fields** — `text`, `longText`, `html`, `boolean`, `color`, `url`, `timestamp`
- **File fields** — with `allowedFileTypes` and `showTemplatePicker`
- **Reference fields** — link to other models via `modelId`
- **List fields** — arrays with `subFields`
- **Object fields** — nested objects with `subFields`
- **Number fields** — numeric values
- **Select fields** — dropdown with `enum` values
- **Tags fields** — tag input
- **UIBlocks fields** — Builder.io visual blocks

## Usage

```typescript
import type { ModelShape, BuilderIOFieldTypes, BuilderResponseBaseData } from '@goldenhippo/builder-types';

// Define a custom model
const model: ModelShape = {
  name: 'my-model',
  displayName: 'My Model',
  kind: 'data',
  fields: [
    { name: 'title', type: 'text', required: true },
    { name: 'image', type: 'file', allowedFileTypes: ['jpeg', 'png'] },
  ],
};

// Extend base data for custom content types
type MyContentData = BuilderResponseBaseData & {
  title: string;
  image?: string;
};
```

## Development

```bash
npm run build        # Build with tsup (CJS + ESM + declarations)
npm run dev          # Watch mode
npm run typecheck    # Type-check with tsc
npm run lint         # Lint with eslint
```