{"_id":"@awarns/wear-os","_rev":"1-f3c98728c69d4daf9d14bcd13648939f","name":"@awarns/wear-os","dist-tags":{"latest":"1.1.0"},"versions":{"1.0.0":{"name":"@awarns/wear-os","version":"1.0.0","keywords":["NativeScript","TypeScript","Android","WearOS","Sensors"],"license":"Apache-2.0","_id":"@awarns/wear-os@1.0.0","maintainers":[{"name":"matey","email":"matey@uji.es"},{"name":"albertogonper","email":"alberto.gonzalez95@gmail.com"}],"homepage":"http://github.com/GeoTecINIT/awarns-framework","bugs":{"url":"http://github.com/GeoTecINIT/awarns-framework/issues"},"dist":{"shasum":"b09d6165f959f8e30400de3fd055a49c7d87c1e4","tarball":"https://registry.npmjs.org/@awarns/wear-os/-/wear-os-1.0.0.tgz","fileCount":77,"integrity":"sha512-cseJSYVzuv7MVidod30f4dP0ZAPCSeF5JMmn0tb0dHZCaKEmdcgutjRXWQ7LGeZRJYO3K2Pj1kO/zEPFBs/Mlw==","signatures":[{"sig":"MEUCIEMo9UgxXY4t/awgTLXnSDy9LhCnsv9+F7KEu9ygHbJYAiEAlMMEZxG40+tB1PoAMRyufgVW3L28k80st7lc8/4tos4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":75190,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjFurtACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpnUQ/8C3BEWTZkmWhNDnUXjtgMHBgL7FukhTAspXikRcks15GFVTEi\r\nuvJ8SpWDw8R3UQ/5bj4/d2f7DGKrr9O6RhXg6Jz3YCj+2tyISQZ6c6tErBY7\r\ng/89qaphnl0I46m1jA3qEuela44S63YD8tY8ppCd1m9OmRNi+qktsk+w5hg/\r\nubmrFBN+2mo27WHBlfJ4pvdKjCZzXBbhewATC9StTVGjeMBrWNEJsfKej5R5\r\nMEvwB6PrSKzEUP8aduWapVEMPzk6IPTHBK9OnNEk3vrAxWeacwb0WUQpd+sR\r\nBATroyAYrhvy1REMxQgP3/FT5iHeNfXyXdjRy5htoa+smr1Dpy6rOOMpJBNc\r\n3GOVGD4LnkVIZmL40xkyh2WGfDc2FDvwVe8gnU5WSYvAFm5QgtkMxbaQVXPF\r\nHNfjgdrUTy3UTzTDY1v3EEQaTVM9cJVw8y67seRW8v/qYDmWnBmmyJun5r5m\r\nZi+ryjCJqrfu5OnY7WZtPRC32MB0gZtKVx8hGtSp4pVlfANmDCIowioFc7KU\r\n8qnles6ZpvGWhiG1Yt/csJ3wv3C5apmiaPWAOy0OvWZuI5psBsaJK+sLj8c5\r\n8w5/OW75+QDhDfpOPT0gnhtjuYIZDmKvesm+aVgzn0wpjNjxmpYoZh0J5VUy\r\nztilAIpkcHyuRyEgZ2aijrdOjKLFA0He9nk=\r\n=Gykc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index","authors":[{"name":"Miguel Matey Sanz","email":"matey@uji.es"},{"name":"Alberto González Pérez","email":"algonzal@uji.es"}],"gitHead":"a403dd6ed5e5e094ad23b3f82de75bf5e56d85a4","typings":"index.d.ts","_npmUser":{"name":"matey","email":"matey@uji.es"},"repository":{"url":"git+ssh://git@github.com/GeoTecINIT/awarns-framework.git","type":"git"},"_npmVersion":"8.1.2","description":"Reliable and concurrent access to a paired smartwatch's sensors and enables communication between both devices","directories":{},"_nodeVersion":"16.13.2","bootstrapper":"@nativescript/plugin-seed","dependencies":{"@awarns/core":"^1.0.0","nativescript-wearos-sensors":"^1.2.0"},"nativescript":{"platforms":{"ios":"6.0.0","android":"6.0.0"}},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/wear-os_1.0.0_1662446317409_0.5898191287922614","host":"s3://npm-registry-packages"}},"1.1.0":{"name":"@awarns/wear-os","version":"1.1.0","description":"Reliable and concurrent access to a paired smartwatch's sensors and enables communication between both devices","main":"index","typings":"index.d.ts","nativescript":{"platforms":{"ios":"6.0.0","android":"6.0.0"}},"repository":{"type":"git","url":"git+ssh://git@github.com/GeoTecINIT/awarns-framework.git"},"keywords":["NativeScript","TypeScript","Android","WearOS","Sensors"],"authors":[{"name":"Miguel Matey Sanz","email":"matey@uji.es"},{"name":"Alberto González Pérez","email":"algonzal@uji.es"}],"bugs":{"url":"http://github.com/GeoTecINIT/awarns-framework/issues"},"license":"Apache-2.0","homepage":"http://github.com/GeoTecINIT/awarns-framework","bootstrapper":"@nativescript/plugin-seed","dependencies":{"@awarns/core":"^1.0.0","nativescript-wearos-sensors":"^1.4.0"},"_id":"@awarns/wear-os@1.1.0","gitHead":"4b0021e70870d02ab98187e7a0afaf7790b86097","_nodeVersion":"18.20.4","_npmVersion":"10.7.0","dist":{"integrity":"sha512-1t24rY+W7rXOykfV0CQBiu82N8aCT8n3rKso9swusa4n0wI5Z4fF29E21pKcfuC7ZQ1d2JNZnvBbfIjUEtCi6A==","shasum":"2eecd1014056689845a04c00905146716ee1c026","tarball":"https://registry.npmjs.org/@awarns/wear-os/-/wear-os-1.1.0.tgz","fileCount":77,"unpackedSize":75190,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDhSjL9cZBe/nJOZKE2k1IxxR6mazxaWgjtRzXIDug5iAIgHDUCQU+KCgomTgSLpzzO3AHVqGrwov7bRYXJHOPVfJM="}]},"_npmUser":{"name":"matey","email":"matey@uji.es"},"directories":{},"maintainers":[{"name":"albertogonper","email":"alberto.gonzalez95@gmail.com"},{"name":"matey","email":"matey@uji.es"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/wear-os_1.1.0_1739446649529_0.5227564167066503"},"_hasShrinkwrap":false}},"time":{"created":"2022-09-06T06:38:37.337Z","modified":"2025-02-13T11:37:29.943Z","1.0.0":"2022-09-06T06:38:37.546Z","1.1.0":"2025-02-13T11:37:29.730Z"},"bugs":{"url":"http://github.com/GeoTecINIT/awarns-framework/issues"},"license":"Apache-2.0","homepage":"http://github.com/GeoTecINIT/awarns-framework","keywords":["NativeScript","TypeScript","Android","WearOS","Sensors"],"repository":{"type":"git","url":"git+ssh://git@github.com/GeoTecINIT/awarns-framework.git"},"description":"Reliable and concurrent access to a paired smartwatch's sensors and enables communication between both devices","maintainers":[{"name":"albertogonper","email":"alberto.gonzalez95@gmail.com"},{"name":"matey","email":"matey@uji.es"}],"readme":"# @awarns/wear-os\n[![npm (scoped)](https://img.shields.io/npm/v/@awarns/wear-os)](https://www.npmjs.com/package/@awarns/wear-os)\n[![npm](https://img.shields.io/npm/dm/@awarns/wear-os)](https://www.npmjs.com/package/@awarns/wear-os)\n\nThis module allows to collect data from the sensors of an Android WearOS smartwatch,\nand enables the communication between both devices (i.e., smartphone and smartwatch).\n\nThis plugin acts as a wrapper on top of the [nativescript-wearos-sensors](https://github.com/GeoTecINIT/nativescript-wearos-sensors) plugin,\nwhich enables the communication and the data collection from a paired WearOS smartwatch. In order to use these features, a WearOS smartwatch\nmust be paired with the smartphone and have installed a counterpart application, developed using the [WearOSSensors](https://github.com/GeoTecINIT/WearOSSensors) WearOS library.\n\n> **Note**: check the requirements of both libraries for more detailed information:\n> - [nativescript-wearos-sensors requirements](https://github.com/GeoTecINIT/nativescript-wearos-sensors#requirements)\n> - [WearOSSensors requirements](https://github.com/GeoTecINIT/WearOSSensors#requirements)\n\nInstall the plugin using the following command line instruction:\n\n```bash\nns plugin add @awarns/wear-os\n```\n\n## Usage\n\n### Setup\nThis plugin requires you to register its loader during the framework initialization, like this:\n\n```ts\n// ... platform imports\nimport { awarns } from '@awarns/core';\nimport { demoTasks } from '../tasks';\nimport { demoTaskGraph } from '../graph';\nimport { registerWearOSPlugin } from '@awarns/wear-os';\n\nawarns\n  .init(\n    demoTasks,\n    demoTaskGraph,\n    [\n      registerWearOSPlugin(config), // Parameter config is optional\n    ]\n  )\n  // ... handle initialization promise\n```\n\nPlugin loader parameter (`WearOSPluginConfig`):\n\n| Parameter               | Type            | Description                                                                                                |\n|-------------------------|-----------------|------------------------------------------------------------------------------------------------------------|\n| `sensors?`              | `WatchSensor[]` | Enable the specified sensors. By default, all sensors are enabled.                                         |\n| `enablePlainMessaging?` | `boolean`       | Enable the plain messaging communication mechanism. Default: `false`.                                      |\n| `enableWearCommands?`   | `boolean`       | Enable the command mechanism that allows to start the data collection on the watch side. Default: `false`. |\n\nIn addition, you also have to specify if you want to use these plugin features and which watch you want to use. This offers to possibility to use or not\nthese plugin features without modifying the task graph definition. For example, you can disable the features if there isn't a paired watch available. Here is\nan example:\n\n```typescript\nimport { getConnectedWatches, setWatchFeaturesState, useWatch } from '@awarns/wear-os';\n\nexport async function setupWatchToUse(): Promise<void> {\n  const watches = await getConnectedWatches();\n\n  if (watches.length === 0) {\n    console.log('No WearOS watches connected! Disabling wear-os plugin features...');\n    setWatchFeaturesState(false);\n    return;\n  }\n\n  const watch = watches[0];\n  console.log(`Setup wear-os plugin to use ${watch.name} watch!`);\n  setWatchFeaturesState(true);\n  useWatch(watch);\n}\n```\n\n### Tasks\n\n| Task name                                                                                                       | Description                                                                                                                                                           |\n|-----------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [`startDetecting{prefix}Watch{sensor}Changes`](#start-data-collection-for-a-sensor-with-specific-configuration) | Allows to start the data collection for a `sensor` with a specific configuration (see below). The `prefix` can be used to distinguish among different configurations. |\n| [`stopDetectingWatch{sensor}Changes`](#stop-data-collection-for-a-sensor)                                       | The complement to the previous task. Allows to stop collecting data from `sensor`.                                                                                    |\n| [`sendPlainMessageToWatch`](#send-a-message-to-the-paired-watch)                                                | Allows to send a string-based message to the paired smartwatch. An example of use could be to send information for updating the UI.                                   |\n| [`sendPlainMessageToWatchAndAwaitResponse`](#send-a-message-to-the-paired-watch-and-wait-for-a-response)        | Allows to send a string-based message to the paired smartwatch and to wait for a response from it.                                                                    |\n\n#### Start data collection for a sensor with specific configuration\nTo register these tasks for their use, you just need to import them and call their generator functions inside your application's task list:\n\n```typescript\nimport { Task } from '@awarns/core/tasks';\nimport {\n  startDetectingWatchSensorChangesTask,\n  WatchSensor,\n  WatchSensorDelay,\n} from '@awarns/wear-os';\n\nexport const demoTasks: Array<Task> = [\n  startDetectingWatchSensorChangesTask(WatchSensor.ACCELEROMETER, { sensorDelay: WatchSensorDelay.NORMAL, batchSize: 50 }),\n  // startDetectingWatchAccelerometerChanges\n\n  startDetectingWatchSensorChangesTask(WatchSensor.ACCELEROMETER, { sensorDelay: WatchSensorDelay.FASTEST, batchSize: 50 }, 'Fast'),\n  // startDetectingFastWatchAccelerometerChanges\n\n  startDetectingWatchSensorChangesTask(WatchSensor.HEART_RATE, { sensorDelay: WatchSensorDelay.NORMAL, batchSize: 5 }),\n  // startDetectingWatchHeartRateChanges\n\n  startDetectingWatchSensorChangesTask(WatchSensor.GEOLOCATION, { sensorDelay: 5000, batchSize: 5 }),\n  // startDetectingWatchGeolocationChanges\n]\n```\n\n> **Warning**: the data collection for a `WatchSensor` can only be started once, if `startDetectingFastWatchAccelerometerChanges` is executed after\n> `startDetectingWatchAccelerometerChanges` and while the collection is in progress, `startDetectingFastWatchAccelerometerChanges` will be ignored.\n> \n> Therefore, if you want to dynamically change the collection's configuration while the collection is in progress, you will have to stop the collection\n> and start it again with the new desired configuration. However, due to the underlying communication APIs (i.e., Bluetooth), the order of the tasks **is not guaranteed**. \n> This means that if the stop and start tasks are executed very close in time, the start task could be executed before the stop task in the smartwatch.\n> If you really need to change the collection's configuration, you should wait a certain amount of time (e.g., 1 second) after the execution of the stop task before executing the start task.\n\nTask generator parameters:\n\n| Parameter name          | Type                    | Description                                                                                                                    |\n|-------------------------|-------------------------|--------------------------------------------------------------------------------------------------------------------------------|\n| `sensor`                | `WatchSensor`           | Sensor to collect data from. See below.                                                                                        |\n| `providerConfiguration` | `ProviderConfiguration` | Collection's configuration of the task. See below.                                                                             |\n| `prefix` _(Optional)_   | `string`                | Adds the prefix to the name of the task. Useful to create multiple tasks for the same sensor but with multiple configurations. |\n\n- WatchSensor\n\n| Value           | Description                                  |\n|-----------------|----------------------------------------------|\n| `ACCELEROMETER` | Represents the watch's accelerometer sensor. |\n| `GYROSCOPE`     | Represents the watch's gyroscope sensor.     |\n| `MAGNETOMETER`  | Represents the watch's magnetometer sensor.  |\n| `HEART_RATE`    | Represents the watch's heart rate monitor.   |\n| `GEOLOCATION`   | Represents the watch's GPS system.           |\n\n- ProviderConfiguration\n\n| Property      | Type                                        | Description                                                                                                                                                                                                                                                                                                                                        |\n|---------------|---------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `sensorDelay` | <code>WatchSensorDelay &vert; number</code> | Indicates the time between two consecutive samples. It can be a `WatchSensorDelay` (i.e., `UI`, `NORMAL`, `GAME` or `FASTEST`) or a value in milliseconds. It is highly recommended to use values in milliseconds (and higher than 1000 ms) with `WatchSensor.GEOLOCATION` due to `WatchSensorDelay` it's oriented for high sampling rate sensors. |\n| `batchSize`   | `number`                                    | Indicates the amount of samples to be delivered in each record.                                                                                                                                                                                                                                                                                    |\n\n> **Note**: the `sensorDelay` is taken as a suggestion by the Android OS. Samples could be delivered at a smaller or higher rate.\n\nTask output events:\n\n> These tasks don't produce significant events after they complete their execution aside from the regular `{task-name}Finished` events.\n>\n> However, once the start task has finished running, relevant events will be emitted by the internal listeners while the data collection is active. These are listed below.\n\n- [`watchAccelerometerSamplesAcquired`](#events)\n- [`watchGyroscopeSamplesAcquired`](#events)\n- [`watchMagnetometerSamplesAcquired`](#events)\n- [`watchHeartRateSamplesAcquired`](#events)\n- [`watchGeolocationAcquired`](#events)\n\n> Example usage in the application task graph:\n> ```ts\n> on('startEvent', run('startDetectingWatchAccelerometerChanges'));\n> on('startEvent', run('startDetectingWatchGyroscopeChanges'));\n> on('startEvent', run('startDetectingWatchMagnetometerChanges'));\n> on('startEvent', run('startDetectingWatchHeartRateChanges'));\n> on('startEvent', run('startDetectingWatchGeolocationChanges'));\n> \n> on('watchAccelerometerSamplesAcquired', run('writeRecords'));\n> on('watchGyroscopeSamplesAcquired', run('writeRecords'));\n> on('watchMagnetometerSamplesAcquired', run('writeRecords'));\n> on('watchHeartRateSamplesAcquired', run('writeRecords'));\n> on('watchGeolocationAcquired', run('writeRecords'));\n> on('watchGeolocationAcquired', run('checkAreaOfInterestProximity', { nearbyRange: 100, offset: 15 }));\n>```\n> **Note**: To use the `writeRecords` or the `checkAreaOfInterestProximity` task, the persistence or geofencing package must be installed and configured, respectively. See [persistence](../persistence/README.md) and [geofencing](../geofencing/README.md) package docs.\n\n#### Stop data collection for a sensor\nTo register these tasks for their use, you just need to import them and call their generator functions inside your application's task list:\n\n```typescript\nimport { Task } from '@awarns/core/tasks';\nimport {\n  stopDetectingWatchSensorChangesTask,\n  WatchSensor,\n} from '@awarns/wear-os';\n\nexport const demoTasks: Array<Task> = [\n  stopDetectingWatchSensorChangesTask(WatchSensor.ACCELEROMETER), // stopDetectingWatchAccelerometerChanges\n  stopDetectingWatchSensorChangesTask(WatchSensor.GYROSCOPE),     // stopDetectingWatchGyroscopeChanges\n  stopDetectingWatchSensorChangesTask(WatchSensor.MAGNETOMETER),  // stopDetectingWatchMagnetometerChanges\n  stopDetectingWatchSensorChangesTask(WatchSensor.HEART_RATE),    // stopDetectingWatchHeartRateChanges\n  stopDetectingWatchSensorChangesTask(WatchSensor.GEOLOCATION),   // stopDetectingWatchGeolocationChanges\n];\n```\n\n> **Note**: a stop task of a specific `WatchSensor` can be used to stop the collection started by any start task\n> for that `WatchSensor` no matter the specific configuration.\n\nTask generator parameters:\n\n| Parameter name          | Type                    | Description                              |\n|-------------------------|-------------------------|------------------------------------------|\n| `sensor`                | `WatchSensor`           | Sensor to stop the data collection from. |\n\nTask output events:\n\n> These tasks don't produce significant events after they complete their execution aside from the regular `{task-name}Finished` events.\n>\n> Example usage in the application task graph:\n> ```ts\n> on('startEvent', run('startDetectingWatchAccelerometerChanges').every(1, 'minute'));\n> on('startEvent', run('startDetectingWatchGyroscopeChanges').every(1, 'minute'));\n> on('startEvent', run('startDetectingWatchMagnetometerChanges').every(1, 'minute'));\n> on('startEvent', run('startDetectingWatchHeartRateChanges').every(1, 'minute'));\n> on('startEvent', run('startDetectingWatchGeolocationChanges').every(1, 'minute'));\n> \n> on('watchAccelerometerSamplesAcquired', run('stopDetectingWatchAccelerometerChanges'));\n> on('watchGyroscopeSamplesAcquired', run('stopDetectingWatchGyroscopeChanges'));\n> on('watchMagnetometerSamplesAcquired', run('stopDetectingWatchMagnetometerChanges'));\n> on('watchHeartRateSamplesAcquired', run('stopDetectingWatchHeartRateChanges'));\n> on('watchGeolocationAcquired', run('stopDetectingWatchGeolocationChanges'));\n>```\n> **Note**: it makes no sense to use these tasks without using before their complementary tasks to start the data collection.\n\n#### Send a message to the paired watch\n\n> **Note**: to be able to use this feature, the messaging feature must be enabled.\n\nTo register these tasks for their use, you just need to import them and call their generator functions inside your application's task list:\n\n```typescript\nimport { Task } from '@awarns/core/tasks';\nimport {\n  sendPlainMessageToWatchTask\n} from '@awarns/wear-os';\n\nexport const demoTasks: Array<Task> = [\n  sendPlainMessageToWatchTask() // sendPlainMessageToWatch\n];\n```\n\nTask generator parameters:\n\n> This task generators take no parameters\n\nTask output events:\n\n- [`plainMessageSent`](#events)\n\n> Example usage in the application task graph:\n> ```ts\n> on('startEvent', run('sendPlainMessageToWatch', {\n>   plainMessage: {                                 \n>     message: 'Hi from the smartphone!!'\n>   }\n> }).every(1, 'minute'));\n> \n> on('plainMessageSent', run('writeRecords'));\n>```\n> **Note**: To use the `writeRecords` task, the persistence package must be installed and configured. See [persistence package docs](../persistence/README.md).\n\n#### Send a message to the paired watch and wait for a response\n\n> **Note**: to be able to use this feature, the messaging feature must be enabled.\n\nTo register these tasks for their use, you just need to import them and call their generator functions inside your application's task list:\n\n```typescript\nimport { Task } from '@awarns/core/tasks';\nimport {\n  sendPlainMessageToWatchAndAwaitResponseTask\n} from '@awarns/wear-os';\n\nexport const demoTasks: Array<Task> = [\n  sendPlainMessageToWatchAndAwaitResponseTask() // sendPlainMessageToWatchAndAwaitResponse\n];\n```\n\nTask generator parameters:\n\n> This task generators take no parameters\n\nTask output events:\n\n- [`plainMessageSentAndResponseReceived`](#events)\n\n> Example usage in the application task graph:\n> ```ts\n> on('startEvent', run('sendPlainMessageToWatchAndAwaitResponse', {\n>   plainMessage: {\n>     message: 'Tell me something ;)'\n>   },\n>   timeout: 3000\n> }).every(1, 'minute'));\n> \n> on('plainMessageSentAndResponseReceived', run('writeRecords'));\n>```\n> **Note**: To use the `writeRecords` task, the persistence package must be installed and configured. See [persistence package docs](../persistence/README.md).\n\n### Send a message from an event's data\n\n> **Note**: to be able to use this feature, the messaging feature must be enabled.\n\nYou can also invoke these tasks by injecting the message in the event that triggers their execution. This allows to send messages in a more flexible way (i.e., no need to specify \nthe message in the task graph).\n\n> Example usage:\n>```typescript\n>import { awarns } from '@awarns/core';\n>import { PlainMessage } from '@awarns/wear-os';\n>\n>export function sendMessage(message: PlainMessage) {\n>  awarns.emitEvent('sendMessage', {\n>    data: message\n>  });\n>}\n>```\n>\n>Then, in the task graph:\n>\n>```typescript\n>on('sendMessage', run('sendPlainMessageToWatch'));\n>```\n\n### Receive watch-triggered message\n\n> **Note**: to be able to use this feature, the messaging feature must be enabled.\n\nThe watch can also send message to the smartphone by its own (i.e., no need to receive a message from the smartphone first to then reply). When those messages are received\nby the smartphone, the `plainMessageReceivedEvent` is emitted.\n\n> Example usage in the application task graph:\n> ```ts\n> on('plainMessageReceived', run('writeRecords'));\n> ```\n> **Note**: To use the `writeRecords` task, the persistence package must be installed and configured. See [persistence package docs](../persistence/README.md).\n\n### Events\n\n| Name                                  | Payload                                                             | Description                                                                                                                                                            |\n|---------------------------------------|---------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `watchAccelerometerSamplesAcquired`   | [`TriAxial`](#triaxial)                                             | Contains a list of samples with the `x`, `y`, and `z` values of an accelerometer sensor.                                                                               |\n| `watchGyroscopeSamplesAcquired`       | [`TriAxial`](#triaxial)                                             | Contains a list of samples with the `x`, `y`, and `z` values of a gyroscope sensor.                                                                                    |\n| `watchMagnetometerSamplesAcquired`    | [`TriAxial`](#triaxial)                                             | Contains a list of samples with the `x`, `y`, and `z` values of a magnetometer sensor.                                                                                 |\n| `watchHeartRateSamplesAcquired`       | [`HeartRate`](#heartrate)                                           | Contains a list with the values of a heart rate sensor.                                                                                                                |\n| `watchGeolocationAcquired`            | [<code>Geolocation &vert; Array\\<Geolocation></code>](#geolocation) | Contains one or more GNSS locations. If the `batchSize` is set to 1, the payload will be a `Geolocation` record. Otherwise, the payload will be a `Geolocation` array. |\n| `plainMessageSent`                    | [`MessageSent`](#triaxial)                                          | Contains the content of the message sent to the watch.                                                                                                                 |\n| `plainMessageSentAndResponseReceived` | [`MessageReceived`](#triaxial)                                      | Contains the content of the message sent to the watch and the response from it.                                                                                        |\n| `plainMessageReceived`                | [`MessageReceived`](#triaxial)                                      | Contains the content of a message received from the watch.                                                                                                             |\n\n### Records\n\n#### TriAxial\n\n| Property    | Type                                  | Description                                                                                            |\n|-------------|---------------------------------------|--------------------------------------------------------------------------------------------------------|\n| `id`        | `string`                              | Record's unique id.                                                                                    |\n| `type`      | `string`                              | One of the following values: `watch-accelerometer`, `watch-gyroscope`, or `watch-magnetometer`.        |\n| `change`    | `Change`                              | Always `NONE`.                                                                                         |\n| `timestamp` | `Date`                                | The local time when the data was collected. It is equal to the time of the first sample in the record. |\n| `samples`   | [`TriAxialSample[]`](#triaxialsample) | List with the collected samples.                                                                       |\n\n##### `TriAxialSample`\n\n| Property    | Type     | Description                                                    |\n|-------------|----------|----------------------------------------------------------------|\n| `x`         | `number` | Value `x` of the sensor.                                       |\n| `y`         | `number` | Value `y` of the sensor.                                       |\n| `z`         | `number` | Value `z` of the sensor.                                       |\n| `timestamp` | `number` | The local time (UNIX timestamp) when the sample was collected. |\n\n#### HeartRate\n\n| Property    | Type                                    | Description                                                                                            |\n|-------------|-----------------------------------------|--------------------------------------------------------------------------------------------------------|\n| `id`        | `string`                                | Record's unique id.                                                                                    |\n| `type`      | `string`                                | Always `watch-heart-rate`.                                                                             |\n| `change`    | `Change`                                | Always `NONE`.                                                                                         |\n| `timestamp` | `Date`                                  | The local time when the data was collected. It is equal to the time of the first sample in the record. |\n| `samples`   | [`HeartRateSample[]`](#heartratesample) | List with the collected samples.                                                                       |\n\n##### `HeartRateSample`\n\n| Property    | Type     | Description                                                    |\n|-------------|----------|----------------------------------------------------------------|\n| `value`     | `number` | Heart rate value reported by the sensor.                       |\n| `timestamp` | `number` | The local time (UNIX timestamp) when the sample was collected. |\n\n#### Geolocation\n\n| Property             | Type     | Description                                                                                            |\n|----------------------|----------|--------------------------------------------------------------------------------------------------------|\n| `id`                 | `string` | Record's unique id.                                                                                    |\n| `type`               | `string` | Always `watch-geolocation`.                                                                            |\n| `change`             | `Change` | Always `NONE`.                                                                                         |\n| `timestamp`          | `Date`   | The local time when the data was collected. It is equal to the time of the first sample in the record. |\n| `latitude`           | `number` | Latitude reported by the GPS.                                                                          |\n| `longitude`          | `number` | Longitude reported by the GPS.                                                                         |\n| `altitude`           | `number` | Altitude reported by the GPS.                                                                          |\n| `verticalAccuracy`   | `number` | The estimated error in the latitude.                                                                   |\n| `horizontalAccuracy` | `number` | The estimated error in the longitude.                                                                  |\n| `speed`              | `number` | The estimated speed of the device when the location was acquired.                                      |\n| `direction`          | `number` | The estimated direction of the device when the location was acquired.                                  |\n\n\n#### MessageSent\n\n| Property    | Type                           | Description                               |\n|-------------|--------------------------------|-------------------------------------------|\n| `id`        | `string`                       | Record's unique id.                       |\n| `type`      | `string`                       | Always `plain-message-sent`.              |\n| `change`    | `Change`                       | Always `NONE`.                            |\n| `timestamp` | `Date`                         | The local time when the message was sent. |\n| `content`   | [`PlaiMessage`](#plainmessage) | Content of the message sent.              |\n\n##### PlainMessage\n\n| Property        | Type           | Description                                                                                                    |\n|-----------------|----------------|----------------------------------------------------------------------------------------------------------------|\n| `message`       | `string`       | The content of the message.                                                                                    |\n| `inResponseTo?` | `PlainMessage` | Can contain a `PlainMessage` to indicate that the current message is a response to the `inResponseTo` message. |\n\n\n#### MessageReceived\n\n| Property    | Type                                  | Description                               |\n|-------------|---------------------------------------|-------------------------------------------|\n| `id`        | `string`                              | Record's unique id.                       |\n| `type`      | `string`                              | Always `plain-message-received`.          |\n| `change`    | `Change`                              | Always `NONE`.                            |\n| `timestamp` | `Date`                                | The local time when the message was sent. |\n| `content`   | [`ReceivedMessage`](#receivedmessage) | Content of the received message.          |\n\n##### ReceivedMessage\n\n| Property       | Type           | Description                            |\n|----------------|----------------|----------------------------------------|\n| `senderNodeId` | `string`       | Id of the watch that sent the message. |\n| `plainMessage` | `PlainMessage` | Message received.                      |\n\n## License\n\nApache License Version 2.0\n","readmeFilename":"README.md"}