@epilot/metering-client 0.5.6 → 0.5.8

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/openapi.json CHANGED
@@ -446,18 +446,29 @@
446
446
  "post": {
447
447
  "operationId": "createMeterReadings",
448
448
  "summary": "Create Meter Readings",
449
- "description": "Inserts multiple meter readings at once.",
449
+ "description": "Inserts multiple meter readings at once. Limited to 100 readings per request.",
450
450
  "tags": [
451
- "ECP Admin",
452
- "ECP"
451
+ "ECP Admin"
453
452
  ],
454
453
  "security": [
455
454
  {
456
- "EitherAuth": []
455
+ "EpilotAuth": []
456
+ }
457
+ ],
458
+ "parameters": [
459
+ {
460
+ "in": "query",
461
+ "name": "async",
462
+ "description": "Don't wait for the reading to become available in GetReadings API. Useful for large migrations",
463
+ "required": false,
464
+ "schema": {
465
+ "type": "boolean",
466
+ "default": true
467
+ }
457
468
  }
458
469
  ],
459
470
  "requestBody": {
460
- "description": "Meter readings payload.",
471
+ "description": "Meter readings payload. Limited to 100 readings per request.",
461
472
  "required": true,
462
473
  "content": {
463
474
  "application/json": {
@@ -1206,6 +1217,16 @@
1206
1217
  }
1207
1218
  }
1208
1219
  },
1220
+ "NotFound": {
1221
+ "description": "The specified resource was not found",
1222
+ "content": {
1223
+ "application/json": {
1224
+ "schema": {
1225
+ "$ref": "#/components/schemas/ErrorResp"
1226
+ }
1227
+ }
1228
+ }
1229
+ },
1209
1230
  "InternalServerError": {
1210
1231
  "description": "Internal Server Error",
1211
1232
  "content": {
@@ -1234,6 +1255,12 @@
1234
1255
  "type": "http",
1235
1256
  "scheme": "bearer",
1236
1257
  "description": "Portal or Epilot Bearer Token"
1258
+ },
1259
+ "AsOrganization": {
1260
+ "type": "apiKey",
1261
+ "in": "header",
1262
+ "name": "x-ivy-org-id",
1263
+ "description": "Set organization id as internal user"
1237
1264
  }
1238
1265
  },
1239
1266
  "schemas": {
@@ -1250,6 +1277,11 @@
1250
1277
  "type": "string",
1251
1278
  "format": "uuid"
1252
1279
  },
1280
+ "EntitySlug": {
1281
+ "description": "URL-friendly identifier for the entity schema",
1282
+ "type": "string",
1283
+ "example": "contact"
1284
+ },
1253
1285
  "BaseEntity": {
1254
1286
  "type": "object",
1255
1287
  "properties": {
@@ -1389,7 +1421,9 @@
1389
1421
  "enum": [
1390
1422
  "power",
1391
1423
  "water",
1392
- "gas"
1424
+ "gas",
1425
+ "district_heating",
1426
+ "waste_water"
1393
1427
  ],
1394
1428
  "description": "The sector to which the meter belongs"
1395
1429
  },
@@ -1468,12 +1502,27 @@
1468
1502
  "nt"
1469
1503
  ]
1470
1504
  },
1505
+ "Reason": {
1506
+ "type": "string",
1507
+ "nullable": true,
1508
+ "example": "Storing the feed-in record",
1509
+ "description": "The reason for recording the reading"
1510
+ },
1511
+ "ReadBy": {
1512
+ "type": "string",
1513
+ "nullable": true,
1514
+ "example": "John Doe",
1515
+ "description": "The person who recorded the reading"
1516
+ },
1471
1517
  "ReadingStatus": {
1472
1518
  "type": "string",
1519
+ "nullable": true,
1473
1520
  "enum": [
1474
1521
  "valid",
1475
1522
  "in-validation",
1476
- "implausible"
1523
+ "implausible",
1524
+ null,
1525
+ ""
1477
1526
  ]
1478
1527
  },
1479
1528
  "MeterReading": {
@@ -1490,14 +1539,10 @@
1490
1539
  "description": "The reading value of the meter"
1491
1540
  },
1492
1541
  "read_by": {
1493
- "type": "string",
1494
- "example": "John Doe",
1495
- "description": "The person who recorded the reading"
1542
+ "$ref": "#/components/schemas/ReadBy"
1496
1543
  },
1497
1544
  "reason": {
1498
- "type": "string",
1499
- "example": "Storing the feed-in record",
1500
- "description": "The reason for recording the reading"
1545
+ "$ref": "#/components/schemas/Reason"
1501
1546
  },
