@etainabl/nodejs-sdk 1.2.33 → 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.
Files changed (49) hide show
  1. package/dist/cjs/index.js +11 -17
  2. package/package.json +3 -2
  3. package/src/api.ts +1 -0
  4. package/src/index.ts +1 -2
  5. package/dist/cjs/api.d.ts +0 -110
  6. package/dist/cjs/api.js +0 -317
  7. package/dist/cjs/consumption.d.ts +0 -14
  8. package/dist/cjs/consumption.js +0 -32
  9. package/dist/cjs/db.d.ts +0 -6
  10. package/dist/cjs/db.js +0 -69
  11. package/dist/cjs/etainabl.d.ts +0 -10
  12. package/dist/cjs/etainabl.js +0 -2
  13. package/dist/cjs/index.d.ts +0 -11
  14. package/dist/cjs/logger.d.ts +0 -3
  15. package/dist/cjs/logger.js +0 -14
  16. package/dist/cjs/monitoring.d.ts +0 -1
  17. package/dist/cjs/monitoring.js +0 -31
  18. package/dist/cjs/package.json +0 -3
  19. package/dist/cjs/reporting.d.ts +0 -2
  20. package/dist/cjs/reporting.js +0 -69
  21. package/dist/cjs/slack.d.ts +0 -4
  22. package/dist/cjs/slack.js +0 -28
  23. package/dist/cjs/types/index.d.ts +0 -20
  24. package/dist/cjs/types/index.js +0 -2
  25. package/dist/cjs/units.d.ts +0 -22
  26. package/dist/cjs/units.js +0 -94
  27. package/dist/mjs/api.d.ts +0 -110
  28. package/dist/mjs/api.js +0 -307
  29. package/dist/mjs/consumption.d.ts +0 -14
  30. package/dist/mjs/consumption.js +0 -22
  31. package/dist/mjs/db.d.ts +0 -6
  32. package/dist/mjs/db.js +0 -53
  33. package/dist/mjs/etainabl.d.ts +0 -10
  34. package/dist/mjs/etainabl.js +0 -1
  35. package/dist/mjs/index.d.ts +0 -11
  36. package/dist/mjs/index.js +0 -9
  37. package/dist/mjs/logger.d.ts +0 -3
  38. package/dist/mjs/logger.js +0 -9
  39. package/dist/mjs/monitoring.d.ts +0 -1
  40. package/dist/mjs/monitoring.js +0 -15
  41. package/dist/mjs/package.json +0 -3
  42. package/dist/mjs/reporting.d.ts +0 -2
  43. package/dist/mjs/reporting.js +0 -62
  44. package/dist/mjs/slack.d.ts +0 -4
  45. package/dist/mjs/slack.js +0 -14
  46. package/dist/mjs/types/index.d.ts +0 -20
  47. package/dist/mjs/types/index.js +0 -1
  48. package/dist/mjs/units.d.ts +0 -22
  49. package/dist/mjs/units.js +0 -89
