typegen-setup

Generate TypeScript types and Zod validators from FileMaker layouts or OData metadata.

17|5|Updated Sep 24, 2024
One-click install
npx skills add https://github.com/proofgeist/proofkit --skill typegen-setup
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: typegen-setup
Source: https://github.com/proofgeist/proofkit/tree/main/packages/typegen/skills/typegen-setup
Command: npx skills add https://github.com/proofgeist/proofkit --skill typegen-setup

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill automates the generation of TypeScript types and Zod validators from FileMaker layouts and OData schemas, ensuring your client-side code accurately reflects your database structure and reducing manual type definition errors.

Core Features & Use Cases

  • Type Generation: Creates TypeScript types from FileMaker Data API layouts or OData table definitions.
  • Validator Generation: Generates Zod schemas for data validation, supporting both v3 and v4.
  • Override Files: Allows customization of generated types and validators without losing changes on regeneration.
  • Use Case: Automatically generate types for your FileMaker Customers and Invoices layouts, then use the generated Zod schemas to validate incoming data from the Data API, preventing runtime errors and improving developer experience.

Quick Start

Run npx @proofkit/typegen to initialize the type generation process for your project.

Frequently Asked Questions about typegen-setup

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate TypeScript types from FileMaker layouts?

You can generate TypeScript types from FileMaker layouts by running the type generation tool, which reads your Data API or OData schema and outputs type definitions and Zod validators automatically.

Can I generate Zod validators from FileMaker OData metadata?

Yes, you can generate Zod validators from FileMaker OData metadata. The tool supports both Data API and OData configurations to synchronize your database schema and create Zod schemas for data validation.

How do I customize generated TypeScript types without losing changes on regeneration?

You can customize generated TypeScript types without losing changes on regeneration by using override files, which allow you to modify types and validators while preserving your customizations during subsequent schema regenerations.

Does typegen-setup support environment variables for FileMaker Data API configuration?

Yes, the type generation process supports environment variable integration for FileMaker Data API configuration, allowing secure schema synchronization without hardcoding credentials in your config file.

What is the best way to keep TypeScript types synchronized with a FileMaker database schema?

The best way to keep TypeScript types synchronized with a FileMaker database schema is to use an automated type generation tool that reads Data API layouts or OData metadata and outputs matching type definitions and Zod validators.

Why are my generated FileMaker Zod validators failing to validate Data API responses?

Generated FileMaker Zod validators may fail to validate Data API responses if your proofkit-typegen-config.jsonc is misconfigured or your database schema has changed, requiring you to regenerate types and validators to match the current layout structure.