UNPKG

@tanstack/cli

Version:
166 lines (165 loc) 5.33 kB
import { z } from 'zod'; declare const LibrariesResponseSchema: z.ZodObject<{ libraries: z.ZodArray<z.ZodObject<{ id: z.ZodString; name: z.ZodString; tagline: z.ZodString; description: z.ZodOptional<z.ZodString>; frameworks: z.ZodArray<z.ZodString, "many">; latestVersion: z.ZodString; latestBranch: z.ZodOptional<z.ZodString>; availableVersions: z.ZodArray<z.ZodString, "many">; repo: z.ZodString; docsRoot: z.ZodOptional<z.ZodString>; defaultDocs: z.ZodOptional<z.ZodString>; docsUrl: z.ZodOptional<z.ZodString>; githubUrl: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { id: string; name: string; tagline: string; frameworks: string[]; latestVersion: string; availableVersions: string[]; repo: string; description?: string | undefined; latestBranch?: string | undefined; docsRoot?: string | undefined; defaultDocs?: string | undefined; docsUrl?: string | undefined; githubUrl?: string | undefined; }, { id: string; name: string; tagline: string; frameworks: string[]; latestVersion: string; availableVersions: string[]; repo: string; description?: string | undefined; latestBranch?: string | undefined; docsRoot?: string | undefined; defaultDocs?: string | undefined; docsUrl?: string | undefined; githubUrl?: string | undefined; }>, "many">; groups: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>; groupNames: z.ZodRecord<z.ZodString, z.ZodString>; }, "strip", z.ZodTypeAny, { libraries: { id: string; name: string; tagline: string; frameworks: string[]; latestVersion: string; availableVersions: string[]; repo: string; description?: string | undefined; latestBranch?: string | undefined; docsRoot?: string | undefined; defaultDocs?: string | undefined; docsUrl?: string | undefined; githubUrl?: string | undefined; }[]; groups: Record<string, string[]>; groupNames: Record<string, string>; }, { libraries: { id: string; name: string; tagline: string; frameworks: string[]; latestVersion: string; availableVersions: string[]; repo: string; description?: string | undefined; latestBranch?: string | undefined; docsRoot?: string | undefined; defaultDocs?: string | undefined; docsUrl?: string | undefined; githubUrl?: string | undefined; }[]; groups: Record<string, string[]>; groupNames: Record<string, string>; }>; declare const PartnersResponseSchema: z.ZodObject<{ partners: z.ZodArray<z.ZodObject<{ id: z.ZodString; name: z.ZodString; tagline: z.ZodOptional<z.ZodString>; description: z.ZodString; category: z.ZodString; categoryLabel: z.ZodString; libraries: z.ZodArray<z.ZodString, "many">; url: z.ZodString; }, "strip", z.ZodTypeAny, { id: string; name: string; description: string; libraries: string[]; category: string; categoryLabel: string; url: string; tagline?: string | undefined; }, { id: string; name: string; description: string; libraries: string[]; category: string; categoryLabel: string; url: string; tagline?: string | undefined; }>, "many">; categories: z.ZodArray<z.ZodString, "many">; categoryLabels: z.ZodRecord<z.ZodString, z.ZodString>; }, "strip", z.ZodTypeAny, { partners: { id: string; name: string; description: string; libraries: string[]; category: string; categoryLabel: string; url: string; tagline?: string | undefined; }[]; categories: string[]; categoryLabels: Record<string, string>; }, { partners: { id: string; name: string; description: string; libraries: string[]; category: string; categoryLabel: string; url: string; tagline?: string | undefined; }[]; categories: string[]; categoryLabels: Record<string, string>; }>; export declare const LIBRARY_GROUPS: readonly ["state", "headlessUI", "performance", "tooling"]; export type LibrariesResponse = z.infer<typeof LibrariesResponseSchema>; export type PartnersResponse = z.infer<typeof PartnersResponseSchema>; export declare function fetchLibraries(): Promise<LibrariesResponse>; export declare function fetchPartners(): Promise<PartnersResponse>; export declare function fetchDocContent(repo: string, branch: string, filePath: string): Promise<string | null>; export declare function searchTanStackDocs({ query, library, framework, limit, }: { query: string; library?: string; framework?: string; limit?: number; }): Promise<{ query: string; totalHits: number; results: Array<{ title: string; url: string; snippet: string; library: string; breadcrumb: Array<string>; }>; }>; export {};