@etainabl/nodejs-sdk 1.2.17 → 1.2.18

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 CHANGED
@@ -95,5 +95,8 @@ declare const _default: (auth: AuthOptions, instanceOptions?: CreateAxiosDefault
95
95
  removeInvoice: (id: string, options?: AxiosRequestConfig<any>) => Promise<any>;
96
96
  getInvoiceSchema: (options?: AxiosRequestConfig<any>) => Promise<any>;
97
97
  getSupplierSchema: (options?: AxiosRequestConfig<any>) => Promise<Supplier>;
98
+ updateDataIngest: (id: string, data: any, options?: AxiosRequestConfig<any>) => Promise<any>;
99
+ createDataIngest: (data: any, options?: AxiosRequestConfig<any>) => Promise<any>;
100
+ listDataIngest: (options?: AxiosRequestConfig<any>) => Promise<ETNPagedResponse<DataIngest>>;
98
101
  };
99
102
  export default _default;
package/dist/cjs/api.js CHANGED
@@ -293,7 +293,11 @@ exports.default = (auth, instanceOptions = {}) => {
293
293
  removeInvoice: factory.remove(etainablApi, 'invoices'),
294
294
  getInvoiceSchema: factory.get(etainablApi, 'invoices', 'schema'),
295
295
  //suppliers
296
- getSupplierSchema: factory.get(etainablApi, 'suppliers', 'schema')
296
+ getSupplierSchema: factory.get(etainablApi, 'suppliers', 'schema'),
297
+ //data imports
298
+ updateDataIngest: factory.update(etainablApi, 'data-ingests'),
299
+ createDataIngest: factory.create(etainablApi, 'data-ingests'),
300
+ listDataIngest: factory.list(etainablApi, 'data-ingests'),
297
301
  };
298
302
  }
299
303
  catch (e) {
@@ -6,6 +6,6 @@ import * as units from './units.js';
6
6
  import * as consumption from './consumption.js';
7
7
  import * as monitoring from './monitoring.js';
8
8
  import * as reporting from './reporting.js';
9
- import type { Account, Asset, Automation, Company, Invoice, Log, Reading, Supplier } from '../types/index.d.js';
9
+ import type { Account, Asset, Automation, Company, DataIngest, Invoice, Log, Reading, Supplier } from '../types/index.d.js';
10
10
  export { api, logger, consumption, monitoring, db, slack, units, reporting };
11
- export type { Account, Asset, Automation, Company, Invoice, Log, Reading, Supplier };
11
+ export type { Account, Asset, Automation, Company, DataIngest, Invoice, Log, Reading, Supplier };
package/dist/mjs/api.d.ts CHANGED
@@ -95,5 +95,8 @@ declare const _default: (auth: AuthOptions, instanceOptions?: CreateAxiosDefault
95
95
  removeInvoice: (id: string, options?: AxiosRequestConfig<any>) => Promise<any>;
96
96
  getInvoiceSchema: (options?: AxiosRequestConfig<any>) => Promise<any>;
97
97
  getSupplierSchema: (options?: AxiosRequestConfig<any>) => Promise<Supplier>;
98
+ updateDataIngest: (id: string, data: any, options?: AxiosRequestConfig<any>) => Promise<any>;
99
+ createDataIngest: (data: any, options?: AxiosRequestConfig<any>) => Promise<any>;
100
+ listDataIngest: (options?: AxiosRequestConfig<any>) => Promise<ETNPagedResponse<DataIngest>>;
98
101
  };
99
102
  export default _default;
package/dist/mjs/api.js CHANGED
@@ -283,7 +283,11 @@ export default (auth, instanceOptions = {}) => {
283
283
  removeInvoice: factory.remove(etainablApi, 'invoices'),
284
284
  getInvoiceSchema: factory.get(etainablApi, 'invoices', 'schema'),
285
285
  //suppliers
286
- getSupplierSchema: factory.get(etainablApi, 'suppliers', 'schema')
286
+ getSupplierSchema: factory.get(etainablApi, 'suppliers', 'schema'),
287
+ //data imports
288
+ updateDataIngest: factory.update(etainablApi, 'data-ingests'),
289
+ createDataIngest: factory.create(etainablApi, 'data-ingests'),
290
+ listDataIngest: factory.list(etainablApi, 'data-ingests'),
287
291
  };
288
292
  }
