Skip to content

Commit

Permalink
perf: http plugin import (labring#53)
Browse files Browse the repository at this point in the history
* perf: plugin http import

* chatBox ui

* perf: name
  • Loading branch information
c121914yu committed Mar 20, 2024
1 parent 17922ee commit 59eeb95
Show file tree
Hide file tree
Showing 27 changed files with 1,210 additions and 1,401 deletions.
7 changes: 7 additions & 0 deletions packages/global/core/module/api.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,10 @@ export type HttpQueryType = {
variables: Record<string, any>;
[key: string]: any;
};

/* http node */
export type HttpParamAndHeaderItemType = {
key: string;
type: string;
value: string;
};
33 changes: 19 additions & 14 deletions packages/global/core/plugin/controller.d.ts
Original file line number Diff line number Diff line change
@@ -1,35 +1,40 @@
import type { ModuleItemType } from '../module/type.d';
import { PluginTypeEnum } from './constants';
import { HttpAuthMethodType } from './httpPlugin/type';

export type CreateOnePluginParams = {
name: string;
avatar: string;
intro: string;
modules?: ModuleItemType[];
modules: ModuleItemType[];
parentId: string | null;
type: string;
schema?: string | null;
authMethod?: MethodType | null;
type: `${PluginTypeEnum}`;
metadata?: {
apiSchemaStr?: string;
customHeaders?: string;
};
};
export type UpdatePluginParams = {
id: string;
parentId?: string | null;
name?: string;
avatar?: string;
intro?: string;
modules?: ModuleItemType[];
metadata?: {
apiSchemaStr?: string;
customHeaders?: string;
};
};
export type PluginListItemType = {
parentId: string;
type: string;
_id: string;
parentId: string;
type: `${PluginTypeEnum}`;
name: string;
avatar: string;
intro: string;
schema: string;
authMethod: MethodType | null;
};
export type MethodType = {
name: string;
prefix: string;
key: string;
value: string;
metadata?: {
apiSchemaStr?: string;
customHeaders?: string;
};
};
13 changes: 13 additions & 0 deletions packages/global/core/plugin/httpPlugin/type.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
export type PathDataType = {
name: string;
description: string;
method: string;
path: string;
params: any[];
request: any;
};

export type OpenApiJsonSchema = {
pathData: PathDataType[];
serverPath: string;
};
Loading

0 comments on commit 59eeb95

Please sign in to comment.