@etainabl/nodejs-sdk 1.3.33 → 1.3.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/esm/index.js +12 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.cts +146 -102
- package/dist/index.d.ts +146 -102
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -24,8 +24,8 @@ declare const accountTypeUnitMap: {
|
|
|
24
24
|
[key: string]: ETNUnit[];
|
|
25
25
|
};
|
|
26
26
|
declare const convertItems: (items: Item[], type: AccountType, defaultUnits: ETNUnit | undefined, accountFactor: number | undefined) => any;
|
|
27
|
-
declare const checkAccountTypeVsUnits: (type: string, unit: string, additionalLog?: number |
|
|
28
|
-
type:
|
|
27
|
+
declare const checkAccountTypeVsUnits: (type: string, unit: string, additionalLog?: number | '') => {
|
|
28
|
+
type: UtilityType;
|
|
29
29
|
unit: ETNUnit;
|
|
30
30
|
};
|
|
31
31
|
|
|
@@ -342,6 +342,34 @@ interface Automation<IDType = ObjectId | string> {
|
|
|
342
342
|
companyId: IDType;
|
|
343
343
|
}
|
|
344
344
|
|
|
345
|
+
interface InvoiceValidationRule<IDType = ObjectId | string> {
|
|
346
|
+
_id: IDType;
|
|
347
|
+
key: string;
|
|
348
|
+
name: string;
|
|
349
|
+
description?: string;
|
|
350
|
+
defaultEnabled: boolean;
|
|
351
|
+
defaultThresholds: Record<string, any>;
|
|
352
|
+
defaultStatus: 'pass' | 'warn' | 'fail';
|
|
353
|
+
category: string;
|
|
354
|
+
companyId?: IDType;
|
|
355
|
+
}
|
|
356
|
+
interface InvoiceValidationResults<IDType = ObjectId | string> {
|
|
357
|
+
invoiceValidationRuleId: IDType;
|
|
358
|
+
comment: string;
|
|
359
|
+
status: 'passed' | 'warning' | 'failed' | 'error';
|
|
360
|
+
checkedAt: Date;
|
|
361
|
+
}
|
|
362
|
+
interface InvoiceValidation<IDType = ObjectId | string> {
|
|
363
|
+
_id: IDType;
|
|
364
|
+
status: 'pending' | 'passed' | 'warning' | 'failed' | 'error';
|
|
365
|
+
results: InvoiceValidationResults<IDType>[];
|
|
366
|
+
invoiceCaptureId: IDType;
|
|
367
|
+
invoiceId?: IDType;
|
|
368
|
+
batchId?: string;
|
|
369
|
+
companyId: IDType;
|
|
370
|
+
userSub: string;
|
|
371
|
+
}
|
|
372
|
+
|
|
345
373
|
interface SupplierPortals<IDType = ObjectId | string> {
|
|
346
374
|
supplierId: IDType;
|
|
347
375
|
portal: Portal;
|
|
@@ -357,7 +385,14 @@ interface DefaultSources {
|
|
|
357
385
|
gas: 'invoice' | 'consumption' | 'reading';
|
|
358
386
|
water: 'invoice' | 'consumption' | 'reading';
|
|
359
387
|
}
|
|
360
|
-
interface
|
|
388
|
+
interface InvoiceValidationSettings<IDType = ObjectId | string> {
|
|
389
|
+
enabled: boolean;
|
|
390
|
+
invoiceValidationRuleId: IDType;
|
|
391
|
+
thresholds: Record<string, any>;
|
|
392
|
+
status: 'pass' | 'warn' | 'fail';
|
|
393
|
+
}
|
|
394
|
+
type CompanyInvoiceValidationRule<IDType = ObjectId | string> = InvoiceValidationRule<IDType> & Pick<InvoiceValidationSettings<IDType>, 'enabled' | 'thresholds' | 'status'>;
|
|
395
|
+
interface CompanySettings<IDType = ObjectId | string> {
|
|
361
396
|
showLogo?: boolean;
|
|
362
397
|
invoiceCategories?: any[];
|
|
363
398
|
miscInvoiceCategories?: any[];
|
|
@@ -370,6 +405,8 @@ interface CompanySettings {
|
|
|
370
405
|
supplierPortals?: SupplierPortals[];
|
|
371
406
|
defaultSources?: DefaultSources;
|
|
372
407
|
scraperCounter?: number;
|
|
408
|
+
invoiceValidationSettings?: InvoiceValidationSettings<IDType>;
|
|
409
|
+
autoInvoiceValidation?: boolean;
|
|
373
410
|
}
|
|
374
411
|
interface Company<IDType = ObjectId | string> {
|
|
375
412
|
_id: IDType;
|
|
@@ -377,7 +414,7 @@ interface Company<IDType = ObjectId | string> {
|
|
|
377
414
|
address?: Address;
|
|
378
415
|
invoiceEmail?: string;
|
|
379
416
|
users?: string[];
|
|
380
|
-
settings: CompanySettings
|
|
417
|
+
settings: CompanySettings<IDType>;
|
|
381
418
|
logoS3Key: string;
|
|
382
419
|
logoUrl?: string;
|
|
383
420
|
}
|
|
@@ -725,103 +762,110 @@ interface AuthOptions {
|
|
|
725
762
|
}
|
|
726
763
|
declare const _default$3: (auth: AuthOptions, instanceOptions?: CreateAxiosDefaults) => {
|
|
727
764
|
instance: AxiosInstance;
|
|
728
|
-
getAccount: (id: string, options?: AxiosRequestConfig) => Promise<Account<string>>;
|
|
729
|
-
listAccounts: (options?: AxiosRequestConfig) => Promise<ETNPagedResponse<Account<string>>>;
|
|
730
|
-
updateAccount: (id: string, data: any, options?: AxiosRequestConfig) => Promise<Account<string>>;
|
|
731
|
-
createAccount: (data: any, options?: AxiosRequestConfig) => Promise<Account<string>>;
|
|
732
|
-
removeAccount: (id: string, options?: AxiosRequestConfig) => Promise<Account<string>>;
|
|
733
|
-
getAccountSchema: (options?: AxiosRequestConfig) => Promise<any>;
|
|
734
|
-
invalidateAccountCache: (id: string, data: any, options?: AxiosRequestConfig) => Promise<any>;
|
|
735
|
-
getAsset: (id: string, options?: AxiosRequestConfig) => Promise<Asset<string>>;
|
|
736
|
-
listAssets: (options?: AxiosRequestConfig) => Promise<ETNPagedResponse<Asset<string>>>;
|
|
737
|
-
updateAsset: (id: string, data: any, options?: AxiosRequestConfig) => Promise<Asset<string>>;
|
|
738
|
-
createAsset: (data: any, options?: AxiosRequestConfig) => Promise<Asset<string>>;
|
|
739
|
-
removeAsset: (id: string, options?: AxiosRequestConfig) => Promise<Asset<string>>;
|
|
740
|
-
getAssetSchema: (options?: AxiosRequestConfig) => Promise<any>;
|
|
741
|
-
getAssetGroup: (id: string, options?: AxiosRequestConfig) => Promise<any>;
|
|
742
|
-
listAssetGroups: (options?: AxiosRequestConfig) => Promise<ETNPagedResponse<any>>;
|
|
743
|
-
updateAssetGroup: (id: string, data: any, options?: AxiosRequestConfig) => Promise<any>;
|
|
744
|
-
createAssetGroup: (data: any, options?: AxiosRequestConfig) => Promise<any>;
|
|
745
|
-
removeAssetGroup: (id: string, options?: AxiosRequestConfig) => Promise<any>;
|
|
746
|
-
getAssetGroupAssets: (id: string, options?: AxiosRequestConfig) => Promise<any>;
|
|
747
|
-
getAssetGroupSchema: (options?: AxiosRequestConfig) => Promise<any>;
|
|
748
|
-
getAutomation: (id: string, options?: AxiosRequestConfig) => Promise<Automation<string>>;
|
|
749
|
-
listAutomations: (options?: AxiosRequestConfig) => Promise<ETNPagedResponse<Automation<string>>>;
|
|
750
|
-
updateAutomation: (id: string, data: any, options?: AxiosRequestConfig) => Promise<Automation<string>>;
|
|
751
|
-
createAutomation: (data: any, options?: AxiosRequestConfig) => Promise<Automation<string>>;
|
|
752
|
-
removeAutomation: (id: string, options?: AxiosRequestConfig) => Promise<Automation<string>>;
|
|
753
|
-
createAutomationLog: (id: string, data: any, options?: AxiosRequestConfig) => Promise<any>;
|
|
754
|
-
updateAutomationLog: (id: string, subId: string, data: any, options?: AxiosRequestConfig) => Promise<any>;
|
|
755
|
-
removeAutomationLog: (id: string, subId: string, options?: AxiosRequestConfig) => Promise<any>;
|
|
756
|
-
getCompany: (id: string, options?: AxiosRequestConfig) => Promise<Company<string>>;
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
765
|
+
getAccount: (id: string, options?: AxiosRequestConfig<any>) => Promise<Account<string>>;
|
|
766
|
+
listAccounts: (options?: AxiosRequestConfig<any>) => Promise<ETNPagedResponse<Account<string>>>;
|
|
767
|
+
updateAccount: (id: string, data: any, options?: AxiosRequestConfig<any>) => Promise<Account<string>>;
|
|
768
|
+
createAccount: (data: any, options?: AxiosRequestConfig<any>) => Promise<Account<string>>;
|
|
769
|
+
removeAccount: (id: string, options?: AxiosRequestConfig<any>) => Promise<Account<string>>;
|
|
770
|
+
getAccountSchema: (options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
771
|
+
invalidateAccountCache: (id: string, data: any, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
772
|
+
getAsset: (id: string, options?: AxiosRequestConfig<any>) => Promise<Asset<string>>;
|
|
773
|
+
listAssets: (options?: AxiosRequestConfig<any>) => Promise<ETNPagedResponse<Asset<string>>>;
|
|
774
|
+
updateAsset: (id: string, data: any, options?: AxiosRequestConfig<any>) => Promise<Asset<string>>;
|
|
775
|
+
createAsset: (data: any, options?: AxiosRequestConfig<any>) => Promise<Asset<string>>;
|
|
776
|
+
removeAsset: (id: string, options?: AxiosRequestConfig<any>) => Promise<Asset<string>>;
|
|
777
|
+
getAssetSchema: (options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
778
|
+
getAssetGroup: (id: string, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
779
|
+
listAssetGroups: (options?: AxiosRequestConfig<any>) => Promise<ETNPagedResponse<any>>;
|
|
780
|
+
updateAssetGroup: (id: string, data: any, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
781
|
+
createAssetGroup: (data: any, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
782
|
+
removeAssetGroup: (id: string, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
783
|
+
getAssetGroupAssets: (id: string, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
784
|
+
getAssetGroupSchema: (options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
785
|
+
getAutomation: (id: string, options?: AxiosRequestConfig<any>) => Promise<Automation<string>>;
|
|
786
|
+
listAutomations: (options?: AxiosRequestConfig<any>) => Promise<ETNPagedResponse<Automation<string>>>;
|
|
787
|
+
updateAutomation: (id: string, data: any, options?: AxiosRequestConfig<any>) => Promise<Automation<string>>;
|
|
788
|
+
createAutomation: (data: any, options?: AxiosRequestConfig<any>) => Promise<Automation<string>>;
|
|
789
|
+
removeAutomation: (id: string, options?: AxiosRequestConfig<any>) => Promise<Automation<string>>;
|
|
790
|
+
createAutomationLog: (id: string, data: any, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
791
|
+
updateAutomationLog: (id: string, subId: string, data: any, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
792
|
+
removeAutomationLog: (id: string, subId: string, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
793
|
+
getCompany: (id: string, options?: AxiosRequestConfig<any>) => Promise<Company<string>>;
|
|
794
|
+
getCompanyInvoiceValidationRules: (id: string, options?: AxiosRequestConfig<any>) => Promise<CompanyInvoiceValidationRule<string>[]>;
|
|
795
|
+
getConsumption: (id: string, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
796
|
+
listConsumptions: (options?: AxiosRequestConfig<any>) => Promise<ETNPagedResponse<any>>;
|
|
797
|
+
updateConsumption: (id: string, data: any, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
798
|
+
createConsumption: (data: any, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
799
|
+
removeConsumption: (id: string, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
800
|
+
getConsumptionSchema: (options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
801
|
+
getEmail: (id: string, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
802
|
+
listEmails: (options?: AxiosRequestConfig<any>) => Promise<ETNPagedResponse<any>>;
|
|
803
|
+
updateEmail: (id: string, data: any, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
804
|
+
createEmail: (data: any, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
805
|
+
removeEmail: (id: string, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
806
|
+
getEmissionFactor: (id: string, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
807
|
+
listEmissionFactors: (options?: AxiosRequestConfig<any>) => Promise<ETNPagedResponse<any>>;
|
|
808
|
+
updateEmissionFactor: (id: string, data: any, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
809
|
+
createEmissionFactor: (data: any, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
810
|
+
removeEmissionFactor: (id: string, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
811
|
+
getEntity: (id: string, options?: AxiosRequestConfig<any>) => Promise<Entity<string>>;
|
|
812
|
+
listEntities: (options?: AxiosRequestConfig<any>) => Promise<ETNPagedResponse<Entity<string>>>;
|
|
813
|
+
updateEntity: (id: string, data: any, options?: AxiosRequestConfig<any>) => Promise<Entity<string>>;
|
|
814
|
+
createEntity: (data: any, options?: AxiosRequestConfig<any>) => Promise<Entity<string>>;
|
|
815
|
+
removeEntity: (id: string, options?: AxiosRequestConfig<any>) => Promise<Entity<string>>;
|
|
816
|
+
getEntitiesSchema: (options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
817
|
+
getLog: (id: string, options?: AxiosRequestConfig<any>) => Promise<Log<string>>;
|
|
818
|
+
listLogs: (options?: AxiosRequestConfig<any>) => Promise<ETNPagedResponse<Log<string>>>;
|
|
819
|
+
updateLog: (id: string, data: any, options?: AxiosRequestConfig<any>) => Promise<Log<string>>;
|
|
820
|
+
createLog: (data: any, options?: AxiosRequestConfig<any>) => Promise<Log<string>>;
|
|
821
|
+
removeLog: (id: string, options?: AxiosRequestConfig<any>) => Promise<Log<string>>;
|
|
822
|
+
getReading: (id: string, options?: AxiosRequestConfig<any>) => Promise<Reading<string>>;
|
|
823
|
+
listReadings: (options?: AxiosRequestConfig<any>) => Promise<ETNPagedResponse<Reading<string>>>;
|
|
824
|
+
updateReading: (id: string, data: any, options?: AxiosRequestConfig<any>) => Promise<Reading<string>>;
|
|
825
|
+
createReading: (data: any, options?: AxiosRequestConfig<any>) => Promise<Reading<string>>;
|
|
826
|
+
removeReading: (id: string, options?: AxiosRequestConfig<any>) => Promise<Reading<string>>;
|
|
827
|
+
getReadingSchema: (options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
828
|
+
getReport: (id: string, options?: AxiosRequestConfig<any>) => Promise<Report<string>>;
|
|
829
|
+
listReports: (options?: AxiosRequestConfig<any>) => Promise<ETNPagedResponse<Report<string>>>;
|
|
830
|
+
updateReport: (id: string, data: any, options?: AxiosRequestConfig<any>) => Promise<Report<string>>;
|
|
831
|
+
createReport: (data: any, options?: AxiosRequestConfig<any>) => Promise<Report<string>>;
|
|
832
|
+
removeReport: (id: string, options?: AxiosRequestConfig<any>) => Promise<Report<string>>;
|
|
833
|
+
sendReport: (id: string, data: any, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
834
|
+
getReportTemplate: (id: string, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
835
|
+
listReportTemplates: (options?: AxiosRequestConfig<any>) => Promise<ETNPagedResponse<any>>;
|
|
836
|
+
updateReportTemplate: (id: string, data: any, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
837
|
+
createReportTemplate: (data: any, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
838
|
+
removeReportTemplate: (id: string, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
839
|
+
getScheduledReport: (id: string, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
840
|
+
listScheduledReports: (options?: AxiosRequestConfig<any>) => Promise<ETNPagedResponse<any>>;
|
|
841
|
+
updateScheduledReport: (id: string, data: any, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
842
|
+
createScheduledReport: (data: any, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
843
|
+
removeScheduledReport: (id: string, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
844
|
+
sendScheduledReport: (id: string, data: any, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
845
|
+
getInvoice: (id: string, options?: AxiosRequestConfig<any>) => Promise<Invoice<string>>;
|
|
846
|
+
listInvoices: (options?: AxiosRequestConfig<any>) => Promise<ETNPagedResponse<Invoice<string>>>;
|
|
847
|
+
updateInvoice: (id: string, data: any, options?: AxiosRequestConfig<any>) => Promise<Invoice<string>>;
|
|
848
|
+
createInvoice: (data: any, options?: AxiosRequestConfig<any>) => Promise<Invoice<string>>;
|
|
849
|
+
removeInvoice: (id: string, options?: AxiosRequestConfig<any>) => Promise<Invoice<string>>;
|
|
850
|
+
getInvoiceSchema: (options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
851
|
+
getInvoiceCapture: (id: string, options?: AxiosRequestConfig<any>) => Promise<InvoiceCapture<string>>;
|
|
852
|
+
listInvoicesCapture: (options?: AxiosRequestConfig<any>) => Promise<ETNPagedResponse<InvoiceCapture<string>>>;
|
|
853
|
+
updateInvoiceCapture: (id: string, data: any, options?: AxiosRequestConfig<any>) => Promise<InvoiceCapture<string>>;
|
|
854
|
+
createInvoiceCapture: (data: any, options?: AxiosRequestConfig<any>) => Promise<InvoiceCapture<string>>;
|
|
855
|
+
removeInvoiceCapture: (id: string, options?: AxiosRequestConfig<any>) => Promise<InvoiceCapture<string>>;
|
|
856
|
+
getInvoiceCaptureSchema: (options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
857
|
+
getInvoiceValidation: (id: string, options?: AxiosRequestConfig<any>) => Promise<InvoiceValidation<string>>;
|
|
858
|
+
listInvoicesValidation: (options?: AxiosRequestConfig<any>) => Promise<ETNPagedResponse<InvoiceValidation<string>>>;
|
|
859
|
+
updateInvoiceValidation: (id: string, data: any, options?: AxiosRequestConfig<any>) => Promise<InvoiceValidation<string>>;
|
|
860
|
+
createInvoiceValidation: (data: any, options?: AxiosRequestConfig<any>) => Promise<InvoiceValidation<string>>;
|
|
861
|
+
removeInvoiceValidation: (id: string, options?: AxiosRequestConfig<any>) => Promise<InvoiceValidation<string>>;
|
|
862
|
+
getInvoiceValidationSchema: (options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
863
|
+
listSuppliers: (options?: AxiosRequestConfig<any>) => Promise<ETNPagedResponse<Supplier<string>>>;
|
|
864
|
+
getSupplierSchema: (options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
865
|
+
getImportTemplate: (id: string, options?: AxiosRequestConfig<any>) => Promise<any>;
|
|
866
|
+
listDataIngest: (options?: AxiosRequestConfig<any>) => Promise<ETNPagedResponse<DataIngest<string>>>;
|
|
867
|
+
updateDataIngest: (id: string, data: any, options?: AxiosRequestConfig<any>) => Promise<DataIngest<string>>;
|
|
868
|
+
createDataIngest: (data: any, options?: AxiosRequestConfig<any>) => Promise<DataIngest<string>>;
|
|
825
869
|
};
|
|
826
870
|
|
|
827
871
|
declare const _default$2: (namespace: string) => winston.Logger;
|
|
@@ -883,4 +927,4 @@ declare namespace index {
|
|
|
883
927
|
export { index_automationServices as automationServices, index_automationSources as automationSources };
|
|
884
928
|
}
|
|
885
929
|
|
|
886
|
-
export { type Account, type Asset, type Automation, type AutomationService, type AutomationServiceCategory, type AutomationSource, type Company, type CreateScraperRunParams, type DataIngest, type ETNPagedResponse$1 as ETNPagedResponse, type Email, type Entity, type Invoice, type InvoiceCapture, type InvoiceCaptureMetadata, type InvoiceCaptureMetadataResult, type InvoiceRate, type InvoiceRateType, type InvoiceValues, type Log, type Reading, type Report, type ReportMetadata, type ReportSource, type ReportSourceIdItem, type ScraperRun, type Supplier, type UtilityType, _default$3 as api, consumption, _default$1 as db, _default$2 as logger, monitoring, reporting, _default as slack, units, index as utils };
|
|
930
|
+
export { type Account, type Asset, type Automation, type AutomationService, type AutomationServiceCategory, type AutomationSource, type Company, type CompanyInvoiceValidationRule, type CreateScraperRunParams, type DataIngest, type ETNPagedResponse$1 as ETNPagedResponse, type Email, type Entity, type Invoice, type InvoiceCapture, type InvoiceCaptureMetadata, type InvoiceCaptureMetadataResult, type InvoiceRate, type InvoiceRateType, type InvoiceValidation, type InvoiceValidationResults, type InvoiceValidationRule, type InvoiceValues, type Log, type Reading, type Report, type ReportMetadata, type ReportSource, type ReportSourceIdItem, type ScraperRun, type Supplier, type UtilityType, _default$3 as api, consumption, _default$1 as db, _default$2 as logger, monitoring, reporting, _default as slack, units, index as utils };
|
package/dist/index.js
CHANGED
|
@@ -267,6 +267,11 @@ var api_default = (auth, instanceOptions = {}) => {
|
|
|
267
267
|
removeAutomationLog: subFactory.remove(etainablApi, "automation", "logs"),
|
|
268
268
|
// company
|
|
269
269
|
getCompany: factory.getWithId(etainablApi, "companies"),
|
|
270
|
+
getCompanyInvoiceValidationRules: factory.getWithId(
|
|
271
|
+
etainablApi,
|
|
272
|
+
"companies",
|
|
273
|
+
"invoice-validation-rules"
|
|
274
|
+
),
|
|
270
275
|
// consumption
|
|
271
276
|
getConsumption: factory.getWithId(etainablApi, "consumptions"),
|
|
272
277
|
listConsumptions: factory.list(etainablApi, "consumptions"),
|
|
@@ -340,6 +345,13 @@ var api_default = (auth, instanceOptions = {}) => {
|
|
|
340
345
|
createInvoiceCapture: factory.create(etainablApi, "invoice-capture"),
|
|
341
346
|
removeInvoiceCapture: factory.remove(etainablApi, "invoice-capture"),
|
|
342
347
|
getInvoiceCaptureSchema: factory.get(etainablApi, "invoice-capture", "schema"),
|
|
348
|
+
// invoice validation
|
|
349
|
+
getInvoiceValidation: factory.getWithId(etainablApi, "invoice-validation"),
|
|
350
|
+
listInvoicesValidation: factory.list(etainablApi, "invoice-validation"),
|
|
351
|
+
updateInvoiceValidation: factory.update(etainablApi, "invoice-validation"),
|
|
352
|
+
createInvoiceValidation: factory.create(etainablApi, "invoice-validation"),
|
|
353
|
+
removeInvoiceValidation: factory.remove(etainablApi, "invoice-validation"),
|
|
354
|
+
getInvoiceValidationSchema: factory.get(etainablApi, "invoice-validation", "schema"),
|
|
343
355
|
//suppliers
|
|
344
356
|
listSuppliers: factory.list(etainablApi, "suppliers"),
|
|
345
357
|
getSupplierSchema: factory.get(etainablApi, "suppliers", "schema"),
|