*Remove schema and keep in relay
This commit is contained in:
parent
1a77bb0469
commit
d94c3c8e5a
|
@ -2,8 +2,5 @@
|
||||||
"name": "@lumeweb/relay-types",
|
"name": "@lumeweb/relay-types",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"main": "dist",
|
"main": "dist",
|
||||||
"type": "module",
|
"type": "module"
|
||||||
"devDependencies": {
|
|
||||||
"ajv": "^8.11.0"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
21
src/index.ts
21
src/index.ts
|
@ -1,4 +1,3 @@
|
||||||
import type { JSONSchemaType } from "ajv";
|
|
||||||
export interface RPCRequest {
|
export interface RPCRequest {
|
||||||
bypassCache?: boolean;
|
bypassCache?: boolean;
|
||||||
module: string;
|
module: string;
|
||||||
|
@ -20,26 +19,6 @@ export interface RPCMethod {
|
||||||
) => Promise<RPCResponse | null>;
|
) => Promise<RPCResponse | null>;
|
||||||
}
|
}
|
||||||
|
|
||||||
// @ts-ignore
|
|
||||||
export const RPC_REQUEST_SCHEMA: JSONSchemaType<RPCRequest> = {
|
|
||||||
type: "object",
|
|
||||||
properties: {
|
|
||||||
module: {
|
|
||||||
type: "string",
|
|
||||||
},
|
|
||||||
method: {
|
|
||||||
type: "string",
|
|
||||||
},
|
|
||||||
data: {
|
|
||||||
type: ["number", "string", "boolean", "object", "array"],
|
|
||||||
},
|
|
||||||
bypassCache: {
|
|
||||||
type: "boolean",
|
|
||||||
nullable: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
export interface StreamFileResponse {
|
export interface StreamFileResponse {
|
||||||
data?: Uint8Array;
|
data?: Uint8Array;
|
||||||
done: boolean;
|
done: boolean;
|
||||||
|
|
Loading…
Reference in New Issue