@epilot/metering-client 0.5.5 → 0.5.7

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
@@ -20,6 +20,9 @@
20
20
  },
21
21
  {
22
22
  "PortalAuth": []
23
+ },
24
+ {
25
+ "EitherAuth": []
23
26
  }
24
27
  ],
25
28
  "paths": {
@@ -47,7 +50,19 @@
47
50
  "data": {
48
51
  "type": "array",
49
52
  "items": {
50
- "$ref": "#/components/schemas/Meter"
53
+ "allOf": [
54
+ {
55
+ "$ref": "#/components/schemas/Meter"
56
+ },
57
+ {
58
+ "type": "object",
59
+ "properties": {
60
+ "journey_actions": {
61
+ "$ref": "#/components/schemas/JourneyActions"
62
+ }
63
+ }
64
+ }
65
+ ]
51
66
  }
52
67
  }
53
68
  }
@@ -228,6 +243,9 @@
228
243
  "entity": {
229
244
  "$ref": "#/components/schemas/Meter"
230
245
  },
246
+ "journey_actions": {
247
+ "$ref": "#/components/schemas/JourneyActions"
248
+ },
231
249
  "relations": {
232
250
  "type": "array",
233
251
  "items": {
@@ -275,8 +293,7 @@
275
293
  "name": "meter_id",
276
294
  "required": true,
277
295
  "schema": {
278
- "type": "string",
279
- "example": "1446829f-4b6f-474e-b978-3997d89a7928"
296
+ "$ref": "#/components/schemas/EntityId"
280
297
  }
281
298
  }
282
299
  ],
@@ -380,10 +397,7 @@
380
397
  ],
381
398
  "security": [
382
399
  {
383
- "EpilotAuth": []
384
- },
385
- {
386
- "PortalAuth": []
400
+ "EitherAuth": []
387
401
  }
388
402
  ],
389
403
  "requestBody": {
@@ -432,21 +446,30 @@
432
446
  "post": {
433
447
  "operationId": "createMeterReadings",
434
448
  "summary": "Create Meter Readings",
435
- "description": "Inserts multiple meter readings at once.",
449
+ "description": "Inserts multiple meter readings at once. Limited to 100 readings per request.",
436
450
  "tags": [
437
451
  "ECP Admin",
438
452
  "ECP"
439
453
  ],
440
454
  "security": [
441
455
  {
442
- "EpilotAuth": []
443
- },
456
+ "EitherAuth": []
457
+ }
458
+ ],
459
+ "parameters": [
444
460
  {
445
- "PortalAuth": []
461
+ "in": "query",
462
+ "name": "async",
463
+ "description": "Don't wait for the reading to become available in GetReadings API. Useful for large migrations",
464
+ "required": false,
465
+ "schema": {
466
+ "type": "boolean",
467
+ "default": false
468
+ }
446
469
  }
447
470
  ],
448
471
  "requestBody": {
449
- "description": "Meter readings payload.",
472
+ "description": "Meter readings payload. Limited to 100 readings per request.",
450
473
  "required": true,
451
474
  "content": {
452
475
  "application/json": {
@@ -592,10 +615,7 @@
592
615
  ],
593
616
  "security": [
594
617
  {
595
- "EpilotAuth": []
596
- },
597
- {
598
- "PortalAuth": []
618
+ "EitherAuth": []
599
619
  }
600
620
  ],
601
621
  "parameters": [
@@ -732,10 +752,7 @@
732
752
  ],
733
753
  "security": [
734
754
  {
735
- "EpilotAuth": []
736
- },
737
- {
738
- "PortalAuth": []
755
+ "EitherAuth": []
739
756
  }
740
757
  ],
741
758
  "parameters": [
@@ -1055,10 +1072,7 @@
1055
1072
  ],
1056
1073
  "security": [
1057
1074
  {
1058
- "EpilotAuth": []
1059
- },
1060
- {
1061
- "PortalAuth": []
1075
+ "EitherAuth": []
1062
1076
  }
1063
1077
  ],
1064
1078
  "parameters": [
@@ -1204,16 +1218,6 @@
1204
1218
  }
1205
1219
  }
1206
1220
  },
1207
- "NotFound": {
1208
- "description": "The specified resource was not found",
1209
- "content": {
1210
- "application/json": {
1211
- "schema": {
1212
- "$ref": "#/components/schemas/ErrorResp"
1213
- }
1214
- }
1215
- }
1216
- },
1217
1221
  "InternalServerError": {
1218
1222
  "description": "Internal Server Error",
1219
1223
  "content": {
@@ -1237,6 +1241,11 @@
1237
1241
  "scheme": "bearer",
1238
1242
  "description": "Authorization header with customer portal OAuth2 bearer token",
1239
1243
  "bearerFormat": "JWT"
1244
+ },
1245
+ "EitherAuth": {
1246
+ "type": "http",
1247
+ "scheme": "bearer",
1248
+ "description": "Portal or Epilot Bearer Token"
1240
1249
  }
1241
1250
  },
1242
1251
  "schemas": {
@@ -1250,12 +1259,8 @@
1250
1259
  }
1251
1260
  },
