API reference documentation
Summary: Documented all exposed Sandy APIs plugin developers should know about. Honestly didn't proof-read it myself yet, but wanted to publish this diff at least before PTO, so that the information is available to anyone interested / playing with sandy Reviewed By: jknoxville Differential Revision: D22976373 fbshipit-source-id: c30918201d2feeb306ca0d9a3ae1ec10bdf7e2f5
This commit is contained in:
committed by
Facebook GitHub Bot
parent
ecc3a280cf
commit
8a5860cb78
@@ -15,12 +15,12 @@ export type DeviceLogListener = (entry: DeviceLogEntry) => void;
|
|||||||
|
|
||||||
export type DeviceLogEntry = {
|
export type DeviceLogEntry = {
|
||||||
readonly date: Date;
|
readonly date: Date;
|
||||||
|
readonly type: LogLevel;
|
||||||
|
readonly message: string;
|
||||||
readonly pid: number;
|
readonly pid: number;
|
||||||
readonly tid: number;
|
readonly tid: number;
|
||||||
readonly app?: string;
|
readonly app?: string;
|
||||||
readonly type: LogLevel;
|
|
||||||
readonly tag: string;
|
readonly tag: string;
|
||||||
readonly message: string;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export type LogLevel =
|
export type LogLevel =
|
||||||
|
|||||||
@@ -41,14 +41,6 @@ export interface PluginClient<
|
|||||||
*/
|
*/
|
||||||
onDisconnect(cb: () => void): void;
|
onDisconnect(cb: () => void): void;
|
||||||
|
|
||||||
/**
|
|
||||||
* Send a message to the connected client
|
|
||||||
*/
|
|
||||||
send<Method extends keyof Methods>(
|
|
||||||
method: Method,
|
|
||||||
params: Parameters<Methods[Method]>[0],
|
|
||||||
): ReturnType<Methods[Method]>;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Subscribe to a specific event arriving from the device.
|
* Subscribe to a specific event arriving from the device.
|
||||||
*
|
*
|
||||||
@@ -59,6 +51,14 @@ export interface PluginClient<
|
|||||||
event: Event,
|
event: Event,
|
||||||
callback: (params: Events[Event]) => void,
|
callback: (params: Events[Event]) => void,
|
||||||
): void;
|
): void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Send a message to the connected client
|
||||||
|
*/
|
||||||
|
send<Method extends keyof Methods>(
|
||||||
|
method: Method,
|
||||||
|
params: Parameters<Methods[Method]>[0],
|
||||||
|
): ReturnType<Methods[Method]>;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -90,6 +90,7 @@ module.exports = {
|
|||||||
'extending/fb/desktop-plugin-releases',
|
'extending/fb/desktop-plugin-releases',
|
||||||
// TODO: Remove once sandy is public T69061061
|
// TODO: Remove once sandy is public T69061061
|
||||||
'extending/fb/sandy/sandy-plugins',
|
'extending/fb/sandy/sandy-plugins',
|
||||||
|
'extending/fb/sandy/flipper-plugin',
|
||||||
]),
|
]),
|
||||||
],
|
],
|
||||||
'Other Platforms': [
|
'Other Platforms': [
|
||||||
|
|||||||
Reference in New Issue
Block a user