node-alarm-dot-com 2.1.0-beta.1 → 2.1.0-beta.3
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/_models/DeviceStates.d.ts +2 -2
- package/dist/index.d.ts +2 -0
- package/dist/index.js +3 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
@@ -139,3 +139,5 @@ export declare function closeGarage(garageID: string, authOpts: AuthOpts): Promi
|
|
139
139
|
* @returns {Promise}
|
140
140
|
*/
|
141
141
|
export declare function openGarage(garageID: string, authOpts: AuthOpts): Promise<any>;
|
142
|
+
export declare function authenticatedGet(url: string, opts: any): Promise<any>;
|
143
|
+
export declare function authenticatedPost(url: string, opts: any): Promise<any>;
|
package/dist/index.js
CHANGED
@@ -20,7 +20,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
20
20
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
21
21
|
};
|
22
22
|
Object.defineProperty(exports, "__esModule", { value: true });
|
23
|
-
exports.openGarage = exports.closeGarage = exports.setLockUnsecure = exports.setLockSecure = exports.setLightOff = exports.setLightOn = exports.disarm = exports.armAway = exports.armStay = exports.getComponents = exports.getCurrentState = exports.login = void 0;
|
23
|
+
exports.authenticatedPost = exports.authenticatedGet = exports.openGarage = exports.closeGarage = exports.setLockUnsecure = exports.setLockSecure = exports.setLightOff = exports.setLightOn = exports.disarm = exports.armAway = exports.armStay = exports.getComponents = exports.getCurrentState = exports.login = void 0;
|
24
24
|
const node_fetch_1 = __importDefault(require("node-fetch"));
|
25
25
|
__exportStar(require("./_models/AuthOpts"), exports);
|
26
26
|
__exportStar(require("./_models/DeviceStates"), exports);
|
@@ -502,6 +502,7 @@ async function authenticatedGet(url, opts) {
|
|
502
502
|
const res = await get(url, opts);
|
503
503
|
return res.body;
|
504
504
|
}
|
505
|
+
exports.authenticatedGet = authenticatedGet;
|
505
506
|
async function authenticatedPost(url, opts) {
|
506
507
|
opts = opts || {};
|
507
508
|
opts.headers = opts.headers || {};
|
@@ -514,6 +515,7 @@ async function authenticatedPost(url, opts) {
|
|
514
515
|
const res = await post(url, opts);
|
515
516
|
return res.body;
|
516
517
|
}
|
518
|
+
exports.authenticatedPost = authenticatedPost;
|
517
519
|
async function get(url, opts) {
|
518
520
|
opts = opts || {};
|
519
521
|
let status;
|