@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.
- package/dist/examples/node/accelerometer.d.ts +5 -0
- package/dist/examples/node/accelerometer.d.ts.map +1 -0
- package/dist/examples/node/accelerometer.js +12 -0
- package/dist/examples/node/accelerometer.js.map +1 -0
- package/dist/examples/node/authApiKey.d.ts +4 -0
- package/dist/examples/node/authApiKey.d.ts.map +1 -0
- package/dist/examples/node/authApiKey.js +17 -0
- package/dist/examples/node/authApiKey.js.map +1 -0
- package/dist/examples/node/authCustomToken.d.ts +4 -0
- package/dist/examples/node/authCustomToken.d.ts.map +1 -0
- package/dist/examples/node/authCustomToken.js +11 -0
- package/dist/examples/node/authCustomToken.js.map +1 -0
- package/dist/examples/node/authEmailPassword.d.ts +5 -0
- package/dist/examples/node/authEmailPassword.d.ts.map +1 -0
- package/dist/examples/node/authEmailPassword.js +12 -0
- package/dist/examples/node/authEmailPassword.js.map +1 -0
- package/dist/examples/node/authIdToken.d.ts +5 -0
- package/dist/examples/node/authIdToken.d.ts.map +1 -0
- package/dist/examples/node/authIdToken.js +12 -0
- package/dist/examples/node/authIdToken.js.map +1 -0
- package/dist/examples/node/authInheritance.d.ts +5 -0
- package/dist/examples/node/authInheritance.d.ts.map +1 -0
- package/dist/examples/node/authInheritance.js +17 -0
- package/dist/examples/node/authInheritance.js.map +1 -0
- package/dist/examples/node/autoSelectDevice.d.ts +5 -0
- package/dist/examples/node/autoSelectDevice.d.ts.map +1 -0
- package/dist/examples/node/autoSelectDevice.js +16 -0
- package/dist/examples/node/autoSelectDevice.js.map +1 -0
- package/dist/examples/node/brainwaves.d.ts +5 -0
- package/dist/examples/node/brainwaves.d.ts.map +1 -0
- package/dist/examples/node/brainwaves.js +12 -0
- package/dist/examples/node/brainwaves.js.map +1 -0
- package/dist/examples/node/calm.d.ts +5 -0
- package/dist/examples/node/calm.d.ts.map +1 -0
- package/dist/examples/node/calm.js +12 -0
- package/dist/examples/node/calm.js.map +1 -0
- package/dist/examples/node/clients.d.ts +5 -0
- package/dist/examples/node/clients.d.ts.map +1 -0
- package/dist/examples/node/clients.js +10 -0
- package/dist/examples/node/clients.js.map +1 -0
- package/dist/examples/node/createAccount.d.ts +2 -0
- package/dist/examples/node/createAccount.d.ts.map +1 -0
- package/dist/examples/node/createAccount.js +16 -0
- package/dist/examples/node/createAccount.js.map +1 -0
- package/dist/examples/node/createApiKey.d.ts +5 -0
- package/dist/examples/node/createApiKey.d.ts.map +1 -0
- package/dist/examples/node/createApiKey.js +24 -0
- package/dist/examples/node/createApiKey.js.map +1 -0
- package/dist/examples/node/createCustomToken.d.ts +5 -0
- package/dist/examples/node/createCustomToken.d.ts.map +1 -0
- package/dist/examples/node/createCustomToken.js +17 -0
- package/dist/examples/node/createCustomToken.js.map +1 -0
- package/dist/examples/node/deleteAccount.d.ts +2 -0
- package/dist/examples/node/deleteAccount.d.ts.map +1 -0
- package/dist/examples/node/deleteAccount.js +21 -0
- package/dist/examples/node/deleteAccount.js.map +1 -0
- package/dist/examples/node/focus.d.ts +5 -0
- package/dist/examples/node/focus.d.ts.map +1 -0
- package/dist/examples/node/focus.js +12 -0
- package/dist/examples/node/focus.js.map +1 -0
- package/dist/examples/node/getDevices.d.ts +2 -0
- package/dist/examples/node/getDevices.d.ts.map +1 -0
- package/dist/examples/node/getDevices.js +27 -0
- package/dist/examples/node/getDevices.js.map +1 -0
- package/dist/examples/node/haptics.d.ts +5 -0
- package/dist/examples/node/haptics.d.ts.map +1 -0
- package/dist/examples/node/haptics.js +25 -0
- package/dist/examples/node/haptics.js.map +1 -0
- package/dist/examples/node/index.d.ts +2 -0
- package/dist/examples/node/index.d.ts.map +1 -0
- package/dist/examples/node/index.js +62 -0
- package/dist/examples/node/index.js.map +1 -0
- package/dist/examples/node/kinesis.d.ts +5 -0
- package/dist/examples/node/kinesis.d.ts.map +1 -0
- package/dist/examples/node/kinesis.js +12 -0
- package/dist/examples/node/kinesis.js.map +1 -0
- package/dist/examples/node/manuallySelectDevice.d.ts +5 -0
- package/dist/examples/node/manuallySelectDevice.d.ts.map +1 -0
- package/dist/examples/node/manuallySelectDevice.js +18 -0
- package/dist/examples/node/manuallySelectDevice.js.map +1 -0
- package/dist/examples/node/markers.d.ts +5 -0
- package/dist/examples/node/markers.d.ts.map +1 -0
- package/dist/examples/node/markers.js +27 -0
- package/dist/examples/node/markers.js.map +1 -0
- package/dist/examples/node/multipleDevices.d.ts +5 -0
- package/dist/examples/node/multipleDevices.d.ts.map +1 -0
- package/dist/examples/node/multipleDevices.js +33 -0
- package/dist/examples/node/multipleDevices.js.map +1 -0
- package/dist/examples/node/oauth.d.ts +5 -0
- package/dist/examples/node/oauth.d.ts.map +1 -0
- package/dist/examples/node/oauth.js +21 -0
- package/dist/examples/node/oauth.js.map +1 -0
- package/dist/examples/node/osVersion.d.ts +5 -0
- package/dist/examples/node/osVersion.d.ts.map +1 -0
- package/dist/examples/node/osVersion.js +12 -0
- package/dist/examples/node/osVersion.js.map +1 -0
- package/dist/examples/node/predictions.d.ts +5 -0
- package/dist/examples/node/predictions.d.ts.map +1 -0
- package/dist/examples/node/predictions.js +12 -0
- package/dist/examples/node/predictions.js.map +1 -0
- package/dist/examples/node/rawUnfiltered.d.ts +5 -0
- package/dist/examples/node/rawUnfiltered.d.ts.map +1 -0
- package/dist/examples/node/rawUnfiltered.js +12 -0
- package/dist/examples/node/rawUnfiltered.js.map +1 -0
- package/dist/examples/node/removeApiKey.d.ts +5 -0
- package/dist/examples/node/removeApiKey.d.ts.map +1 -0
- package/dist/examples/node/removeApiKey.js +17 -0
- package/dist/examples/node/removeApiKey.js.map +1 -0
- package/dist/examples/node/settings.d.ts +5 -0
- package/dist/examples/node/settings.d.ts.map +1 -0
- package/dist/examples/node/settings.js +19 -0
- package/dist/examples/node/settings.js.map +1 -0
- package/dist/examples/node/signalQuality.d.ts +5 -0
- package/dist/examples/node/signalQuality.d.ts.map +1 -0
- package/dist/examples/node/signalQuality.js +12 -0
- package/dist/examples/node/signalQuality.js.map +1 -0
- package/dist/examples/node/status.d.ts +5 -0
- package/dist/examples/node/status.d.ts.map +1 -0
- package/dist/examples/node/status.js +12 -0
- package/dist/examples/node/status.js.map +1 -0
- package/dist/examples/node/switchSelectedDevice.d.ts +5 -0
- package/dist/examples/node/switchSelectedDevice.d.ts.map +1 -0
- package/dist/examples/node/switchSelectedDevice.js +25 -0
- package/dist/examples/node/switchSelectedDevice.js.map +1 -0
- package/dist/examples/node/timesync.d.ts +5 -0
- package/dist/examples/node/timesync.d.ts.map +1 -0
- package/dist/examples/node/timesync.js +12 -0
- package/dist/examples/node/timesync.js.map +1 -0
- package/dist/examples/node/training.d.ts +5 -0
- package/dist/examples/node/training.d.ts.map +1 -0
- package/dist/examples/node/training.js +30 -0
- package/dist/examples/node/training.js.map +1 -0
- package/dist/examples/node/transferDevice.d.ts +5 -0
- package/dist/examples/node/transferDevice.d.ts.map +1 -0
- package/dist/examples/node/transferDevice.js +27 -0
- package/dist/examples/node/transferDevice.js.map +1 -0
- package/dist/index.js +2186 -979
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2186 -979
- package/dist/index.mjs.map +1 -1
- package/dist/neurosity.iife.js +2186 -979
- package/dist/neurosity.iife.js.map +1 -1
- package/dist/neurosity.umd.js +2186 -979
- package/dist/neurosity.umd.js.map +1 -1
- package/dist/types/Neurosity.d.ts +102 -0
- package/dist/types/Neurosity.d.ts.map +1 -0
- package/dist/types/api/bluetooth/BluetoothClient.d.ts +77 -0
- package/dist/types/api/bluetooth/BluetoothClient.d.ts.map +1 -0
- package/dist/types/api/bluetooth/BluetoothTransport.d.ts +31 -0
- package/dist/types/api/bluetooth/BluetoothTransport.d.ts.map +1 -0
- package/dist/types/api/bluetooth/constants.d.ts +5 -0
- package/dist/types/api/bluetooth/constants.d.ts.map +1 -0
- package/dist/types/api/bluetooth/index.d.ts +6 -0
- package/dist/types/api/bluetooth/index.d.ts.map +1 -0
- package/dist/types/api/bluetooth/react-native/ReactNativeTransport.d.ts +73 -0
- package/dist/types/api/bluetooth/react-native/ReactNativeTransport.d.ts.map +1 -0
- package/dist/types/api/bluetooth/react-native/index.d.ts +3 -0
- package/dist/types/api/bluetooth/react-native/index.d.ts.map +1 -0
- package/dist/types/api/bluetooth/react-native/types/BleManagerTypes.d.ts +64 -0
- package/dist/types/api/bluetooth/react-native/types/BleManagerTypes.d.ts.map +1 -0
- package/dist/types/api/bluetooth/react-native/types/ReactNativeTypes.d.ts +41 -0
- package/dist/types/api/bluetooth/react-native/types/ReactNativeTypes.d.ts.map +1 -0
- package/dist/types/api/bluetooth/react-native/types/index.d.ts +3 -0
- package/dist/types/api/bluetooth/react-native/types/index.d.ts.map +1 -0
- package/dist/types/api/bluetooth/types/index.d.ts +21 -0
- package/dist/types/api/bluetooth/types/index.d.ts.map +1 -0
- package/dist/types/api/bluetooth/utils/binaryBufferToEpoch.d.ts +10 -0
- package/dist/types/api/bluetooth/utils/binaryBufferToEpoch.d.ts.map +1 -0
- package/dist/types/api/bluetooth/utils/create6DigitPin.d.ts +2 -0
- package/dist/types/api/bluetooth/utils/create6DigitPin.d.ts.map +1 -0
- package/dist/types/api/bluetooth/utils/csvBufferToEpoch.d.ts +6 -0
- package/dist/types/api/bluetooth/utils/csvBufferToEpoch.d.ts.map +1 -0
- package/dist/types/api/bluetooth/utils/decodeJSONChunks.d.ts +10 -0
- package/dist/types/api/bluetooth/utils/decodeJSONChunks.d.ts.map +1 -0
- package/dist/types/api/bluetooth/utils/osHasBluetoothSupport.d.ts +3 -0
- package/dist/types/api/bluetooth/utils/osHasBluetoothSupport.d.ts.map +1 -0
- package/dist/types/api/bluetooth/utils/stitch.d.ts +6 -0
- package/dist/types/api/bluetooth/utils/stitch.d.ts.map +1 -0
- package/dist/types/api/bluetooth/utils/textCodec.d.ts +11 -0
- package/dist/types/api/bluetooth/utils/textCodec.d.ts.map +1 -0
- package/dist/types/api/bluetooth/web/WebBluetoothTransport.d.ts +48 -0
- package/dist/types/api/bluetooth/web/WebBluetoothTransport.d.ts.map +1 -0
- package/dist/types/api/bluetooth/web/isMaybeWebWorkerContext.d.ts +2 -0
- package/dist/types/api/bluetooth/web/isMaybeWebWorkerContext.d.ts.map +1 -0
- package/dist/types/api/bluetooth/web/isWebBluetoothSupported.d.ts +2 -0
- package/dist/types/api/bluetooth/web/isWebBluetoothSupported.d.ts.map +1 -0
- package/dist/types/api/firebase/FirebaseApp.d.ts +13 -0
- package/dist/types/api/firebase/FirebaseApp.d.ts.map +1 -0
- package/dist/types/api/firebase/FirebaseDevice.d.ts +35 -0
- package/dist/types/api/firebase/FirebaseDevice.d.ts.map +1 -0
- package/dist/types/api/firebase/FirebaseUser.d.ts +50 -0
- package/dist/types/api/firebase/FirebaseUser.d.ts.map +1 -0
- package/dist/types/api/firebase/config.d.ts +9 -0
- package/dist/types/api/firebase/config.d.ts.map +1 -0
- package/dist/types/api/firebase/deviceStore.d.ts +24 -0
- package/dist/types/api/firebase/deviceStore.d.ts.map +1 -0
- package/dist/types/api/firebase/index.d.ts +4 -0
- package/dist/types/api/firebase/index.d.ts.map +1 -0
- package/dist/types/api/https/config.d.ts +2 -0
- package/dist/types/api/https/config.d.ts.map +1 -0
- package/dist/types/api/https/createOAuthURL.d.ts +4 -0
- package/dist/types/api/https/createOAuthURL.d.ts.map +1 -0
- package/dist/types/api/https/getOAuthToken.d.ts +4 -0
- package/dist/types/api/https/getOAuthToken.d.ts.map +1 -0
- package/dist/types/api/https/utils.d.ts +3 -0
- package/dist/types/api/https/utils.d.ts.map +1 -0
- package/dist/types/api/index.d.ts +74 -0
- package/dist/types/api/index.d.ts.map +1 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/subscriptions/SubscriptionManager.d.ts +9 -0
- package/dist/types/subscriptions/SubscriptionManager.d.ts.map +1 -0
- package/dist/types/timesync/Timesync.d.ts +21 -0
- package/dist/types/timesync/Timesync.d.ts.map +1 -0
- package/dist/types/timesync/index.d.ts +2 -0
- package/dist/types/timesync/index.d.ts.map +1 -0
- package/dist/types/types/accelerometer.d.ts +12 -0
- package/dist/types/types/accelerometer.d.ts.map +1 -0
- package/dist/types/types/actions.d.ts +11 -0
- package/dist/types/types/actions.d.ts.map +1 -0
- package/dist/types/types/apiKey.d.ts +31 -0
- package/dist/types/types/apiKey.d.ts.map +1 -0
- package/dist/types/types/awareness.d.ts +2 -0
- package/dist/types/types/awareness.d.ts.map +1 -0
- package/dist/types/types/brainwaves.d.ts +40 -0
- package/dist/types/types/brainwaves.d.ts.map +1 -0
- package/dist/types/types/calm.d.ts +7 -0
- package/dist/types/types/calm.d.ts.map +1 -0
- package/dist/types/types/client.d.ts +20 -0
- package/dist/types/types/client.d.ts.map +1 -0
- package/dist/types/types/credentials.d.ts +16 -0
- package/dist/types/types/credentials.d.ts.map +1 -0
- package/dist/types/types/deviceInfo.d.ts +20 -0
- package/dist/types/types/deviceInfo.d.ts.map +1 -0
- package/dist/types/types/epoch.d.ts +10 -0
- package/dist/types/types/epoch.d.ts.map +1 -0
- package/dist/types/types/experiment.d.ts +10 -0
- package/dist/types/types/experiment.d.ts.map +1 -0
- package/dist/types/types/focus.d.ts +7 -0
- package/dist/types/types/focus.d.ts.map +1 -0
- package/dist/types/types/hapticEffects.d.ts +126 -0
- package/dist/types/types/hapticEffects.d.ts.map +1 -0
- package/dist/types/types/index.d.ts +27 -0
- package/dist/types/types/index.d.ts.map +1 -0
- package/dist/types/types/kinesis.d.ts +7 -0
- package/dist/types/types/kinesis.d.ts.map +1 -0
- package/dist/types/types/marker.d.ts +5 -0
- package/dist/types/types/marker.d.ts.map +1 -0
- package/dist/types/types/metrics.d.ts +13 -0
- package/dist/types/types/metrics.d.ts.map +1 -0
- package/dist/types/types/oauth.d.ts +21 -0
- package/dist/types/types/oauth.d.ts.map +1 -0
- package/dist/types/types/options.d.ts +25 -0
- package/dist/types/types/options.d.ts.map +1 -0
- package/dist/types/types/recording.d.ts +26 -0
- package/dist/types/types/recording.d.ts.map +1 -0
- package/dist/types/types/sample.d.ts +10 -0
- package/dist/types/types/sample.d.ts.map +1 -0
- package/dist/types/types/settings.d.ts +8 -0
- package/dist/types/types/settings.d.ts.map +1 -0
- package/dist/types/types/signalQuality.d.ts +9 -0
- package/dist/types/types/signalQuality.d.ts.map +1 -0
- package/dist/types/types/signalQualityV2.d.ts +14 -0
- package/dist/types/types/signalQualityV2.d.ts.map +1 -0
- package/dist/types/types/skill.d.ts +45 -0
- package/dist/types/types/skill.d.ts.map +1 -0
- package/dist/types/types/status.d.ts +21 -0
- package/dist/types/types/status.d.ts.map +1 -0
- package/dist/types/types/streaming.d.ts +10 -0
- package/dist/types/types/streaming.d.ts.map +1 -0
- package/dist/types/types/subscriptions.d.ts +15 -0
- package/dist/types/types/subscriptions.d.ts.map +1 -0
- package/dist/types/types/training.d.ts +14 -0
- package/dist/types/types/training.d.ts.map +1 -0
- package/dist/types/types/user.d.ts +10 -0
- package/dist/types/types/user.d.ts.map +1 -0
- package/dist/types/utils/errors.d.ts +6 -0
- package/dist/types/utils/errors.d.ts.map +1 -0
- package/dist/types/utils/filterInternalKeys.d.ts +4 -0
- package/dist/types/utils/filterInternalKeys.d.ts.map +1 -0
- package/dist/types/utils/hapticEffects.d.ts +124 -0
- package/dist/types/utils/hapticEffects.d.ts.map +1 -0
- package/dist/types/utils/heartbeat.d.ts +5 -0
- package/dist/types/utils/heartbeat.d.ts.map +1 -0
- package/dist/types/utils/index.d.ts +14 -0
- package/dist/types/utils/index.d.ts.map +1 -0
- package/dist/types/utils/is-node.d.ts +2 -0
- package/dist/types/utils/is-node.d.ts.map +1 -0
- package/dist/types/utils/metrics.d.ts +4 -0
- package/dist/types/utils/metrics.d.ts.map +1 -0
- package/dist/types/utils/permissions.d.ts +16 -0
- package/dist/types/utils/permissions.d.ts.map +1 -0
- package/dist/types/utils/pick.d.ts +2 -0
- package/dist/types/utils/pick.d.ts.map +1 -0
- package/dist/types/utils/pipes.d.ts +18 -0
- package/dist/types/utils/pipes.d.ts.map +1 -0
- package/dist/types/utils/platform.d.ts +31 -0
- package/dist/types/utils/platform.d.ts.map +1 -0
- package/dist/types/utils/subscription.d.ts +7 -0
- package/dist/types/utils/subscription.d.ts.map +1 -0
- package/dist/types/utils/transferDevice.d.ts +10 -0
- package/dist/types/utils/transferDevice.d.ts.map +1 -0
- package/dist/types/utils/whileOnline.d.ts +9 -0
- package/dist/types/utils/whileOnline.d.ts.map +1 -0
- package/package.json +9 -9
- package/dist/index.d.ts +0 -1067
package/dist/index.d.ts
DELETED
|
@@ -1,1067 +0,0 @@
|
|
|
1
|
-
import * as _firebase_app from '@firebase/app';
|
|
2
|
-
import * as rxjs from 'rxjs';
|
|
3
|
-
import { Observable, Subject, BehaviorSubject, ReplaySubject } from 'rxjs';
|
|
4
|
-
import { FirebaseApp as FirebaseApp$1 } from 'firebase/app';
|
|
5
|
-
import * as _firebase_auth from '@firebase/auth';
|
|
6
|
-
import { User } from 'firebase/auth';
|
|
7
|
-
import { User as User$1 } from '@firebase/auth-types';
|
|
8
|
-
|
|
9
|
-
type SkillProps = {
|
|
10
|
-
[key: string]: string | number | boolean;
|
|
11
|
-
};
|
|
12
|
-
interface Skill {
|
|
13
|
-
id: string;
|
|
14
|
-
bundleId: string;
|
|
15
|
-
spec: string;
|
|
16
|
-
name: string;
|
|
17
|
-
description: string;
|
|
18
|
-
props?: SkillProps;
|
|
19
|
-
organization?: string;
|
|
20
|
-
metrics: string[];
|
|
21
|
-
userId: string;
|
|
22
|
-
timestamp: number;
|
|
23
|
-
status: string;
|
|
24
|
-
thumbnail: string;
|
|
25
|
-
}
|
|
26
|
-
interface DeviceSkill {
|
|
27
|
-
id: string;
|
|
28
|
-
bundleId: string;
|
|
29
|
-
installedDate: number;
|
|
30
|
-
manifest: {
|
|
31
|
-
[key: string]: any;
|
|
32
|
-
};
|
|
33
|
-
status: string;
|
|
34
|
-
}
|
|
35
|
-
interface SkillsClient {
|
|
36
|
-
get: (id: string) => Promise<DeviceSkill>;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
interface PendingSubscription {
|
|
40
|
-
metric: string;
|
|
41
|
-
labels: string[];
|
|
42
|
-
atomic: boolean;
|
|
43
|
-
serverType?: string;
|
|
44
|
-
}
|
|
45
|
-
interface Subscription extends PendingSubscription {
|
|
46
|
-
id: string;
|
|
47
|
-
clientId: string;
|
|
48
|
-
serverType: string;
|
|
49
|
-
}
|
|
50
|
-
interface Subscriptions {
|
|
51
|
-
[id: string]: Subscription;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
declare class SubscriptionManager {
|
|
55
|
-
private _subscriptions;
|
|
56
|
-
get(): Subscriptions;
|
|
57
|
-
toList(): Subscription[];
|
|
58
|
-
add(subscription: Subscription): void;
|
|
59
|
-
remove(subscription: Subscription): void;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
type ActionOptions = {
|
|
63
|
-
characteristicName: string;
|
|
64
|
-
action: any;
|
|
65
|
-
};
|
|
66
|
-
type SubscribeOptions = {
|
|
67
|
-
characteristicName: string;
|
|
68
|
-
manageNotifications?: boolean;
|
|
69
|
-
skipJSONDecoding?: boolean;
|
|
70
|
-
};
|
|
71
|
-
declare enum BLUETOOTH_CONNECTION {
|
|
72
|
-
SCANNING = "scanning",
|
|
73
|
-
CONNECTED = "connected",
|
|
74
|
-
CONNECTING = "connecting",
|
|
75
|
-
DISCONNECTING = "disconnecting",
|
|
76
|
-
DISCONNECTED = "disconnected"
|
|
77
|
-
}
|
|
78
|
-
declare enum TRANSPORT_TYPE {
|
|
79
|
-
WEB = "web",
|
|
80
|
-
REACT_NATIVE = "reactNative"
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
interface Action {
|
|
84
|
-
command: string;
|
|
85
|
-
action: string;
|
|
86
|
-
message?: any;
|
|
87
|
-
responseRequired?: boolean;
|
|
88
|
-
responseTimeout?: number;
|
|
89
|
-
}
|
|
90
|
-
interface Actions {
|
|
91
|
-
dispatch(action: Action): Promise<any>;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
type OSVersion = string;
|
|
95
|
-
interface DeviceInfo {
|
|
96
|
-
deviceId: string;
|
|
97
|
-
deviceNickname: string;
|
|
98
|
-
channelNames: string[];
|
|
99
|
-
channels: number;
|
|
100
|
-
samplingRate: number;
|
|
101
|
-
manufacturer: string;
|
|
102
|
-
model: string;
|
|
103
|
-
modelName: string;
|
|
104
|
-
modelVersion: string;
|
|
105
|
-
osVersion: OSVersion;
|
|
106
|
-
apiVersion: string;
|
|
107
|
-
emulator?: boolean;
|
|
108
|
-
}
|
|
109
|
-
type DeviceSelectorKeyValue = [string, string | number | string[]];
|
|
110
|
-
type DeviceSelectorFunction = (devices: DeviceInfo[]) => DeviceInfo;
|
|
111
|
-
type DeviceSelector = DeviceSelectorKeyValue | DeviceSelectorFunction;
|
|
112
|
-
|
|
113
|
-
declare class BleManager {
|
|
114
|
-
start(options?: StartOptions): Promise<void>;
|
|
115
|
-
scan(serviceUUIDs: string[], seconds: number, allowDuplicates?: boolean, options?: ScanOptions): Promise<void>;
|
|
116
|
-
stopScan(): Promise<void>;
|
|
117
|
-
connect(peripheralID: string): Promise<void>;
|
|
118
|
-
disconnect(peripheralID: string, force?: boolean): Promise<void>;
|
|
119
|
-
checkState(): void;
|
|
120
|
-
startNotification(peripheralID: string, serviceUUID: string, characteristicUUID: string): Promise<void>;
|
|
121
|
-
startNotificationUseBuffer(peripheralID: string, serviceUUID: string, characteristicUUID: string, buffer: number): Promise<void>;
|
|
122
|
-
stopNotification(peripheralID: string, serviceUUID: string, characteristicUUID: string): Promise<void>;
|
|
123
|
-
read(peripheralID: string, serviceUUID: string, characteristicUUID: string): Promise<any>;
|
|
124
|
-
write(peripheralID: string, serviceUUID: string, characteristicUUID: string, data: any, maxByteSize?: number): Promise<void>;
|
|
125
|
-
writeWithoutResponse(peripheralID: string, serviceUUID: string, characteristicUUID: string, data: any, maxByteSize?: number, queueSleepTime?: number): Promise<void>;
|
|
126
|
-
readRSSI(peripheralID: string): Promise<void>;
|
|
127
|
-
getConnectedPeripherals(serviceUUIDs: string[]): Promise<Peripheral[]>;
|
|
128
|
-
getDiscoveredPeripherals(): Promise<Peripheral[]>;
|
|
129
|
-
isPeripheralConnected(peripheralID: string, serviceUUIDs: string[]): Promise<boolean>;
|
|
130
|
-
requestConnectionPriority(peripheralID: string, connectionPriority: ConnectionPriority): Promise<void>;
|
|
131
|
-
enableBluetooth(): Promise<void>;
|
|
132
|
-
refreshCache(peripheralID: string): Promise<void>;
|
|
133
|
-
requestMTU(peripheralID: string, mtu: number): Promise<void>;
|
|
134
|
-
createBond(peripheralID: string, peripheralPin?: string): Promise<void>;
|
|
135
|
-
removeBond(peripheralID: string): Promise<void>;
|
|
136
|
-
getBondedPeripherals(): Promise<Peripheral[]>;
|
|
137
|
-
removePeripheral(peripheralID: string): Promise<void>;
|
|
138
|
-
retrieveServices(peripheralID: string, serviceUUIDs?: string[]): Promise<PeripheralInfo>;
|
|
139
|
-
}
|
|
140
|
-
interface Peripheral {
|
|
141
|
-
id: string;
|
|
142
|
-
rssi: number;
|
|
143
|
-
name?: string;
|
|
144
|
-
advertising: AdvertisingData;
|
|
145
|
-
}
|
|
146
|
-
interface AdvertisingData {
|
|
147
|
-
isConnectable?: boolean;
|
|
148
|
-
localName?: string;
|
|
149
|
-
manufacturerData?: any;
|
|
150
|
-
serviceUUIDs?: string[];
|
|
151
|
-
txPowerLevel?: number;
|
|
152
|
-
}
|
|
153
|
-
interface StartOptions {
|
|
154
|
-
showAlert?: boolean;
|
|
155
|
-
restoreIdentifierKey?: string;
|
|
156
|
-
queueIdentifierKey?: string;
|
|
157
|
-
forceLegacy?: boolean;
|
|
158
|
-
}
|
|
159
|
-
interface ScanOptions {
|
|
160
|
-
numberOfMatches?: number;
|
|
161
|
-
matchMode?: number;
|
|
162
|
-
scanMode?: number;
|
|
163
|
-
reportDelay?: number;
|
|
164
|
-
}
|
|
165
|
-
declare enum ConnectionPriority {
|
|
166
|
-
balanced = 0,
|
|
167
|
-
high = 1,
|
|
168
|
-
low = 2
|
|
169
|
-
}
|
|
170
|
-
interface PeripheralInfo {
|
|
171
|
-
characteristics: Characteristic$1[];
|
|
172
|
-
}
|
|
173
|
-
interface Characteristic$1 {
|
|
174
|
-
characteristic: string;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
type DeviceNicknameOrPeripheral = string | Peripheral;
|
|
178
|
-
interface BluetoothTransport$1 {
|
|
179
|
-
type: TRANSPORT_TYPE;
|
|
180
|
-
connect(deviceNicknameORPeripheral?: DeviceNicknameOrPeripheral): Promise<void>;
|
|
181
|
-
_autoConnect(selectedDevice$: Observable<DeviceInfo>, osVersion: Observable<OSVersion>): Observable<void>;
|
|
182
|
-
disconnect(): Promise<void>;
|
|
183
|
-
connection(): Observable<BLUETOOTH_CONNECTION>;
|
|
184
|
-
requestDevice?(): any;
|
|
185
|
-
addLog: (log: string) => void;
|
|
186
|
-
logs$: Subject<string>;
|
|
187
|
-
enableAutoConnect?(value: boolean): void;
|
|
188
|
-
scan?(options?: {
|
|
189
|
-
seconds?: number;
|
|
190
|
-
}): Observable<Peripheral[]>;
|
|
191
|
-
subscribeToCharacteristic(args: {
|
|
192
|
-
characteristicName: string;
|
|
193
|
-
manageNotifications?: boolean;
|
|
194
|
-
}): Observable<any>;
|
|
195
|
-
readCharacteristic(characteristicName: string, parse?: boolean): Promise<any>;
|
|
196
|
-
writeCharacteristic(characteristicName: string, data: string): Promise<void>;
|
|
197
|
-
dispatchAction(args: {
|
|
198
|
-
characteristicName: string;
|
|
199
|
-
action: Action;
|
|
200
|
-
}): Promise<any>;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
type BufferLike = Uint8Array | number[];
|
|
204
|
-
declare class TextCodec {
|
|
205
|
-
transportType: TRANSPORT_TYPE;
|
|
206
|
-
webEncoder: TextEncoder;
|
|
207
|
-
webDecoder: TextDecoder;
|
|
208
|
-
constructor(transportType: TRANSPORT_TYPE);
|
|
209
|
-
encode(data: string): BufferLike;
|
|
210
|
-
decode(arrayBuffer: Uint8Array): string;
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
type Options$3 = {
|
|
214
|
-
autoConnect?: boolean;
|
|
215
|
-
};
|
|
216
|
-
declare class WebBluetoothTransport implements BluetoothTransport$1 {
|
|
217
|
-
type: TRANSPORT_TYPE;
|
|
218
|
-
textCodec: TextCodec;
|
|
219
|
-
options: Options$3;
|
|
220
|
-
device: BluetoothDevice;
|
|
221
|
-
server: BluetoothRemoteGATTServer;
|
|
222
|
-
service: BluetoothRemoteGATTService;
|
|
223
|
-
characteristicsByName: {
|
|
224
|
-
[name: string]: BluetoothRemoteGATTCharacteristic;
|
|
225
|
-
};
|
|
226
|
-
connection$: BehaviorSubject<BLUETOOTH_CONNECTION>;
|
|
227
|
-
pendingActions$: BehaviorSubject<any[]>;
|
|
228
|
-
logs$: ReplaySubject<string>;
|
|
229
|
-
onDisconnected$: Observable<void>;
|
|
230
|
-
connectionStream$: Observable<BLUETOOTH_CONNECTION>;
|
|
231
|
-
_isAutoConnectEnabled$: ReplaySubject<boolean>;
|
|
232
|
-
constructor(options?: Options$3);
|
|
233
|
-
_getPairedDevices(): Promise<BluetoothDevice[]>;
|
|
234
|
-
_autoConnect(selectedDevice$: Observable<DeviceInfo>): Observable<void>;
|
|
235
|
-
enableAutoConnect(autoConnect: boolean): void;
|
|
236
|
-
addLog(log: string): void;
|
|
237
|
-
isConnected(): boolean;
|
|
238
|
-
connection(): Observable<BLUETOOTH_CONNECTION>;
|
|
239
|
-
connect(deviceNickname?: string): Promise<void>;
|
|
240
|
-
requestDevice(deviceNickname?: string): Promise<BluetoothDevice>;
|
|
241
|
-
getServerServiceAndCharacteristics(device: BluetoothDevice): Promise<never>;
|
|
242
|
-
_onDisconnected(): Observable<any>;
|
|
243
|
-
disconnect(): Promise<void>;
|
|
244
|
-
getCharacteristicByName(characteristicName: string): Promise<BluetoothRemoteGATTCharacteristic>;
|
|
245
|
-
subscribeToCharacteristic({ characteristicName, manageNotifications, skipJSONDecoding }: SubscribeOptions): Observable<any>;
|
|
246
|
-
readCharacteristic(characteristicName: string, parse?: boolean): Promise<any>;
|
|
247
|
-
writeCharacteristic(characteristicName: string, data: string): Promise<void>;
|
|
248
|
-
_addPendingAction(actionId: number): void;
|
|
249
|
-
_removePendingAction(actionId: number): void;
|
|
250
|
-
_autoToggleActionNotifications(): Observable<any>;
|
|
251
|
-
dispatchAction({ characteristicName, action }: ActionOptions): Promise<any>;
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
interface EmitterSubscription extends EventSubscription {
|
|
255
|
-
emitter: EventEmitter;
|
|
256
|
-
listener: () => any;
|
|
257
|
-
context: any;
|
|
258
|
-
new (emitter: EventEmitter, subscriber: EventSubscriptionVendor, listener: () => any, context: any): EmitterSubscription;
|
|
259
|
-
remove(): void;
|
|
260
|
-
}
|
|
261
|
-
interface EventSubscription {
|
|
262
|
-
eventType: string;
|
|
263
|
-
key: number;
|
|
264
|
-
subscriber: EventSubscriptionVendor;
|
|
265
|
-
new (subscriber: EventSubscriptionVendor): EventSubscription;
|
|
266
|
-
remove(): void;
|
|
267
|
-
}
|
|
268
|
-
declare class EventSubscriptionVendor {
|
|
269
|
-
constructor();
|
|
270
|
-
addSubscription(eventType: string, subscription: EventSubscription): EventSubscription;
|
|
271
|
-
removeAllSubscriptions(eventType?: string): void;
|
|
272
|
-
removeSubscription(subscription: any): void;
|
|
273
|
-
getSubscriptionsForType(eventType: string): EventSubscription[];
|
|
274
|
-
}
|
|
275
|
-
declare class EventEmitter {
|
|
276
|
-
constructor(subscriber?: EventSubscriptionVendor | null);
|
|
277
|
-
addListener(eventType: string, listener: (...args: any[]) => any, context?: any): EmitterSubscription;
|
|
278
|
-
removeAllListeners(eventType?: string): void;
|
|
279
|
-
listenerCount(eventType: string): number;
|
|
280
|
-
emit(eventType: string, ...params: any[]): void;
|
|
281
|
-
}
|
|
282
|
-
type NativeModule = {
|
|
283
|
-
addListener: (eventType: string) => void;
|
|
284
|
-
removeListeners: (count: number) => void;
|
|
285
|
-
};
|
|
286
|
-
declare class NativeEventEmitter extends EventEmitter {
|
|
287
|
-
constructor(nativeModule?: NativeModule);
|
|
288
|
-
addListener(eventType: string, listener: (event: any) => void, context?: Object): EmitterSubscription;
|
|
289
|
-
removeAllListeners(eventType: string): void;
|
|
290
|
-
removeSubscription(subscription: EmitterSubscription): void;
|
|
291
|
-
}
|
|
292
|
-
type PlatformOSType = "ios" | "android" | "macos" | "windows" | "web" | "native";
|
|
293
|
-
|
|
294
|
-
type Characteristic = {
|
|
295
|
-
characteristicUUID: string;
|
|
296
|
-
serviceUUID: string;
|
|
297
|
-
peripheralId: string;
|
|
298
|
-
};
|
|
299
|
-
type CharacteristicsByName = {
|
|
300
|
-
[name: string]: Characteristic;
|
|
301
|
-
};
|
|
302
|
-
type Options$2 = {
|
|
303
|
-
BleManager: BleManager;
|
|
304
|
-
bleManagerEmitter: NativeEventEmitter;
|
|
305
|
-
platform: PlatformOSType;
|
|
306
|
-
autoConnect?: boolean;
|
|
307
|
-
};
|
|
308
|
-
type BleManagerEvents = {
|
|
309
|
-
stopScan$: Observable<void>;
|
|
310
|
-
discoverPeripheral$: Observable<Peripheral>;
|
|
311
|
-
connectPeripheral$: Observable<void>;
|
|
312
|
-
disconnectPeripheral$: Observable<void>;
|
|
313
|
-
didUpdateValueForCharacteristic$: Observable<any>;
|
|
314
|
-
didUpdateState$: Observable<any>;
|
|
315
|
-
};
|
|
316
|
-
declare class ReactNativeTransport implements BluetoothTransport$1 {
|
|
317
|
-
type: TRANSPORT_TYPE;
|
|
318
|
-
textCodec: TextCodec;
|
|
319
|
-
options: Options$2;
|
|
320
|
-
BleManager: BleManager;
|
|
321
|
-
bleManagerEmitter: NativeEventEmitter;
|
|
322
|
-
platform: PlatformOSType;
|
|
323
|
-
bleEvents: BleManagerEvents;
|
|
324
|
-
device: Peripheral;
|
|
325
|
-
characteristicsByName: CharacteristicsByName;
|
|
326
|
-
connection$: BehaviorSubject<BLUETOOTH_CONNECTION>;
|
|
327
|
-
pendingActions$: BehaviorSubject<any[]>;
|
|
328
|
-
logs$: ReplaySubject<string>;
|
|
329
|
-
onDisconnected$: Observable<void>;
|
|
330
|
-
connectionStream$: Observable<BLUETOOTH_CONNECTION>;
|
|
331
|
-
_isAutoConnectEnabled$: ReplaySubject<boolean>;
|
|
332
|
-
constructor(options: Options$2);
|
|
333
|
-
addLog(log: string): void;
|
|
334
|
-
isConnected(): boolean;
|
|
335
|
-
_autoConnect(selectedDevice$: Observable<DeviceInfo>): Observable<void>;
|
|
336
|
-
enableAutoConnect(autoConnect: boolean): void;
|
|
337
|
-
connection(): Observable<BLUETOOTH_CONNECTION>;
|
|
338
|
-
_fromEvent(eventName: string): Observable<any>;
|
|
339
|
-
scan(options?: {
|
|
340
|
-
seconds?: number;
|
|
341
|
-
once?: boolean;
|
|
342
|
-
skipConnectionUpdate?: boolean;
|
|
343
|
-
}): Observable<Peripheral[]>;
|
|
344
|
-
connect(peripheral: Peripheral): Promise<void>;
|
|
345
|
-
disconnect(): Promise<void>;
|
|
346
|
-
getCharacteristicByName(characteristicName: string): Characteristic;
|
|
347
|
-
subscribeToCharacteristic({ characteristicName, manageNotifications, skipJSONDecoding }: SubscribeOptions): Observable<any>;
|
|
348
|
-
readCharacteristic(characteristicName: string, parse?: boolean): Promise<any>;
|
|
349
|
-
writeCharacteristic(characteristicName: string, data: string): Promise<void>;
|
|
350
|
-
_addPendingAction(actionId: number): void;
|
|
351
|
-
_removePendingAction(actionId: number): void;
|
|
352
|
-
_autoToggleActionNotifications(): Observable<any>;
|
|
353
|
-
dispatchAction({ characteristicName, action }: ActionOptions): Promise<any>;
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
type Marker = {
|
|
357
|
-
label: string;
|
|
358
|
-
timestamp: number;
|
|
359
|
-
};
|
|
360
|
-
|
|
361
|
-
type Epoch$1 = {
|
|
362
|
-
data: number[];
|
|
363
|
-
info?: {
|
|
364
|
-
channelNames?: string[];
|
|
365
|
-
samplingRate?: number;
|
|
366
|
-
markers?: Marker[];
|
|
367
|
-
};
|
|
368
|
-
};
|
|
369
|
-
|
|
370
|
-
type BluetoothTransport = WebBluetoothTransport | ReactNativeTransport;
|
|
371
|
-
type IsAuthenticated = boolean;
|
|
372
|
-
type ExpiresIn = number;
|
|
373
|
-
type IsAuthenticatedResponse = [IsAuthenticated, ExpiresIn];
|
|
374
|
-
type CreateBluetoothToken = () => Promise<string>;
|
|
375
|
-
type Options$1 = {
|
|
376
|
-
transport: BluetoothTransport;
|
|
377
|
-
selectedDevice$: Observable<DeviceInfo>;
|
|
378
|
-
osHasBluetoothSupport$: Observable<boolean>;
|
|
379
|
-
createBluetoothToken: CreateBluetoothToken;
|
|
380
|
-
};
|
|
381
|
-
declare class BluetoothClient {
|
|
382
|
-
transport: BluetoothTransport;
|
|
383
|
-
deviceInfo: DeviceInfo;
|
|
384
|
-
selectedDevice$: ReplaySubject<DeviceInfo>;
|
|
385
|
-
osHasBluetoothSupport$: ReplaySubject<boolean>;
|
|
386
|
-
isAuthenticated$: ReplaySubject<boolean>;
|
|
387
|
-
_focus$: Observable<any>;
|
|
388
|
-
_calm$: Observable<any>;
|
|
389
|
-
_accelerometer$: Observable<any>;
|
|
390
|
-
_brainwavesRaw$: Observable<any>;
|
|
391
|
-
_brainwavesRawUnfiltered$: Observable<any>;
|
|
392
|
-
_brainwavesPSD$: Observable<any>;
|
|
393
|
-
_brainwavesPowerByBand$: Observable<any>;
|
|
394
|
-
_signalQuality$: Observable<any>;
|
|
395
|
-
_status$: Observable<any>;
|
|
396
|
-
_settings$: Observable<any>;
|
|
397
|
-
_wifiNearbyNetworks$: Observable<any>;
|
|
398
|
-
_wifiConnections$: Observable<any>;
|
|
399
|
-
constructor(options: Options$1);
|
|
400
|
-
_autoAuthenticate(createBluetoothToken: CreateBluetoothToken): Observable<IsAuthenticatedResponse>;
|
|
401
|
-
enableAutoConnect(autoConnect: boolean): void;
|
|
402
|
-
_hasBluetoothSupport(): Promise<boolean>;
|
|
403
|
-
authenticate(token: string): Promise<IsAuthenticatedResponse>;
|
|
404
|
-
isAuthenticated(): Promise<IsAuthenticatedResponse>;
|
|
405
|
-
scan(options?: any): Observable<Peripheral[]>;
|
|
406
|
-
connect(deviceNicknameORPeripheral?: DeviceNicknameOrPeripheral): Promise<void>;
|
|
407
|
-
disconnect(): Promise<void>;
|
|
408
|
-
connection(): Observable<BLUETOOTH_CONNECTION>;
|
|
409
|
-
logs(): Observable<string>;
|
|
410
|
-
getDeviceId(): Promise<string>;
|
|
411
|
-
_withAuthentication<T>(getter: () => Promise<T>): Promise<T>;
|
|
412
|
-
_subscribeWhileAuthenticated(characteristicName: string, skipJSONDecoding?: boolean): Observable<any>;
|
|
413
|
-
focus(): Observable<any>;
|
|
414
|
-
calm(): Observable<any>;
|
|
415
|
-
accelerometer(): Observable<any>;
|
|
416
|
-
brainwaves(label: string): Observable<Epoch$1 | any>;
|
|
417
|
-
signalQuality(): Observable<any>;
|
|
418
|
-
addMarker(label: string): Promise<void>;
|
|
419
|
-
getInfo(): Promise<DeviceInfo>;
|
|
420
|
-
status(): Observable<any>;
|
|
421
|
-
dispatchAction(action: Action): Promise<any>;
|
|
422
|
-
settings(): Observable<any>;
|
|
423
|
-
haptics(effects: any): Promise<any>;
|
|
424
|
-
get wifi(): {
|
|
425
|
-
nearbyNetworks: () => Observable<any>;
|
|
426
|
-
connections: () => Observable<any>;
|
|
427
|
-
connect: (ssid: string, password?: string) => Promise<any>;
|
|
428
|
-
forgetConnection: (ssid: string) => Promise<any>;
|
|
429
|
-
reset: () => Promise<any>;
|
|
430
|
-
speedTest: () => Promise<any>;
|
|
431
|
-
};
|
|
432
|
-
}
|
|
433
|
-
|
|
434
|
-
declare enum STREAMING_TYPE {
|
|
435
|
-
WIFI = "wifi",
|
|
436
|
-
BLUETOOTH = "bluetooth"
|
|
437
|
-
}
|
|
438
|
-
declare enum STREAMING_MODE {
|
|
439
|
-
WIFI_ONLY = "wifi-only",
|
|
440
|
-
WIFI_WITH_BLUETOOTH_FALLBACK = "wifi-with-bluetooth-fallback",
|
|
441
|
-
BLUETOOTH_WITH_WIFI_FALLBACK = "bluetooth-with-wifi-fallback"
|
|
442
|
-
}
|
|
443
|
-
|
|
444
|
-
interface SDKOptions {
|
|
445
|
-
deviceId?: string;
|
|
446
|
-
autoSelectDevice?: boolean;
|
|
447
|
-
timesync?: boolean;
|
|
448
|
-
bluetoothTransport?: BluetoothTransport;
|
|
449
|
-
streamingMode?: STREAMING_MODE;
|
|
450
|
-
emulator?: boolean;
|
|
451
|
-
emulatorHost?: string;
|
|
452
|
-
emulatorAuthPort?: number;
|
|
453
|
-
emulatorDatabasePort?: number;
|
|
454
|
-
emulatorOptions?: {
|
|
455
|
-
mockUserToken?: any;
|
|
456
|
-
};
|
|
457
|
-
emulatorFunctionsPort?: number;
|
|
458
|
-
emulatorFirestorePort?: number;
|
|
459
|
-
skill?: Skill;
|
|
460
|
-
}
|
|
461
|
-
interface SDKDependencies {
|
|
462
|
-
subscriptionManager: SubscriptionManager;
|
|
463
|
-
}
|
|
464
|
-
|
|
465
|
-
declare class FirebaseApp {
|
|
466
|
-
protected standalone: boolean;
|
|
467
|
-
app: FirebaseApp$1;
|
|
468
|
-
constructor(options: SDKOptions);
|
|
469
|
-
private getApp;
|
|
470
|
-
connectEmulators(options: SDKOptions): void;
|
|
471
|
-
goOnline(): void;
|
|
472
|
-
goOffline(): void;
|
|
473
|
-
disconnect(): Promise<any>;
|
|
474
|
-
}
|
|
475
|
-
|
|
476
|
-
type CustomToken = {
|
|
477
|
-
customToken: string;
|
|
478
|
-
};
|
|
479
|
-
type EmailAndPassword = {
|
|
480
|
-
email: string;
|
|
481
|
-
password: string;
|
|
482
|
-
};
|
|
483
|
-
type OAuthCredentials = {
|
|
484
|
-
idToken: string;
|
|
485
|
-
providerId: string;
|
|
486
|
-
};
|
|
487
|
-
type ApiKeyCredentials = {
|
|
488
|
-
apiKey: string;
|
|
489
|
-
};
|
|
490
|
-
type Credentials = EmailAndPassword | OAuthCredentials | CustomToken | ApiKeyCredentials;
|
|
491
|
-
|
|
492
|
-
type UserDevice = {
|
|
493
|
-
claimedOn: number;
|
|
494
|
-
};
|
|
495
|
-
type UserDevices = {
|
|
496
|
-
[deviceId: string]: UserDevice;
|
|
497
|
-
};
|
|
498
|
-
type UserClaims = {
|
|
499
|
-
[claimName: string]: boolean | string;
|
|
500
|
-
};
|
|
501
|
-
|
|
502
|
-
type OAuthConfig = {
|
|
503
|
-
clientId: string;
|
|
504
|
-
clientSecret?: string;
|
|
505
|
-
responseType: "token" | "code";
|
|
506
|
-
redirectUri: string;
|
|
507
|
-
scope: string[];
|
|
508
|
-
state: string;
|
|
509
|
-
};
|
|
510
|
-
type OAuthQuery = {
|
|
511
|
-
clientId: string;
|
|
512
|
-
clientSecret: string;
|
|
513
|
-
userId: string;
|
|
514
|
-
};
|
|
515
|
-
type OAuthQueryResult = {
|
|
516
|
-
customToken: string;
|
|
517
|
-
userId: string;
|
|
518
|
-
};
|
|
519
|
-
type OAuthRemoveResponse = {
|
|
520
|
-
ok: boolean;
|
|
521
|
-
};
|
|
522
|
-
|
|
523
|
-
type Experiment = {
|
|
524
|
-
deviceId: string;
|
|
525
|
-
id: string;
|
|
526
|
-
labels: string[];
|
|
527
|
-
name: string;
|
|
528
|
-
timestamp: number;
|
|
529
|
-
totalTrials: number;
|
|
530
|
-
userId: string;
|
|
531
|
-
};
|
|
532
|
-
|
|
533
|
-
type TransferDeviceByEmail = {
|
|
534
|
-
recipientsEmail: string;
|
|
535
|
-
deviceId: string;
|
|
536
|
-
};
|
|
537
|
-
type TransferDeviceByUserId = {
|
|
538
|
-
recipientsUserId: string;
|
|
539
|
-
deviceId: string;
|
|
540
|
-
};
|
|
541
|
-
type TransferDeviceOptions = TransferDeviceByEmail | TransferDeviceByUserId;
|
|
542
|
-
|
|
543
|
-
type ApiKeyScopes = {
|
|
544
|
-
[key: string]: boolean;
|
|
545
|
-
};
|
|
546
|
-
type ApiKeyRecord = {
|
|
547
|
-
id: string;
|
|
548
|
-
apiKey: string;
|
|
549
|
-
description: string;
|
|
550
|
-
userId: string;
|
|
551
|
-
scopes: ApiKeyScopes;
|
|
552
|
-
createdAt: Date;
|
|
553
|
-
expiresOn: Date | null;
|
|
554
|
-
};
|
|
555
|
-
type CreateApiKeyRequest = {
|
|
556
|
-
description: string;
|
|
557
|
-
scopes: ApiKeyScopes;
|
|
558
|
-
expiresOn?: string | Date;
|
|
559
|
-
};
|
|
560
|
-
type RemoveApiKeyResponse = {
|
|
561
|
-
success: boolean;
|
|
562
|
-
message: string;
|
|
563
|
-
};
|
|
564
|
-
|
|
565
|
-
type UserWithMetadata = User & {
|
|
566
|
-
selectedDevice: DeviceInfo | null;
|
|
567
|
-
};
|
|
568
|
-
declare class FirebaseUser {
|
|
569
|
-
app: FirebaseApp$1;
|
|
570
|
-
user: User | null;
|
|
571
|
-
constructor(firebaseApp: FirebaseApp);
|
|
572
|
-
auth(): _firebase_auth.Auth;
|
|
573
|
-
createAccount(credentials: EmailAndPassword): Promise<any>;
|
|
574
|
-
deleteAccount(): Promise<void>;
|
|
575
|
-
onAuthStateChanged(): Observable<User | null>;
|
|
576
|
-
onLogin(): Observable<User>;
|
|
577
|
-
login(credentials: Credentials): Promise<_firebase_auth.UserCredential>;
|
|
578
|
-
logout(): Promise<void>;
|
|
579
|
-
createCustomToken(): Promise<CustomToken>;
|
|
580
|
-
createApiKey(data: CreateApiKeyRequest): Promise<ApiKeyRecord>;
|
|
581
|
-
removeApiKey(apiKeyId: string): Promise<RemoveApiKeyResponse>;
|
|
582
|
-
private _createCustomTokenForApiKey;
|
|
583
|
-
removeOAuthAccess(): Promise<OAuthRemoveResponse>;
|
|
584
|
-
getDevices(): Promise<DeviceInfo[]>;
|
|
585
|
-
addDevice(deviceId: string): Promise<void>;
|
|
586
|
-
removeDevice(deviceId: string): Promise<void>;
|
|
587
|
-
transferDevice(options: TransferDeviceOptions): Promise<void>;
|
|
588
|
-
isDeviceIdValid(deviceId: string): Promise<boolean>;
|
|
589
|
-
onUserDevicesChange(): Observable<DeviceInfo[]>;
|
|
590
|
-
onUserClaimsChange(): Observable<UserClaims>;
|
|
591
|
-
getIdToken(forceRefresh?: boolean): Promise<void>;
|
|
592
|
-
getClaims(): Promise<UserClaims>;
|
|
593
|
-
private userDevicesToDeviceInfoList;
|
|
594
|
-
hasDevicePermission(deviceId: string): Promise<boolean>;
|
|
595
|
-
private getDeviceClaimedByPath;
|
|
596
|
-
private getUserClaimedDevicePath;
|
|
597
|
-
private getUserDevicesPath;
|
|
598
|
-
private getUserClaimsUpdatedOnPath;
|
|
599
|
-
private getDeviceInfoPath;
|
|
600
|
-
onUserExperiments(): Observable<Experiment[]>;
|
|
601
|
-
deleteUserExperiment(experimentId: string): Promise<void>;
|
|
602
|
-
}
|
|
603
|
-
|
|
604
|
-
type FirebaseDeviceOptions = {
|
|
605
|
-
deviceId: string;
|
|
606
|
-
firebaseApp: FirebaseApp;
|
|
607
|
-
dependencies: SDKDependencies;
|
|
608
|
-
};
|
|
609
|
-
declare class FirebaseDevice {
|
|
610
|
-
static serverType: string;
|
|
611
|
-
protected app: FirebaseApp$1;
|
|
612
|
-
protected deviceStore: any;
|
|
613
|
-
deviceId: string;
|
|
614
|
-
constructor({ deviceId, firebaseApp, dependencies }: FirebaseDeviceOptions);
|
|
615
|
-
get timestamp(): any;
|
|
616
|
-
dispatchAction(action: any): Promise<any>;
|
|
617
|
-
getInfo(): Promise<any>;
|
|
618
|
-
onNamespace(namespace: string, callback: Function): Function;
|
|
619
|
-
onceNamespace(namespace: string): Promise<any>;
|
|
620
|
-
offNamespace(namespace: string, listener: Function): void;
|
|
621
|
-
getTimesync(): Promise<number>;
|
|
622
|
-
nextMetric(metricName: string, metricValue: {
|
|
623
|
-
[label: string]: any;
|
|
624
|
-
}): void;
|
|
625
|
-
onMetric(subscription: any, callback: any): Function;
|
|
626
|
-
subscribeToMetric(subscription: any): any;
|
|
627
|
-
unsubscribeFromMetric(subscription: any): void;
|
|
628
|
-
removeMetricListener(subscription: any, listener: Function): void;
|
|
629
|
-
changeSettings(settings: any): Promise<void>;
|
|
630
|
-
getSkill(bundleId: any): Promise<any>;
|
|
631
|
-
createBluetoothToken(): Promise<string>;
|
|
632
|
-
disconnect(): void;
|
|
633
|
-
}
|
|
634
|
-
|
|
635
|
-
declare enum STATUS {
|
|
636
|
-
ONLINE = "online",
|
|
637
|
-
OFFLINE = "offline",
|
|
638
|
-
UPDATING = "updating",
|
|
639
|
-
BOOTING = "booting",
|
|
640
|
-
SHUTTING_OFF = "shuttingOff"
|
|
641
|
-
}
|
|
642
|
-
declare enum SLEEP_MODE_REASON {
|
|
643
|
-
UPDATING = "updating",
|
|
644
|
-
CHARGING = "charging"
|
|
645
|
-
}
|
|
646
|
-
interface DeviceStatus {
|
|
647
|
-
battery: number;
|
|
648
|
-
charging: boolean;
|
|
649
|
-
state: STATUS;
|
|
650
|
-
sleepMode: boolean;
|
|
651
|
-
sleepModeReason: SLEEP_MODE_REASON | null;
|
|
652
|
-
lastHeartbeat: number;
|
|
653
|
-
ssid: string;
|
|
654
|
-
}
|
|
655
|
-
|
|
656
|
-
type Options = {
|
|
657
|
-
getTimesync: () => Promise<number>;
|
|
658
|
-
status$: Observable<DeviceStatus>;
|
|
659
|
-
bufferSize?: number;
|
|
660
|
-
updateInterval?: number;
|
|
661
|
-
};
|
|
662
|
-
declare class Timesync {
|
|
663
|
-
options: Options;
|
|
664
|
-
_offset: number;
|
|
665
|
-
constructor(options: Options);
|
|
666
|
-
start(): void;
|
|
667
|
-
filterOutliers(): rxjs.UnaryFunction<Observable<number[]>, Observable<number[]>>;
|
|
668
|
-
toOffset(): rxjs.UnaryFunction<Observable<unknown>, Observable<number>>;
|
|
669
|
-
private average;
|
|
670
|
-
get offset(): number;
|
|
671
|
-
get timestamp(): number;
|
|
672
|
-
}
|
|
673
|
-
|
|
674
|
-
type SubscriptionListener = Function;
|
|
675
|
-
type MetricValue = {
|
|
676
|
-
[label: string]: any;
|
|
677
|
-
};
|
|
678
|
-
interface Metrics {
|
|
679
|
-
next(metricName: string, metricValue: MetricValue): void;
|
|
680
|
-
on(subscription: PendingSubscription, callback: Function): SubscriptionListener;
|
|
681
|
-
subscribe(subscription: PendingSubscription): Subscription;
|
|
682
|
-
unsubscribe(subscription: Subscription, listener: SubscriptionListener): void;
|
|
683
|
-
}
|
|
684
|
-
|
|
685
|
-
interface Settings {
|
|
686
|
-
lsl?: boolean;
|
|
687
|
-
osc?: boolean;
|
|
688
|
-
supportAccess?: boolean;
|
|
689
|
-
activityLogging?: boolean;
|
|
690
|
-
researchProgram?: boolean;
|
|
691
|
-
}
|
|
692
|
-
|
|
693
|
-
interface Client {
|
|
694
|
-
user: User$1 | null;
|
|
695
|
-
actions: Actions;
|
|
696
|
-
disconnect(): Promise<any>;
|
|
697
|
-
getInfo(): Promise<any>;
|
|
698
|
-
login?(credentials: Credentials): Promise<any>;
|
|
699
|
-
observeNamespace(namespace: string): Observable<any>;
|
|
700
|
-
metrics: Metrics;
|
|
701
|
-
skills: SkillsClient;
|
|
702
|
-
timestamp: number;
|
|
703
|
-
changeSettings(settings: Settings): Promise<void>;
|
|
704
|
-
}
|
|
705
|
-
|
|
706
|
-
declare class CloudClient implements Client {
|
|
707
|
-
user: any;
|
|
708
|
-
userClaims: any;
|
|
709
|
-
protected options: SDKOptions;
|
|
710
|
-
protected firebaseApp: FirebaseApp;
|
|
711
|
-
protected firebaseUser: FirebaseUser;
|
|
712
|
-
protected firebaseDevice: FirebaseDevice;
|
|
713
|
-
protected timesync: Timesync;
|
|
714
|
-
protected subscriptionManager: SubscriptionManager;
|
|
715
|
-
protected status$: Observable<DeviceStatus>;
|
|
716
|
-
protected osVersion$: Observable<OSVersion>;
|
|
717
|
-
private _selectedDevice;
|
|
718
|
-
constructor(options: SDKOptions);
|
|
719
|
-
onDeviceChange(): Observable<DeviceInfo>;
|
|
720
|
-
osVersion(): Observable<OSVersion>;
|
|
721
|
-
private setAutoSelectedDevice;
|
|
722
|
-
get actions(): Actions;
|
|
723
|
-
dispatchAction(action: Action): Promise<any>;
|
|
724
|
-
disconnect(): Promise<any>;
|
|
725
|
-
getInfo(): Promise<any>;
|
|
726
|
-
login(credentials: Credentials): Promise<any>;
|
|
727
|
-
logout(): Promise<any>;
|
|
728
|
-
onAuthStateChanged(): Observable<UserWithMetadata>;
|
|
729
|
-
getDevices(): Promise<DeviceInfo[]>;
|
|
730
|
-
addDevice(deviceId: string): Promise<void>;
|
|
731
|
-
removeDevice(deviceId: string): Promise<void>;
|
|
732
|
-
transferDevice(options: TransferDeviceOptions): Promise<void>;
|
|
733
|
-
onUserDevicesChange(): Observable<DeviceInfo[]>;
|
|
734
|
-
onUserClaimsChange(): Observable<UserClaims>;
|
|
735
|
-
didSelectDevice(): Promise<boolean>;
|
|
736
|
-
selectDevice(deviceSelector: DeviceSelector): Promise<DeviceInfo>;
|
|
737
|
-
getSelectedDevice(): Promise<DeviceInfo | null>;
|
|
738
|
-
status(): Observable<DeviceStatus>;
|
|
739
|
-
observeNamespace(namespace: string): Observable<any>;
|
|
740
|
-
onceNamespace(namespace: string): Promise<any>;
|
|
741
|
-
get metrics(): Metrics;
|
|
742
|
-
createAccount(credentials: EmailAndPassword): Promise<any>;
|
|
743
|
-
deleteAccount(): Promise<void>;
|
|
744
|
-
createBluetoothToken(): Promise<string>;
|
|
745
|
-
createCustomToken(): Promise<CustomToken>;
|
|
746
|
-
createApiKey(data: CreateApiKeyRequest): Promise<ApiKeyRecord>;
|
|
747
|
-
removeApiKey(apiKeyId: string): Promise<RemoveApiKeyResponse>;
|
|
748
|
-
removeOAuthAccess(): Promise<OAuthRemoveResponse>;
|
|
749
|
-
onUserExperiments(): Observable<Experiment[]>;
|
|
750
|
-
deleteUserExperiment(experimentId: string): Promise<void>;
|
|
751
|
-
get skills(): SkillsClient;
|
|
752
|
-
get timestamp(): number;
|
|
753
|
-
getTimesyncOffset(): number;
|
|
754
|
-
changeSettings(settings: Settings): Promise<void>;
|
|
755
|
-
goOffline(): void;
|
|
756
|
-
goOnline(): void;
|
|
757
|
-
__getApp(): _firebase_app.FirebaseApp;
|
|
758
|
-
}
|
|
759
|
-
|
|
760
|
-
interface TrainingRecording {
|
|
761
|
-
experimentId: string;
|
|
762
|
-
metric: string;
|
|
763
|
-
label: string;
|
|
764
|
-
fit?: boolean;
|
|
765
|
-
baseline?: boolean;
|
|
766
|
-
timestamp?: number;
|
|
767
|
-
}
|
|
768
|
-
interface Training {
|
|
769
|
-
record(training: TrainingRecording): void;
|
|
770
|
-
stop(training: TrainingRecording): void;
|
|
771
|
-
stopAll(): void;
|
|
772
|
-
}
|
|
773
|
-
|
|
774
|
-
type ChannelQuality = {
|
|
775
|
-
standardDeviation: number;
|
|
776
|
-
status: "great" | "good" | "bad" | "noContact";
|
|
777
|
-
};
|
|
778
|
-
interface SignalQuality {
|
|
779
|
-
[channelName: string]: ChannelQuality;
|
|
780
|
-
}
|
|
781
|
-
|
|
782
|
-
interface Kinesis {
|
|
783
|
-
metric: "kinesis";
|
|
784
|
-
label: string;
|
|
785
|
-
probability: number;
|
|
786
|
-
timestamp: number;
|
|
787
|
-
}
|
|
788
|
-
|
|
789
|
-
interface Calm {
|
|
790
|
-
metric: "awareness";
|
|
791
|
-
label: "calm";
|
|
792
|
-
probability: number;
|
|
793
|
-
timestamp: number;
|
|
794
|
-
}
|
|
795
|
-
|
|
796
|
-
interface Focus {
|
|
797
|
-
metric: "awareness";
|
|
798
|
-
label: "focus";
|
|
799
|
-
probability: number;
|
|
800
|
-
timestamp: number;
|
|
801
|
-
}
|
|
802
|
-
|
|
803
|
-
type BrainwavesLabel = "raw" | "rawUnfiltered" | "powerByBand" | "psd";
|
|
804
|
-
type AmplitudeByChannel = number[][];
|
|
805
|
-
interface BaseInfo {
|
|
806
|
-
samplingRate: number;
|
|
807
|
-
startTime: number;
|
|
808
|
-
channelNames: string[];
|
|
809
|
-
}
|
|
810
|
-
interface EpochInfo extends BaseInfo {
|
|
811
|
-
notchFrequency?: string;
|
|
812
|
-
}
|
|
813
|
-
interface Epoch {
|
|
814
|
-
data: AmplitudeByChannel;
|
|
815
|
-
info: EpochInfo;
|
|
816
|
-
}
|
|
817
|
-
interface RawUnfilteredEpochInfo extends BaseInfo {
|
|
818
|
-
}
|
|
819
|
-
interface RawUnfilteredEpoch {
|
|
820
|
-
data: AmplitudeByChannel;
|
|
821
|
-
info: RawUnfilteredEpochInfo;
|
|
822
|
-
}
|
|
823
|
-
type PSDByChannel = number[][];
|
|
824
|
-
interface PSDInfo extends BaseInfo {
|
|
825
|
-
notchFrequency: string;
|
|
826
|
-
}
|
|
827
|
-
interface PSD {
|
|
828
|
-
label: "psd";
|
|
829
|
-
psd: PSDByChannel;
|
|
830
|
-
freqs: number[];
|
|
831
|
-
info: PSDInfo;
|
|
832
|
-
}
|
|
833
|
-
type BandName = "gamma" | "beta" | "alpha" | "theta" | "delta";
|
|
834
|
-
interface PowerByBand {
|
|
835
|
-
gamma: number[];
|
|
836
|
-
beta: number[];
|
|
837
|
-
alpha: number[];
|
|
838
|
-
theta: number[];
|
|
839
|
-
delta: number[];
|
|
840
|
-
info: BaseInfo;
|
|
841
|
-
}
|
|
842
|
-
|
|
843
|
-
interface Accelerometer {
|
|
844
|
-
timestamp: number;
|
|
845
|
-
acceleration: number;
|
|
846
|
-
inclination: number;
|
|
847
|
-
orientation: number;
|
|
848
|
-
pitch: number;
|
|
849
|
-
roll: number;
|
|
850
|
-
x: number;
|
|
851
|
-
y: number;
|
|
852
|
-
z: number;
|
|
853
|
-
}
|
|
854
|
-
|
|
855
|
-
type HapticEffects = {
|
|
856
|
-
strongClick100: string;
|
|
857
|
-
strongClick60: string;
|
|
858
|
-
strongClick30: string;
|
|
859
|
-
sharpClick100: string;
|
|
860
|
-
sharpClick60: string;
|
|
861
|
-
sharpClick30: string;
|
|
862
|
-
softBump100: string;
|
|
863
|
-
softBump60: string;
|
|
864
|
-
softBump30: string;
|
|
865
|
-
doubleClick100: string;
|
|
866
|
-
doubleClick60: string;
|
|
867
|
-
tripleClick100: string;
|
|
868
|
-
softFuzz60: string;
|
|
869
|
-
strongBuzz100: string;
|
|
870
|
-
alert750ms: string;
|
|
871
|
-
alert1000ms: string;
|
|
872
|
-
strongClick1_100: string;
|
|
873
|
-
strongClick2_80: string;
|
|
874
|
-
strongClick3_60: string;
|
|
875
|
-
strongClick4_30: string;
|
|
876
|
-
mediumClick1_100: string;
|
|
877
|
-
mediumClick2_80: string;
|
|
878
|
-
mediumClick3_60: string;
|
|
879
|
-
sharpTick1_100: string;
|
|
880
|
-
sharpTick2_80: string;
|
|
881
|
-
sharpTick3_60: string;
|
|
882
|
-
shortDoubleClickStrong1_100: string;
|
|
883
|
-
shortDoubleClickStrong2_80: string;
|
|
884
|
-
shortDoubleClickStrong3_60: string;
|
|
885
|
-
shortDoubleClickStrong4_30: string;
|
|
886
|
-
shortDoubleClickMedium1_100: string;
|
|
887
|
-
shortDoubleClickMedium2_80: string;
|
|
888
|
-
shortDoubleClickMedium3_60: string;
|
|
889
|
-
shortDoubleSharpTick1_100: string;
|
|
890
|
-
shortDoubleSharpTick2_80: string;
|
|
891
|
-
shortDoubleSharpTick3_60: string;
|
|
892
|
-
longDoubleSharpClickStrong1_100: string;
|
|
893
|
-
longDoubleSharpClickStrong2_80: string;
|
|
894
|
-
longDoubleSharpClickStrong3_60: string;
|
|
895
|
-
longDoubleSharpClickStrong4_30: string;
|
|
896
|
-
longDoubleSharpClickMedium1_100: string;
|
|
897
|
-
longDoubleSharpClickMedium2_80: string;
|
|
898
|
-
longDoubleSharpClickMedium3_60: string;
|
|
899
|
-
longDoubleSharpTick1_100: string;
|
|
900
|
-
longDoubleSharpTick2_80: string;
|
|
901
|
-
longDoubleSharpTick3_60: string;
|
|
902
|
-
buzz1_100: string;
|
|
903
|
-
buzz2_80: string;
|
|
904
|
-
buzz3_60: string;
|
|
905
|
-
buzz4_40: string;
|
|
906
|
-
buzz5_20: string;
|
|
907
|
-
pulsingStong1_100: string;
|
|
908
|
-
pulsingStong2_60: string;
|
|
909
|
-
pulsingMedium1_100: string;
|
|
910
|
-
pulsingMedium2_60: string;
|
|
911
|
-
pulsingSharp1_100: string;
|
|
912
|
-
pulsingSharp2_60: string;
|
|
913
|
-
transistionClick1_100: string;
|
|
914
|
-
transistionClick2_80: string;
|
|
915
|
-
transistionClick3_60: string;
|
|
916
|
-
transistionClick4_40: string;
|
|
917
|
-
transistionClick5_20: string;
|
|
918
|
-
transistionClick6_10: string;
|
|
919
|
-
transistionHum1_100: string;
|
|
920
|
-
transistionHum2_80: string;
|
|
921
|
-
transistionHum3_60: string;
|
|
922
|
-
transistionHum4_40: string;
|
|
923
|
-
transistionHum5_20: string;
|
|
924
|
-
transistionHum6_10: string;
|
|
925
|
-
transitionRampDownLongSmooth1_100_to_0: string;
|
|
926
|
-
transitionRampDownLongSmooth2_100_to_0: string;
|
|
927
|
-
transitionRampDownMediumSmooth1_100_to_0: string;
|
|
928
|
-
transitionRampDownMediumSmooth2_100_to_0: string;
|
|
929
|
-
transitionRampDownShortSmooth1_100_to_0: string;
|
|
930
|
-
transitionRampDownShortSmooth2_100_to_0: string;
|
|
931
|
-
transitionRampDownLongSharp1_100_to_0: string;
|
|
932
|
-
transitionRampDownLongSharp2_100_to_0: string;
|
|
933
|
-
transitionRampDownLongMedium1_100_to_0: string;
|
|
934
|
-
transitionRampDownLongMedium2_100_to_0: string;
|
|
935
|
-
transitionRampDownShortSharp1_100_to_0: string;
|
|
936
|
-
transitionRampDownShortSharp2_100_to_0: string;
|
|
937
|
-
transitionRampUpLongSmooth1_0_to_100: string;
|
|
938
|
-
transitionRampUpLongSmooth2_0_to_100: string;
|
|
939
|
-
transitionRampUpMediumSmooth1_0_to_100: string;
|
|
940
|
-
transitionRampUpMediumSmooth2_0_to_100: string;
|
|
941
|
-
transitionRampUpShortSmooth1_0_to_100: string;
|
|
942
|
-
transitionRampUpShortSmooth2_0_to_100: string;
|
|
943
|
-
transitionRampUpLongSharp1_0_to_100: string;
|
|
944
|
-
transitionRampUpLongSharp2_0_to_100: string;
|
|
945
|
-
transitionRampUpMediumSharp1_0_to_100: string;
|
|
946
|
-
transitionRampUpMediumSharp2_0_to_100: string;
|
|
947
|
-
transitionRampUpShortSharp1_0_to_100: string;
|
|
948
|
-
transitionRampUpShortSharp2_0_to_100: string;
|
|
949
|
-
transitionRampDownLongSmooth1_50_to_0: string;
|
|
950
|
-
transitionRampDownLongSmooth2_50_to_0: string;
|
|
951
|
-
transitionRampDownMediumSmooth1_50_to_0: string;
|
|
952
|
-
transitionRampDownMediumSmooth2_50_to_0: string;
|
|
953
|
-
transitionRampDownShortSmooth1_50_to_0: string;
|
|
954
|
-
transitionRampDownShortSmooth2_50_to_0: string;
|
|
955
|
-
transitionRampDownLongSharp1_50_to_0: string;
|
|
956
|
-
transitionRampDownLongSharp2_50_to_0: string;
|
|
957
|
-
transitionRampDownMediumSharp1_50_to_0: string;
|
|
958
|
-
transitionRampDownMediumSharp2_50_to_0: string;
|
|
959
|
-
transitionRampDownShortSharp1_50_to_0: string;
|
|
960
|
-
transitionRampDownShortSharp2_50_to_0: string;
|
|
961
|
-
transitionRampUpLongSmooth1_0_to_50: string;
|
|
962
|
-
transitionRampUpLongSmooth2_0_to_50: string;
|
|
963
|
-
transitionRampUpMediumSmooth1_0_to_50: string;
|
|
964
|
-
transitionRampUpMediumSmooth2_0_to_50: string;
|
|
965
|
-
transitionRampUpShortSmooth1_0_to_50: string;
|
|
966
|
-
transitionRampUpShortSmooth2_0_to_50: string;
|
|
967
|
-
transitionRampUpLongSharp1_0_to_50: string;
|
|
968
|
-
transitionRampUpLongSharp2_0_to_50: string;
|
|
969
|
-
transitionRampUpMediumSharp1_0_to_50: string;
|
|
970
|
-
transitionRampUpMediumSharp2_0_to_50: string;
|
|
971
|
-
transitionRampUpShortSharp1_0_to_50: string;
|
|
972
|
-
transitionRampUpShortSharp2_0_to_50: string;
|
|
973
|
-
longBuzzForProgrammaticStopping_100: string;
|
|
974
|
-
smoothHum1_50: string;
|
|
975
|
-
smoothHum2_40: string;
|
|
976
|
-
smoothHum3_30: string;
|
|
977
|
-
smoothHum4_20: string;
|
|
978
|
-
smoothHum5_10: string;
|
|
979
|
-
};
|
|
980
|
-
|
|
981
|
-
declare function osHasBluetoothSupport(selectedDevice: DeviceInfo, osVersion?: OSVersion): any;
|
|
982
|
-
|
|
983
|
-
declare class Neurosity {
|
|
984
|
-
protected options: SDKOptions;
|
|
985
|
-
protected cloudClient: CloudClient;
|
|
986
|
-
protected bluetoothClient: BluetoothClient;
|
|
987
|
-
protected isMissingBluetoothTransport: boolean;
|
|
988
|
-
private streamingMode$;
|
|
989
|
-
static get SERVER_TIMESTAMP(): object;
|
|
990
|
-
constructor(options?: SDKOptions);
|
|
991
|
-
_initStreamingMode(streamingMode: STREAMING_MODE, hasBluetoothTransport: boolean): void;
|
|
992
|
-
_osHasBluetoothSupport(): Observable<any>;
|
|
993
|
-
streamingState(): Observable<{
|
|
994
|
-
connected: boolean;
|
|
995
|
-
activeMode: STREAMING_TYPE;
|
|
996
|
-
streamingMode: STREAMING_MODE;
|
|
997
|
-
}>;
|
|
998
|
-
_withStreamingModeObservable<T>(streams: {
|
|
999
|
-
wifi: () => Observable<T>;
|
|
1000
|
-
bluetooth: () => Observable<T>;
|
|
1001
|
-
}): Observable<any>;
|
|
1002
|
-
_withStreamingModePromise<T>(promises: {
|
|
1003
|
-
wifi: () => Promise<T>;
|
|
1004
|
-
bluetooth: () => Promise<T>;
|
|
1005
|
-
}): Promise<T>;
|
|
1006
|
-
get bluetooth(): BluetoothClient;
|
|
1007
|
-
private _getCloudMetricDependencies;
|
|
1008
|
-
login(credentials: Credentials): Promise<void>;
|
|
1009
|
-
logout(): Promise<void>;
|
|
1010
|
-
__getApp(): _firebase_app.FirebaseApp;
|
|
1011
|
-
onAuthStateChanged(): Observable<any>;
|
|
1012
|
-
addDevice(deviceId: string): Promise<void>;
|
|
1013
|
-
removeDevice(deviceId: string): Promise<void>;
|
|
1014
|
-
transferDevice(options: TransferDeviceOptions): Promise<void>;
|
|
1015
|
-
onUserDevicesChange(): Observable<DeviceInfo[]>;
|
|
1016
|
-
onUserClaimsChange(): Observable<UserClaims>;
|
|
1017
|
-
getDevices(): Promise<DeviceInfo[]>;
|
|
1018
|
-
selectDevice(deviceSelector: (devices: DeviceInfo[]) => DeviceInfo): Promise<DeviceInfo>;
|
|
1019
|
-
getSelectedDevice(): Promise<DeviceInfo>;
|
|
1020
|
-
getInfo(): Promise<DeviceInfo>;
|
|
1021
|
-
onDeviceChange(): Observable<DeviceInfo>;
|
|
1022
|
-
disconnect(): Promise<void>;
|
|
1023
|
-
private dispatchAction;
|
|
1024
|
-
addMarker(label: string): Promise<Action>;
|
|
1025
|
-
haptics(effects: any): Promise<any>;
|
|
1026
|
-
getHapticEffects(): HapticEffects;
|
|
1027
|
-
accelerometer(): Observable<Accelerometer>;
|
|
1028
|
-
brainwaves(label: BrainwavesLabel): Observable<Epoch | PowerByBand | PSD>;
|
|
1029
|
-
calm(): Observable<Calm>;
|
|
1030
|
-
signalQuality(): Observable<SignalQuality>;
|
|
1031
|
-
settings(): Observable<Settings>;
|
|
1032
|
-
osVersion(): Observable<OSVersion>;
|
|
1033
|
-
focus(): Observable<Focus>;
|
|
1034
|
-
kinesis(label: string): Observable<Kinesis>;
|
|
1035
|
-
predictions(label: string): Observable<any>;
|
|
1036
|
-
status(): Observable<DeviceStatus>;
|
|
1037
|
-
changeSettings(settings: Settings): Promise<void>;
|
|
1038
|
-
get training(): Training;
|
|
1039
|
-
goOffline(): void;
|
|
1040
|
-
goOnline(): void;
|
|
1041
|
-
createAccount(credentials: EmailAndPassword): Promise<any>;
|
|
1042
|
-
deleteAccount(): Promise<void>;
|
|
1043
|
-
createBluetoothToken(): Promise<string>;
|
|
1044
|
-
createCustomToken(): Promise<CustomToken>;
|
|
1045
|
-
createApiKey(data: CreateApiKeyRequest): Promise<ApiKeyRecord>;
|
|
1046
|
-
removeApiKey(apiKeyId: string): Promise<RemoveApiKeyResponse>;
|
|
1047
|
-
getTimesyncOffset(): number;
|
|
1048
|
-
createOAuthURL(config: OAuthConfig): Promise<string>;
|
|
1049
|
-
getOAuthToken(query: OAuthQuery): Promise<OAuthQueryResult>;
|
|
1050
|
-
removeOAuthAccess(): Promise<OAuthRemoveResponse>;
|
|
1051
|
-
onUserExperiments(): Observable<Experiment[]>;
|
|
1052
|
-
deleteUserExperiment(experimentId: string): Promise<void>;
|
|
1053
|
-
}
|
|
1054
|
-
|
|
1055
|
-
type AwarenessLabels = "calm" | "focus";
|
|
1056
|
-
|
|
1057
|
-
type Sample = {
|
|
1058
|
-
data: number[];
|
|
1059
|
-
timestamp: number;
|
|
1060
|
-
count?: number;
|
|
1061
|
-
marker?: Marker;
|
|
1062
|
-
info?: any;
|
|
1063
|
-
};
|
|
1064
|
-
type CSVSample = number[];
|
|
1065
|
-
|
|
1066
|
-
export { BLUETOOTH_CONNECTION, BluetoothClient, Neurosity, ReactNativeTransport, SLEEP_MODE_REASON, STATUS, STREAMING_MODE, STREAMING_TYPE, TRANSPORT_TYPE, WebBluetoothTransport, osHasBluetoothSupport };
|
|
1067
|
-
export type { Accelerometer, Action, ActionOptions, Actions, AmplitudeByChannel, ApiKeyCredentials, AwarenessLabels, BandName, BaseInfo, BluetoothTransport, BrainwavesLabel, CSVSample, Calm, Client, Credentials, CustomToken, DeviceInfo, DeviceSelector, DeviceStatus, EmailAndPassword, Epoch, EpochInfo, Experiment, Focus, HapticEffects, Kinesis, Marker, MetricValue, Metrics, OAuthConfig, OAuthCredentials, OAuthQuery, OAuthQueryResult, OAuthRemoveResponse, OSVersion, PSD, PSDByChannel, PSDInfo, PendingSubscription, PowerByBand, RawUnfilteredEpoch, RawUnfilteredEpochInfo, SDKDependencies, SDKOptions, Sample, Settings, SignalQuality, SubscribeOptions, Subscription, Subscriptions, Training, TrainingRecording, UserClaims, UserDevice, UserDevices };
|