UNPKG

@lobehub/chat-plugin-sdk

Version:

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

59 lines (57 loc) 2.18 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/market.ts var market_exports = {}; __export(market_exports, { marketIndexSchema: () => marketIndexSchema, pluginMetaSchema: () => pluginMetaSchema, pluginRequestPayloadSchema: () => pluginRequestPayloadSchema }); module.exports = __toCommonJS(market_exports); var import_zod = require("zod"); var import_manifest = require("./manifest"); var pluginMetaSchema = import_zod.z.object({ author: import_zod.z.string(), createdAt: import_zod.z.string(), homepage: import_zod.z.string(), identifier: import_zod.z.string(), manifest: import_zod.z.string(), meta: import_zod.z.object({ avatar: import_zod.z.string().optional(), tags: import_zod.z.array(import_zod.z.string()).optional() }), schemaVersion: import_zod.z.number() }); var marketIndexSchema = import_zod.z.object({ plugins: import_zod.z.array(import_zod.z.any()), schemaVersion: import_zod.z.number() }); var pluginRequestPayloadSchema = import_zod.z.object({ apiName: import_zod.z.string(), arguments: import_zod.z.string().optional(), identifier: import_zod.z.string(), indexUrl: import_zod.z.string().optional(), manifest: import_manifest.pluginManifestSchema.optional(), type: import_zod.z.string().optional() }); // Annotate the CommonJS export names for ESM import in node: 0 && (module.exports = { marketIndexSchema, pluginMetaSchema, pluginRequestPayloadSchema });