@hangtime/grip-connect 0.8.4 → 0.8.5

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 (117) hide show
  1. package/deno.json +1 -1
  2. package/package.json +22 -3
  3. package/src/models/base.model.ts +2 -2
  4. package/src/models/device.model.ts +5 -2
  5. package/tsconfig.cjs.json +15 -0
  6. package/dist/index.d.ts +0 -3
  7. package/dist/index.d.ts.map +0 -1
  8. package/dist/index.js +0 -2
  9. package/dist/index.js.map +0 -1
  10. package/dist/interfaces/base.interface.d.ts +0 -18
  11. package/dist/interfaces/base.interface.d.ts.map +0 -1
  12. package/dist/interfaces/base.interface.js +0 -2
  13. package/dist/interfaces/base.interface.js.map +0 -1
  14. package/dist/interfaces/callback.interface.d.ts +0 -56
  15. package/dist/interfaces/callback.interface.d.ts.map +0 -1
  16. package/dist/interfaces/callback.interface.js +0 -2
  17. package/dist/interfaces/callback.interface.js.map +0 -1
  18. package/dist/interfaces/command.interface.d.ts +0 -92
  19. package/dist/interfaces/command.interface.d.ts.map +0 -1
  20. package/dist/interfaces/command.interface.js +0 -2
  21. package/dist/interfaces/command.interface.js.map +0 -1
  22. package/dist/interfaces/device/climbro.interface.d.ts +0 -7
  23. package/dist/interfaces/device/climbro.interface.d.ts.map +0 -1
  24. package/dist/interfaces/device/climbro.interface.js +0 -2
  25. package/dist/interfaces/device/climbro.interface.js.map +0 -1
  26. package/dist/interfaces/device/entralpi.interface.d.ts +0 -53
  27. package/dist/interfaces/device/entralpi.interface.d.ts.map +0 -1
  28. package/dist/interfaces/device/entralpi.interface.js +0 -2
  29. package/dist/interfaces/device/entralpi.interface.js.map +0 -1
  30. package/dist/interfaces/device/forceboard.interface.d.ts +0 -64
  31. package/dist/interfaces/device/forceboard.interface.d.ts.map +0 -1
  32. package/dist/interfaces/device/forceboard.interface.js +0 -2
  33. package/dist/interfaces/device/forceboard.interface.js.map +0 -1
  34. package/dist/interfaces/device/kilterboard.interface.d.ts +0 -16
  35. package/dist/interfaces/device/kilterboard.interface.d.ts.map +0 -1
  36. package/dist/interfaces/device/kilterboard.interface.js +0 -2
  37. package/dist/interfaces/device/kilterboard.interface.js.map +0 -1
  38. package/dist/interfaces/device/motherboard.interface.d.ts +0 -54
  39. package/dist/interfaces/device/motherboard.interface.d.ts.map +0 -1
  40. package/dist/interfaces/device/motherboard.interface.js +0 -2
  41. package/dist/interfaces/device/motherboard.interface.js.map +0 -1
  42. package/dist/interfaces/device/mysmartboard.interface.d.ts +0 -7
  43. package/dist/interfaces/device/mysmartboard.interface.d.ts.map +0 -1
  44. package/dist/interfaces/device/mysmartboard.interface.js +0 -2
  45. package/dist/interfaces/device/mysmartboard.interface.js.map +0 -1
  46. package/dist/interfaces/device/progressor.interface.d.ts +0 -28
  47. package/dist/interfaces/device/progressor.interface.d.ts.map +0 -1
  48. package/dist/interfaces/device/progressor.interface.js +0 -2
  49. package/dist/interfaces/device/progressor.interface.js.map +0 -1
  50. package/dist/interfaces/device/smartboard-pro.interface.d.ts +0 -7
  51. package/dist/interfaces/device/smartboard-pro.interface.d.ts.map +0 -1
  52. package/dist/interfaces/device/smartboard-pro.interface.js +0 -2
  53. package/dist/interfaces/device/smartboard-pro.interface.js.map +0 -1
  54. package/dist/interfaces/device/wh-c06.interface.d.ts +0 -7
  55. package/dist/interfaces/device/wh-c06.interface.d.ts.map +0 -1
  56. package/dist/interfaces/device/wh-c06.interface.js +0 -2
  57. package/dist/interfaces/device/wh-c06.interface.js.map +0 -1
  58. package/dist/interfaces/device.interface.d.ts +0 -203
  59. package/dist/interfaces/device.interface.d.ts.map +0 -1
  60. package/dist/interfaces/device.interface.js +0 -2
  61. package/dist/interfaces/device.interface.js.map +0 -1
  62. package/dist/interfaces/download.interface.d.ts +0 -16
  63. package/dist/interfaces/download.interface.d.ts.map +0 -1
  64. package/dist/interfaces/download.interface.js +0 -2
  65. package/dist/interfaces/download.interface.js.map +0 -1
  66. package/dist/interfaces/index.d.ts +0 -10
  67. package/dist/interfaces/index.d.ts.map +0 -1
  68. package/dist/interfaces/index.js +0 -2
  69. package/dist/interfaces/index.js.map +0 -1
  70. package/dist/models/base.model.d.ts +0 -13
  71. package/dist/models/base.model.d.ts.map +0 -1
  72. package/dist/models/base.model.js +0 -22
  73. package/dist/models/base.model.js.map +0 -1
  74. package/dist/models/device/climbro.model.d.ts +0 -11
  75. package/dist/models/device/climbro.model.d.ts.map +0 -1
  76. package/dist/models/device/climbro.model.js +0 -15
  77. package/dist/models/device/climbro.model.js.map +0 -1
  78. package/dist/models/device/entralpi.model.d.ts +0 -64
  79. package/dist/models/device/entralpi.model.d.ts.map +0 -1
  80. package/dist/models/device/entralpi.model.js +0 -240
  81. package/dist/models/device/entralpi.model.js.map +0 -1
  82. package/dist/models/device/forceboard.model.d.ts +0 -73
  83. package/dist/models/device/forceboard.model.d.ts.map +0 -1
  84. package/dist/models/device/forceboard.model.js +0 -312
  85. package/dist/models/device/forceboard.model.js.map +0 -1
  86. package/dist/models/device/kilterboard.model.d.ts +0 -144
  87. package/dist/models/device/kilterboard.model.d.ts.map +0 -1
  88. package/dist/models/device/kilterboard.model.js +0 -287
  89. package/dist/models/device/kilterboard.model.js.map +0 -1
  90. package/dist/models/device/motherboard.model.d.ts +0 -110
  91. package/dist/models/device/motherboard.model.d.ts.map +0 -1
  92. package/dist/models/device/motherboard.model.js +0 -378
  93. package/dist/models/device/motherboard.model.js.map +0 -1
  94. package/dist/models/device/mysmartboard.model.d.ts +0 -11
  95. package/dist/models/device/mysmartboard.model.d.ts.map +0 -1
  96. package/dist/models/device/mysmartboard.model.js +0 -15
  97. package/dist/models/device/mysmartboard.model.js.map +0 -1
  98. package/dist/models/device/progressor.model.d.ts +0 -39
  99. package/dist/models/device/progressor.model.d.ts.map +0 -1
  100. package/dist/models/device/progressor.model.js +0 -216
  101. package/dist/models/device/progressor.model.js.map +0 -1
  102. package/dist/models/device/smartboard-pro.model.d.ts +0 -11
  103. package/dist/models/device/smartboard-pro.model.d.ts.map +0 -1
  104. package/dist/models/device/smartboard-pro.model.js +0 -52
  105. package/dist/models/device/smartboard-pro.model.js.map +0 -1
  106. package/dist/models/device/wh-c06.model.d.ts +0 -57
  107. package/dist/models/device/wh-c06.model.d.ts.map +0 -1
  108. package/dist/models/device/wh-c06.model.js +0 -167
  109. package/dist/models/device/wh-c06.model.js.map +0 -1
  110. package/dist/models/device.model.d.ts +0 -408
  111. package/dist/models/device.model.d.ts.map +0 -1
  112. package/dist/models/device.model.js +0 -718
  113. package/dist/models/device.model.js.map +0 -1
  114. package/dist/models/index.d.ts +0 -10
  115. package/dist/models/index.d.ts.map +0 -1
  116. package/dist/models/index.js +0 -10
  117. package/dist/models/index.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"progressor.interface.js","sourceRoot":"","sources":["../../../src/interfaces/device/progressor.interface.ts"],"names":[],"mappings":""}
