UNPKG

@kingstinct/react-native-healthkit

Version:
20 lines (19 loc) 1.26 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _nativeTypes = _interopRequireDefault(require("../native-types")); function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } /** * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614168-savecategorysample save(_:withCompletion:) (Apple Docs)} * @see {@link https://developer.apple.com/documentation/healthkit/saving_data_to_healthkit Saving data to HealthKit (Apple Docs)} */ async function saveCategorySample(identifier, value, options) { const start = (options === null || options === void 0 ? void 0 : options.start) || (options === null || options === void 0 ? void 0 : options.end) || new Date(); const end = (options === null || options === void 0 ? void 0 : options.end) || (options === null || options === void 0 ? void 0 : options.start) || new Date(); const metadata = (options === null || options === void 0 ? void 0 : options.metadata) || {}; return _nativeTypes.default.saveCategorySample(identifier, value, start.toISOString(), end.toISOString(), metadata || {}); } var _default = exports.default = saveCategorySample; //# sourceMappingURL=saveCategorySample.js.map