Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@airtop/json-schema-adapter-typebox

Package Overview
Dependencies
Maintainers
8
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@airtop/json-schema-adapter-typebox

Typebox adapter for JSON Schema output for use with the Airtop SDK

latest
Source
npmnpm
Version
1.0.0-alpha2.2
Version published
Maintainers
8
Created
Source

Typebox JSON Schema Adapter for the Airtop SDK

This schema adapter allows specifying typebox objects as input when an Airtop SDK method requires a JSON schema.

Installation

npm install @airtop/sdk @airtop/json-schema-adapter-typebox @sinclair/typebox

Usage

import { AirtopClient } from "@airtop/sdk";
import { TypeboxSchemaAdapter } from "@airtop/json-schema-adapter-typebox";
import { Type } from "@sinclair/typebox";

const schema = Type.Object(
  {
    results: Type.Optional(
      Type.Array(
        Type.Object(
          {
            name: Type.String({ description: "The name of the product" }),
            description: Type.String({ description: "A brief description of the product's purpose" }),
            benefit: Type.String({ description: "How the product supports developers" }),
          },
          { additionalProperties: false },
        ),
      ),
    ),
    error: Type.Optional(Type.String({ minLength: 1, description: "Error message in case of failure" })),
  },
  { additionalProperties: false },
);

const client = new AirtopClient({
  outputSchemaAdapter: new TypeboxSchemaAdapter(),
});

await client
  .withSessionId("session-id")
  .withWindowId("window-id")
  .pageQuery("title of the page", {
    configuration: {
      outputSchema: schema,
    }
  })

Keywords

airtop

FAQs

Package last updated on 18 Jul 2025

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