@epilot/metering-client 0.5.3 → 0.5.5

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
@@ -518,9 +518,6 @@
518
518
  "application/json": {
519
519
  "schema": {
520
520
  "type": "object",
521
- "required": [
522
- "entity"
523
- ],
524
521
  "additionalProperties": true,
525
522
  "properties": {
526
523
  "org_id": {
@@ -530,9 +527,6 @@
530
527
  },
531
528
  "entity": {
532
529
  "type": "object",
533
- "required": [
534
- "meterReadings"
535
- ],
536
530
  "additionalProperties": true,
537
531
  "properties": {
538
532
  "_org": {
@@ -587,6 +581,91 @@
587
581
  }
588
582
  }
589
583
  },
584
+ "/v1/metering/allowed/reading/{meter_id}": {
585
+ "get": {
586
+ "operationId": "getAllowedReadingForMeter",
587
+ "summary": "getAllowedReadingForMeter",
588
+ "description": "Get allowed reading for the given meter",
589
+ "tags": [
590
+ "ECP Admin",
591
+ "ECP"
592
+ ],
593
+ "security": [
594
+ {
595
+ "EpilotAuth": []
596
+ },
597
+ {
598
+ "PortalAuth": []
599
+ }
600
+ ],
601
+ "parameters": [
602
+ {
603
+ "in": "path",
604
+ "name": "meter_id",
605
+ "schema": {
606
+ "$ref": "#/components/schemas/Id"
607
+ },
608
+ "required": true,
609
+ "description": "The ID of the meter."
610
+ },
611
+ {
612
+ "in": "query",
613
+ "name": "timestamp",
614
+ "required": false,
615
+ "description": "If not provided, the system will default to now.",
616
+ "schema": {
617
+ "type": "string",
618
+ "example": "2022-10-01T10:10:00.000Z"
619
+ }
620
+ }
621
+ ],
622
+ "responses": {
623
+ "200": {
624
+ "description": "Recent reading for the meter fetched successfully.",
625
+ "content": {
626
+ "application/json": {
627
+ "schema": {
628
+ "type": "object",
629
+ "properties": {
630
+ "data": {
631
+ "type": "array",
632
+ "items": {
633
+ "type": "object",
634
+ "properties": {
635
+ "counter_id": {
636
+ "$ref": "#/components/schemas/Id"
637
+ },
638
+ "min_value": {
639
+ "type": "number",
640
+ "description": "Minimum allowed reading value for the meter"
641
+ },
642
+ "max_value": {
643
+ "type": "number",
644
+ "description": "Maximum allowed reading value for the meter"
645
+ }
646
+ }
647
+ }
648
+ }
649
+ }
650
+ }
651
+ }
652
+ }
653
+ },
654
+ "400": {
655
+ "$ref": "#/components/responses/InvalidRequest"
656
+ },
657
+ "401": {
658
+ "$ref": "#/components/responses/Unauthorized"
659
+ },
660
+ "403": {
661
+ "$ref": "#/components/responses/Forbidden"
662
+ },
663
+ "500": {
664
+ "$ref": "#/components/responses/InternalServerError"
665
+ }
666
+ }
667
+ }
668
+ },
590
669
  "/v1/metering/reading/with-meter": {
591
670
  "post": {
592
671
  "operationId": "createReadingWithMeter",
@@ -1125,6 +1204,16 @@
1125
1204
  }
1126
1205
  }
1127
1206
  },
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
+ },
1128
1217
  "InternalServerError": {
1129
1218
  "description": "Internal Server Error",
1130
1219
  "content": {
@@ -1163,6 +1252,11 @@
1163
1252
  "EntityId": {
1164
1253
  "type": "string"
1165
1254
  },
1255
+ "EntitySlug": {
1256
+ "description": "URL-friendly identifier for the entity schema",
1257
+ "type": "string",
1258
+ "example": "contact"
1259
+ },
1166
1260
  "BaseEntity": {
1167
1261
  "type": "object",
1168
1262
  "properties": {
@@ -1572,7 +1666,7 @@
1572
1666
  "required": [
1573
1667
  "meterId"
1574
1668
  ],
1575
- "additionalProperties": true,
1669
+ "nullable": true,
1576
1670
  "properties": {
1577
1671
  "meterId": {
1578
1672
  "$ref": "#/components/schemas/Id",
@@ -1586,8 +1680,8 @@
1586
1680
  "description": "- The counter readings of a meter\n- This is only sent when the user is authenticated while submitting a journey\n"
1587
1681
  },
1588
1682
  "readingValue": {
1589
- "type": "string",
1590
- "example": "240",
1683
+ "type": "number",
1684
+ "example": 240,
1591
1685
  "description": "The reading value of the meter when the counterId is passed or when the meterType is one-tariff"
1592
1686
  },
1593
1687
  "readingDate": {