@upstart.gg/sdk
Version:
You can test the CLI without recompiling by running:
26 lines (24 loc) • 1.17 kB
JavaScript
import { StringEnum } from "./utils/string-enum.js";
import { Type } from "@sinclair/typebox";
//#region src/shared/images.ts
const imageSearchSchema = Type.Object({
query: Type.String({ description: "The search query for finding images (e.g. \"mountain landscape\", \"coffee shop\")" }),
orientation: Type.Optional(StringEnum([
"landscape",
"portrait",
"squarish"
], { description: "Filter by photo orientation" }))
});
const imageResultsSchema = Type.Array(Type.Object({
provider: Type.String({ description: "The image provider (e.g. unsplash, pexels)" }),
description: Type.String({ description: "A brief description of the image" }),
url: Type.String({ description: "The URL of the image" }),
blurHash: Type.Optional(Type.String({ description: "The blur hash of the image" })),
author: Type.Optional(Type.Object({
name: Type.String({ description: "The name of the user who uploaded the image" }),
profileUrl: Type.String({ description: "The profile URL of the user who uploaded the image" })
}))
}), { title: "Array of image search results" });
//#endregion
export { imageResultsSchema, imageSearchSchema };
//# sourceMappingURL=images.js.map