electric-coop-api 0.1.32 → 0.1.34
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 +3 -0
- package/README.md +2 -2
- package/dist/apis/AdminBillsApi.d.ts +25 -1
- package/dist/apis/AdminBillsApi.js +38 -0
- package/dist/esm/apis/AdminBillsApi.d.ts +25 -1
- package/dist/esm/apis/AdminBillsApi.js +39 -1
- package/dist/esm/models/BillCalculationResultDto.d.ts +57 -0
- package/dist/esm/models/BillCalculationResultDto.js +60 -0
- package/dist/esm/models/BillsCalculationSuccessResponse.d.ts +45 -0
- package/dist/esm/models/BillsCalculationSuccessResponse.js +50 -0
- package/dist/esm/models/PreviewBillDto.d.ts +38 -0
- package/dist/esm/models/PreviewBillDto.js +47 -0
- package/dist/esm/models/index.d.ts +3 -0
- package/dist/esm/models/index.js +3 -0
- package/dist/models/BillCalculationResultDto.d.ts +57 -0
- package/dist/models/BillCalculationResultDto.js +67 -0
- package/dist/models/BillsCalculationSuccessResponse.d.ts +45 -0
- package/dist/models/BillsCalculationSuccessResponse.js +57 -0
- package/dist/models/PreviewBillDto.d.ts +38 -0
- package/dist/models/PreviewBillDto.js +54 -0
- package/dist/models/index.d.ts +3 -0
- package/dist/models/index.js +3 -0
- package/package.json +1 -1
- package/src/apis/AdminBillsApi.ts +72 -0
- package/src/models/BillCalculationResultDto.ts +110 -0
- package/src/models/BillsCalculationSuccessResponse.ts +91 -0
- package/src/models/PreviewBillDto.ts +75 -0
- package/src/models/index.ts +3 -0
package/.openapi-generator/FILES
CHANGED
|
@@ -44,9 +44,11 @@ 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/BillCalculationResultDto.ts
|
|
47
48
|
src/models/BillReadingByDto.ts
|
|
48
49
|
src/models/BillStatusEnum.ts
|
|
49
50
|
src/models/BillsAdminPaginatedResponse.ts
|
|
51
|
+
src/models/BillsCalculationSuccessResponse.ts
|
|
50
52
|
src/models/BillsImportResponse.ts
|
|
51
53
|
src/models/BillsImportResultDto.ts
|
|
52
54
|
src/models/BillsPaginatedResponse.ts
|
|
@@ -98,6 +100,7 @@ src/models/NotificationUnreadCountResponseDto.ts
|
|
|
98
100
|
src/models/PaginatedNotifications.ts
|
|
99
101
|
src/models/PaginatedResponseDto.ts
|
|
100
102
|
src/models/PaginationMetaDto.ts
|
|
103
|
+
src/models/PreviewBillDto.ts
|
|
101
104
|
src/models/Rate.ts
|
|
102
105
|
src/models/RateAdjustment.ts
|
|
103
106
|
src/models/RateAdjustmentChargeDto.ts
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## electric-coop-api@0.1.
|
|
1
|
+
## electric-coop-api@0.1.34
|
|
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.34 --save
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
_unPublished (not recommended):_
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { BillStatusEnum, BillsAdminPaginatedResponse, BillsImportResponse, BillsSuccessResponse, CreateBillDto, UpdateBillDto } from '../models/index';
|
|
13
|
+
import type { BillStatusEnum, BillsAdminPaginatedResponse, BillsCalculationSuccessResponse, BillsImportResponse, BillsSuccessResponse, CreateBillDto, PreviewBillDto, UpdateBillDto } from '../models/index';
|
|
14
14
|
export interface CreateAdminBillRequest {
|
|
15
15
|
createBillDto: CreateBillDto;
|
|
16
16
|
}
|
|
@@ -32,6 +32,9 @@ export interface GetAdminBillsRequest {
|
|
|
32
32
|
export interface ImportAdminBillsRequest {
|
|
33
33
|
file: Blob;
|
|
34
34
|
}
|
|
35
|
+
export interface PreviewAdminBillRequest {
|
|
36
|
+
previewBillDto: PreviewBillDto;
|
|
37
|
+
}
|
|
35
38
|
export interface UpdateAdminBillRequest {
|
|
36
39
|
id: string;
|
|
37
40
|
updateBillDto: UpdateBillDto;
|
|
@@ -114,6 +117,19 @@ export interface AdminBillsApiInterface {
|
|
|
114
117
|
* Import bills from CSV (admin)
|
|
115
118
|
*/
|
|
116
119
|
importAdminBills(requestParameters: ImportAdminBillsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BillsImportResponse>;
|
|
120
|
+
/**
|
|
121
|
+
*
|
|
122
|
+
* @summary Preview bill calculation without saving (admin)
|
|
123
|
+
* @param {PreviewBillDto} previewBillDto
|
|
124
|
+
* @param {*} [options] Override http request option.
|
|
125
|
+
* @throws {RequiredError}
|
|
126
|
+
* @memberof AdminBillsApiInterface
|
|
127
|
+
*/
|
|
128
|
+
previewAdminBillRaw(requestParameters: PreviewAdminBillRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BillsCalculationSuccessResponse>>;
|
|
129
|
+
/**
|
|
130
|
+
* Preview bill calculation without saving (admin)
|
|
131
|
+
*/
|
|
132
|
+
previewAdminBill(requestParameters: PreviewAdminBillRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BillsCalculationSuccessResponse>;
|
|
117
133
|
/**
|
|
118
134
|
*
|
|
119
135
|
* @summary Update bill (admin)
|
|
@@ -173,6 +189,14 @@ export declare class AdminBillsApi extends runtime.BaseAPI implements AdminBills
|
|
|
173
189
|
* Import bills from CSV (admin)
|
|
174
190
|
*/
|
|
175
191
|
importAdminBills(requestParameters: ImportAdminBillsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BillsImportResponse>;
|
|
192
|
+
/**
|
|
193
|
+
* Preview bill calculation without saving (admin)
|
|
194
|
+
*/
|
|
195
|
+
previewAdminBillRaw(requestParameters: PreviewAdminBillRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BillsCalculationSuccessResponse>>;
|
|
196
|
+
/**
|
|
197
|
+
* Preview bill calculation without saving (admin)
|
|
198
|
+
*/
|
|
199
|
+
previewAdminBill(requestParameters: PreviewAdminBillRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BillsCalculationSuccessResponse>;
|
|
176
200
|
/**
|
|
177
201
|
* Update bill (admin)
|
|
178
202
|
*/
|
|
@@ -249,6 +249,44 @@ class AdminBillsApi extends runtime.BaseAPI {
|
|
|
249
249
|
return yield response.value();
|
|
250
250
|
});
|
|
251
251
|
}
|
|
252
|
+
/**
|
|
253
|
+
* Preview bill calculation without saving (admin)
|
|
254
|
+
*/
|
|
255
|
+
previewAdminBillRaw(requestParameters, initOverrides) {
|
|
256
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
257
|
+
if (requestParameters['previewBillDto'] == null) {
|
|
258
|
+
throw new runtime.RequiredError('previewBillDto', 'Required parameter "previewBillDto" was null or undefined when calling previewAdminBill().');
|
|
259
|
+
}
|
|
260
|
+
const queryParameters = {};
|
|
261
|
+
const headerParameters = {};
|
|
262
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
263
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
264
|
+
const token = this.configuration.accessToken;
|
|
265
|
+
const tokenString = yield token("bearer", []);
|
|
266
|
+
if (tokenString) {
|
|
267
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
let urlPath = `/api/v1/admin/bills/preview`;
|
|
271
|
+
const response = yield this.request({
|
|
272
|
+
path: urlPath,
|
|
273
|
+
method: 'POST',
|
|
274
|
+
headers: headerParameters,
|
|
275
|
+
query: queryParameters,
|
|
276
|
+
body: (0, index_1.PreviewBillDtoToJSON)(requestParameters['previewBillDto']),
|
|
277
|
+
}, initOverrides);
|
|
278
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.BillsCalculationSuccessResponseFromJSON)(jsonValue));
|
|
279
|
+
});
|
|
280
|
+
}
|
|
281
|
+
/**
|
|
282
|
+
* Preview bill calculation without saving (admin)
|
|
283
|
+
*/
|
|
284
|
+
previewAdminBill(requestParameters, initOverrides) {
|
|
285
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
286
|
+
const response = yield this.previewAdminBillRaw(requestParameters, initOverrides);
|
|
287
|
+
return yield response.value();
|
|
288
|
+
});
|
|
289
|
+
}
|
|
252
290
|
/**
|
|
253
291
|
* Update bill (admin)
|
|
254
292
|
*/
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { BillStatusEnum, BillsAdminPaginatedResponse, BillsImportResponse, BillsSuccessResponse, CreateBillDto, UpdateBillDto } from '../models/index';
|
|
13
|
+
import type { BillStatusEnum, BillsAdminPaginatedResponse, BillsCalculationSuccessResponse, BillsImportResponse, BillsSuccessResponse, CreateBillDto, PreviewBillDto, UpdateBillDto } from '../models/index';
|
|
14
14
|
export interface CreateAdminBillRequest {
|
|
15
15
|
createBillDto: CreateBillDto;
|
|
16
16
|
}
|
|
@@ -32,6 +32,9 @@ export interface GetAdminBillsRequest {
|
|
|
32
32
|
export interface ImportAdminBillsRequest {
|
|
33
33
|
file: Blob;
|
|
34
34
|
}
|
|
35
|
+
export interface PreviewAdminBillRequest {
|
|
36
|
+
previewBillDto: PreviewBillDto;
|
|
37
|
+
}
|
|
35
38
|
export interface UpdateAdminBillRequest {
|
|
36
39
|
id: string;
|
|
37
40
|
updateBillDto: UpdateBillDto;
|
|
@@ -114,6 +117,19 @@ export interface AdminBillsApiInterface {
|
|
|
114
117
|
* Import bills from CSV (admin)
|
|
115
118
|
*/
|
|
116
119
|
importAdminBills(requestParameters: ImportAdminBillsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BillsImportResponse>;
|
|
120
|
+
/**
|
|
121
|
+
*
|
|
122
|
+
* @summary Preview bill calculation without saving (admin)
|
|
123
|
+
* @param {PreviewBillDto} previewBillDto
|
|
124
|
+
* @param {*} [options] Override http request option.
|
|
125
|
+
* @throws {RequiredError}
|
|
126
|
+
* @memberof AdminBillsApiInterface
|
|
127
|
+
*/
|
|
128
|
+
previewAdminBillRaw(requestParameters: PreviewAdminBillRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BillsCalculationSuccessResponse>>;
|
|
129
|
+
/**
|
|
130
|
+
* Preview bill calculation without saving (admin)
|
|
131
|
+
*/
|
|
132
|
+
previewAdminBill(requestParameters: PreviewAdminBillRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BillsCalculationSuccessResponse>;
|
|
117
133
|
/**
|
|
118
134
|
*
|
|
119
135
|
* @summary Update bill (admin)
|
|
@@ -173,6 +189,14 @@ export declare class AdminBillsApi extends runtime.BaseAPI implements AdminBills
|
|
|
173
189
|
* Import bills from CSV (admin)
|
|
174
190
|
*/
|
|
175
191
|
importAdminBills(requestParameters: ImportAdminBillsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BillsImportResponse>;
|
|
192
|
+
/**
|
|
193
|
+
* Preview bill calculation without saving (admin)
|
|
194
|
+
*/
|
|
195
|
+
previewAdminBillRaw(requestParameters: PreviewAdminBillRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BillsCalculationSuccessResponse>>;
|
|
196
|
+
/**
|
|
197
|
+
* Preview bill calculation without saving (admin)
|
|
198
|
+
*/
|
|
199
|
+
previewAdminBill(requestParameters: PreviewAdminBillRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BillsCalculationSuccessResponse>;
|
|
176
200
|
/**
|
|
177
201
|
* Update bill (admin)
|
|
178
202
|
*/
|
|
@@ -21,7 +21,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
21
21
|
});
|
|
22
22
|
};
|
|
23
23
|
import * as runtime from '../runtime';
|
|
24
|
-
import { BillsAdminPaginatedResponseFromJSON, BillsImportResponseFromJSON, BillsSuccessResponseFromJSON, CreateBillDtoToJSON, UpdateBillDtoToJSON, } from '../models/index';
|
|
24
|
+
import { BillsAdminPaginatedResponseFromJSON, BillsCalculationSuccessResponseFromJSON, BillsImportResponseFromJSON, BillsSuccessResponseFromJSON, CreateBillDtoToJSON, PreviewBillDtoToJSON, UpdateBillDtoToJSON, } from '../models/index';
|
|
25
25
|
/**
|
|
26
26
|
*
|
|
27
27
|
*/
|
|
@@ -246,6 +246,44 @@ export class AdminBillsApi extends runtime.BaseAPI {
|
|
|
246
246
|
return yield response.value();
|
|
247
247
|
});
|
|
248
248
|
}
|
|
249
|
+
/**
|
|
250
|
+
* Preview bill calculation without saving (admin)
|
|
251
|
+
*/
|
|
252
|
+
previewAdminBillRaw(requestParameters, initOverrides) {
|
|
253
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
254
|
+
if (requestParameters['previewBillDto'] == null) {
|
|
255
|
+
throw new runtime.RequiredError('previewBillDto', 'Required parameter "previewBillDto" was null or undefined when calling previewAdminBill().');
|
|
256
|
+
}
|
|
257
|
+
const queryParameters = {};
|
|
258
|
+
const headerParameters = {};
|
|
259
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
260
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
261
|
+
const token = this.configuration.accessToken;
|
|
262
|
+
const tokenString = yield token("bearer", []);
|
|
263
|
+
if (tokenString) {
|
|
264
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
let urlPath = `/api/v1/admin/bills/preview`;
|
|
268
|
+
const response = yield this.request({
|
|
269
|
+
path: urlPath,
|
|
270
|
+
method: 'POST',
|
|
271
|
+
headers: headerParameters,
|
|
272
|
+
query: queryParameters,
|
|
273
|
+
body: PreviewBillDtoToJSON(requestParameters['previewBillDto']),
|
|
274
|
+
}, initOverrides);
|
|
275
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => BillsCalculationSuccessResponseFromJSON(jsonValue));
|
|
276
|
+
});
|
|
277
|
+
}
|
|
278
|
+
/**
|
|
279
|
+
* Preview bill calculation without saving (admin)
|
|
280
|
+
*/
|
|
281
|
+
previewAdminBill(requestParameters, initOverrides) {
|
|
282
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
283
|
+
const response = yield this.previewAdminBillRaw(requestParameters, initOverrides);
|
|
284
|
+
return yield response.value();
|
|
285
|
+
});
|
|
286
|
+
}
|
|
249
287
|
/**
|
|
250
288
|
* Update bill (admin)
|
|
251
289
|
*/
|
|
@@ -0,0 +1,57 @@
|
|
|
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
|
+
import type { BillBreakdownDto } from './BillBreakdownDto';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface BillCalculationResultDto
|
|
17
|
+
*/
|
|
18
|
+
export interface BillCalculationResultDto {
|
|
19
|
+
/**
|
|
20
|
+
* Previous meter reading (kWh)
|
|
21
|
+
* @type {number}
|
|
22
|
+
* @memberof BillCalculationResultDto
|
|
23
|
+
*/
|
|
24
|
+
previousReading: number;
|
|
25
|
+
/**
|
|
26
|
+
* Computed consumption in kWh (currentReading - previousReading)
|
|
27
|
+
* @type {number}
|
|
28
|
+
* @memberof BillCalculationResultDto
|
|
29
|
+
*/
|
|
30
|
+
consumption: number;
|
|
31
|
+
/**
|
|
32
|
+
* Total gross amount due before discounts
|
|
33
|
+
* @type {number}
|
|
34
|
+
* @memberof BillCalculationResultDto
|
|
35
|
+
*/
|
|
36
|
+
grossDue: number;
|
|
37
|
+
/**
|
|
38
|
+
* Net amount due after discounts and VAT
|
|
39
|
+
* @type {number}
|
|
40
|
+
* @memberof BillCalculationResultDto
|
|
41
|
+
*/
|
|
42
|
+
netDue: number;
|
|
43
|
+
/**
|
|
44
|
+
* Full itemised charge breakdown
|
|
45
|
+
* @type {BillBreakdownDto}
|
|
46
|
+
* @memberof BillCalculationResultDto
|
|
47
|
+
*/
|
|
48
|
+
breakdown: BillBreakdownDto;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Check if a given object implements the BillCalculationResultDto interface.
|
|
52
|
+
*/
|
|
53
|
+
export declare function instanceOfBillCalculationResultDto(value: object): value is BillCalculationResultDto;
|
|
54
|
+
export declare function BillCalculationResultDtoFromJSON(json: any): BillCalculationResultDto;
|
|
55
|
+
export declare function BillCalculationResultDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): BillCalculationResultDto;
|
|
56
|
+
export declare function BillCalculationResultDtoToJSON(json: any): BillCalculationResultDto;
|
|
57
|
+
export declare function BillCalculationResultDtoToJSONTyped(value?: BillCalculationResultDto | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,60 @@
|
|
|
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
|
+
import { BillBreakdownDtoFromJSON, BillBreakdownDtoToJSON, } from './BillBreakdownDto';
|
|
15
|
+
/**
|
|
16
|
+
* Check if a given object implements the BillCalculationResultDto interface.
|
|
17
|
+
*/
|
|
18
|
+
export function instanceOfBillCalculationResultDto(value) {
|
|
19
|
+
if (!('previousReading' in value) || value['previousReading'] === undefined)
|
|
20
|
+
return false;
|
|
21
|
+
if (!('consumption' in value) || value['consumption'] === undefined)
|
|
22
|
+
return false;
|
|
23
|
+
if (!('grossDue' in value) || value['grossDue'] === undefined)
|
|
24
|
+
return false;
|
|
25
|
+
if (!('netDue' in value) || value['netDue'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
if (!('breakdown' in value) || value['breakdown'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
return true;
|
|
30
|
+
}
|
|
31
|
+
export function BillCalculationResultDtoFromJSON(json) {
|
|
32
|
+
return BillCalculationResultDtoFromJSONTyped(json, false);
|
|
33
|
+
}
|
|
34
|
+
export function BillCalculationResultDtoFromJSONTyped(json, ignoreDiscriminator) {
|
|
35
|
+
if (json == null) {
|
|
36
|
+
return json;
|
|
37
|
+
}
|
|
38
|
+
return {
|
|
39
|
+
'previousReading': json['previousReading'],
|
|
40
|
+
'consumption': json['consumption'],
|
|
41
|
+
'grossDue': json['grossDue'],
|
|
42
|
+
'netDue': json['netDue'],
|
|
43
|
+
'breakdown': BillBreakdownDtoFromJSON(json['breakdown']),
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
export function BillCalculationResultDtoToJSON(json) {
|
|
47
|
+
return BillCalculationResultDtoToJSONTyped(json, false);
|
|
48
|
+
}
|
|
49
|
+
export function BillCalculationResultDtoToJSONTyped(value, ignoreDiscriminator = false) {
|
|
50
|
+
if (value == null) {
|
|
51
|
+
return value;
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
'previousReading': value['previousReading'],
|
|
55
|
+
'consumption': value['consumption'],
|
|
56
|
+
'grossDue': value['grossDue'],
|
|
57
|
+
'netDue': value['netDue'],
|
|
58
|
+
'breakdown': BillBreakdownDtoToJSON(value['breakdown']),
|
|
59
|
+
};
|
|
60
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
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
|
+
import type { BillCalculationResultDto } from './BillCalculationResultDto';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface BillsCalculationSuccessResponse
|
|
17
|
+
*/
|
|
18
|
+
export interface BillsCalculationSuccessResponse {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {boolean}
|
|
22
|
+
* @memberof BillsCalculationSuccessResponse
|
|
23
|
+
*/
|
|
24
|
+
success: boolean;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {string}
|
|
28
|
+
* @memberof BillsCalculationSuccessResponse
|
|
29
|
+
*/
|
|
30
|
+
error?: string;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @type {BillCalculationResultDto}
|
|
34
|
+
* @memberof BillsCalculationSuccessResponse
|
|
35
|
+
*/
|
|
36
|
+
data: BillCalculationResultDto;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Check if a given object implements the BillsCalculationSuccessResponse interface.
|
|
40
|
+
*/
|
|
41
|
+
export declare function instanceOfBillsCalculationSuccessResponse(value: object): value is BillsCalculationSuccessResponse;
|
|
42
|
+
export declare function BillsCalculationSuccessResponseFromJSON(json: any): BillsCalculationSuccessResponse;
|
|
43
|
+
export declare function BillsCalculationSuccessResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): BillsCalculationSuccessResponse;
|
|
44
|
+
export declare function BillsCalculationSuccessResponseToJSON(json: any): BillsCalculationSuccessResponse;
|
|
45
|
+
export declare function BillsCalculationSuccessResponseToJSONTyped(value?: BillsCalculationSuccessResponse | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,50 @@
|
|
|
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
|
+
import { BillCalculationResultDtoFromJSON, BillCalculationResultDtoToJSON, } from './BillCalculationResultDto';
|
|
15
|
+
/**
|
|
16
|
+
* Check if a given object implements the BillsCalculationSuccessResponse interface.
|
|
17
|
+
*/
|
|
18
|
+
export function instanceOfBillsCalculationSuccessResponse(value) {
|
|
19
|
+
if (!('success' in value) || value['success'] === undefined)
|
|
20
|
+
return false;
|
|
21
|
+
if (!('data' in value) || value['data'] === undefined)
|
|
22
|
+
return false;
|
|
23
|
+
return true;
|
|
24
|
+
}
|
|
25
|
+
export function BillsCalculationSuccessResponseFromJSON(json) {
|
|
26
|
+
return BillsCalculationSuccessResponseFromJSONTyped(json, false);
|
|
27
|
+
}
|
|
28
|
+
export function BillsCalculationSuccessResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
29
|
+
if (json == null) {
|
|
30
|
+
return json;
|
|
31
|
+
}
|
|
32
|
+
return {
|
|
33
|
+
'success': json['success'],
|
|
34
|
+
'error': json['error'] == null ? undefined : json['error'],
|
|
35
|
+
'data': BillCalculationResultDtoFromJSON(json['data']),
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
export function BillsCalculationSuccessResponseToJSON(json) {
|
|
39
|
+
return BillsCalculationSuccessResponseToJSONTyped(json, false);
|
|
40
|
+
}
|
|
41
|
+
export function BillsCalculationSuccessResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
42
|
+
if (value == null) {
|
|
43
|
+
return value;
|
|
44
|
+
}
|
|
45
|
+
return {
|
|
46
|
+
'success': value['success'],
|
|
47
|
+
'error': value['error'],
|
|
48
|
+
'data': BillCalculationResultDtoToJSON(value['data']),
|
|
49
|
+
};
|
|
50
|
+
}
|
|
@@ -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 PreviewBillDto
|
|
16
|
+
*/
|
|
17
|
+
export interface PreviewBillDto {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof PreviewBillDto
|
|
22
|
+
*/
|
|
23
|
+
consumerId: string;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {number}
|
|
27
|
+
* @memberof PreviewBillDto
|
|
28
|
+
*/
|
|
29
|
+
currentReading: number;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Check if a given object implements the PreviewBillDto interface.
|
|
33
|
+
*/
|
|
34
|
+
export declare function instanceOfPreviewBillDto(value: object): value is PreviewBillDto;
|
|
35
|
+
export declare function PreviewBillDtoFromJSON(json: any): PreviewBillDto;
|
|
36
|
+
export declare function PreviewBillDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): PreviewBillDto;
|
|
37
|
+
export declare function PreviewBillDtoToJSON(json: any): PreviewBillDto;
|
|
38
|
+
export declare function PreviewBillDtoToJSONTyped(value?: PreviewBillDto | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,47 @@
|
|
|
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 PreviewBillDto interface.
|
|
16
|
+
*/
|
|
17
|
+
export function instanceOfPreviewBillDto(value) {
|
|
18
|
+
if (!('consumerId' in value) || value['consumerId'] === undefined)
|
|
19
|
+
return false;
|
|
20
|
+
if (!('currentReading' in value) || value['currentReading'] === undefined)
|
|
21
|
+
return false;
|
|
22
|
+
return true;
|
|
23
|
+
}
|
|
24
|
+
export function PreviewBillDtoFromJSON(json) {
|
|
25
|
+
return PreviewBillDtoFromJSONTyped(json, false);
|
|
26
|
+
}
|
|
27
|
+
export function PreviewBillDtoFromJSONTyped(json, ignoreDiscriminator) {
|
|
28
|
+
if (json == null) {
|
|
29
|
+
return json;
|
|
30
|
+
}
|
|
31
|
+
return {
|
|
32
|
+
'consumerId': json['consumerId'],
|
|
33
|
+
'currentReading': json['currentReading'],
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
export function PreviewBillDtoToJSON(json) {
|
|
37
|
+
return PreviewBillDtoToJSONTyped(json, false);
|
|
38
|
+
}
|
|
39
|
+
export function PreviewBillDtoToJSONTyped(value, ignoreDiscriminator = false) {
|
|
40
|
+
if (value == null) {
|
|
41
|
+
return value;
|
|
42
|
+
}
|
|
43
|
+
return {
|
|
44
|
+
'consumerId': value['consumerId'],
|
|
45
|
+
'currentReading': value['currentReading'],
|
|
46
|
+
};
|
|
47
|
+
}
|
|
@@ -19,9 +19,11 @@ export * from './BillBreakdownCategoryDto';
|
|
|
19
19
|
export * from './BillBreakdownChargeDto';
|
|
20
20
|
export * from './BillBreakdownDto';
|
|
21
21
|
export * from './BillBreakdownSectionDto';
|
|
22
|
+
export * from './BillCalculationResultDto';
|
|
22
23
|
export * from './BillReadingByDto';
|
|
23
24
|
export * from './BillStatusEnum';
|
|
24
25
|
export * from './BillsAdminPaginatedResponse';
|
|
26
|
+
export * from './BillsCalculationSuccessResponse';
|
|
25
27
|
export * from './BillsImportResponse';
|
|
26
28
|
export * from './BillsImportResultDto';
|
|
27
29
|
export * from './BillsPaginatedResponse';
|
|
@@ -73,6 +75,7 @@ export * from './NotificationUnreadCountResponseDto';
|
|
|
73
75
|
export * from './PaginatedNotifications';
|
|
74
76
|
export * from './PaginatedResponseDto';
|
|
75
77
|
export * from './PaginationMetaDto';
|
|
78
|
+
export * from './PreviewBillDto';
|
|
76
79
|
export * from './Rate';
|
|
77
80
|
export * from './RateAdjustment';
|
|
78
81
|
export * from './RateAdjustmentChargeDto';
|
package/dist/esm/models/index.js
CHANGED
|
@@ -21,9 +21,11 @@ export * from './BillBreakdownCategoryDto';
|
|
|
21
21
|
export * from './BillBreakdownChargeDto';
|
|
22
22
|
export * from './BillBreakdownDto';
|
|
23
23
|
export * from './BillBreakdownSectionDto';
|
|
24
|
+
export * from './BillCalculationResultDto';
|
|
24
25
|
export * from './BillReadingByDto';
|
|
25
26
|
export * from './BillStatusEnum';
|
|
26
27
|
export * from './BillsAdminPaginatedResponse';
|
|
28
|
+
export * from './BillsCalculationSuccessResponse';
|
|
27
29
|
export * from './BillsImportResponse';
|
|
28
30
|
export * from './BillsImportResultDto';
|
|
29
31
|
export * from './BillsPaginatedResponse';
|
|
@@ -75,6 +77,7 @@ export * from './NotificationUnreadCountResponseDto';
|
|
|
75
77
|
export * from './PaginatedNotifications';
|
|
76
78
|
export * from './PaginatedResponseDto';
|
|
77
79
|
export * from './PaginationMetaDto';
|
|
80
|
+
export * from './PreviewBillDto';
|
|
78
81
|
export * from './Rate';
|
|
79
82
|
export * from './RateAdjustment';
|
|
80
83
|
export * from './RateAdjustmentChargeDto';
|
|
@@ -0,0 +1,57 @@
|
|
|
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
|
+
import type { BillBreakdownDto } from './BillBreakdownDto';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface BillCalculationResultDto
|
|
17
|
+
*/
|
|
18
|
+
export interface BillCalculationResultDto {
|
|
19
|
+
/**
|
|
20
|
+
* Previous meter reading (kWh)
|
|
21
|
+
* @type {number}
|
|
22
|
+
* @memberof BillCalculationResultDto
|
|
23
|
+
*/
|
|
24
|
+
previousReading: number;
|
|
25
|
+
/**
|
|
26
|
+
* Computed consumption in kWh (currentReading - previousReading)
|
|
27
|
+
* @type {number}
|
|
28
|
+
* @memberof BillCalculationResultDto
|
|
29
|
+
*/
|
|
30
|
+
consumption: number;
|
|
31
|
+
/**
|
|
32
|
+
* Total gross amount due before discounts
|
|
33
|
+
* @type {number}
|
|
34
|
+
* @memberof BillCalculationResultDto
|
|
35
|
+
*/
|
|
36
|
+
grossDue: number;
|
|
37
|
+
/**
|
|
38
|
+
* Net amount due after discounts and VAT
|
|
39
|
+
* @type {number}
|
|
40
|
+
* @memberof BillCalculationResultDto
|
|
41
|
+
*/
|
|
42
|
+
netDue: number;
|
|
43
|
+
/**
|
|
44
|
+
* Full itemised charge breakdown
|
|
45
|
+
* @type {BillBreakdownDto}
|
|
46
|
+
* @memberof BillCalculationResultDto
|
|
47
|
+
*/
|
|
48
|
+
breakdown: BillBreakdownDto;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Check if a given object implements the BillCalculationResultDto interface.
|
|
52
|
+
*/
|
|
53
|
+
export declare function instanceOfBillCalculationResultDto(value: object): value is BillCalculationResultDto;
|
|
54
|
+
export declare function BillCalculationResultDtoFromJSON(json: any): BillCalculationResultDto;
|
|
55
|
+
export declare function BillCalculationResultDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): BillCalculationResultDto;
|
|
56
|
+
export declare function BillCalculationResultDtoToJSON(json: any): BillCalculationResultDto;
|
|
57
|
+
export declare function BillCalculationResultDtoToJSONTyped(value?: BillCalculationResultDto | null, ignoreDiscriminator?: boolean): any;
|