@etainabl/nodejs-sdk 1.3.150 → 1.3.152

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/index.d.cts CHANGED
@@ -877,7 +877,9 @@ interface CompanySettings<IDType = ObjectId | string> {
877
877
  invoiceValidationSettings?: CompanyInvoiceValidationSettings<IDType>;
878
878
  autoInvoiceValidation?: boolean;
879
879
  splitInvoices?: boolean;
880
+ completedInvoiceFilename?: 'original' | 'generated';
880
881
  invoiceFilename?: {
882
+ format?: string;
881
883
  legalNameMaxLength?: number;
882
884
  siteNameMaxLength?: number;
883
885
  };
@@ -1247,7 +1249,7 @@ interface Reading<IDType = ObjectId | string, DateType = Date> {
1247
1249
  rateId?: string;
1248
1250
  contractRateType?: string;
1249
1251
  invoiceBatchId?: string;
1250
- registerId?: string;
1252
+ registerId: string;
1251
1253
  batchId?: string;
1252
1254
  accountId: IDType;
1253
1255
  entityId: IDType;
package/dist/index.d.ts CHANGED
@@ -877,7 +877,9 @@ interface CompanySettings<IDType = ObjectId | string> {
877
877
  invoiceValidationSettings?: CompanyInvoiceValidationSettings<IDType>;
878
878
  autoInvoiceValidation?: boolean;
879
879
  splitInvoices?: boolean;
880
+ completedInvoiceFilename?: 'original' | 'generated';
880
881
  invoiceFilename?: {
882
+ format?: string;
881
883
  legalNameMaxLength?: number;
882
884
  siteNameMaxLength?: number;
883
885
  };
@@ -1247,7 +1249,7 @@ interface Reading<IDType = ObjectId | string, DateType = Date> {
1247
1249
  rateId?: string;
1248
1250
  contractRateType?: string;
1249
1251
  invoiceBatchId?: string;
1250
- registerId?: string;
1252
+ registerId: string;
1251
1253
  batchId?: string;
1252
1254
  accountId: IDType;
1253
1255
  entityId: IDType;
package/dist/index.js CHANGED
@@ -17439,8 +17439,8 @@ var units = [
17439
17439
  var getMeterPointNumberBottomLine = (meterPointNumber) => {
17440
17440
  if (!meterPointNumber) return "";
17441
17441
  const mpan = String(meterPointNumber).replace(/\s/g, "");
17442
- if (mpan.length === 21) {
17443
- return mpan.substring(8, 21);
17442
+ if (mpan.length === 21 || mpan.length === 22) {
17443
+ return mpan.substring(8, mpan.length);
17444
17444
  }
17445
17445
  if (mpan.length === 13) {
17446
17446
  return mpan;
@@ -25404,7 +25404,7 @@ var errorCodeMap = {
25404
25404
  status: "error",
25405
25405
  message: "Account not found for the provided device ID or MPAN.",
25406
25406
  isUnique: ({ details }, problems) => {
25407
- return !problems.some((p7) => p7.code === "ACCOUNT_NOT_FOUND" && p7.details?.value === details?.value) || true;
25407
+ return !problems.some((p7) => p7.code === "ACCOUNT_NOT_FOUND" && p7.details?.value === details?.value);
25408
25408
  }
25409
25409
  },
25410
25410
  INVALID_DATE_FORMAT: {