@etainabl/nodejs-sdk 1.2.18 → 1.2.19
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/api.d.ts +2 -2
- package/dist/cjs/api.js +2 -0
- package/dist/cjs/units.d.ts +3 -3
- package/dist/mjs/api.d.ts +2 -2
- package/dist/mjs/api.js +2 -0
- package/dist/mjs/units.d.ts +3 -3
- package/package.json +1 -1
- package/src/api.ts +4 -1
- package/vitest.workspace.js +5 -0
package/dist/cjs/api.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { AxiosRequestConfig, AxiosInstance, CreateAxiosDefaults } from 'axios';
|
|
2
|
-
import type { Account, Asset, Company, Invoice, Log, Reading, Supplier } from '../types/index.js';
|
|
3
2
|
export interface ETNPagedResponse<T = any> {
|
|
4
3
|
data: T[];
|
|
5
4
|
total: number;
|
|
@@ -94,7 +93,8 @@ declare const _default: (auth: AuthOptions, instanceOptions?: CreateAxiosDefault
|
|
|
94
93
|
createInvoice: (data: any, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
95
94
|
removeInvoice: (id: string, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
96
95
|
getInvoiceSchema: (options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
97
|
-
getSupplierSchema: (options?: AxiosRequestConfig<any>) => Promise<
|
|
96
|
+
getSupplierSchema: (options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
97
|
+
getImportTemplate: (id: string, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
98
98
|
updateDataIngest: (id: string, data: any, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
99
99
|
createDataIngest: (data: any, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
100
100
|
listDataIngest: (options?: AxiosRequestConfig<any>) => Promise<ETNPagedResponse<DataIngest>>;
|
package/dist/cjs/api.js
CHANGED
|
@@ -294,6 +294,8 @@ exports.default = (auth, instanceOptions = {}) => {
|
|
|
294
294
|
getInvoiceSchema: factory.get(etainablApi, 'invoices', 'schema'),
|
|
295
295
|
//suppliers
|
|
296
296
|
getSupplierSchema: factory.get(etainablApi, 'suppliers', 'schema'),
|
|
297
|
+
// import templates
|
|
298
|
+
getImportTemplate: factory.getWithId(etainablApi, 'import-templates'),
|
|
297
299
|
//data imports
|
|
298
300
|
updateDataIngest: factory.update(etainablApi, 'data-ingests'),
|
|
299
301
|
createDataIngest: factory.create(etainablApi, 'data-ingests'),
|
package/dist/cjs/units.d.ts
CHANGED
|
@@ -5,9 +5,9 @@ interface Item {
|
|
|
5
5
|
value: number;
|
|
6
6
|
[key: string]: any;
|
|
7
7
|
}
|
|
8
|
-
export type AccountType = 'electricity' | 'gas' | 'water' | 'waste' | 'solar' | 'heating' | 'flow' | 'cooling' | 'temperature' | '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';
|
|
8
|
+
export declare type AccountType = 'electricity' | 'gas' | 'water' | 'waste' | 'solar' | 'heating' | 'flow' | 'cooling' | 'temperature' | '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';
|
|
11
11
|
export declare const accountTypeMap: {
|
|
12
12
|
[key: string]: BaseUnit;
|
|
13
13
|
};
|
package/dist/mjs/api.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { AxiosRequestConfig, AxiosInstance, CreateAxiosDefaults } from 'axios';
|
|
2
|
-
import type { Account, Asset, Company, Invoice, Log, Reading, Supplier } from '../types/index.js';
|
|
3
2
|
export interface ETNPagedResponse<T = any> {
|
|
4
3
|
data: T[];
|
|
5
4
|
total: number;
|
|
@@ -94,7 +93,8 @@ declare const _default: (auth: AuthOptions, instanceOptions?: CreateAxiosDefault
|
|
|
94
93
|
createInvoice: (data: any, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
95
94
|
removeInvoice: (id: string, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
96
95
|
getInvoiceSchema: (options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
97
|
-
getSupplierSchema: (options?: AxiosRequestConfig<any>) => Promise<
|
|
96
|
+
getSupplierSchema: (options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
97
|
+
getImportTemplate: (id: string, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
98
98
|
updateDataIngest: (id: string, data: any, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
99
99
|
createDataIngest: (data: any, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
100
100
|
listDataIngest: (options?: AxiosRequestConfig<any>) => Promise<ETNPagedResponse<DataIngest>>;
|
package/dist/mjs/api.js
CHANGED
|
@@ -284,6 +284,8 @@ export default (auth, instanceOptions = {}) => {
|
|
|
284
284
|
getInvoiceSchema: factory.get(etainablApi, 'invoices', 'schema'),
|
|
285
285
|
//suppliers
|
|
286
286
|
getSupplierSchema: factory.get(etainablApi, 'suppliers', 'schema'),
|
|
287
|
+
// import templates
|
|
288
|
+
getImportTemplate: factory.getWithId(etainablApi, 'import-templates'),
|
|
287
289
|
//data imports
|
|
288
290
|
updateDataIngest: factory.update(etainablApi, 'data-ingests'),
|
|
289
291
|
createDataIngest: factory.create(etainablApi, 'data-ingests'),
|
package/dist/mjs/units.d.ts
CHANGED
|
@@ -5,9 +5,9 @@ interface Item {
|
|
|
5
5
|
value: number;
|
|
6
6
|
[key: string]: any;
|
|
7
7
|
}
|
|
8
|
-
export type AccountType = 'electricity' | 'gas' | 'water' | 'waste' | 'solar' | 'heating' | 'flow' | 'cooling' | 'temperature' | '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';
|
|
8
|
+
export declare type AccountType = 'electricity' | 'gas' | 'water' | 'waste' | 'solar' | 'heating' | 'flow' | 'cooling' | 'temperature' | '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';
|
|
11
11
|
export declare const accountTypeMap: {
|
|
12
12
|
[key: string]: BaseUnit;
|
|
13
13
|
};
|
package/package.json
CHANGED
package/src/api.ts
CHANGED
|
@@ -353,7 +353,10 @@ export default (auth: AuthOptions, instanceOptions: CreateAxiosDefaults = {}) =>
|
|
|
353
353
|
getInvoiceSchema: factory.get(etainablApi, 'invoices', 'schema'),
|
|
354
354
|
|
|
355
355
|
//suppliers
|
|
356
|
-
getSupplierSchema: factory.get
|
|
356
|
+
getSupplierSchema: factory.get(etainablApi, 'suppliers', 'schema'),
|
|
357
|
+
|
|
358
|
+
// import templates
|
|
359
|
+
getImportTemplate: factory.getWithId(etainablApi, 'import-templates'),
|
|
357
360
|
|
|
358
361
|
//data imports
|
|
359
362
|
updateDataIngest: factory.update(etainablApi, 'data-ingests'),
|