@etainabl/nodejs-sdk 1.2.38 → 1.2.40

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/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@etainabl/nodejs-sdk",
3
- "version": "1.2.38",
3
+ "version": "1.2.40",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/mjs/index.js",
6
6
  "types": "dist/mjs/index.d.ts",
7
7
  "author": "Jonathan Lambert <jonathan@etainabl.com>",
8
8
  "type": "module",
9
9
  "dependencies": {
10
- "axios": "^1.4.0",
10
+ "axios": "^1.8.4",
11
11
  "moment": "^2.29.4",
12
12
  "mongodb": "^6.3.0",
13
13
  "winston": "^3.10.0"
@@ -16,6 +16,7 @@ interface LastCollection {
16
16
  type FrequencyType = 'never' | 'trigger' | 'hourly' | 'daily' | 'weekly' | 'monthly';
17
17
 
18
18
  export interface Automation {
19
+ _id: string;
19
20
  description?: string;
20
21
  service: string;
21
22
  source: string;
@@ -36,7 +36,7 @@ interface CompanySettings {
36
36
  }
37
37
 
38
38
  export interface Company {
39
- _id: string
39
+ _id: string;
40
40
  name: string;
41
41
  address?: Address;
42
42
  invoiceEmail?: string;
@@ -1,4 +1,5 @@
1
1
  export interface DataIngest {
2
+ _id: string;
2
3
  messageId: string;
3
4
  status: 'started' | 'processing' | 'importing' | 'completed' | 'failed' | 'dlq'
4
5
  context: any;
@@ -4,6 +4,7 @@ interface Attachment {
4
4
  }
5
5
 
6
6
  export interface Email {
7
+ _id: string;
7
8
  destinations: string[];
8
9
  service: string;
9
10
  subject: string;
@@ -3,7 +3,7 @@ import { Address } from './address.js';
3
3
  type EntityType = 'fund' | 'company' | 'charity' | 'school/university' | 'council' | 'other';
4
4
 
5
5
  export interface Entity {
6
- _id?: string;
6
+ _id: string;
7
7
  legalName: string;
8
8
  type: EntityType;
9
9
  companyNumber?: string;
@@ -77,12 +77,13 @@ type InvoiceStatus = 'processing' | 'pending' | 'uploading' | 'queued' | 'captur
77
77
  type FinancialStatus = 'approved' | 'new' | 'not-approved' | 'paid' | 'sent-for-payment';
78
78
  type RateType = 'unitRate' | 'daily' | 'levy' | 'tax' | 'kva' | 'waterRate' | 'wasteRate' | 'discount'
79
79
  export interface Invoice {
80
+ _id: string;
80
81
  jobId?: string | null;
81
82
  startTime?: Date;
82
83
  endTime?: Date | null;
83
84
  s3Key: string;
84
85
  s3TextractKey?: string | null;
85
- stampedS3Key: string;
86
+ stampedS3Key: string | null;
86
87
  fileName?: string | null;
87
88
  status: InvoiceStatus;
88
89
  financialStatus: FinancialStatus;
package/src/types/log.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export interface Log {
2
+ _id: string;
2
3
  message: string
3
4
  context?: {}
4
5
  linkedId?: string
@@ -1,4 +1,5 @@
1
1
  export interface Reading {
2
+ _id: string;
2
3
  submittedAt: Date;
3
4
  value: number;
4
5
  type?: string;
@@ -1,4 +1,5 @@
1
1
  export interface Report {
2
+ _id: string;
2
3
  type: 'dynamic' | 'spreadsheet' | 'table' | 'pdf';
3
4
  subType?: string;
4
5
  fileFormat: 'pdf' | 'xlsx' | 'csv' | 'png' | 'jpg' | 'chart';