@@ -1,7 +0,0 @@
1
- import type { IDevice } from "../device.interface.js";
2
- /**
3
- * Interface representing the Smartboard Climbing SmartBoard Pro device, extending the base Device interface.
4
- */
5
- export interface ISmartBoardPro extends IDevice {
6
- }
7
- //# sourceMappingURL=smartboard-pro.interface.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"smartboard-pro.interface.d.ts","sourceRoot":"","sources":["../../../src/interfaces/device/smartboard-pro.interface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AACrD;;GAEG;AAEH,MAAM,WAAW,cAAe,SAAQ,OAAO;CAAG"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=smartboard-pro.interface.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"smartboard-pro.interface.js","sourceRoot":"","sources":["../../../src/interfaces/device/smartboard-pro.interface.ts"],"names":[],"mappings":""}
@@ -1,7 +0,0 @@
1
- import type { IDevice } from "../device.interface.js";
2
- /**
3
- * Interface representing the Weiheng WH-C06 device, extending the base Device interface.
4
- */
5
- export interface IWHC06 extends IDevice {
6
- }
7
- //# sourceMappingURL=wh-c06.interface.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"wh-c06.interface.d.ts","sourceRoot":"","sources":["../../../src/interfaces/device/wh-c06.interface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AACrD;;GAEG;AAEH,MAAM,WAAW,MAAO,SAAQ,OAAO;CAAG"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=wh-c06.interface.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"wh-c06.interface.js","sourceRoot":"","sources":["../../../src/interfaces/device/wh-c06.interface.ts"],"names":[],"mappings":""}
@@ -1,203 +0,0 @@
1
- import type { IBase } from "./base.interface.js";
2
- import type { massObject } from "./callback.interface.js";
3
- import type { Commands } from "./command.interface.js";
4
- /**
5
- * Represents a characteristic of a Bluetooth service.
6
- */
7
- interface Characteristic {
8
- /** Name of the characteristic */
9
- name: string;
10
- /** Identifier of the characteristic */
11
- id: string;
12
- /** UUID of the characteristic */
13
- uuid: string;
14
- /** Reference to the characteristic object */
15
- characteristic?: BluetoothRemoteGATTCharacteristic;
16
- }
17
- /**
18
- * Represents a Bluetooth service.
19
- */
20
- export interface Service {
21
- /** Name of the service */
22
- name: string;
23
- /** Identifier of the service */
24
- id: string;
25
- /** UUID of the service */
26
- uuid: string;
27
- /** Array of characteristics belonging to this service */
28
- characteristics: Characteristic[];
29
- }
30
- /**
31
- * Represents a Bluetooth device.
32
- */
33
- export interface IDevice extends IBase {
34
- /**
35
- * Filters to identify the device during Bluetooth scanning.
36
- * Used to match devices that meet specific criteria such as name, service UUIDs, etc.
37
- * @type {BluetoothLEScanFilter[]}
38
- * @public
39
- * @readonly
40
- */
41
- filters: BluetoothLEScanFilter[];
42
- /**
43
- * Array of services provided by the device.
44
- * Services represent functionalities that the device supports, such as weight measurement, battery information, or custom services.
45
- * @type {Service[]}
46
- * @public
47
- * @readonly
48
- */
49
- services: Service[];
50
- /**
51
- * Reference to the `BluetoothDevice` object representing this device.
52
- * This is the actual device object obtained from the Web Bluetooth API after a successful connection.
53
- * @type {BluetoothDevice | undefined}
54
- * @public
55
- */
56
- bluetooth?: BluetoothDevice;
57
- /**
58
- * Object representing the set of commands available for this device.
59
- * These commands allow communication with the device to perform various operations such as starting measurements, retrieving data, or calibrating the device.
60
- * @type {Commands}
61
- * @public
62
- * @readonly
63
- */
64
- commands: Commands;
65
- /**
66
- * Sets the callback function to be called when the activity status changes,
67
- * and optionally sets the configuration for threshold and duration.
68
- *
69
- * This function allows you to specify a callback that will be invoked whenever
70
- * the activity status changes, indicating whether the device is currently active.
71
- * It also allows optionally configuring the threshold and duration used to determine activity.
72
- *
73
- * @param {ActiveCallback} callback - The callback function to be set. This function
74
- * receives a boolean value indicating the new activity status.
75
- * @param {object} [options] - Optional configuration object containing the threshold and duration.
76
- * @param {number} [options.threshold=2.5] - The threshold value for determining activity.
77
- * @param {number} [options.duration=1000] - The duration (in milliseconds) to monitor the input for activity.
78
- * @returns {void}
79
- * @public
80
- *
81
- * @example
82
- * device.active((isActive) => {
83
- * console.log(`Device is ${isActive ? 'active' : 'inactive'}`);
84
- * }, { threshold: 3.0, duration: 1500 });
85
- */
86
- active(callback?: (data: boolean) => void, options?: {
87
- threshold?: number;
88
- duration?: number;
89
- }): void;
90
- /**
91
- * Connects to a Bluetooth device.
92
- * @param {Function} [onSuccess] - Optional callback function to execute on successful connection. Default logs success.
93
- * @param {Function} [onError] - Optional callback function to execute on error. Default logs the error.
94
- * @public
95
- *
96
- * @example
97
- * device.connect(
98
- * () => console.log("Connected successfully"),
99
- * (error) => console.error("Connection failed:", error)
100
- * );
101
- */
102
- connect(onSuccess?: () => void, onError?: (error: Error) => void): Promise<void>;
103
- /**
104
- * Disconnects the device if it is currently connected.
105
- * - Removes all notification listeners from the device's characteristics.
106
- * - Removes the 'gattserverdisconnected' event listener.
107
- * - Attempts to gracefully disconnect the device's GATT server.
108
- * - Resets relevant properties to their initial states.
109
- * @returns {void}
110
- * @public
111
- *
112
- * @example
113
- * device.disconnect();
114
- */
115
- disconnect(): void;
116
- /**
117
- * Exports the data in the specified format (CSV, JSON, XML) with a filename format:
118
- * 'data-export-YYYY-MM-DD-HH-MM-SS.{format}'.
119
- *
120
- * @param {('csv' | 'json' | 'xml')} [format='csv'] - The format in which to download the data.
121
- * Defaults to 'csv'. Accepted values are 'csv', 'json', and 'xml'.
122
- *
123
- * @returns {void} Initiates a download of the data in the specified format.
124
- * @private
125
- *
126
- * @example
127
- * device.download('json');
128
- */
129
- download(format?: "csv" | "json" | "xml"): void;
130
- /**
131
- * Checks if a Bluetooth device is connected.
132
- * @returns {boolean} A boolean indicating whether the device is connected.
133
- * @public
134
- *
135
- * @example
136
- * if (device.isConnected()) {
137
- * console.log('Device is connected');
138
- * } else {
139
- * console.log('Device is not connected');
140
- * }
141
- */
142
- isConnected(): boolean;
143
- /**
144
- * Sets the callback function to be called when notifications are received.
145
- * @param {NotifyCallback} callback - The callback function to be set.
146
- * @returns {void}
147
- * @public
148
- *
149
- * @example
150
- * device.notify((data) => {
151
- * console.log('Received notification:', data);
152
- * });
153
- */
154
- notify(callback: (data: massObject) => void): void;
155
- /**
156
- * Reads the value of the specified characteristic from the device.
157
- * @param {string} serviceId - The service ID where the characteristic belongs.
158
- * @param {string} characteristicId - The characteristic ID to read from.
159
- * @param {number} [duration=0] - The duration to wait before resolving the promise, in milliseconds.
160
- * @returns {Promise<string | undefined>} A promise that resolves when the read operation is completed.
161
- * @public
162
- *
163
- * @example
164
- * const value = await device.read('battery', 'level', 1000);
165
- * console.log('Battery level:', value);
166
- */
167
- read(serviceId: string, characteristicId: string, duration?: number): Promise<string | undefined>;
168
- /**
169
- * Initiates the tare calibration process.
170
- * @param {number} duration - The duration time for tare calibration.
171
- * @returns {boolean} A boolean indicating whether the tare calibration was successful.
172
- * @public
173
- *
174
- * @example
175
- * const success = device.tare(5000);
176
- * if (success) {
177
- * console.log('Tare calibration started');
178
- * } else {
179
- * console.log('Tare calibration failed to start');
180
- * }
181
- */
182
- tare(duration?: number): boolean;
183
- /**
184
- * Writes a message to the specified characteristic of a Bluetooth device and optionally provides a callback to handle responses.
185
- * @param {string} serviceId - The service UUID of the Bluetooth device containing the target characteristic.
186
- * @param {string} characteristicId - The characteristic UUID where the message will be written.
187
- * @param {string | Uint8Array | undefined} message - The message to be written to the characteristic. It can be a string or a Uint8Array.
188
- * @param {number} [duration=0] - Optional. The time in milliseconds to wait before resolving the promise. Defaults to 0 for immediate resolution.
189
- * @param {WriteCallback} [callback=writeCallback] - Optional. A custom callback to handle the response after the write operation is successful.
190
- * @returns {Promise<void>} A promise that resolves once the write operation is complete.
191
- * @public
192
- * @throws {Error} Throws an error if the characteristic is undefined.
193
- *
194
- * @example
195
- * // Example usage of the write function with a custom callback
196
- * await Progressor.write("progressor", "tx", ProgressorCommands.GET_BATT_VLTG, 250, (data) => {
197
- * console.log(`Battery voltage: ${data}`);
198
- * });
199
- */
200
- write(serviceId: string, characteristicId: string, message: string | Uint8Array | undefined, duration?: number, callback?: (data: string) => void): Promise<void>;
201
- }
202
- export {};
203
- //# sourceMappingURL=device.interface.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"device.interface.d.ts","sourceRoot":"","sources":["../../src/interfaces/device.interface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAA;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AACzD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAA;AAEtD;;GAEG;AACH,UAAU,cAAc;IACtB,iCAAiC;IACjC,IAAI,EAAE,MAAM,CAAA;IACZ,uCAAuC;IACvC,EAAE,EAAE,MAAM,CAAA;IACV,iCAAiC;IACjC,IAAI,EAAE,MAAM,CAAA;IACZ,6CAA6C;IAC7C,cAAc,CAAC,EAAE,iCAAiC,CAAA;CACnD;AAED;;GAEG;AACH,MAAM,WAAW,OAAO;IACtB,2BAA2B;IAC3B,IAAI,EAAE,MAAM,CAAA;IACZ,gCAAgC;IAChC,EAAE,EAAE,MAAM,CAAA;IACV,0BAA0B;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,yDAAyD;IACzD,eAAe,EAAE,cAAc,EAAE,CAAA;CAClC;AAED;;GAEG;AACH,MAAM,WAAW,OAAQ,SAAQ,KAAK;IACpC;;;;;;OAMG;IACH,OAAO,EAAE,qBAAqB,EAAE,CAAA;IAEhC;;;;;;OAMG;IACH,QAAQ,EAAE,OAAO,EAAE,CAAA;IAEnB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,eAAe,CAAA;IAE3B;;;;;;OAMG;IACH,QAAQ,EAAE,QAAQ,CAAA;IAElB;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,EAAE,OAAO,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAA;IAErG;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,SAAS,CAAC,EAAE,MAAM,IAAI,EAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAEhF;;;;;;;;;;;OAWG;IACH,UAAU,IAAI,IAAI,CAAA;IAElB;;;;;;;;;;;;OAYG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,IAAI,CAAA;IAE/C;;;;;;;;;;;OAWG;IACH,WAAW,IAAI,OAAO,CAAA;IAEtB;;;;;;;;;;OAUG;IACH,MAAM,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,IAAI,GAAG,IAAI,CAAA;IAElD;;;;;;;;;;;OAWG;IACH,IAAI,CAAC,SAAS,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;IAEjG;;;;;;;;;;;;;OAaG;IACH,IAAI,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;IAEhC;;;;;;;;;;;;;;;;OAgBG;IACH,KAAK,CACH,SAAS,EAAE,MAAM,EACjB,gBAAgB,EAAE,MAAM,EACxB,OAAO,EAAE,MAAM,GAAG,UAAU,GAAG,SAAS,EACxC,QAAQ,CAAC,EAAE,MAAM,EACjB,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,GAChC,OAAO,CAAC,IAAI,CAAC,CAAA;CACjB"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=device.interface.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"device.interface.js","sourceRoot":"","sources":["../../src/interfaces/device.interface.ts"],"names":[],"mappings":""}
@@ -1,16 +0,0 @@
1
- /**
2
- * Represents a single data packet.
3
- */
4
- export interface DownloadPacket {
5
- /** Timestamp of when the packet was received */
6
- received: number;
7
- /** Sample number */
8
- sampleNum: number;
9
- /** Battery raw value */
10
- battRaw: number;
11
- /** Array of sample values */
12
- samples: number[];
13
- /** Array of mass values */
14
- masses: number[];
15
- }
16
- //# sourceMappingURL=download.interface.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"download.interface.d.ts","sourceRoot":"","sources":["../../src/interfaces/download.interface.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,gDAAgD;IAChD,QAAQ,EAAE,MAAM,CAAA;IAChB,oBAAoB;IACpB,SAAS,EAAE,MAAM,CAAA;IACjB,wBAAwB;IACxB,OAAO,EAAE,MAAM,CAAA;IACf,6BAA6B;IAC7B,OAAO,EAAE,MAAM,EAAE,CAAA;IACjB,2BAA2B;IAC3B,MAAM,EAAE,MAAM,EAAE,CAAA;CACjB"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=download.interface.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"download.interface.js","sourceRoot":"","sources":["../../src/interfaces/download.interface.ts"],"names":[],"mappings":""}
@@ -1,10 +0,0 @@
1
- export type { IClimbro } from "./device/climbro.interface.js";
2
- export type { IEntralpi } from "./device/entralpi.interface.js";
3
- export type { IForceBoard } from "./device/forceboard.interface.js";
4
- export type { IKilterBoard } from "./device/kilterboard.interface.js";
5
- export type { IMotherboard } from "./device/motherboard.interface.js";
6
- export type { ImySmartBoard } from "./device/mysmartboard.interface.js";
7
- export type { IProgressor } from "./device/progressor.interface.js";
8
- export type { ISmartBoardPro } from "./device/smartboard-pro.interface.js";
9
- export type { IWHC06 } from "./device/wh-c06.interface.js";
10
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/interfaces/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAA;AAE7D,YAAY,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAA;AAE/D,YAAY,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAA;AAEnE,YAAY,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAA;AAErE,YAAY,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAA;AAErE,YAAY,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAA;AAEvE,YAAY,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAA;AAEnE,YAAY,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAA;AAE1E,YAAY,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAA"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/interfaces/index.ts"],"names":[],"mappings":""}
@@ -1,13 +0,0 @@
1
- import type { IBase } from "../interfaces/base.interface.js";
2
- export declare abstract class BaseModel {
3
- id?: string;
4
- createdAt?: Date;
5
- updatedAt?: Date;
6
- constructor(base: IBase);
7
- /**
8
- * Generates a UUID using a simple algorithm.
9
- * @returns A string representing a UUID.
10
- */
11
- private static generateUUID;
12
- }
13
- //# sourceMappingURL=base.model.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"base.model.d.ts","sourceRoot":"","sources":["../../src/models/base.model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,iCAAiC,CAAA;AAE5D,8BAAsB,SAAS;IAC7B,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,SAAS,CAAC,EAAE,IAAI,CAAA;IAChB,SAAS,CAAC,EAAE,IAAI,CAAA;gBAEJ,IAAI,EAAE,KAAK;IAOvB;;;OAGG;IACH,OAAO,CAAC,MAAM,CAAC,YAAY;CAO5B"}
@@ -1,22 +0,0 @@
1
- export class BaseModel {
2
- id;
3
- createdAt;
4
- updatedAt;
5
- constructor(base) {
6
- this.id = base.id ?? globalThis.crypto?.randomUUID?.() ?? BaseModel.generateUUID();
7
- this.createdAt = base.createdAt;
8
- this.updatedAt = base.updatedAt;
9
- }
10
- /**
11
- * Generates a UUID using a simple algorithm.
12
- * @returns A string representing a UUID.
13
- */
14
- static generateUUID() {
15
- return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (c) => {
16
- const r = Math.floor(Math.random() * 16);
17
- const v = c === "x" ? r : (r & 0x3) | 0x8;
18
- return v.toString(16);
19
- });
20
- }
21
- }
22
- //# sourceMappingURL=base.model.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"base.model.js","sourceRoot":"","sources":["../../src/models/base.model.ts"],"names":[],"mappings":"AAEA,MAAM,OAAgB,SAAS;IAC7B,EAAE,CAAS;IACX,SAAS,CAAO;IAChB,SAAS,CAAO;IAEhB,YAAY,IAAW;QACrB,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,EAAE,IAAI,UAAU,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE,IAAI,SAAS,CAAC,YAAY,EAAE,CAAA;QAElF,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAA;QAC/B,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAA;IACjC,CAAC;IAED;;;OAGG;IACK,MAAM,CAAC,YAAY;QACzB,OAAO,sCAAsC,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE;YACnE,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,CAAA;YACxC,MAAM,CAAC,GAAG,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,GAAG,GAAG,CAAA;YACzC,OAAO,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAA;QACvB,CAAC,CAAC,CAAA;IACJ,CAAC;CACF"}
@@ -1,11 +0,0 @@
1
- import { Device } from "../device.model.js";
2
- import type { IClimbro } from "../../interfaces/device/climbro.interface.js";
3
- /**
4
- * Represents a Climbro device.
5
- * TODO: Add services, do you own a Climbro? Help us!
6
- * {@link https://climbro.com/}
7
- */
8
- export declare class Climbro extends Device implements IClimbro {
9
- constructor();
10
- }
11
- //# sourceMappingURL=climbro.model.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"climbro.model.d.ts","sourceRoot":"","sources":["../../../src/models/device/climbro.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAC3C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,8CAA8C,CAAA;AAE5E;;;;GAIG;AACH,qBAAa,OAAQ,SAAQ,MAAO,YAAW,QAAQ;;CAOtD"}
@@ -1,15 +0,0 @@
1
- import { Device } from "../device.model.js";
2
- /**
3
- * Represents a Climbro device.
4
- * TODO: Add services, do you own a Climbro? Help us!
5
- * {@link https://climbro.com/}
6
- */
7
- export class Climbro extends Device {
8
- constructor() {
9
- super({
10
- filters: [{ name: "Climbro" }],
11
- services: [],
12
- });
13
- }
14
- }
15
- //# sourceMappingURL=climbro.model.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"climbro.model.js","sourceRoot":"","sources":["../../../src/models/device/climbro.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAG3C;;;;GAIG;AACH,MAAM,OAAO,OAAQ,SAAQ,MAAM;IACjC;QACE,KAAK,CAAC;YACJ,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;YAC9B,QAAQ,EAAE,EAAE;SACb,CAAC,CAAA;IACJ,CAAC;CACF"}
@@ -1,64 +0,0 @@
1
- import { Device } from "../device.model.js";
2
- import type { IEntralpi } from "../../interfaces/device/entralpi.interface.js";
3
- /**
4
- * Represents a Entralpi device.
5
- * {@link https://entralpi.com}
6
- */
7
- export declare class Entralpi extends Device implements IEntralpi {
8
- constructor();
9
- /**
10
- * Retrieves battery or voltage information from the device.
11
- * @returns {Promise<string | undefined>} A Promise that resolves with the battery or voltage information.
12
- */
13
- battery: () => Promise<string | undefined>;
14
- /**
15
- * Retrieves IEEE 11073-20601 Regulatory Certification from the device.
16
- * @returns {Promise<string>} A Promise that resolves with the certification.
17
- */
18
- certification: () => Promise<string | undefined>;
19
- /**
20
- * Retrieves firmware version from the device.
21
- * @returns {Promise<string>} A Promise that resolves with the firmware version.
22
- */
23
- firmware: () => Promise<string | undefined>;
24
- /**
25
- * Handles data received from the device, processes weight measurements,
26
- * and updates mass data including maximum and average values.
27
- * It also handles command responses for retrieving device information.
28
- *
29
- * @param {DataView} value - The notification event.
30
- */
31
- handleNotifications: (value: DataView) => void;
32
- /**
33
- * Retrieves hardware version from the device.
34
- * @returns {Promise<string>} A Promise that resolves with the hardware version.
35
- */
36
- hardware: () => Promise<string | undefined>;
37
- /**
38
- * Retrieves manufacturer information from the device.
39
- * @returns {Promise<string>} A Promise that resolves with the manufacturer information.
40
- */
41
- manufacturer: () => Promise<string | undefined>;
42
- /**
43
- * Retrieves model number from the device.
44
- * @returns {Promise<string>} A Promise that resolves with the model number.
45
- */
46
- model: () => Promise<string | undefined>;
47
- /**
48
- * Retrieves PnP ID from the device, a set of values that used to create a device ID value that is unique for this device.
49
- * Included in the characteristic is a Vendor ID Source field, a Vendor ID field, a Product ID field and a Product Version field
50
- * @returns {Promise<string>} A Promise that resolves with the PnP ID.
51
- */
52
- pnp: () => Promise<string | undefined>;
53
- /**
54
- * Retrieves software version from the device.
55
- * @returns {Promise<string>} A Promise that resolves with the software version.
56
- */
57
- software: () => Promise<string | undefined>;
58
- /**
59
- * Retrieves system id from the device.
60
- * @returns {Promise<string>} A Promise that resolves with the system id.
61
- */
62
- system: () => Promise<string | undefined>;
63
- }
64
- //# sourceMappingURL=entralpi.model.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"entralpi.model.d.ts","sourceRoot":"","sources":["../../../src/models/device/entralpi.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAC3C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+CAA+C,CAAA;AAE9E;;;GAGG;AACH,qBAAa,QAAS,SAAQ,MAAO,YAAW,SAAS;;IA2HvD;;;OAGG;IACH,OAAO,QAAa,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAE9C;IAED;;;OAGG;IACH,aAAa,QAAa,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAEpD;IAED;;;OAGG;IACH,QAAQ,QAAa,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAE/C;IAED;;;;;;OAMG;IACM,mBAAmB,GAAI,OAAO,QAAQ,KAAG,IAAI,CA6CrD;IAED;;;OAGG;IACH,QAAQ,QAAa,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAE/C;IAED;;;OAGG;IACH,YAAY,QAAa,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAEnD;IAED;;;OAGG;IACH,KAAK,QAAa,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAE5C;IAED;;;;OAIG;IACH,GAAG,QAAa,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAE1C;IAED;;;OAGG;IACH,QAAQ,QAAa,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAE/C;IAED;;;OAGG;IACH,MAAM,QAAa,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAE7C;CACF"}