chat-plugin-sdk/docs/api/plugin-meta-store.md
Arvin Xu 74d20a2069
📝 docs: add plugin docs for the new third stage (#39)
* 📝 docs: update docs

* 📝 docs: update plugin docs

* 📝 docs: update plugin docs

* 📝 docs: update plugin docs

* 📝 docs: update plugin docs

* 📝 docs: update plugin docs

* 📝 docs: add plugin docs

* 📝 docs: add plugin en docs

* 📝 docs: fix plugin docs
2024-01-01 18:05:38 +08:00

1.9 KiB

title group atomId description
pluginMetaSchema Schema pluginMetaSchema Schema for plugin meta data

Schema for plugin metadata.

Usage Example

import { pluginMetaSchema } from '@lobehub/chat-plugin-sdk';

const meta = {
  author: 'John Doe',
  createAt: '2022-01-01',
  homepage: 'http://example.com',
  identifier: 'plugin-identifier',
  manifest: 'http://example.com/manifest',
  meta: {
    avatar: 'http://example.com/avatar.png',
    tags: ['tag1', 'tag2'],
  },
  schemaVersion: 1,
};

const result = pluginMetaSchema.parse(meta);

console.log(result);

// 输出:{ author: 'John Doe', createAt: '2022-01-01', homepage: 'http://example.com', identifier: 'plugin-identifier', manifest: 'http://example.com/manifest', meta: { avatar: 'http://example.com/avatar.png', tags: ['tag1', 'tag2'] }, schemaVersion: 1 }

Schema Definition

Property Type Description
author string Author of the plugin
createAt string Creation date of the plugin
homepage string Homepage URL of the plugin
identifier string Identifier of the plugin
manifest string URL of the plugin's description file
meta object(optional) Metadata of the plugin
meta.avatar string(optional) URL of the plugin author's avatar
meta.tags string[](optional) List of tags for the plugin
schemaVersion number Version number of the data schema for plugin metadata