Logokeyset
  • Product
  • Pricing
  • Docs
  • Contact
LoginGet Started
keyset
Navigation
  • Product
  • Pricing
  • Docs
  • Contact
Login to AccountGet Started Free
keyset

A powerful configuration and content management system for modern applications.

Product

  • Features
  • Pricing
  • Use Cases
  • Documentation

Company

  • About
  • Blog
  • Contact

Legal

  • Privacy Policy
  • Terms of Service

Follow Us

TwitterGitHub

© 2026 Keyset. All rights reserved.

Logokeyset
  • Product
  • Pricing
  • Docs
  • Contact
LoginGet Started
keyset
Navigation
  • Product
  • Pricing
  • Docs
  • Contact
Login to AccountGet Started Free
Docs/Reference/TypeScript Types
Getting Started
Reference
  • Configuration
  • Content API
  • React Integration
  • TypeScript Types
Guides

TypeScript Types

All types are exported from keysetapp:

TypeScript
import type {
  KeysetConfig,
  KeysetMode,
  KeysetResponse,
  ContentEntry,
  ContentType,
  DashboardContentEntry,
} from "keysetapp";

KeysetConfig

Configuration object passed to the Keyset constructor.

TypeScript
interface KeysetConfig {
  apiKey: string;
  cacheTTL: number;
  baseUrl?: string;
  timeout?: number;
  retries?: number;
  cache?: CacheConfig;
}

See Configuration for field descriptions.


CacheConfig

TypeScript
interface CacheConfig {
  enabled?: boolean;
  ttl?: number; // milliseconds
}

KeysetMode

The operating mode inferred from the API key prefix.

TypeScript
type KeysetMode = "public" | "secret";
  • "public" — key starts with pkey_, read-only
  • "secret" — key starts with skey_, read + write

ContentType

The supported types for a remote config entry value.

TypeScript
type ContentType = "string" | "number" | "boolean" | "json" | "url" | "image";

ContentEntry

Shape used when creating a new entry.

TypeScript
interface ContentEntry {
  key: string;
  value: unknown;
  type: ContentType;
}

Example

TypeScript
const entry: ContentEntry = {
  key: "maintenance_mode",
  value: false,
  type: "boolean",
};

TypedContentEntry

A single entry returned by the typed API (no key field — the key is the map key).

TypeScript
interface TypedContentEntry {
  value: unknown;
  type: ContentType;
}

TypedContentResponse

The shape returned by getAll({ typed: true }) and getTypedAll().

TypeScript
type TypedContentResponse = Record<string, TypedContentEntry>;

Example value

JSON
{
  "hero_title":  { "value": "Welcome", "type": "string" },
  "show_banner": { "value": true,      "type": "boolean" },
  "max_results": { "value": 20,        "type": "number" }
}

KeysetResponse<T>

The envelope returned by every HTTP response. The SDK unwraps data for you in the typed getter methods; you receive KeysetResponse<T> directly from the write methods (create, update, delete, dashboardList).

TypeScript
interface KeysetResponse<T> {
  success: boolean;
  message?: string;
  data: T;
}

DashboardContentEntry

Full entry shape returned by dashboardList(), including server-generated metadata.

TypeScript
interface DashboardContentEntry {
  id: string;
  key: string;
  value: unknown;
  type: ContentType;
  createdAt: string; // ISO 8601
  updatedAt: string; // ISO 8601
}

HttpMethod

HTTP verbs used internally by the SDK.

TypeScript
type HttpMethod = "GET" | "POST" | "PUT" | "DELETE";

This type is exported for completeness but is not typically needed by consumers.

PreviousReact Integration
NextError Handling

Use with AI

Copy the full Keyset SDK reference as a ready-to-use AI prompt. Paste it into any AI tool to get instant, accurate integration help.

Resources

  • FAQ
  • Privacy Policy
keyset

A powerful configuration and content management system for modern applications.

Product

  • Features
  • Pricing
  • Use Cases
  • Documentation

Company

  • About
  • Blog
  • Contact

Legal

  • Privacy Policy
  • Terms of Service

Follow Us

TwitterGitHub

© 2026 Keyset. All rights reserved.