-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: udpate types to conform with extension provider
- Loading branch information
Showing
9 changed files
with
90 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { z } from 'zod'; | ||
|
||
import { DefineRpcMethod, RpcRequest, RpcSuccessResponse } from '../rpc/schemas'; | ||
|
||
export const supportedMethodsMethodName = 'supportedMethods' as const; | ||
|
||
export type SupportedMethodsRequest = RpcRequest<typeof supportedMethodsMethodName>; | ||
|
||
export const supportedMethodSchema = z.object({ | ||
name: z.string(), | ||
docsUrl: z.union([z.string(), z.array(z.string())]), | ||
}); | ||
|
||
export const supportedMethodsResponseSchema = z.object({ | ||
documentation: z.string(), | ||
methods: z.array(supportedMethodSchema), | ||
}); | ||
|
||
type SupportedMethodsResponse = RpcSuccessResponse<{ | ||
documentation: string; | ||
methods: z.infer<typeof supportedMethodSchema>[]; | ||
}>; | ||
|
||
export type DefineSupportedMethods = DefineRpcMethod< | ||
SupportedMethodsRequest, | ||
SupportedMethodsResponse | ||
>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.