1502
1547
  "meter_id": {
1503
1548
  "$ref": "#/components/schemas/EntityId",
@@ -1523,16 +1568,6 @@
1523
1568
  "status": {
1524
1569
  "$ref": "#/components/schemas/ReadingStatus",
1525
1570
  "description": "The status of the reading"
1526
- },
1527
- "minNextReadingValue": {
1528
- "type": "number",
1529
- "example": 250,
1530
- "description": "The minimum value for the next reading"
1531
- },
1532
- "maxNextReadingValue": {
1533
- "type": "number",
1534
- "example": 260,
1535
- "description": "The maximum value for the next reading"
1536
1571
  }
1537
1572
  }
1538
1573
  },
@@ -1650,12 +1685,12 @@
1650
1685
  }
1651
1686
  }
1652
1687
  },
1653
- "AuthenticatedSubmission": {
1688
+ "SubmissionMeterReading": {
1654
1689
  "type": "object",
1655
- "nullable": true,
1656
1690
  "required": [
1657
1691
  "meterId"
1658
1692
  ],
1693
+ "nullable": true,
1659
1694
  "properties": {
1660
1695
  "meterId": {
1661
1696
  "$ref": "#/components/schemas/Id",
@@ -1668,36 +1703,6 @@
1668
1703
  },
1669
1704
  "description": "- The counter readings of a meter\n- This is only sent when the user is authenticated while submitting a journey\n"
1670
1705
  },
1671
- "readingDate": {
1672
- "type": "string",
1673
- "description": "If the value is not provided, the system will be set with the time the request is processed.",
1674
- "example": "2022-10-10T10:10:00.000Z"
1675
- },
1676
- "readBy": {
1677
- "type": "string",
1678
- "example": "John Doe",
1679
- "description": "The person who recorded the reading"
1680
- },
1681
- "reason": {
1682
- "type": "string",
1683
- "example": "Storing the feed-in record",
1684
- "description": "The reason for recording the reading"
1685
- },
1686
- "maloId": {
1687
- "type": "string",
1688
- "example": "A09-123",
1689
- "description": "The MA-LO ID of the meter"
1690
- }
1691
- }
1692
- },
1693
- "UnauthenticatedSubmission": {
1694
- "type": "object",
1695
- "nullable": true,
1696
- "properties": {
1697
- "meterId": {
1698
- "$ref": "#/components/schemas/Id",
1699
- "description": "The ID of the associated meter"
1700
- },
1701
1706
  "readingValue": {
1702
1707
  "type": "number",
1703
1708
  "example": 240,
@@ -1714,15 +1719,18 @@
1714
1719
  "description": "The person who recorded the reading"
1715
1720
  },
1716
1721
  "reason": {
1717
- "type": "string",
1718
- "example": "Storing the feed-in record",
1719
- "description": "The reason for recording the reading"
1722
+ "$ref": "#/components/schemas/Reason"
1720
1723
  },
1721
1724
  "maloId": {
1722
1725
  "type": "string",
1723
1726
  "example": "A09-123",
1724
1727
  "description": "The MA-LO ID of the meter"
1725
1728
  },
1729
+ "obisNumber": {
1730
+ "type": "string",
1731
+ "example": "A-34",
1732
+ "description": "The OBIS number of the meter counter"
1733
+ },
1726
1734
  "readingUnit": {
1727
1735
  "$ref": "#/components/schemas/Unit",
1728
1736
  "description": "The unit of measurement for the reading"
@@ -1758,16 +1766,6 @@
1758
1766
  }
1759
1767
  }
1760
1768
  },
1761
- "SubmissionMeterReading": {
1762
- "oneOf": [
1763
- {
1764
- "$ref": "#/components/schemas/AuthenticatedSubmission"
1765
- },
1766
- {
1767
- "$ref": "#/components/schemas/UnauthenticatedSubmission"
1768
- }
1769
- ]
1770
- },
1771
1769
  "Unit": {
1772
1770
  "type": "string",
1773
1771
  "enum": [
@@ -1886,14 +1884,10 @@
1886
1884
  "description": "The reading value"
1887
1885
  },
1888
1886
  "read_by": {
1889
- "type": "string",
1890
- "example": "John Doe",
1891
- "description": "The person who recorded the reading"
1887
+ "$ref": "#/components/schemas/ReadBy"
1892
1888
  },
1893
1889
  "reason": {
1894
- "type": "string",
1895
- "example": "Storing the feed-in record",
1896
- "description": "The reason for recording the reading"
1890
+ "$ref": "#/components/schemas/Reason"
1897
1891
  },
1898
1892
  "timestamp": {
1899
1893
  "type": "string",
@@ -1909,6 +1903,9 @@
1909
1903
  }
1910
1904
  },
1911
1905
  "servers": [
1906
+ {
1907
+ "url": "https://metering.sls.epilot.io"
1908
+ },
1912
1909
  {
1913
1910
  "url": "https://metering.sls.epilot.io"
1914
1911
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/metering-client",
3
- "version": "0.5.6",
3
+ "version": "0.5.8",
4
4
  "description": "API Client for epilot Metering API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",