All types are exported from keysetapp:
TypeScriptimport type { KeysetConfig, KeysetMode, KeysetResponse, ContentEntry, ContentType, DashboardContentEntry, } from "keysetapp";
KeysetConfigConfiguration object passed to the Keyset constructor.
TypeScriptinterface KeysetConfig { apiKey: string; cacheTTL: number; baseUrl?: string; timeout?: number; retries?: number; cache?: CacheConfig; }
See Configuration for field descriptions.
CacheConfigTypeScriptinterface CacheConfig { enabled?: boolean; ttl?: number; // milliseconds }
KeysetModeThe operating mode inferred from the API key prefix.
TypeScripttype KeysetMode = "public" | "secret";
"public" — key starts with pkey_, read-only"secret" — key starts with skey_, read + writeContentTypeThe supported types for a remote config entry value.
TypeScripttype ContentType = "string" | "number" | "boolean" | "json" | "url" | "image";
ContentEntryShape used when creating a new entry.
TypeScriptinterface ContentEntry { key: string; value: unknown; type: ContentType; }
Example
TypeScriptconst entry: ContentEntry = { key: "maintenance_mode", value: false, type: "boolean", };
TypedContentEntryA single entry returned by the typed API (no key field — the key is the map key).
TypeScriptinterface TypedContentEntry { value: unknown; type: ContentType; }
TypedContentResponseThe shape returned by getAll({ typed: true }) and getTypedAll().
TypeScripttype 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).
TypeScriptinterface KeysetResponse<T> { success: boolean; message?: string; data: T; }
DashboardContentEntryFull entry shape returned by dashboardList(), including server-generated metadata.
TypeScriptinterface DashboardContentEntry { id: string; key: string; value: unknown; type: ContentType; createdAt: string; // ISO 8601 updatedAt: string; // ISO 8601 }
HttpMethodHTTP verbs used internally by the SDK.
TypeScripttype HttpMethod = "GET" | "POST" | "PUT" | "DELETE";
This type is exported for completeness but is not typically needed by consumers.