electric-coop-api 0.1.23 → 0.1.25
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/README.md +2 -2
- package/dist/esm/models/CreateBillDto.d.ts +1 -1
- package/dist/esm/models/CreateBillDto.js +5 -3
- package/dist/esm/models/UpdateBillDto.d.ts +42 -0
- package/dist/esm/models/UpdateBillDto.js +14 -0
- package/dist/models/CreateBillDto.d.ts +1 -1
- package/dist/models/CreateBillDto.js +5 -3
- package/dist/models/UpdateBillDto.d.ts +42 -0
- package/dist/models/UpdateBillDto.js +14 -0
- package/package.json +1 -1
- package/src/models/CreateBillDto.ts +5 -4
- package/src/models/UpdateBillDto.ts +56 -0
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## electric-coop-api@0.1.
|
|
1
|
+
## electric-coop-api@0.1.25
|
|
2
2
|
|
|
3
3
|
This generator creates TypeScript/JavaScript client that utilizes [Fetch API](https://fetch.spec.whatwg.org/). The generated Node module can be used in the following environments:
|
|
4
4
|
|
|
@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
|
|
|
36
36
|
_published:_
|
|
37
37
|
|
|
38
38
|
```
|
|
39
|
-
npm install electric-coop-api@0.1.
|
|
39
|
+
npm install electric-coop-api@0.1.25 --save
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
_unPublished (not recommended):_
|
|
@@ -21,6 +21,8 @@ export function instanceOfCreateBillDto(value) {
|
|
|
21
21
|
return false;
|
|
22
22
|
if (!('dueDate' in value) || value['dueDate'] === undefined)
|
|
23
23
|
return false;
|
|
24
|
+
if (!('readingDate' in value) || value['readingDate'] === undefined)
|
|
25
|
+
return false;
|
|
24
26
|
if (!('previousReading' in value) || value['previousReading'] === undefined)
|
|
25
27
|
return false;
|
|
26
28
|
if (!('currentReading' in value) || value['currentReading'] === undefined)
|
|
@@ -40,7 +42,7 @@ export function CreateBillDtoFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
40
42
|
'consumerId': json['consumerId'],
|
|
41
43
|
'billingPeriod': json['billingPeriod'],
|
|
42
44
|
'dueDate': (new Date(json['dueDate'])),
|
|
43
|
-
'readingDate':
|
|
45
|
+
'readingDate': (new Date(json['readingDate'])),
|
|
44
46
|
'previousReading': json['previousReading'],
|
|
45
47
|
'currentReading': json['currentReading'],
|
|
46
48
|
'consumption': json['consumption'],
|
|
@@ -56,8 +58,8 @@ export function CreateBillDtoToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
56
58
|
return {
|
|
57
59
|
'consumerId': value['consumerId'],
|
|
58
60
|
'billingPeriod': value['billingPeriod'],
|
|
59
|
-
'dueDate': ((value['dueDate']).toISOString()
|
|
60
|
-
'readingDate':
|
|
61
|
+
'dueDate': ((value['dueDate']).toISOString()),
|
|
62
|
+
'readingDate': ((value['readingDate']).toISOString()),
|
|
61
63
|
'previousReading': value['previousReading'],
|
|
62
64
|
'currentReading': value['currentReading'],
|
|
63
65
|
'consumption': value['consumption'],
|
|
@@ -16,6 +16,48 @@ import type { BillStatusEnum } from './BillStatusEnum';
|
|
|
16
16
|
* @interface UpdateBillDto
|
|
17
17
|
*/
|
|
18
18
|
export interface UpdateBillDto {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof UpdateBillDto
|
|
23
|
+
*/
|
|
24
|
+
consumerId?: string;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {string}
|
|
28
|
+
* @memberof UpdateBillDto
|
|
29
|
+
*/
|
|
30
|
+
billingPeriod?: string;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @type {Date}
|
|
34
|
+
* @memberof UpdateBillDto
|
|
35
|
+
*/
|
|
36
|
+
dueDate?: Date;
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {Date}
|
|
40
|
+
* @memberof UpdateBillDto
|
|
41
|
+
*/
|
|
42
|
+
readingDate?: Date;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {number}
|
|
46
|
+
* @memberof UpdateBillDto
|
|
47
|
+
*/
|
|
48
|
+
previousReading?: number;
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
51
|
+
* @type {number}
|
|
52
|
+
* @memberof UpdateBillDto
|
|
53
|
+
*/
|
|
54
|
+
currentReading?: number;
|
|
55
|
+
/**
|
|
56
|
+
*
|
|
57
|
+
* @type {number}
|
|
58
|
+
* @memberof UpdateBillDto
|
|
59
|
+
*/
|
|
60
|
+
consumption?: number;
|
|
19
61
|
/**
|
|
20
62
|
*
|
|
21
63
|
* @type {BillStatusEnum}
|
|
@@ -26,6 +26,13 @@ export function UpdateBillDtoFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
26
26
|
return json;
|
|
27
27
|
}
|
|
28
28
|
return {
|
|
29
|
+
'consumerId': json['consumerId'] == null ? undefined : json['consumerId'],
|
|
30
|
+
'billingPeriod': json['billingPeriod'] == null ? undefined : json['billingPeriod'],
|
|
31
|
+
'dueDate': json['dueDate'] == null ? undefined : (new Date(json['dueDate'])),
|
|
32
|
+
'readingDate': json['readingDate'] == null ? undefined : (new Date(json['readingDate'])),
|
|
33
|
+
'previousReading': json['previousReading'] == null ? undefined : json['previousReading'],
|
|
34
|
+
'currentReading': json['currentReading'] == null ? undefined : json['currentReading'],
|
|
35
|
+
'consumption': json['consumption'] == null ? undefined : json['consumption'],
|
|
29
36
|
'status': json['status'] == null ? undefined : BillStatusEnumFromJSON(json['status']),
|
|
30
37
|
};
|
|
31
38
|
}
|
|
@@ -37,6 +44,13 @@ export function UpdateBillDtoToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
37
44
|
return value;
|
|
38
45
|
}
|
|
39
46
|
return {
|
|
47
|
+
'consumerId': value['consumerId'],
|
|
48
|
+
'billingPeriod': value['billingPeriod'],
|
|
49
|
+
'dueDate': value['dueDate'] == null ? undefined : ((value['dueDate']).toISOString()),
|
|
50
|
+
'readingDate': value['readingDate'] == null ? undefined : ((value['readingDate']).toISOString()),
|
|
51
|
+
'previousReading': value['previousReading'],
|
|
52
|
+
'currentReading': value['currentReading'],
|
|
53
|
+
'consumption': value['consumption'],
|
|
40
54
|
'status': BillStatusEnumToJSON(value['status']),
|
|
41
55
|
};
|
|
42
56
|
}
|
|
@@ -28,6 +28,8 @@ function instanceOfCreateBillDto(value) {
|
|
|
28
28
|
return false;
|
|
29
29
|
if (!('dueDate' in value) || value['dueDate'] === undefined)
|
|
30
30
|
return false;
|
|
31
|
+
if (!('readingDate' in value) || value['readingDate'] === undefined)
|
|
32
|
+
return false;
|
|
31
33
|
if (!('previousReading' in value) || value['previousReading'] === undefined)
|
|
32
34
|
return false;
|
|
33
35
|
if (!('currentReading' in value) || value['currentReading'] === undefined)
|
|
@@ -47,7 +49,7 @@ function CreateBillDtoFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
47
49
|
'consumerId': json['consumerId'],
|
|
48
50
|
'billingPeriod': json['billingPeriod'],
|
|
49
51
|
'dueDate': (new Date(json['dueDate'])),
|
|
50
|
-
'readingDate':
|
|
52
|
+
'readingDate': (new Date(json['readingDate'])),
|
|
51
53
|
'previousReading': json['previousReading'],
|
|
52
54
|
'currentReading': json['currentReading'],
|
|
53
55
|
'consumption': json['consumption'],
|
|
@@ -63,8 +65,8 @@ function CreateBillDtoToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
63
65
|
return {
|
|
64
66
|
'consumerId': value['consumerId'],
|
|
65
67
|
'billingPeriod': value['billingPeriod'],
|
|
66
|
-
'dueDate': ((value['dueDate']).toISOString()
|
|
67
|
-
'readingDate':
|
|
68
|
+
'dueDate': ((value['dueDate']).toISOString()),
|
|
69
|
+
'readingDate': ((value['readingDate']).toISOString()),
|
|
68
70
|
'previousReading': value['previousReading'],
|
|
69
71
|
'currentReading': value['currentReading'],
|
|
70
72
|
'consumption': value['consumption'],
|
|
@@ -16,6 +16,48 @@ import type { BillStatusEnum } from './BillStatusEnum';
|
|
|
16
16
|
* @interface UpdateBillDto
|
|
17
17
|
*/
|
|
18
18
|
export interface UpdateBillDto {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof UpdateBillDto
|
|
23
|
+
*/
|
|
24
|
+
consumerId?: string;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {string}
|
|
28
|
+
* @memberof UpdateBillDto
|
|
29
|
+
*/
|
|
30
|
+
billingPeriod?: string;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @type {Date}
|
|
34
|
+
* @memberof UpdateBillDto
|
|
35
|
+
*/
|
|
36
|
+
dueDate?: Date;
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {Date}
|
|
40
|
+
* @memberof UpdateBillDto
|
|
41
|
+
*/
|
|
42
|
+
readingDate?: Date;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {number}
|
|
46
|
+
* @memberof UpdateBillDto
|
|
47
|
+
*/
|
|
48
|
+
previousReading?: number;
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
51
|
+
* @type {number}
|
|
52
|
+
* @memberof UpdateBillDto
|
|
53
|
+
*/
|
|
54
|
+
currentReading?: number;
|
|
55
|
+
/**
|
|
56
|
+
*
|
|
57
|
+
* @type {number}
|
|
58
|
+
* @memberof UpdateBillDto
|
|
59
|
+
*/
|
|
60
|
+
consumption?: number;
|
|
19
61
|
/**
|
|
20
62
|
*
|
|
21
63
|
* @type {BillStatusEnum}
|
|
@@ -33,6 +33,13 @@ function UpdateBillDtoFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
33
33
|
return json;
|
|
34
34
|
}
|
|
35
35
|
return {
|
|
36
|
+
'consumerId': json['consumerId'] == null ? undefined : json['consumerId'],
|
|
37
|
+
'billingPeriod': json['billingPeriod'] == null ? undefined : json['billingPeriod'],
|
|
38
|
+
'dueDate': json['dueDate'] == null ? undefined : (new Date(json['dueDate'])),
|
|
39
|
+
'readingDate': json['readingDate'] == null ? undefined : (new Date(json['readingDate'])),
|
|
40
|
+
'previousReading': json['previousReading'] == null ? undefined : json['previousReading'],
|
|
41
|
+
'currentReading': json['currentReading'] == null ? undefined : json['currentReading'],
|
|
42
|
+
'consumption': json['consumption'] == null ? undefined : json['consumption'],
|
|
36
43
|
'status': json['status'] == null ? undefined : (0, BillStatusEnum_1.BillStatusEnumFromJSON)(json['status']),
|
|
37
44
|
};
|
|
38
45
|
}
|
|
@@ -44,6 +51,13 @@ function UpdateBillDtoToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
44
51
|
return value;
|
|
45
52
|
}
|
|
46
53
|
return {
|
|
54
|
+
'consumerId': value['consumerId'],
|
|
55
|
+
'billingPeriod': value['billingPeriod'],
|
|
56
|
+
'dueDate': value['dueDate'] == null ? undefined : ((value['dueDate']).toISOString()),
|
|
57
|
+
'readingDate': value['readingDate'] == null ? undefined : ((value['readingDate']).toISOString()),
|
|
58
|
+
'previousReading': value['previousReading'],
|
|
59
|
+
'currentReading': value['currentReading'],
|
|
60
|
+
'consumption': value['consumption'],
|
|
47
61
|
'status': (0, BillStatusEnum_1.BillStatusEnumToJSON)(value['status']),
|
|
48
62
|
};
|
|
49
63
|
}
|
package/package.json
CHANGED
|
@@ -42,7 +42,7 @@ export interface CreateBillDto {
|
|
|
42
42
|
* @type {Date}
|
|
43
43
|
* @memberof CreateBillDto
|
|
44
44
|
*/
|
|
45
|
-
readingDate
|
|
45
|
+
readingDate: Date;
|
|
46
46
|
/**
|
|
47
47
|
*
|
|
48
48
|
* @type {number}
|
|
@@ -70,6 +70,7 @@ export function instanceOfCreateBillDto(value: object): value is CreateBillDto {
|
|
|
70
70
|
if (!('consumerId' in value) || value['consumerId'] === undefined) return false;
|
|
71
71
|
if (!('billingPeriod' in value) || value['billingPeriod'] === undefined) return false;
|
|
72
72
|
if (!('dueDate' in value) || value['dueDate'] === undefined) return false;
|
|
73
|
+
if (!('readingDate' in value) || value['readingDate'] === undefined) return false;
|
|
73
74
|
if (!('previousReading' in value) || value['previousReading'] === undefined) return false;
|
|
74
75
|
if (!('currentReading' in value) || value['currentReading'] === undefined) return false;
|
|
75
76
|
if (!('consumption' in value) || value['consumption'] === undefined) return false;
|
|
@@ -89,7 +90,7 @@ export function CreateBillDtoFromJSONTyped(json: any, ignoreDiscriminator: boole
|
|
|
89
90
|
'consumerId': json['consumerId'],
|
|
90
91
|
'billingPeriod': json['billingPeriod'],
|
|
91
92
|
'dueDate': (new Date(json['dueDate'])),
|
|
92
|
-
'readingDate':
|
|
93
|
+
'readingDate': (new Date(json['readingDate'])),
|
|
93
94
|
'previousReading': json['previousReading'],
|
|
94
95
|
'currentReading': json['currentReading'],
|
|
95
96
|
'consumption': json['consumption'],
|
|
@@ -109,8 +110,8 @@ export function CreateBillDtoToJSONTyped(value?: CreateBillDto | null, ignoreDis
|
|
|
109
110
|
|
|
110
111
|
'consumerId': value['consumerId'],
|
|
111
112
|
'billingPeriod': value['billingPeriod'],
|
|
112
|
-
'dueDate': ((value['dueDate']).toISOString()
|
|
113
|
-
'readingDate':
|
|
113
|
+
'dueDate': ((value['dueDate']).toISOString()),
|
|
114
|
+
'readingDate': ((value['readingDate']).toISOString()),
|
|
114
115
|
'previousReading': value['previousReading'],
|
|
115
116
|
'currentReading': value['currentReading'],
|
|
116
117
|
'consumption': value['consumption'],
|
|
@@ -27,6 +27,48 @@ import {
|
|
|
27
27
|
* @interface UpdateBillDto
|
|
28
28
|
*/
|
|
29
29
|
export interface UpdateBillDto {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof UpdateBillDto
|
|
34
|
+
*/
|
|
35
|
+
consumerId?: string;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof UpdateBillDto
|
|
40
|
+
*/
|
|
41
|
+
billingPeriod?: string;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {Date}
|
|
45
|
+
* @memberof UpdateBillDto
|
|
46
|
+
*/
|
|
47
|
+
dueDate?: Date;
|
|
48
|
+
/**
|
|
49
|
+
*
|
|
50
|
+
* @type {Date}
|
|
51
|
+
* @memberof UpdateBillDto
|
|
52
|
+
*/
|
|
53
|
+
readingDate?: Date;
|
|
54
|
+
/**
|
|
55
|
+
*
|
|
56
|
+
* @type {number}
|
|
57
|
+
* @memberof UpdateBillDto
|
|
58
|
+
*/
|
|
59
|
+
previousReading?: number;
|
|
60
|
+
/**
|
|
61
|
+
*
|
|
62
|
+
* @type {number}
|
|
63
|
+
* @memberof UpdateBillDto
|
|
64
|
+
*/
|
|
65
|
+
currentReading?: number;
|
|
66
|
+
/**
|
|
67
|
+
*
|
|
68
|
+
* @type {number}
|
|
69
|
+
* @memberof UpdateBillDto
|
|
70
|
+
*/
|
|
71
|
+
consumption?: number;
|
|
30
72
|
/**
|
|
31
73
|
*
|
|
32
74
|
* @type {BillStatusEnum}
|
|
@@ -54,6 +96,13 @@ export function UpdateBillDtoFromJSONTyped(json: any, ignoreDiscriminator: boole
|
|
|
54
96
|
}
|
|
55
97
|
return {
|
|
56
98
|
|
|
99
|
+
'consumerId': json['consumerId'] == null ? undefined : json['consumerId'],
|
|
100
|
+
'billingPeriod': json['billingPeriod'] == null ? undefined : json['billingPeriod'],
|
|
101
|
+
'dueDate': json['dueDate'] == null ? undefined : (new Date(json['dueDate'])),
|
|
102
|
+
'readingDate': json['readingDate'] == null ? undefined : (new Date(json['readingDate'])),
|
|
103
|
+
'previousReading': json['previousReading'] == null ? undefined : json['previousReading'],
|
|
104
|
+
'currentReading': json['currentReading'] == null ? undefined : json['currentReading'],
|
|
105
|
+
'consumption': json['consumption'] == null ? undefined : json['consumption'],
|
|
57
106
|
'status': json['status'] == null ? undefined : BillStatusEnumFromJSON(json['status']),
|
|
58
107
|
};
|
|
59
108
|
}
|
|
@@ -69,6 +118,13 @@ export function UpdateBillDtoToJSONTyped(value?: UpdateBillDto | null, ignoreDis
|
|
|
69
118
|
|
|
70
119
|
return {
|
|
71
120
|
|
|
121
|
+
'consumerId': value['consumerId'],
|
|
122
|
+
'billingPeriod': value['billingPeriod'],
|
|
123
|
+
'dueDate': value['dueDate'] == null ? undefined : ((value['dueDate']).toISOString()),
|
|
124
|
+
'readingDate': value['readingDate'] == null ? undefined : ((value['readingDate']).toISOString()),
|
|
125
|
+
'previousReading': value['previousReading'],
|
|
126
|
+
'currentReading': value['currentReading'],
|
|
127
|
+
'consumption': value['consumption'],
|
|
72
128
|
'status': BillStatusEnumToJSON(value['status']),
|
|
73
129
|
};
|
|
74
130
|
}
|