@epilot/metering-client 0.5.9 → 0.6.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2022 epilot GmbH
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
package/dist/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  export * from './client';
2
- export type { Client, Components, Paths, PathsDictionary, OperationMethods } from './openapi';
2
+ export * from './openapi';
3
3
  export type { OpenAPIClient, OpenAPIClientAxios, Document } from 'openapi-client-axios';
package/dist/openapi.d.ts CHANGED
@@ -1,11 +1,12 @@
1
1
  /* eslint-disable */
2
+
2
3
  import type {
3
4
  OpenAPIClient,
4
5
  Parameters,
5
6
  UnknownParamsObject,
6
7
  OperationResponse,
7
8
  AxiosRequestConfig,
8
- } from 'openapi-client-axios';
9
+ } from 'openapi-client-axios';
9
10
 
10
11
  declare namespace Components {
11
12
  namespace Parameters {
@@ -1202,7 +1203,7 @@ export interface OperationMethods {
1202
1203
  * Get allowed reading for the given meter
1203
1204
  */
1204
1205
  'getAllowedReadingForMeter'(
1205
- parameters?: Parameters<Paths.GetAllowedReadingForMeter.PathParameters & Paths.GetAllowedReadingForMeter.QueryParameters> | null,
1206
+ parameters?: Parameters<Paths.GetAllowedReadingForMeter.QueryParameters & Paths.GetAllowedReadingForMeter.PathParameters> | null,
1206
1207
  data?: any,
1207
1208
  config?: AxiosRequestConfig
1208
1209
  ): OperationResponse<Paths.GetAllowedReadingForMeter.Responses.$200>
@@ -1225,7 +1226,7 @@ export interface OperationMethods {
1225
1226
  *
1226
1227
  */
1227
1228
  'getReadingsByInterval'(
1228
- parameters?: Parameters<Paths.GetReadingsByInterval.PathParameters & Paths.GetReadingsByInterval.QueryParameters> | null,
1229
+ parameters?: Parameters<Paths.GetReadingsByInterval.QueryParameters & Paths.GetReadingsByInterval.PathParameters> | null,
1229
1230
  data?: any,
1230
1231
  config?: AxiosRequestConfig
1231
1232
  ): OperationResponse<Paths.GetReadingsByInterval.Responses.$200>
@@ -1235,7 +1236,7 @@ export interface OperationMethods {
1235
1236
  * Updates a meter reading.
1236
1237
  */
1237
1238
  'updateMeterReading'(
1238
- parameters?: Parameters<Paths.UpdateMeterReading.PathParameters & Paths.UpdateMeterReading.QueryParameters> | null,
1239
+ parameters?: Parameters<Paths.UpdateMeterReading.QueryParameters & Paths.UpdateMeterReading.PathParameters> | null,
1239
1240
  data?: Paths.UpdateMeterReading.RequestBody,
1240
1241
  config?: AxiosRequestConfig
1241
1242
  ): OperationResponse<Paths.UpdateMeterReading.Responses.$200>
@@ -1245,7 +1246,7 @@ export interface OperationMethods {
1245
1246
  * Deletes a meter reading.
1246
1247
  */
1247
1248
  'deleteMeterReading'(
1248
- parameters?: Parameters<Paths.DeleteMeterReading.PathParameters & Paths.DeleteMeterReading.QueryParameters> | null,
1249
+ parameters?: Parameters<Paths.DeleteMeterReading.QueryParameters & Paths.DeleteMeterReading.PathParameters> | null,
1249
1250
  data?: any,
1250
1251
  config?: AxiosRequestConfig
1251
1252
  ): OperationResponse<Paths.DeleteMeterReading.Responses.$200>
@@ -1258,7 +1259,7 @@ export interface OperationMethods {
1258
1259
  *
1259
1260
  */
1260
1261
  'getDownSampleReadingsByInterval'(
1261
- parameters?: Parameters<Paths.GetDownSampleReadingsByInterval.PathParameters & Paths.GetDownSampleReadingsByInterval.QueryParameters> | null,
1262
+ parameters?: Parameters<Paths.GetDownSampleReadingsByInterval.QueryParameters & Paths.GetDownSampleReadingsByInterval.PathParameters> | null,
1262
1263
  data?: any,
1263
1264
  config?: AxiosRequestConfig
1264
1265
  ): OperationResponse<Paths.GetDownSampleReadingsByInterval.Responses.$200>
@@ -1378,7 +1379,7 @@ export interface PathsDictionary {
1378
1379
  * Get allowed reading for the given meter
1379
1380
  */
1380
1381
  'get'(
1381
- parameters?: Parameters<Paths.GetAllowedReadingForMeter.PathParameters & Paths.GetAllowedReadingForMeter.QueryParameters> | null,
1382
+ parameters?: Parameters<Paths.GetAllowedReadingForMeter.QueryParameters & Paths.GetAllowedReadingForMeter.PathParameters> | null,
1382
1383
  data?: any,
1383
1384
  config?: AxiosRequestConfig
1384
1385
  ): OperationResponse<Paths.GetAllowedReadingForMeter.Responses.$200>
@@ -1405,7 +1406,7 @@ export interface PathsDictionary {
1405
1406
  *
1406
1407
  */
1407
1408
  'get'(
1408
- parameters?: Parameters<Paths.GetReadingsByInterval.PathParameters & Paths.GetReadingsByInterval.QueryParameters> | null,
1409
+ parameters?: Parameters<Paths.GetReadingsByInterval.QueryParameters & Paths.GetReadingsByInterval.PathParameters> | null,
1409
1410
  data?: any,
1410
1411
  config?: AxiosRequestConfig
1411
1412
  ): OperationResponse<Paths.GetReadingsByInterval.Responses.$200>
@@ -1415,7 +1416,7 @@ export interface PathsDictionary {
1415
1416
  * Updates a meter reading.
1416
1417
  */
1417
1418
  'put'(
1418
- parameters?: Parameters<Paths.UpdateMeterReading.PathParameters & Paths.UpdateMeterReading.QueryParameters> | null,
1419
+ parameters?: Parameters<Paths.UpdateMeterReading.QueryParameters & Paths.UpdateMeterReading.PathParameters> | null,
1419
1420
  data?: Paths.UpdateMeterReading.RequestBody,
1420
1421
  config?: AxiosRequestConfig
1421
1422
  ): OperationResponse<Paths.UpdateMeterReading.Responses.$200>
@@ -1425,7 +1426,7 @@ export interface PathsDictionary {
1425
1426
  * Deletes a meter reading.
1426
1427
  */
1427
1428
  'delete'(
1428
- parameters?: Parameters<Paths.DeleteMeterReading.PathParameters & Paths.DeleteMeterReading.QueryParameters> | null,
1429
+ parameters?: Parameters<Paths.DeleteMeterReading.QueryParameters & Paths.DeleteMeterReading.PathParameters> | null,
1429
1430
  data?: any,
1430
1431
  config?: AxiosRequestConfig
1431
1432
  ): OperationResponse<Paths.DeleteMeterReading.Responses.$200>
@@ -1440,7 +1441,7 @@ export interface PathsDictionary {
1440
1441
  *
1441
1442
  */
1442
1443
  'get'(
1443
- parameters?: Parameters<Paths.GetDownSampleReadingsByInterval.PathParameters & Paths.GetDownSampleReadingsByInterval.QueryParameters> | null,
1444
+ parameters?: Parameters<Paths.GetDownSampleReadingsByInterval.QueryParameters & Paths.GetDownSampleReadingsByInterval.PathParameters> | null,
1444
1445
  data?: any,
1445
1446
  config?: AxiosRequestConfig
1446
1447
  ): OperationResponse<Paths.GetDownSampleReadingsByInterval.Responses.$200>
@@ -1448,3 +1449,29 @@ export interface PathsDictionary {
1448
1449
  }
1449
1450
 
1450
1451
  export type Client = OpenAPIClient<OperationMethods, PathsDictionary>
1452
+
1453
+ export type ActionLabel = Components.Schemas.ActionLabel;
1454
+ export type ActivityId = Components.Schemas.ActivityId;
1455
+ export type BaseEntity = Components.Schemas.BaseEntity;
1456
+ export type CounterReadingOnSubmission = Components.Schemas.CounterReadingOnSubmission;
1457
+ export type Direction = Components.Schemas.Direction;
1458
+ export type Entity = Components.Schemas.Entity;
1459
+ export type EntityId = Components.Schemas.EntityId;
1460
+ export type EntityItem = Components.Schemas.EntityItem;
1461
+ export type EntityRelation = Components.Schemas.EntityRelation;
1462
+ export type EntitySlug = Components.Schemas.EntitySlug;
1463
+ export type ErrorResp = Components.Schemas.ErrorResp;
1464
+ export type Id = Components.Schemas.Id;
1465
+ export type JourneyActions = Components.Schemas.JourneyActions;
1466
+ export type Meter = Components.Schemas.Meter;
1467
+ export type MeterCounter = Components.Schemas.MeterCounter;
1468
+ export type MeterReading = Components.Schemas.MeterReading;
1469
+ export type ReadBy = Components.Schemas.ReadBy;
1470
+ export type ReadingStatus = Components.Schemas.ReadingStatus;
1471
+ export type ReadingWithMeter = Components.Schemas.ReadingWithMeter;
1472
+ export type Reason = Components.Schemas.Reason;
1473
+ export type Rule = Components.Schemas.Rule;
1474
+ export type Source = Components.Schemas.Source;
1475
+ export type SubmissionMeterReading = Components.Schemas.SubmissionMeterReading;
1476
+ export type TariffType = Components.Schemas.TariffType;
1477
+ export type Unit = Components.Schemas.Unit;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/metering-client",
3
- "version": "0.5.9",
3
+ "version": "0.6.1",
4
4
  "description": "API Client for epilot Metering API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -23,8 +23,9 @@
23
23
  "typescript": "tsc",
24
24
  "bundle-definition": "webpack",
25
25
  "openapi": "node ../../scripts/update-openapi.js https://docs.api.epilot.io/metering.yaml",
26
- "typegen": "echo '/* eslint-disable */' > src/openapi.d.ts && typegen ./src/openapi.json >> src/openapi.d.ts",
27
- "build": "tsc && npm run bundle-definition",
26
+ "typegen": "openapi typegen src/openapi.json --client -b '/* eslint-disable */' > src/openapi.d.ts",
27
+ "build": "tsc && npm run build:patch && npm run bundle-definition",
28
+ "build:patch": "sed -i '/^__exportStar.*openapi.*$/d' dist/index.js",
28
29
  "build:watch": "npm run build && tsc -w",
29
30
  "prepublishOnly": "npm run typegen && npm run build",
30
31
  "lint": "../../node_modules/eslint/bin/eslint.js src"
@@ -61,13 +62,13 @@
61
62
  "copy-webpack-plugin": "^7.0.0",
62
63
  "jest": "^26.6.3",
63
64
  "json-loader": "^0.5.7",
64
- "openapi-client-axios-typegen": "^7.4.1",
65
- "openapicmd": "^2.1.0",
65
+ "openapicmd": "^2.6.0",
66
66
  "ts-jest": "^26.5.0",
67
67
  "ts-loader": "^8.0.14",
68
68
  "ts-node": "^10.9.1",
69
69
  "typescript": "^4.1.3",
70
70
  "webpack": "^5.18.0",
71
71
  "webpack-cli": "^4.4.0"
72
- }
73
- }
72
+ },
73
+ "gitHead": "cb7e6acc938eb178e531c19834ea8bd0d6445e6f"
74
+ }