@neurosity/sdk 7.0.0 → 7.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (306) hide show
  1. package/dist/examples/node/accelerometer.d.ts +5 -0
  2. package/dist/examples/node/accelerometer.d.ts.map +1 -0
  3. package/dist/examples/node/accelerometer.js +12 -0
  4. package/dist/examples/node/accelerometer.js.map +1 -0
  5. package/dist/examples/node/authApiKey.d.ts +4 -0
  6. package/dist/examples/node/authApiKey.d.ts.map +1 -0
  7. package/dist/examples/node/authApiKey.js +17 -0
  8. package/dist/examples/node/authApiKey.js.map +1 -0
  9. package/dist/examples/node/authCustomToken.d.ts +4 -0
  10. package/dist/examples/node/authCustomToken.d.ts.map +1 -0
  11. package/dist/examples/node/authCustomToken.js +11 -0
  12. package/dist/examples/node/authCustomToken.js.map +1 -0
  13. package/dist/examples/node/authEmailPassword.d.ts +5 -0
  14. package/dist/examples/node/authEmailPassword.d.ts.map +1 -0
  15. package/dist/examples/node/authEmailPassword.js +12 -0
  16. package/dist/examples/node/authEmailPassword.js.map +1 -0
  17. package/dist/examples/node/authIdToken.d.ts +5 -0
  18. package/dist/examples/node/authIdToken.d.ts.map +1 -0
  19. package/dist/examples/node/authIdToken.js +12 -0
  20. package/dist/examples/node/authIdToken.js.map +1 -0
  21. package/dist/examples/node/authInheritance.d.ts +5 -0
  22. package/dist/examples/node/authInheritance.d.ts.map +1 -0
  23. package/dist/examples/node/authInheritance.js +17 -0
  24. package/dist/examples/node/authInheritance.js.map +1 -0
  25. package/dist/examples/node/autoSelectDevice.d.ts +5 -0
  26. package/dist/examples/node/autoSelectDevice.d.ts.map +1 -0
  27. package/dist/examples/node/autoSelectDevice.js +16 -0
  28. package/dist/examples/node/autoSelectDevice.js.map +1 -0
  29. package/dist/examples/node/brainwaves.d.ts +5 -0
  30. package/dist/examples/node/brainwaves.d.ts.map +1 -0
  31. package/dist/examples/node/brainwaves.js +12 -0
  32. package/dist/examples/node/brainwaves.js.map +1 -0
  33. package/dist/examples/node/calm.d.ts +5 -0
  34. package/dist/examples/node/calm.d.ts.map +1 -0
  35. package/dist/examples/node/calm.js +12 -0
  36. package/dist/examples/node/calm.js.map +1 -0
  37. package/dist/examples/node/clients.d.ts +5 -0
  38. package/dist/examples/node/clients.d.ts.map +1 -0
  39. package/dist/examples/node/clients.js +10 -0
  40. package/dist/examples/node/clients.js.map +1 -0
  41. package/dist/examples/node/createAccount.d.ts +2 -0
  42. package/dist/examples/node/createAccount.d.ts.map +1 -0
  43. package/dist/examples/node/createAccount.js +16 -0
  44. package/dist/examples/node/createAccount.js.map +1 -0
  45. package/dist/examples/node/createApiKey.d.ts +5 -0
  46. package/dist/examples/node/createApiKey.d.ts.map +1 -0
  47. package/dist/examples/node/createApiKey.js +24 -0
  48. package/dist/examples/node/createApiKey.js.map +1 -0
  49. package/dist/examples/node/createCustomToken.d.ts +5 -0
  50. package/dist/examples/node/createCustomToken.d.ts.map +1 -0
  51. package/dist/examples/node/createCustomToken.js +17 -0
  52. package/dist/examples/node/createCustomToken.js.map +1 -0
  53. package/dist/examples/node/deleteAccount.d.ts +2 -0
  54. package/dist/examples/node/deleteAccount.d.ts.map +1 -0
  55. package/dist/examples/node/deleteAccount.js +21 -0
  56. package/dist/examples/node/deleteAccount.js.map +1 -0
  57. package/dist/examples/node/focus.d.ts +5 -0
  58. package/dist/examples/node/focus.d.ts.map +1 -0
  59. package/dist/examples/node/focus.js +12 -0
  60. package/dist/examples/node/focus.js.map +1 -0
  61. package/dist/examples/node/getDevices.d.ts +2 -0
  62. package/dist/examples/node/getDevices.d.ts.map +1 -0
  63. package/dist/examples/node/getDevices.js +27 -0
  64. package/dist/examples/node/getDevices.js.map +1 -0
  65. package/dist/examples/node/haptics.d.ts +5 -0
  66. package/dist/examples/node/haptics.d.ts.map +1 -0
  67. package/dist/examples/node/haptics.js +25 -0
  68. package/dist/examples/node/haptics.js.map +1 -0
  69. package/dist/examples/node/index.d.ts +2 -0
  70. package/dist/examples/node/index.d.ts.map +1 -0
  71. package/dist/examples/node/index.js +62 -0
  72. package/dist/examples/node/index.js.map +1 -0
  73. package/dist/examples/node/kinesis.d.ts +5 -0
  74. package/dist/examples/node/kinesis.d.ts.map +1 -0
  75. package/dist/examples/node/kinesis.js +12 -0
  76. package/dist/examples/node/kinesis.js.map +1 -0
  77. package/dist/examples/node/manuallySelectDevice.d.ts +5 -0
  78. package/dist/examples/node/manuallySelectDevice.d.ts.map +1 -0
  79. package/dist/examples/node/manuallySelectDevice.js +18 -0
  80. package/dist/examples/node/manuallySelectDevice.js.map +1 -0
  81. package/dist/examples/node/markers.d.ts +5 -0
  82. package/dist/examples/node/markers.d.ts.map +1 -0
  83. package/dist/examples/node/markers.js +27 -0
  84. package/dist/examples/node/markers.js.map +1 -0
  85. package/dist/examples/node/multipleDevices.d.ts +5 -0
  86. package/dist/examples/node/multipleDevices.d.ts.map +1 -0
  87. package/dist/examples/node/multipleDevices.js +33 -0
  88. package/dist/examples/node/multipleDevices.js.map +1 -0
  89. package/dist/examples/node/oauth.d.ts +5 -0
  90. package/dist/examples/node/oauth.d.ts.map +1 -0
  91. package/dist/examples/node/oauth.js +21 -0
  92. package/dist/examples/node/oauth.js.map +1 -0
  93. package/dist/examples/node/osVersion.d.ts +5 -0
  94. package/dist/examples/node/osVersion.d.ts.map +1 -0
  95. package/dist/examples/node/osVersion.js +12 -0
  96. package/dist/examples/node/osVersion.js.map +1 -0
  97. package/dist/examples/node/predictions.d.ts +5 -0
  98. package/dist/examples/node/predictions.d.ts.map +1 -0
  99. package/dist/examples/node/predictions.js +12 -0
  100. package/dist/examples/node/predictions.js.map +1 -0
  101. package/dist/examples/node/rawUnfiltered.d.ts +5 -0
  102. package/dist/examples/node/rawUnfiltered.d.ts.map +1 -0
  103. package/dist/examples/node/rawUnfiltered.js +12 -0
  104. package/dist/examples/node/rawUnfiltered.js.map +1 -0
  105. package/dist/examples/node/removeApiKey.d.ts +5 -0
  106. package/dist/examples/node/removeApiKey.d.ts.map +1 -0
  107. package/dist/examples/node/removeApiKey.js +17 -0
  108. package/dist/examples/node/removeApiKey.js.map +1 -0
  109. package/dist/examples/node/settings.d.ts +5 -0
  110. package/dist/examples/node/settings.d.ts.map +1 -0
  111. package/dist/examples/node/settings.js +19 -0
  112. package/dist/examples/node/settings.js.map +1 -0
  113. package/dist/examples/node/signalQuality.d.ts +5 -0
  114. package/dist/examples/node/signalQuality.d.ts.map +1 -0
  115. package/dist/examples/node/signalQuality.js +12 -0
  116. package/dist/examples/node/signalQuality.js.map +1 -0
  117. package/dist/examples/node/status.d.ts +5 -0
  118. package/dist/examples/node/status.d.ts.map +1 -0
  119. package/dist/examples/node/status.js +12 -0
  120. package/dist/examples/node/status.js.map +1 -0
  121. package/dist/examples/node/switchSelectedDevice.d.ts +5 -0
  122. package/dist/examples/node/switchSelectedDevice.d.ts.map +1 -0
  123. package/dist/examples/node/switchSelectedDevice.js +25 -0
  124. package/dist/examples/node/switchSelectedDevice.js.map +1 -0
  125. package/dist/examples/node/timesync.d.ts +5 -0
  126. package/dist/examples/node/timesync.d.ts.map +1 -0
  127. package/dist/examples/node/timesync.js +12 -0
  128. package/dist/examples/node/timesync.js.map +1 -0
  129. package/dist/examples/node/training.d.ts +5 -0
  130. package/dist/examples/node/training.d.ts.map +1 -0
  131. package/dist/examples/node/training.js +30 -0
  132. package/dist/examples/node/training.js.map +1 -0
  133. package/dist/examples/node/transferDevice.d.ts +5 -0
  134. package/dist/examples/node/transferDevice.d.ts.map +1 -0
  135. package/dist/examples/node/transferDevice.js +27 -0
  136. package/dist/examples/node/transferDevice.js.map +1 -0
  137. package/dist/index.js +2186 -979
  138. package/dist/index.js.map +1 -1
  139. package/dist/index.mjs +2186 -979
  140. package/dist/index.mjs.map +1 -1
  141. package/dist/neurosity.iife.js +2186 -979
  142. package/dist/neurosity.iife.js.map +1 -1
  143. package/dist/neurosity.umd.js +2186 -979
  144. package/dist/neurosity.umd.js.map +1 -1
  145. package/dist/types/Neurosity.d.ts +102 -0
  146. package/dist/types/Neurosity.d.ts.map +1 -0
  147. package/dist/types/api/bluetooth/BluetoothClient.d.ts +77 -0
  148. package/dist/types/api/bluetooth/BluetoothClient.d.ts.map +1 -0
  149. package/dist/types/api/bluetooth/BluetoothTransport.d.ts +31 -0
  150. package/dist/types/api/bluetooth/BluetoothTransport.d.ts.map +1 -0
  151. package/dist/types/api/bluetooth/constants.d.ts +5 -0
  152. package/dist/types/api/bluetooth/constants.d.ts.map +1 -0
  153. package/dist/types/api/bluetooth/index.d.ts +6 -0
  154. package/dist/types/api/bluetooth/index.d.ts.map +1 -0
  155. package/dist/types/api/bluetooth/react-native/ReactNativeTransport.d.ts +73 -0
  156. package/dist/types/api/bluetooth/react-native/ReactNativeTransport.d.ts.map +1 -0
  157. package/dist/types/api/bluetooth/react-native/index.d.ts +3 -0
  158. package/dist/types/api/bluetooth/react-native/index.d.ts.map +1 -0
  159. package/dist/types/api/bluetooth/react-native/types/BleManagerTypes.d.ts +64 -0
  160. package/dist/types/api/bluetooth/react-native/types/BleManagerTypes.d.ts.map +1 -0
  161. package/dist/types/api/bluetooth/react-native/types/ReactNativeTypes.d.ts +41 -0
  162. package/dist/types/api/bluetooth/react-native/types/ReactNativeTypes.d.ts.map +1 -0
  163. package/dist/types/api/bluetooth/react-native/types/index.d.ts +3 -0
  164. package/dist/types/api/bluetooth/react-native/types/index.d.ts.map +1 -0
  165. package/dist/types/api/bluetooth/types/index.d.ts +21 -0
  166. package/dist/types/api/bluetooth/types/index.d.ts.map +1 -0
  167. package/dist/types/api/bluetooth/utils/binaryBufferToEpoch.d.ts +10 -0
  168. package/dist/types/api/bluetooth/utils/binaryBufferToEpoch.d.ts.map +1 -0
  169. package/dist/types/api/bluetooth/utils/create6DigitPin.d.ts +2 -0
  170. package/dist/types/api/bluetooth/utils/create6DigitPin.d.ts.map +1 -0
  171. package/dist/types/api/bluetooth/utils/csvBufferToEpoch.d.ts +6 -0
  172. package/dist/types/api/bluetooth/utils/csvBufferToEpoch.d.ts.map +1 -0
  173. package/dist/types/api/bluetooth/utils/decodeJSONChunks.d.ts +10 -0
  174. package/dist/types/api/bluetooth/utils/decodeJSONChunks.d.ts.map +1 -0
  175. package/dist/types/api/bluetooth/utils/osHasBluetoothSupport.d.ts +3 -0
  176. package/dist/types/api/bluetooth/utils/osHasBluetoothSupport.d.ts.map +1 -0
  177. package/dist/types/api/bluetooth/utils/stitch.d.ts +6 -0
  178. package/dist/types/api/bluetooth/utils/stitch.d.ts.map +1 -0
  179. package/dist/types/api/bluetooth/utils/textCodec.d.ts +11 -0
  180. package/dist/types/api/bluetooth/utils/textCodec.d.ts.map +1 -0
  181. package/dist/types/api/bluetooth/web/WebBluetoothTransport.d.ts +48 -0
  182. package/dist/types/api/bluetooth/web/WebBluetoothTransport.d.ts.map +1 -0
  183. package/dist/types/api/bluetooth/web/isMaybeWebWorkerContext.d.ts +2 -0
  184. package/dist/types/api/bluetooth/web/isMaybeWebWorkerContext.d.ts.map +1 -0
  185. package/dist/types/api/bluetooth/web/isWebBluetoothSupported.d.ts +2 -0
  186. package/dist/types/api/bluetooth/web/isWebBluetoothSupported.d.ts.map +1 -0
  187. package/dist/types/api/firebase/FirebaseApp.d.ts +13 -0
  188. package/dist/types/api/firebase/FirebaseApp.d.ts.map +1 -0
  189. package/dist/types/api/firebase/FirebaseDevice.d.ts +35 -0
  190. package/dist/types/api/firebase/FirebaseDevice.d.ts.map +1 -0
  191. package/dist/types/api/firebase/FirebaseUser.d.ts +50 -0
  192. package/dist/types/api/firebase/FirebaseUser.d.ts.map +1 -0
  193. package/dist/types/api/firebase/config.d.ts +9 -0
  194. package/dist/types/api/firebase/config.d.ts.map +1 -0
  195. package/dist/types/api/firebase/deviceStore.d.ts +24 -0
  196. package/dist/types/api/firebase/deviceStore.d.ts.map +1 -0
  197. package/dist/types/api/firebase/index.d.ts +4 -0
  198. package/dist/types/api/firebase/index.d.ts.map +1 -0
  199. package/dist/types/api/https/config.d.ts +2 -0
  200. package/dist/types/api/https/config.d.ts.map +1 -0
  201. package/dist/types/api/https/createOAuthURL.d.ts +4 -0
  202. package/dist/types/api/https/createOAuthURL.d.ts.map +1 -0
  203. package/dist/types/api/https/getOAuthToken.d.ts +4 -0
  204. package/dist/types/api/https/getOAuthToken.d.ts.map +1 -0
  205. package/dist/types/api/https/utils.d.ts +3 -0
  206. package/dist/types/api/https/utils.d.ts.map +1 -0
  207. package/dist/types/api/index.d.ts +74 -0
  208. package/dist/types/api/index.d.ts.map +1 -0
  209. package/dist/types/index.d.ts +4 -0
  210. package/dist/types/index.d.ts.map +1 -0
  211. package/dist/types/subscriptions/SubscriptionManager.d.ts +9 -0
  212. package/dist/types/subscriptions/SubscriptionManager.d.ts.map +1 -0
  213. package/dist/types/timesync/Timesync.d.ts +21 -0
  214. package/dist/types/timesync/Timesync.d.ts.map +1 -0
  215. package/dist/types/timesync/index.d.ts +2 -0
  216. package/dist/types/timesync/index.d.ts.map +1 -0
  217. package/dist/types/types/accelerometer.d.ts +12 -0
  218. package/dist/types/types/accelerometer.d.ts.map +1 -0
  219. package/dist/types/types/actions.d.ts +11 -0
  220. package/dist/types/types/actions.d.ts.map +1 -0
  221. package/dist/types/types/apiKey.d.ts +31 -0
  222. package/dist/types/types/apiKey.d.ts.map +1 -0
  223. package/dist/types/types/awareness.d.ts +2 -0
  224. package/dist/types/types/awareness.d.ts.map +1 -0
  225. package/dist/types/types/brainwaves.d.ts +40 -0
  226. package/dist/types/types/brainwaves.d.ts.map +1 -0
  227. package/dist/types/types/calm.d.ts +7 -0
  228. package/dist/types/types/calm.d.ts.map +1 -0
  229. package/dist/types/types/client.d.ts +20 -0
  230. package/dist/types/types/client.d.ts.map +1 -0
  231. package/dist/types/types/credentials.d.ts +16 -0
  232. package/dist/types/types/credentials.d.ts.map +1 -0
  233. package/dist/types/types/deviceInfo.d.ts +20 -0
  234. package/dist/types/types/deviceInfo.d.ts.map +1 -0
  235. package/dist/types/types/epoch.d.ts +10 -0
  236. package/dist/types/types/epoch.d.ts.map +1 -0
  237. package/dist/types/types/experiment.d.ts +10 -0
  238. package/dist/types/types/experiment.d.ts.map +1 -0
  239. package/dist/types/types/focus.d.ts +7 -0
  240. package/dist/types/types/focus.d.ts.map +1 -0
  241. package/dist/types/types/hapticEffects.d.ts +126 -0
  242. package/dist/types/types/hapticEffects.d.ts.map +1 -0
  243. package/dist/types/types/index.d.ts +27 -0
  244. package/dist/types/types/index.d.ts.map +1 -0
  245. package/dist/types/types/kinesis.d.ts +7 -0
  246. package/dist/types/types/kinesis.d.ts.map +1 -0
  247. package/dist/types/types/marker.d.ts +5 -0
  248. package/dist/types/types/marker.d.ts.map +1 -0
  249. package/dist/types/types/metrics.d.ts +13 -0
  250. package/dist/types/types/metrics.d.ts.map +1 -0
  251. package/dist/types/types/oauth.d.ts +21 -0
  252. package/dist/types/types/oauth.d.ts.map +1 -0
  253. package/dist/types/types/options.d.ts +25 -0
  254. package/dist/types/types/options.d.ts.map +1 -0
  255. package/dist/types/types/recording.d.ts +26 -0
  256. package/dist/types/types/recording.d.ts.map +1 -0
  257. package/dist/types/types/sample.d.ts +10 -0
  258. package/dist/types/types/sample.d.ts.map +1 -0
  259. package/dist/types/types/settings.d.ts +8 -0
  260. package/dist/types/types/settings.d.ts.map +1 -0
  261. package/dist/types/types/signalQuality.d.ts +9 -0
  262. package/dist/types/types/signalQuality.d.ts.map +1 -0
  263. package/dist/types/types/signalQualityV2.d.ts +14 -0
  264. package/dist/types/types/signalQualityV2.d.ts.map +1 -0
  265. package/dist/types/types/skill.d.ts +45 -0
  266. package/dist/types/types/skill.d.ts.map +1 -0
  267. package/dist/types/types/status.d.ts +21 -0
  268. package/dist/types/types/status.d.ts.map +1 -0
  269. package/dist/types/types/streaming.d.ts +10 -0
  270. package/dist/types/types/streaming.d.ts.map +1 -0
  271. package/dist/types/types/subscriptions.d.ts +15 -0
  272. package/dist/types/types/subscriptions.d.ts.map +1 -0
  273. package/dist/types/types/training.d.ts +14 -0
  274. package/dist/types/types/training.d.ts.map +1 -0
  275. package/dist/types/types/user.d.ts +10 -0
  276. package/dist/types/types/user.d.ts.map +1 -0
  277. package/dist/types/utils/errors.d.ts +6 -0
  278. package/dist/types/utils/errors.d.ts.map +1 -0
  279. package/dist/types/utils/filterInternalKeys.d.ts +4 -0
  280. package/dist/types/utils/filterInternalKeys.d.ts.map +1 -0
  281. package/dist/types/utils/hapticEffects.d.ts +124 -0
  282. package/dist/types/utils/hapticEffects.d.ts.map +1 -0
  283. package/dist/types/utils/heartbeat.d.ts +5 -0
  284. package/dist/types/utils/heartbeat.d.ts.map +1 -0
  285. package/dist/types/utils/index.d.ts +14 -0
  286. package/dist/types/utils/index.d.ts.map +1 -0
  287. package/dist/types/utils/is-node.d.ts +2 -0
  288. package/dist/types/utils/is-node.d.ts.map +1 -0
  289. package/dist/types/utils/metrics.d.ts +4 -0
  290. package/dist/types/utils/metrics.d.ts.map +1 -0
  291. package/dist/types/utils/permissions.d.ts +16 -0
  292. package/dist/types/utils/permissions.d.ts.map +1 -0
  293. package/dist/types/utils/pick.d.ts +2 -0
  294. package/dist/types/utils/pick.d.ts.map +1 -0
  295. package/dist/types/utils/pipes.d.ts +18 -0
  296. package/dist/types/utils/pipes.d.ts.map +1 -0
  297. package/dist/types/utils/platform.d.ts +31 -0
  298. package/dist/types/utils/platform.d.ts.map +1 -0
  299. package/dist/types/utils/subscription.d.ts +7 -0
  300. package/dist/types/utils/subscription.d.ts.map +1 -0
  301. package/dist/types/utils/transferDevice.d.ts +10 -0
  302. package/dist/types/utils/transferDevice.d.ts.map +1 -0
  303. package/dist/types/utils/whileOnline.d.ts +9 -0
  304. package/dist/types/utils/whileOnline.d.ts.map +1 -0
  305. package/package.json +9 -9
  306. package/dist/index.d.ts +0 -1067
