diff --git a/Libraries/Reliability/UserFlow.js b/Libraries/Reliability/UserFlow.js index e2e2a62e0162ae..880c9dbed03c47 100644 --- a/Libraries/Reliability/UserFlow.js +++ b/Libraries/Reliability/UserFlow.js @@ -17,6 +17,17 @@ export type FlowId = { instanceKey: number, }; +export type PointData = $Shape<{ + string: ?{[string]: string, ...}, + int: ?{[string]: number, ...}, + double: ?{[string]: number, ...}, + bool: ?{[string]: boolean, ...}, + string_array: ?{[string]: $ReadOnlyArray, ...}, + int_array: ?{[string]: $ReadOnlyArray, ...}, + double_array: ?{[string]: $ReadOnlyArray, ...}, + bool_array: ?{[string]: $ReadOnlyArray, ...}, +}>; + /** * API for tracking reliability of your user interactions * @@ -79,12 +90,13 @@ const UserFlow = { } }, - addPoint(flowId: FlowId, pointName: string): void { + addPoint(flowId: FlowId, pointName: string, data: ?PointData = null): void { if (global.nativeUserFlowAddPoint) { global.nativeUserFlowAddPoint( flowId.markerId, flowId.instanceKey, pointName, + data, ); } },