@etainabl/nodejs-sdk 1.2.34 → 1.2.35
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/cjs/index.js +4 -0
- package/package.json +3 -2
- package/src/index.ts +1 -2
- package/dist/cjs/api.d.ts +0 -111
- package/dist/cjs/api.js +0 -318
- package/dist/cjs/consumption.d.ts +0 -14
- package/dist/cjs/consumption.js +0 -32
- package/dist/cjs/db.d.ts +0 -6
- package/dist/cjs/db.js +0 -69
- package/dist/cjs/etainabl.d.ts +0 -10
- package/dist/cjs/etainabl.js +0 -2
- package/dist/cjs/index.d.ts +0 -11
- package/dist/cjs/logger.d.ts +0 -3
- package/dist/cjs/logger.js +0 -14
- package/dist/cjs/monitoring.d.ts +0 -1
- package/dist/cjs/monitoring.js +0 -31
- package/dist/cjs/package.json +0 -3
- package/dist/cjs/reporting.d.ts +0 -2
- package/dist/cjs/reporting.js +0 -69
- package/dist/cjs/slack.d.ts +0 -4
- package/dist/cjs/slack.js +0 -28
- package/dist/cjs/types/index.d.ts +0 -20
- package/dist/cjs/types/index.js +0 -2
- package/dist/cjs/units.d.ts +0 -22
- package/dist/cjs/units.js +0 -94
- package/dist/mjs/api.d.ts +0 -111
- package/dist/mjs/api.js +0 -308
- package/dist/mjs/consumption.d.ts +0 -14
- package/dist/mjs/consumption.js +0 -22
- package/dist/mjs/db.d.ts +0 -6
- package/dist/mjs/db.js +0 -53
- package/dist/mjs/etainabl.d.ts +0 -10
- package/dist/mjs/etainabl.js +0 -1
- package/dist/mjs/index.d.ts +0 -11
- package/dist/mjs/index.js +0 -9
- package/dist/mjs/logger.d.ts +0 -3
- package/dist/mjs/logger.js +0 -9
- package/dist/mjs/monitoring.d.ts +0 -1
- package/dist/mjs/monitoring.js +0 -15
- package/dist/mjs/package.json +0 -3
- package/dist/mjs/reporting.d.ts +0 -2
- package/dist/mjs/reporting.js +0 -62
- package/dist/mjs/slack.d.ts +0 -4
- package/dist/mjs/slack.js +0 -14
- package/dist/mjs/types/index.d.ts +0 -20
- package/dist/mjs/types/index.js +0 -1
- package/dist/mjs/units.d.ts +0 -22
- package/dist/mjs/units.js +0 -89
package/dist/cjs/monitoring.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const sendHeartbeat: () => Promise<boolean>;
|
package/dist/cjs/monitoring.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.sendHeartbeat = void 0;
|
|
16
|
-
const axios_1 = __importDefault(require("axios"));
|
|
17
|
-
const logger_js_1 = __importDefault(require("./logger.js"));
|
|
18
|
-
const log = (0, logger_js_1.default)('monitoring');
|
|
19
|
-
const sendHeartbeat = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
20
|
-
if (!process.env.HEARTBEAT_URL || process.env.HEARTBEAT_URL.endsWith('/'))
|
|
21
|
-
return false;
|
|
22
|
-
try {
|
|
23
|
-
yield axios_1.default.post(process.env.HEARTBEAT_URL);
|
|
24
|
-
return true;
|
|
25
|
-
}
|
|
26
|
-
catch (e) {
|
|
27
|
-
log.warn(`Failed to send heartbeat: ${e.message || e}`);
|
|
28
|
-
return false;
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
exports.sendHeartbeat = sendHeartbeat;
|
package/dist/cjs/package.json
DELETED
package/dist/cjs/reporting.d.ts
DELETED
package/dist/cjs/reporting.js
DELETED
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.getScheduledReportRunTimes = void 0;
|
|
7
|
-
const moment_1 = __importDefault(require("moment"));
|
|
8
|
-
moment_1.default.locale('en', {
|
|
9
|
-
week: {
|
|
10
|
-
dow: 1
|
|
11
|
-
}
|
|
12
|
-
});
|
|
13
|
-
const getNextRunTime = (startDate, schedule, taskTime) => {
|
|
14
|
-
const [num, freq] = schedule.frequency.split('|');
|
|
15
|
-
const targetDate = (0, moment_1.default)(startDate).add(num, freq);
|
|
16
|
-
if (schedule.frequencyPeriod === 'first') {
|
|
17
|
-
targetDate.startOf(freq);
|
|
18
|
-
}
|
|
19
|
-
else if (schedule.frequencyPeriod === 'last') {
|
|
20
|
-
targetDate.endOf(freq);
|
|
21
|
-
}
|
|
22
|
-
const isWeekday = targetDate.isoWeekday() > 0 && targetDate.isoWeekday() < 6;
|
|
23
|
-
const isSaturday = targetDate.isoWeekday() === 6;
|
|
24
|
-
// The weekday or weekend chosen should be within the same month as the target date
|
|
25
|
-
if (schedule.frequencyDay === 'weekdays' && !isWeekday) {
|
|
26
|
-
if ((targetDate.date() / 7) < 2) {
|
|
27
|
-
targetDate.add(isSaturday ? 2 : 1, 'days');
|
|
28
|
-
}
|
|
29
|
-
else {
|
|
30
|
-
targetDate.subtract(isSaturday ? 1 : 2, 'days');
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
else if (schedule.frequencyDay === 'weekends' && isWeekday) {
|
|
34
|
-
if ((targetDate.date() / 7) < 2) {
|
|
35
|
-
targetDate.isoWeekday(6);
|
|
36
|
-
}
|
|
37
|
-
else {
|
|
38
|
-
targetDate.isoWeekday(0);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
if (taskTime.isAfter(targetDate, 'minute')) {
|
|
42
|
-
return getNextRunTime(targetDate, schedule, taskTime);
|
|
43
|
-
}
|
|
44
|
-
return targetDate;
|
|
45
|
-
};
|
|
46
|
-
const getScheduledReportRunTimes = (schedule, limit = 1, taskTime = (0, moment_1.default)()) => {
|
|
47
|
-
if (!schedule.startDate || !schedule.enabled)
|
|
48
|
-
return [];
|
|
49
|
-
const originalStartDate = moment_1.default.utc(schedule.startDate);
|
|
50
|
-
let startDate = originalStartDate;
|
|
51
|
-
const includeStartDate = taskTime.isSameOrBefore(originalStartDate, 'minute');
|
|
52
|
-
let runTimes = [];
|
|
53
|
-
if (includeStartDate) {
|
|
54
|
-
runTimes = [originalStartDate];
|
|
55
|
-
}
|
|
56
|
-
const [, freq] = schedule.frequency.split('|');
|
|
57
|
-
if (freq === 'once') {
|
|
58
|
-
const nextRunTime = runTimes[0];
|
|
59
|
-
// If this is now beyond the start date, return an empty array
|
|
60
|
-
return taskTime.isAfter(nextRunTime, 'minute') ? [] : runTimes;
|
|
61
|
-
}
|
|
62
|
-
const scheduleRunTimes = Array.from(Array(includeStartDate ? limit - 1 : limit).keys()).map(() => {
|
|
63
|
-
const nextRunTime = getNextRunTime(startDate, schedule, taskTime);
|
|
64
|
-
startDate = nextRunTime.hour(originalStartDate.hour()).minute(originalStartDate.minute());
|
|
65
|
-
return nextRunTime;
|
|
66
|
-
});
|
|
67
|
-
return [...runTimes, ...scheduleRunTimes];
|
|
68
|
-
};
|
|
69
|
-
exports.getScheduledReportRunTimes = getScheduledReportRunTimes;
|
package/dist/cjs/slack.d.ts
DELETED
package/dist/cjs/slack.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
const axios_1 = __importDefault(require("axios"));
|
|
16
|
-
const postMessage = (message) => __awaiter(void 0, void 0, void 0, function* () {
|
|
17
|
-
const url = 'https://hooks.slack.com/services/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';
|
|
18
|
-
const data = {
|
|
19
|
-
text: `[${(process.env.ENV || '').toUpperCase()}][${process.env.AWS_LAMBDA_FUNCTION_NAME}] ${message}`
|
|
20
|
-
};
|
|
21
|
-
const headers = {
|
|
22
|
-
'Content-Type': 'application/json'
|
|
23
|
-
};
|
|
24
|
-
return axios_1.default.post(url, data, { headers });
|
|
25
|
-
});
|
|
26
|
-
exports.default = {
|
|
27
|
-
postMessage
|
|
28
|
-
};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { Account } from './account.js';
|
|
2
|
-
import type { Asset } from './asset.js';
|
|
3
|
-
import type { Automation } from './automation.js';
|
|
4
|
-
import type { Company } from './company.js';
|
|
5
|
-
import type { CreateScraperRunParams, ScraperRun } from './scraperRun.js';
|
|
6
|
-
import type { DataIngest } from './dataIngest.js';
|
|
7
|
-
import type { Entity } from './entity.js';
|
|
8
|
-
import type { Email } from './email.js';
|
|
9
|
-
import type { Invoice } from './invoice.js';
|
|
10
|
-
import type { Log } from './log.js';
|
|
11
|
-
import type { Reading } from './reading.js';
|
|
12
|
-
import type { Report } from './report.js';
|
|
13
|
-
import type { Supplier } from './supplier.js';
|
|
14
|
-
export type { Account, Asset, Automation, Company, CreateScraperRunParams, DataIngest, Email, Entity, Invoice, Log, Reading, Report, ScraperRun, Supplier };
|
|
15
|
-
export interface ETNPagedResponse<T = any> {
|
|
16
|
-
data: T[];
|
|
17
|
-
total: number;
|
|
18
|
-
limit: number;
|
|
19
|
-
skip: number;
|
|
20
|
-
}
|
package/dist/cjs/types/index.js
DELETED
package/dist/cjs/units.d.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
interface Item {
|
|
2
|
-
units?: string | null;
|
|
3
|
-
unit?: string | null;
|
|
4
|
-
factor?: number | null;
|
|
5
|
-
value: number;
|
|
6
|
-
[key: string]: any;
|
|
7
|
-
}
|
|
8
|
-
export declare type AccountType = 'electricity' | 'gas' | 'water' | 'waste' | 'solar' | 'heating' | 'flow' | 'cooling' | 'temperature' | 'oil' | 'other';
|
|
9
|
-
export declare type ETNUnit = 'kwh' | 'kg' | 'm3' | 'lbs' | 'tonnes' | 'wh' | 'mwh' | 'ft3' | 'hcf' | 'm3/h' | 'qty' | 'l' | 'C' | 'mcuf' | 'hcuf' | 'tcuf' | 'ocuf' | 'hm3' | 'tm3' | 'nm3';
|
|
10
|
-
export declare type BaseUnit = 'kwh' | 'm3' | 'C' | 'kg' | 'm3/h' | 'l';
|
|
11
|
-
export declare const accountTypeMap: {
|
|
12
|
-
[key: string]: BaseUnit;
|
|
13
|
-
};
|
|
14
|
-
export declare const accountTypeUnitMap: {
|
|
15
|
-
[key: string]: ETNUnit[];
|
|
16
|
-
};
|
|
17
|
-
export declare const convertItems: (items: Item[], type: AccountType, defaultUnits: ETNUnit | undefined, accountFactor: number | undefined) => any;
|
|
18
|
-
export declare const checkAccountTypeVsUnits: (type: string, unit: string, additionalLog?: number | '') => {
|
|
19
|
-
type: AccountType;
|
|
20
|
-
unit: ETNUnit;
|
|
21
|
-
};
|
|
22
|
-
export {};
|
package/dist/cjs/units.js
DELETED
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.checkAccountTypeVsUnits = exports.convertItems = exports.accountTypeUnitMap = exports.accountTypeMap = void 0;
|
|
4
|
-
exports.accountTypeMap = {
|
|
5
|
-
electricity: 'kwh',
|
|
6
|
-
gas: 'kwh',
|
|
7
|
-
water: 'm3',
|
|
8
|
-
waste: 'kg',
|
|
9
|
-
solar: 'kwh',
|
|
10
|
-
heating: 'kwh',
|
|
11
|
-
flow: 'm3/h',
|
|
12
|
-
cooling: 'kwh',
|
|
13
|
-
temperature: 'C',
|
|
14
|
-
oil: 'l'
|
|
15
|
-
};
|
|
16
|
-
const unitConversionFactors = {
|
|
17
|
-
kwh: {
|
|
18
|
-
kwh: 1,
|
|
19
|
-
mwh: 1000,
|
|
20
|
-
wh: 0.001,
|
|
21
|
-
m3: (39 * 1.02264) / 3.6,
|
|
22
|
-
ft3: (0.0283 * 39 * 1.02264) / 3.6,
|
|
23
|
-
hcf: (2.83 * 39 * 1.02264) / 3.6
|
|
24
|
-
},
|
|
25
|
-
m3: {
|
|
26
|
-
m3: 1,
|
|
27
|
-
l: 0.001
|
|
28
|
-
},
|
|
29
|
-
C: {
|
|
30
|
-
C: 1
|
|
31
|
-
},
|
|
32
|
-
kg: {
|
|
33
|
-
kg: 1,
|
|
34
|
-
lbs: 0.45359237,
|
|
35
|
-
tonnes: 1000
|
|
36
|
-
},
|
|
37
|
-
'm3/h': {
|
|
38
|
-
'm3/h': 1
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
exports.accountTypeUnitMap = {
|
|
42
|
-
electricity: ['kwh', 'mwh', 'wh'],
|
|
43
|
-
gas: ['kwh', 'm3', 'ft3', 'hcf'],
|
|
44
|
-
water: ['m3', 'l'],
|
|
45
|
-
waste: ['kg', 'lbs', 'tonnes'],
|
|
46
|
-
solar: ['kwh', 'mwh', 'wh'],
|
|
47
|
-
heating: ['kwh', 'mwh', 'wh'],
|
|
48
|
-
flow: ['m3/h'],
|
|
49
|
-
cooling: ['kwh', 'mwh', 'wh'],
|
|
50
|
-
temperature: ['C'],
|
|
51
|
-
oil: ['l']
|
|
52
|
-
};
|
|
53
|
-
// Convert units to base format
|
|
54
|
-
const convertItems = (items, type, defaultUnits, accountFactor) => {
|
|
55
|
-
if (!type)
|
|
56
|
-
throw new Error('Account type is required');
|
|
57
|
-
const baseUnit = exports.accountTypeMap[type];
|
|
58
|
-
if (!baseUnit)
|
|
59
|
-
throw new Error(`Account type ${type} is not supported`);
|
|
60
|
-
const convertedItems = items.map(item => {
|
|
61
|
-
const factor = item.factor || accountFactor || 1;
|
|
62
|
-
const units = item.units || item.unit || defaultUnits || baseUnit;
|
|
63
|
-
const convertedValue = item.value * _getConversionFactor(units, baseUnit) * factor;
|
|
64
|
-
return Object.assign(Object.assign({}, item), { value: convertedValue, units: baseUnit });
|
|
65
|
-
});
|
|
66
|
-
return convertedItems;
|
|
67
|
-
};
|
|
68
|
-
exports.convertItems = convertItems;
|
|
69
|
-
const _getConversionFactor = (fromUnit = 'kwh', toUnit) => {
|
|
70
|
-
const conversionFactors = unitConversionFactors[toUnit];
|
|
71
|
-
if (!conversionFactors) {
|
|
72
|
-
throw new Error(`Conversion factor base unit ${toUnit} is not defined`);
|
|
73
|
-
}
|
|
74
|
-
if (!conversionFactors[fromUnit]) {
|
|
75
|
-
throw new Error(`Conversion factor from unit ${fromUnit} is not defined`);
|
|
76
|
-
}
|
|
77
|
-
return conversionFactors[fromUnit];
|
|
78
|
-
};
|
|
79
|
-
const checkAccountTypeVsUnits = (type, unit, additionalLog = '') => {
|
|
80
|
-
if (!type)
|
|
81
|
-
throw new Error('Account type is required');
|
|
82
|
-
if (!unit)
|
|
83
|
-
throw new Error('Unit is required');
|
|
84
|
-
const parsedType = type.toLowerCase().trim();
|
|
85
|
-
const accountTypeUnits = exports.accountTypeUnitMap[parsedType];
|
|
86
|
-
if (!accountTypeUnits)
|
|
87
|
-
throw new Error(`Account type "${parsedType}" is not supported ${additionalLog}`);
|
|
88
|
-
const parsedUnit = unit.toLowerCase().trim();
|
|
89
|
-
if (!accountTypeUnits.includes(parsedUnit)) {
|
|
90
|
-
throw new Error(`Account type "${parsedType}" does not support unit "${parsedUnit}" ${additionalLog}`);
|
|
91
|
-
}
|
|
92
|
-
return { type: parsedType, unit: parsedUnit };
|
|
93
|
-
};
|
|
94
|
-
exports.checkAccountTypeVsUnits = checkAccountTypeVsUnits;
|
package/dist/mjs/api.d.ts
DELETED
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
import type { AxiosRequestConfig, AxiosInstance, CreateAxiosDefaults } from 'axios';
|
|
2
|
-
import type { Account, Asset, Automation, Entity, Company, DataIngest, Invoice, Log, Reading, Report, Supplier } from './types/index.js';
|
|
3
|
-
export interface ETNPagedResponse<T = any> {
|
|
4
|
-
data: T[];
|
|
5
|
-
total: number;
|
|
6
|
-
limit: number;
|
|
7
|
-
skip: number;
|
|
8
|
-
}
|
|
9
|
-
export interface ETNReq {
|
|
10
|
-
method: string;
|
|
11
|
-
url: string;
|
|
12
|
-
}
|
|
13
|
-
interface AuthOptions {
|
|
14
|
-
key?: string;
|
|
15
|
-
token?: string;
|
|
16
|
-
}
|
|
17
|
-
declare const _default: (auth: AuthOptions, instanceOptions?: CreateAxiosDefaults) => {
|
|
18
|
-
instance: AxiosInstance;
|
|
19
|
-
getAccount: (id: string, options?: AxiosRequestConfig<any>) => Promise<Account>;
|
|
20
|
-
listAccounts: (options?: AxiosRequestConfig<any>) => Promise<ETNPagedResponse<Account>>;
|
|
21
|
-
updateAccount: (id: string, data: any, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
22
|
-
createAccount: (data: any, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
23
|
-
removeAccount: (id: string, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
24
|
-
getAccountSchema: (options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
25
|
-
invalidateAccountCache: (id: string, data: any, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
26
|
-
getAsset: (id: string, options?: AxiosRequestConfig<any>) => Promise<Asset>;
|
|
27
|
-
listAssets: (options?: AxiosRequestConfig<any>) => Promise<ETNPagedResponse<Asset>>;
|
|
28
|
-
updateAsset: (id: string, data: any, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
29
|
-
createAsset: (data: any, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
30
|
-
removeAsset: (id: string, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
31
|
-
getAssetSchema: (options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
32
|
-
getAssetGroup: (id: string, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
33
|
-
listAssetGroups: (options?: AxiosRequestConfig<any>) => Promise<ETNPagedResponse<any>>;
|
|
34
|
-
updateAssetGroup: (id: string, data: any, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
35
|
-
createAssetGroup: (data: any, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
36
|
-
removeAssetGroup: (id: string, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
37
|
-
getAssetGroupAssets: (id: string, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
38
|
-
getAssetGroupSchema: (options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
39
|
-
getAutomation: (id: string, options?: AxiosRequestConfig<any>) => Promise<Automation>;
|
|
40
|
-
listAutomations: (options?: AxiosRequestConfig<any>) => Promise<ETNPagedResponse<Automation>>;
|
|
41
|
-
updateAutomation: (id: string, data: any, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
42
|
-
createAutomation: (data: any, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
43
|
-
removeAutomation: (id: string, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
44
|
-
createAutomationLog: (id: string, data: any, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
45
|
-
updateAutomationLog: (id: string, subId: string, data: any, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
46
|
-
removeAutomationLog: (id: string, subId: string, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
47
|
-
getCompany: (id: string, options?: AxiosRequestConfig<any>) => Promise<Company>;
|
|
48
|
-
getConsumption: (id: string, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
49
|
-
listConsumptions: (options?: AxiosRequestConfig<any>) => Promise<ETNPagedResponse<any>>;
|
|
50
|
-
updateConsumption: (id: string, data: any, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
51
|
-
createConsumption: (data: any, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
52
|
-
removeConsumption: (id: string, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
53
|
-
getConsumptionSchema: (options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
54
|
-
getEmail: (id: string, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
55
|
-
listEmails: (options?: AxiosRequestConfig<any>) => Promise<ETNPagedResponse<any>>;
|
|
56
|
-
updateEmail: (id: string, data: any, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
57
|
-
createEmail: (data: any, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
58
|
-
removeEmail: (id: string, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
59
|
-
getEmissionFactor: (id: string, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
60
|
-
listEmissionFactors: (options?: AxiosRequestConfig<any>) => Promise<ETNPagedResponse<any>>;
|
|
61
|
-
updateEmissionFactor: (id: string, data: any, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
62
|
-
createEmissionFactor: (data: any, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
63
|
-
removeEmissionFactor: (id: string, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
64
|
-
getEntity: (id: string, options?: AxiosRequestConfig<any>) => Promise<Entity>;
|
|
65
|
-
listEntities: (options?: AxiosRequestConfig<any>) => Promise<ETNPagedResponse<Entity>>;
|
|
66
|
-
updateEntity: (id: string, data: any, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
67
|
-
createEntity: (data: any, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
68
|
-
removeEntity: (id: string, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
69
|
-
getEntitiesSchema: (options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
70
|
-
getLog: (id: string, options?: AxiosRequestConfig<any>) => Promise<Log>;
|
|
71
|
-
listLogs: (options?: AxiosRequestConfig<any>) => Promise<ETNPagedResponse<Log>>;
|
|
72
|
-
updateLog: (id: string, data: any, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
73
|
-
createLog: (data: any, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
74
|
-
removeLog: (id: string, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
75
|
-
getReading: (id: string, options?: AxiosRequestConfig<any>) => Promise<Reading>;
|
|
76
|
-
listReadings: (options?: AxiosRequestConfig<any>) => Promise<ETNPagedResponse<Reading>>;
|
|
77
|
-
updateReading: (id: string, data: any, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
78
|
-
createReading: (data: any, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
79
|
-
removeReading: (id: string, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
80
|
-
getReadingSchema: (options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
81
|
-
getReport: (id: string, options?: AxiosRequestConfig<any>) => Promise<Report>;
|
|
82
|
-
listReports: (options?: AxiosRequestConfig<any>) => Promise<ETNPagedResponse<Report>>;
|
|
83
|
-
updateReport: (id: string, data: any, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
84
|
-
createReport: (data: any, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
85
|
-
removeReport: (id: string, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
86
|
-
sendReport: (id: string, data: any, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
87
|
-
getReportTemplate: (id: string, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
88
|
-
listReportTemplates: (options?: AxiosRequestConfig<any>) => Promise<ETNPagedResponse<any>>;
|
|
89
|
-
updateReportTemplate: (id: string, data: any, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
90
|
-
createReportTemplate: (data: any, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
91
|
-
removeReportTemplate: (id: string, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
92
|
-
getScheduledReport: (id: string, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
93
|
-
listScheduledReports: (options?: AxiosRequestConfig<any>) => Promise<ETNPagedResponse<any>>;
|
|
94
|
-
updateScheduledReport: (id: string, data: any, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
95
|
-
createScheduledReport: (data: any, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
96
|
-
removeScheduledReport: (id: string, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
97
|
-
sendScheduledReport: (id: string, data: any, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
98
|
-
getInvoice: (id: string, options?: AxiosRequestConfig<any>) => Promise<Invoice>;
|
|
99
|
-
listInvoices: (options?: AxiosRequestConfig<any>) => Promise<ETNPagedResponse<Invoice>>;
|
|
100
|
-
updateInvoice: (id: string, data: any, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
101
|
-
createInvoice: (data: any, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
102
|
-
removeInvoice: (id: string, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
103
|
-
getInvoiceSchema: (options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
104
|
-
listSuppliers: (options?: AxiosRequestConfig<any>) => Promise<ETNPagedResponse<Supplier>>;
|
|
105
|
-
getSupplierSchema: (options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
106
|
-
getImportTemplate: (id: string, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
107
|
-
updateDataIngest: (id: string, data: any, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
108
|
-
createDataIngest: (data: any, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
109
|
-
listDataIngest: (options?: AxiosRequestConfig<any>) => Promise<ETNPagedResponse<DataIngest>>;
|
|
110
|
-
};
|
|
111
|
-
export default _default;
|