@@ -0,0 +1,5 @@
1
+ export default function ({ email, password }: {
2
+ email: string;
3
+ password: string;
4
+ }): Promise<void>;
5
+ //# sourceMappingURL=accelerometer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accelerometer.d.ts","sourceRoot":"","sources":["accelerometer.ts"],"names":[],"mappings":"AAEA,yBAA+B,EAC7B,KAAK,EACL,QAAQ,EACT,EAAE;IACD,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CAClB,iBAWA"}
@@ -0,0 +1,12 @@
1
+ import { Neurosity } from "../../src/index";
2
+ export default async function ({ email, password }) {
3
+ const neurosity = new Neurosity();
4
+ await neurosity.login({
5
+ email: email,
6
+ password: password
7
+ });
8
+ neurosity.accelerometer().subscribe((accelerometer) => {
9
+ console.log("accelerometer", accelerometer);
10
+ });
11
+ }
12
+ //# sourceMappingURL=accelerometer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accelerometer.js","sourceRoot":"","sources":["accelerometer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,MAAM,CAAC,OAAO,CAAC,KAAK,WAAW,EAC7B,KAAK,EACL,QAAQ,EAIT;IACC,MAAM,SAAS,GAAG,IAAI,SAAS,EAAE,CAAC;IAElC,MAAM,SAAS,CAAC,KAAK,CAAC;QACpB,KAAK,EAAE,KAAK;QACZ,QAAQ,EAAE,QAAQ;KACnB,CAAC,CAAC;IAEH,SAAS,CAAC,aAAa,EAAE,CAAC,SAAS,CAAC,CAAC,aAAa,EAAE,EAAE;QACpD,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,aAAa,CAAC,CAAC;IAC9C,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,4 @@
1
+ export default function ({ apiKey }: {
2
+ apiKey: string;
3
+ }): Promise<void>;
4
+ //# sourceMappingURL=authApiKey.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"authApiKey.d.ts","sourceRoot":"","sources":["authApiKey.ts"],"names":[],"mappings":"AAEA,yBAA+B,EAAE,MAAM,EAAE,EAAE;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,iBAkB5D"}
@@ -0,0 +1,17 @@
1
+ import { Neurosity } from "../../src/index";
2
+ export default async function ({ apiKey }) {
3
+ const neurosity = new Neurosity();
4
+ neurosity.onUserClaimsChange().subscribe((userClaims) => {
5
+ console.log("userClaims", userClaims);
6
+ });
7
+ await neurosity.login({
8
+ apiKey: apiKey
9
+ });
10
+ neurosity.status().subscribe((status) => {
11
+ console.log("status", status);
12
+ });
13
+ neurosity.calm().subscribe((calm) => {
14
+ console.log("calm", calm);
15
+ });
16
+ }
17
+ //# sourceMappingURL=authApiKey.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"authApiKey.js","sourceRoot":"","sources":["authApiKey.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,MAAM,CAAC,OAAO,CAAC,KAAK,WAAW,EAAE,MAAM,EAAsB;IAC3D,MAAM,SAAS,GAAG,IAAI,SAAS,EAAE,CAAC;IAElC,SAAS,CAAC,kBAAkB,EAAE,CAAC,SAAS,CAAC,CAAC,UAAU,EAAE,EAAE;QACtD,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC;IACxC,CAAC,CAAC,CAAC;IAEH,MAAM,SAAS,CAAC,KAAK,CAAC;QACpB,MAAM,EAAE,MAAM;KACf,CAAC,CAAC;IAEH,SAAS,CAAC,MAAM,EAAE,CAAC,SAAS,CAAC,CAAC,MAAM,EAAE,EAAE;QACtC,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IAChC,CAAC,CAAC,CAAC;IAEH,SAAS,CAAC,IAAI,EAAE,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE;QAClC,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IAC5B,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,4 @@
1
+ export default function ({ customToken }: {
2
+ customToken: string;
3
+ }): Promise<void>;
4
+ //# sourceMappingURL=authCustomToken.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"authCustomToken.d.ts","sourceRoot":"","sources":["authCustomToken.ts"],"names":[],"mappings":"AAEA,yBAA+B,EAAE,WAAW,EAAE,EAAE;IAAE,WAAW,EAAE,MAAM,CAAA;CAAE,iBAUtE"}
@@ -0,0 +1,11 @@
1
+ import { Neurosity } from "../../src/index";
2
+ export default async function ({ customToken }) {
3
+ const neurosity = new Neurosity();
4
+ await neurosity.login({
5
+ customToken: customToken
6
+ });
7
+ neurosity.status().subscribe((status) => {
8
+ console.log("status", status);
9
+ });
10
+ }
11
+ //# sourceMappingURL=authCustomToken.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"authCustomToken.js","sourceRoot":"","sources":["authCustomToken.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,MAAM,CAAC,OAAO,CAAC,KAAK,WAAW,EAAE,WAAW,EAA2B;IACrE,MAAM,SAAS,GAAG,IAAI,SAAS,EAAE,CAAC;IAElC,MAAM,SAAS,CAAC,KAAK,CAAC;QACpB,WAAW,EAAE,WAAW;KACzB,CAAC,CAAC;IAEH,SAAS,CAAC,MAAM,EAAE,CAAC,SAAS,CAAC,CAAC,MAAM,EAAE,EAAE;QACtC,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IAChC,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,5 @@
1
+ export default function ({ email, password }: {
2
+ email: string;
3
+ password: string;
4
+ }): Promise<void>;
5
+ //# sourceMappingURL=authEmailPassword.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"authEmailPassword.d.ts","sourceRoot":"","sources":["authEmailPassword.ts"],"names":[],"mappings":"AAEA,yBAA+B,EAC7B,KAAK,EACL,QAAQ,EACT,EAAE;IACD,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CAClB,iBAWA"}
@@ -0,0 +1,12 @@
1
+ import { Neurosity } from "../../src/index";
2
+ export default async function ({ email, password }) {
3
+ const neurosity = new Neurosity();
4
+ await neurosity.login({
5
+ email: email,
6
+ password: password
7
+ });
8
+ neurosity.status().subscribe((status) => {
9
+ console.log("status", status);
10
+ });
11
+ }
12
+ //# sourceMappingURL=authEmailPassword.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"authEmailPassword.js","sourceRoot":"","sources":["authEmailPassword.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,MAAM,CAAC,OAAO,CAAC,KAAK,WAAW,EAC7B,KAAK,EACL,QAAQ,EAIT;IACC,MAAM,SAAS,GAAG,IAAI,SAAS,EAAE,CAAC;IAElC,MAAM,SAAS,CAAC,KAAK,CAAC;QACpB,KAAK,EAAE,KAAK;QACZ,QAAQ,EAAE,QAAQ;KACnB,CAAC,CAAC;IAEH,SAAS,CAAC,MAAM,EAAE,CAAC,SAAS,CAAC,CAAC,MAAM,EAAE,EAAE;QACtC,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IAChC,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,5 @@
1
+ export default function ({ idToken, providerId }: {
2
+ idToken: string;
3
+ providerId: string;
4
+ }): Promise<void>;
5
+ //# sourceMappingURL=authIdToken.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"authIdToken.d.ts","sourceRoot":"","sources":["authIdToken.ts"],"names":[],"mappings":"AAEA,yBAA+B,EAC7B,OAAO,EACP,UAAU,EACX,EAAE;IACD,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;CACpB,iBAWA"}
@@ -0,0 +1,12 @@
1
+ import { Neurosity } from "../../src/index";
2
+ export default async function ({ idToken, providerId }) {
3
+ const neurosity = new Neurosity();
4
+ await neurosity.login({
5
+ idToken,
6
+ providerId
7
+ });
8
+ neurosity.status().subscribe((status) => {
9
+ console.log("status", status);
10
+ });
11
+ }
12
+ //# sourceMappingURL=authIdToken.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"authIdToken.js","sourceRoot":"","sources":["authIdToken.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,MAAM,CAAC,OAAO,CAAC,KAAK,WAAW,EAC7B,OAAO,EACP,UAAU,EAIX;IACC,MAAM,SAAS,GAAG,IAAI,SAAS,EAAE,CAAC;IAElC,MAAM,SAAS,CAAC,KAAK,CAAC;QACpB,OAAO;QACP,UAAU;KACX,CAAC,CAAC;IAEH,SAAS,CAAC,MAAM,EAAE,CAAC,SAAS,CAAC,CAAC,MAAM,EAAE,EAAE;QACtC,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IAChC,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,5 @@
1
+ export default function ({ email, password }: {
2
+ email: string;
3
+ password: string;
4
+ }): Promise<void>;
5
+ //# sourceMappingURL=authInheritance.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"authInheritance.d.ts","sourceRoot":"","sources":["authInheritance.ts"],"names":[],"mappings":"AAUA,yBAA+B,EAC7B,KAAK,EACL,QAAQ,EACT,EAAE;IACD,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CAClB,iBAeA"}
@@ -0,0 +1,17 @@
1
+ import { Neurosity } from "../../src/index";
2
+ import { config } from "../../src/api/firebase/config";
3
+ import { initializeApp } from "firebase/app";
4
+ import { getAuth, onAuthStateChanged, signInWithEmailAndPassword } from "firebase/auth";
5
+ export default async function ({ email, password }) {
6
+ initializeApp(config);
7
+ onAuthStateChanged(getAuth(), (user) => {
8
+ console.log("app user", user ? user.uid : null);
9
+ });
10
+ const neurosity = new Neurosity();
11
+ await signInWithEmailAndPassword(getAuth(), email, password);
12
+ // Neurosity login is not required since a previously
13
+ // defined neurosity firebase app is used for Neurosity
14
+ const devices = await neurosity.getDevices();
15
+ console.log("devices", devices);
16
+ }
17
+ //# sourceMappingURL=authInheritance.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"authInheritance.js","sourceRoot":"","sources":["authInheritance.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAC;AAEvD,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EACL,OAAO,EACP,kBAAkB,EAClB,0BAA0B,EAC3B,MAAM,eAAe,CAAC;AAEvB,MAAM,CAAC,OAAO,CAAC,KAAK,WAAW,EAC7B,KAAK,EACL,QAAQ,EAIT;IACC,aAAa,CAAC,MAAM,CAAC,CAAC;IAEtB,kBAAkB,CAAC,OAAO,EAAE,EAAE,CAAC,IAAI,EAAE,EAAE;QACrC,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;IAClD,CAAC,CAAC,CAAC;IAEH,MAAM,SAAS,GAAG,IAAI,SAAS,EAAE,CAAC;IAElC,MAAM,0BAA0B,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;IAE7D,qDAAqD;IACrD,uDAAuD;IACvD,MAAM,OAAO,GAAG,MAAM,SAAS,CAAC,UAAU,EAAE,CAAC;IAC7C,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;AAClC,CAAC"}
@@ -0,0 +1,5 @@
1
+ export default function ({ email, password }: {
2
+ email: string;
3
+ password: string;
4
+ }): Promise<void>;
5
+ //# sourceMappingURL=autoSelectDevice.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"autoSelectDevice.d.ts","sourceRoot":"","sources":["autoSelectDevice.ts"],"names":[],"mappings":"AAEA,yBAA+B,EAC7B,KAAK,EACL,QAAQ,EACT,EAAE;IACD,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CAClB,iBAiBA"}
@@ -0,0 +1,16 @@
1
+ import { Neurosity } from "../../src/index";
2
+ export default async function ({ email, password }) {
3
+ // Note: when deviceId is not passed,
4
+ // Neurosity will auto select the first claimed device
5
+ const neurosity = new Neurosity();
6
+ const response = await neurosity.login({
7
+ email: email,
8
+ password: password
9
+ });
10
+ console.log("response", response);
11
+ neurosity.status().subscribe((status) => {
12
+ console.log("status", status);
13
+ });
14
+ await neurosity.logout();
15
+ }
16
+ //# sourceMappingURL=autoSelectDevice.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"autoSelectDevice.js","sourceRoot":"","sources":["autoSelectDevice.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,MAAM,CAAC,OAAO,CAAC,KAAK,WAAW,EAC7B,KAAK,EACL,QAAQ,EAIT;IACC,qCAAqC;IACrC,sDAAsD;IACtD,MAAM,SAAS,GAAG,IAAI,SAAS,EAAE,CAAC;IAElC,MAAM,QAAQ,GAAG,MAAM,SAAS,CAAC,KAAK,CAAC;QACrC,KAAK,EAAE,KAAK;QACZ,QAAQ,EAAE,QAAQ;KACnB,CAAC,CAAC;IAEH,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;IAElC,SAAS,CAAC,MAAM,EAAE,CAAC,SAAS,CAAC,CAAC,MAAM,EAAE,EAAE;QACtC,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IAChC,CAAC,CAAC,CAAC;IAEH,MAAM,SAAS,CAAC,MAAM,EAAE,CAAC;AAC3B,CAAC"}
@@ -0,0 +1,5 @@
1
+ export default function ({ email, password }: {
2
+ email: string;
3
+ password: string;
4
+ }): Promise<void>;
5
+ //# sourceMappingURL=brainwaves.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"brainwaves.d.ts","sourceRoot":"","sources":["brainwaves.ts"],"names":[],"mappings":"AAEA,yBAA+B,EAC7B,KAAK,EACL,QAAQ,EACT,EAAE;IACD,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CAClB,iBAWA"}
@@ -0,0 +1,12 @@
1
+ import { Neurosity } from "../../src/index";
2
+ export default async function ({ email, password }) {
3
+ const neurosity = new Neurosity();
4
+ await neurosity.login({
5
+ email: email,
6
+ password: password
7
+ });
8
+ neurosity.brainwaves("raw").subscribe((brainwaves) => {
9
+ console.log("brainwaves", brainwaves);
10
+ });
11
+ }
12
+ //# sourceMappingURL=brainwaves.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"brainwaves.js","sourceRoot":"","sources":["brainwaves.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,MAAM,CAAC,OAAO,CAAC,KAAK,WAAW,EAC7B,KAAK,EACL,QAAQ,EAIT;IACC,MAAM,SAAS,GAAG,IAAI,SAAS,EAAE,CAAC;IAElC,MAAM,SAAS,CAAC,KAAK,CAAC;QACpB,KAAK,EAAE,KAAK;QACZ,QAAQ,EAAE,QAAQ;KACnB,CAAC,CAAC;IAEH,SAAS,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,CAAC,UAAU,EAAE,EAAE;QACnD,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC;IACxC,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,5 @@
1
+ export default function ({ email, password }: {
2
+ email: string;
3
+ password: string;
4
+ }): Promise<void>;
5
+ //# sourceMappingURL=calm.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"calm.d.ts","sourceRoot":"","sources":["calm.ts"],"names":[],"mappings":"AAEA,yBAA+B,EAC7B,KAAK,EACL,QAAQ,EACT,EAAE;IACD,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CAClB,iBAWA"}
@@ -0,0 +1,12 @@
1
+ import { Neurosity } from "../../src/index";
2
+ export default async function ({ email, password }) {
3
+ const neurosity = new Neurosity();
4
+ await neurosity.login({
5
+ email: email,
6
+ password: password
7
+ });
8
+ neurosity.calm().subscribe((calm) => {
9
+ console.log("calm", calm);
10
+ });
11
+ }
12
+ //# sourceMappingURL=calm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"calm.js","sourceRoot":"","sources":["calm.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,MAAM,CAAC,OAAO,CAAC,KAAK,WAAW,EAC7B,KAAK,EACL,QAAQ,EAIT;IACC,MAAM,SAAS,GAAG,IAAI,SAAS,EAAE,CAAC;IAElC,MAAM,SAAS,CAAC,KAAK,CAAC;QACpB,KAAK,EAAE,KAAK;QACZ,QAAQ,EAAE,QAAQ;KACnB,CAAC,CAAC;IAEH,SAAS,CAAC,IAAI,EAAE,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE;QAClC,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IAC5B,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,5 @@
1
+ export default function ({ email, password }: {
2
+ email: string;
3
+ password: string;
4
+ }): Promise<void>;
5
+ //# sourceMappingURL=clients.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clients.d.ts","sourceRoot":"","sources":["clients.ts"],"names":[],"mappings":"AAEA,yBAA+B,EAC7B,KAAK,EACL,QAAQ,EACT,EAAE;IACD,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CAClB,iBAUA"}
@@ -0,0 +1,10 @@
1
+ import { Neurosity } from "../../src/index";
2
+ export default async function ({ email, password }) {
3
+ const client1 = new Neurosity();
4
+ await client1.login({ email, password });
5
+ setTimeout(async () => {
6
+ const client2 = new Neurosity();
7
+ await client2.login({ email, password });
8
+ }, 2000);
9
+ }
10
+ //# sourceMappingURL=clients.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clients.js","sourceRoot":"","sources":["clients.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,MAAM,CAAC,OAAO,CAAC,KAAK,WAAW,EAC7B,KAAK,EACL,QAAQ,EAIT;IACC,MAAM,OAAO,GAAG,IAAI,SAAS,EAAE,CAAC;IAEhC,MAAM,OAAO,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAC;IAEzC,UAAU,CAAC,KAAK,IAAI,EAAE;QACpB,MAAM,OAAO,GAAG,IAAI,SAAS,EAAE,CAAC;QAEhC,MAAM,OAAO,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAC;IAC3C,CAAC,EAAE,IAAI,CAAC,CAAC;AACX,CAAC"}
@@ -0,0 +1,2 @@
1
+ export default function (): Promise<void>;
2
+ //# sourceMappingURL=createAccount.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createAccount.d.ts","sourceRoot":"","sources":["createAccount.ts"],"names":[],"mappings":"AAEA,0CAkBC"}
@@ -0,0 +1,16 @@
1
+ import { Neurosity } from "../../src/index";
2
+ export default async function () {
3
+ const neurosity = new Neurosity({
4
+ // important to set `autoSelectDevice` to false when creating an account
5
+ // since there will be no devices to select from
6
+ autoSelectDevice: false
7
+ });
8
+ neurosity.onAuthStateChanged().subscribe((user) => {
9
+ console.log("onAuthStateChanged", user ? `logged in as ${user.email}` : "not logged in");
10
+ });
11
+ await neurosity.createAccount({
12
+ email: `tester+neurosity+${Math.random()}@neurosity.co`,
13
+ password: `${Math.random()}`
14
+ });
15
+ }
16
+ //# sourceMappingURL=createAccount.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createAccount.js","sourceRoot":"","sources":["createAccount.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,MAAM,CAAC,OAAO,CAAC,KAAK;IAClB,MAAM,SAAS,GAAG,IAAI,SAAS,CAAC;QAC9B,wEAAwE;QACxE,gDAAgD;QAChD,gBAAgB,EAAE,KAAK;KACxB,CAAC,CAAC;IAEH,SAAS,CAAC,kBAAkB,EAAE,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE;QAChD,OAAO,CAAC,GAAG,CACT,oBAAoB,EACpB,IAAI,CAAC,CAAC,CAAC,gBAAgB,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,eAAe,CACtD,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,MAAM,SAAS,CAAC,aAAa,CAAC;QAC5B,KAAK,EAAE,oBAAoB,IAAI,CAAC,MAAM,EAAE,eAAe;QACvD,QAAQ,EAAE,GAAG,IAAI,CAAC,MAAM,EAAE,EAAE;KAC7B,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,5 @@
1
+ export default function ({ email, password }: {
2
+ email: string;
3
+ password: string;
4
+ }): Promise<void>;
5
+ //# sourceMappingURL=createApiKey.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createApiKey.d.ts","sourceRoot":"","sources":["createApiKey.ts"],"names":[],"mappings":"AAEA,yBAA+B,EAC7B,KAAK,EACL,QAAQ,EACT,EAAE;IACD,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CAClB,iBAuBA"}
@@ -0,0 +1,24 @@
1
+ import { Neurosity } from "../../src/index";
2
+ export default async function ({ email, password }) {
3
+ const neurosity = new Neurosity();
4
+ await neurosity.login({
5
+ email: email,
6
+ password: password
7
+ });
8
+ neurosity
9
+ .createApiKey({
10
+ description: "API Key for custom app",
11
+ scopes: {
12
+ "read:devices-info": true,
13
+ "read:devices-status": true,
14
+ "read:focus": true
15
+ }
16
+ })
17
+ .then((response) => {
18
+ console.log("success", response);
19
+ })
20
+ .catch((error) => {
21
+ console.log(error);
22
+ });
23
+ }
24
+ //# sourceMappingURL=createApiKey.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createApiKey.js","sourceRoot":"","sources":["createApiKey.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,MAAM,CAAC,OAAO,CAAC,KAAK,WAAW,EAC7B,KAAK,EACL,QAAQ,EAIT;IACC,MAAM,SAAS,GAAG,IAAI,SAAS,EAAE,CAAC;IAElC,MAAM,SAAS,CAAC,KAAK,CAAC;QACpB,KAAK,EAAE,KAAK;QACZ,QAAQ,EAAE,QAAQ;KACnB,CAAC,CAAC;IAEH,SAAS;SACN,YAAY,CAAC;QACZ,WAAW,EAAE,wBAAwB;QACrC,MAAM,EAAE;YACN,mBAAmB,EAAE,IAAI;YACzB,qBAAqB,EAAE,IAAI;YAC3B,YAAY,EAAE,IAAI;SACnB;KACF,CAAC;SACD,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE;QACjB,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;IACnC,CAAC,CAAC;SACD,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;QACf,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IACrB,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -0,0 +1,5 @@
1
+ export default function ({ email, password }: {
2
+ email: string;
3
+ password: string;
4
+ }): Promise<void>;
5
+ //# sourceMappingURL=createCustomToken.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createCustomToken.d.ts","sourceRoot":"","sources":["createCustomToken.ts"],"names":[],"mappings":"AAEA,yBAA+B,EAC7B,KAAK,EACL,QAAQ,EACT,EAAE;IACD,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CAClB,iBAgBA"}
@@ -0,0 +1,17 @@
1
+ import { Neurosity } from "../../src/index";
2
+ export default async function ({ email, password }) {
3
+ const neurosity = new Neurosity();
4
+ await neurosity.login({
5
+ email: email,
6
+ password: password
7
+ });
8
+ neurosity
9
+ .createCustomToken()
10
+ .then((token) => {
11
+ console.log("success", token);
12
+ })
13
+ .catch((error) => {
14
+ console.log(error);
15
+ });
16
+ }
17
+ //# sourceMappingURL=createCustomToken.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createCustomToken.js","sourceRoot":"","sources":["createCustomToken.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,MAAM,CAAC,OAAO,CAAC,KAAK,WAAW,EAC7B,KAAK,EACL,QAAQ,EAIT;IACC,MAAM,SAAS,GAAG,IAAI,SAAS,EAAE,CAAC;IAElC,MAAM,SAAS,CAAC,KAAK,CAAC;QACpB,KAAK,EAAE,KAAK;QACZ,QAAQ,EAAE,QAAQ;KACnB,CAAC,CAAC;IAEH,SAAS;SACN,iBAAiB,EAAE;SACnB,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE;QACd,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;IAChC,CAAC,CAAC;SACD,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;QACf,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IACrB,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -0,0 +1,2 @@
1
+ export default function (): Promise<void>;
2
+ //# sourceMappingURL=deleteAccount.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deleteAccount.d.ts","sourceRoot":"","sources":["deleteAccount.ts"],"names":[],"mappings":"AAEA,0CA4BC"}
@@ -0,0 +1,21 @@
1
+ import { Neurosity } from "../../src/index";
2
+ export default async function () {
3
+ const neurosity = new Neurosity({
4
+ // important to set `autoSelectDevice` to false when creating an account
5
+ // since there will be no devices to select from
6
+ autoSelectDevice: false
7
+ });
8
+ neurosity.onAuthStateChanged().subscribe((user) => {
9
+ console.log("onAuthStateChanged", user ? `logged in as ${user.email}` : "not logged in");
10
+ });
11
+ const email = `tester+neurosity+${Math.random()}@neurosity.co`;
12
+ await neurosity.createAccount({
13
+ email,
14
+ password: `${Math.random()}`
15
+ });
16
+ console.log("account created");
17
+ await new Promise((r) => setTimeout(r, 10000));
18
+ await neurosity.deleteAccount();
19
+ console.log("account deleted");
20
+ }
21
+ //# sourceMappingURL=deleteAccount.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deleteAccount.js","sourceRoot":"","sources":["deleteAccount.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,MAAM,CAAC,OAAO,CAAC,KAAK;IAClB,MAAM,SAAS,GAAG,IAAI,SAAS,CAAC;QAC9B,wEAAwE;QACxE,gDAAgD;QAChD,gBAAgB,EAAE,KAAK;KACxB,CAAC,CAAC;IAEH,SAAS,CAAC,kBAAkB,EAAE,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE;QAChD,OAAO,CAAC,GAAG,CACT,oBAAoB,EACpB,IAAI,CAAC,CAAC,CAAC,gBAAgB,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,eAAe,CACtD,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,MAAM,KAAK,GAAG,oBAAoB,IAAI,CAAC,MAAM,EAAE,eAAe,CAAC;IAE/D,MAAM,SAAS,CAAC,aAAa,CAAC;QAC5B,KAAK;QACL,QAAQ,EAAE,GAAG,IAAI,CAAC,MAAM,EAAE,EAAE;KAC7B,CAAC,CAAC;IAEH,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;IAE/B,MAAM,IAAI,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC;IAE/C,MAAM,SAAS,CAAC,aAAa,EAAE,CAAC;IAEhC,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;AACjC,CAAC"}
@@ -0,0 +1,5 @@
1
+ export default function ({ email, password }: {
2
+ email: string;
3
+ password: string;
4
+ }): Promise<void>;
5
+ //# sourceMappingURL=focus.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"focus.d.ts","sourceRoot":"","sources":["focus.ts"],"names":[],"mappings":"AAEA,yBAA+B,EAC7B,KAAK,EACL,QAAQ,EACT,EAAE;IACD,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CAClB,iBAWA"}
@@ -0,0 +1,12 @@
1
+ import { Neurosity } from "../../src/index";
2
+ export default async function ({ email, password }) {
3
+ const neurosity = new Neurosity();
4
+ await neurosity.login({
5
+ email: email,
6
+ password: password
7
+ });
8
+ neurosity.focus().subscribe((focus) => {
9
+ console.log("focus", focus);
10
+ });
11
+ }
12
+ //# sourceMappingURL=focus.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"focus.js","sourceRoot":"","sources":["focus.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,MAAM,CAAC,OAAO,CAAC,KAAK,WAAW,EAC7B,KAAK,EACL,QAAQ,EAIT;IACC,MAAM,SAAS,GAAG,IAAI,SAAS,EAAE,CAAC;IAElC,MAAM,SAAS,CAAC,KAAK,CAAC;QACpB,KAAK,EAAE,KAAK;QACZ,QAAQ,EAAE,QAAQ;KACnB,CAAC,CAAC;IAEH,SAAS,CAAC,KAAK,EAAE,CAAC,SAAS,CAAC,CAAC,KAAK,EAAE,EAAE;QACpC,OAAO,CAAC,GAAG,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IAC9B,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,2 @@
1
+ export default function (): Promise<void>;
2
+ //# sourceMappingURL=getDevices.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getDevices.d.ts","sourceRoot":"","sources":["getDevices.ts"],"names":[],"mappings":"AAEA,0CA2BC"}
@@ -0,0 +1,27 @@
1
+ import { Neurosity } from "../../src/index";
2
+ export default async function () {
3
+ // Note: when `deviceId` is not passed, and `autoSelectDevice`
4
+ // is set to not set (defaults to true), the first claimed
5
+ // device will be automatically selected.
6
+ const neurosity = new Neurosity();
7
+ neurosity.onUserDevicesChange().subscribe((devices) => {
8
+ console.log("devices", devices);
9
+ });
10
+ await neurosity
11
+ .login({
12
+ email: process.env.NEUROSITY_EMAIL,
13
+ password: process.env.NEUROSITY_PASSWORD
14
+ })
15
+ .catch((error) => {
16
+ console.log("error", error);
17
+ });
18
+ neurosity
19
+ .getDevices()
20
+ .then((devices) => {
21
+ console.log("devices (once)", devices);
22
+ })
23
+ .catch((error) => {
24
+ console.error("devices catch", error);
25
+ });
26
+ }
27
+ //# sourceMappingURL=getDevices.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getDevices.js","sourceRoot":"","sources":["getDevices.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,MAAM,CAAC,OAAO,CAAC,KAAK;IAClB,8DAA8D;IAC9D,0DAA0D;IAC1D,yCAAyC;IACzC,MAAM,SAAS,GAAG,IAAI,SAAS,EAAE,CAAC;IAElC,SAAS,CAAC,mBAAmB,EAAE,CAAC,SAAS,CAAC,CAAC,OAAO,EAAE,EAAE;QACpD,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IAClC,CAAC,CAAC,CAAC;IAEH,MAAM,SAAS;SACZ,KAAK,CAAC;QACL,KAAK,EAAE,OAAO,CAAC,GAAG,CAAC,eAAgB;QACnC,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,kBAAmB;KAC1C,CAAC;SACD,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;QACf,OAAO,CAAC,GAAG,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IAC9B,CAAC,CAAC,CAAC;IAEL,SAAS;SACN,UAAU,EAAE;SACZ,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE;QAChB,OAAO,CAAC,GAAG,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC;IACzC,CAAC,CAAC;SACD,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;QACf,OAAO,CAAC,KAAK,CAAC,eAAe,EAAE,KAAK,CAAC,CAAC;IACxC,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -0,0 +1,5 @@
1
+ export default function ({ email, password }: {
2
+ email: string;
3
+ password: string;
4
+ }): Promise<void>;
5
+ //# sourceMappingURL=haptics.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"haptics.d.ts","sourceRoot":"","sources":["haptics.ts"],"names":[],"mappings":"AAEA,yBAA+B,EAC7B,KAAK,EACL,QAAQ,EACT,EAAE;IACD,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CAClB,iBA0BA"}
@@ -0,0 +1,25 @@
1
+ import { Neurosity } from "../../src/index";
2
+ export default async function ({ email, password }) {
3
+ const neurosity = new Neurosity();
4
+ await neurosity.login({
5
+ email: email,
6
+ password: password
7
+ });
8
+ const info = await neurosity.getInfo();
9
+ console.log("info", info);
10
+ const effects = neurosity.getHapticEffects();
11
+ const hapticOptions = {
12
+ P7: [effects.strongClick100],
13
+ P8: [
14
+ effects.transitionRampUpLongSmooth1_0_to_100,
15
+ effects.transitionRampDownLongSmooth1_100_to_0,
16
+ effects.transitionRampUpLongSmooth1_0_to_100,
17
+ effects.transitionRampDownLongSmooth1_100_to_0,
18
+ effects.transitionRampUpLongSmooth1_0_to_100,
19
+ effects.transitionRampDownLongSmooth1_100_to_0
20
+ ]
21
+ };
22
+ const res = await neurosity.haptics(hapticOptions);
23
+ console.log("Res", res);
24
+ }
25
+ //# sourceMappingURL=haptics.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"haptics.js","sourceRoot":"","sources":["haptics.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,MAAM,CAAC,OAAO,CAAC,KAAK,WAAW,EAC7B,KAAK,EACL,QAAQ,EAIT;IACC,MAAM,SAAS,GAAG,IAAI,SAAS,EAAE,CAAC;IAElC,MAAM,SAAS,CAAC,KAAK,CAAC;QACpB,KAAK,EAAE,KAAK;QACZ,QAAQ,EAAE,QAAQ;KACnB,CAAC,CAAC;IAEH,MAAM,IAAI,GAAG,MAAM,SAAS,CAAC,OAAO,EAAE,CAAC;IACvC,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IAE1B,MAAM,OAAO,GAAG,SAAS,CAAC,gBAAgB,EAAE,CAAC;IAC7C,MAAM,aAAa,GAAG;QACpB,EAAE,EAAE,CAAC,OAAO,CAAC,cAAc,CAAC;QAC5B,EAAE,EAAE;YACF,OAAO,CAAC,oCAAoC;YAC5C,OAAO,CAAC,sCAAsC;YAC9C,OAAO,CAAC,oCAAoC;YAC5C,OAAO,CAAC,sCAAsC;YAC9C,OAAO,CAAC,oCAAoC;YAC5C,OAAO,CAAC,sCAAsC;SAC/C;KACF,CAAC;IAEF,MAAM,GAAG,GAAG,MAAM,SAAS,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;IACnD,OAAO,CAAC,GAAG,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;AAC1B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":""}
@@ -0,0 +1,62 @@
1
+ import { config } from "dotenv";
2
+ import inquirer from "inquirer";
3
+ import fs from "fs";
4
+ config();
5
+ const deviceId = process.env.NEUROSITY_DEVICE_ID;
6
+ const email = process.env.NEUROSITY_EMAIL;
7
+ const password = process.env.NEUROSITY_PASSWORD;
8
+ const customToken = process.env.NEUROSITY_CUSTOM_TOKEN;
9
+ const idToken = process.env.NEUROSITY_ID_TOKEN;
10
+ const providerId = process.env.NEUROSITY_PROVIDER_ID;
11
+ const apiKey = process.env.NEUROSITY_API_KEY;
12
+ const choiceName = process.argv[2];
13
+ const fileExtension = ".ts";
14
+ console.log("email -> ", email);
15
+ console.log("password -> ", password);
16
+ console.log("deviceId -> ", deviceId);
17
+ console.log("customToken -> ", customToken);
18
+ console.log("idToken -> ", idToken);
19
+ console.log("providerId -> ", providerId);
20
+ console.log("apiKey -> ", apiKey);
21
+ const choices = fs
22
+ .readdirSync("./examples/node")
23
+ .filter((fileName) => fileName !== `index${fileExtension}`);
24
+ if (choices
25
+ .map((choice) => choice.replace(fileExtension, ""))
26
+ .includes(choiceName)) {
27
+ const exampleFileName = `${choiceName}${fileExtension}`;
28
+ runFile(exampleFileName).catch((error) => {
29
+ console.log("runFile error -> ", error);
30
+ });
31
+ process.exit(0);
32
+ }
33
+ const questions = [
34
+ {
35
+ type: "list",
36
+ name: "exampleFileName",
37
+ message: `Select an example to run`,
38
+ choices
39
+ }
40
+ ];
41
+ // @ts-expect-error - not clear why the type is not right
42
+ inquirer.prompt(questions).then(async ({ exampleFileName }) => {
43
+ runFile(exampleFileName).catch((error) => {
44
+ console.log("runFile error -> ", error);
45
+ });
46
+ });
47
+ async function runFile(exampleFileName) {
48
+ const { default: exampleFunction } = await import(`./${exampleFileName}`);
49
+ if (typeof exampleFunction !== "function") {
50
+ return;
51
+ }
52
+ await exampleFunction({
53
+ email,
54
+ password,
55
+ customToken,
56
+ apiKey,
57
+ deviceId,
58
+ idToken,
59
+ providerId
60
+ });
61
+ }
62
+ //# sourceMappingURL=index.js.map