electric-coop-api 0.1.19 → 0.1.22
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 +24 -4
- package/dist/esm/models/Bill.js +12 -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 +24 -4
- package/dist/models/Bill.js +12 -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 +56 -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.22
|
|
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.22 --save
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
_unPublished (not recommended):_
|
|
@@ -9,7 +9,11 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
+
import type { BillBreakdownDto } from './BillBreakdownDto';
|
|
13
|
+
import type { Tenant } from './Tenant';
|
|
14
|
+
import type { Consumer } from './Consumer';
|
|
12
15
|
import type { BillStatusEnum } from './BillStatusEnum';
|
|
16
|
+
import type { BillReadingByDto } from './BillReadingByDto';
|
|
13
17
|
/**
|
|
14
18
|
*
|
|
15
19
|
* @export
|
|
@@ -46,12 +50,24 @@ export interface Bill {
|
|
|
46
50
|
* @memberof Bill
|
|
47
51
|
*/
|
|
48
52
|
tenantId: string;
|
|
53
|
+
/**
|
|
54
|
+
*
|
|
55
|
+
* @type {Tenant}
|
|
56
|
+
* @memberof Bill
|
|
57
|
+
*/
|
|
58
|
+
tenant?: Tenant;
|
|
49
59
|
/**
|
|
50
60
|
*
|
|
51
61
|
* @type {string}
|
|
52
62
|
* @memberof Bill
|
|
53
63
|
*/
|
|
54
64
|
consumerId: string;
|
|
65
|
+
/**
|
|
66
|
+
*
|
|
67
|
+
* @type {Consumer}
|
|
68
|
+
* @memberof Bill
|
|
69
|
+
*/
|
|
70
|
+
consumer?: Consumer;
|
|
55
71
|
/**
|
|
56
72
|
*
|
|
57
73
|
* @type {string}
|
|
@@ -76,6 +92,12 @@ export interface Bill {
|
|
|
76
92
|
* @memberof Bill
|
|
77
93
|
*/
|
|
78
94
|
readingByUserId?: object;
|
|
95
|
+
/**
|
|
96
|
+
* User who captured the meter reading (computed field, not stored on bills table)
|
|
97
|
+
* @type {BillReadingByDto}
|
|
98
|
+
* @memberof Bill
|
|
99
|
+
*/
|
|
100
|
+
readingBy?: BillReadingByDto | null;
|
|
79
101
|
/**
|
|
80
102
|
*
|
|
81
103
|
* @type {number}
|
|
@@ -150,12 +172,10 @@ export interface Bill {
|
|
|
150
172
|
status: BillStatusEnum;
|
|
151
173
|
/**
|
|
152
174
|
*
|
|
153
|
-
* @type {
|
|
175
|
+
* @type {BillBreakdownDto}
|
|
154
176
|
* @memberof Bill
|
|
155
177
|
*/
|
|
156
|
-
breakdown?:
|
|
157
|
-
[key: string]: any;
|
|
158
|
-
};
|
|
178
|
+
breakdown?: BillBreakdownDto;
|
|
159
179
|
/**
|
|
160
180
|
*
|
|
161
181
|
* @type {{ [key: string]: any; }}
|
package/dist/esm/models/Bill.js
CHANGED
|
@@ -11,7 +11,11 @@
|
|
|
11
11
|
* https://openapi-generator.tech
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
|
+
import { BillBreakdownDtoFromJSON, BillBreakdownDtoToJSON, } from './BillBreakdownDto';
|
|
15
|
+
import { TenantFromJSON, TenantToJSON, } from './Tenant';
|
|
16
|
+
import { ConsumerFromJSON, ConsumerToJSON, } from './Consumer';
|
|
14
17
|
import { BillStatusEnumFromJSON, BillStatusEnumToJSON, } from './BillStatusEnum';
|
|
18
|
+
import { BillReadingByDtoFromJSON, BillReadingByDtoToJSON, } from './BillReadingByDto';
|
|
15
19
|
/**
|
|
16
20
|
* Check if a given object implements the Bill interface.
|
|
17
21
|
*/
|
|
@@ -57,11 +61,14 @@ export function BillFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
57
61
|
'updatedAt': (new Date(json['updatedAt'])),
|
|
58
62
|
'deletedAt': json['deletedAt'] == null ? undefined : (new Date(json['deletedAt'])),
|
|
59
63
|
'tenantId': json['tenantId'],
|
|
64
|
+
'tenant': json['tenant'] == null ? undefined : TenantFromJSON(json['tenant']),
|
|
60
65
|
'consumerId': json['consumerId'],
|
|
66
|
+
'consumer': json['consumer'] == null ? undefined : ConsumerFromJSON(json['consumer']),
|
|
61
67
|
'billingPeriod': json['billingPeriod'],
|
|
62
68
|
'dueDate': (new Date(json['dueDate'])),
|
|
63
69
|
'readingDate': json['readingDate'] == null ? undefined : (new Date(json['readingDate'])),
|
|
64
70
|
'readingByUserId': json['readingByUserId'] == null ? undefined : json['readingByUserId'],
|
|
71
|
+
'readingBy': json['readingBy'] == null ? undefined : BillReadingByDtoFromJSON(json['readingBy']),
|
|
65
72
|
'previousReading': json['previousReading'],
|
|
66
73
|
'currentReading': json['currentReading'],
|
|
67
74
|
'consumption': json['consumption'],
|
|
@@ -74,7 +81,7 @@ export function BillFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
74
81
|
'amountPaid': json['amountPaid'],
|
|
75
82
|
'paymentDate': json['paymentDate'] == null ? undefined : json['paymentDate'],
|
|
76
83
|
'status': BillStatusEnumFromJSON(json['status']),
|
|
77
|
-
'breakdown': json['breakdown'] == null ? undefined : json['breakdown'],
|
|
84
|
+
'breakdown': json['breakdown'] == null ? undefined : BillBreakdownDtoFromJSON(json['breakdown']),
|
|
78
85
|
'metadata': json['metadata'] == null ? undefined : json['metadata'],
|
|
79
86
|
};
|
|
80
87
|
}
|
|
@@ -91,11 +98,14 @@ export function BillToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
91
98
|
'updatedAt': ((value['updatedAt']).toISOString()),
|
|
92
99
|
'deletedAt': value['deletedAt'] == null ? undefined : ((value['deletedAt']).toISOString()),
|
|
93
100
|
'tenantId': value['tenantId'],
|
|
101
|
+
'tenant': TenantToJSON(value['tenant']),
|
|
94
102
|
'consumerId': value['consumerId'],
|
|
103
|
+
'consumer': ConsumerToJSON(value['consumer']),
|
|
95
104
|
'billingPeriod': value['billingPeriod'],
|
|
96
105
|
'dueDate': ((value['dueDate']).toISOString()),
|
|
97
106
|
'readingDate': value['readingDate'] == null ? undefined : ((value['readingDate']).toISOString()),
|
|
98
107
|
'readingByUserId': value['readingByUserId'],
|
|
108
|
+
'readingBy': BillReadingByDtoToJSON(value['readingBy']),
|
|
99
109
|
'previousReading': value['previousReading'],
|
|
100
110
|
'currentReading': value['currentReading'],
|
|
101
111
|
'consumption': value['consumption'],
|
|
@@ -108,7 +118,7 @@ export function BillToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
108
118
|
'amountPaid': value['amountPaid'],
|
|
109
119
|
'paymentDate': value['paymentDate'],
|
|
110
120
|
'status': BillStatusEnumToJSON(value['status']),
|
|
111
|
-
'breakdown': value['breakdown'],
|
|
121
|
+
'breakdown': BillBreakdownDtoToJSON(value['breakdown']),
|
|
112
122
|
'metadata': value['metadata'],
|
|
113
123
|
};
|
|
114
124
|
}
|
|
@@ -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 {string}
|
|
27
|
+
* @memberof BillReadingByDto
|
|
28
|
+
*/
|
|
29
|
+
name?: string;
|
|
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,11 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
+
import type { BillBreakdownDto } from './BillBreakdownDto';
|
|
13
|
+
import type { Tenant } from './Tenant';
|
|
14
|
+
import type { Consumer } from './Consumer';
|
|
12
15
|
import type { BillStatusEnum } from './BillStatusEnum';
|
|
16
|
+
import type { BillReadingByDto } from './BillReadingByDto';
|
|
13
17
|
/**
|
|
14
18
|
*
|
|
15
19
|
* @export
|
|
@@ -46,12 +50,24 @@ export interface Bill {
|
|
|
46
50
|
* @memberof Bill
|
|
47
51
|
*/
|
|
48
52
|
tenantId: string;
|
|
53
|
+
/**
|
|
54
|
+
*
|
|
55
|
+
* @type {Tenant}
|
|
56
|
+
* @memberof Bill
|
|
57
|
+
*/
|
|
58
|
+
tenant?: Tenant;
|
|
49
59
|
/**
|
|
50
60
|
*
|
|
51
61
|
* @type {string}
|
|
52
62
|
* @memberof Bill
|
|
53
63
|
*/
|
|
54
64
|
consumerId: string;
|
|
65
|
+
/**
|
|
66
|
+
*
|
|
67
|
+
* @type {Consumer}
|
|
68
|
+
* @memberof Bill
|
|
69
|
+
*/
|
|
70
|
+
consumer?: Consumer;
|
|
55
71
|
/**
|
|
56
72
|
*
|
|
57
73
|
* @type {string}
|
|
@@ -76,6 +92,12 @@ export interface Bill {
|
|
|
76
92
|
* @memberof Bill
|
|
77
93
|
*/
|
|
78
94
|
readingByUserId?: object;
|
|
95
|
+
/**
|
|
96
|
+
* User who captured the meter reading (computed field, not stored on bills table)
|
|
97
|
+
* @type {BillReadingByDto}
|
|
98
|
+
* @memberof Bill
|
|
99
|
+
*/
|
|
100
|
+
readingBy?: BillReadingByDto | null;
|
|
79
101
|
/**
|
|
80
102
|
*
|
|
81
103
|
* @type {number}
|
|
@@ -150,12 +172,10 @@ export interface Bill {
|
|
|
150
172
|
status: BillStatusEnum;
|
|
151
173
|
/**
|
|
152
174
|
*
|
|
153
|
-
* @type {
|
|
175
|
+
* @type {BillBreakdownDto}
|
|
154
176
|
* @memberof Bill
|
|
155
177
|
*/
|
|
156
|
-
breakdown?:
|
|
157
|
-
[key: string]: any;
|
|
158
|
-
};
|
|
178
|
+
breakdown?: BillBreakdownDto;
|
|
159
179
|
/**
|
|
160
180
|
*
|
|
161
181
|
* @type {{ [key: string]: any; }}
|
package/dist/models/Bill.js
CHANGED
|
@@ -18,7 +18,11 @@ exports.BillFromJSON = BillFromJSON;
|
|
|
18
18
|
exports.BillFromJSONTyped = BillFromJSONTyped;
|
|
19
19
|
exports.BillToJSON = BillToJSON;
|
|
20
20
|
exports.BillToJSONTyped = BillToJSONTyped;
|
|
21
|
+
const BillBreakdownDto_1 = require("./BillBreakdownDto");
|
|
22
|
+
const Tenant_1 = require("./Tenant");
|
|
23
|
+
const Consumer_1 = require("./Consumer");
|
|
21
24
|
const BillStatusEnum_1 = require("./BillStatusEnum");
|
|
25
|
+
const BillReadingByDto_1 = require("./BillReadingByDto");
|
|
22
26
|
/**
|
|
23
27
|
* Check if a given object implements the Bill interface.
|
|
24
28
|
*/
|
|
@@ -64,11 +68,14 @@ function BillFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
64
68
|
'updatedAt': (new Date(json['updatedAt'])),
|
|
65
69
|
'deletedAt': json['deletedAt'] == null ? undefined : (new Date(json['deletedAt'])),
|
|
66
70
|
'tenantId': json['tenantId'],
|
|
71
|
+
'tenant': json['tenant'] == null ? undefined : (0, Tenant_1.TenantFromJSON)(json['tenant']),
|
|
67
72
|
'consumerId': json['consumerId'],
|
|
73
|
+
'consumer': json['consumer'] == null ? undefined : (0, Consumer_1.ConsumerFromJSON)(json['consumer']),
|
|
68
74
|
'billingPeriod': json['billingPeriod'],
|
|
69
75
|
'dueDate': (new Date(json['dueDate'])),
|
|
70
76
|
'readingDate': json['readingDate'] == null ? undefined : (new Date(json['readingDate'])),
|
|
71
77
|
'readingByUserId': json['readingByUserId'] == null ? undefined : json['readingByUserId'],
|
|
78
|
+
'readingBy': json['readingBy'] == null ? undefined : (0, BillReadingByDto_1.BillReadingByDtoFromJSON)(json['readingBy']),
|
|
72
79
|
'previousReading': json['previousReading'],
|
|
73
80
|
'currentReading': json['currentReading'],
|
|
74
81
|
'consumption': json['consumption'],
|
|
@@ -81,7 +88,7 @@ function BillFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
81
88
|
'amountPaid': json['amountPaid'],
|
|
82
89
|
'paymentDate': json['paymentDate'] == null ? undefined : json['paymentDate'],
|
|
83
90
|
'status': (0, BillStatusEnum_1.BillStatusEnumFromJSON)(json['status']),
|
|
84
|
-
'breakdown': json['breakdown'] == null ? undefined : json['breakdown'],
|
|
91
|
+
'breakdown': json['breakdown'] == null ? undefined : (0, BillBreakdownDto_1.BillBreakdownDtoFromJSON)(json['breakdown']),
|
|
85
92
|
'metadata': json['metadata'] == null ? undefined : json['metadata'],
|
|
86
93
|
};
|
|
87
94
|
}
|
|
@@ -98,11 +105,14 @@ function BillToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
98
105
|
'updatedAt': ((value['updatedAt']).toISOString()),
|
|
99
106
|
'deletedAt': value['deletedAt'] == null ? undefined : ((value['deletedAt']).toISOString()),
|
|
100
107
|
'tenantId': value['tenantId'],
|
|
108
|
+
'tenant': (0, Tenant_1.TenantToJSON)(value['tenant']),
|
|
101
109
|
'consumerId': value['consumerId'],
|
|
110
|
+
'consumer': (0, Consumer_1.ConsumerToJSON)(value['consumer']),
|
|
102
111
|
'billingPeriod': value['billingPeriod'],
|
|
103
112
|
'dueDate': ((value['dueDate']).toISOString()),
|
|
104
113
|
'readingDate': value['readingDate'] == null ? undefined : ((value['readingDate']).toISOString()),
|
|
105
114
|
'readingByUserId': value['readingByUserId'],
|
|
115
|
+
'readingBy': (0, BillReadingByDto_1.BillReadingByDtoToJSON)(value['readingBy']),
|
|
106
116
|
'previousReading': value['previousReading'],
|
|
107
117
|
'currentReading': value['currentReading'],
|
|
108
118
|
'consumption': value['consumption'],
|
|
@@ -115,7 +125,7 @@ function BillToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
115
125
|
'amountPaid': value['amountPaid'],
|
|
116
126
|
'paymentDate': value['paymentDate'],
|
|
117
127
|
'status': (0, BillStatusEnum_1.BillStatusEnumToJSON)(value['status']),
|
|
118
|
-
'breakdown': value['breakdown'],
|
|
128
|
+
'breakdown': (0, BillBreakdownDto_1.BillBreakdownDtoToJSON)(value['breakdown']),
|
|
119
129
|
'metadata': value['metadata'],
|
|
120
130
|
};
|
|
121
131
|
}
|
|
@@ -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 {string}
|
|
27
|
+
* @memberof BillReadingByDto
|
|
28
|
+
*/
|
|
29
|
+
name?: string;
|
|
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,27 @@
|
|
|
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';
|
|
23
|
+
import type { Tenant } from './Tenant';
|
|
24
|
+
import {
|
|
25
|
+
TenantFromJSON,
|
|
26
|
+
TenantFromJSONTyped,
|
|
27
|
+
TenantToJSON,
|
|
28
|
+
TenantToJSONTyped,
|
|
29
|
+
} from './Tenant';
|
|
30
|
+
import type { Consumer } from './Consumer';
|
|
31
|
+
import {
|
|
32
|
+
ConsumerFromJSON,
|
|
33
|
+
ConsumerFromJSONTyped,
|
|
34
|
+
ConsumerToJSON,
|
|
35
|
+
ConsumerToJSONTyped,
|
|
36
|
+
} from './Consumer';
|
|
16
37
|
import type { BillStatusEnum } from './BillStatusEnum';
|
|
17
38
|
import {
|
|
18
39
|
BillStatusEnumFromJSON,
|
|
@@ -20,6 +41,13 @@ import {
|
|
|
20
41
|
BillStatusEnumToJSON,
|
|
21
42
|
BillStatusEnumToJSONTyped,
|
|
22
43
|
} from './BillStatusEnum';
|
|
44
|
+
import type { BillReadingByDto } from './BillReadingByDto';
|
|
45
|
+
import {
|
|
46
|
+
BillReadingByDtoFromJSON,
|
|
47
|
+
BillReadingByDtoFromJSONTyped,
|
|
48
|
+
BillReadingByDtoToJSON,
|
|
49
|
+
BillReadingByDtoToJSONTyped,
|
|
50
|
+
} from './BillReadingByDto';
|
|
23
51
|
|
|
24
52
|
/**
|
|
25
53
|
*
|
|
@@ -57,12 +85,24 @@ export interface Bill {
|
|
|
57
85
|
* @memberof Bill
|
|
58
86
|
*/
|
|
59
87
|
tenantId: string;
|
|
88
|
+
/**
|
|
89
|
+
*
|
|
90
|
+
* @type {Tenant}
|
|
91
|
+
* @memberof Bill
|
|
92
|
+
*/
|
|
93
|
+
tenant?: Tenant;
|
|
60
94
|
/**
|
|
61
95
|
*
|
|
62
96
|
* @type {string}
|
|
63
97
|
* @memberof Bill
|
|
64
98
|
*/
|
|
65
99
|
consumerId: string;
|
|
100
|
+
/**
|
|
101
|
+
*
|
|
102
|
+
* @type {Consumer}
|
|
103
|
+
* @memberof Bill
|
|
104
|
+
*/
|
|
105
|
+
consumer?: Consumer;
|
|
66
106
|
/**
|
|
67
107
|
*
|
|
68
108
|
* @type {string}
|
|
@@ -87,6 +127,12 @@ export interface Bill {
|
|
|
87
127
|
* @memberof Bill
|
|
88
128
|
*/
|
|
89
129
|
readingByUserId?: object;
|
|
130
|
+
/**
|
|
131
|
+
* User who captured the meter reading (computed field, not stored on bills table)
|
|
132
|
+
* @type {BillReadingByDto}
|
|
133
|
+
* @memberof Bill
|
|
134
|
+
*/
|
|
135
|
+
readingBy?: BillReadingByDto | null;
|
|
90
136
|
/**
|
|
91
137
|
*
|
|
92
138
|
* @type {number}
|
|
@@ -161,10 +207,10 @@ export interface Bill {
|
|
|
161
207
|
status: BillStatusEnum;
|
|
162
208
|
/**
|
|
163
209
|
*
|
|
164
|
-
* @type {
|
|
210
|
+
* @type {BillBreakdownDto}
|
|
165
211
|
* @memberof Bill
|
|
166
212
|
*/
|
|
167
|
-
breakdown?:
|
|
213
|
+
breakdown?: BillBreakdownDto;
|
|
168
214
|
/**
|
|
169
215
|
*
|
|
170
216
|
* @type {{ [key: string]: any; }}
|
|
@@ -210,11 +256,14 @@ export function BillFromJSONTyped(json: any, ignoreDiscriminator: boolean): Bill
|
|
|
210
256
|
'updatedAt': (new Date(json['updatedAt'])),
|
|
211
257
|
'deletedAt': json['deletedAt'] == null ? undefined : (new Date(json['deletedAt'])),
|
|
212
258
|
'tenantId': json['tenantId'],
|
|
259
|
+
'tenant': json['tenant'] == null ? undefined : TenantFromJSON(json['tenant']),
|
|
213
260
|
'consumerId': json['consumerId'],
|
|
261
|
+
'consumer': json['consumer'] == null ? undefined : ConsumerFromJSON(json['consumer']),
|
|
214
262
|
'billingPeriod': json['billingPeriod'],
|
|
215
263
|
'dueDate': (new Date(json['dueDate'])),
|
|
216
264
|
'readingDate': json['readingDate'] == null ? undefined : (new Date(json['readingDate'])),
|
|
217
265
|
'readingByUserId': json['readingByUserId'] == null ? undefined : json['readingByUserId'],
|
|
266
|
+
'readingBy': json['readingBy'] == null ? undefined : BillReadingByDtoFromJSON(json['readingBy']),
|
|
218
267
|
'previousReading': json['previousReading'],
|
|
219
268
|
'currentReading': json['currentReading'],
|
|
220
269
|
'consumption': json['consumption'],
|
|
@@ -227,7 +276,7 @@ export function BillFromJSONTyped(json: any, ignoreDiscriminator: boolean): Bill
|
|
|
227
276
|
'amountPaid': json['amountPaid'],
|
|
228
277
|
'paymentDate': json['paymentDate'] == null ? undefined : json['paymentDate'],
|
|
229
278
|
'status': BillStatusEnumFromJSON(json['status']),
|
|
230
|
-
'breakdown': json['breakdown'] == null ? undefined : json['breakdown'],
|
|
279
|
+
'breakdown': json['breakdown'] == null ? undefined : BillBreakdownDtoFromJSON(json['breakdown']),
|
|
231
280
|
'metadata': json['metadata'] == null ? undefined : json['metadata'],
|
|
232
281
|
};
|
|
233
282
|
}
|
|
@@ -248,11 +297,14 @@ export function BillToJSONTyped(value?: Bill | null, ignoreDiscriminator: boolea
|
|
|
248
297
|
'updatedAt': ((value['updatedAt']).toISOString()),
|
|
249
298
|
'deletedAt': value['deletedAt'] == null ? undefined : ((value['deletedAt']).toISOString()),
|
|
250
299
|
'tenantId': value['tenantId'],
|
|
300
|
+
'tenant': TenantToJSON(value['tenant']),
|
|
251
301
|
'consumerId': value['consumerId'],
|
|
302
|
+
'consumer': ConsumerToJSON(value['consumer']),
|
|
252
303
|
'billingPeriod': value['billingPeriod'],
|
|
253
304
|
'dueDate': ((value['dueDate']).toISOString()),
|
|
254
305
|
'readingDate': value['readingDate'] == null ? undefined : ((value['readingDate']).toISOString()),
|
|
255
306
|
'readingByUserId': value['readingByUserId'],
|
|
307
|
+
'readingBy': BillReadingByDtoToJSON(value['readingBy']),
|
|
256
308
|
'previousReading': value['previousReading'],
|
|
257
309
|
'currentReading': value['currentReading'],
|
|
258
310
|
'consumption': value['consumption'],
|
|
@@ -265,7 +317,7 @@ export function BillToJSONTyped(value?: Bill | null, ignoreDiscriminator: boolea
|
|
|
265
317
|
'amountPaid': value['amountPaid'],
|
|
266
318
|
'paymentDate': value['paymentDate'],
|
|
267
319
|
'status': BillStatusEnumToJSON(value['status']),
|
|
268
|
-
'breakdown': value['breakdown'],
|
|
320
|
+
'breakdown': BillBreakdownDtoToJSON(value['breakdown']),
|
|
269
321
|
'metadata': value['metadata'],
|
|
270
322
|
};
|
|
271
323
|
}
|
|
@@ -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 {string}
|
|
31
|
+
* @memberof BillReadingByDto
|
|
32
|
+
*/
|
|
33
|
+
name?: string;
|
|
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';
|