@yosnightfly/electra-smart-js-client 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/LICENSE.md +22 -0
  2. package/README.md +38 -0
  3. package/lib/electra/client.d.ts +47 -0
  4. package/lib/electra/client.js +225 -0
  5. package/lib/electra/client.js.map +1 -0
  6. package/lib/electra/server-types/check-otp.d.ts +13 -0
  7. package/lib/electra/server-types/check-otp.js +3 -0
  8. package/lib/electra/server-types/check-otp.js.map +1 -0
  9. package/lib/electra/server-types/common.d.ts +19 -0
  10. package/lib/electra/server-types/common.js +3 -0
  11. package/lib/electra/server-types/common.js.map +1 -0
  12. package/lib/electra/server-types/get-device-telemetry.d.ts +88 -0
  13. package/lib/electra/server-types/get-device-telemetry.js +3 -0
  14. package/lib/electra/server-types/get-device-telemetry.js.map +1 -0
  15. package/lib/electra/server-types/get-devices.d.ts +43 -0
  16. package/lib/electra/server-types/get-devices.js +3 -0
  17. package/lib/electra/server-types/get-devices.js.map +1 -0
  18. package/lib/electra/server-types/index.d.ts +7 -0
  19. package/lib/electra/server-types/index.js +20 -0
  20. package/lib/electra/server-types/index.js.map +1 -0
  21. package/lib/electra/server-types/send-command.d.ts +10 -0
  22. package/lib/electra/server-types/send-command.js +3 -0
  23. package/lib/electra/server-types/send-command.js.map +1 -0
  24. package/lib/electra/server-types/send-otp.d.ts +9 -0
  25. package/lib/electra/server-types/send-otp.js +3 -0
  26. package/lib/electra/server-types/send-otp.js.map +1 -0
  27. package/lib/electra/server-types/validate-token.d.ts +12 -0
  28. package/lib/electra/server-types/validate-token.js +3 -0
  29. package/lib/electra/server-types/validate-token.js.map +1 -0
  30. package/lib/general.d.ts +10 -0
  31. package/lib/general.js +25 -0
  32. package/lib/general.js.map +1 -0
  33. package/lib/helper-types.d.ts +4 -0
  34. package/lib/helper-types.js +3 -0
  35. package/lib/helper-types.js.map +1 -0
  36. package/lib/index.d.ts +3 -0
  37. package/lib/index.js +12 -0
  38. package/lib/index.js.map +1 -0
  39. package/lib/tsconfig.build.tsbuildinfo +1 -0
  40. package/package.json +67 -0
