@etainabl/nodejs-sdk 1.3.153 → 1.3.155
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 +3 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.cts +14 -1
- package/dist/index.d.ts +14 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -422,6 +422,7 @@ interface Account<IDType = ObjectId | string> {
|
|
|
422
422
|
reportingType?: string;
|
|
423
423
|
solarType?: 'generation' | 'export';
|
|
424
424
|
consumptionSource?: 'primary' | 'sub' | 'primary-sub';
|
|
425
|
+
consumptionPriority?: ('hh' | 'reading' | 'invoice' | 'custom')[];
|
|
425
426
|
esec?: 'a' | 'b' | 'c' | 'd' | 'e' | 'g' | 'h' | 'j' | 'k' | 'l' | 'm' | 'n' | 'p' | 'q' | 'r' | 's' | 't' | 'u';
|
|
426
427
|
portal?: PortalAccountSchema;
|
|
427
428
|
deviceId?: string;
|
|
@@ -1352,6 +1353,17 @@ interface ReportTemplate<IDType = ObjectId | string> {
|
|
|
1352
1353
|
updatedAt?: Date;
|
|
1353
1354
|
}
|
|
1354
1355
|
|
|
1356
|
+
interface Setting<IDType = ObjectId | string> {
|
|
1357
|
+
_id: IDType;
|
|
1358
|
+
type: string;
|
|
1359
|
+
name: string;
|
|
1360
|
+
code: string;
|
|
1361
|
+
formSchema?: object;
|
|
1362
|
+
values: object | string[] | object[];
|
|
1363
|
+
sideBarPosition: number;
|
|
1364
|
+
readOnly: boolean;
|
|
1365
|
+
}
|
|
1366
|
+
|
|
1355
1367
|
interface PortalSupplierSchema extends Portal {
|
|
1356
1368
|
concurrent: boolean;
|
|
1357
1369
|
checkInvoiceFilenames: boolean;
|
|
@@ -1557,6 +1569,7 @@ declare const _default$4: (auth: AuthOptions, instanceOptions?: CreateAxiosDefau
|
|
|
1557
1569
|
searchAutomationRun: (options?: AxiosRequestConfig) => Promise<any>;
|
|
1558
1570
|
updateAutomationRunAccountResults: (id: string, data: any, options?: AxiosRequestConfig) => Promise<AutomationRun<string, string | Date>>;
|
|
1559
1571
|
globalSearch: (options?: AxiosRequestConfig) => Promise<any>;
|
|
1572
|
+
listSettings: <P = Setting<string>>(options?: AxiosRequestConfig) => Promise<ETNPagedResponse<P>>;
|
|
1560
1573
|
};
|
|
1561
1574
|
|
|
1562
1575
|
interface EmailTemplateOptions {
|
|
@@ -1798,4 +1811,4 @@ declare namespace scrapers {
|
|
|
1798
1811
|
export type { scrapers_ETNAccount as ETNAccount };
|
|
1799
1812
|
}
|
|
1800
1813
|
|
|
1801
|
-
export { type AccessLevel, type Account, type AccountResult, type Asset, type Automation, type AutomationRun, type AutomationRunLog, type AutomationRunSummary, type AutomationService, type AutomationServiceCategory, type AutomationSource, type Company, type CompanyInvoiceValidationRule, type CompanyInvoiceValidationSettings, type Consumption, type CreateScraperRunParams, type DataIngest, type DefaultField, type ETNEvent, type ETNPagedResponse$1 as ETNPagedResponse, type Email, type Entity, type FileFormat, type ImportTemplate, type Invoice, type InvoiceCapture, type InvoiceCaptureMetadata, type InvoiceCaptureMetadataResult, type InvoiceRate, type InvoiceRateType, type InvoiceValidation, type InvoiceValidationInvoice, type InvoiceValidationResults, type InvoiceValidationRule, type InvoiceValues, type Log, type Portal, type PortalSupplierSchema, type Problem, type ProblemCodes, type ProblemDetails, type Reading, type Report, type ReportMetadata, type ReportSource, type ReportSourceIdItem, type ReportTemplate, type ReportType, type ScraperRun, type SourceType, type Supplier, type User, type UtilityType, type WasteCategories, type WasteTypes, _default$4 as api, consumption, _default$1 as db, _default$3 as emailTemplate, integrations, _default$2 as logger, monitoring, index as openai, reporting, scrapers, _default as slack, units, index$1 as utils };
|
|
1814
|
+
export { type AccessLevel, type Account, type AccountResult, type Asset, type Automation, type AutomationRun, type AutomationRunLog, type AutomationRunSummary, type AutomationService, type AutomationServiceCategory, type AutomationSource, type Company, type CompanyInvoiceValidationRule, type CompanyInvoiceValidationSettings, type Consumption, type CreateScraperRunParams, type DataIngest, type DefaultField, type ETNEvent, type ETNPagedResponse$1 as ETNPagedResponse, type Email, type Entity, type FileFormat, type ImportTemplate, type Invoice, type InvoiceCapture, type InvoiceCaptureMetadata, type InvoiceCaptureMetadataResult, type InvoiceRate, type InvoiceRateType, type InvoiceValidation, type InvoiceValidationInvoice, type InvoiceValidationResults, type InvoiceValidationRule, type InvoiceValues, type Log, type Portal, type PortalSupplierSchema, type Problem, type ProblemCodes, type ProblemDetails, type Reading, type Report, type ReportMetadata, type ReportSource, type ReportSourceIdItem, type ReportTemplate, type ReportType, type ScraperRun, type Setting, type SourceType, type Supplier, type User, type UtilityType, type WasteCategories, type WasteTypes, _default$4 as api, consumption, _default$1 as db, _default$3 as emailTemplate, integrations, _default$2 as logger, monitoring, index as openai, reporting, scrapers, _default as slack, units, index$1 as utils };
|
package/dist/index.d.ts
CHANGED
|
@@ -422,6 +422,7 @@ interface Account<IDType = ObjectId | string> {
|
|
|
422
422
|
reportingType?: string;
|
|
423
423
|
solarType?: 'generation' | 'export';
|
|
424
424
|
consumptionSource?: 'primary' | 'sub' | 'primary-sub';
|
|
425
|
+
consumptionPriority?: ('hh' | 'reading' | 'invoice' | 'custom')[];
|
|
425
426
|
esec?: 'a' | 'b' | 'c' | 'd' | 'e' | 'g' | 'h' | 'j' | 'k' | 'l' | 'm' | 'n' | 'p' | 'q' | 'r' | 's' | 't' | 'u';
|
|
426
427
|
portal?: PortalAccountSchema;
|
|
427
428
|
deviceId?: string;
|
|
@@ -1352,6 +1353,17 @@ interface ReportTemplate<IDType = ObjectId | string> {
|
|
|
1352
1353
|
updatedAt?: Date;
|
|
1353
1354
|
}
|
|
1354
1355
|
|
|
1356
|
+
interface Setting<IDType = ObjectId | string> {
|
|
1357
|
+
_id: IDType;
|
|
1358
|
+
type: string;
|
|
1359
|
+
name: string;
|
|
1360
|
+
code: string;
|
|
1361
|
+
formSchema?: object;
|
|
1362
|
+
values: object | string[] | object[];
|
|
1363
|
+
sideBarPosition: number;
|
|
1364
|
+
readOnly: boolean;
|
|
1365
|
+
}
|
|
1366
|
+
|
|
1355
1367
|
interface PortalSupplierSchema extends Portal {
|
|
1356
1368
|
concurrent: boolean;
|
|
1357
1369
|
checkInvoiceFilenames: boolean;
|
|
@@ -1557,6 +1569,7 @@ declare const _default$4: (auth: AuthOptions, instanceOptions?: CreateAxiosDefau
|
|
|
1557
1569
|
searchAutomationRun: (options?: AxiosRequestConfig) => Promise<any>;
|
|
1558
1570
|
updateAutomationRunAccountResults: (id: string, data: any, options?: AxiosRequestConfig) => Promise<AutomationRun<string, string | Date>>;
|
|
1559
1571
|
globalSearch: (options?: AxiosRequestConfig) => Promise<any>;
|
|
1572
|
+
listSettings: <P = Setting<string>>(options?: AxiosRequestConfig) => Promise<ETNPagedResponse<P>>;
|
|
1560
1573
|
};
|
|
1561
1574
|
|
|
1562
1575
|
interface EmailTemplateOptions {
|
|
@@ -1798,4 +1811,4 @@ declare namespace scrapers {
|
|
|
1798
1811
|
export type { scrapers_ETNAccount as ETNAccount };
|
|
1799
1812
|
}
|
|
1800
1813
|
|
|
1801
|
-
export { type AccessLevel, type Account, type AccountResult, type Asset, type Automation, type AutomationRun, type AutomationRunLog, type AutomationRunSummary, type AutomationService, type AutomationServiceCategory, type AutomationSource, type Company, type CompanyInvoiceValidationRule, type CompanyInvoiceValidationSettings, type Consumption, type CreateScraperRunParams, type DataIngest, type DefaultField, type ETNEvent, type ETNPagedResponse$1 as ETNPagedResponse, type Email, type Entity, type FileFormat, type ImportTemplate, type Invoice, type InvoiceCapture, type InvoiceCaptureMetadata, type InvoiceCaptureMetadataResult, type InvoiceRate, type InvoiceRateType, type InvoiceValidation, type InvoiceValidationInvoice, type InvoiceValidationResults, type InvoiceValidationRule, type InvoiceValues, type Log, type Portal, type PortalSupplierSchema, type Problem, type ProblemCodes, type ProblemDetails, type Reading, type Report, type ReportMetadata, type ReportSource, type ReportSourceIdItem, type ReportTemplate, type ReportType, type ScraperRun, type SourceType, type Supplier, type User, type UtilityType, type WasteCategories, type WasteTypes, _default$4 as api, consumption, _default$1 as db, _default$3 as emailTemplate, integrations, _default$2 as logger, monitoring, index as openai, reporting, scrapers, _default as slack, units, index$1 as utils };
|
|
1814
|
+
export { type AccessLevel, type Account, type AccountResult, type Asset, type Automation, type AutomationRun, type AutomationRunLog, type AutomationRunSummary, type AutomationService, type AutomationServiceCategory, type AutomationSource, type Company, type CompanyInvoiceValidationRule, type CompanyInvoiceValidationSettings, type Consumption, type CreateScraperRunParams, type DataIngest, type DefaultField, type ETNEvent, type ETNPagedResponse$1 as ETNPagedResponse, type Email, type Entity, type FileFormat, type ImportTemplate, type Invoice, type InvoiceCapture, type InvoiceCaptureMetadata, type InvoiceCaptureMetadataResult, type InvoiceRate, type InvoiceRateType, type InvoiceValidation, type InvoiceValidationInvoice, type InvoiceValidationResults, type InvoiceValidationRule, type InvoiceValues, type Log, type Portal, type PortalSupplierSchema, type Problem, type ProblemCodes, type ProblemDetails, type Reading, type Report, type ReportMetadata, type ReportSource, type ReportSourceIdItem, type ReportTemplate, type ReportType, type ScraperRun, type Setting, type SourceType, type Supplier, type User, type UtilityType, type WasteCategories, type WasteTypes, _default$4 as api, consumption, _default$1 as db, _default$3 as emailTemplate, integrations, _default$2 as logger, monitoring, index as openai, reporting, scrapers, _default as slack, units, index$1 as utils };
|
package/dist/index.js
CHANGED
|
@@ -16580,7 +16580,9 @@ var api_default = (auth, instanceOptions = {}) => {
|
|
|
16580
16580
|
searchAutomationRun: factory.get(etainablApi, "automation-runs", "search"),
|
|
16581
16581
|
updateAutomationRunAccountResults: factory.update(etainablApi, "automation-runs", "account-results"),
|
|
16582
16582
|
// global search
|
|
16583
|
-
globalSearch: factory.get(etainablApi, "global-search", "search")
|
|
16583
|
+
globalSearch: factory.get(etainablApi, "global-search", "search"),
|
|
16584
|
+
// global settings
|
|
16585
|
+
listSettings: factory.list(etainablApi, "settings")
|
|
16584
16586
|
};
|
|
16585
16587
|
} catch (e7) {
|
|
16586
16588
|
log.error(e7);
|