electric-coop-api 0.1.19 → 0.1.20
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/.openapi-generator/FILES +1 -0
- package/README.md +2 -2
- package/dist/esm/models/Bill.d.ts +10 -4
- package/dist/esm/models/Bill.js +6 -2
- package/dist/esm/models/BillReadingByDto.d.ts +38 -0
- package/dist/esm/models/BillReadingByDto.js +45 -0
- package/dist/esm/models/index.d.ts +1 -0
- package/dist/esm/models/index.js +1 -0
- package/dist/models/Bill.d.ts +10 -4
- package/dist/models/Bill.js +6 -2
- package/dist/models/BillReadingByDto.d.ts +38 -0
- package/dist/models/BillReadingByDto.js +52 -0
- package/dist/models/index.d.ts +1 -0
- package/dist/models/index.js +1 -0
- package/package.json +1 -1
- package/src/models/Bill.ts +26 -4
- package/src/models/BillReadingByDto.ts +74 -0
- package/src/models/index.ts +1 -0
package/.openapi-generator/FILES
CHANGED
|
@@ -44,6 +44,7 @@ src/models/BillBreakdownCategoryDto.ts
|
|
|
44
44
|
src/models/BillBreakdownChargeDto.ts
|
|
45
45
|
src/models/BillBreakdownDto.ts
|
|
46
46
|
src/models/BillBreakdownSectionDto.ts
|
|
47
|
+
src/models/BillReadingByDto.ts
|
|
47
48
|
src/models/BillStatusEnum.ts
|
|
48
49
|
src/models/BillsAdminPaginatedResponse.ts
|
|
49
50
|
src/models/BillsImportResponse.ts
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## electric-coop-api@0.1.
|
|
1
|
+
## electric-coop-api@0.1.20
|
|
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.20 --save
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
_unPublished (not recommended):_
|
|
@@ -9,7 +9,9 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
+
import type { BillBreakdownDto } from './BillBreakdownDto';
|
|
12
13
|
import type { BillStatusEnum } from './BillStatusEnum';
|
|
14
|
+
import type { BillReadingByDto } from './BillReadingByDto';
|
|
13
15
|
/**
|
|
14
16
|
*
|
|
15
17
|
* @export
|
|
@@ -76,6 +78,12 @@ export interface Bill {
|
|
|
76
78
|
* @memberof Bill
|
|
77
79
|
*/
|
|
78
80
|
readingByUserId?: object;
|
|
81
|
+
/**
|
|
82
|
+
* User who captured the meter reading (computed field, not stored on bills table)
|
|
83
|
+
* @type {BillReadingByDto}
|
|
84
|
+
* @memberof Bill
|
|
85
|
+
*/
|
|
86
|
+
readingBy?: BillReadingByDto | null;
|
|
79
87
|
/**
|
|
80
88
|
*
|
|
81
89
|
* @type {number}
|
|
@@ -150,12 +158,10 @@ export interface Bill {
|
|
|
150
158
|
status: BillStatusEnum;
|
|
151
159
|
/**
|
|
152
160
|
*
|
|
153
|
-
* @type {
|
|
161
|
+
* @type {BillBreakdownDto}
|
|
154
162
|
* @memberof Bill
|
|
155
163
|
*/
|
|
156
|
-
breakdown?:
|
|
157
|
-
[key: string]: any;
|
|
158
|
-
};
|
|
164
|
+
breakdown?: BillBreakdownDto;
|
|
159
165
|
/**
|
|
160
166
|
*
|
|
161
167
|
* @type {{ [key: string]: any; }}
|
package/dist/esm/models/Bill.js
CHANGED
|
@@ -11,7 +11,9 @@
|
|
|
11
11
|
* https://openapi-generator.tech
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
|
+
import { BillBreakdownDtoFromJSON, BillBreakdownDtoToJSON, } from './BillBreakdownDto';
|
|
14
15
|
import { BillStatusEnumFromJSON, BillStatusEnumToJSON, } from './BillStatusEnum';
|
|
16
|
+
import { BillReadingByDtoFromJSON, BillReadingByDtoToJSON, } from './BillReadingByDto';
|
|
15
17
|
/**
|
|
16
18
|
* Check if a given object implements the Bill interface.
|
|
17
19
|
*/
|
|
@@ -62,6 +64,7 @@ export function BillFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
62
64
|
'dueDate': (new Date(json['dueDate'])),
|
|
63
65
|
'readingDate': json['readingDate'] == null ? undefined : (new Date(json['readingDate'])),
|
|
64
66
|
'readingByUserId': json['readingByUserId'] == null ? undefined : json['readingByUserId'],
|
|
67
|
+
'readingBy': json['readingBy'] == null ? undefined : BillReadingByDtoFromJSON(json['readingBy']),
|
|
65
68
|
'previousReading': json['previousReading'],
|
|
66
69
|
'currentReading': json['currentReading'],
|
|
67
70
|
'consumption': json['consumption'],
|
|
@@ -74,7 +77,7 @@ export function BillFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
74
77
|
'amountPaid': json['amountPaid'],
|
|
75
78
|
'paymentDate': json['paymentDate'] == null ? undefined : json['paymentDate'],
|
|
76
79
|
'status': BillStatusEnumFromJSON(json['status']),
|
|
77
|
-
'breakdown': json['breakdown'] == null ? undefined : json['breakdown'],
|
|
80
|
+
'breakdown': json['breakdown'] == null ? undefined : BillBreakdownDtoFromJSON(json['breakdown']),
|
|
78
81
|
'metadata': json['metadata'] == null ? undefined : json['metadata'],
|
|
79
82
|
};
|
|
80
83
|
}
|
|
@@ -96,6 +99,7 @@ export function BillToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
96
99
|
'dueDate': ((value['dueDate']).toISOString()),
|
|
97
100
|
'readingDate': value['readingDate'] == null ? undefined : ((value['readingDate']).toISOString()),
|
|
98
101
|
'readingByUserId': value['readingByUserId'],
|
|
102
|
+
'readingBy': BillReadingByDtoToJSON(value['readingBy']),
|
|
99
103
|
'previousReading': value['previousReading'],
|
|
100
104
|
'currentReading': value['currentReading'],
|
|
101
105
|
'consumption': value['consumption'],
|
|
@@ -108,7 +112,7 @@ export function BillToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
108
112
|
'amountPaid': value['amountPaid'],
|
|
109
113
|
'paymentDate': value['paymentDate'],
|
|
110
114
|
'status': BillStatusEnumToJSON(value['status']),
|
|
111
|
-
'breakdown': value['breakdown'],
|
|
115
|
+
'breakdown': BillBreakdownDtoToJSON(value['breakdown']),
|
|
112
116
|
'metadata': value['metadata'],
|
|
113
117
|
};
|
|
114
118
|
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Electric Cooperative Consumer Portal API
|
|
3
|
+
* Multi-tenant SaaS platform for Philippine electric cooperatives
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface BillReadingByDto
|
|
16
|
+
*/
|
|
17
|
+
export interface BillReadingByDto {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof BillReadingByDto
|
|
22
|
+
*/
|
|
23
|
+
id: string;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {object}
|
|
27
|
+
* @memberof BillReadingByDto
|
|
28
|
+
*/
|
|
29
|
+
name?: object | null;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Check if a given object implements the BillReadingByDto interface.
|
|
33
|
+
*/
|
|
34
|
+
export declare function instanceOfBillReadingByDto(value: object): value is BillReadingByDto;
|
|
35
|
+
export declare function BillReadingByDtoFromJSON(json: any): BillReadingByDto;
|
|
36
|
+
export declare function BillReadingByDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): BillReadingByDto;
|
|
37
|
+
export declare function BillReadingByDtoToJSON(json: any): BillReadingByDto;
|
|
38
|
+
export declare function BillReadingByDtoToJSONTyped(value?: BillReadingByDto | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Electric Cooperative Consumer Portal API
|
|
5
|
+
* Multi-tenant SaaS platform for Philippine electric cooperatives
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* Check if a given object implements the BillReadingByDto interface.
|
|
16
|
+
*/
|
|
17
|
+
export function instanceOfBillReadingByDto(value) {
|
|
18
|
+
if (!('id' in value) || value['id'] === undefined)
|
|
19
|
+
return false;
|
|
20
|
+
return true;
|
|
21
|
+
}
|
|
22
|
+
export function BillReadingByDtoFromJSON(json) {
|
|
23
|
+
return BillReadingByDtoFromJSONTyped(json, false);
|
|
24
|
+
}
|
|
25
|
+
export function BillReadingByDtoFromJSONTyped(json, ignoreDiscriminator) {
|
|
26
|
+
if (json == null) {
|
|
27
|
+
return json;
|
|
28
|
+
}
|
|
29
|
+
return {
|
|
30
|
+
'id': json['id'],
|
|
31
|
+
'name': json['name'] == null ? undefined : json['name'],
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
export function BillReadingByDtoToJSON(json) {
|
|
35
|
+
return BillReadingByDtoToJSONTyped(json, false);
|
|
36
|
+
}
|
|
37
|
+
export function BillReadingByDtoToJSONTyped(value, ignoreDiscriminator = false) {
|
|
38
|
+
if (value == null) {
|
|
39
|
+
return value;
|
|
40
|
+
}
|
|
41
|
+
return {
|
|
42
|
+
'id': value['id'],
|
|
43
|
+
'name': value['name'],
|
|
44
|
+
};
|
|
45
|
+
}
|
|
@@ -19,6 +19,7 @@ export * from './BillBreakdownCategoryDto';
|
|
|
19
19
|
export * from './BillBreakdownChargeDto';
|
|
20
20
|
export * from './BillBreakdownDto';
|
|
21
21
|
export * from './BillBreakdownSectionDto';
|
|
22
|
+
export * from './BillReadingByDto';
|
|
22
23
|
export * from './BillStatusEnum';
|
|
23
24
|
export * from './BillsAdminPaginatedResponse';
|
|
24
25
|
export * from './BillsImportResponse';
|
package/dist/esm/models/index.js
CHANGED
|
@@ -21,6 +21,7 @@ export * from './BillBreakdownCategoryDto';
|
|
|
21
21
|
export * from './BillBreakdownChargeDto';
|
|
22
22
|
export * from './BillBreakdownDto';
|
|
23
23
|
export * from './BillBreakdownSectionDto';
|
|
24
|
+
export * from './BillReadingByDto';
|
|
24
25
|
export * from './BillStatusEnum';
|
|
25
26
|
export * from './BillsAdminPaginatedResponse';
|
|
26
27
|
export * from './BillsImportResponse';
|
package/dist/models/Bill.d.ts
CHANGED
|
@@ -9,7 +9,9 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
+
import type { BillBreakdownDto } from './BillBreakdownDto';
|
|
12
13
|
import type { BillStatusEnum } from './BillStatusEnum';
|
|
14
|
+
import type { BillReadingByDto } from './BillReadingByDto';
|
|
13
15
|
/**
|
|
14
16
|
*
|
|
15
17
|
* @export
|
|
@@ -76,6 +78,12 @@ export interface Bill {
|
|
|
76
78
|
* @memberof Bill
|
|
77
79
|
*/
|
|
78
80
|
readingByUserId?: object;
|
|
81
|
+
/**
|
|
82
|
+
* User who captured the meter reading (computed field, not stored on bills table)
|
|
83
|
+
* @type {BillReadingByDto}
|
|
84
|
+
* @memberof Bill
|
|
85
|
+
*/
|
|
86
|
+
readingBy?: BillReadingByDto | null;
|
|
79
87
|
/**
|
|
80
88
|
*
|
|
81
89
|
* @type {number}
|
|
@@ -150,12 +158,10 @@ export interface Bill {
|
|
|
150
158
|
status: BillStatusEnum;
|
|
151
159
|
/**
|
|
152
160
|
*
|
|
153
|
-
* @type {
|
|
161
|
+
* @type {BillBreakdownDto}
|
|
154
162
|
* @memberof Bill
|
|
155
163
|
*/
|
|
156
|
-
breakdown?:
|
|
157
|
-
[key: string]: any;
|
|
158
|
-
};
|
|
164
|
+
breakdown?: BillBreakdownDto;
|
|
159
165
|
/**
|
|
160
166
|
*
|
|
161
167
|
* @type {{ [key: string]: any; }}
|
package/dist/models/Bill.js
CHANGED
|
@@ -18,7 +18,9 @@ exports.BillFromJSON = BillFromJSON;
|
|
|
18
18
|
exports.BillFromJSONTyped = BillFromJSONTyped;
|
|
19
19
|
exports.BillToJSON = BillToJSON;
|
|
20
20
|
exports.BillToJSONTyped = BillToJSONTyped;
|
|
21
|
+
const BillBreakdownDto_1 = require("./BillBreakdownDto");
|
|
21
22
|
const BillStatusEnum_1 = require("./BillStatusEnum");
|
|
23
|
+
const BillReadingByDto_1 = require("./BillReadingByDto");
|
|
22
24
|
/**
|
|
23
25
|
* Check if a given object implements the Bill interface.
|
|
24
26
|
*/
|
|
@@ -69,6 +71,7 @@ function BillFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
69
71
|
'dueDate': (new Date(json['dueDate'])),
|
|
70
72
|
'readingDate': json['readingDate'] == null ? undefined : (new Date(json['readingDate'])),
|
|
71
73
|
'readingByUserId': json['readingByUserId'] == null ? undefined : json['readingByUserId'],
|
|
74
|
+
'readingBy': json['readingBy'] == null ? undefined : (0, BillReadingByDto_1.BillReadingByDtoFromJSON)(json['readingBy']),
|
|
72
75
|
'previousReading': json['previousReading'],
|
|
73
76
|
'currentReading': json['currentReading'],
|
|
74
77
|
'consumption': json['consumption'],
|
|
@@ -81,7 +84,7 @@ function BillFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
81
84
|
'amountPaid': json['amountPaid'],
|
|
82
85
|
'paymentDate': json['paymentDate'] == null ? undefined : json['paymentDate'],
|
|
83
86
|
'status': (0, BillStatusEnum_1.BillStatusEnumFromJSON)(json['status']),
|
|
84
|
-
'breakdown': json['breakdown'] == null ? undefined : json['breakdown'],
|
|
87
|
+
'breakdown': json['breakdown'] == null ? undefined : (0, BillBreakdownDto_1.BillBreakdownDtoFromJSON)(json['breakdown']),
|
|
85
88
|
'metadata': json['metadata'] == null ? undefined : json['metadata'],
|
|
86
89
|
};
|
|
87
90
|
}
|
|
@@ -103,6 +106,7 @@ function BillToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
103
106
|
'dueDate': ((value['dueDate']).toISOString()),
|
|
104
107
|
'readingDate': value['readingDate'] == null ? undefined : ((value['readingDate']).toISOString()),
|
|
105
108
|
'readingByUserId': value['readingByUserId'],
|
|
109
|
+
'readingBy': (0, BillReadingByDto_1.BillReadingByDtoToJSON)(value['readingBy']),
|
|
106
110
|
'previousReading': value['previousReading'],
|
|
107
111
|
'currentReading': value['currentReading'],
|
|
108
112
|
'consumption': value['consumption'],
|
|
@@ -115,7 +119,7 @@ function BillToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
115
119
|
'amountPaid': value['amountPaid'],
|
|
116
120
|
'paymentDate': value['paymentDate'],
|
|
117
121
|
'status': (0, BillStatusEnum_1.BillStatusEnumToJSON)(value['status']),
|
|
118
|
-
'breakdown': value['breakdown'],
|
|
122
|
+
'breakdown': (0, BillBreakdownDto_1.BillBreakdownDtoToJSON)(value['breakdown']),
|
|
119
123
|
'metadata': value['metadata'],
|
|
120
124
|
};
|
|
121
125
|
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Electric Cooperative Consumer Portal API
|
|
3
|
+
* Multi-tenant SaaS platform for Philippine electric cooperatives
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface BillReadingByDto
|
|
16
|
+
*/
|
|
17
|
+
export interface BillReadingByDto {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof BillReadingByDto
|
|
22
|
+
*/
|
|
23
|
+
id: string;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {object}
|
|
27
|
+
* @memberof BillReadingByDto
|
|
28
|
+
*/
|
|
29
|
+
name?: object | null;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Check if a given object implements the BillReadingByDto interface.
|
|
33
|
+
*/
|
|
34
|
+
export declare function instanceOfBillReadingByDto(value: object): value is BillReadingByDto;
|
|
35
|
+
export declare function BillReadingByDtoFromJSON(json: any): BillReadingByDto;
|
|
36
|
+
export declare function BillReadingByDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): BillReadingByDto;
|
|
37
|
+
export declare function BillReadingByDtoToJSON(json: any): BillReadingByDto;
|
|
38
|
+
export declare function BillReadingByDtoToJSONTyped(value?: BillReadingByDto | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Electric Cooperative Consumer Portal API
|
|
6
|
+
* Multi-tenant SaaS platform for Philippine electric cooperatives
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.instanceOfBillReadingByDto = instanceOfBillReadingByDto;
|
|
17
|
+
exports.BillReadingByDtoFromJSON = BillReadingByDtoFromJSON;
|
|
18
|
+
exports.BillReadingByDtoFromJSONTyped = BillReadingByDtoFromJSONTyped;
|
|
19
|
+
exports.BillReadingByDtoToJSON = BillReadingByDtoToJSON;
|
|
20
|
+
exports.BillReadingByDtoToJSONTyped = BillReadingByDtoToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the BillReadingByDto interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfBillReadingByDto(value) {
|
|
25
|
+
if (!('id' in value) || value['id'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
function BillReadingByDtoFromJSON(json) {
|
|
30
|
+
return BillReadingByDtoFromJSONTyped(json, false);
|
|
31
|
+
}
|
|
32
|
+
function BillReadingByDtoFromJSONTyped(json, ignoreDiscriminator) {
|
|
33
|
+
if (json == null) {
|
|
34
|
+
return json;
|
|
35
|
+
}
|
|
36
|
+
return {
|
|
37
|
+
'id': json['id'],
|
|
38
|
+
'name': json['name'] == null ? undefined : json['name'],
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
function BillReadingByDtoToJSON(json) {
|
|
42
|
+
return BillReadingByDtoToJSONTyped(json, false);
|
|
43
|
+
}
|
|
44
|
+
function BillReadingByDtoToJSONTyped(value, ignoreDiscriminator = false) {
|
|
45
|
+
if (value == null) {
|
|
46
|
+
return value;
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
'id': value['id'],
|
|
50
|
+
'name': value['name'],
|
|
51
|
+
};
|
|
52
|
+
}
|
package/dist/models/index.d.ts
CHANGED
|
@@ -19,6 +19,7 @@ export * from './BillBreakdownCategoryDto';
|
|
|
19
19
|
export * from './BillBreakdownChargeDto';
|
|
20
20
|
export * from './BillBreakdownDto';
|
|
21
21
|
export * from './BillBreakdownSectionDto';
|
|
22
|
+
export * from './BillReadingByDto';
|
|
22
23
|
export * from './BillStatusEnum';
|
|
23
24
|
export * from './BillsAdminPaginatedResponse';
|
|
24
25
|
export * from './BillsImportResponse';
|
package/dist/models/index.js
CHANGED
|
@@ -37,6 +37,7 @@ __exportStar(require("./BillBreakdownCategoryDto"), exports);
|
|
|
37
37
|
__exportStar(require("./BillBreakdownChargeDto"), exports);
|
|
38
38
|
__exportStar(require("./BillBreakdownDto"), exports);
|
|
39
39
|
__exportStar(require("./BillBreakdownSectionDto"), exports);
|
|
40
|
+
__exportStar(require("./BillReadingByDto"), exports);
|
|
40
41
|
__exportStar(require("./BillStatusEnum"), exports);
|
|
41
42
|
__exportStar(require("./BillsAdminPaginatedResponse"), exports);
|
|
42
43
|
__exportStar(require("./BillsImportResponse"), exports);
|
package/package.json
CHANGED
package/src/models/Bill.ts
CHANGED
|
@@ -13,6 +13,13 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { mapValues } from '../runtime';
|
|
16
|
+
import type { BillBreakdownDto } from './BillBreakdownDto';
|
|
17
|
+
import {
|
|
18
|
+
BillBreakdownDtoFromJSON,
|
|
19
|
+
BillBreakdownDtoFromJSONTyped,
|
|
20
|
+
BillBreakdownDtoToJSON,
|
|
21
|
+
BillBreakdownDtoToJSONTyped,
|
|
22
|
+
} from './BillBreakdownDto';
|
|
16
23
|
import type { BillStatusEnum } from './BillStatusEnum';
|
|
17
24
|
import {
|
|
18
25
|
BillStatusEnumFromJSON,
|
|
@@ -20,6 +27,13 @@ import {
|
|
|
20
27
|
BillStatusEnumToJSON,
|
|
21
28
|
BillStatusEnumToJSONTyped,
|
|
22
29
|
} from './BillStatusEnum';
|
|
30
|
+
import type { BillReadingByDto } from './BillReadingByDto';
|
|
31
|
+
import {
|
|
32
|
+
BillReadingByDtoFromJSON,
|
|
33
|
+
BillReadingByDtoFromJSONTyped,
|
|
34
|
+
BillReadingByDtoToJSON,
|
|
35
|
+
BillReadingByDtoToJSONTyped,
|
|
36
|
+
} from './BillReadingByDto';
|
|
23
37
|
|
|
24
38
|
/**
|
|
25
39
|
*
|
|
@@ -87,6 +101,12 @@ export interface Bill {
|
|
|
87
101
|
* @memberof Bill
|
|
88
102
|
*/
|
|
89
103
|
readingByUserId?: object;
|
|
104
|
+
/**
|
|
105
|
+
* User who captured the meter reading (computed field, not stored on bills table)
|
|
106
|
+
* @type {BillReadingByDto}
|
|
107
|
+
* @memberof Bill
|
|
108
|
+
*/
|
|
109
|
+
readingBy?: BillReadingByDto | null;
|
|
90
110
|
/**
|
|
91
111
|
*
|
|
92
112
|
* @type {number}
|
|
@@ -161,10 +181,10 @@ export interface Bill {
|
|
|
161
181
|
status: BillStatusEnum;
|
|
162
182
|
/**
|
|
163
183
|
*
|
|
164
|
-
* @type {
|
|
184
|
+
* @type {BillBreakdownDto}
|
|
165
185
|
* @memberof Bill
|
|
166
186
|
*/
|
|
167
|
-
breakdown?:
|
|
187
|
+
breakdown?: BillBreakdownDto;
|
|
168
188
|
/**
|
|
169
189
|
*
|
|
170
190
|
* @type {{ [key: string]: any; }}
|
|
@@ -215,6 +235,7 @@ export function BillFromJSONTyped(json: any, ignoreDiscriminator: boolean): Bill
|
|
|
215
235
|
'dueDate': (new Date(json['dueDate'])),
|
|
216
236
|
'readingDate': json['readingDate'] == null ? undefined : (new Date(json['readingDate'])),
|
|
217
237
|
'readingByUserId': json['readingByUserId'] == null ? undefined : json['readingByUserId'],
|
|
238
|
+
'readingBy': json['readingBy'] == null ? undefined : BillReadingByDtoFromJSON(json['readingBy']),
|
|
218
239
|
'previousReading': json['previousReading'],
|
|
219
240
|
'currentReading': json['currentReading'],
|
|
220
241
|
'consumption': json['consumption'],
|
|
@@ -227,7 +248,7 @@ export function BillFromJSONTyped(json: any, ignoreDiscriminator: boolean): Bill
|
|
|
227
248
|
'amountPaid': json['amountPaid'],
|
|
228
249
|
'paymentDate': json['paymentDate'] == null ? undefined : json['paymentDate'],
|
|
229
250
|
'status': BillStatusEnumFromJSON(json['status']),
|
|
230
|
-
'breakdown': json['breakdown'] == null ? undefined : json['breakdown'],
|
|
251
|
+
'breakdown': json['breakdown'] == null ? undefined : BillBreakdownDtoFromJSON(json['breakdown']),
|
|
231
252
|
'metadata': json['metadata'] == null ? undefined : json['metadata'],
|
|
232
253
|
};
|
|
233
254
|
}
|
|
@@ -253,6 +274,7 @@ export function BillToJSONTyped(value?: Bill | null, ignoreDiscriminator: boolea
|
|
|
253
274
|
'dueDate': ((value['dueDate']).toISOString()),
|
|
254
275
|
'readingDate': value['readingDate'] == null ? undefined : ((value['readingDate']).toISOString()),
|
|
255
276
|
'readingByUserId': value['readingByUserId'],
|
|
277
|
+
'readingBy': BillReadingByDtoToJSON(value['readingBy']),
|
|
256
278
|
'previousReading': value['previousReading'],
|
|
257
279
|
'currentReading': value['currentReading'],
|
|
258
280
|
'consumption': value['consumption'],
|
|
@@ -265,7 +287,7 @@ export function BillToJSONTyped(value?: Bill | null, ignoreDiscriminator: boolea
|
|
|
265
287
|
'amountPaid': value['amountPaid'],
|
|
266
288
|
'paymentDate': value['paymentDate'],
|
|
267
289
|
'status': BillStatusEnumToJSON(value['status']),
|
|
268
|
-
'breakdown': value['breakdown'],
|
|
290
|
+
'breakdown': BillBreakdownDtoToJSON(value['breakdown']),
|
|
269
291
|
'metadata': value['metadata'],
|
|
270
292
|
};
|
|
271
293
|
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Electric Cooperative Consumer Portal API
|
|
5
|
+
* Multi-tenant SaaS platform for Philippine electric cooperatives
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface BillReadingByDto
|
|
20
|
+
*/
|
|
21
|
+
export interface BillReadingByDto {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof BillReadingByDto
|
|
26
|
+
*/
|
|
27
|
+
id: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {object}
|
|
31
|
+
* @memberof BillReadingByDto
|
|
32
|
+
*/
|
|
33
|
+
name?: object | null;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Check if a given object implements the BillReadingByDto interface.
|
|
38
|
+
*/
|
|
39
|
+
export function instanceOfBillReadingByDto(value: object): value is BillReadingByDto {
|
|
40
|
+
if (!('id' in value) || value['id'] === undefined) return false;
|
|
41
|
+
return true;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export function BillReadingByDtoFromJSON(json: any): BillReadingByDto {
|
|
45
|
+
return BillReadingByDtoFromJSONTyped(json, false);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export function BillReadingByDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): BillReadingByDto {
|
|
49
|
+
if (json == null) {
|
|
50
|
+
return json;
|
|
51
|
+
}
|
|
52
|
+
return {
|
|
53
|
+
|
|
54
|
+
'id': json['id'],
|
|
55
|
+
'name': json['name'] == null ? undefined : json['name'],
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function BillReadingByDtoToJSON(json: any): BillReadingByDto {
|
|
60
|
+
return BillReadingByDtoToJSONTyped(json, false);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function BillReadingByDtoToJSONTyped(value?: BillReadingByDto | null, ignoreDiscriminator: boolean = false): any {
|
|
64
|
+
if (value == null) {
|
|
65
|
+
return value;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
return {
|
|
69
|
+
|
|
70
|
+
'id': value['id'],
|
|
71
|
+
'name': value['name'],
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
|
package/src/models/index.ts
CHANGED
|
@@ -21,6 +21,7 @@ export * from './BillBreakdownCategoryDto';
|
|
|
21
21
|
export * from './BillBreakdownChargeDto';
|
|
22
22
|
export * from './BillBreakdownDto';
|
|
23
23
|
export * from './BillBreakdownSectionDto';
|
|
24
|
+
export * from './BillReadingByDto';
|
|
24
25
|
export * from './BillStatusEnum';
|
|
25
26
|
export * from './BillsAdminPaginatedResponse';
|
|
26
27
|
export * from './BillsImportResponse';
|