UNPKG

@lobehub/chat-plugin-sdk

Version:

Lobe Chat Plugin SDK, help you to build an amazing chat plugin for Lobe Chat

67 lines (65 loc) 2.54 kB
var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __hasOwnProp = Object.prototype.hasOwnProperty; var __export = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/schema/manifest.ts var manifest_exports = {}; __export(manifest_exports, { pluginApiSchema: () => pluginApiSchema, pluginManifestSchema: () => pluginManifestSchema }); module.exports = __toCommonJS(manifest_exports); var import_zod = require("zod"); var JSONSchema = import_zod.z.object({ properties: import_zod.z.object({}), required: import_zod.z.array(import_zod.z.string()).optional(), type: import_zod.z.enum(["object"]) }); var pluginApiSchema = import_zod.z.object({ description: import_zod.z.string(), name: import_zod.z.string(), parameters: JSONSchema, url: import_zod.z.string().url().optional() }); var pluginManifestSchema = import_zod.z.object({ api: import_zod.z.array(pluginApiSchema), author: import_zod.z.string().optional(), createAt: import_zod.z.string().optional(), gateway: import_zod.z.string().optional(), homepage: import_zod.z.string().optional(), identifier: import_zod.z.string(), meta: import_zod.z.object({ avatar: import_zod.z.string().optional(), description: import_zod.z.string().optional(), tags: import_zod.z.array(import_zod.z.string()).optional(), title: import_zod.z.string().optional() }), openapi: import_zod.z.string().optional(), settings: JSONSchema.optional(), systemRole: import_zod.z.string().optional(), type: import_zod.z.enum(["default", "markdown", "standalone"]).optional(), ui: import_zod.z.object({ height: import_zod.z.number().optional(), mode: import_zod.z.enum(["iframe", "module"]).optional(), url: import_zod.z.string(), width: import_zod.z.number().optional() }).optional() }); // Annotate the CommonJS export names for ESM import in node: 0 && (module.exports = { pluginApiSchema, pluginManifestSchema });