1252
1261
  "EntityId": {
1253
- "type": "string"
1254
- },
1255
- "EntitySlug": {
1256
- "description": "URL-friendly identifier for the entity schema",
1257
1262
  "type": "string",
1258
- "example": "contact"
1263
+ "format": "uuid"
1259
1264
  },
1260
1265
  "BaseEntity": {
1261
1266
  "type": "object",
@@ -1329,8 +1334,7 @@
1329
1334
  "type": "object",
1330
1335
  "properties": {
1331
1336
  "entity_id": {
1332
- "type": "string",
1333
- "example": "9a2081a2-1615-44b8-b988-d757983290dd"
1337
+ "$ref": "#/components/schemas/EntityId"
1334
1338
  },
1335
1339
  "_slug": {
1336
1340
  "type": "string",
@@ -1476,12 +1480,27 @@
1476
1480
  "nt"
1477
1481
  ]
1478
1482
  },
1483
+ "Reason": {
1484
+ "type": "string",
1485
+ "nullable": true,
1486
+ "example": "Storing the feed-in record",
1487
+ "description": "The reason for recording the reading"
1488
+ },
1489
+ "ReadBy": {
1490
+ "type": "string",
1491
+ "nullable": true,
1492
+ "example": "John Doe",
1493
+ "description": "The person who recorded the reading"
1494
+ },
1479
1495
  "ReadingStatus": {
1480
1496
  "type": "string",
1497
+ "nullable": true,
1481
1498
  "enum": [
1482
1499
  "valid",
1483
1500
  "in-validation",
1484
- "implausible"
1501
+ "implausible",
1502
+ null,
1503
+ ""
1485
1504
  ]
1486
1505
  },
1487
1506
  "MeterReading": {
@@ -1498,23 +1517,17 @@
1498
1517
  "description": "The reading value of the meter"
1499
1518
  },
1500
1519
  "read_by": {
1501
- "type": "string",
1502
- "example": "John Doe",
1503
- "description": "The person who recorded the reading"
1520
+ "$ref": "#/components/schemas/ReadBy"
1504
1521
  },
1505
1522
  "reason": {
1506
- "type": "string",
1507
- "example": "Storing the feed-in record",
1508
- "description": "The reason for recording the reading"
1523
+ "$ref": "#/components/schemas/Reason"
1509
1524
  },
1510
1525
  "meter_id": {
1511
- "type": "string",
1512
- "example": "1446829f-4b6f-474e-b978-3997d89a7928",
1526
+ "$ref": "#/components/schemas/EntityId",
1513
1527
  "description": "The ID of the associated meter"
1514
1528
  },
1515
1529
  "counter_id": {
1516
- "type": "string",
1517
- "example": "991a1821-43bc-46b8-967d-64a3d87c31f8",
1530
+ "$ref": "#/components/schemas/EntityId",
1518
1531
  "description": "The ID of the associated meter counter"
1519
1532
  },
1520
1533
  "direction": {
@@ -1558,8 +1571,7 @@
1558
1571
  ],
1559
1572
  "properties": {
1560
1573
  "_id": {
1561
- "type": "string",
1562
- "example": "991a1821-43bc-46b8-967d-64a3d87c31f8"
1574
+ "$ref": "#/components/schemas/EntityId"
1563
1575
  },
1564
1576
  "_schema": {
1565
1577
  "type": "string",
@@ -1695,9 +1707,7 @@
1695
1707
  "description": "The person who recorded the reading"
1696
1708
  },
1697
1709
  "reason": {
1698
- "type": "string",
1699
- "example": "Storing the feed-in record",
1700
- "description": "The reason for recording the reading"
1710
+ "$ref": "#/components/schemas/Reason"
1701
1711
  },
1702
1712
  "maloId": {
1703
1713
  "type": "string",
@@ -1772,6 +1782,61 @@
1772
1782
  "journey-submission"
1773
1783
  ]
1774
1784
  },
1785
+ "ActionLabel": {
1786
+ "type": "object",
1787
+ "properties": {
1788
+ "en": {
1789
+ "type": "string",
1790
+ "nullable": true
1791
+ },
1792
+ "de": {
1793
+ "type": "string",
1794
+ "nullable": true
1795
+ }
1796
+ }
1797
+ },
1798
+ "Rule": {
1799
+ "type": "object",
1800
+ "properties": {
1801
+ "entity": {
1802
+ "type": "string",
1803
+ "nullable": true
1804
+ },
1805
+ "attribute": {
1806
+ "type": "string",
1807
+ "nullable": true
1808
+ },
1809
+ "attribute_value": {
1810
+ "type": "string",
1811
+ "nullable": true
1812
+ }
1813
+ }
1814
+ },
1815
+ "JourneyActions": {
1816
+ "type": "object",
1817
+ "properties": {
1818
+ "journey_id": {
1819
+ "type": "string",
1820
+ "nullable": true
1821
+ },
1822
+ "action_label": {
1823
+ "type": "object",
1824
+ "$ref": "#/components/schemas/ActionLabel",
1825
+ "nullable": true
1826
+ },
1827
+ "slug": {
1828
+ "type": "string",
1829
+ "nullable": true
1830
+ },
1831
+ "rules": {
1832
+ "type": "array",
1833
+ "items": {
1834
+ "$ref": "#/components/schemas/Rule"
1835
+ },
1836
+ "nullable": true
1837
+ }
1838
+ }
1839
+ },
1775
1840
  "ReadingWithMeter": {
1776
1841
  "type": "object",
1777
1842
  "properties": {
@@ -1807,14 +1872,10 @@
1807
1872
  "description": "The reading value"
1808
1873
  },
1809
1874
  "read_by": {
1810
- "type": "string",
1811
- "example": "John Doe",
1812
- "description": "The person who recorded the reading"
1875
+ "$ref": "#/components/schemas/ReadBy"
1813
1876
  },
1814
1877
  "reason": {
1815
- "type": "string",
1816
- "example": "Storing the feed-in record",
1817
- "description": "The reason for recording the reading"
1878
+ "$ref": "#/components/schemas/Reason"
1818
1879
  },
1819
1880
  "timestamp": {
1820
1881
  "type": "string",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/metering-client",
3
- "version": "0.5.5",
3
+ "version": "0.5.7",
4
4
  "description": "API Client for epilot Metering API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -48,7 +48,6 @@
48
48
  "axios": "^1.6.2"
49
49
  },
50
50
  "dependencies": {
51
- "ajv": "^8.16.0",
52
51
  "buffer": "^6.0.3",
53
52
  "https-browserify": "^1.0.0",
54
53
  "openapi-client-axios": "^7.5.1",
@@ -71,4 +70,4 @@
71
70
  "webpack": "^5.18.0",
72
71
  "webpack-cli": "^4.4.0"
73
72
  }
74
- }
73
+ }