@lobehub/chat-plugin-sdk
Version:
Lobe Chat Plugin SDK, help you to build an amazing chat plugin for Lobe Chat
309 lines (308 loc) • 10.1 kB
TypeScript
import { z } from 'zod';
export declare const pluginMetaSchema: z.ZodObject<{
author: z.ZodString;
createdAt: z.ZodString;
homepage: z.ZodString;
identifier: z.ZodString;
manifest: z.ZodString;
meta: z.ZodObject<{
avatar: z.ZodOptional<z.ZodString>;
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
}, "strip", z.ZodTypeAny, {
avatar?: string | undefined;
tags?: string[] | undefined;
}, {
avatar?: string | undefined;
tags?: string[] | undefined;
}>;
schemaVersion: z.ZodNumber;
}, "strip", z.ZodTypeAny, {
author: string;
homepage: string;
identifier: string;
meta: {
avatar?: string | undefined;
tags?: string[] | undefined;
};
createdAt: string;
manifest: string;
schemaVersion: number;
}, {
author: string;
homepage: string;
identifier: string;
meta: {
avatar?: string | undefined;
tags?: string[] | undefined;
};
createdAt: string;
manifest: string;
schemaVersion: number;
}>;
export declare const marketIndexSchema: z.ZodObject<{
plugins: z.ZodArray<z.ZodAny, "many">;
schemaVersion: z.ZodNumber;
}, "strip", z.ZodTypeAny, {
schemaVersion: number;
plugins: any[];
}, {
schemaVersion: number;
plugins: any[];
}>;
export declare const pluginRequestPayloadSchema: z.ZodObject<{
apiName: z.ZodString;
arguments: z.ZodOptional<z.ZodString>;
identifier: z.ZodString;
indexUrl: z.ZodOptional<z.ZodString>;
manifest: z.ZodOptional<z.ZodObject<{
api: z.ZodArray<z.ZodObject<{
description: z.ZodString;
name: z.ZodString;
parameters: z.ZodObject<{
properties: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
required: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
type: z.ZodEnum<["object"]>;
}, "strip", z.ZodTypeAny, {
properties: {};
type: "object";
required?: string[] | undefined;
}, {
properties: {};
type: "object";
required?: string[] | undefined;
}>;
url: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
description: string;
name: string;
parameters: {
properties: {};
type: "object";
required?: string[] | undefined;
};
url?: string | undefined;
}, {
description: string;
name: string;
parameters: {
properties: {};
type: "object";
required?: string[] | undefined;
};
url?: string | undefined;
}>, "many">;
author: z.ZodOptional<z.ZodString>;
createAt: z.ZodOptional<z.ZodString>;
gateway: z.ZodOptional<z.ZodString>;
homepage: z.ZodOptional<z.ZodString>;
identifier: z.ZodString;
meta: z.ZodObject<{
avatar: z.ZodOptional<z.ZodString>;
description: z.ZodOptional<z.ZodString>;
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
title: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
description?: string | undefined;
avatar?: string | undefined;
tags?: string[] | undefined;
title?: string | undefined;
}, {
description?: string | undefined;
avatar?: string | undefined;
tags?: string[] | undefined;
title?: string | undefined;
}>;
openapi: z.ZodOptional<z.ZodString>;
settings: z.ZodOptional<z.ZodObject<{
properties: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
required: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
type: z.ZodEnum<["object"]>;
}, "strip", z.ZodTypeAny, {
properties: {};
type: "object";
required?: string[] | undefined;
}, {
properties: {};
type: "object";
required?: string[] | undefined;
}>>;
systemRole: z.ZodOptional<z.ZodString>;
type: z.ZodOptional<z.ZodEnum<["default", "markdown", "standalone"]>>;
ui: z.ZodOptional<z.ZodObject<{
height: z.ZodOptional<z.ZodNumber>;
mode: z.ZodOptional<z.ZodEnum<["iframe", "module"]>>;
url: z.ZodString;
width: z.ZodOptional<z.ZodNumber>;
}, "strip", z.ZodTypeAny, {
url: string;
height?: number | undefined;
mode?: "iframe" | "module" | undefined;
width?: number | undefined;
}, {
url: string;
height?: number | undefined;
mode?: "iframe" | "module" | undefined;
width?: number | undefined;
}>>;
}, "strip", z.ZodTypeAny, {
api: {
description: string;
name: string;
parameters: {
properties: {};
type: "object";
required?: string[] | undefined;
};
url?: string | undefined;
}[];
identifier: string;
meta: {
description?: string | undefined;
avatar?: string | undefined;
tags?: string[] | undefined;
title?: string | undefined;
};
type?: "default" | "markdown" | "standalone" | undefined;
author?: string | undefined;
createAt?: string | undefined;
gateway?: string | undefined;
homepage?: string | undefined;
openapi?: string | undefined;
settings?: {
properties: {};
type: "object";
required?: string[] | undefined;
} | undefined;
systemRole?: string | undefined;
ui?: {
url: string;
height?: number | undefined;
mode?: "iframe" | "module" | undefined;
width?: number | undefined;
} | undefined;
}, {
api: {
description: string;
name: string;
parameters: {
properties: {};
type: "object";
required?: string[] | undefined;
};
url?: string | undefined;
}[];
identifier: string;
meta: {
description?: string | undefined;
avatar?: string | undefined;
tags?: string[] | undefined;
title?: string | undefined;
};
type?: "default" | "markdown" | "standalone" | undefined;
author?: string | undefined;
createAt?: string | undefined;
gateway?: string | undefined;
homepage?: string | undefined;
openapi?: string | undefined;
settings?: {
properties: {};
type: "object";
required?: string[] | undefined;
} | undefined;
systemRole?: string | undefined;
ui?: {
url: string;
height?: number | undefined;
mode?: "iframe" | "module" | undefined;
width?: number | undefined;
} | undefined;
}>>;
type: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
identifier: string;
apiName: string;
type?: string | undefined;
manifest?: {
api: {
description: string;
name: string;
parameters: {
properties: {};
type: "object";
required?: string[] | undefined;
};
url?: string | undefined;
}[];
identifier: string;
meta: {
description?: string | undefined;
avatar?: string | undefined;
tags?: string[] | undefined;
title?: string | undefined;
};
type?: "default" | "markdown" | "standalone" | undefined;
author?: string | undefined;
createAt?: string | undefined;
gateway?: string | undefined;
homepage?: string | undefined;
openapi?: string | undefined;
settings?: {
properties: {};
type: "object";
required?: string[] | undefined;
} | undefined;
systemRole?: string | undefined;
ui?: {
url: string;
height?: number | undefined;
mode?: "iframe" | "module" | undefined;
width?: number | undefined;
} | undefined;
} | undefined;
arguments?: string | undefined;
indexUrl?: string | undefined;
}, {
identifier: string;
apiName: string;
type?: string | undefined;
manifest?: {
api: {
description: string;
name: string;
parameters: {
properties: {};
type: "object";
required?: string[] | undefined;
};
url?: string | undefined;
}[];
identifier: string;
meta: {
description?: string | undefined;
avatar?: string | undefined;
tags?: string[] | undefined;
title?: string | undefined;
};
type?: "default" | "markdown" | "standalone" | undefined;
author?: string | undefined;
createAt?: string | undefined;
gateway?: string | undefined;
homepage?: string | undefined;
openapi?: string | undefined;
settings?: {
properties: {};
type: "object";
required?: string[] | undefined;
} | undefined;
systemRole?: string | undefined;
ui?: {
url: string;
height?: number | undefined;
mode?: "iframe" | "module" | undefined;
width?: number | undefined;
} | undefined;
} | undefined;
arguments?: string | undefined;
indexUrl?: string | undefined;
}>;
export type PluginRequestPayload = z.infer<typeof pluginRequestPayloadSchema>;