electric-coop-api 0.1.59 → 0.1.60
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 +39 -0
- package/dist/esm/apis/AdminBillsApi.d.ts +25 -1
- package/dist/esm/apis/AdminBillsApi.js +40 -1
- package/dist/esm/models/BillsCollectionsStatsResponse.d.ts +45 -0
- package/dist/esm/models/BillsCollectionsStatsResponse.js +50 -0
- package/dist/esm/models/CollectionsStatsDto.d.ts +69 -0
- package/dist/esm/models/CollectionsStatsDto.js +68 -0
- package/dist/esm/models/CollectionsStatusBreakdownDto.d.ts +60 -0
- package/dist/esm/models/CollectionsStatusBreakdownDto.js +64 -0
- package/dist/esm/models/index.d.ts +3 -0
- package/dist/esm/models/index.js +3 -0
- package/dist/models/BillsCollectionsStatsResponse.d.ts +45 -0
- package/dist/models/BillsCollectionsStatsResponse.js +57 -0
- package/dist/models/CollectionsStatsDto.d.ts +69 -0
- package/dist/models/CollectionsStatsDto.js +75 -0
- package/dist/models/CollectionsStatusBreakdownDto.d.ts +60 -0
- package/dist/models/CollectionsStatusBreakdownDto.js +72 -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 +70 -0
- package/src/models/BillsCollectionsStatsResponse.ts +91 -0
- package/src/models/CollectionsStatsDto.ts +128 -0
- package/src/models/CollectionsStatusBreakdownDto.ts +106 -0
- package/src/models/index.ts +3 -0
package/.openapi-generator/FILES
CHANGED
|
@@ -75,10 +75,13 @@ src/models/BillReadingByDto.ts
|
|
|
75
75
|
src/models/BillStatusEnum.ts
|
|
76
76
|
src/models/BillsAdminPaginatedResponse.ts
|
|
77
77
|
src/models/BillsCalculationSuccessResponse.ts
|
|
78
|
+
src/models/BillsCollectionsStatsResponse.ts
|
|
78
79
|
src/models/BillsPaginatedResponse.ts
|
|
79
80
|
src/models/BillsSuccessResponse.ts
|
|
80
81
|
src/models/ChartDataPointDto.ts
|
|
81
82
|
src/models/ChartSegmentDto.ts
|
|
83
|
+
src/models/CollectionsStatsDto.ts
|
|
84
|
+
src/models/CollectionsStatusBreakdownDto.ts
|
|
82
85
|
src/models/Complaint.ts
|
|
83
86
|
src/models/ComplaintPriorityEnum.ts
|
|
84
87
|
src/models/ComplaintStatsResponse.ts
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## electric-coop-api@0.1.
|
|
1
|
+
## electric-coop-api@0.1.60
|
|
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.60 --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, BillsCalculationSuccessResponse, BillsSuccessResponse, CreateBillDto, PreviewBillDto, UpdateBillDto } from '../models/index';
|
|
13
|
+
import type { BillStatusEnum, BillsAdminPaginatedResponse, BillsCalculationSuccessResponse, BillsCollectionsStatsResponse, BillsSuccessResponse, CreateBillDto, PreviewBillDto, UpdateBillDto } from '../models/index';
|
|
14
14
|
export interface CreateAdminBillRequest {
|
|
15
15
|
createBillDto: CreateBillDto;
|
|
16
16
|
}
|
|
@@ -29,6 +29,9 @@ export interface GetAdminBillsRequest {
|
|
|
29
29
|
accountNumber?: string;
|
|
30
30
|
consumerId?: string;
|
|
31
31
|
}
|
|
32
|
+
export interface GetAdminBillsCollectionsStatsRequest {
|
|
33
|
+
billingPeriod: string;
|
|
34
|
+
}
|
|
32
35
|
export interface PreviewAdminBillRequest {
|
|
33
36
|
previewBillDto: PreviewBillDto;
|
|
34
37
|
}
|
|
@@ -125,6 +128,19 @@ export interface AdminBillsApiInterface {
|
|
|
125
128
|
* Get paginated bills (admin)
|
|
126
129
|
*/
|
|
127
130
|
getAdminBills(requestParameters: GetAdminBillsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BillsAdminPaginatedResponse>;
|
|
131
|
+
/**
|
|
132
|
+
*
|
|
133
|
+
* @summary Get collections statistics for a billing period (admin)
|
|
134
|
+
* @param {string} billingPeriod Billing period in YYYY-MM format
|
|
135
|
+
* @param {*} [options] Override http request option.
|
|
136
|
+
* @throws {RequiredError}
|
|
137
|
+
* @memberof AdminBillsApiInterface
|
|
138
|
+
*/
|
|
139
|
+
getAdminBillsCollectionsStatsRaw(requestParameters: GetAdminBillsCollectionsStatsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BillsCollectionsStatsResponse>>;
|
|
140
|
+
/**
|
|
141
|
+
* Get collections statistics for a billing period (admin)
|
|
142
|
+
*/
|
|
143
|
+
getAdminBillsCollectionsStats(requestParameters: GetAdminBillsCollectionsStatsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BillsCollectionsStatsResponse>;
|
|
128
144
|
/**
|
|
129
145
|
*
|
|
130
146
|
* @summary Preview bill calculation without saving (admin)
|
|
@@ -205,6 +221,14 @@ export declare class AdminBillsApi extends runtime.BaseAPI implements AdminBills
|
|
|
205
221
|
* Get paginated bills (admin)
|
|
206
222
|
*/
|
|
207
223
|
getAdminBills(requestParameters?: GetAdminBillsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BillsAdminPaginatedResponse>;
|
|
224
|
+
/**
|
|
225
|
+
* Get collections statistics for a billing period (admin)
|
|
226
|
+
*/
|
|
227
|
+
getAdminBillsCollectionsStatsRaw(requestParameters: GetAdminBillsCollectionsStatsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BillsCollectionsStatsResponse>>;
|
|
228
|
+
/**
|
|
229
|
+
* Get collections statistics for a billing period (admin)
|
|
230
|
+
*/
|
|
231
|
+
getAdminBillsCollectionsStats(requestParameters: GetAdminBillsCollectionsStatsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BillsCollectionsStatsResponse>;
|
|
208
232
|
/**
|
|
209
233
|
* Preview bill calculation without saving (admin)
|
|
210
234
|
*/
|
|
@@ -260,6 +260,45 @@ class AdminBillsApi extends runtime.BaseAPI {
|
|
|
260
260
|
return yield response.value();
|
|
261
261
|
});
|
|
262
262
|
}
|
|
263
|
+
/**
|
|
264
|
+
* Get collections statistics for a billing period (admin)
|
|
265
|
+
*/
|
|
266
|
+
getAdminBillsCollectionsStatsRaw(requestParameters, initOverrides) {
|
|
267
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
268
|
+
if (requestParameters['billingPeriod'] == null) {
|
|
269
|
+
throw new runtime.RequiredError('billingPeriod', 'Required parameter "billingPeriod" was null or undefined when calling getAdminBillsCollectionsStats().');
|
|
270
|
+
}
|
|
271
|
+
const queryParameters = {};
|
|
272
|
+
if (requestParameters['billingPeriod'] != null) {
|
|
273
|
+
queryParameters['billingPeriod'] = requestParameters['billingPeriod'];
|
|
274
|
+
}
|
|
275
|
+
const headerParameters = {};
|
|
276
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
277
|
+
const token = this.configuration.accessToken;
|
|
278
|
+
const tokenString = yield token("bearer", []);
|
|
279
|
+
if (tokenString) {
|
|
280
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
let urlPath = `/api/v1/admin/bills/collections-stats`;
|
|
284
|
+
const response = yield this.request({
|
|
285
|
+
path: urlPath,
|
|
286
|
+
method: 'GET',
|
|
287
|
+
headers: headerParameters,
|
|
288
|
+
query: queryParameters,
|
|
289
|
+
}, initOverrides);
|
|
290
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.BillsCollectionsStatsResponseFromJSON)(jsonValue));
|
|
291
|
+
});
|
|
292
|
+
}
|
|
293
|
+
/**
|
|
294
|
+
* Get collections statistics for a billing period (admin)
|
|
295
|
+
*/
|
|
296
|
+
getAdminBillsCollectionsStats(requestParameters, initOverrides) {
|
|
297
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
298
|
+
const response = yield this.getAdminBillsCollectionsStatsRaw(requestParameters, initOverrides);
|
|
299
|
+
return yield response.value();
|
|
300
|
+
});
|
|
301
|
+
}
|
|
263
302
|
/**
|
|
264
303
|
* Preview bill calculation without saving (admin)
|
|
265
304
|
*/
|
|
@@ -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, BillsCalculationSuccessResponse, BillsSuccessResponse, CreateBillDto, PreviewBillDto, UpdateBillDto } from '../models/index';
|
|
13
|
+
import type { BillStatusEnum, BillsAdminPaginatedResponse, BillsCalculationSuccessResponse, BillsCollectionsStatsResponse, BillsSuccessResponse, CreateBillDto, PreviewBillDto, UpdateBillDto } from '../models/index';
|
|
14
14
|
export interface CreateAdminBillRequest {
|
|
15
15
|
createBillDto: CreateBillDto;
|
|
16
16
|
}
|
|
@@ -29,6 +29,9 @@ export interface GetAdminBillsRequest {
|
|
|
29
29
|
accountNumber?: string;
|
|
30
30
|
consumerId?: string;
|
|
31
31
|
}
|
|
32
|
+
export interface GetAdminBillsCollectionsStatsRequest {
|
|
33
|
+
billingPeriod: string;
|
|
34
|
+
}
|
|
32
35
|
export interface PreviewAdminBillRequest {
|
|
33
36
|
previewBillDto: PreviewBillDto;
|
|
34
37
|
}
|
|
@@ -125,6 +128,19 @@ export interface AdminBillsApiInterface {
|
|
|
125
128
|
* Get paginated bills (admin)
|
|
126
129
|
*/
|
|
127
130
|
getAdminBills(requestParameters: GetAdminBillsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BillsAdminPaginatedResponse>;
|
|
131
|
+
/**
|
|
132
|
+
*
|
|
133
|
+
* @summary Get collections statistics for a billing period (admin)
|
|
134
|
+
* @param {string} billingPeriod Billing period in YYYY-MM format
|
|
135
|
+
* @param {*} [options] Override http request option.
|
|
136
|
+
* @throws {RequiredError}
|
|
137
|
+
* @memberof AdminBillsApiInterface
|
|
138
|
+
*/
|
|
139
|
+
getAdminBillsCollectionsStatsRaw(requestParameters: GetAdminBillsCollectionsStatsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BillsCollectionsStatsResponse>>;
|
|
140
|
+
/**
|
|
141
|
+
* Get collections statistics for a billing period (admin)
|
|
142
|
+
*/
|
|
143
|
+
getAdminBillsCollectionsStats(requestParameters: GetAdminBillsCollectionsStatsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BillsCollectionsStatsResponse>;
|
|
128
144
|
/**
|
|
129
145
|
*
|
|
130
146
|
* @summary Preview bill calculation without saving (admin)
|
|
@@ -205,6 +221,14 @@ export declare class AdminBillsApi extends runtime.BaseAPI implements AdminBills
|
|
|
205
221
|
* Get paginated bills (admin)
|
|
206
222
|
*/
|
|
207
223
|
getAdminBills(requestParameters?: GetAdminBillsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BillsAdminPaginatedResponse>;
|
|
224
|
+
/**
|
|
225
|
+
* Get collections statistics for a billing period (admin)
|
|
226
|
+
*/
|
|
227
|
+
getAdminBillsCollectionsStatsRaw(requestParameters: GetAdminBillsCollectionsStatsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BillsCollectionsStatsResponse>>;
|
|
228
|
+
/**
|
|
229
|
+
* Get collections statistics for a billing period (admin)
|
|
230
|
+
*/
|
|
231
|
+
getAdminBillsCollectionsStats(requestParameters: GetAdminBillsCollectionsStatsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BillsCollectionsStatsResponse>;
|
|
208
232
|
/**
|
|
209
233
|
* Preview bill calculation without saving (admin)
|
|
210
234
|
*/
|
|
@@ -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, BillsCalculationSuccessResponseFromJSON, BillsSuccessResponseFromJSON, CreateBillDtoToJSON, PreviewBillDtoToJSON, UpdateBillDtoToJSON, } from '../models/index';
|
|
24
|
+
import { BillsAdminPaginatedResponseFromJSON, BillsCalculationSuccessResponseFromJSON, BillsCollectionsStatsResponseFromJSON, BillsSuccessResponseFromJSON, CreateBillDtoToJSON, PreviewBillDtoToJSON, UpdateBillDtoToJSON, } from '../models/index';
|
|
25
25
|
/**
|
|
26
26
|
*
|
|
27
27
|
*/
|
|
@@ -257,6 +257,45 @@ export class AdminBillsApi extends runtime.BaseAPI {
|
|
|
257
257
|
return yield response.value();
|
|
258
258
|
});
|
|
259
259
|
}
|
|
260
|
+
/**
|
|
261
|
+
* Get collections statistics for a billing period (admin)
|
|
262
|
+
*/
|
|
263
|
+
getAdminBillsCollectionsStatsRaw(requestParameters, initOverrides) {
|
|
264
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
265
|
+
if (requestParameters['billingPeriod'] == null) {
|
|
266
|
+
throw new runtime.RequiredError('billingPeriod', 'Required parameter "billingPeriod" was null or undefined when calling getAdminBillsCollectionsStats().');
|
|
267
|
+
}
|
|
268
|
+
const queryParameters = {};
|
|
269
|
+
if (requestParameters['billingPeriod'] != null) {
|
|
270
|
+
queryParameters['billingPeriod'] = requestParameters['billingPeriod'];
|
|
271
|
+
}
|
|
272
|
+
const headerParameters = {};
|
|
273
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
274
|
+
const token = this.configuration.accessToken;
|
|
275
|
+
const tokenString = yield token("bearer", []);
|
|
276
|
+
if (tokenString) {
|
|
277
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
let urlPath = `/api/v1/admin/bills/collections-stats`;
|
|
281
|
+
const response = yield this.request({
|
|
282
|
+
path: urlPath,
|
|
283
|
+
method: 'GET',
|
|
284
|
+
headers: headerParameters,
|
|
285
|
+
query: queryParameters,
|
|
286
|
+
}, initOverrides);
|
|
287
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => BillsCollectionsStatsResponseFromJSON(jsonValue));
|
|
288
|
+
});
|
|
289
|
+
}
|
|
290
|
+
/**
|
|
291
|
+
* Get collections statistics for a billing period (admin)
|
|
292
|
+
*/
|
|
293
|
+
getAdminBillsCollectionsStats(requestParameters, initOverrides) {
|
|
294
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
295
|
+
const response = yield this.getAdminBillsCollectionsStatsRaw(requestParameters, initOverrides);
|
|
296
|
+
return yield response.value();
|
|
297
|
+
});
|
|
298
|
+
}
|
|
260
299
|
/**
|
|
261
300
|
* Preview bill calculation without saving (admin)
|
|
262
301
|
*/
|
|
@@ -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 { CollectionsStatsDto } from './CollectionsStatsDto';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface BillsCollectionsStatsResponse
|
|
17
|
+
*/
|
|
18
|
+
export interface BillsCollectionsStatsResponse {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {boolean}
|
|
22
|
+
* @memberof BillsCollectionsStatsResponse
|
|
23
|
+
*/
|
|
24
|
+
success: boolean;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {string}
|
|
28
|
+
* @memberof BillsCollectionsStatsResponse
|
|
29
|
+
*/
|
|
30
|
+
error?: string;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @type {CollectionsStatsDto}
|
|
34
|
+
* @memberof BillsCollectionsStatsResponse
|
|
35
|
+
*/
|
|
36
|
+
data: CollectionsStatsDto;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Check if a given object implements the BillsCollectionsStatsResponse interface.
|
|
40
|
+
*/
|
|
41
|
+
export declare function instanceOfBillsCollectionsStatsResponse(value: object): value is BillsCollectionsStatsResponse;
|
|
42
|
+
export declare function BillsCollectionsStatsResponseFromJSON(json: any): BillsCollectionsStatsResponse;
|
|
43
|
+
export declare function BillsCollectionsStatsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): BillsCollectionsStatsResponse;
|
|
44
|
+
export declare function BillsCollectionsStatsResponseToJSON(json: any): BillsCollectionsStatsResponse;
|
|
45
|
+
export declare function BillsCollectionsStatsResponseToJSONTyped(value?: BillsCollectionsStatsResponse | 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 { CollectionsStatsDtoFromJSON, CollectionsStatsDtoToJSON, } from './CollectionsStatsDto';
|
|
15
|
+
/**
|
|
16
|
+
* Check if a given object implements the BillsCollectionsStatsResponse interface.
|
|
17
|
+
*/
|
|
18
|
+
export function instanceOfBillsCollectionsStatsResponse(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 BillsCollectionsStatsResponseFromJSON(json) {
|
|
26
|
+
return BillsCollectionsStatsResponseFromJSONTyped(json, false);
|
|
27
|
+
}
|
|
28
|
+
export function BillsCollectionsStatsResponseFromJSONTyped(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': CollectionsStatsDtoFromJSON(json['data']),
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
export function BillsCollectionsStatsResponseToJSON(json) {
|
|
39
|
+
return BillsCollectionsStatsResponseToJSONTyped(json, false);
|
|
40
|
+
}
|
|
41
|
+
export function BillsCollectionsStatsResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
42
|
+
if (value == null) {
|
|
43
|
+
return value;
|
|
44
|
+
}
|
|
45
|
+
return {
|
|
46
|
+
'success': value['success'],
|
|
47
|
+
'error': value['error'],
|
|
48
|
+
'data': CollectionsStatsDtoToJSON(value['data']),
|
|
49
|
+
};
|
|
50
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
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 { CollectionsStatusBreakdownDto } from './CollectionsStatusBreakdownDto';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface CollectionsStatsDto
|
|
17
|
+
*/
|
|
18
|
+
export interface CollectionsStatsDto {
|
|
19
|
+
/**
|
|
20
|
+
* Billing period queried (YYYY-MM)
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof CollectionsStatsDto
|
|
23
|
+
*/
|
|
24
|
+
billingPeriod: string;
|
|
25
|
+
/**
|
|
26
|
+
* Total number of bills in the period
|
|
27
|
+
* @type {number}
|
|
28
|
+
* @memberof CollectionsStatsDto
|
|
29
|
+
*/
|
|
30
|
+
billCount: number;
|
|
31
|
+
/**
|
|
32
|
+
* Sum of all netDue amounts
|
|
33
|
+
* @type {number}
|
|
34
|
+
* @memberof CollectionsStatsDto
|
|
35
|
+
*/
|
|
36
|
+
totalBilled: number;
|
|
37
|
+
/**
|
|
38
|
+
* Sum of all amountPaid amounts
|
|
39
|
+
* @type {number}
|
|
40
|
+
* @memberof CollectionsStatsDto
|
|
41
|
+
*/
|
|
42
|
+
totalCollected: number;
|
|
43
|
+
/**
|
|
44
|
+
* Sum of unpaid/outstanding balances
|
|
45
|
+
* @type {number}
|
|
46
|
+
* @memberof CollectionsStatsDto
|
|
47
|
+
*/
|
|
48
|
+
totalOutstanding: number;
|
|
49
|
+
/**
|
|
50
|
+
* Collection rate as a percentage (0-100)
|
|
51
|
+
* @type {number}
|
|
52
|
+
* @memberof CollectionsStatsDto
|
|
53
|
+
*/
|
|
54
|
+
collectionRate: number;
|
|
55
|
+
/**
|
|
56
|
+
*
|
|
57
|
+
* @type {Array<CollectionsStatusBreakdownDto>}
|
|
58
|
+
* @memberof CollectionsStatsDto
|
|
59
|
+
*/
|
|
60
|
+
byStatus: Array<CollectionsStatusBreakdownDto>;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Check if a given object implements the CollectionsStatsDto interface.
|
|
64
|
+
*/
|
|
65
|
+
export declare function instanceOfCollectionsStatsDto(value: object): value is CollectionsStatsDto;
|
|
66
|
+
export declare function CollectionsStatsDtoFromJSON(json: any): CollectionsStatsDto;
|
|
67
|
+
export declare function CollectionsStatsDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): CollectionsStatsDto;
|
|
68
|
+
export declare function CollectionsStatsDtoToJSON(json: any): CollectionsStatsDto;
|
|
69
|
+
export declare function CollectionsStatsDtoToJSONTyped(value?: CollectionsStatsDto | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,68 @@
|
|
|
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 { CollectionsStatusBreakdownDtoFromJSON, CollectionsStatusBreakdownDtoToJSON, } from './CollectionsStatusBreakdownDto';
|
|
15
|
+
/**
|
|
16
|
+
* Check if a given object implements the CollectionsStatsDto interface.
|
|
17
|
+
*/
|
|
18
|
+
export function instanceOfCollectionsStatsDto(value) {
|
|
19
|
+
if (!('billingPeriod' in value) || value['billingPeriod'] === undefined)
|
|
20
|
+
return false;
|
|
21
|
+
if (!('billCount' in value) || value['billCount'] === undefined)
|
|
22
|
+
return false;
|
|
23
|
+
if (!('totalBilled' in value) || value['totalBilled'] === undefined)
|
|
24
|
+
return false;
|
|
25
|
+
if (!('totalCollected' in value) || value['totalCollected'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
if (!('totalOutstanding' in value) || value['totalOutstanding'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
if (!('collectionRate' in value) || value['collectionRate'] === undefined)
|
|
30
|
+
return false;
|
|
31
|
+
if (!('byStatus' in value) || value['byStatus'] === undefined)
|
|
32
|
+
return false;
|
|
33
|
+
return true;
|
|
34
|
+
}
|
|
35
|
+
export function CollectionsStatsDtoFromJSON(json) {
|
|
36
|
+
return CollectionsStatsDtoFromJSONTyped(json, false);
|
|
37
|
+
}
|
|
38
|
+
export function CollectionsStatsDtoFromJSONTyped(json, ignoreDiscriminator) {
|
|
39
|
+
if (json == null) {
|
|
40
|
+
return json;
|
|
41
|
+
}
|
|
42
|
+
return {
|
|
43
|
+
'billingPeriod': json['billingPeriod'],
|
|
44
|
+
'billCount': json['billCount'],
|
|
45
|
+
'totalBilled': json['totalBilled'],
|
|
46
|
+
'totalCollected': json['totalCollected'],
|
|
47
|
+
'totalOutstanding': json['totalOutstanding'],
|
|
48
|
+
'collectionRate': json['collectionRate'],
|
|
49
|
+
'byStatus': (json['byStatus'].map(CollectionsStatusBreakdownDtoFromJSON)),
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
export function CollectionsStatsDtoToJSON(json) {
|
|
53
|
+
return CollectionsStatsDtoToJSONTyped(json, false);
|
|
54
|
+
}
|
|
55
|
+
export function CollectionsStatsDtoToJSONTyped(value, ignoreDiscriminator = false) {
|
|
56
|
+
if (value == null) {
|
|
57
|
+
return value;
|
|
58
|
+
}
|
|
59
|
+
return {
|
|
60
|
+
'billingPeriod': value['billingPeriod'],
|
|
61
|
+
'billCount': value['billCount'],
|
|
62
|
+
'totalBilled': value['totalBilled'],
|
|
63
|
+
'totalCollected': value['totalCollected'],
|
|
64
|
+
'totalOutstanding': value['totalOutstanding'],
|
|
65
|
+
'collectionRate': value['collectionRate'],
|
|
66
|
+
'byStatus': (value['byStatus'].map(CollectionsStatusBreakdownDtoToJSON)),
|
|
67
|
+
};
|
|
68
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
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 CollectionsStatusBreakdownDto
|
|
16
|
+
*/
|
|
17
|
+
export interface CollectionsStatusBreakdownDto {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof CollectionsStatusBreakdownDto
|
|
22
|
+
*/
|
|
23
|
+
status: CollectionsStatusBreakdownDtoStatusEnum;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {number}
|
|
27
|
+
* @memberof CollectionsStatusBreakdownDto
|
|
28
|
+
*/
|
|
29
|
+
count: number;
|
|
30
|
+
/**
|
|
31
|
+
* Sum of net due amounts for this status
|
|
32
|
+
* @type {number}
|
|
33
|
+
* @memberof CollectionsStatusBreakdownDto
|
|
34
|
+
*/
|
|
35
|
+
netDue: number;
|
|
36
|
+
/**
|
|
37
|
+
* Sum of amount paid for this status
|
|
38
|
+
* @type {number}
|
|
39
|
+
* @memberof CollectionsStatusBreakdownDto
|
|
40
|
+
*/
|
|
41
|
+
amountPaid: number;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* @export
|
|
45
|
+
*/
|
|
46
|
+
export declare const CollectionsStatusBreakdownDtoStatusEnum: {
|
|
47
|
+
readonly Unpaid: "unpaid";
|
|
48
|
+
readonly Partial: "partial";
|
|
49
|
+
readonly Paid: "paid";
|
|
50
|
+
readonly Overdue: "overdue";
|
|
51
|
+
};
|
|
52
|
+
export type CollectionsStatusBreakdownDtoStatusEnum = typeof CollectionsStatusBreakdownDtoStatusEnum[keyof typeof CollectionsStatusBreakdownDtoStatusEnum];
|
|
53
|
+
/**
|
|
54
|
+
* Check if a given object implements the CollectionsStatusBreakdownDto interface.
|
|
55
|
+
*/
|
|
56
|
+
export declare function instanceOfCollectionsStatusBreakdownDto(value: object): value is CollectionsStatusBreakdownDto;
|
|
57
|
+
export declare function CollectionsStatusBreakdownDtoFromJSON(json: any): CollectionsStatusBreakdownDto;
|
|
58
|
+
export declare function CollectionsStatusBreakdownDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): CollectionsStatusBreakdownDto;
|
|
59
|
+
export declare function CollectionsStatusBreakdownDtoToJSON(json: any): CollectionsStatusBreakdownDto;
|
|
60
|
+
export declare function CollectionsStatusBreakdownDtoToJSONTyped(value?: CollectionsStatusBreakdownDto | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,64 @@
|
|
|
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
|
+
* @export
|
|
16
|
+
*/
|
|
17
|
+
export const CollectionsStatusBreakdownDtoStatusEnum = {
|
|
18
|
+
Unpaid: 'unpaid',
|
|
19
|
+
Partial: 'partial',
|
|
20
|
+
Paid: 'paid',
|
|
21
|
+
Overdue: 'overdue'
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Check if a given object implements the CollectionsStatusBreakdownDto interface.
|
|
25
|
+
*/
|
|
26
|
+
export function instanceOfCollectionsStatusBreakdownDto(value) {
|
|
27
|
+
if (!('status' in value) || value['status'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
if (!('count' in value) || value['count'] === undefined)
|
|
30
|
+
return false;
|
|
31
|
+
if (!('netDue' in value) || value['netDue'] === undefined)
|
|
32
|
+
return false;
|
|
33
|
+
if (!('amountPaid' in value) || value['amountPaid'] === undefined)
|
|
34
|
+
return false;
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
export function CollectionsStatusBreakdownDtoFromJSON(json) {
|
|
38
|
+
return CollectionsStatusBreakdownDtoFromJSONTyped(json, false);
|
|
39
|
+
}
|
|
40
|
+
export function CollectionsStatusBreakdownDtoFromJSONTyped(json, ignoreDiscriminator) {
|
|
41
|
+
if (json == null) {
|
|
42
|
+
return json;
|
|
43
|
+
}
|
|
44
|
+
return {
|
|
45
|
+
'status': json['status'],
|
|
46
|
+
'count': json['count'],
|
|
47
|
+
'netDue': json['netDue'],
|
|
48
|
+
'amountPaid': json['amountPaid'],
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
export function CollectionsStatusBreakdownDtoToJSON(json) {
|
|
52
|
+
return CollectionsStatusBreakdownDtoToJSONTyped(json, false);
|
|
53
|
+
}
|
|
54
|
+
export function CollectionsStatusBreakdownDtoToJSONTyped(value, ignoreDiscriminator = false) {
|
|
55
|
+
if (value == null) {
|
|
56
|
+
return value;
|
|
57
|
+
}
|
|
58
|
+
return {
|
|
59
|
+
'status': value['status'],
|
|
60
|
+
'count': value['count'],
|
|
61
|
+
'netDue': value['netDue'],
|
|
62
|
+
'amountPaid': value['amountPaid'],
|
|
63
|
+
};
|
|
64
|
+
}
|
|
@@ -42,10 +42,13 @@ export * from './BillReadingByDto';
|
|
|
42
42
|
export * from './BillStatusEnum';
|
|
43
43
|
export * from './BillsAdminPaginatedResponse';
|
|
44
44
|
export * from './BillsCalculationSuccessResponse';
|
|
45
|
+
export * from './BillsCollectionsStatsResponse';
|
|
45
46
|
export * from './BillsPaginatedResponse';
|
|
46
47
|
export * from './BillsSuccessResponse';
|
|
47
48
|
export * from './ChartDataPointDto';
|
|
48
49
|
export * from './ChartSegmentDto';
|
|
50
|
+
export * from './CollectionsStatsDto';
|
|
51
|
+
export * from './CollectionsStatusBreakdownDto';
|
|
49
52
|
export * from './Complaint';
|
|
50
53
|
export * from './ComplaintPriorityEnum';
|
|
51
54
|
export * from './ComplaintStatsResponse';
|
package/dist/esm/models/index.js
CHANGED
|
@@ -44,10 +44,13 @@ export * from './BillReadingByDto';
|
|
|
44
44
|
export * from './BillStatusEnum';
|
|
45
45
|
export * from './BillsAdminPaginatedResponse';
|
|
46
46
|
export * from './BillsCalculationSuccessResponse';
|
|
47
|
+
export * from './BillsCollectionsStatsResponse';
|
|
47
48
|
export * from './BillsPaginatedResponse';
|
|
48
49
|
export * from './BillsSuccessResponse';
|
|
49
50
|
export * from './ChartDataPointDto';
|
|
50
51
|
export * from './ChartSegmentDto';
|
|
52
|
+
export * from './CollectionsStatsDto';
|
|
53
|
+
export * from './CollectionsStatusBreakdownDto';
|
|
51
54
|
export * from './Complaint';
|
|
52
55
|
export * from './ComplaintPriorityEnum';
|
|
53
56
|
export * from './ComplaintStatsResponse';
|
|
@@ -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 { CollectionsStatsDto } from './CollectionsStatsDto';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface BillsCollectionsStatsResponse
|
|
17
|
+
*/
|
|
18
|
+
export interface BillsCollectionsStatsResponse {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {boolean}
|
|
22
|
+
* @memberof BillsCollectionsStatsResponse
|
|
23
|
+
*/
|
|
24
|
+
success: boolean;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {string}
|
|
28
|
+
* @memberof BillsCollectionsStatsResponse
|
|
29
|
+
*/
|
|
30
|
+
error?: string;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @type {CollectionsStatsDto}
|
|
34
|
+
* @memberof BillsCollectionsStatsResponse
|
|
35
|
+
*/
|
|
36
|
+
data: CollectionsStatsDto;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Check if a given object implements the BillsCollectionsStatsResponse interface.
|
|
40
|
+
*/
|
|
41
|
+
export declare function instanceOfBillsCollectionsStatsResponse(value: object): value is BillsCollectionsStatsResponse;
|
|
42
|
+
export declare function BillsCollectionsStatsResponseFromJSON(json: any): BillsCollectionsStatsResponse;
|
|
43
|
+
export declare function BillsCollectionsStatsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): BillsCollectionsStatsResponse;
|
|
44
|
+
export declare function BillsCollectionsStatsResponseToJSON(json: any): BillsCollectionsStatsResponse;
|
|
45
|
+
export declare function BillsCollectionsStatsResponseToJSONTyped(value?: BillsCollectionsStatsResponse | null, ignoreDiscriminator?: boolean): any;
|