@@ -1,11 +0,0 @@
1
- import api from './api.js';
2
- import logger from './logger.js';
3
- import db from './db.js';
4
- import slack from './slack.js';
5
- import * as units from './units.js';
6
- import * as consumption from './consumption.js';
7
- import * as monitoring from './monitoring.js';
8
- import * as reporting from './reporting.js';
9
- import type { Account, Asset, Automation, Company, DataIngest, Invoice, Log, Reading, Supplier } from './types/index.js';
10
- export { api, logger, consumption, monitoring, db, slack, units, reporting };
11
- export type { Account, Asset, Automation, Company, DataIngest, Invoice, Log, Reading, Supplier };
@@ -1,3 +0,0 @@
1
- import winston from 'winston';
2
- declare const _default: (namespace: string) => winston.Logger;
3
- export default _default;
@@ -1,14 +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
- const winston_1 = __importDefault(require("winston"));
7
- exports.default = (namespace) => winston_1.default.createLogger({
8
- level: 'debug',
9
- format: winston_1.default.format.combine(winston_1.default.format.timestamp(), winston_1.default.format.json()),
10
- defaultMeta: { service: process.env.AWS_LAMBDA_FUNCTION_NAME, script: namespace },
11
- transports: [
12
- new winston_1.default.transports.Console()
13
- ]
14
- });
@@ -1 +0,0 @@
1
- export declare const sendHeartbeat: () => Promise<boolean>;
@@ -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;
@@ -1,3 +0,0 @@
1
- {
2
- "type": "commonjs"
3
- }
@@ -1,2 +0,0 @@
1
- import moment from 'moment';
2
- export declare const getScheduledReportRunTimes: (schedule: any, limit?: number, taskTime?: moment.Moment) => moment.Moment[];
@@ -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;
@@ -1,4 +0,0 @@
1
- declare const _default: {
2
- postMessage: (message: string) => Promise<import("axios").AxiosResponse<any, any>>;
3
- };
4
- export default _default;
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
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -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 type AccountType = 'electricity' | 'gas' | 'water' | 'waste' | 'solar' | 'heating' | 'flow' | 'cooling' | 'temperature' | 'oil' | 'other';
9
- export 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 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,110 +0,0 @@
1
- import type { AxiosRequestConfig, AxiosInstance, CreateAxiosDefaults } from 'axios';
2
- import type { Account, Asset, Automation, Entity, Company, DataIngest, Invoice, Log, Reading, Report } 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) => Promise<Account>;
20
- listAccounts: (options?: AxiosRequestConfig) => Promise<ETNPagedResponse<Account>>;
21
- updateAccount: (id: string, data: any, options?: AxiosRequestConfig) => Promise<any>;
22
- createAccount: (data: any, options?: AxiosRequestConfig) => Promise<any>;
23
- removeAccount: (id: string, options?: AxiosRequestConfig) => Promise<any>;
24
- getAccountSchema: (options?: AxiosRequestConfig) => Promise<any>;
25
- invalidateAccountCache: (id: string, data: any, options?: AxiosRequestConfig) => Promise<any>;
26
- getAsset: (id: string, options?: AxiosRequestConfig) => Promise<Asset>;
27
- listAssets: (options?: AxiosRequestConfig) => Promise<ETNPagedResponse<Asset>>;
28
- updateAsset: (id: string, data: any, options?: AxiosRequestConfig) => Promise<any>;
29
- createAsset: (data: any, options?: AxiosRequestConfig) => Promise<any>;
30
- removeAsset: (id: string, options?: AxiosRequestConfig) => Promise<any>;
31
- getAssetSchema: (options?: AxiosRequestConfig) => Promise<any>;
32
- getAssetGroup: (id: string, options?: AxiosRequestConfig) => Promise<any>;
33
- listAssetGroups: (options?: AxiosRequestConfig) => Promise<ETNPagedResponse<any>>;
34
- updateAssetGroup: (id: string, data: any, options?: AxiosRequestConfig) => Promise<any>;
35
- createAssetGroup: (data: any, options?: AxiosRequestConfig) => Promise<any>;
36
- removeAssetGroup: (id: string, options?: AxiosRequestConfig) => Promise<any>;
37
- getAssetGroupAssets: (id: string, options?: AxiosRequestConfig) => Promise<any>;
38
- getAssetGroupSchema: (options?: AxiosRequestConfig) => Promise<any>;
39
- getAutomation: (id: string, options?: AxiosRequestConfig) => Promise<Automation>;
40
- listAutomations: (options?: AxiosRequestConfig) => Promise<ETNPagedResponse<Automation>>;
41
- updateAutomation: (id: string, data: any, options?: AxiosRequestConfig) => Promise<any>;
42
- createAutomation: (data: any, options?: AxiosRequestConfig) => Promise<any>;
43
- removeAutomation: (id: string, options?: AxiosRequestConfig) => Promise<any>;
44
- createAutomationLog: (id: string, data: any, options?: AxiosRequestConfig) => Promise<any>;
45
- updateAutomationLog: (id: string, subId: string, data: any, options?: AxiosRequestConfig) => Promise<any>;
46
- removeAutomationLog: (id: string, subId: string, options?: AxiosRequestConfig) => Promise<any>;
47
- getCompany: (id: string, options?: AxiosRequestConfig) => Promise<Company>;
48
- getConsumption: (id: string, options?: AxiosRequestConfig) => Promise<any>;
49
- listConsumptions: (options?: AxiosRequestConfig) => Promise<ETNPagedResponse<any>>;
50
- updateConsumption: (id: string, data: any, options?: AxiosRequestConfig) => Promise<any>;
51
- createConsumption: (data: any, options?: AxiosRequestConfig) => Promise<any>;
52
- removeConsumption: (id: string, options?: AxiosRequestConfig) => Promise<any>;
53
- getConsumptionSchema: (options?: AxiosRequestConfig) => Promise<any>;
54
- getEmail: (id: string, options?: AxiosRequestConfig) => Promise<any>;
55
- listEmails: (options?: AxiosRequestConfig) => Promise<ETNPagedResponse<any>>;
56
- updateEmail: (id: string, data: any, options?: AxiosRequestConfig) => Promise<any>;
57
- createEmail: (data: any, options?: AxiosRequestConfig) => Promise<any>;
58
- removeEmail: (id: string, options?: AxiosRequestConfig) => Promise<any>;
59
- getEmissionFactor: (id: string, options?: AxiosRequestConfig) => Promise<any>;
60
- listEmissionFactors: (options?: AxiosRequestConfig) => Promise<ETNPagedResponse<any>>;
61
- updateEmissionFactor: (id: string, data: any, options?: AxiosRequestConfig) => Promise<any>;
62
- createEmissionFactor: (data: any, options?: AxiosRequestConfig) => Promise<any>;
63
- removeEmissionFactor: (id: string, options?: AxiosRequestConfig) => Promise<any>;
64
- getEntity: (id: string, options?: AxiosRequestConfig) => Promise<Entity>;
65
- listEntities: (options?: AxiosRequestConfig) => Promise<ETNPagedResponse<Entity>>;
66
- updateEntity: (id: string, data: any, options?: AxiosRequestConfig) => Promise<any>;
67
- createEntity: (data: any, options?: AxiosRequestConfig) => Promise<any>;
68
- removeEntity: (id: string, options?: AxiosRequestConfig) => Promise<any>;
69
- getEntitiesSchema: (options?: AxiosRequestConfig) => Promise<any>;
70
- getLog: (id: string, options?: AxiosRequestConfig) => Promise<Log>;
71
- listLogs: (options?: AxiosRequestConfig) => Promise<ETNPagedResponse<Log>>;
72
- updateLog: (id: string, data: any, options?: AxiosRequestConfig) => Promise<any>;
73
- createLog: (data: any, options?: AxiosRequestConfig) => Promise<any>;
74
- removeLog: (id: string, options?: AxiosRequestConfig) => Promise<any>;
75
- getReading: (id: string, options?: AxiosRequestConfig) => Promise<Reading>;
76
- listReadings: (options?: AxiosRequestConfig) => Promise<ETNPagedResponse<Reading>>;
77
- updateReading: (id: string, data: any, options?: AxiosRequestConfig) => Promise<any>;
78
- createReading: (data: any, options?: AxiosRequestConfig) => Promise<any>;
79
- removeReading: (id: string, options?: AxiosRequestConfig) => Promise<any>;
80
- getReadingSchema: (options?: AxiosRequestConfig) => Promise<any>;
81
- getReport: (id: string, options?: AxiosRequestConfig) => Promise<Report>;
82
- listReports: (options?: AxiosRequestConfig) => Promise<ETNPagedResponse<Report>>;
83
- updateReport: (id: string, data: any, options?: AxiosRequestConfig) => Promise<any>;
84
- createReport: (data: any, options?: AxiosRequestConfig) => Promise<any>;
85
- removeReport: (id: string, options?: AxiosRequestConfig) => Promise<any>;
86
- sendReport: (id: string, data: any, options?: AxiosRequestConfig) => Promise<any>;
87
- getReportTemplate: (id: string, options?: AxiosRequestConfig) => Promise<any>;
88
- listReportTemplates: (options?: AxiosRequestConfig) => Promise<ETNPagedResponse<any>>;
89
- updateReportTemplate: (id: string, data: any, options?: AxiosRequestConfig) => Promise<any>;
90
- createReportTemplate: (data: any, options?: AxiosRequestConfig) => Promise<any>;
91
- removeReportTemplate: (id: string, options?: AxiosRequestConfig) => Promise<any>;
92
- getScheduledReport: (id: string, options?: AxiosRequestConfig) => Promise<any>;
93
- listScheduledReports: (options?: AxiosRequestConfig) => Promise<ETNPagedResponse<any>>;
94
- updateScheduledReport: (id: string, data: any, options?: AxiosRequestConfig) => Promise<any>;
95
- createScheduledReport: (data: any, options?: AxiosRequestConfig) => Promise<any>;
96
- removeScheduledReport: (id: string, options?: AxiosRequestConfig) => Promise<any>;
97
- sendScheduledReport: (id: string, data: any, options?: AxiosRequestConfig) => Promise<any>;
98
- getInvoice: (id: string, options?: AxiosRequestConfig) => Promise<Invoice>;
99
- listInvoices: (options?: AxiosRequestConfig) => Promise<ETNPagedResponse<Invoice>>;
100
- updateInvoice: (id: string, data: any, options?: AxiosRequestConfig) => Promise<any>;
101
- createInvoice: (data: any, options?: AxiosRequestConfig) => Promise<any>;
102
- removeInvoice: (id: string, options?: AxiosRequestConfig) => Promise<any>;
103
- getInvoiceSchema: (options?: AxiosRequestConfig) => Promise<any>;
104
- getSupplierSchema: (options?: AxiosRequestConfig) => Promise<any>;
105
- getImportTemplate: (id: string, options?: AxiosRequestConfig) => Promise<any>;
106
- updateDataIngest: (id: string, data: any, options?: AxiosRequestConfig) => Promise<any>;
107
- createDataIngest: (data: any, options?: AxiosRequestConfig) => Promise<any>;
108
- listDataIngest: (options?: AxiosRequestConfig) => Promise<ETNPagedResponse<DataIngest>>;
109
- };
110
- export default _default;