package/LICENSE.md ADDED
@@ -0,0 +1,22 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2020 Yonatan Perry
4
+ Copyright (c) 2022 Raz Luvaton
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in all
14
+ copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,38 @@
1
+ # Electra Smart JS client
2
+ [![npm](https://img.shields.io/npm/v/electra-smart-js-client?style=plastic)](https://www.npmjs.com/package/electra-smart-js-client)
3
+
4
+ Port of [`yonatanp/electrasmart`](https://github.com/yonatanp/electrasmart) in JS
5
+
6
+ ## Usage
7
+
8
+ **Get the authentication data**
9
+
10
+ ```bash
11
+ npx electra-smart-js-client
12
+
13
+ # This will log { "imei": "<imei>", "token": "<token>" }
14
+ # Save it for later use
15
+ ```
16
+
17
+ **Use it from Node.js code**
18
+ ```js
19
+ import { Client } from 'electra-smart-js-client';
20
+
21
+ async function run() {
22
+ const client = await new Client({
23
+ imei: '<imei>', // This is the imei value from the previous step
24
+ token: '<token>', // This is the token value from the previous step
25
+ });
26
+
27
+ const devices = await client.getDevices();
28
+
29
+ // Choose the device you want to control
30
+ const deviceId = devices[0].id;
31
+
32
+ // Control it 🔥
33
+ await client.setMode(deviceId, 'HEAT');
34
+ }
35
+
36
+ run().then(console.log).catch(console.error);
37
+
38
+ ```
@@ -0,0 +1,47 @@
1
+ import { DiagL2, GetDevicesResponse, Hb, Oper, SendCommandResponse } from './server-types';
2
+ export declare class Client {
3
+ private static api;
4
+ private readonly imei;
5
+ private readonly token;
6
+ private sid;
7
+ private sidCreationData;
8
+ constructor({ imei, token, sid }: {
9
+ imei: string;
10
+ token: string;
11
+ sid?: string;
12
+ });
13
+ getAuthData(): {
14
+ imei: string;
15
+ token: string;
16
+ };
17
+ private static send;
18
+ private static getOSDetails;
19
+ static auth(): Promise<Client>;
20
+ static sendOTPRequest(phone: string): Promise<string>;
21
+ static getOTPToken({ imei, phone, otp, }: {
22
+ imei: string;
23
+ phone: string;
24
+ otp: string;
25
+ }): Promise<{
26
+ imei: string;
27
+ token: string;
28
+ sid: string;
29
+ }>;
30
+ private getSid;
31
+ private refreshSid;
32
+ getDevices(): Promise<GetDevicesResponse['data']['devices']>;
33
+ getTelemetry(deviceId: number): Promise<{
34
+ OPER: Oper;
35
+ DIAG_L2: DiagL2;
36
+ HB: Hb;
37
+ }>;
38
+ getOperationalTelemetry(deviceId: number): Promise<Oper>;
39
+ sendCommand(deviceId: number, overrideOperational: Partial<Oper>): Promise<SendCommandResponse>;
40
+ setTemperature(deviceId: number, temp: number): Promise<void>;
41
+ setMode(deviceId: number, mode: Oper['AC_MODE']): Promise<void>;
42
+ setTimer(deviceId: number, timer: boolean): Promise<void>;
43
+ setShabbatMode(deviceId: number, shabbatMode: boolean): Promise<void>;
44
+ setFanSpeed(deviceId: number, fanSpeed: Oper['FANSPD']): Promise<void>;
45
+ setIFeel(deviceId: number, ifeel: boolean): Promise<void>;
46
+ setSleep(deviceId: number, sleep: boolean): Promise<void>;
47
+ }
@@ -0,0 +1,225 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Client = void 0;
4
+ const axios_1 = require("axios");
5
+ const general_1 = require("../general");
6
+ const readline = require("node:readline");
7
+ class Client {
8
+ constructor({ imei, token, sid }) {
9
+ if (sid) {
10
+ this.sid = sid;
11
+ this.sidCreationData = new Date();
12
+ }
13
+ this.imei = imei;
14
+ this.token = token;
15
+ }
16
+ getAuthData() {
17
+ return {
18
+ imei: this.imei,
19
+ token: this.token,
20
+ };
21
+ }
22
+ static async send(data) {
23
+ const body = Object.assign({ pvdid: 1, id: (0, general_1.randomNumber)(1000, 1999) }, data);
24
+ const { data: response } = await this.api.post('/', body);
25
+ if (response.status !== 0) {
26
+ console.log('Request & Response', { request: body, response });
27
+ throw new Error(`Invalid status code returned from API (${response.status})`);
28
+ }
29
+ if (response.data.res !== 0) {
30
+ console.log('Request & Response', { request: body, response });
31
+ throw new Error(`Invalid res returned from API (${response.data.res})`);
32
+ }
33
+ return response;
34
+ }
35
+ static getOSDetails() {
36
+ return {
37
+ os: 'android',
38
+ osver: 'M4B41Z',
39
+ };
40
+ }
41
+ static async auth() {
42
+ const rl = readline.createInterface({
43
+ input: process.stdin,
44
+ output: process.stdout,
45
+ });
46
+ let imei;
47
+ let token;
48
+ let sid;
49
+ try {
50
+ const phoneNumber = await (0, general_1.questionUntilValid)({
51
+ rl,
52
+ question: 'What is your phone number?\n',
53
+ validateAnswer: (phone) => {
54
+ if (!(0, general_1.validateIsraelPhoneNumber)(phone)) {
55
+ return `Invalid phone number (${phone})`;
56
+ }
57
+ return true;
58
+ },
59
+ });
60
+ imei = await Client.sendOTPRequest(phoneNumber);
61
+ const otpCode = await (0, general_1.questionUntilValid)({
62
+ rl,
63
+ question: 'What is the OTP code?\n',
64
+ validateAnswer: (otp) => {
65
+ if (!/^\d{4}$/.test(otp)) {
66
+ return `OTP must be 4 digits (${otp})`;
67
+ }
68
+ return true;
69
+ },
70
+ });
71
+ ({ imei, token, sid } = await Client.getOTPToken({ imei, phone: phoneNumber, otp: otpCode }));
72
+ }
73
+ finally {
74
+ rl.close();
75
+ }
76
+ return new Client({
77
+ imei,
78
+ token,
79
+ sid,
80
+ });
81
+ }
82
+ static async sendOTPRequest(phone) {
83
+ if (!(0, general_1.validateIsraelPhoneNumber)(phone)) {
84
+ throw new Error('Invalid phone number');
85
+ }
86
+ const imei = `2b950000${(0, general_1.randomNumber)(10000000, 99999999)}`;
87
+ await this.send({
88
+ cmd: 'SEND_OTP',
89
+ data: Object.assign({ imei,
90
+ phone }, this.getOSDetails()),
91
+ });
92
+ return imei;
93
+ }
94
+ static async getOTPToken({ imei, phone, otp, }) {
95
+ if (!(0, general_1.validateIsraelPhoneNumber)(phone)) {
96
+ throw new Error('Invalid phone number');
97
+ }
98
+ const result = await this.send({
99
+ cmd: 'CHECK_OTP',
100
+ data: Object.assign(Object.assign({}, this.getOSDetails()), { imei,
101
+ phone, code: otp }),
102
+ });
103
+ return {
104
+ imei,
105
+ token: result.data.token,
106
+ sid: result.data.sid,
107
+ };
108
+ }
109
+ async getSid() {
110
+ var _a;
111
+ const result = await Client.send({
112
+ cmd: 'VALIDATE_TOKEN',
113
+ data: Object.assign({ imei: this.imei, token: this.token }, Client.getOSDetails()),
114
+ sid: null,
115
+ });
116
+ const sid = (_a = result === null || result === void 0 ? void 0 : result.data) === null || _a === void 0 ? void 0 : _a.sid;
117
+ if (!sid) {
118
+ console.error('Something went wrong', result.data);
119
+ throw new Error('Something went wrong getting the sid');
120
+ }
121
+ this.sid = sid;
122
+ this.sidCreationData = new Date();
123
+ return this.sid;
124
+ }
125
+ async refreshSid() {
126
+ if (this.sid) {
127
+ return this.sid;
128
+ }
129
+ return await this.getSid();
130
+ }
131
+ async getDevices() {
132
+ const result = await Client.send({
133
+ sid: await this.refreshSid(),
134
+ cmd: 'GET_DEVICES',
135
+ data: {},
136
+ });
137
+ return result.data.devices;
138
+ }
139
+ async getTelemetry(deviceId) {
140
+ const result = await Client.send({
141
+ sid: await this.refreshSid(),
142
+ cmd: 'GET_LAST_TELEMETRY',
143
+ data: {
144
+ id: deviceId,
145
+ commandName: 'OPER,DIAG_L2,HB',
146
+ },
147
+ });
148
+ return {
149
+ OPER: JSON.parse(result.data.commandJson.OPER).OPER,
150
+ DIAG_L2: JSON.parse(result.data.commandJson.DIAG_L2).DIAG_L2,
151
+ HB: JSON.parse(result.data.commandJson.HB).HB,
152
+ };
153
+ }
154
+ async getOperationalTelemetry(deviceId) {
155
+ const result = await Client.send({
156
+ sid: await this.refreshSid(),
157
+ cmd: 'GET_LAST_TELEMETRY',
158
+ data: {
159
+ id: deviceId,
160
+ commandName: 'OPER',
161
+ },
162
+ });
163
+ return JSON.parse(result.data.commandJson.OPER).OPER;
164
+ }
165
+ async sendCommand(deviceId, overrideOperational) {
166
+ return await Client.send({
167
+ cmd: 'SEND_COMMAND',
168
+ sid: await this.refreshSid(),
169
+ data: {
170
+ id: deviceId,
171
+ commandJson: JSON.stringify({
172
+ OPER: Object.assign(Object.assign({}, (await this.getOperationalTelemetry(deviceId))), overrideOperational),
173
+ }),
174
+ },
175
+ });
176
+ }
177
+ async setTemperature(deviceId, temp) {
178
+ if (Number.isNaN(temp) || temp < 16 || temp > 30) {
179
+ throw new Error('Temperature must be between 16 and 30');
180
+ }
181
+ await this.sendCommand(deviceId, {
182
+ SPT: temp.toString(),
183
+ });
184
+ }
185
+ async setMode(deviceId, mode) {
186
+ await this.sendCommand(deviceId, {
187
+ AC_MODE: mode,
188
+ });
189
+ }
190
+ async setTimer(deviceId, timer) {
191
+ await this.sendCommand(deviceId, {
192
+ TIMER: timer ? 'ON' : 'OFF',
193
+ });
194
+ }
195
+ async setShabbatMode(deviceId, shabbatMode) {
196
+ await this.sendCommand(deviceId, {
197
+ SHABAT: shabbatMode ? 'ON' : 'OFF',
198
+ });
199
+ }
200
+ async setFanSpeed(deviceId, fanSpeed) {
201
+ await this.sendCommand(deviceId, {
202
+ FANSPD: fanSpeed,
203
+ });
204
+ }
205
+ async setIFeel(deviceId, ifeel) {
206
+ await this.sendCommand(deviceId, {
207
+ IFEEL: ifeel ? 'ON' : 'OFF',
208
+ });
209
+ }
210
+ async setSleep(deviceId, sleep) {
211
+ await this.sendCommand(deviceId, {
212
+ SLEEP: sleep ? 'ON' : 'OFF',
213
+ });
214
+ }
215
+ }
216
+ exports.Client = Client;
217
+ Client.api = axios_1.default.create({
218
+ baseURL: 'https://app.ecpiot.co.il/mobile/mobilecommand',
219
+ method: 'POST',
220
+ headers: {
221
+ 'Content-Type': 'application/json',
222
+ 'User-Agent': 'Electra Client',
223
+ },
224
+ });
225
+ //# sourceMappingURL=client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/electra/client.ts"],"names":[],"mappings":";;;AAAA,iCAA6C;AAC7C,wCAAyF;AAqBzF,0CAA0C;AAE1C,MAAa,MAAM;IAgBjB,YAAY,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,EAAiD;QAC7E,IAAI,GAAG,EAAE;YACP,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;YACf,IAAI,CAAC,eAAe,GAAG,IAAI,IAAI,EAAE,CAAC;SACnC;QAED,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;IAEM,WAAW;QAChB,OAAO;YACL,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,KAAK,EAAE,IAAI,CAAC,KAAK;SAClB,CAAC;IACJ,CAAC;IAEO,MAAM,CAAC,KAAK,CAAC,IAAI,CAGvB,IAAiE;QACjE,MAAM,IAAI,mBACR,KAAK,EAAE,CAAC,EAGR,EAAE,EAAE,IAAA,sBAAY,EAAC,IAAI,EAAE,IAAI,CAAC,IAEzB,IAAI,CACR,CAAC;QA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;QACzD,MAAM,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE;YAC/B,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK;SACnC,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,QAAgB,EAAE,QAAwB;QAC1D,MAAM,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE;YAC/B,MAAM,EAAE,QAAQ;SACjB,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,QAAQ,CAAC,QAAgB,EAAE,KAAc;QAC7C,MAAM,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE;YAC/B,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK;SAC5B,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,QAAQ,CAAC,QAAgB,EAAE,KAAc;QAC7C,MAAM,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE;YAC/B,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK;SAC5B,CAAC,CAAC;IACL,CAAC;;AAhUH,wBAiUC;AAhUgB,UAAG,GAAkB,eAAK,CAAC,MAAM,CAAC;IAC/C,OAAO,EAAE,+CAA+C;IACxD,MAAM,EAAE,MAAM;IACd,OAAO,EAAE;QACP,cAAc,EAAE,kBAAkB;QAClC,YAAY,EAAE,gBAAgB;KAC/B;CACF,CAAC,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { BaseRequestData, BaseResponseData, OsDetails } from './common';
2
+ export interface CheckOTPRequest extends BaseRequestData {
3
+ cmd: 'CHECK_OTP';
4
+ data: OsDetails & {
5
+ imei: string;
6
+ phone: string;
7
+ code: string;
8
+ };
9
+ }
10
+ export declare type CheckOTPResponse = BaseResponseData<{
11
+ token: string;
12
+ sid: string;
13
+ }>;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=check-otp.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"check-otp.js","sourceRoot":"","sources":["../../../src/electra/server-types/check-otp.ts"],"names":[],"mappings":""}
@@ -0,0 +1,19 @@
1
+ export interface BaseRequestData {
2
+ pvdid: 1;
3
+ id: number;
4
+ cmd: string;
5
+ }
6
+ export interface BaseResponseData<Data> {
7
+ id: number;
8
+ status: number;
9
+ desc: null;
10
+ data: {
11
+ res: number;
12
+ res_desc: null;
13
+ } & Data;
14
+ }
15
+ export declare type OnOrOff = 'ON' | 'OFF';
16
+ export interface OsDetails {
17
+ os: string;
18
+ osver: string;
19
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=common.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.js","sourceRoot":"","sources":["../../../src/electra/server-types/common.ts"],"names":[],"mappings":""}
@@ -0,0 +1,88 @@
1
+ import { BaseRequestData, BaseResponseData, OnOrOff } from './common';
2
+ import { Stringify } from '../../helper-types';
3
+ export interface GetDeviceTelemetryRequest extends BaseRequestData {
4
+ cmd: 'GET_LAST_TELEMETRY';
5
+ sid: string;
6
+ data: {
7
+ id: number;
8
+ commandName: string;
9
+ };
10
+ }
11
+ export declare type GetDeviceTelemetryResponse = BaseResponseData<{
12
+ timeDelta: number;
13
+ commandJson: Record<string, string>;
14
+ }>;
15
+ export interface Oper {
16
+ SPT: Stringify<number>;
17
+ AC_STSRC: 'WI-FI' | 'IR' | string;
18
+ AC_MODE: 'STBY' | 'COOL' | 'HEAT' | 'FAN' | 'DRY' | 'AUTO';
19
+ TIMER: OnOrOff;
20
+ SHABAT: OnOrOff;
21
+ CLEAR_FILT: OnOrOff;
22
+ DIAG_L2_PRD: Stringify<number>;
23
+ FANSPD: 'LOW' | 'MED' | 'HIGH' | 'AUTO';
24
+ FW_OTA: string;
25
+ IFEEL: OnOrOff;
26
+ SLEEP: OnOrOff;
27
+ }
28
+ export interface DiagL2 {
29
+ IDU_RX_CNT: string;
30
+ IDU_TX_CNT: string;
31
+ I_CALC_AT: string;
32
+ I_ICT: string;
33
+ I_RAT: string;
34
+ O_ACT_FREQ: string;
35
+ GOOD_IR_CNT: string;
36
+ I_LOGIC_SPT: string;
37
+ I_ON_OFF_STAT: OnOrOff;
38
+ I_PUMP: OnOrOff;
39
+ MAIN_PWR_STATUS: string;
40
+ O_ODU_MODE: string;
41
+ SMPS_PWR_STATUS: string;
42
+ BAD_IR_CNT: string;
43
+ DISPLAY_IP: string;
44
+ IDU_CRC_ERR_RX_CNT: string;
45
+ IP_HI_PRES: string;
46
+ IP_LO_PRES: string;
47
+ I_BAD_ICT: string;
48
+ I_BAD_RAT: string;
49
+ I_DEICER: string;
50
+ I_FAN_ACT: string;
51
+ I_LOCK: string;
52
+ I_NLOAD: string;
53
+ I_RCT: string;
54
+ I_SELFTEST: string;
55
+ I_STOP_COMP: string;
56
+ M2L_CRC_ERR_RX_CNT: string;
57
+ M2L_RX_CNT: string;
58
+ M2L_TX_CNT: string;
59
+ OFAN_TYPE: string;
60
+ O_AC_CURRENT: string;
61
+ O_BAD_OMT: string;
62
+ O_CTT: string;
63
+ O_CUR_RWR_TYPE: string;
64
+ O_DC_CURRENT: string;
65
+ O_EEV: string;
66
+ O_EEV_DMSMP: string;
67
+ O_FANDOWN_SPD: string;
68
+ O_FANUP_SPD: string;
69
+ O_FORCE_STDBY: string;
70
+ O_GLT: string;
71
+ O_HST: string;
72
+ O_MODEL: string;
73
+ O_OAT: string;
74
+ O_OCT: string;
75
+ O_OMT: string;
76
+ O_PROT_RESON: string;
77
+ O_PROT_STAT: string;
78
+ O_RGT_BAD: string;
79
+ O_RLT_BAD: string;
80
+ O_RV: string;
81
+ O_SYS_PWR: string;
82
+ O_TRGT_FREQ: string;
83
+ WI_FI_RSSI: string;
84
+ }
85
+ export interface Hb {
86
+ HB_CNT: string;
87
+ MESSTYPE: string;
88
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=get-device-telemetry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-device-telemetry.js","sourceRoot":"","sources":["../../../src/electra/server-types/get-device-telemetry.ts"],"names":[],"mappings":""}
@@ -0,0 +1,43 @@
1
+ import { BaseRequestData, BaseResponseData } from './common';
2
+ export interface GetDevicesRequest extends BaseRequestData {
3
+ cmd: 'GET_DEVICES';
4
+ sid: string;
5
+ data: Record<string, never>;
6
+ }
7
+ export declare type GetDevicesResponse = BaseResponseData<{
8
+ devices: {
9
+ id: number;
10
+ providerName?: any;
11
+ deviceTypeName: string;
12
+ manufactor: string;
13
+ photoId?: any;
14
+ permissions: number;
15
+ isGroupMember: boolean;
16
+ mode?: any;
17
+ deviceTypeId: number;
18
+ name: string;
19
+ status: number;
20
+ providerid: number;
21
+ latitude?: any;
22
+ longitude?: any;
23
+ location?: any;
24
+ sn: string;
25
+ mac: string;
26
+ model: string;
27
+ hwVersion?: any;
28
+ fmVersion: string;
29
+ userId: number;
30
+ manufactorId: number;
31
+ iconId: string;
32
+ hasImage: boolean;
33
+ deviceToken: string;
34
+ mqttId: string;
35
+ enableEvents: boolean;
36
+ isActivated: boolean;
37
+ logLevel?: any;
38
+ lastIntervalActivity?: any;
39
+ PowerOnID?: any;
40
+ IsDebugMode: boolean;
41
+ regdate: string;
42
+ }[];
43
+ }>;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=get-devices.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-devices.js","sourceRoot":"","sources":["../../../src/electra/server-types/get-devices.ts"],"names":[],"mappings":""}
@@ -0,0 +1,7 @@
1
+ export * from './common';
2
+ export * from './validate-token';
3
+ export * from './get-devices';
4
+ export * from './get-device-telemetry';
5
+ export * from './send-command';
6
+ export * from './send-otp';
7
+ export * from './check-otp';
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
+ };
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ __exportStar(require("./common"), exports);
14
+ __exportStar(require("./validate-token"), exports);
15
+ __exportStar(require("./get-devices"), exports);
16
+ __exportStar(require("./get-device-telemetry"), exports);
17
+ __exportStar(require("./send-command"), exports);
18
+ __exportStar(require("./send-otp"), exports);
19
+ __exportStar(require("./check-otp"), exports);
20
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/electra/server-types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAAyB;AACzB,mDAAiC;AACjC,gDAA8B;AAC9B,yDAAuC;AACvC,iDAA+B;AAC/B,6CAA2B;AAC3B,8CAA4B"}
@@ -0,0 +1,10 @@
1
+ import { BaseRequestData, BaseResponseData } from './common';
2
+ export interface SendCommandRequest extends BaseRequestData {
3
+ cmd: 'SEND_COMMAND';
4
+ sid: string;
5
+ data: {
6
+ id: number;
7
+ commandJson: string;
8
+ };
9
+ }
10
+ export declare type SendCommandResponse = BaseResponseData<Record<string, never>>;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=send-command.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"send-command.js","sourceRoot":"","sources":["../../../src/electra/server-types/send-command.ts"],"names":[],"mappings":""}
@@ -0,0 +1,9 @@
1
+ import { BaseRequestData, BaseResponseData, OsDetails } from './common';
2
+ export interface SendOTPRequest extends BaseRequestData {
3
+ cmd: 'SEND_OTP';
4
+ data: OsDetails & {
5
+ imei: string;
6
+ phone: string;
7
+ };
8
+ }
9
+ export declare type SendOTPResponse = BaseResponseData<Record<string, never>>;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=send-otp.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"send-otp.js","sourceRoot":"","sources":["../../../src/electra/server-types/send-otp.ts"],"names":[],"mappings":""}
@@ -0,0 +1,12 @@
1
+ import { BaseRequestData, BaseResponseData, OsDetails } from './common';
2
+ export interface ValidateTokenRequest extends BaseRequestData {
3
+ cmd: 'VALIDATE_TOKEN';
4
+ sid: null;
5
+ data: OsDetails & {
6
+ imei: string;
7
+ token: string;
8
+ };
9
+ }
10
+ export declare type ValidateTokenResponse = BaseResponseData<{
11
+ sid: string;
12
+ }>;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=validate-token.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validate-token.js","sourceRoot":"","sources":["../../../src/electra/server-types/validate-token.ts"],"names":[],"mappings":""}
@@ -0,0 +1,10 @@
1
+ /// <reference types="node" />
2
+ import * as ReadLine from 'readline';
3
+ export declare const randomNumber: (min: number, max: number) => number;
4
+ export declare const validateIsraelPhoneNumber: (phoneNumber: string) => boolean;
5
+ export declare function questionPromisified(rl: ReadLine.Interface, question: string): Promise<string>;
6
+ export declare function questionUntilValid({ rl, question, validateAnswer, }: {
7
+ rl: ReadLine.Interface;
8
+ question: string;
9
+ validateAnswer: (answer: any) => true | string;
10
+ }): Promise<string>;
package/lib/general.js ADDED
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.questionUntilValid = exports.questionPromisified = exports.validateIsraelPhoneNumber = exports.randomNumber = void 0;
4
+ const randomNumber = (min, max) => Math.floor(Math.random() * (max - min + 1) + min);
5
+ exports.randomNumber = randomNumber;
6
+ const validateIsraelPhoneNumber = (phoneNumber) => {
7
+ return /^05\d{8}|\+9725\d{8}$/.test(phoneNumber);
8
+ };
9
+ exports.validateIsraelPhoneNumber = validateIsraelPhoneNumber;
10
+ async function questionPromisified(rl, question) {
11
+ return await new Promise((resolve) => rl.question(question, resolve));
12
+ }
13
+ exports.questionPromisified = questionPromisified;
14
+ async function questionUntilValid({ rl, question, validateAnswer, }) {
15
+ while (true) {
16
+ const answer = await questionPromisified(rl, question);
17
+ const validationResult = validateAnswer(answer);
18
+ if (validationResult === true) {
19
+ return answer;
20
+ }
21
+ console.log(validationResult);
22
+ }
23
+ }
24
+ exports.questionUntilValid = questionUntilValid;
25
+ //# sourceMappingURL=general.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"general.js","sourceRoot":"","sources":["../src/general.ts"],"names":[],"mappings":";;;AAMO,MAAM,YAAY,GAAG,CAAC,GAAW,EAAE,GAAW,EAAU,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC;AAAvG,QAAA,YAAY,gBAA2F;AAE7G,MAAM,yBAAyB,GAAG,CAAC,WAAmB,EAAW,EAAE;IAIxE,OAAO,uBAAuB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;AACnD,CAAC,CAAC;AALW,QAAA,yBAAyB,6BAKpC;AAEK,KAAK,UAAU,mBAAmB,CAAC,EAAsB,EAAE,QAAgB;IAChF,OAAO,MAAM,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,EAAE,CAAC,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAC;AACxE,CAAC;AAFD,kDAEC;AAEM,KAAK,UAAU,kBAAkB,CAAC,EACvC,EAAE,EACF,QAAQ,EACR,cAAc,GAKf;IACC,OAAO,IAAI,EAAE;QACX,MAAM,MAAM,GAAG,MAAM,mBAAmB,CAAC,EAAE,EAAE,QAAQ,CAAC,CAAC;QACvD,MAAM,gBAAgB,GAAG,cAAc,CAAC,MAAM,CAAC,CAAC;QAEhD,IAAI,gBAAgB,KAAK,IAAI,EAAE;YAC7B,OAAO,MAAM,CAAC;SACf;QAED,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;KAC/B;AACH,CAAC;AAnBD,gDAmBC"}
@@ -0,0 +1,4 @@
1
+ export declare type SetOptional<Obj extends object, Keys extends keyof Obj> = Omit<Obj, Keys> & {
2
+ [K in Keys]?: Obj[K];
3
+ };
4
+ export declare type Stringify<T> = string;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=helper-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helper-types.js","sourceRoot":"","sources":["../src/helper-types.ts"],"names":[],"mappings":""}
package/lib/index.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ import { Client } from './electra/client';
3
+ export { Client };
package/lib/index.js ADDED
@@ -0,0 +1,12 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.Client = void 0;
5
+ const client_1 = require("./electra/client");
6
+ Object.defineProperty(exports, "Client", { enumerable: true, get: function () { return client_1.Client; } });
7
+ if (require.main === module) {
8
+ client_1.Client.auth().then((client) => {
9
+ console.log(client.getAuthData());
10
+ });
11
+ }
12
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;AAEA,6CAA0C;AAWjC,uFAXA,eAAM,OAWA;AATf,IAAI,OAAO,CAAC,IAAI,KAAK,MAAM,EAAE;IAG3B,eAAM,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE;QAC5B,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC;IACpC,CAAC,CAAC,CAAC;CACJ"}
@@ -0,0 +1 @@
1
+ {"program":{"fileNames":["../node_modules/typescript/lib/lib.es5.d.ts","../node_modules/typescript/lib/lib.es2015.d.ts","../node_modules/typescript/lib/lib.es2016.d.ts","../node_modules/typescript/lib/lib.es2017.d.ts","../node_modules/typescript/lib/lib.es2018.d.ts","../node_modules/typescript/lib/lib.dom.d.ts","../node_modules/typescript/lib/lib.dom.iterable.d.ts","../node_modules/typescript/lib/lib.webworker.importscripts.d.ts","../node_modules/typescript/lib/lib.scripthost.d.ts","../node_modules/typescript/lib/lib.es2015.core.d.ts","../node_modules/typescript/lib/lib.es2015.collection.d.ts","../node_modules/typescript/lib/lib.es2015.generator.d.ts","../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../node_modules/typescript/lib/lib.es2015.promise.d.ts","../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../node_modules/typescript/lib/lib.es2017.object.d.ts","../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2017.string.d.ts","../node_modules/typescript/lib/lib.es2017.intl.d.ts","../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../node_modules/typescript/lib/lib.es2018.intl.d.ts","../node_modules/typescript/lib/lib.es2018.promise.d.ts","../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../node_modules/typescript/lib/lib.esnext.intl.d.ts","../node_modules/typescript/lib/lib.es2017.full.d.ts","../src/general.ts","../src/helper-types.ts","../node_modules/axios/index.d.ts","../src/electra/server-types/common.ts","../src/electra/server-types/validate-token.ts","../src/electra/server-types/get-devices.ts","../src/electra/server-types/get-device-telemetry.ts","../src/electra/server-types/send-command.ts","../src/electra/server-types/send-otp.ts","../src/electra/server-types/check-otp.ts","../src/electra/server-types/index.ts","../src/electra/client.ts","../src/index.ts","../node_modules/@babel/types/lib/index.d.ts","../node_modules/@types/babel__generator/index.d.ts","../node_modules/@babel/parser/typings/babel-parser.d.ts","../node_modules/@types/babel__template/index.d.ts","../node_modules/@types/babel__traverse/index.d.ts","../node_modules/@types/babel__core/index.d.ts","../node_modules/@types/faker/index.d.ts","../node_modules/@types/node/assert/strict.d.ts","../node_modules/@types/node/globals.d.ts","../node_modules/@types/node/async_hooks.d.ts","../node_modules/@types/node/buffer.d.ts","../node_modules/@types/node/child_process.d.ts","../node_modules/@types/node/cluster.d.ts","../node_modules/@types/node/console.d.ts","../node_modules/@types/node/constants.d.ts","../node_modules/@types/node/crypto.d.ts","../node_modules/@types/node/dgram.d.ts","../node_modules/@types/node/diagnostics_channel.d.ts","../node_modules/@types/node/dns.d.ts","../node_modules/@types/node/dns/promises.d.ts","../node_modules/@types/node/domain.d.ts","../node_modules/@types/node/events.d.ts","../node_modules/@types/node/fs.d.ts","../node_modules/@types/node/fs/promises.d.ts","../node_modules/@types/node/http.d.ts","../node_modules/@types/node/http2.d.ts","../node_modules/@types/node/https.d.ts","../node_modules/@types/node/inspector.d.ts","../node_modules/@types/node/module.d.ts","../node_modules/@types/node/net.d.ts","../node_modules/@types/node/os.d.ts","../node_modules/@types/node/path.d.ts","../node_modules/@types/node/perf_hooks.d.ts","../node_modules/@types/node/process.d.ts","../node_modules/@types/node/punycode.d.ts","../node_modules/@types/node/querystring.d.ts","../node_modules/@types/node/readline.d.ts","../node_modules/@types/node/repl.d.ts","../node_modules/@types/node/stream.d.ts","../node_modules/@types/node/stream/promises.d.ts","../node_modules/@types/node/string_decoder.d.ts","../node_modules/@types/node/timers.d.ts","../node_modules/@types/node/timers/promises.d.ts","../node_modules/@types/node/tls.d.ts","../node_modules/@types/node/trace_events.d.ts","../node_modules/@types/node/tty.d.ts","../node_modules/@types/node/url.d.ts","../node_modules/@types/node/util.d.ts","../node_modules/@types/node/v8.d.ts","../node_modules/@types/node/vm.d.ts","../node_modules/@types/node/worker_threads.d.ts","../node_modules/@types/node/zlib.d.ts","../node_modules/@types/node/globals.global.d.ts","../node_modules/@types/node/wasi.d.ts","../node_modules/@types/node/ts3.6/base.d.ts","../node_modules/@types/node/assert.d.ts","../node_modules/@types/node/base.d.ts","../node_modules/@types/node/index.d.ts","../node_modules/@types/graceful-fs/index.d.ts","../node_modules/@types/istanbul-lib-coverage/index.d.ts","../node_modules/@types/istanbul-lib-report/index.d.ts","../node_modules/@types/istanbul-reports/index.d.ts","../node_modules/jest-diff/build/cleanupsemantic.d.ts","../node_modules/pretty-format/build/types.d.ts","../node_modules/pretty-format/build/index.d.ts","../node_modules/jest-diff/build/types.d.ts","../node_modules/jest-diff/build/difflines.d.ts","../node_modules/jest-diff/build/printdiffs.d.ts","../node_modules/jest-diff/build/index.d.ts","../node_modules/@types/jest/index.d.ts","../node_modules/@types/json-schema/index.d.ts","../node_modules/@types/minimist/index.d.ts","../node_modules/@types/normalize-package-data/index.d.ts","../node_modules/@types/parse-json/index.d.ts","../node_modules/@types/prettier/index.d.ts","../node_modules/@types/stack-utils/index.d.ts","../node_modules/@types/yargs-parser/index.d.ts","../node_modules/@types/yargs/index.d.ts"],"fileInfos":[{"version":"89f78430e422a0f06d13019d60d5a45b37ec2d28e67eb647f73b1b0d19a46b72","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06",{"version":"abba1071bfd89e55e88a054b0c851ea3e8a494c340d0f3fab19eb18f6afb0c9e","affectsGlobalScope":true},{"version":"927cb2b60048e1395b183bf74b2b80a75bdb1dbe384e1d9fac654313ea2fb136","affectsGlobalScope":true},{"version":"7fac8cb5fc820bc2a59ae11ef1c5b38d3832c6d0dfaec5acdb5569137d09a481","affectsGlobalScope":true},{"version":"097a57355ded99c68e6df1b738990448e0bf170e606707df5a7c0481ff2427cd","affectsGlobalScope":true},{"version":"d8996609230d17e90484a2dd58f22668f9a05a3bfe00bfb1d6271171e54a31fb","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"4378fc8122ec9d1a685b01eb66c46f62aba6b239ca7228bb6483bcf8259ee493","affectsGlobalScope":true},{"version":"0d5f52b3174bee6edb81260ebcd792692c32c81fd55499d69531496f3f2b25e7","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"75ec0bdd727d887f1b79ed6619412ea72ba3c81d92d0787ccb64bab18d261f14","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"1b3fe904465430e030c93239a348f05e1be80640d91f2f004c3512c2c2c89f34","affectsGlobalScope":true},{"version":"10bbdc1981b8d9310ee75bfac28ee0477bb2353e8529da8cff7cb26c409cb5e8","affectsGlobalScope":true},"d2f31f19e1ba6ed59be9259d660a239d9a3fcbbc8e038c6b2009bde34b175fed","6a53033e2a8ea8b536aa5b42213d1222e82d22a6cd39ef97e6741dd5af5154c7","e2c0408b474466182e4f7728cca991811c95f076036e0eae636b83116ebd101f","b8fed43680ec4066d13d2c48daaff88a885c4ea5fa11fc5393011e1b13f2c2f0","5628e8e948730529195d6f2f116ed49aeb1b3714f7231125fa5ab4b782378402","334b2404c359aaaf9526a41fe5e478acbbc73717ae65eff1985aa645de6791da","ee295f05ac51927ba8858c382a73f67f415447355ecf4bb9c2671a830146f9df","e0dddce1b6079890fcdfa69a83393075c1790d6f915423126556a6828dad4b6b","2a8874ecde7f5c37d0e711c718441c5e10c38435b8e7a149daf169f4a73aa568","8ce05e640d8aa6ba007165c44cb274d1e215f3cab361f6df80ad6944f4223c9a","a52e382477da2a4dcf647cfbbaa86b281567e65918efaf92414e8385b2296a2d","3cc34741a52b69dff849e2d62c5884b79807c331ffc61468e3af86055eb5bfe3","1184c4bf7e9b6a92b140a58f8335600622812537d325104130338797de7bd3b2","8dfbee2af0eff92c1fbcb0ca2612012919443b2ef65e5b815d12ac5c26db1b01","511a5f4f77165dc1b73ceae1e28b4a8f78f3443d8e18a1fd43bfafd2b0133bbe","8dfed5c91ad36e69e6da6b7e49be929d4e19666db2b651aa839c485170a2902c","95aba78013d782537cc5e23868e736bec5d377b918990e28ed56110e3ae8b958","93de1c6dab503f053efe8d304cb522bb3a89feab8c98f307a674a4fae04773e9","3b043cf9a81854a72963fdb57d1884fc4da1cf5be69b5e0a4c5b751e58cb6d88","80164ffebe1723a50e020a648e0623c026ff39be13c5cd45e6a82d0fcc06e2d0",{"version":"35df3991a30c880f5d745f98db7174936ab7e7f527bf6de0d84d602cc6da8683","affectsGlobalScope":true},"ae02396b40b1b6f448a5b610d6b8c34bcdf18a568ac8fa9ab23e1e4784959003",{"version":"bf629ebbac2c65601bcb5c032644023a2b4b3b1151c0d1bf60ced7c35cc81b5d","affectsGlobalScope":true},"9d07804fffa0680a15b100ea9312078ffd9779429719240d3576bb592511bf31",{"version":"9adf779532ec8ce69192cace098bad43e000f14aeb5d76a53a708fca1cf522a4","affectsGlobalScope":true},"a93393efbd05f09345c1476c8240bc75377b18411f0e7fa57fb68a57f98dc344","ec51a04fcf9460704972d6f4ad4e2ad6ebdccdc178e5896a6e9ee705fa019c07",{"version":"fc6eaec79a8c780a7075ed62c82d94f292cce50b339ae95c256c818995a54fef","affectsGlobalScope":true},"82408ed3e959ddc60d3e9904481b5a8dc16469928257af22a3f7d1a3bc7fd8c4","26d2d7f1641db03285a8f5ed95fb1f42a4caf8df222e36754d438403350aca7b","213536e5e9a2af58caa431dd9ee619ee01bd888e86afd66c96369a321a56aca3","62dd9da839184d7f205604d6f449bfbed6b2b5141e4325b914448fd55865cb93","0b94777a9f37fabc830f7b2059489f8763a1c90977cc31f489aaaffc4e7aeaa1","e7517b142aa0dd024ade4d0742298a76eabcbd906a33783a35dc79805b9f2423","e7cfeeca82ca81101e2f58e97b160058f3aedaf175ceb9ae4fe7cd0cedaa1fb7",{"version":"5a66ce5569c85d17c8d2ef1c0fde85f3474e74122e6d6b38120155677de17904","affectsGlobalScope":true},"a219441e8a436d3c28e28f2d3c4a3693d54dae6482d97b3ef91909d04548a1bd","84794740590d050a719c7c5f59ee70d19e84b8a1d4a3e25edbedc11e1492830c","582096bfd96a8dc9a59305d2d014096e3372b1af2fbc8558236d31a52265b5a7","96b8bc3c8a1445ccc2b5a5f7f9dbc6953fcc781ad58e238215d61260404c7c17","67f3be5ef161ebfde5f597ed9f97595915fa186761563430dfd161ad918506a6","01234f62a40d56a43fa21c1eed851f1341ec3cd388ce54d816e29d43113d7e7c",{"version":"0af813cb2b02501faa3d778a1e2fb84eba93edbaa28c80569b540b8596648308","affectsGlobalScope":true},"b09abdb1b3dd19d4a77fedc77e62fabb96f352fc1d2331be0a3484a6d30566bb","e1aea0bae8186fee1b966d4e4e2a167ed0edd86668c609b1440ed0e81247462d","d15d11ea31228ad0c57cda43b406f7bb1712c6c8fe6dd9c27a90dbfc7a8d6117","e841f6a9736f6a57652c3d8153e94b8bd62ec69173648c4b7a36f981d6df8661",{"version":"d05ec82ef330abb1b780a55d8df5c28cd8b0ae251ad071aa8616796c033e59b6","affectsGlobalScope":true},"b89ea948a92ce598bac83e0fd39ab4dd1f938b337287abe33d756950bfe31bd7","e09cc4f66a6cf31c2224129e990b91ca00b25b0826989264fbc4aaa7bf9f6460","8d33b542eb574e7662b4bb4d5b989eabc16b7dcc004a8b35b3d4e15118048de3","66b1d6af6036b6b0441a898b8610b2a43ab3e981aaffd0778fdb35efcd4ac10e","2b4eb1b3f1aaf046e6b1aedcd514f769184976bb75db7a9a9affcd7a93db1f03","d6b1cd14fddfb186e056ca3d89a319ed237b3ded61ce94db48062e01ad332190","c55b1e6bee98c27c3ff8477a47ef182841cbf7883c0e8b47c76506532366c34c",{"version":"fd58f729536faa80e0bc18fdd50c788eeb9fd47ee102f65ae8961ef5b7eb08ac","affectsGlobalScope":true},"d064178ad738111c860104971248a4cdb1b19a76620dedbdeff2b4e8035d0c02","b28d0596bc1c2a91ee5670fffbf49d0c293af00095e62f67eca5f820565569ee","5367052357620c6e14cf2a53f7ede9f8d85f4a9dab6facc3da6ae445541b7372","1ca653dfd6774ad08e4a0cc240086e59a9d6fca5608c0ab9226f0feb39180e19","58a42ee27d7a738bd561e09adecc774d801f2e15d7abb48641249c840446dd5e","2ba501f8d216768ad6ed19e905ebf6dd176acf1c524f3bf42f257a4e99ba9cea","3bc4bf73867c7aaebf5f8d8c367306e9e01007e9e0f3c3022d9717bea3666c55","6e25f951f1c64dc1fdda83ad3183b4af572b95218e736bf454185ac0c8abdf41","8daceda051793fad176cfbac941fa34457a3afad17d3eb40f3fdc9533d3a3fbf","c3f93d077a06bc8c8f0e6c1b0a645fabfe9aaf2a40080fd7d8cd81e90fa0ac4a",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"f87509fed855ba8d77bcc1bbdd1acb8380a8092373c2caf3f04e5a8f8f3c5e5b","de0e63feaddfdf1a7a92071f6e7897d86ca497499116433e99fe15bf4af32e01","c279f541b15691f99c82e130c9897740adf4584442b3610c5634f5684c1f5b60","e61a21e9418f279bc480394a94d1581b2dee73747adcbdef999b6737e34d721b","06b4e032b397f9bad48024b5f942595d2b8c398ab462fd0ba961c5203efb8a55","3ebae8c00411116a66fca65b08228ea0cf0b72724701f9b854442100aab55aba","de18acda71730bac52f4b256ce7511bb56cc21f6f114c59c46782eff2f632857","7eb06594824ada538b1d8b48c3925a83e7db792f47a081a62cf3e5c4e23cf0ee","f5638f7c2f12a9a1a57b5c41b3c1ea7db3876c003bab68e6a57afd6bcc169af0","d8aab31ba8e618cc3eea10b0945de81cb93b7e8150a013a482332263b9305322","462bccdf75fcafc1ae8c30400c9425e1a4681db5d605d1a0edb4f990a54d8094","5923d8facbac6ecf7c84739a5c701a57af94a6f6648d6229a6c768cf28f0f8cb","7adecb2c3238794c378d336a8182d4c3dd2c4fa6fa1785e2797a3db550edea62","dc12dc0e5aa06f4e1a7692149b78f89116af823b9e1f1e4eae140cd3e0e674e6","1bfc6565b90c8771615cd8cfcf9b36efc0275e5e83ac7d9181307e96eb495161","8a8a96898906f065f296665e411f51010b51372fa260d5373bf9f64356703190",{"version":"e9f2cdc4e98e73a606ff68c470a8cb4f23cd638c47649d71b90a2d9413102080","affectsGlobalScope":true},"0359682c54e487c4cab2b53b2b4d35cc8dea4d9914bc6abcdb5701f8b8e745a4","209e814e8e71aec74f69686a9506dd7610b97ab59dcee9446266446f72a76d05","22293bd6fa12747929f8dfca3ec1684a3fe08638aa18023dd286ab337e88a592","2b8264b2fefd7367e0f20e2c04eed5d3038831fe00f5efbc110ff0131aab899b","9d9e658d1d5b805562749ce383ef8c67ccb796394d8734d9c138788d7dab6ee3","b0d10e46cfe3f6c476b69af02eaa38e4ccc7430221ce3109ae84bb9fb8282298","f7e133b20ee2669b6c0e5d7f0cd510868c57cd64b283e68c7f598e30ce9d76d2","6ba73232c9d3267ca36ddb83e335d474d2c0e167481e3dec416c782894e11438"],"options":{"allowSyntheticDefaultImports":true,"declaration":true,"emitDecoratorMetadata":true,"experimentalDecorators":true,"module":1,"outDir":"./","removeComments":true,"skipLibCheck":true,"sourceMap":true,"target":4},"fileIdsList":[[46,93],[93],[46,47,48,49,50,93],[46,48,93],[68,93,103],[93,105],[93,106],[93,110,114],[93,101],[55,93],[93,100,101],[56,61,93],[57,67,68,75,84,93],[57,58,67,75,93],[59,93],[60,61,68,76,93],[61,84,89,93],[62,64,67,75,93],[63,93],[64,65,93],[66,67,93],[67,93],[67,68,69,84,92,93],[67,68,69,84,93],[70,75,84,92,93],[67,68,70,71,75,84,89,92,93],[70,72,89,92,93],[93,102],[67,73,93],[74,92,93],[64,67,75,84,93],[76,93],[77,93],[55,78,93],[79,91,93,96],[80,93],[81,93],[67,82,93],[82,83,93,95],[67,84,85,93],[84,85,93],[86,93],[67,87,88,93],[87,88,93],[61,75,89,93],[90,93],[53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99],[75,91,93],[70,81,92,93],[61,93],[84,93,94],[93,95],[93,99],[56,61,67,69,78,84,92,93,95,96],[84,93,97],[93,122],[93,108,111],[93,108,111,112,113],[93,110],[93,109],[33,34,35,43,82,93],[36,93],[34,36,93],[36,37,38,39,40,41,42,93],[82,93],[44,93]],"referencedMap":[[48,1],[46,2],[51,3],[47,1],[49,4],[50,1],[52,2],[104,5],[105,2],[106,6],[107,7],[115,8],[116,2],[117,2],[101,9],[53,9],[55,10],[102,11],[56,12],[57,13],[58,14],[59,15],[60,16],[61,17],[62,18],[63,19],[64,20],[65,20],[66,21],[67,22],[68,23],[69,24],[54,2],[98,2],[70,25],[71,26],[72,27],[103,28],[73,29],[74,30],[75,31],[76,32],[77,33],[78,34],[79,35],[80,36],[81,37],[82,38],[83,39],[84,40],[85,41],[86,42],[87,43],[88,44],[89,45],[90,46],[100,47],[91,48],[92,49],[93,50],[94,51],[95,52],[99,53],[96,54],[97,55],[118,2],[119,2],[120,2],[121,2],[122,2],[123,56],[35,2],[108,2],[112,57],[114,58],[113,57],[111,59],[110,60],[109,2],[6,2],[7,2],[11,2],[10,2],[2,2],[12,2],[13,2],[14,2],[15,2],[16,2],[17,2],[18,2],[19,2],[3,2],[4,2],[32,2],[23,2],[20,2],[21,2],[22,2],[24,2],[25,2],[26,2],[5,2],[27,2],[28,2],[29,2],[30,2],[1,2],[31,2],[9,2],[8,2],[44,61],[42,62],[36,2],[39,63],[38,62],[43,64],[40,62],[41,62],[37,62],[33,65],[34,2],[45,66]],"exportedModulesMap":[[48,1],[46,2],[51,3],[47,1],[49,4],[50,1],[52,2],[104,5],[105,2],[106,6],[107,7],[115,8],[116,2],[117,2],[101,9],[53,9],[55,10],[102,11],[56,12],[57,13],[58,14],[59,15],[60,16],[61,17],[62,18],[63,19],[64,20],[65,20],[66,21],[67,22],[68,23],[69,24],[54,2],[98,2],[70,25],[71,26],[72,27],[103,28],[73,29],[74,30],[75,31],[76,32],[77,33],[78,34],[79,35],[80,36],[81,37],[82,38],[83,39],[84,40],[85,41],[86,42],[87,43],[88,44],[89,45],[90,46],[100,47],[91,48],[92,49],[93,50],[94,51],[95,52],[99,53],[96,54],[97,55],[118,2],[119,2],[120,2],[121,2],[122,2],[123,56],[35,2],[108,2],[112,57],[114,58],[113,57],[111,59],[110,60],[109,2],[6,2],[7,2],[11,2],[10,2],[2,2],[12,2],[13,2],[14,2],[15,2],[16,2],[17,2],[18,2],[19,2],[3,2],[4,2],[32,2],[23,2],[20,2],[21,2],[22,2],[24,2],[25,2],[26,2],[5,2],[27,2],[28,2],[29,2],[30,2],[1,2],[31,2],[9,2],[8,2],[44,61],[42,62],[36,2],[39,63],[38,62],[43,64],[40,62],[41,62],[37,62],[33,65],[34,2],[45,66]],"semanticDiagnosticsPerFile":[48,46,51,47,49,50,52,104,105,106,107,115,116,117,101,53,55,102,56,57,58,59,60,61,62,63,64,65,66,67,68,69,54,98,70,71,72,103,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,100,91,92,93,94,95,99,96,97,118,119,120,121,122,123,35,108,112,114,113,111,110,109,6,7,11,10,2,12,13,14,15,16,17,18,19,3,4,32,23,20,21,22,24,25,26,5,27,28,29,30,1,31,9,8,44,42,36,39,38,43,40,41,37,33,34,45]},"version":"4.5.4"}
package/package.json ADDED
@@ -0,0 +1,67 @@
1
+ {
2
+ "name": "@yosnightfly/electra-smart-js-client",
3
+ "version": "1.0.0",
4
+ "description": "Electra Smart JS Client",
5
+ "files": [
6
+ "lib"
7
+ ],
8
+ "bin": {
9
+ "electra-smart-js-client": "./lib/index.js"
10
+ },
11
+ "main": "lib/index.js",
12
+ "typings": "lib/index.d.ts",
13
+ "scripts": {
14
+ "prepare": "husky install",
15
+ "build": "rm -rf lib && tsc -p tsconfig.build.json",
16
+ "start": "ts-node src/index.ts",
17
+ "format": "prettier --write \"src/**/*.ts\"",
18
+ "lint": "eslint \"src/**/*.ts\" --fix",
19
+ "semantic-release": "semantic-release"
20
+ },
21
+ "dependencies": {
22
+ "axios": "^0.30.2"
23
+ },
24
+ "devDependencies": {
25
+ "@commitlint/cli": "^15.0.0",
26
+ "@commitlint/config-conventional": "^15.0.0",
27
+ "@jest/types": "^27.1.1",
28
+ "@types/faker": "^5.5.9",
29
+ "@types/jest": "^27.0.3",
30
+ "@typescript-eslint/eslint-plugin": "^5.7.0",
31
+ "@typescript-eslint/parser": "^5.7.0",
32
+ "eslint": "^8.4.1",
33
+ "eslint-config-prettier": "^8.3.0",
34
+ "eslint-plugin-prettier": "^4.0.0",
35
+ "faker": "^5.5.3",
36
+ "husky": "^7.0.4",
37
+ "jest": "^27.4.5",
38
+ "jest-extended": "^1.2.0",
39
+ "prettier": "^2.5.1",
40
+ "ts-jest": "^27.1.2",
41
+ "ts-node": "^10.4.0",
42
+ "typescript": "^4.5.4",
43
+ "semantic-release": "^25.0.2"
44
+ },
45
+ "release": {
46
+ "branches": [
47
+ "main"
48
+ ]
49
+ },
50
+ "author": "Yossi Hillali",
51
+ "license": "MIT",
52
+ "bugs": {
53
+ "url": "https://github.com/hillaliy/electra-smart-js-client/issues"
54
+ },
55
+ "homepage": "https://github.com/hillaliy/electra-smart-js-client#readme",
56
+ "repository": {
57
+ "type": "git",
58
+ "url": "https://github.com/hillaliy/electra-smart-js-client.git"
59
+ },
60
+ "keywords": [
61
+ "electra",
62
+ "smart",
63
+ "ac",
64
+ "air conditioning",
65
+ "IOT"
66
+ ]
67
+ }