@epilot/metering-client 0.2.4 → 0.2.6
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/definition.js +1 -1
- package/dist/openapi.d.ts +324 -266
- package/package.json +1 -1
package/dist/definition.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){for(var r in t)e[r]=t[r];t.__esModule&&Object.defineProperty(e,"__esModule",{value:!0})}(exports,(()=>{"use strict";var e={914:function(e,t,r){var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var n=i(r(279));t.default=n.default},279:e=>{e.exports=JSON.parse('{"openapi":"3.0.3","info":{"title":"Metering API","version":"1.0.0"},"tags":[{"name":"Epilot_360","description":"Epilot_360"},{"name":"ECP","description":"End customer portal"}],"security":[{"EpilotAuth":[]},{"PortalAuth":[]}],"paths":{"/v1/metering/meter":{"get":{"operationId":"getCustomerMeters","summary":"getCustomerMeters","description":"Get All meters related to a customer","tags":["ECP"],"security":[{"EpilotAuth":[]},{"PortalAuth":[]}],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Meter"}}}}}}}}}},"/v1/metering/meter/{id}":{"patch":{"operationId":"updateMeter","summary":"updateMeter","description":"Update the Meter details","tags":["ECP"],"security":[{"PortalAuth":[]}],"parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/EntityId"},"required":true,"description":"The Id of meter"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Entity"}}}},"responses":{"200":{"description":"The returned meter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityItem"}}}}}},"get":{"operationId":"getMeter","summary":"getMeter","description":"Get the Meter details","tags":["ECP"],"security":[{"PortalAuth":[]}],"parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/EntityId"},"required":true,"description":"The Id of meter"}],"responses":{"200":{"description":"The returned meter","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"entity":{"$ref":"#/components/schemas/EntityItem"},"relations":{"type":"array","items":{"$ref":"#/components/schemas/EntityItem"}}}}}}}}}}}},"/v1/metering/counter":{"get":{"operationId":"getMeterCounters","summary":"getMeterCounters","description":"Get all counters for a given meter","tags":["ECP"],"security":[{"EpilotAuth":[]},{"PortalAuth":[]}],"parameters":[{"in":"query","name":"meter_id","required":true,"schema":{"type":"string","example":"1446829f-4b6f-474e-b978-3997d89a7928"}}],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/MeterCounter"}}}}}}}}}},"/v1/metering/counter/{counter_id}":{"get":{"operationId":"getCounterDetails","summary":"getCounterDetails","description":"Get details for a meter counter","tags":["ECP"],"security":[{"EpilotAuth":[]},{"PortalAuth":[]}],"parameters":[{"in":"path","name":"counter_id","schema":{"$ref":"#/components/schemas/Id"},"required":true,"description":"The Id of a Counter"}],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/MeterCounter"}}}}}}}}},"/v1/metering/reading":{"post":{"operationId":"createMeterReading","summary":"createMeterReading","description":"This operation inserts a new meter reading","tags":["Epilot_360","ECP"],"security":[{"EpilotAuth":[]},{"PortalAuth":[]}],"requestBody":{"description":"Meter reading payload","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeterReading"}}}},"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/MeterReading"}}}}}}}}},"/v1/metering/readings":{"post":{"operationId":"createMeterReadings","summary":"createMeterReadings","description":"This operation inserts a multiple meter readings at once, e.g; to submit bi-directional data (feed-in & feed-out) in a journey","tags":["Epilot_360","ECP"],"security":[{"EpilotAuth":[]},{"PortalAuth":[]}],"requestBody":{"description":"Meter readings payload","required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"readings":{"type":"array","items":{"$ref":"#/components/schemas/MeterReading"}}}}}}},"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/MeterReading"}}}}}}}}}},"/v1/metering/reading/submission":{"post":{"operationId":"createMeterReadingFromSubmission","summary":"createMeterReadingFromSubmission","description":"This operation lets to create reading from a journey submission.","tags":["Epilot_360"],"security":[{"EpilotAuth":[]}],"requestBody":{"description":"Meter reading payload","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmissionMeterReading"}}}},"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/MeterReading"}}}}}}}}},"/v1/metering/reading/with-meter":{"post":{"operationId":"createReadingWithMeter","summary":"createReadingWithMeter","description":"This operation lets to create reading along with a meter.","tags":["Epilot_360"],"security":[{"EpilotAuth":[]}],"requestBody":{"description":"Meter reading payload","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReadingWithMeter"}}}},"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/MeterReading"}}}}}}}}},"/v1/metering/reading/{meter_id}/{counter_id}":{"get":{"operationId":"getReadingsByInterval","summary":"getReadingsByInterval","description":"- Get all readings specified in an interval\\n- If the start_date & end_date are equal, then returns the readings of the specified date\\n- start_date should <= end_date\\n","tags":["Epilot_360","ECP"],"security":[{"EpilotAuth":[]},{"PortalAuth":[]}],"parameters":[{"in":"path","name":"meter_id","schema":{"$ref":"#/components/schemas/Id"},"required":true,"description":"The Id of meter"},{"in":"path","name":"counter_id","schema":{"$ref":"#/components/schemas/Id"},"required":true,"description":"The Id of counter"},{"in":"query","name":"start_date","required":false,"description":"If the value is not provided, the system will default to the date 10 years ago","schema":{"type":"string","example":"2022-10-01T00:00:00.000Z"}},{"in":"query","name":"end_date","required":false,"description":"If the value is not provided, the system will default to today","schema":{"type":"string","example":"2022-10-10T00:00:00.000Z"}},{"in":"query","name":"direction","required":false,"schema":{"$ref":"#/components/schemas/Direction"}},{"in":"query","name":"size","description":"- Returns the first n results after the specified offset(from).\\n- If this value is provided with -1, then returns all results at once.\\n","required":false,"schema":{"type":"number","example":20,"default":20}},{"in":"query","name":"from","required":false,"schema":{"type":"number","example":0,"default":0}},{"in":"query","name":"type","required":true,"description":"- Since meter readings are cumulative, Users may need to request actual consumptions which are the difference between consecutive measurements.\\n- If this value is provided with \\"cumulative\\", then actual readings will be return.\\n- If this value is provided with \\"relative\\", then actual consumption will be return.\\n","schema":{"type":"string","default":"cumulative","enum":["cumulative","relative"]}}],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/MeterReading"}},"hits":{"type":"number","example":120},"firstRecordCreatedAt":{"type":"string","example":"2022-10-01T20:00:00.000Z"}}}}}}}},"put":{"operationId":"updateMeterReading","summary":"updateMeterReading","description":"This operation updates a meter reading","tags":["Epilot_360"],"security":[{"EpilotAuth":[]}],"parameters":[{"in":"path","name":"meter_id","schema":{"$ref":"#/components/schemas/Id"},"required":true,"description":"The Id of meter entity"},{"in":"path","name":"counter_id","schema":{"$ref":"#/components/schemas/Id"},"required":true,"description":"The Id of counter entity"},{"in":"query","name":"timestamp","required":true,"description":"Timestamp when the reading was created at","schema":{"type":"string","example":"2022-10-01T20:00:00.000Z"}}],"requestBody":{"description":"Update Meter reading payload","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeterReading"}}}},"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/MeterReading"}}}}}}}},"delete":{"operationId":"deleteMeterReading","summary":"deleteMeterReading","description":"This operation deletes a meter reading","tags":["Epilot_360"],"security":[{"EpilotAuth":[]}],"parameters":[{"in":"path","name":"meter_id","schema":{"$ref":"#/components/schemas/Id"},"required":true,"description":"The Id of meter entity"},{"in":"path","name":"counter_id","schema":{"$ref":"#/components/schemas/Id"},"required":true,"description":"The Id of counter entity"},{"in":"query","name":"timestamp","required":true,"description":"Timestamp when the reading was created at","schema":{"type":"string","example":"2022-10-01T20:00:00.000Z"}}],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"meterId":{"$ref":"#/components/schemas/Id"},"counterId":{"$ref":"#/components/schemas/Id"},"timestamp":{"type":"string","example":"2022-10-01T20:00:00.000Z"}}}}}}}}}}},"/v1/metering/down-sample/readings/{meter_id}/{counter_id}":{"get":{"operationId":"getDownSampleReadingsByInterval","summary":"getDownSampleReadingsByInterval","description":"- Get the down sampled data of the entire readings specified in an interval\\n- If the start_date & end_date are equal, then returns the readings of the specified date\\n- start_date should <= end_date\\n","tags":["Epilot_360","ECP"],"security":[{"EpilotAuth":[]},{"PortalAuth":[]}],"parameters":[{"in":"path","name":"meter_id","schema":{"$ref":"#/components/schemas/Id"},"required":true,"description":"The Id of meter"},{"in":"path","name":"counter_id","schema":{"$ref":"#/components/schemas/Id"},"required":true,"description":"The Id of counter"},{"in":"query","name":"start_date","required":false,"description":"If the value is not provided, the system will default to the date 10 years ago","schema":{"type":"string","example":"2022-10-01T00:00:00.000Z"}},{"in":"query","name":"end_date","required":false,"description":"If the value is not provided, the system will default to today","schema":{"type":"string","example":"2022-10-10T00:00:00.000Z"}},{"in":"query","name":"group_by","schema":{"type":"string","default":"day","enum":["day","week","month","year"]}},{"in":"query","name":"direction","required":false,"schema":{"$ref":"#/components/schemas/Direction"}}],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/MeterReading"}}}}}}}}}}},"components":{"securitySchemes":{"EpilotAuth":{"type":"http","scheme":"bearer","description":"Authorization header with epilot OAuth2 bearer token","bearerFormat":"JWT"},"PortalAuth":{"type":"http","scheme":"bearer","description":"Authorization header with customer pilot OAuth2 bearer token","bearerFormat":"JWT"}},"schemas":{"EntityId":{"type":"string"},"EntitySlug":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"BaseEntity":{"type":"object","properties":{"_id":{"$ref":"#/components/schemas/EntityId"},"_title":{"type":"string","description":"Title of entity"},"_org":{"type":"string","description":"Organization Id the entity belongs to"},"_schema":{"$ref":"#/components/schemas/EntitySlug"},"_tags":{"type":"array","items":{"type":"string"}},"_created_at":{"type":"string"},"_updated_at":{"type":"string"}},"required":["_id","_title","_org","_schema","_created_at","_updated_at"],"example":{"_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","_org":"123","_schema":"contact","_tags":["example","mock"],"_created_at":"2021-02-09T12:41:43.662Z","_updated_at":"2021-02-09T12:41:43.662Z"}},"Entity":{"type":"object","properties":{},"additionalProperties":true},"EntityItem":{"allOf":[{"$ref":"#/components/schemas/BaseEntity"},{"$ref":"#/components/schemas/Entity"}]},"Id":{"type":"string"},"EntityRelation":{"type":"object","properties":{"entity_id":{"type":"string","example":"9a2081a2-1615-44b8-b988-d757983290dd"},"_slug":{"type":"string","enum":["contact","contract"]}}},"Meter":{"allOf":[{"$ref":"#/components/schemas/BaseEntity"},{"type":"object","properties":{"_id":{"type":"string","example":"991a1821-43bc-46b8-967d-64a3d87c31f8"},"ma_lo_id":{"type":"string","example":"A09-123"},"meter_type":{"type":"string","enum":["three-phase-meter","bellow-gas-meter","rotary-piston-meter","smart-meter","performance-meter","maximum-meter","turbine-gas-meter","ultrasonic-gas-meter","alternating-current-meter","modern-metering-system","intelligent-measuring-system","electronic-meter"]},"tariff_type":{"type":"string","example":"Peak load tariff"},"meter_number":{"type":"string","example":"J-1093-1AK"},"sector":{"type":"string","enum":["power","water","gas"]},"location":{"type":"object","example":[{"country":"Germany","city":"Koln","postal_code":81475,"street":"Melatengürtel","street_number":71,"additional_info":"5. Etage","_tags":["billing","delivery"]}]},"used_for":{"type":"string","example":"Domestic Usage"},"manufacturer":{"type":"string","example":"Energy One"},"calibration_date":{"type":"string","example":"2022-10-10T00:00:00.000Z"},"contract":{"type":"object","properties":{"$relation":{"type":"array","items":{"$ref":"#/components/schemas/EntityRelation"}}}},"customer":{"type":"object","properties":{"$relation":{"type":"array","items":{"$ref":"#/components/schemas/EntityRelation"}}}}}}]},"Direction":{"type":"string","enum":["feed-in","feed-out"]},"TariffType":{"type":"string","enum":["ht","nt"]},"MeterReading":{"type":"object","properties":{"value":{"type":"number","example":240},"read_by":{"type":"string","example":"John Doe"},"reason":{"type":"string","example":"Storing the feed-in record"},"meter_id":{"type":"string","example":"1446829f-4b6f-474e-b978-3997d89a7928"},"counter_id":{"type":"string","example":"991a1821-43bc-46b8-967d-64a3d87c31f8"},"direction":{"$ref":"#/components/schemas/Direction"},"timestamp":{"type":"string","description":"If the value is not provided, the system will be set with the time the request is processed.","example":"2022-10-10T00:00:00.000Z"},"source":{"$ref":"#/components/schemas/Source"}}},"MeterCounter":{"allOf":[{"$ref":"#/components/schemas/BaseEntity"},{"type":"object","properties":{"_id":{"type":"string","example":"991a1821-43bc-46b8-967d-64a3d87c31f8"},"obis_number":{"type":"string","example":"A-34"},"direction":{"$ref":"#/components/schemas/Direction"},"transformer_ratio":{"type":"number","example":70},"unit":{"$ref":"#/components/schemas/Unit"},"forecast_reading_value":{"type":"string","example":270},"forecast_as_of":{"type":"string","example":"2022-12-10T00:00:00.000Z"},"current_consumption":{"type":"number","example":240},"last_reading":{"type":"string","example":"2022-10-10T00:00:00.000Z"},"conversion_factor":{"type":"number","example":3},"tariff_type":{"$ref":"#/components/schemas/TariffType"}}}]},"SubmissionMeterReading":{"type":"object","properties":{},"additionalProperties":true},"Unit":{"type":"string","enum":["w","wh","kw","kWh","kvarh","mw","mWh","unit","cubic-meter","hour","day","month","year","percentage"]},"Source":{"type":"string","enum":["ECP","ERP","360","journey-submission"]},"ReadingWithMeter":{"type":"object","properties":{"ma_lo_id":{"type":"string","example":"A09-123"},"meter_id":{"$ref":"#/components/schemas/Id"},"obis_number":{"type":"string","example":"A-34"},"unit":{"$ref":"#/components/schemas/Unit"},"direction":{"$ref":"#/components/schemas/Direction"},"tariff_type":{"$ref":"#/components/schemas/TariffType"},"value":{"type":"number","example":240},"read_by":{"type":"string","example":"John Doe"},"reason":{"type":"string","example":"Storing the feed-in record"},"timestamp":{"type":"string","description":"If the value is not provided, the system will be set with the time the request is processed.","example":"2022-10-10T10:10:00.000Z"},"source":{"$ref":"#/components/schemas/Source"}}}}}}')}},t={};return function r(i){if(t[i])return t[i].exports;var n=t[i]={exports:{}};return e[i].call(n.exports,n,n.exports,r),n.exports}(914)})());
|
|
1
|
+
!function(e,t){for(var r in t)e[r]=t[r];t.__esModule&&Object.defineProperty(e,"__esModule",{value:!0})}(exports,(()=>{"use strict";var e={914:function(e,t,r){var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var n=s(r(279));t.default=n.default},279:e=>{e.exports=JSON.parse('{"openapi":"3.0.3","info":{"title":"Metering API","version":"1.0.0"},"tags":[{"name":"ECP","description":"APIs defined for a portal user"},{"name":"ECP Admin","description":"APIs defined for a ECP Admin"}],"security":[{"EpilotAuth":[]},{"PortalAuth":[]}],"paths":{"/v1/metering/meter":{"get":{"operationId":"getCustomerMeters","summary":"Get Customer Meters","description":"Retrieves all meters related to a customer.","tags":["ECP"],"security":[{"PortalAuth":[]}],"responses":{"200":{"description":"Customer meters retrieved successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Meter"}}}}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/v1/metering/meter/{id}":{"patch":{"operationId":"updateMeter","summary":"Update Meter","description":"Updates the details of a meter.","tags":["ECP"],"security":[{"PortalAuth":[]}],"parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/EntityId"},"required":true,"description":"The ID of the meter."}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Meter"}}}},"responses":{"200":{"description":"Meter updated successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Meter"}}}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"get":{"operationId":"getMeter","summary":"Get Meter","description":"Retrieves the details of a meter.","tags":["ECP"],"security":[{"PortalAuth":[]}],"parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/EntityId"},"required":true,"description":"The ID of the meter."}],"responses":{"200":{"description":"Meter retrieved successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"entity":{"$ref":"#/components/schemas/Meter"},"relations":{"type":"array","items":{"$ref":"#/components/schemas/EntityItem"}}}}}}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/v1/metering/counter":{"get":{"operationId":"getMeterCounters","summary":"Get Meter Counters","description":"Retrieves all counters for a given meter.","tags":["ECP"],"security":[{"PortalAuth":[]}],"parameters":[{"in":"query","name":"meter_id","required":true,"schema":{"type":"string","example":"1446829f-4b6f-474e-b978-3997d89a7928"}}],"responses":{"200":{"description":"Counters retrieved successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/MeterCounter"}}}}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/v1/metering/counter/{counter_id}":{"get":{"operationId":"getCounterDetails","summary":"Get Counter Details","description":"Retrieves the details of a meter counter.","tags":["ECP"],"security":[{"PortalAuth":[]}],"parameters":[{"in":"path","name":"counter_id","schema":{"$ref":"#/components/schemas/Id"},"required":true,"description":"The ID of the counter."}],"responses":{"200":{"description":"Counter details retrieved successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/MeterCounter"}}}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/v1/metering/reading":{"post":{"operationId":"createMeterReading","summary":"Create Meter Reading","description":"Inserts a new meter reading.","tags":["ECP Admin","ECP"],"security":[{"EpilotAuth":[]},{"PortalAuth":[]}],"requestBody":{"description":"Meter reading payload.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeterReading"}}}},"responses":{"200":{"description":"Meter reading created successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/MeterReading"}}}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/v1/metering/readings":{"post":{"operationId":"createMeterReadings","summary":"Create Meter Readings","description":"Inserts multiple meter readings at once.","tags":["ECP Admin","ECP"],"security":[{"EpilotAuth":[]},{"PortalAuth":[]}],"requestBody":{"description":"Meter readings payload.","required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"readings":{"type":"array","items":{"$ref":"#/components/schemas/MeterReading"}}}}}}},"responses":{"200":{"description":"Meter readings created successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/MeterReading"}}}}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/v1/metering/reading/submission":{"post":{"operationId":"createMeterReadingFromSubmission","summary":"Create Meter Reading from Submission","description":"Creates a reading from a journey submission.","tags":["ECP Admin"],"security":[{"EpilotAuth":[]}],"requestBody":{"description":"Meter reading payload.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmissionMeterReading"}}}},"responses":{"200":{"description":"Meter reading created successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","enum":["Successfully Processed"]}}}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/v1/metering/reading/with-meter":{"post":{"operationId":"createReadingWithMeter","summary":"Create Reading with Meter","description":"Creates a reading along with a meter.","tags":["ECP Admin"],"security":[{"EpilotAuth":[]}],"requestBody":{"description":"Meter reading payload.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReadingWithMeter"}}}},"responses":{"200":{"description":"Reading with meter created successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/MeterReading"}}}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/v1/metering/reading/{meter_id}/{counter_id}":{"get":{"operationId":"getReadingsByInterval","summary":"Get Readings by Interval","description":"Retrieves all readings specified in an interval.\\nIf the start_date and end_date are equal, then it returns the readings of the specified date.\\nThe start_date should be less than or equal to the end_date.\\n","tags":["ECP Admin","ECP"],"security":[{"EpilotAuth":[]},{"PortalAuth":[]}],"parameters":[{"in":"path","name":"meter_id","schema":{"$ref":"#/components/schemas/Id"},"required":true,"description":"The ID of the meter."},{"in":"path","name":"counter_id","schema":{"$ref":"#/components/schemas/Id"},"required":true,"description":"The ID of the counter."},{"in":"query","name":"start_date","required":false,"description":"If not provided, the system will default to the date 10 years ago.","schema":{"type":"string","example":"2022-10-01"}},{"in":"query","name":"end_date","required":false,"description":"If not provided, the system will default to today\'s date.","schema":{"type":"string","example":"2022-10-10"}},{"in":"query","name":"direction","required":false,"schema":{"$ref":"#/components/schemas/Direction"}},{"in":"query","name":"size","description":"Returns the first n results after the specified offset (from).\\nIf this value is provided as -1, then it returns all results at once.\\n","required":false,"schema":{"type":"number","example":20,"default":20}},{"in":"query","name":"from","required":false,"schema":{"type":"number","example":0,"default":0}},{"in":"query","name":"type","required":true,"description":"Since meter readings are cumulative, users may need to request actual consumptions, which are the difference between consecutive measurements.\\nIf this value is provided as \\"cumulative\\", then actual readings will be returned.\\nIf this value is provided as \\"relative\\", then actual consumption will be returned.\\n","schema":{"type":"string","default":"cumulative","enum":["cumulative","relative"]}}],"responses":{"200":{"description":"Readings retrieved successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/MeterReading"}},"hits":{"type":"number","example":120},"firstRecordCreatedAt":{"type":"string","example":"2022-10-01T20:00:00.000Z"}}}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"put":{"operationId":"updateMeterReading","summary":"Update Meter Reading","description":"Updates a meter reading.","tags":["ECP Admin"],"security":[{"EpilotAuth":[]}],"parameters":[{"in":"path","name":"meter_id","schema":{"$ref":"#/components/schemas/Id"},"required":true,"description":"The ID of the meter entity."},{"in":"path","name":"counter_id","schema":{"$ref":"#/components/schemas/Id"},"required":true,"description":"The ID of the counter entity."},{"in":"query","name":"timestamp","required":true,"description":"The timestamp when the reading was created.","schema":{"type":"string","example":"2022-10-01T20:00:00.000Z"}}],"requestBody":{"description":"Update meter reading payload.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeterReading"}}}},"responses":{"200":{"description":"Meter reading updated successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/MeterReading"}}}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"delete":{"operationId":"deleteMeterReading","summary":"Delete Meter Reading","description":"Deletes a meter reading.","tags":["ECP Admin"],"security":[{"EpilotAuth":[]}],"parameters":[{"in":"path","name":"meter_id","schema":{"$ref":"#/components/schemas/Id"},"required":true,"description":"The ID of the meter entity."},{"in":"path","name":"counter_id","schema":{"$ref":"#/components/schemas/Id"},"required":true,"description":"The ID of the counter entity."},{"in":"query","name":"timestamp","required":true,"description":"The timestamp when the reading was created.","schema":{"type":"string","example":"2022-10-01T20:00:00.000Z"}}],"responses":{"200":{"description":"Meter reading deleted successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"meterId":{"$ref":"#/components/schemas/Id"},"counterId":{"$ref":"#/components/schemas/Id"},"timestamp":{"type":"string","example":"2022-10-01T20:00:00.000Z"}}}}}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/v1/metering/down-sample/readings/{meter_id}/{counter_id}":{"get":{"operationId":"getDownSampleReadingsByInterval","summary":"Get Down Sample Readings by Interval","description":"Retrieves the downsampled data of the entire readings specified in an interval.\\nIf the start_date and end_date are equal, then it returns the readings of the specified date.\\nThe start_date should be less than or equal to the end_date.\\n","tags":["ECP Admin","ECP"],"security":[{"EpilotAuth":[]},{"PortalAuth":[]}],"parameters":[{"in":"path","name":"meter_id","schema":{"$ref":"#/components/schemas/Id"},"required":true,"description":"The ID of the meter."},{"in":"path","name":"counter_id","schema":{"$ref":"#/components/schemas/Id"},"required":true,"description":"The ID of the counter."},{"in":"query","name":"start_date","required":false,"description":"If not provided, the system will default to the date 10 years ago.","schema":{"type":"string","example":"2022-10-01"}},{"in":"query","name":"end_date","required":false,"description":"If not provided, the system will default to today\'s date.","schema":{"type":"string","example":"2022-10-10"}},{"in":"query","name":"group_by","schema":{"type":"string","default":"day","enum":["day","week","month","year"]}},{"in":"query","name":"direction","required":false,"schema":{"$ref":"#/components/schemas/Direction"}}],"responses":{"200":{"description":"Downsampled readings retrieved successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/MeterReading"}}}}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}},"components":{"responses":{"InvalidRequest":{"description":"The request could not be validated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResp"}}}},"Unauthorized":{"description":"Could not authenticate the user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResp"}}}},"Forbidden":{"description":"The user is not allowed to access this resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResp"}}}},"NotFound":{"description":"The specified resource was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResp"}}}},"InternalServerError":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResp"}}}}},"securitySchemes":{"EpilotAuth":{"type":"http","scheme":"bearer","description":"Authorization header with ePilot OAuth2 bearer token","bearerFormat":"JWT"},"PortalAuth":{"type":"http","scheme":"bearer","description":"Authorization header with customer portal OAuth2 bearer token","bearerFormat":"JWT"}},"schemas":{"ErrorResp":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}},"EntityId":{"type":"string"},"EntitySlug":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"BaseEntity":{"type":"object","properties":{"_id":{"$ref":"#/components/schemas/EntityId","description":"Entity ID","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6"},"_title":{"type":"string","description":"Title of the entity","example":"Example Entity"},"_org":{"type":"string","description":"Organization ID the entity belongs to","example":"123"},"_tags":{"type":"array","items":{"type":"string"},"description":"Array of entity tags","example":["example","mock"]},"_created_at":{"type":"string","format":"date-time","description":"Creation timestamp of the entity","example":"2021-02-09T12:41:43.662Z"},"_updated_at":{"type":"string","format":"date-time","description":"Last update timestamp of the entity","example":"2021-02-09T12:41:43.662Z"}}},"Entity":{"type":"object","properties":{},"additionalProperties":true},"EntityItem":{"allOf":[{"$ref":"#/components/schemas/BaseEntity"},{"$ref":"#/components/schemas/Entity"}]},"Id":{"type":"string"},"EntityRelation":{"type":"object","properties":{"entity_id":{"type":"string","example":"9a2081a2-1615-44b8-b988-d757983290dd"},"_slug":{"type":"string","enum":["contact","contract"]}}},"Meter":{"allOf":[{"$ref":"#/components/schemas/BaseEntity"},{"type":"object","required":["_schema"],"properties":{"_schema":{"type":"string","enum":["meter"],"description":"The schema type of the meter"},"ma_lo_id":{"type":"string","example":"A09-123","description":"The MA-LO ID of the meter"},"meter_type":{"type":"string","enum":["three-phase-meter","bellow-gas-meter","rotary-piston-meter","smart-meter","performance-meter","maximum-meter","turbine-gas-meter","ultrasonic-gas-meter","alternating-current-meter","modern-metering-system","intelligent-measuring-system","electronic-meter"],"description":"The type of the meter"},"tariff_type":{"type":"string","example":"Peak load tariff","description":"The tariff type of the meter"},"meter_number":{"type":"string","example":"J-1093-1AK","description":"The number of the meter"},"sector":{"type":"string","enum":["power","water","gas"],"description":"The sector to which the meter belongs"},"location":{"type":"object","example":[{"country":"Germany","city":"Koln","postal_code":81475,"street":"Melatengürtel","street_number":71,"additional_info":"5. Etage","_tags":["billing","delivery"]}],"description":"The location information of the meter"},"used_for":{"type":"string","example":"Domestic Usage","description":"The usage purpose of the meter"},"manufacturer":{"type":"string","example":"Energy One","description":"The manufacturer of the meter"},"calibration_date":{"type":"string","example":"2022-10-10T00:00:00.000Z","description":"The calibration date of the meter"},"contract":{"type":"object","properties":{"$relation":{"type":"array","items":{"$ref":"#/components/schemas/EntityRelation"}}},"description":"The contract associated with the meter"},"customer":{"type":"object","properties":{"$relation":{"type":"array","items":{"$ref":"#/components/schemas/EntityRelation"}}},"description":"The customer associated with the meter"}}}]},"Direction":{"type":"string","enum":["feed-in","feed-out"]},"TariffType":{"type":"string","enum":["ht","nt"]},"MeterReading":{"type":"object","properties":{"value":{"type":"number","example":240,"description":"The reading value of the meter"},"read_by":{"type":"string","example":"John Doe","description":"The person who recorded the reading"},"reason":{"type":"string","example":"Storing the feed-in record","description":"The reason for recording the reading"},"meter_id":{"type":"string","example":"1446829f-4b6f-474e-b978-3997d89a7928","description":"The ID of the associated meter"},"counter_id":{"type":"string","example":"991a1821-43bc-46b8-967d-64a3d87c31f8","description":"The ID of the associated meter counter"},"direction":{"$ref":"#/components/schemas/Direction","description":"The direction of the reading (feed-in or feed-out)"},"timestamp":{"type":"string","description":"If the value is not provided, the system will be set with the time the request is processed.","example":"2022-10-10T00:00:00.000Z"},"source":{"$ref":"#/components/schemas/Source","description":"The source of the reading"}}},"MeterCounter":{"allOf":[{"$ref":"#/components/schemas/BaseEntity"},{"type":"object","required":["_schema"],"properties":{"_id":{"type":"string","example":"991a1821-43bc-46b8-967d-64a3d87c31f8"},"_schema":{"type":"string","enum":["meter_counter"]},"obis_number":{"type":"string","example":"A-34","description":"The OBIS number of the meter counter"},"direction":{"$ref":"#/components/schemas/Direction","description":"The direction of the meter counter"},"transformer_ratio":{"type":"number","example":70,"description":"The transformer ratio of the meter counter"},"unit":{"$ref":"#/components/schemas/Unit","description":"The unit of measurement for the meter counter"},"forecast_reading_value":{"type":"string","example":270,"description":"The forecast reading value of the meter counter"},"forecast_as_of":{"type":"string","example":"2022-12-10T00:00:00.000Z","description":"The date as of which the forecast reading value is applicable"},"current_consumption":{"type":"number","example":240,"description":"The current consumption value of the meter counter"},"last_reading":{"type":"string","example":"2022-10-10T00:00:00.000Z","description":"The timestamp of the last reading"},"conversion_factor":{"type":"number","example":3,"description":"The conversion factor for the meter counter"},"tariff_type":{"$ref":"#/components/schemas/TariffType","description":"The tariff type of the meter counter"}}}]},"SubmissionMeterReading":{"type":"object","properties":{},"additionalProperties":true},"Unit":{"type":"string","enum":["w","wh","kw","kWh","kvarh","mw","mWh","unit","cubic-meter","hour","day","month","year","percentage"]},"Source":{"type":"string","enum":["ECP","ERP","360","journey-submission"]},"ReadingWithMeter":{"type":"object","properties":{"ma_lo_id":{"type":"string","example":"A09-123","description":"The MA-LO ID of the meter"},"meter_id":{"$ref":"#/components/schemas/Id","description":"The ID of the associated meter"},"obis_number":{"type":"string","example":"A-34","description":"The OBIS number of the meter counter"},"unit":{"$ref":"#/components/schemas/Unit","description":"The unit of measurement for the reading"},"direction":{"$ref":"#/components/schemas/Direction","description":"The direction of the reading"},"tariff_type":{"$ref":"#/components/schemas/TariffType","description":"The tariff type of the reading"},"value":{"type":"number","example":240,"description":"The reading value"},"read_by":{"type":"string","example":"John Doe","description":"The person who recorded the reading"},"reason":{"type":"string","example":"Storing the feed-in record","description":"The reason for recording the reading"},"timestamp":{"type":"string","description":"If the value is not provided, the system will be set with the time the request is processed.","example":"2022-10-10T10:10:00.000Z"},"source":{"$ref":"#/components/schemas/Source","description":"The source of the reading"}}}}}}')}},t={};return function r(s){if(t[s])return t[s].exports;var n=t[s]={exports:{}};return e[s].call(n.exports,n,n.exports,r),n.exports}(914)})());
|
package/dist/openapi.d.ts
CHANGED
|
@@ -8,80 +8,96 @@ import type {
|
|
|
8
8
|
} from 'openapi-client-axios';
|
|
9
9
|
|
|
10
10
|
declare namespace Components {
|
|
11
|
+
namespace Responses {
|
|
12
|
+
export type Forbidden = Schemas.ErrorResp;
|
|
13
|
+
export type InternalServerError = Schemas.ErrorResp;
|
|
14
|
+
export type InvalidRequest = Schemas.ErrorResp;
|
|
15
|
+
export type NotFound = Schemas.ErrorResp;
|
|
16
|
+
export type Unauthorized = Schemas.ErrorResp;
|
|
17
|
+
}
|
|
11
18
|
namespace Schemas {
|
|
12
|
-
/**
|
|
13
|
-
* example:
|
|
14
|
-
* {
|
|
15
|
-
* "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
|
|
16
|
-
* "_org": "123",
|
|
17
|
-
* "_schema": "contact",
|
|
18
|
-
* "_tags": [
|
|
19
|
-
* "example",
|
|
20
|
-
* "mock"
|
|
21
|
-
* ],
|
|
22
|
-
* "_created_at": "2021-02-09T12:41:43.662Z",
|
|
23
|
-
* "_updated_at": "2021-02-09T12:41:43.662Z"
|
|
24
|
-
* }
|
|
25
|
-
*/
|
|
26
19
|
export interface BaseEntity {
|
|
27
|
-
_id: EntityId;
|
|
28
20
|
/**
|
|
29
|
-
*
|
|
21
|
+
* Entity ID
|
|
22
|
+
* example:
|
|
23
|
+
* 3fa85f64-5717-4562-b3fc-2c963f66afa6
|
|
30
24
|
*/
|
|
31
|
-
|
|
25
|
+
_id?: EntityId;
|
|
32
26
|
/**
|
|
33
|
-
*
|
|
27
|
+
* Title of the entity
|
|
28
|
+
* example:
|
|
29
|
+
* Example Entity
|
|
34
30
|
*/
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
*
|
|
31
|
+
_title?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Organization ID the entity belongs to
|
|
38
34
|
* example:
|
|
39
|
-
*
|
|
35
|
+
* 123
|
|
36
|
+
*/
|
|
37
|
+
_org?: string;
|
|
38
|
+
/**
|
|
39
|
+
* Array of entity tags
|
|
40
|
+
* example:
|
|
41
|
+
* [
|
|
42
|
+
* "example",
|
|
43
|
+
* "mock"
|
|
44
|
+
* ]
|
|
40
45
|
*/
|
|
41
|
-
EntitySlug;
|
|
42
46
|
_tags?: string[];
|
|
43
|
-
|
|
44
|
-
|
|
47
|
+
/**
|
|
48
|
+
* Creation timestamp of the entity
|
|
49
|
+
* example:
|
|
50
|
+
* 2021-02-09T12:41:43.662Z
|
|
51
|
+
*/
|
|
52
|
+
_created_at?: string; // date-time
|
|
53
|
+
/**
|
|
54
|
+
* Last update timestamp of the entity
|
|
55
|
+
* example:
|
|
56
|
+
* 2021-02-09T12:41:43.662Z
|
|
57
|
+
*/
|
|
58
|
+
_updated_at?: string; // date-time
|
|
45
59
|
}
|
|
46
60
|
export type Direction = "feed-in" | "feed-out";
|
|
47
61
|
export interface Entity {
|
|
48
62
|
[name: string]: any;
|
|
49
63
|
}
|
|
50
64
|
export type EntityId = string;
|
|
51
|
-
/**
|
|
52
|
-
* example:
|
|
53
|
-
* {
|
|
54
|
-
* "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
|
|
55
|
-
* "_org": "123",
|
|
56
|
-
* "_schema": "contact",
|
|
57
|
-
* "_tags": [
|
|
58
|
-
* "example",
|
|
59
|
-
* "mock"
|
|
60
|
-
* ],
|
|
61
|
-
* "_created_at": {},
|
|
62
|
-
* "_updated_at": {}
|
|
63
|
-
* }
|
|
64
|
-
*/
|
|
65
65
|
export interface EntityItem {
|
|
66
66
|
[name: string]: any;
|
|
67
|
-
_id
|
|
67
|
+
_id?: EntityId;
|
|
68
68
|
/**
|
|
69
|
-
* Title of entity
|
|
69
|
+
* Title of the entity
|
|
70
|
+
* example:
|
|
71
|
+
* Example Entity
|
|
70
72
|
*/
|
|
71
|
-
_title
|
|
73
|
+
_title?: string;
|
|
72
74
|
/**
|
|
73
|
-
* Organization
|
|
75
|
+
* Organization ID the entity belongs to
|
|
76
|
+
* example:
|
|
77
|
+
* 123
|
|
74
78
|
*/
|
|
75
|
-
_org
|
|
76
|
-
|
|
77
|
-
*
|
|
79
|
+
_org?: string;
|
|
80
|
+
/**
|
|
81
|
+
* Array of entity tags
|
|
78
82
|
* example:
|
|
79
|
-
*
|
|
83
|
+
* [
|
|
84
|
+
* "example",
|
|
85
|
+
* "mock"
|
|
86
|
+
* ]
|
|
80
87
|
*/
|
|
81
|
-
EntitySlug;
|
|
82
88
|
_tags?: string[];
|
|
83
|
-
|
|
84
|
-
|
|
89
|
+
/**
|
|
90
|
+
* Creation timestamp of the entity
|
|
91
|
+
* example:
|
|
92
|
+
* 2021-02-09T12:41:43.662Z
|
|
93
|
+
*/
|
|
94
|
+
_created_at?: string; // date-time
|
|
95
|
+
/**
|
|
96
|
+
* Last update timestamp of the entity
|
|
97
|
+
* example:
|
|
98
|
+
* 2021-02-09T12:41:43.662Z
|
|
99
|
+
*/
|
|
100
|
+
_updated_at?: string; // date-time
|
|
85
101
|
}
|
|
86
102
|
export interface EntityRelation {
|
|
87
103
|
/**
|
|
@@ -97,58 +113,80 @@ declare namespace Components {
|
|
|
97
113
|
* contact
|
|
98
114
|
*/
|
|
99
115
|
export type EntitySlug = string;
|
|
116
|
+
export interface ErrorResp {
|
|
117
|
+
/**
|
|
118
|
+
* Error message
|
|
119
|
+
*/
|
|
120
|
+
message?: string;
|
|
121
|
+
}
|
|
100
122
|
export type Id = string;
|
|
101
|
-
/**
|
|
102
|
-
* example:
|
|
103
|
-
* {
|
|
104
|
-
* "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
|
|
105
|
-
* "_org": "123",
|
|
106
|
-
* "_schema": "contact",
|
|
107
|
-
* "_tags": [
|
|
108
|
-
* "example",
|
|
109
|
-
* "mock"
|
|
110
|
-
* ],
|
|
111
|
-
* "_created_at": {},
|
|
112
|
-
* "_updated_at": {}
|
|
113
|
-
* }
|
|
114
|
-
*/
|
|
115
123
|
export interface Meter {
|
|
116
|
-
_id
|
|
124
|
+
_id?: EntityId;
|
|
117
125
|
/**
|
|
118
|
-
* Title of entity
|
|
126
|
+
* Title of the entity
|
|
127
|
+
* example:
|
|
128
|
+
* Example Entity
|
|
119
129
|
*/
|
|
120
|
-
_title
|
|
130
|
+
_title?: string;
|
|
121
131
|
/**
|
|
122
|
-
* Organization
|
|
132
|
+
* Organization ID the entity belongs to
|
|
133
|
+
* example:
|
|
134
|
+
* 123
|
|
123
135
|
*/
|
|
124
|
-
_org
|
|
125
|
-
|
|
126
|
-
*
|
|
136
|
+
_org?: string;
|
|
137
|
+
/**
|
|
138
|
+
* Array of entity tags
|
|
127
139
|
* example:
|
|
128
|
-
*
|
|
140
|
+
* [
|
|
141
|
+
* "example",
|
|
142
|
+
* "mock"
|
|
143
|
+
* ]
|
|
129
144
|
*/
|
|
130
|
-
EntitySlug;
|
|
131
145
|
_tags?: string[];
|
|
132
|
-
_created_at: string;
|
|
133
|
-
_updated_at: string;
|
|
134
146
|
/**
|
|
147
|
+
* Creation timestamp of the entity
|
|
148
|
+
* example:
|
|
149
|
+
* 2021-02-09T12:41:43.662Z
|
|
150
|
+
*/
|
|
151
|
+
_created_at?: string; // date-time
|
|
152
|
+
/**
|
|
153
|
+
* Last update timestamp of the entity
|
|
154
|
+
* example:
|
|
155
|
+
* 2021-02-09T12:41:43.662Z
|
|
156
|
+
*/
|
|
157
|
+
_updated_at?: string; // date-time
|
|
158
|
+
/**
|
|
159
|
+
* The schema type of the meter
|
|
160
|
+
*/
|
|
161
|
+
_schema: "meter";
|
|
162
|
+
/**
|
|
163
|
+
* The MA-LO ID of the meter
|
|
135
164
|
* example:
|
|
136
165
|
* A09-123
|
|
137
166
|
*/
|
|
138
167
|
ma_lo_id?: string;
|
|
168
|
+
/**
|
|
169
|
+
* The type of the meter
|
|
170
|
+
*/
|
|
139
171
|
meter_type?: "three-phase-meter" | "bellow-gas-meter" | "rotary-piston-meter" | "smart-meter" | "performance-meter" | "maximum-meter" | "turbine-gas-meter" | "ultrasonic-gas-meter" | "alternating-current-meter" | "modern-metering-system" | "intelligent-measuring-system" | "electronic-meter";
|
|
140
172
|
/**
|
|
173
|
+
* The tariff type of the meter
|
|
141
174
|
* example:
|
|
142
175
|
* Peak load tariff
|
|
143
176
|
*/
|
|
144
177
|
tariff_type?: string;
|
|
145
178
|
/**
|
|
179
|
+
* The number of the meter
|
|
146
180
|
* example:
|
|
147
181
|
* J-1093-1AK
|
|
148
182
|
*/
|
|
149
183
|
meter_number?: string;
|
|
184
|
+
/**
|
|
185
|
+
* The sector to which the meter belongs
|
|
186
|
+
*/
|
|
150
187
|
sector?: "power" | "water" | "gas";
|
|
151
188
|
/**
|
|
189
|
+
* The location information of the meter
|
|
152
190
|
* example:
|
|
153
191
|
* [
|
|
154
192
|
* {
|
|
@@ -169,93 +207,112 @@ declare namespace Components {
|
|
|
169
207
|
[key: string]: any;
|
|
170
208
|
};
|
|
171
209
|
/**
|
|
210
|
+
* The usage purpose of the meter
|
|
172
211
|
* example:
|
|
173
212
|
* Domestic Usage
|
|
174
213
|
*/
|
|
175
214
|
used_for?: string;
|
|
176
215
|
/**
|
|
216
|
+
* The manufacturer of the meter
|
|
177
217
|
* example:
|
|
178
218
|
* Energy One
|
|
179
219
|
*/
|
|
180
220
|
manufacturer?: string;
|
|
181
221
|
/**
|
|
222
|
+
* The calibration date of the meter
|
|
182
223
|
* example:
|
|
183
224
|
* {}
|
|
184
225
|
*/
|
|
185
226
|
calibration_date?: string;
|
|
227
|
+
/**
|
|
228
|
+
* The contract associated with the meter
|
|
229
|
+
*/
|
|
186
230
|
contract?: {
|
|
187
231
|
$relation?: EntityRelation[];
|
|
188
232
|
};
|
|
233
|
+
/**
|
|
234
|
+
* The customer associated with the meter
|
|
235
|
+
*/
|
|
189
236
|
customer?: {
|
|
190
237
|
$relation?: EntityRelation[];
|
|
191
238
|
};
|
|
192
239
|
}
|
|
193
|
-
/**
|
|
194
|
-
* example:
|
|
195
|
-
* {
|
|
196
|
-
* "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
|
|
197
|
-
* "_org": "123",
|
|
198
|
-
* "_schema": "contact",
|
|
199
|
-
* "_tags": [
|
|
200
|
-
* "example",
|
|
201
|
-
* "mock"
|
|
202
|
-
* ],
|
|
203
|
-
* "_created_at": {},
|
|
204
|
-
* "_updated_at": {}
|
|
205
|
-
* }
|
|
206
|
-
*/
|
|
207
240
|
export interface MeterCounter {
|
|
208
|
-
_id
|
|
241
|
+
_id?: EntityId;
|
|
209
242
|
/**
|
|
210
|
-
* Title of entity
|
|
243
|
+
* Title of the entity
|
|
244
|
+
* example:
|
|
245
|
+
* Example Entity
|
|
211
246
|
*/
|
|
212
|
-
_title
|
|
247
|
+
_title?: string;
|
|
213
248
|
/**
|
|
214
|
-
* Organization
|
|
249
|
+
* Organization ID the entity belongs to
|
|
250
|
+
* example:
|
|
251
|
+
* 123
|
|
215
252
|
*/
|
|
216
|
-
_org
|
|
217
|
-
|
|
218
|
-
*
|
|
253
|
+
_org?: string;
|
|
254
|
+
/**
|
|
255
|
+
* Array of entity tags
|
|
219
256
|
* example:
|
|
220
|
-
*
|
|
257
|
+
* [
|
|
258
|
+
* "example",
|
|
259
|
+
* "mock"
|
|
260
|
+
* ]
|
|
221
261
|
*/
|
|
222
|
-
EntitySlug;
|
|
223
262
|
_tags?: string[];
|
|
224
|
-
_created_at: string;
|
|
225
|
-
_updated_at: string;
|
|
226
263
|
/**
|
|
264
|
+
* Creation timestamp of the entity
|
|
265
|
+
* example:
|
|
266
|
+
* 2021-02-09T12:41:43.662Z
|
|
267
|
+
*/
|
|
268
|
+
_created_at?: string; // date-time
|
|
269
|
+
/**
|
|
270
|
+
* Last update timestamp of the entity
|
|
271
|
+
* example:
|
|
272
|
+
* 2021-02-09T12:41:43.662Z
|
|
273
|
+
*/
|
|
274
|
+
_updated_at?: string; // date-time
|
|
275
|
+
_schema: "meter_counter";
|
|
276
|
+
/**
|
|
277
|
+
* The OBIS number of the meter counter
|
|
227
278
|
* example:
|
|
228
279
|
* A-34
|
|
229
280
|
*/
|
|
230
281
|
obis_number?: string;
|
|
231
282
|
direction?: Direction;
|
|
232
283
|
/**
|
|
284
|
+
* The transformer ratio of the meter counter
|
|
233
285
|
* example:
|
|
234
286
|
* 70
|
|
235
287
|
*/
|
|
236
288
|
transformer_ratio?: number;
|
|
237
289
|
unit?: Unit;
|
|
238
290
|
/**
|
|
291
|
+
* The forecast reading value of the meter counter
|
|
239
292
|
* example:
|
|
240
293
|
* 270
|
|
241
294
|
*/
|
|
242
295
|
forecast_reading_value?: string;
|
|
243
296
|
/**
|
|
297
|
+
* The date as of which the forecast reading value is applicable
|
|
244
298
|
* example:
|
|
245
299
|
* {}
|
|
246
300
|
*/
|
|
247
301
|
forecast_as_of?: string;
|
|
248
302
|
/**
|
|
303
|
+
* The current consumption value of the meter counter
|
|
249
304
|
* example:
|
|
250
305
|
* 240
|
|
251
306
|
*/
|
|
252
307
|
current_consumption?: number;
|
|
253
308
|
/**
|
|
309
|
+
* The timestamp of the last reading
|
|
254
310
|
* example:
|
|
255
311
|
* {}
|
|
256
312
|
*/
|
|
257
313
|
last_reading?: string;
|
|
258
314
|
/**
|
|
315
|
+
* The conversion factor for the meter counter
|
|
259
316
|
* example:
|
|
260
317
|
* 3
|
|
261
318
|
*/
|
|
@@ -264,30 +321,38 @@ declare namespace Components {
|
|
|
264
321
|
}
|
|
265
322
|
export interface MeterReading {
|
|
266
323
|
/**
|
|
324
|
+
* The reading value of the meter
|
|
267
325
|
* example:
|
|
268
326
|
* 240
|
|
269
327
|
*/
|
|
270
328
|
value?: number;
|
|
271
329
|
/**
|
|
330
|
+
* The person who recorded the reading
|
|
272
331
|
* example:
|
|
273
332
|
* John Doe
|
|
274
333
|
*/
|
|
275
334
|
read_by?: string;
|
|
276
335
|
/**
|
|
336
|
+
* The reason for recording the reading
|
|
277
337
|
* example:
|
|
278
338
|
* Storing the feed-in record
|
|
279
339
|
*/
|
|
280
340
|
reason?: string;
|
|
281
341
|
/**
|
|
342
|
+
* The ID of the associated meter
|
|
282
343
|
* example:
|
|
283
344
|
* 1446829f-4b6f-474e-b978-3997d89a7928
|
|
284
345
|
*/
|
|
285
346
|
meter_id?: string;
|
|
286
347
|
/**
|
|
348
|
+
* The ID of the associated meter counter
|
|
287
349
|
* example:
|
|
288
350
|
* 991a1821-43bc-46b8-967d-64a3d87c31f8
|
|
289
351
|
*/
|
|
290
352
|
counter_id?: string;
|
|
353
|
+
/**
|
|
354
|
+
* The direction of the reading (feed-in or feed-out)
|
|
355
|
+
*/
|
|
291
356
|
direction?: Direction;
|
|
292
357
|
/**
|
|
293
358
|
* If the value is not provided, the system will be set with the time the request is processed.
|
|
@@ -295,34 +360,54 @@ declare namespace Components {
|
|
|
295
360
|
* "2022-10-10T00:00:00.000Z"
|
|
296
361
|
*/
|
|
297
362
|
timestamp?: string;
|
|
363
|
+
/**
|
|
364
|
+
* The source of the reading
|
|
365
|
+
*/
|
|
298
366
|
source?: Source;
|
|
299
367
|
}
|
|
300
368
|
export interface ReadingWithMeter {
|
|
301
369
|
/**
|
|
370
|
+
* The MA-LO ID of the meter
|
|
302
371
|
* example:
|
|
303
372
|
* A09-123
|
|
304
373
|
*/
|
|
305
374
|
ma_lo_id?: string;
|
|
375
|
+
/**
|
|
376
|
+
* The ID of the associated meter
|
|
377
|
+
*/
|
|
306
378
|
meter_id?: Id;
|
|
307
379
|
/**
|
|
380
|
+
* The OBIS number of the meter counter
|
|
308
381
|
* example:
|
|
309
382
|
* A-34
|
|
310
383
|
*/
|
|
311
384
|
obis_number?: string;
|
|
385
|
+
/**
|
|
386
|
+
* The unit of measurement for the reading
|
|
387
|
+
*/
|
|
312
388
|
unit?: Unit;
|
|
389
|
+
/**
|
|
390
|
+
* The direction of the reading
|
|
391
|
+
*/
|
|
313
392
|
direction?: Direction;
|
|
393
|
+
/**
|
|
394
|
+
* The tariff type of the reading
|
|
395
|
+
*/
|
|
314
396
|
tariff_type?: TariffType;
|
|
315
397
|
/**
|
|
398
|
+
* The reading value
|
|
316
399
|
* example:
|
|
317
400
|
* 240
|
|
318
401
|
*/
|
|
319
402
|
value?: number;
|
|
320
403
|
/**
|
|
404
|
+
* The person who recorded the reading
|
|
321
405
|
* example:
|
|
322
406
|
* John Doe
|
|
323
407
|
*/
|
|
324
408
|
read_by?: string;
|
|
325
409
|
/**
|
|
410
|
+
* The reason for recording the reading
|
|
326
411
|
* example:
|
|
327
412
|
* Storing the feed-in record
|
|
328
413
|
*/
|
|
@@ -333,6 +418,9 @@ declare namespace Components {
|
|
|
333
418
|
* "2022-10-10T10:10:00.000Z"
|
|
334
419
|
*/
|
|
335
420
|
timestamp?: string;
|
|
421
|
+
/**
|
|
422
|
+
* The source of the reading
|
|
423
|
+
*/
|
|
336
424
|
source?: Source;
|
|
337
425
|
}
|
|
338
426
|
export type Source = "ECP" | "ERP" | "360" | "journey-submission";
|
|
@@ -350,14 +438,22 @@ declare namespace Paths {
|
|
|
350
438
|
export interface $200 {
|
|
351
439
|
data?: Components.Schemas.MeterReading;
|
|
352
440
|
}
|
|
441
|
+
export type $400 = Components.Responses.InvalidRequest;
|
|
442
|
+
export type $401 = Components.Responses.Unauthorized;
|
|
443
|
+
export type $403 = Components.Responses.Forbidden;
|
|
444
|
+
export type $500 = Components.Responses.InternalServerError;
|
|
353
445
|
}
|
|
354
446
|
}
|
|
355
447
|
namespace CreateMeterReadingFromSubmission {
|
|
356
448
|
export type RequestBody = Components.Schemas.SubmissionMeterReading;
|
|
357
449
|
namespace Responses {
|
|
358
450
|
export interface $200 {
|
|
359
|
-
|
|
451
|
+
message?: "Successfully Processed";
|
|
360
452
|
}
|
|
453
|
+
export type $400 = Components.Responses.InvalidRequest;
|
|
454
|
+
export type $401 = Components.Responses.Unauthorized;
|
|
455
|
+
export type $403 = Components.Responses.Forbidden;
|
|
456
|
+
export type $500 = Components.Responses.InternalServerError;
|
|
361
457
|
}
|
|
362
458
|
}
|
|
363
459
|
namespace CreateMeterReadings {
|
|
@@ -368,6 +464,10 @@ declare namespace Paths {
|
|
|
368
464
|
export interface $200 {
|
|
369
465
|
data?: Components.Schemas.MeterReading[];
|
|
370
466
|
}
|
|
467
|
+
export type $400 = Components.Responses.InvalidRequest;
|
|
468
|
+
export type $401 = Components.Responses.Unauthorized;
|
|
469
|
+
export type $403 = Components.Responses.Forbidden;
|
|
470
|
+
export type $500 = Components.Responses.InternalServerError;
|
|
371
471
|
}
|
|
372
472
|
}
|
|
373
473
|
namespace CreateReadingWithMeter {
|
|
@@ -376,6 +476,10 @@ declare namespace Paths {
|
|
|
376
476
|
export interface $200 {
|
|
377
477
|
data?: Components.Schemas.MeterReading;
|
|
378
478
|
}
|
|
479
|
+
export type $400 = Components.Responses.InvalidRequest;
|
|
480
|
+
export type $401 = Components.Responses.Unauthorized;
|
|
481
|
+
export type $403 = Components.Responses.Forbidden;
|
|
482
|
+
export type $500 = Components.Responses.InternalServerError;
|
|
379
483
|
}
|
|
380
484
|
}
|
|
381
485
|
namespace DeleteMeterReading {
|
|
@@ -384,7 +488,7 @@ declare namespace Paths {
|
|
|
384
488
|
export type MeterId = Components.Schemas.Id;
|
|
385
489
|
/**
|
|
386
490
|
* example:
|
|
387
|
-
*
|
|
491
|
+
* 2022-10-01T20:00:00.000Z
|
|
388
492
|
*/
|
|
389
493
|
export type Timestamp = string;
|
|
390
494
|
}
|
|
@@ -395,7 +499,7 @@ declare namespace Paths {
|
|
|
395
499
|
export interface QueryParameters {
|
|
396
500
|
timestamp: /**
|
|
397
501
|
* example:
|
|
398
|
-
*
|
|
502
|
+
* 2022-10-01T20:00:00.000Z
|
|
399
503
|
*/
|
|
400
504
|
Parameters.Timestamp;
|
|
401
505
|
}
|
|
@@ -406,11 +510,15 @@ declare namespace Paths {
|
|
|
406
510
|
counterId?: Components.Schemas.Id;
|
|
407
511
|
/**
|
|
408
512
|
* example:
|
|
409
|
-
*
|
|
513
|
+
* 2022-10-01T20:00:00.000Z
|
|
410
514
|
*/
|
|
411
515
|
timestamp?: string;
|
|
412
516
|
};
|
|
413
517
|
}
|
|
518
|
+
export type $400 = Components.Responses.InvalidRequest;
|
|
519
|
+
export type $401 = Components.Responses.Unauthorized;
|
|
520
|
+
export type $403 = Components.Responses.Forbidden;
|
|
521
|
+
export type $500 = Components.Responses.InternalServerError;
|
|
414
522
|
}
|
|
415
523
|
}
|
|
416
524
|
namespace GetCounterDetails {
|
|
@@ -422,43 +530,23 @@ declare namespace Paths {
|
|
|
422
530
|
}
|
|
423
531
|
namespace Responses {
|
|
424
532
|
export interface $200 {
|
|
425
|
-
data?:
|
|
426
|
-
* example:
|
|
427
|
-
* {
|
|
428
|
-
* "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
|
|
429
|
-
* "_org": "123",
|
|
430
|
-
* "_schema": "contact",
|
|
431
|
-
* "_tags": [
|
|
432
|
-
* "example",
|
|
433
|
-
* "mock"
|
|
434
|
-
* ],
|
|
435
|
-
* "_created_at": {},
|
|
436
|
-
* "_updated_at": {}
|
|
437
|
-
* }
|
|
438
|
-
*/
|
|
439
|
-
Components.Schemas.MeterCounter;
|
|
533
|
+
data?: Components.Schemas.MeterCounter;
|
|
440
534
|
}
|
|
535
|
+
export type $400 = Components.Responses.InvalidRequest;
|
|
536
|
+
export type $401 = Components.Responses.Unauthorized;
|
|
537
|
+
export type $403 = Components.Responses.Forbidden;
|
|
538
|
+
export type $500 = Components.Responses.InternalServerError;
|
|
441
539
|
}
|
|
442
540
|
}
|
|
443
541
|
namespace GetCustomerMeters {
|
|
444
542
|
namespace Responses {
|
|
445
543
|
export interface $200 {
|
|
446
|
-
data?:
|
|
447
|
-
* example:
|
|
448
|
-
* {
|
|
449
|
-
* "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
|
|
450
|
-
* "_org": "123",
|
|
451
|
-
* "_schema": "contact",
|
|
452
|
-
* "_tags": [
|
|
453
|
-
* "example",
|
|
454
|
-
* "mock"
|
|
455
|
-
* ],
|
|
456
|
-
* "_created_at": {},
|
|
457
|
-
* "_updated_at": {}
|
|
458
|
-
* }
|
|
459
|
-
*/
|
|
460
|
-
Components.Schemas.Meter[];
|
|
544
|
+
data?: Components.Schemas.Meter[];
|
|
461
545
|
}
|
|
546
|
+
export type $400 = Components.Responses.InvalidRequest;
|
|
547
|
+
export type $401 = Components.Responses.Unauthorized;
|
|
548
|
+
export type $403 = Components.Responses.Forbidden;
|
|
549
|
+
export type $500 = Components.Responses.InternalServerError;
|
|
462
550
|
}
|
|
463
551
|
}
|
|
464
552
|
namespace GetDownSampleReadingsByInterval {
|
|
@@ -467,14 +555,14 @@ declare namespace Paths {
|
|
|
467
555
|
export type Direction = Components.Schemas.Direction;
|
|
468
556
|
/**
|
|
469
557
|
* example:
|
|
470
|
-
*
|
|
558
|
+
* 2022-10-10
|
|
471
559
|
*/
|
|
472
560
|
export type EndDate = string;
|
|
473
561
|
export type GroupBy = "day" | "week" | "month" | "year";
|
|
474
562
|
export type MeterId = Components.Schemas.Id;
|
|
475
563
|
/**
|
|
476
564
|
* example:
|
|
477
|
-
*
|
|
565
|
+
* 2022-10-01
|
|
478
566
|
*/
|
|
479
567
|
export type StartDate = string;
|
|
480
568
|
}
|
|
@@ -485,12 +573,12 @@ declare namespace Paths {
|
|
|
485
573
|
export interface QueryParameters {
|
|
486
574
|
start_date?: /**
|
|
487
575
|
* example:
|
|
488
|
-
*
|
|
576
|
+
* 2022-10-01
|
|
489
577
|
*/
|
|
490
578
|
Parameters.StartDate;
|
|
491
579
|
end_date?: /**
|
|
492
580
|
* example:
|
|
493
|
-
*
|
|
581
|
+
* 2022-10-10
|
|
494
582
|
*/
|
|
495
583
|
Parameters.EndDate;
|
|
496
584
|
group_by?: Parameters.GroupBy;
|
|
@@ -500,6 +588,10 @@ declare namespace Paths {
|
|
|
500
588
|
export interface $200 {
|
|
501
589
|
data?: Components.Schemas.MeterReading[];
|
|
502
590
|
}
|
|
591
|
+
export type $400 = Components.Responses.InvalidRequest;
|
|
592
|
+
export type $401 = Components.Responses.Unauthorized;
|
|
593
|
+
export type $403 = Components.Responses.Forbidden;
|
|
594
|
+
export type $500 = Components.Responses.InternalServerError;
|
|
503
595
|
}
|
|
504
596
|
}
|
|
505
597
|
namespace GetMeter {
|
|
@@ -512,38 +604,14 @@ declare namespace Paths {
|
|
|
512
604
|
namespace Responses {
|
|
513
605
|
export interface $200 {
|
|
514
606
|
data?: {
|
|
515
|
-
entity?:
|
|
516
|
-
|
|
517
|
-
* {
|
|
518
|
-
* "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
|
|
519
|
-
* "_org": "123",
|
|
520
|
-
* "_schema": "contact",
|
|
521
|
-
* "_tags": [
|
|
522
|
-
* "example",
|
|
523
|
-
* "mock"
|
|
524
|
-
* ],
|
|
525
|
-
* "_created_at": {},
|
|
526
|
-
* "_updated_at": {}
|
|
527
|
-
* }
|
|
528
|
-
*/
|
|
529
|
-
Components.Schemas.EntityItem;
|
|
530
|
-
relations?: /**
|
|
531
|
-
* example:
|
|
532
|
-
* {
|
|
533
|
-
* "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
|
|
534
|
-
* "_org": "123",
|
|
535
|
-
* "_schema": "contact",
|
|
536
|
-
* "_tags": [
|
|
537
|
-
* "example",
|
|
538
|
-
* "mock"
|
|
539
|
-
* ],
|
|
540
|
-
* "_created_at": {},
|
|
541
|
-
* "_updated_at": {}
|
|
542
|
-
* }
|
|
543
|
-
*/
|
|
544
|
-
Components.Schemas.EntityItem[];
|
|
607
|
+
entity?: Components.Schemas.Meter;
|
|
608
|
+
relations?: Components.Schemas.EntityItem[];
|
|
545
609
|
};
|
|
546
610
|
}
|
|
611
|
+
export type $400 = Components.Responses.InvalidRequest;
|
|
612
|
+
export type $401 = Components.Responses.Unauthorized;
|
|
613
|
+
export type $403 = Components.Responses.Forbidden;
|
|
614
|
+
export type $500 = Components.Responses.InternalServerError;
|
|
547
615
|
}
|
|
548
616
|
}
|
|
549
617
|
namespace GetMeterCounters {
|
|
@@ -563,22 +631,12 @@ declare namespace Paths {
|
|
|
563
631
|
}
|
|
564
632
|
namespace Responses {
|
|
565
633
|
export interface $200 {
|
|
566
|
-
data?:
|
|
567
|
-
* example:
|
|
568
|
-
* {
|
|
569
|
-
* "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
|
|
570
|
-
* "_org": "123",
|
|
571
|
-
* "_schema": "contact",
|
|
572
|
-
* "_tags": [
|
|
573
|
-
* "example",
|
|
574
|
-
* "mock"
|
|
575
|
-
* ],
|
|
576
|
-
* "_created_at": {},
|
|
577
|
-
* "_updated_at": {}
|
|
578
|
-
* }
|
|
579
|
-
*/
|
|
580
|
-
Components.Schemas.MeterCounter[];
|
|
634
|
+
data?: Components.Schemas.MeterCounter[];
|
|
581
635
|
}
|
|
636
|
+
export type $400 = Components.Responses.InvalidRequest;
|
|
637
|
+
export type $401 = Components.Responses.Unauthorized;
|
|
638
|
+
export type $403 = Components.Responses.Forbidden;
|
|
639
|
+
export type $500 = Components.Responses.InternalServerError;
|
|
582
640
|
}
|
|
583
641
|
}
|
|
584
642
|
namespace GetReadingsByInterval {
|
|
@@ -587,7 +645,7 @@ declare namespace Paths {
|
|
|
587
645
|
export type Direction = Components.Schemas.Direction;
|
|
588
646
|
/**
|
|
589
647
|
* example:
|
|
590
|
-
*
|
|
648
|
+
* 2022-10-10
|
|
591
649
|
*/
|
|
592
650
|
export type EndDate = string;
|
|
593
651
|
/**
|
|
@@ -603,7 +661,7 @@ declare namespace Paths {
|
|
|
603
661
|
export type Size = number;
|
|
604
662
|
/**
|
|
605
663
|
* example:
|
|
606
|
-
*
|
|
664
|
+
* 2022-10-01
|
|
607
665
|
*/
|
|
608
666
|
export type StartDate = string;
|
|
609
667
|
export type Type = "cumulative" | "relative";
|
|
@@ -615,12 +673,12 @@ declare namespace Paths {
|
|
|
615
673
|
export interface QueryParameters {
|
|
616
674
|
start_date?: /**
|
|
617
675
|
* example:
|
|
618
|
-
*
|
|
676
|
+
* 2022-10-01
|
|
619
677
|
*/
|
|
620
678
|
Parameters.StartDate;
|
|
621
679
|
end_date?: /**
|
|
622
680
|
* example:
|
|
623
|
-
*
|
|
681
|
+
* 2022-10-10
|
|
624
682
|
*/
|
|
625
683
|
Parameters.EndDate;
|
|
626
684
|
direction?: Parameters.Direction;
|
|
@@ -646,10 +704,14 @@ declare namespace Paths {
|
|
|
646
704
|
hits?: number;
|
|
647
705
|
/**
|
|
648
706
|
* example:
|
|
649
|
-
*
|
|
707
|
+
* 2022-10-01T20:00:00.000Z
|
|
650
708
|
*/
|
|
651
709
|
firstRecordCreatedAt?: string;
|
|
652
710
|
}
|
|
711
|
+
export type $400 = Components.Responses.InvalidRequest;
|
|
712
|
+
export type $401 = Components.Responses.Unauthorized;
|
|
713
|
+
export type $403 = Components.Responses.Forbidden;
|
|
714
|
+
export type $500 = Components.Responses.InternalServerError;
|
|
653
715
|
}
|
|
654
716
|
}
|
|
655
717
|
namespace UpdateMeter {
|
|
@@ -659,23 +721,15 @@ declare namespace Paths {
|
|
|
659
721
|
export interface PathParameters {
|
|
660
722
|
id: Parameters.Id;
|
|
661
723
|
}
|
|
662
|
-
export type RequestBody = Components.Schemas.
|
|
724
|
+
export type RequestBody = Components.Schemas.Meter;
|
|
663
725
|
namespace Responses {
|
|
664
|
-
export
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
* "example",
|
|
672
|
-
* "mock"
|
|
673
|
-
* ],
|
|
674
|
-
* "_created_at": {},
|
|
675
|
-
* "_updated_at": {}
|
|
676
|
-
* }
|
|
677
|
-
*/
|
|
678
|
-
Components.Schemas.EntityItem;
|
|
726
|
+
export interface $200 {
|
|
727
|
+
data?: Components.Schemas.Meter;
|
|
728
|
+
}
|
|
729
|
+
export type $400 = Components.Responses.InvalidRequest;
|
|
730
|
+
export type $401 = Components.Responses.Unauthorized;
|
|
731
|
+
export type $403 = Components.Responses.Forbidden;
|
|
732
|
+
export type $500 = Components.Responses.InternalServerError;
|
|
679
733
|
}
|
|
680
734
|
}
|
|
681
735
|
namespace UpdateMeterReading {
|
|
@@ -684,7 +738,7 @@ declare namespace Paths {
|
|
|
684
738
|
export type MeterId = Components.Schemas.Id;
|
|
685
739
|
/**
|
|
686
740
|
* example:
|
|
687
|
-
*
|
|
741
|
+
* 2022-10-01T20:00:00.000Z
|
|
688
742
|
*/
|
|
689
743
|
export type Timestamp = string;
|
|
690
744
|
}
|
|
@@ -695,7 +749,7 @@ declare namespace Paths {
|
|
|
695
749
|
export interface QueryParameters {
|
|
696
750
|
timestamp: /**
|
|
697
751
|
* example:
|
|
698
|
-
*
|
|
752
|
+
* 2022-10-01T20:00:00.000Z
|
|
699
753
|
*/
|
|
700
754
|
Parameters.Timestamp;
|
|
701
755
|
}
|
|
@@ -704,15 +758,19 @@ declare namespace Paths {
|
|
|
704
758
|
export interface $200 {
|
|
705
759
|
data?: Components.Schemas.MeterReading;
|
|
706
760
|
}
|
|
761
|
+
export type $400 = Components.Responses.InvalidRequest;
|
|
762
|
+
export type $401 = Components.Responses.Unauthorized;
|
|
763
|
+
export type $403 = Components.Responses.Forbidden;
|
|
764
|
+
export type $500 = Components.Responses.InternalServerError;
|
|
707
765
|
}
|
|
708
766
|
}
|
|
709
767
|
}
|
|
710
768
|
|
|
711
769
|
export interface OperationMethods {
|
|
712
770
|
/**
|
|
713
|
-
* getCustomerMeters -
|
|
771
|
+
* getCustomerMeters - Get Customer Meters
|
|
714
772
|
*
|
|
715
|
-
*
|
|
773
|
+
* Retrieves all meters related to a customer.
|
|
716
774
|
*/
|
|
717
775
|
'getCustomerMeters'(
|
|
718
776
|
parameters?: Parameters<UnknownParamsObject> | null,
|
|
@@ -720,9 +778,9 @@ export interface OperationMethods {
|
|
|
720
778
|
config?: AxiosRequestConfig
|
|
721
779
|
): OperationResponse<Paths.GetCustomerMeters.Responses.$200>
|
|
722
780
|
/**
|
|
723
|
-
* getMeter -
|
|
781
|
+
* getMeter - Get Meter
|
|
724
782
|
*
|
|
725
|
-
*
|
|
783
|
+
* Retrieves the details of a meter.
|
|
726
784
|
*/
|
|
727
785
|
'getMeter'(
|
|
728
786
|
parameters?: Parameters<Paths.GetMeter.PathParameters> | null,
|
|
@@ -730,9 +788,9 @@ export interface OperationMethods {
|
|
|
730
788
|
config?: AxiosRequestConfig
|
|
731
789
|
): OperationResponse<Paths.GetMeter.Responses.$200>
|
|
732
790
|
/**
|
|
733
|
-
* updateMeter -
|
|
791
|
+
* updateMeter - Update Meter
|
|
734
792
|
*
|
|
735
|
-
*
|
|
793
|
+
* Updates the details of a meter.
|
|
736
794
|
*/
|
|
737
795
|
'updateMeter'(
|
|
738
796
|
parameters?: Parameters<Paths.UpdateMeter.PathParameters> | null,
|
|
@@ -740,9 +798,9 @@ export interface OperationMethods {
|
|
|
740
798
|
config?: AxiosRequestConfig
|
|
741
799
|
): OperationResponse<Paths.UpdateMeter.Responses.$200>
|
|
742
800
|
/**
|
|
743
|
-
* getMeterCounters -
|
|
801
|
+
* getMeterCounters - Get Meter Counters
|
|
744
802
|
*
|
|
745
|
-
*
|
|
803
|
+
* Retrieves all counters for a given meter.
|
|
746
804
|
*/
|
|
747
805
|
'getMeterCounters'(
|
|
748
806
|
parameters?: Parameters<Paths.GetMeterCounters.QueryParameters> | null,
|
|
@@ -750,9 +808,9 @@ export interface OperationMethods {
|
|
|
750
808
|
config?: AxiosRequestConfig
|
|
751
809
|
): OperationResponse<Paths.GetMeterCounters.Responses.$200>
|
|
752
810
|
/**
|
|
753
|
-
* getCounterDetails -
|
|
811
|
+
* getCounterDetails - Get Counter Details
|
|
754
812
|
*
|
|
755
|
-
*
|
|
813
|
+
* Retrieves the details of a meter counter.
|
|
756
814
|
*/
|
|
757
815
|
'getCounterDetails'(
|
|
758
816
|
parameters?: Parameters<Paths.GetCounterDetails.PathParameters> | null,
|
|
@@ -760,9 +818,9 @@ export interface OperationMethods {
|
|
|
760
818
|
config?: AxiosRequestConfig
|
|
761
819
|
): OperationResponse<Paths.GetCounterDetails.Responses.$200>
|
|
762
820
|
/**
|
|
763
|
-
* createMeterReading -
|
|
821
|
+
* createMeterReading - Create Meter Reading
|
|
764
822
|
*
|
|
765
|
-
*
|
|
823
|
+
* Inserts a new meter reading.
|
|
766
824
|
*/
|
|
767
825
|
'createMeterReading'(
|
|
768
826
|
parameters?: Parameters<UnknownParamsObject> | null,
|
|
@@ -770,9 +828,9 @@ export interface OperationMethods {
|
|
|
770
828
|
config?: AxiosRequestConfig
|
|
771
829
|
): OperationResponse<Paths.CreateMeterReading.Responses.$200>
|
|
772
830
|
/**
|
|
773
|
-
* createMeterReadings -
|
|
831
|
+
* createMeterReadings - Create Meter Readings
|
|
774
832
|
*
|
|
775
|
-
*
|
|
833
|
+
* Inserts multiple meter readings at once.
|
|
776
834
|
*/
|
|
777
835
|
'createMeterReadings'(
|
|
778
836
|
parameters?: Parameters<UnknownParamsObject> | null,
|
|
@@ -780,9 +838,9 @@ export interface OperationMethods {
|
|
|
780
838
|
config?: AxiosRequestConfig
|
|
781
839
|
): OperationResponse<Paths.CreateMeterReadings.Responses.$200>
|
|
782
840
|
/**
|
|
783
|
-
* createMeterReadingFromSubmission -
|
|
841
|
+
* createMeterReadingFromSubmission - Create Meter Reading from Submission
|
|
784
842
|
*
|
|
785
|
-
*
|
|
843
|
+
* Creates a reading from a journey submission.
|
|
786
844
|
*/
|
|
787
845
|
'createMeterReadingFromSubmission'(
|
|
788
846
|
parameters?: Parameters<UnknownParamsObject> | null,
|
|
@@ -790,9 +848,9 @@ export interface OperationMethods {
|
|
|
790
848
|
config?: AxiosRequestConfig
|
|
791
849
|
): OperationResponse<Paths.CreateMeterReadingFromSubmission.Responses.$200>
|
|
792
850
|
/**
|
|
793
|
-
* createReadingWithMeter -
|
|
851
|
+
* createReadingWithMeter - Create Reading with Meter
|
|
794
852
|
*
|
|
795
|
-
*
|
|
853
|
+
* Creates a reading along with a meter.
|
|
796
854
|
*/
|
|
797
855
|
'createReadingWithMeter'(
|
|
798
856
|
parameters?: Parameters<UnknownParamsObject> | null,
|
|
@@ -800,11 +858,11 @@ export interface OperationMethods {
|
|
|
800
858
|
config?: AxiosRequestConfig
|
|
801
859
|
): OperationResponse<Paths.CreateReadingWithMeter.Responses.$200>
|
|
802
860
|
/**
|
|
803
|
-
* getReadingsByInterval -
|
|
861
|
+
* getReadingsByInterval - Get Readings by Interval
|
|
804
862
|
*
|
|
805
|
-
*
|
|
806
|
-
*
|
|
807
|
-
*
|
|
863
|
+
* Retrieves all readings specified in an interval.
|
|
864
|
+
* If the start_date and end_date are equal, then it returns the readings of the specified date.
|
|
865
|
+
* The start_date should be less than or equal to the end_date.
|
|
808
866
|
*
|
|
809
867
|
*/
|
|
810
868
|
'getReadingsByInterval'(
|
|
@@ -813,9 +871,9 @@ export interface OperationMethods {
|
|
|
813
871
|
config?: AxiosRequestConfig
|
|
814
872
|
): OperationResponse<Paths.GetReadingsByInterval.Responses.$200>
|
|
815
873
|
/**
|
|
816
|
-
* updateMeterReading -
|
|
874
|
+
* updateMeterReading - Update Meter Reading
|
|
817
875
|
*
|
|
818
|
-
*
|
|
876
|
+
* Updates a meter reading.
|
|
819
877
|
*/
|
|
820
878
|
'updateMeterReading'(
|
|
821
879
|
parameters?: Parameters<Paths.UpdateMeterReading.PathParameters & Paths.UpdateMeterReading.QueryParameters> | null,
|
|
@@ -823,9 +881,9 @@ export interface OperationMethods {
|
|
|
823
881
|
config?: AxiosRequestConfig
|
|
824
882
|
): OperationResponse<Paths.UpdateMeterReading.Responses.$200>
|
|
825
883
|
/**
|
|
826
|
-
* deleteMeterReading -
|
|
884
|
+
* deleteMeterReading - Delete Meter Reading
|
|
827
885
|
*
|
|
828
|
-
*
|
|
886
|
+
* Deletes a meter reading.
|
|
829
887
|
*/
|
|
830
888
|
'deleteMeterReading'(
|
|
831
889
|
parameters?: Parameters<Paths.DeleteMeterReading.PathParameters & Paths.DeleteMeterReading.QueryParameters> | null,
|
|
@@ -833,11 +891,11 @@ export interface OperationMethods {
|
|
|
833
891
|
config?: AxiosRequestConfig
|
|
834
892
|
): OperationResponse<Paths.DeleteMeterReading.Responses.$200>
|
|
835
893
|
/**
|
|
836
|
-
* getDownSampleReadingsByInterval -
|
|
894
|
+
* getDownSampleReadingsByInterval - Get Down Sample Readings by Interval
|
|
837
895
|
*
|
|
838
|
-
*
|
|
839
|
-
*
|
|
840
|
-
*
|
|
896
|
+
* Retrieves the downsampled data of the entire readings specified in an interval.
|
|
897
|
+
* If the start_date and end_date are equal, then it returns the readings of the specified date.
|
|
898
|
+
* The start_date should be less than or equal to the end_date.
|
|
841
899
|
*
|
|
842
900
|
*/
|
|
843
901
|
'getDownSampleReadingsByInterval'(
|
|
@@ -850,9 +908,9 @@ export interface OperationMethods {
|
|
|
850
908
|
export interface PathsDictionary {
|
|
851
909
|
['/v1/metering/meter']: {
|
|
852
910
|
/**
|
|
853
|
-
* getCustomerMeters -
|
|
911
|
+
* getCustomerMeters - Get Customer Meters
|
|
854
912
|
*
|
|
855
|
-
*
|
|
913
|
+
* Retrieves all meters related to a customer.
|
|
856
914
|
*/
|
|
857
915
|
'get'(
|
|
858
916
|
parameters?: Parameters<UnknownParamsObject> | null,
|
|
@@ -862,9 +920,9 @@ export interface PathsDictionary {
|
|
|
862
920
|
}
|
|
863
921
|
['/v1/metering/meter/{id}']: {
|
|
864
922
|
/**
|
|
865
|
-
* updateMeter -
|
|
923
|
+
* updateMeter - Update Meter
|
|
866
924
|
*
|
|
867
|
-
*
|
|
925
|
+
* Updates the details of a meter.
|
|
868
926
|
*/
|
|
869
927
|
'patch'(
|
|
870
928
|
parameters?: Parameters<Paths.UpdateMeter.PathParameters> | null,
|
|
@@ -872,9 +930,9 @@ export interface PathsDictionary {
|
|
|
872
930
|
config?: AxiosRequestConfig
|
|
873
931
|
): OperationResponse<Paths.UpdateMeter.Responses.$200>
|
|
874
932
|
/**
|
|
875
|
-
* getMeter -
|
|
933
|
+
* getMeter - Get Meter
|
|
876
934
|
*
|
|
877
|
-
*
|
|
935
|
+
* Retrieves the details of a meter.
|
|
878
936
|
*/
|
|
879
937
|
'get'(
|
|
880
938
|
parameters?: Parameters<Paths.GetMeter.PathParameters> | null,
|
|
@@ -884,9 +942,9 @@ export interface PathsDictionary {
|
|
|
884
942
|
}
|
|
885
943
|
['/v1/metering/counter']: {
|
|
886
944
|
/**
|
|
887
|
-
* getMeterCounters -
|
|
945
|
+
* getMeterCounters - Get Meter Counters
|
|
888
946
|
*
|
|
889
|
-
*
|
|
947
|
+
* Retrieves all counters for a given meter.
|
|
890
948
|
*/
|
|
891
949
|
'get'(
|
|
892
950
|
parameters?: Parameters<Paths.GetMeterCounters.QueryParameters> | null,
|
|
@@ -896,9 +954,9 @@ export interface PathsDictionary {
|
|
|
896
954
|
}
|
|
897
955
|
['/v1/metering/counter/{counter_id}']: {
|
|
898
956
|
/**
|
|
899
|
-
* getCounterDetails -
|
|
957
|
+
* getCounterDetails - Get Counter Details
|
|
900
958
|
*
|
|
901
|
-
*
|
|
959
|
+
* Retrieves the details of a meter counter.
|
|
902
960
|
*/
|
|
903
961
|
'get'(
|
|
904
962
|
parameters?: Parameters<Paths.GetCounterDetails.PathParameters> | null,
|
|
@@ -908,9 +966,9 @@ export interface PathsDictionary {
|
|
|
908
966
|
}
|
|
909
967
|
['/v1/metering/reading']: {
|
|
910
968
|
/**
|
|
911
|
-
* createMeterReading -
|
|
969
|
+
* createMeterReading - Create Meter Reading
|
|
912
970
|
*
|
|
913
|
-
*
|
|
971
|
+
* Inserts a new meter reading.
|
|
914
972
|
*/
|
|
915
973
|
'post'(
|
|
916
974
|
parameters?: Parameters<UnknownParamsObject> | null,
|
|
@@ -920,9 +978,9 @@ export interface PathsDictionary {
|
|
|
920
978
|
}
|
|
921
979
|
['/v1/metering/readings']: {
|
|
922
980
|
/**
|
|
923
|
-
* createMeterReadings -
|
|
981
|
+
* createMeterReadings - Create Meter Readings
|
|
924
982
|
*
|
|
925
|
-
*
|
|
983
|
+
* Inserts multiple meter readings at once.
|
|
926
984
|
*/
|
|
927
985
|
'post'(
|
|
928
986
|
parameters?: Parameters<UnknownParamsObject> | null,
|
|
@@ -932,9 +990,9 @@ export interface PathsDictionary {
|
|
|
932
990
|
}
|
|
933
991
|
['/v1/metering/reading/submission']: {
|
|
934
992
|
/**
|
|
935
|
-
* createMeterReadingFromSubmission -
|
|
993
|
+
* createMeterReadingFromSubmission - Create Meter Reading from Submission
|
|
936
994
|
*
|
|
937
|
-
*
|
|
995
|
+
* Creates a reading from a journey submission.
|
|
938
996
|
*/
|
|
939
997
|
'post'(
|
|
940
998
|
parameters?: Parameters<UnknownParamsObject> | null,
|
|
@@ -944,9 +1002,9 @@ export interface PathsDictionary {
|
|
|
944
1002
|
}
|
|
945
1003
|
['/v1/metering/reading/with-meter']: {
|
|
946
1004
|
/**
|
|
947
|
-
* createReadingWithMeter -
|
|
1005
|
+
* createReadingWithMeter - Create Reading with Meter
|
|
948
1006
|
*
|
|
949
|
-
*
|
|
1007
|
+
* Creates a reading along with a meter.
|
|
950
1008
|
*/
|
|
951
1009
|
'post'(
|
|
952
1010
|
parameters?: Parameters<UnknownParamsObject> | null,
|
|
@@ -956,11 +1014,11 @@ export interface PathsDictionary {
|
|
|
956
1014
|
}
|
|
957
1015
|
['/v1/metering/reading/{meter_id}/{counter_id}']: {
|
|
958
1016
|
/**
|
|
959
|
-
* getReadingsByInterval -
|
|
1017
|
+
* getReadingsByInterval - Get Readings by Interval
|
|
960
1018
|
*
|
|
961
|
-
*
|
|
962
|
-
*
|
|
963
|
-
*
|
|
1019
|
+
* Retrieves all readings specified in an interval.
|
|
1020
|
+
* If the start_date and end_date are equal, then it returns the readings of the specified date.
|
|
1021
|
+
* The start_date should be less than or equal to the end_date.
|
|
964
1022
|
*
|
|
965
1023
|
*/
|
|
966
1024
|
'get'(
|
|
@@ -969,9 +1027,9 @@ export interface PathsDictionary {
|
|
|
969
1027
|
config?: AxiosRequestConfig
|
|
970
1028
|
): OperationResponse<Paths.GetReadingsByInterval.Responses.$200>
|
|
971
1029
|
/**
|
|
972
|
-
* updateMeterReading -
|
|
1030
|
+
* updateMeterReading - Update Meter Reading
|
|
973
1031
|
*
|
|
974
|
-
*
|
|
1032
|
+
* Updates a meter reading.
|
|
975
1033
|
*/
|
|
976
1034
|
'put'(
|
|
977
1035
|
parameters?: Parameters<Paths.UpdateMeterReading.PathParameters & Paths.UpdateMeterReading.QueryParameters> | null,
|
|
@@ -979,9 +1037,9 @@ export interface PathsDictionary {
|
|
|
979
1037
|
config?: AxiosRequestConfig
|
|
980
1038
|
): OperationResponse<Paths.UpdateMeterReading.Responses.$200>
|
|
981
1039
|
/**
|
|
982
|
-
* deleteMeterReading -
|
|
1040
|
+
* deleteMeterReading - Delete Meter Reading
|
|
983
1041
|
*
|
|
984
|
-
*
|
|
1042
|
+
* Deletes a meter reading.
|
|
985
1043
|
*/
|
|
986
1044
|
'delete'(
|
|
987
1045
|
parameters?: Parameters<Paths.DeleteMeterReading.PathParameters & Paths.DeleteMeterReading.QueryParameters> | null,
|
|
@@ -991,11 +1049,11 @@ export interface PathsDictionary {
|
|
|
991
1049
|
}
|
|
992
1050
|
['/v1/metering/down-sample/readings/{meter_id}/{counter_id}']: {
|
|
993
1051
|
/**
|
|
994
|
-
* getDownSampleReadingsByInterval -
|
|
1052
|
+
* getDownSampleReadingsByInterval - Get Down Sample Readings by Interval
|
|
995
1053
|
*
|
|
996
|
-
*
|
|
997
|
-
*
|
|
998
|
-
*
|
|
1054
|
+
* Retrieves the downsampled data of the entire readings specified in an interval.
|
|
1055
|
+
* If the start_date and end_date are equal, then it returns the readings of the specified date.
|
|
1056
|
+
* The start_date should be less than or equal to the end_date.
|
|
999
1057
|
*
|
|
1000
1058
|
*/
|
|
1001
1059
|
'get'(
|