Typesense/Key.ts

typesense-js · src/Typesense/Key.ts · typescript · Apache-2.0
analytics

TypeScript class for managing API keys with CRUD operations in Typesense client.

// Source: https://github.com/typesense/typesense-js | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
import ApiCall from "./ApiCall";
import Keys from "./Keys";

export interface KeyCreateSchema {
  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
  actions: Actions[] | (string & {})[];
  collections: string[];
  description?: string;
  value?: string;
  value_prefix?: string;
  expires_at?: number;
  autodelete?: boolean;
}

type CRUDActions = "create" | "delete" | "get" | "list" | "*";
type DocumentActionTypes =
  | "search"
  | "get"
  | "create"
  | "upsert"
  | "update"
  | "delete"
  | "import"
  | "export"
  | "*";

type CRUDFeatures =
  | "collections"
 

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key