@epilot/metering-client 0.1.30 → 0.2.1
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 +1 -0
- package/package.json +5 -5
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":[]},{"CustomerPortalAuth":[]}],"paths":{"/v1/metering/meter":{"get":{"operationId":"getCustomerMeters","summary":"getCustomerMeters","description":"Get All meters related to a customer","tags":["ECP"],"security":[{"EpilotAuth":[]},{"CustomerPortalAuth":[]}],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Meter"}}}}}}}}}},"/v1/metering/counter":{"get":{"operationId":"getMeterCounters","summary":"getMeterCounters","description":"Get all counters for a given meter","tags":["ECP"],"security":[{"EpilotAuth":[]},{"CustomerPortalAuth":[]}],"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":[]},{"CustomerPortalAuth":[]}],"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":[]},{"CustomerPortalAuth":[]}],"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":[]},{"CustomerPortalAuth":[]}],"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":[]},{"CustomerPortalAuth":[]}],"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":[]},{"CustomerPortalAuth":[]}],"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"},"CustomerPortalAuth":{"type":"http","scheme":"bearer","description":"Authorization header with customer pilot OAuth2 bearer token","bearerFormat":"JWT"}},"schemas":{"EntityId":{"type":"string","format":"uuid"},"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","format":"date-time"},"_updated_at":{"type":"string","format":"date-time"}},"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"}},"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}}}]},"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 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":[]},{"CustomerPortalAuth":[]}],"paths":{"/v1/metering/meter":{"get":{"operationId":"getCustomerMeters","summary":"getCustomerMeters","description":"Get All meters related to a customer","tags":["ECP"],"security":[{"EpilotAuth":[]},{"CustomerPortalAuth":[]}],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Meter"}}}}}}}}}},"/v1/metering/counter":{"get":{"operationId":"getMeterCounters","summary":"getMeterCounters","description":"Get all counters for a given meter","tags":["ECP"],"security":[{"EpilotAuth":[]},{"CustomerPortalAuth":[]}],"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":[]},{"CustomerPortalAuth":[]}],"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":[]},{"CustomerPortalAuth":[]}],"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":[]},{"CustomerPortalAuth":[]}],"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":[]},{"CustomerPortalAuth":[]}],"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":[]},{"CustomerPortalAuth":[]}],"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"},"CustomerPortalAuth":{"type":"http","scheme":"bearer","description":"Authorization header with customer pilot OAuth2 bearer token","bearerFormat":"JWT"}},"schemas":{"EntityId":{"type":"string","format":"uuid"},"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","format":"date-time"},"_updated_at":{"type":"string","format":"date-time"}},"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"}},"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)})());
|
package/dist/openapi.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epilot/metering-client",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "API Client for epilot Metering API",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -34,23 +34,23 @@
|
|
|
34
34
|
"author": "epilot GmbH",
|
|
35
35
|
"license": "UNLICENSED",
|
|
36
36
|
"peerDependencies": {
|
|
37
|
-
"axios": "^0.
|
|
37
|
+
"axios": "^0.25.0"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"buffer": "^6.0.3",
|
|
41
41
|
"https-browserify": "^1.0.0",
|
|
42
|
-
"openapi-client-axios": "^
|
|
42
|
+
"openapi-client-axios": "^6.0.0",
|
|
43
43
|
"stream-http": "^3.1.1",
|
|
44
44
|
"url": "^0.11.0",
|
|
45
45
|
"util": "^0.12.3"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@types/jest": "^26.0.20",
|
|
49
|
-
"axios": "^0.
|
|
49
|
+
"axios": "^0.25.0",
|
|
50
50
|
"copy-webpack-plugin": "^7.0.0",
|
|
51
51
|
"jest": "^26.6.3",
|
|
52
52
|
"json-loader": "^0.5.7",
|
|
53
|
-
"openapi-client-axios-typegen": "^
|
|
53
|
+
"openapi-client-axios-typegen": "^6.0.0",
|
|
54
54
|
"openapicmd": "^1.8.2",
|
|
55
55
|
"ts-jest": "^26.5.6",
|
|
56
56
|
"ts-loader": "^8.3.0",
|