Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fitbit-sdk-types

Package Overview
Dependencies
Maintainers
1
Versions
79
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fitbit-sdk-types - npm Package Compare versions

Comparing version 5.0.0 to 6.0.0

2

package.json
{
"name": "fitbit-sdk-types",
"version": "5.0.0",
"version": "6.0.0",
"author": "Sergio Morchón Poveda <sergio.morchon@outlook.com>",

@@ -5,0 +5,0 @@ "description": "Types for Fitbit SDK.",

declare module 'document' {
/**
* The History interface allows manipulation of the document views history, that is the current view stack loaded in the app.
* @since 5.0
*/
export interface History {
/** Integer number representing the number of currently loaded views. */
readonly length: number;
/**
* Make the view below the current one in the location history stack visible. Equivalent with history.go(-1).
* @throws {RangeError} Throws a RangeError if there's no other loaded view.
*/
back(): void;
/**
* Make the view above the current one in the location history stack visible. Equivalent with history.go(1).
* @throws {RangeError} Throws a RangeError if there's no other view in forward history. one.
*/
forward(): void;
/**
* Make a specific view from the location history visible, relative to the topmost visible view.
* @param delta The view position in the location history to which you want to move, relative to the current view. A negative value moves backwards, a positive value moves forwards. So, for example, history.go(2) will display the view that's forward two positions and history.go(-2) will display the view that's backward two positions.
* @throws {RangeError} Throws a RangeError if the position is not available in the history.
*/
go(delta?: number): void;
}
type EventHandler = (event: Event) => boolean;
/**
* The Location interface allows manipulation of the application's views.
* @since 4.0
*/
export interface Location {
/**
* The path of the currently loaded SVG file.
* NOTE: Always starts with a slash, e.g. `/file.view`
*/
readonly pathname: string;
/**
* Load a new SVG file and place it on top of the view stack.
*
* NOTE: Assuming the current view is at a certain position within the location history stack, all the views on top and references to their elements will be freed. Accessing the UI elements after their references have been freed results in an error.
*
* NOTE: When loading a new view (as with this method), references to elements in the old view are kept, but document getters can only access elements within the current view. In order to access old elements, the currently visible view needs to be updated using `document.history` methods.
*
* NOTE: All document and element handlers and listeners will be cleared when the promise returned by `document.location.assign` is resolved. Examples of handlers and listeners that will be cleared might be found in `GlobalEvents`.
*
* @param path Path to the new SVG file to be loaded. This path has to be relative to the application root folder. Ex: `./resources/view1.view` `./resources/subdir/view2.view`
* @since 5.0
*/
assign(path: string): Promise<void>;
/**
* Replace the currently loaded SVG file with a new one, asynchronously.
*
* Assuming the current view is at a certain position within the location history stack, all the views on top and references to their elements will be freed. Accessing the UI elements after their references have been freed results in an error.
*
* When loading a new view (as with this method), any references to elements in the old view will be invalidated, and `document` will refer to the newly loaded view.
*
* It is safe to call this method in `document.onunload` (for example, to implement a viewstack), but do be careful to allow yourself to exit your app still!
*
* NOTE: All document, element handlers, and listeners will be cleared when the promise returned by `document.location.replace` is resolved. Examples of handlers and listeners that will be cleared might be found in `GlobalEvents`.
*
* @param path Path to the new SVG file to be loaded. This path has to be relative to the application root folder. Ex: `./resources/view1.view` `./resources/subdir/view2.view`
* @since 5.0
*/
replace(path: string): Promise<void>;
}
interface DocumentModule extends GlobalEvents {
readonly location: {
readonly pathname: string;
};
readonly location: Location;
readonly history: History;
getEventHandler(elementType: string): EventHandler | null;

@@ -8,0 +73,0 @@ setEventHandler(elementType: string, handler: EventHandler): void;

@@ -63,14 +63,2 @@ interface ElementSearchMap {

}
interface ComboButtonEnableDisableOptions {
animate?: boolean;
}
interface ComboButtonShowHideOptions {
animate?: boolean;
}
interface ComboButton extends ContainerElement {
disable(options?: ComboButtonEnableDisableOptions): void;
enable(options?: ComboButtonEnableDisableOptions): void;
hide(options?: ComboButtonShowHideOptions): void;
show(options?: ComboButtonShowHideOptions): void;
}
interface VirtualTileListItemUpdateOptions {

@@ -77,0 +65,0 @@ redraw?: boolean;

@@ -35,2 +35,3 @@ interface ListScrollEvent extends Event {

animationstart: AnimationEvent;
beforeunload: Event;
click: MouseEvent;

@@ -64,2 +65,4 @@ collapse: Event;

onanimationstart: (event: AnimationEvent) => void;
/** @since 5.0 */
onbeforeunload: (event: Event) => void;
onclick: (event: MouseEvent) => void;

@@ -66,0 +69,0 @@ oncollapse: (event: Event) => void;

@@ -5,7 +5,32 @@ declare module 'user-profile' {

interface UserProfile {
/**
* User's age in years.
*/
readonly age: number | undefined;
/**
* User's basal metabolic rate in kcal/day.
*/
readonly bmr: number | undefined;
/**
* User's gender.
*/
readonly gender: 'male' | 'female' | undefined;
/**
* User's height in meters.
*/
readonly height: number | undefined;
/**
* User's maximum theoretical heart rate in bpm (beats per minute), based on their profile settings.
*
* Note: There is no guarantee that the user's heart rate will reach, or exceed this value. This a theoretical value based on medical research and can also be adjusted by the user. It is entirely possible that the user's heart rate could exceed a maxHeartRate value defined by the user.
* @since 5.0
*/
readonly maxHeartRate: number | undefined;
/**
* User's resting heart rate in bpm (beats per minute).
*/
readonly restingHeartRate: number | undefined;
/**
* User's stride.
*/
readonly stride: {

@@ -15,6 +40,29 @@ readonly walk: number | undefined;

};
/**
* User's weight in kilograms.
*/
readonly weight: number | undefined;
/**
* Get the heart rate zone for a given heart rate.
*
* When the user has not configured a custom zone, the possible values are, in order of increasing heart rate:
* * `"out-of-range"` when the heart rate is below the "Fat Burn" zone.
* * `"fat-burn"` when the heart rate is in the "Fat Burn" zone.
* * `"cardio"` when the heart rate is in the "Cardio" zone.
* * `"peak"` when the heart rate is above the "Cardio" zone.
*
* When the user has configured a custom zone, the possible values are, in order of increasing heart rate:
* * `"below-custom"` when the heart rate is below the custom zone.
* * `"custom"` when the heart rate is in the custom zone.
* * `"above-custom"` when the heart rate is above the custom zone.
*
* @param heartRate Heart rate for which the zone should be returned.
*/
heartRateZone(heartRate: number): DefaultZone | UserDefinedZone;
}
/**
* The User Profile API provides information related to the user account of the device.
*/
const user: UserProfile;
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc