UNPKG

@seamapi/blueprint

Version:

Build tools for the Seam API using this blueprint.

84 lines (83 loc) 4.02 kB
import { z } from 'zod'; import type { Resource as BlueprintResource } from '../../lib/blueprint.js'; import { type SyntaxName } from './syntax.js'; export declare const ResourceSampleDefinitionSchema: z.ZodObject<{ title: z.ZodString; description: z.ZodString; resource_type: z.ZodString; properties: z.ZodRecord<z.ZodString, z.ZodType<import("../../lib/json.js").Json, z.ZodTypeDef, import("../../lib/json.js").Json>>; }, "strip", z.ZodTypeAny, { description: string; properties: Record<string, import("../../lib/json.js").Json>; title: string; resource_type: string; }, { description: string; properties: Record<string, import("../../lib/json.js").Json>; title: string; resource_type: string; }>; export type ResourceSampleDefinitionInput = z.input<typeof ResourceSampleDefinitionSchema>; export type ResourceSampleDefinition = z.output<typeof ResourceSampleDefinitionSchema>; export interface ResourceSampleContext { resource: Omit<BlueprintResource, 'resourceSamples'>; schemas: Record<string, unknown>; formatCode: (content: string, syntax: SyntaxName) => Promise<string>; } declare const ResourceSchema: z.ZodRecord<z.ZodEnum<["javascript", "python", "php", "ruby", "seam_cli", "go", "java", "csharp", "curl"]>, z.ZodObject<{ title: z.ZodString; resource_data: z.ZodString; resource_data_syntax: z.ZodEnum<["javascript", "json", "python", "php", "ruby", "bash", "go", "java", "csharp"]>; }, "strip", z.ZodTypeAny, { title: string; resource_data: string; resource_data_syntax: "javascript" | "python" | "php" | "ruby" | "go" | "java" | "csharp" | "json" | "bash"; }, { title: string; resource_data: string; resource_data_syntax: "javascript" | "python" | "php" | "ruby" | "go" | "java" | "csharp" | "json" | "bash"; }>>; export type Resource = z.infer<typeof ResourceSchema>; declare const _ResourceSampleSchema: z.ZodObject<{ title: z.ZodString; description: z.ZodString; resource_type: z.ZodString; properties: z.ZodRecord<z.ZodString, z.ZodType<import("../../lib/json.js").Json, z.ZodTypeDef, import("../../lib/json.js").Json>>; } & { resource: z.ZodRecord<z.ZodEnum<["javascript", "python", "php", "ruby", "seam_cli", "go", "java", "csharp", "curl"]>, z.ZodObject<{ title: z.ZodString; resource_data: z.ZodString; resource_data_syntax: z.ZodEnum<["javascript", "json", "python", "php", "ruby", "bash", "go", "java", "csharp"]>; }, "strip", z.ZodTypeAny, { title: string; resource_data: string; resource_data_syntax: "javascript" | "python" | "php" | "ruby" | "go" | "java" | "csharp" | "json" | "bash"; }, { title: string; resource_data: string; resource_data_syntax: "javascript" | "python" | "php" | "ruby" | "go" | "java" | "csharp" | "json" | "bash"; }>>; }, "strip", z.ZodTypeAny, { description: string; properties: Record<string, import("../../lib/json.js").Json>; title: string; resource: Partial<Record<"javascript" | "python" | "php" | "ruby" | "seam_cli" | "go" | "java" | "csharp" | "curl", { title: string; resource_data: string; resource_data_syntax: "javascript" | "python" | "php" | "ruby" | "go" | "java" | "csharp" | "json" | "bash"; }>>; resource_type: string; }, { description: string; properties: Record<string, import("../../lib/json.js").Json>; title: string; resource: Partial<Record<"javascript" | "python" | "php" | "ruby" | "seam_cli" | "go" | "java" | "csharp" | "curl", { title: string; resource_data: string; resource_data_syntax: "javascript" | "python" | "php" | "ruby" | "go" | "java" | "csharp" | "json" | "bash"; }>>; resource_type: string; }>; export type ResourceSample = z.output<typeof _ResourceSampleSchema>; export declare const createResourceSample: (resourceSampleDefinition: ResourceSampleDefinition, context: ResourceSampleContext) => Promise<ResourceSample>; export {};