289
293
  catch (e) {
@@ -6,6 +6,6 @@ import * as units from './units.js';
6
6
  import * as consumption from './consumption.js';
7
7
  import * as monitoring from './monitoring.js';
8
8
  import * as reporting from './reporting.js';
9
- import type { Account, Asset, Automation, Company, Invoice, Log, Reading, Supplier } from '../types/index.d.js';
9
+ import type { Account, Asset, Automation, Company, DataIngest, Invoice, Log, Reading, Supplier } from '../types/index.d.js';
10
10
  export { api, logger, consumption, monitoring, db, slack, units, reporting };
11
- export type { Account, Asset, Automation, Company, Invoice, Log, Reading, Supplier };
11
+ export type { Account, Asset, Automation, Company, DataIngest, Invoice, Log, Reading, Supplier };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etainabl/nodejs-sdk",
3
- "version": "1.2.17",
3
+ "version": "1.2.18",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/mjs/index.js",
6
6
  "author": "Jonathan Lambert <jonathan@etainabl.com>",
package/src/api.ts CHANGED
@@ -4,7 +4,7 @@ import https from 'https';
4
4
 
5
5
  import logger from './logger.js';
6
6
 
7
- import type { Account, Asset, Automation, Company, Invoice, Log, Reading, Supplier } from '../types/index.js'
7
+ import type { Account, Asset, Automation, Company, DataIngest, Invoice, Log, Reading, Supplier } from '../types/index.js'
8
8
 
9
9
  const log = logger('etainablApi');
10
10
 
@@ -353,7 +353,12 @@ export default (auth: AuthOptions, instanceOptions: CreateAxiosDefaults = {}) =>
353
353
  getInvoiceSchema: factory.get(etainablApi, 'invoices', 'schema'),
354
354
 
355
355
  //suppliers
356
- getSupplierSchema: factory.get<Supplier>(etainablApi, 'suppliers', 'schema')
356
+ getSupplierSchema: factory.get<Supplier>(etainablApi, 'suppliers', 'schema'),
357
+
358
+ //data imports
359
+ updateDataIngest: factory.update(etainablApi, 'data-ingests'),
360
+ createDataIngest: factory.create(etainablApi, 'data-ingests'),
361
+ listDataIngest: factory.list<DataIngest>(etainablApi, 'data-ingests'),
357
362
 
358
363
  }
359
364
  } catch (e) {
package/src/index.ts CHANGED
@@ -6,7 +6,7 @@ import * as units from './units.js';
6
6
  import * as consumption from './consumption.js';
7
7
  import * as monitoring from './monitoring.js';
8
8
  import * as reporting from './reporting.js';
9
- import type { Account, Asset, Automation, Company, Invoice, Log, Reading, Supplier } from '../types/index.d.js';
9
+ import type { Account, Asset, Automation, Company, DataIngest, Invoice, Log, Reading, Supplier } from '../types/index.d.js';
10
10
 
11
11
  export {
12
12
  api,
@@ -19,4 +19,4 @@ export {
19
19
  reporting
20
20
  }
21
21
 
22
- export type { Account, Asset, Automation, Company, Invoice, Log, Reading, Supplier };
22
+ export type { Account, Asset, Automation, Company, DataIngest, Invoice, Log, Reading, Supplier };
@@ -0,0 +1,8 @@
1
+ export interface DataImport {
2
+ messageId: string;
3
+ status: 'started' | 'processing' | 'importing' | 'completed' | 'failed' | 'dlq'
4
+ context: string
5
+ startTime: string;
6
+ remainingTime: number;
7
+ context: {}
8
+ }
package/types/index.d.ts CHANGED
@@ -2,6 +2,7 @@ import type { Account } from './account.d.ts'
2
2
  import type { Asset } from './asset.d.ts'
3
3
  import type { Company } from './company.d.ts'
4
4
  import type { CreateScraperRunParams, ScraperRun } from './scraperRun.d.ts';
5
+ import type { DataIngest } from './dataIngest.js'
5
6
  import type { Email } from './email.d.ts';
6
7
  import type { Invoice } from './invoice.d.ts';
7
8
  import type { Log } from './log.d.ts';
@@ -14,6 +15,7 @@ export type {
14
15
  Automation,
15
16
  Company,
16
17
  CreateScraperRunParams,
18
+ DataIngest,
17
19
  Email,
18
20
  Invoice,
19
21
  Log,