edilkamin 0.0.1 → 0.0.2

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/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # Edilkamin.js
2
2
 
3
3
  [![Tests](https://github.com/AndreMiras/edilkamin.js/workflows/Tests/badge.svg)](https://github.com/AndreMiras/edilkamin.js/actions/workflows/tests.yml)
4
+ [![Documentation](https://github.com/AndreMiras/edilkamin.js/workflows/Documentation/badge.svg)](https://github.com/AndreMiras/edilkamin.js/actions/workflows/documentation.yml)
5
+ [![npm version](https://badge.fury.io/js/edilkamin.svg)](https://badge.fury.io/js/edilkamin)
4
6
 
5
7
  This is a library for the [Reverse Engineered](docs/ReverseEngineering.md) "The Mind" Edilkamin API.
6
8
  The Mind offers an app/API to remote control the Edilkamin pellet stoves.
@@ -0,0 +1,2 @@
1
+ declare const API_URL = "https://fxtj7xkgc6.execute-api.eu-central-1.amazonaws.com/prod/";
2
+ export { API_URL };
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.API_URL = void 0;
4
+ const API_URL = "https://fxtj7xkgc6.execute-api.eu-central-1.amazonaws.com/prod/";
5
+ exports.API_URL = API_URL;
package/dist/index.d.ts CHANGED
@@ -1 +1,3 @@
1
- export {};
1
+ declare const deviceInfo: (macAddress: string) => Promise<import("axios").AxiosResponse<any>>;
2
+ declare const main: () => void;
3
+ export { main, deviceInfo };
package/dist/index.js CHANGED
@@ -9,8 +9,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.deviceInfo = exports.main = void 0;
12
13
  const assert_1 = require("assert");
14
+ const axios_1 = require("axios");
13
15
  const aws_amplify_1 = require("aws-amplify");
16
+ const constants_1 = require("./constants");
14
17
  const amplifyconfiguration = {
15
18
  Auth: {
16
19
  region: "eu-central-1",
@@ -28,10 +31,12 @@ const signIn = (username, password) => __awaiter(void 0, void 0, void 0, functio
28
31
  console.log("error signing in", error);
29
32
  }
30
33
  });
34
+ const deviceInfo = (macAddress) => axios_1.default.get(`${constants_1.API_URL}device/${macAddress}/info`);
35
+ exports.deviceInfo = deviceInfo;
31
36
  const main = () => {
32
37
  const { USERNAME, PASSWORD } = process.env;
33
38
  assert_1.ok(USERNAME);
34
39
  assert_1.ok(PASSWORD);
35
40
  signIn(USERNAME, PASSWORD);
36
41
  };
37
- main();
42
+ exports.main = main;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "edilkamin",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -23,7 +23,11 @@
23
23
  },
24
24
  "homepage": "https://github.com/AndreMiras/edilkamin.js#readme",
25
25
  "dependencies": {
26
- "@aws-amplify/cli": "^7.6.21",
27
26
  "aws-amplify": "^4.3.14"
27
+ },
28
+ "devDependencies": {
29
+ "@aws-amplify/cli": "^7.6.21",
30
+ "prettier": "^2.5.1",
31
+ "typedoc": "^0.22.12"
28
32
  }
29
33
  }