electric-coop-api 0.1.59 → 0.1.61
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 +6 -1
- package/README.md +2 -2
- package/dist/apis/AdminBillsApi.d.ts +45 -1
- package/dist/apis/AdminBillsApi.js +72 -0
- package/dist/apis/ManagementDashboardApi.d.ts +10 -10
- package/dist/apis/ManagementDashboardApi.js +6 -6
- package/dist/esm/apis/AdminBillsApi.d.ts +45 -1
- package/dist/esm/apis/AdminBillsApi.js +73 -1
- package/dist/esm/apis/ManagementDashboardApi.d.ts +10 -10
- package/dist/esm/apis/ManagementDashboardApi.js +7 -7
- package/dist/esm/models/BillingDashboardStatsDto.d.ts +56 -0
- package/dist/esm/models/BillingDashboardStatsDto.js +59 -0
- package/dist/esm/models/BillingDashboardStatsResponse.d.ts +45 -0
- package/dist/esm/models/BillingDashboardStatsResponse.js +50 -0
- 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/ManagementOperationsReportSuccessResponse.d.ts +45 -0
- package/dist/esm/models/{ManagementMonthlyReportResponse.js → ManagementOperationsReportSuccessResponse.js} +8 -8
- package/dist/esm/models/index.d.ts +6 -1
- package/dist/esm/models/index.js +6 -1
- package/dist/models/BillingDashboardStatsDto.d.ts +56 -0
- package/dist/models/BillingDashboardStatsDto.js +66 -0
- package/dist/models/BillingDashboardStatsResponse.d.ts +45 -0
- package/dist/models/BillingDashboardStatsResponse.js +57 -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/ManagementOperationsReportSuccessResponse.d.ts +45 -0
- package/dist/models/{ManagementMonthlyReportResponse.js → ManagementOperationsReportSuccessResponse.js} +13 -13
- package/dist/models/index.d.ts +6 -1
- package/dist/models/index.js +6 -1
- package/package.json +1 -1
- package/src/apis/AdminBillsApi.ts +124 -0
- package/src/apis/ManagementDashboardApi.ts +14 -14
- package/src/models/BillingDashboardStatsDto.ts +102 -0
- package/src/models/BillingDashboardStatsResponse.ts +91 -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/{ManagementMonthlyReportResponse.ts → ManagementOperationsReportSuccessResponse.ts} +13 -13
- package/src/models/index.ts +6 -1
- package/dist/esm/models/ManagementMonthlyReportResponse.d.ts +0 -45
- package/dist/models/ManagementMonthlyReportResponse.d.ts +0 -45
package/.openapi-generator/FILES
CHANGED
|
@@ -73,12 +73,17 @@ src/models/BillBreakdownSectionDto.ts
|
|
|
73
73
|
src/models/BillCalculationResultDto.ts
|
|
74
74
|
src/models/BillReadingByDto.ts
|
|
75
75
|
src/models/BillStatusEnum.ts
|
|
76
|
+
src/models/BillingDashboardStatsDto.ts
|
|
77
|
+
src/models/BillingDashboardStatsResponse.ts
|
|
76
78
|
src/models/BillsAdminPaginatedResponse.ts
|
|
77
79
|
src/models/BillsCalculationSuccessResponse.ts
|
|
80
|
+
src/models/BillsCollectionsStatsResponse.ts
|
|
78
81
|
src/models/BillsPaginatedResponse.ts
|
|
79
82
|
src/models/BillsSuccessResponse.ts
|
|
80
83
|
src/models/ChartDataPointDto.ts
|
|
81
84
|
src/models/ChartSegmentDto.ts
|
|
85
|
+
src/models/CollectionsStatsDto.ts
|
|
86
|
+
src/models/CollectionsStatusBreakdownDto.ts
|
|
82
87
|
src/models/Complaint.ts
|
|
83
88
|
src/models/ComplaintPriorityEnum.ts
|
|
84
89
|
src/models/ComplaintStatsResponse.ts
|
|
@@ -123,7 +128,7 @@ src/models/LogoutDto.ts
|
|
|
123
128
|
src/models/ManagementDashboardStatsResponseDto.ts
|
|
124
129
|
src/models/ManagementDashboardStatsSuccessResponse.ts
|
|
125
130
|
src/models/ManagementMonthlyReportDto.ts
|
|
126
|
-
src/models/
|
|
131
|
+
src/models/ManagementOperationsReportSuccessResponse.ts
|
|
127
132
|
src/models/ManagementRecentActivitiesResponseDto.ts
|
|
128
133
|
src/models/ManagementRecentActivitiesSuccessResponse.ts
|
|
129
134
|
src/models/ManagementRecentActivityDto.ts
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## electric-coop-api@0.1.
|
|
1
|
+
## electric-coop-api@0.1.61
|
|
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.61 --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, BillingDashboardStatsResponse, 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
|
}
|
|
@@ -106,6 +109,18 @@ export interface AdminBillsApiInterface {
|
|
|
106
109
|
* Get bill by id (admin)
|
|
107
110
|
*/
|
|
108
111
|
getAdminBillById(requestParameters: GetAdminBillByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BillsSuccessResponse>;
|
|
112
|
+
/**
|
|
113
|
+
*
|
|
114
|
+
* @summary Get billing department dashboard stats (admin)
|
|
115
|
+
* @param {*} [options] Override http request option.
|
|
116
|
+
* @throws {RequiredError}
|
|
117
|
+
* @memberof AdminBillsApiInterface
|
|
118
|
+
*/
|
|
119
|
+
getAdminBillingDashboardStatsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BillingDashboardStatsResponse>>;
|
|
120
|
+
/**
|
|
121
|
+
* Get billing department dashboard stats (admin)
|
|
122
|
+
*/
|
|
123
|
+
getAdminBillingDashboardStats(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BillingDashboardStatsResponse>;
|
|
109
124
|
/**
|
|
110
125
|
*
|
|
111
126
|
* @summary Get paginated bills (admin)
|
|
@@ -125,6 +140,19 @@ export interface AdminBillsApiInterface {
|
|
|
125
140
|
* Get paginated bills (admin)
|
|
126
141
|
*/
|
|
127
142
|
getAdminBills(requestParameters: GetAdminBillsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BillsAdminPaginatedResponse>;
|
|
143
|
+
/**
|
|
144
|
+
*
|
|
145
|
+
* @summary Get collections statistics for a billing period (admin)
|
|
146
|
+
* @param {string} billingPeriod Billing period in YYYY-MM format
|
|
147
|
+
* @param {*} [options] Override http request option.
|
|
148
|
+
* @throws {RequiredError}
|
|
149
|
+
* @memberof AdminBillsApiInterface
|
|
150
|
+
*/
|
|
151
|
+
getAdminBillsCollectionsStatsRaw(requestParameters: GetAdminBillsCollectionsStatsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BillsCollectionsStatsResponse>>;
|
|
152
|
+
/**
|
|
153
|
+
* Get collections statistics for a billing period (admin)
|
|
154
|
+
*/
|
|
155
|
+
getAdminBillsCollectionsStats(requestParameters: GetAdminBillsCollectionsStatsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BillsCollectionsStatsResponse>;
|
|
128
156
|
/**
|
|
129
157
|
*
|
|
130
158
|
* @summary Preview bill calculation without saving (admin)
|
|
@@ -197,6 +225,14 @@ export declare class AdminBillsApi extends runtime.BaseAPI implements AdminBills
|
|
|
197
225
|
* Get bill by id (admin)
|
|
198
226
|
*/
|
|
199
227
|
getAdminBillById(requestParameters: GetAdminBillByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BillsSuccessResponse>;
|
|
228
|
+
/**
|
|
229
|
+
* Get billing department dashboard stats (admin)
|
|
230
|
+
*/
|
|
231
|
+
getAdminBillingDashboardStatsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BillingDashboardStatsResponse>>;
|
|
232
|
+
/**
|
|
233
|
+
* Get billing department dashboard stats (admin)
|
|
234
|
+
*/
|
|
235
|
+
getAdminBillingDashboardStats(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BillingDashboardStatsResponse>;
|
|
200
236
|
/**
|
|
201
237
|
* Get paginated bills (admin)
|
|
202
238
|
*/
|
|
@@ -205,6 +241,14 @@ export declare class AdminBillsApi extends runtime.BaseAPI implements AdminBills
|
|
|
205
241
|
* Get paginated bills (admin)
|
|
206
242
|
*/
|
|
207
243
|
getAdminBills(requestParameters?: GetAdminBillsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BillsAdminPaginatedResponse>;
|
|
244
|
+
/**
|
|
245
|
+
* Get collections statistics for a billing period (admin)
|
|
246
|
+
*/
|
|
247
|
+
getAdminBillsCollectionsStatsRaw(requestParameters: GetAdminBillsCollectionsStatsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BillsCollectionsStatsResponse>>;
|
|
248
|
+
/**
|
|
249
|
+
* Get collections statistics for a billing period (admin)
|
|
250
|
+
*/
|
|
251
|
+
getAdminBillsCollectionsStats(requestParameters: GetAdminBillsCollectionsStatsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BillsCollectionsStatsResponse>;
|
|
208
252
|
/**
|
|
209
253
|
* Preview bill calculation without saving (admin)
|
|
210
254
|
*/
|
|
@@ -206,6 +206,39 @@ class AdminBillsApi extends runtime.BaseAPI {
|
|
|
206
206
|
return yield response.value();
|
|
207
207
|
});
|
|
208
208
|
}
|
|
209
|
+
/**
|
|
210
|
+
* Get billing department dashboard stats (admin)
|
|
211
|
+
*/
|
|
212
|
+
getAdminBillingDashboardStatsRaw(initOverrides) {
|
|
213
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
214
|
+
const queryParameters = {};
|
|
215
|
+
const headerParameters = {};
|
|
216
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
217
|
+
const token = this.configuration.accessToken;
|
|
218
|
+
const tokenString = yield token("bearer", []);
|
|
219
|
+
if (tokenString) {
|
|
220
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
let urlPath = `/api/v1/admin/bills/dashboard-stats`;
|
|
224
|
+
const response = yield this.request({
|
|
225
|
+
path: urlPath,
|
|
226
|
+
method: 'GET',
|
|
227
|
+
headers: headerParameters,
|
|
228
|
+
query: queryParameters,
|
|
229
|
+
}, initOverrides);
|
|
230
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.BillingDashboardStatsResponseFromJSON)(jsonValue));
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* Get billing department dashboard stats (admin)
|
|
235
|
+
*/
|
|
236
|
+
getAdminBillingDashboardStats(initOverrides) {
|
|
237
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
238
|
+
const response = yield this.getAdminBillingDashboardStatsRaw(initOverrides);
|
|
239
|
+
return yield response.value();
|
|
240
|
+
});
|
|
241
|
+
}
|
|
209
242
|
/**
|
|
210
243
|
* Get paginated bills (admin)
|
|
211
244
|
*/
|
|
@@ -260,6 +293,45 @@ class AdminBillsApi extends runtime.BaseAPI {
|
|
|
260
293
|
return yield response.value();
|
|
261
294
|
});
|
|
262
295
|
}
|
|
296
|
+
/**
|
|
297
|
+
* Get collections statistics for a billing period (admin)
|
|
298
|
+
*/
|
|
299
|
+
getAdminBillsCollectionsStatsRaw(requestParameters, initOverrides) {
|
|
300
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
301
|
+
if (requestParameters['billingPeriod'] == null) {
|
|
302
|
+
throw new runtime.RequiredError('billingPeriod', 'Required parameter "billingPeriod" was null or undefined when calling getAdminBillsCollectionsStats().');
|
|
303
|
+
}
|
|
304
|
+
const queryParameters = {};
|
|
305
|
+
if (requestParameters['billingPeriod'] != null) {
|
|
306
|
+
queryParameters['billingPeriod'] = requestParameters['billingPeriod'];
|
|
307
|
+
}
|
|
308
|
+
const headerParameters = {};
|
|
309
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
310
|
+
const token = this.configuration.accessToken;
|
|
311
|
+
const tokenString = yield token("bearer", []);
|
|
312
|
+
if (tokenString) {
|
|
313
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
let urlPath = `/api/v1/admin/bills/collections-stats`;
|
|
317
|
+
const response = yield this.request({
|
|
318
|
+
path: urlPath,
|
|
319
|
+
method: 'GET',
|
|
320
|
+
headers: headerParameters,
|
|
321
|
+
query: queryParameters,
|
|
322
|
+
}, initOverrides);
|
|
323
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.BillsCollectionsStatsResponseFromJSON)(jsonValue));
|
|
324
|
+
});
|
|
325
|
+
}
|
|
326
|
+
/**
|
|
327
|
+
* Get collections statistics for a billing period (admin)
|
|
328
|
+
*/
|
|
329
|
+
getAdminBillsCollectionsStats(requestParameters, initOverrides) {
|
|
330
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
331
|
+
const response = yield this.getAdminBillsCollectionsStatsRaw(requestParameters, initOverrides);
|
|
332
|
+
return yield response.value();
|
|
333
|
+
});
|
|
334
|
+
}
|
|
263
335
|
/**
|
|
264
336
|
* Preview bill calculation without saving (admin)
|
|
265
337
|
*/
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { ManagementDashboardStatsSuccessResponse,
|
|
14
|
-
export interface
|
|
13
|
+
import type { ManagementDashboardStatsSuccessResponse, ManagementOperationsReportSuccessResponse, ManagementRecentActivitiesSuccessResponse } from '../models/index';
|
|
14
|
+
export interface GetManagementOperationsReportRequest {
|
|
15
15
|
year?: number;
|
|
16
16
|
month?: number;
|
|
17
17
|
}
|
|
@@ -24,18 +24,18 @@ export interface GetManagementMonthlyReportRequest {
|
|
|
24
24
|
export interface ManagementDashboardApiInterface {
|
|
25
25
|
/**
|
|
26
26
|
*
|
|
27
|
-
* @summary Generate
|
|
27
|
+
* @summary Generate operations report with graph data
|
|
28
28
|
* @param {number} [year] Year (defaults to current year)
|
|
29
29
|
* @param {number} [month] Month 1-12 (defaults to current month)
|
|
30
30
|
* @param {*} [options] Override http request option.
|
|
31
31
|
* @throws {RequiredError}
|
|
32
32
|
* @memberof ManagementDashboardApiInterface
|
|
33
33
|
*/
|
|
34
|
-
|
|
34
|
+
getManagementOperationsReportRaw(requestParameters: GetManagementOperationsReportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ManagementOperationsReportSuccessResponse>>;
|
|
35
35
|
/**
|
|
36
|
-
* Generate
|
|
36
|
+
* Generate operations report with graph data
|
|
37
37
|
*/
|
|
38
|
-
|
|
38
|
+
getManagementOperationsReport(requestParameters: GetManagementOperationsReportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ManagementOperationsReportSuccessResponse>;
|
|
39
39
|
/**
|
|
40
40
|
*
|
|
41
41
|
* @summary Get recent activities for management dashboard
|
|
@@ -66,13 +66,13 @@ export interface ManagementDashboardApiInterface {
|
|
|
66
66
|
*/
|
|
67
67
|
export declare class ManagementDashboardApi extends runtime.BaseAPI implements ManagementDashboardApiInterface {
|
|
68
68
|
/**
|
|
69
|
-
* Generate
|
|
69
|
+
* Generate operations report with graph data
|
|
70
70
|
*/
|
|
71
|
-
|
|
71
|
+
getManagementOperationsReportRaw(requestParameters: GetManagementOperationsReportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ManagementOperationsReportSuccessResponse>>;
|
|
72
72
|
/**
|
|
73
|
-
* Generate
|
|
73
|
+
* Generate operations report with graph data
|
|
74
74
|
*/
|
|
75
|
-
|
|
75
|
+
getManagementOperationsReport(requestParameters?: GetManagementOperationsReportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ManagementOperationsReportSuccessResponse>;
|
|
76
76
|
/**
|
|
77
77
|
* Get recent activities for management dashboard
|
|
78
78
|
*/
|
|
@@ -30,9 +30,9 @@ const index_1 = require("../models/index");
|
|
|
30
30
|
*/
|
|
31
31
|
class ManagementDashboardApi extends runtime.BaseAPI {
|
|
32
32
|
/**
|
|
33
|
-
* Generate
|
|
33
|
+
* Generate operations report with graph data
|
|
34
34
|
*/
|
|
35
|
-
|
|
35
|
+
getManagementOperationsReportRaw(requestParameters, initOverrides) {
|
|
36
36
|
return __awaiter(this, void 0, void 0, function* () {
|
|
37
37
|
const queryParameters = {};
|
|
38
38
|
if (requestParameters['year'] != null) {
|
|
@@ -56,15 +56,15 @@ class ManagementDashboardApi extends runtime.BaseAPI {
|
|
|
56
56
|
headers: headerParameters,
|
|
57
57
|
query: queryParameters,
|
|
58
58
|
}, initOverrides);
|
|
59
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.
|
|
59
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ManagementOperationsReportSuccessResponseFromJSON)(jsonValue));
|
|
60
60
|
});
|
|
61
61
|
}
|
|
62
62
|
/**
|
|
63
|
-
* Generate
|
|
63
|
+
* Generate operations report with graph data
|
|
64
64
|
*/
|
|
65
|
-
|
|
65
|
+
getManagementOperationsReport() {
|
|
66
66
|
return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
|
|
67
|
-
const response = yield this.
|
|
67
|
+
const response = yield this.getManagementOperationsReportRaw(requestParameters, initOverrides);
|
|
68
68
|
return yield response.value();
|
|
69
69
|
});
|
|
70
70
|
}
|
|
@@ -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, BillingDashboardStatsResponse, 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
|
}
|
|
@@ -106,6 +109,18 @@ export interface AdminBillsApiInterface {
|
|
|
106
109
|
* Get bill by id (admin)
|
|
107
110
|
*/
|
|
108
111
|
getAdminBillById(requestParameters: GetAdminBillByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BillsSuccessResponse>;
|
|
112
|
+
/**
|
|
113
|
+
*
|
|
114
|
+
* @summary Get billing department dashboard stats (admin)
|
|
115
|
+
* @param {*} [options] Override http request option.
|
|
116
|
+
* @throws {RequiredError}
|
|
117
|
+
* @memberof AdminBillsApiInterface
|
|
118
|
+
*/
|
|
119
|
+
getAdminBillingDashboardStatsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BillingDashboardStatsResponse>>;
|
|
120
|
+
/**
|
|
121
|
+
* Get billing department dashboard stats (admin)
|
|
122
|
+
*/
|
|
123
|
+
getAdminBillingDashboardStats(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BillingDashboardStatsResponse>;
|
|
109
124
|
/**
|
|
110
125
|
*
|
|
111
126
|
* @summary Get paginated bills (admin)
|
|
@@ -125,6 +140,19 @@ export interface AdminBillsApiInterface {
|
|
|
125
140
|
* Get paginated bills (admin)
|
|
126
141
|
*/
|
|
127
142
|
getAdminBills(requestParameters: GetAdminBillsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BillsAdminPaginatedResponse>;
|
|
143
|
+
/**
|
|
144
|
+
*
|
|
145
|
+
* @summary Get collections statistics for a billing period (admin)
|
|
146
|
+
* @param {string} billingPeriod Billing period in YYYY-MM format
|
|
147
|
+
* @param {*} [options] Override http request option.
|
|
148
|
+
* @throws {RequiredError}
|
|
149
|
+
* @memberof AdminBillsApiInterface
|
|
150
|
+
*/
|
|
151
|
+
getAdminBillsCollectionsStatsRaw(requestParameters: GetAdminBillsCollectionsStatsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BillsCollectionsStatsResponse>>;
|
|
152
|
+
/**
|
|
153
|
+
* Get collections statistics for a billing period (admin)
|
|
154
|
+
*/
|
|
155
|
+
getAdminBillsCollectionsStats(requestParameters: GetAdminBillsCollectionsStatsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BillsCollectionsStatsResponse>;
|
|
128
156
|
/**
|
|
129
157
|
*
|
|
130
158
|
* @summary Preview bill calculation without saving (admin)
|
|
@@ -197,6 +225,14 @@ export declare class AdminBillsApi extends runtime.BaseAPI implements AdminBills
|
|
|
197
225
|
* Get bill by id (admin)
|
|
198
226
|
*/
|
|
199
227
|
getAdminBillById(requestParameters: GetAdminBillByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BillsSuccessResponse>;
|
|
228
|
+
/**
|
|
229
|
+
* Get billing department dashboard stats (admin)
|
|
230
|
+
*/
|
|
231
|
+
getAdminBillingDashboardStatsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BillingDashboardStatsResponse>>;
|
|
232
|
+
/**
|
|
233
|
+
* Get billing department dashboard stats (admin)
|
|
234
|
+
*/
|
|
235
|
+
getAdminBillingDashboardStats(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BillingDashboardStatsResponse>;
|
|
200
236
|
/**
|
|
201
237
|
* Get paginated bills (admin)
|
|
202
238
|
*/
|
|
@@ -205,6 +241,14 @@ export declare class AdminBillsApi extends runtime.BaseAPI implements AdminBills
|
|
|
205
241
|
* Get paginated bills (admin)
|
|
206
242
|
*/
|
|
207
243
|
getAdminBills(requestParameters?: GetAdminBillsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BillsAdminPaginatedResponse>;
|
|
244
|
+
/**
|
|
245
|
+
* Get collections statistics for a billing period (admin)
|
|
246
|
+
*/
|
|
247
|
+
getAdminBillsCollectionsStatsRaw(requestParameters: GetAdminBillsCollectionsStatsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BillsCollectionsStatsResponse>>;
|
|
248
|
+
/**
|
|
249
|
+
* Get collections statistics for a billing period (admin)
|
|
250
|
+
*/
|
|
251
|
+
getAdminBillsCollectionsStats(requestParameters: GetAdminBillsCollectionsStatsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BillsCollectionsStatsResponse>;
|
|
208
252
|
/**
|
|
209
253
|
* Preview bill calculation without saving (admin)
|
|
210
254
|
*/
|
|
@@ -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 { BillingDashboardStatsResponseFromJSON, BillsAdminPaginatedResponseFromJSON, BillsCalculationSuccessResponseFromJSON, BillsCollectionsStatsResponseFromJSON, BillsSuccessResponseFromJSON, CreateBillDtoToJSON, PreviewBillDtoToJSON, UpdateBillDtoToJSON, } from '../models/index';
|
|
25
25
|
/**
|
|
26
26
|
*
|
|
27
27
|
*/
|
|
@@ -203,6 +203,39 @@ export class AdminBillsApi extends runtime.BaseAPI {
|
|
|
203
203
|
return yield response.value();
|
|
204
204
|
});
|
|
205
205
|
}
|
|
206
|
+
/**
|
|
207
|
+
* Get billing department dashboard stats (admin)
|
|
208
|
+
*/
|
|
209
|
+
getAdminBillingDashboardStatsRaw(initOverrides) {
|
|
210
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
211
|
+
const queryParameters = {};
|
|
212
|
+
const headerParameters = {};
|
|
213
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
214
|
+
const token = this.configuration.accessToken;
|
|
215
|
+
const tokenString = yield token("bearer", []);
|
|
216
|
+
if (tokenString) {
|
|
217
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
let urlPath = `/api/v1/admin/bills/dashboard-stats`;
|
|
221
|
+
const response = yield this.request({
|
|
222
|
+
path: urlPath,
|
|
223
|
+
method: 'GET',
|
|
224
|
+
headers: headerParameters,
|
|
225
|
+
query: queryParameters,
|
|
226
|
+
}, initOverrides);
|
|
227
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => BillingDashboardStatsResponseFromJSON(jsonValue));
|
|
228
|
+
});
|
|
229
|
+
}
|
|
230
|
+
/**
|
|
231
|
+
* Get billing department dashboard stats (admin)
|
|
232
|
+
*/
|
|
233
|
+
getAdminBillingDashboardStats(initOverrides) {
|
|
234
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
235
|
+
const response = yield this.getAdminBillingDashboardStatsRaw(initOverrides);
|
|
236
|
+
return yield response.value();
|
|
237
|
+
});
|
|
238
|
+
}
|
|
206
239
|
/**
|
|
207
240
|
* Get paginated bills (admin)
|
|
208
241
|
*/
|
|
@@ -257,6 +290,45 @@ export class AdminBillsApi extends runtime.BaseAPI {
|
|
|
257
290
|
return yield response.value();
|
|
258
291
|
});
|
|
259
292
|
}
|
|
293
|
+
/**
|
|
294
|
+
* Get collections statistics for a billing period (admin)
|
|
295
|
+
*/
|
|
296
|
+
getAdminBillsCollectionsStatsRaw(requestParameters, initOverrides) {
|
|
297
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
298
|
+
if (requestParameters['billingPeriod'] == null) {
|
|
299
|
+
throw new runtime.RequiredError('billingPeriod', 'Required parameter "billingPeriod" was null or undefined when calling getAdminBillsCollectionsStats().');
|
|
300
|
+
}
|
|
301
|
+
const queryParameters = {};
|
|
302
|
+
if (requestParameters['billingPeriod'] != null) {
|
|
303
|
+
queryParameters['billingPeriod'] = requestParameters['billingPeriod'];
|
|
304
|
+
}
|
|
305
|
+
const headerParameters = {};
|
|
306
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
307
|
+
const token = this.configuration.accessToken;
|
|
308
|
+
const tokenString = yield token("bearer", []);
|
|
309
|
+
if (tokenString) {
|
|
310
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
let urlPath = `/api/v1/admin/bills/collections-stats`;
|
|
314
|
+
const response = yield this.request({
|
|
315
|
+
path: urlPath,
|
|
316
|
+
method: 'GET',
|
|
317
|
+
headers: headerParameters,
|
|
318
|
+
query: queryParameters,
|
|
319
|
+
}, initOverrides);
|
|
320
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => BillsCollectionsStatsResponseFromJSON(jsonValue));
|
|
321
|
+
});
|
|
322
|
+
}
|
|
323
|
+
/**
|
|
324
|
+
* Get collections statistics for a billing period (admin)
|
|
325
|
+
*/
|
|
326
|
+
getAdminBillsCollectionsStats(requestParameters, initOverrides) {
|
|
327
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
328
|
+
const response = yield this.getAdminBillsCollectionsStatsRaw(requestParameters, initOverrides);
|
|
329
|
+
return yield response.value();
|
|
330
|
+
});
|
|
331
|
+
}
|
|
260
332
|
/**
|
|
261
333
|
* Preview bill calculation without saving (admin)
|
|
262
334
|
*/
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { ManagementDashboardStatsSuccessResponse,
|
|
14
|
-
export interface
|
|
13
|
+
import type { ManagementDashboardStatsSuccessResponse, ManagementOperationsReportSuccessResponse, ManagementRecentActivitiesSuccessResponse } from '../models/index';
|
|
14
|
+
export interface GetManagementOperationsReportRequest {
|
|
15
15
|
year?: number;
|
|
16
16
|
month?: number;
|
|
17
17
|
}
|
|
@@ -24,18 +24,18 @@ export interface GetManagementMonthlyReportRequest {
|
|
|
24
24
|
export interface ManagementDashboardApiInterface {
|
|
25
25
|
/**
|
|
26
26
|
*
|
|
27
|
-
* @summary Generate
|
|
27
|
+
* @summary Generate operations report with graph data
|
|
28
28
|
* @param {number} [year] Year (defaults to current year)
|
|
29
29
|
* @param {number} [month] Month 1-12 (defaults to current month)
|
|
30
30
|
* @param {*} [options] Override http request option.
|
|
31
31
|
* @throws {RequiredError}
|
|
32
32
|
* @memberof ManagementDashboardApiInterface
|
|
33
33
|
*/
|
|
34
|
-
|
|
34
|
+
getManagementOperationsReportRaw(requestParameters: GetManagementOperationsReportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ManagementOperationsReportSuccessResponse>>;
|
|
35
35
|
/**
|
|
36
|
-
* Generate
|
|
36
|
+
* Generate operations report with graph data
|
|
37
37
|
*/
|
|
38
|
-
|
|
38
|
+
getManagementOperationsReport(requestParameters: GetManagementOperationsReportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ManagementOperationsReportSuccessResponse>;
|
|
39
39
|
/**
|
|
40
40
|
*
|
|
41
41
|
* @summary Get recent activities for management dashboard
|
|
@@ -66,13 +66,13 @@ export interface ManagementDashboardApiInterface {
|
|
|
66
66
|
*/
|
|
67
67
|
export declare class ManagementDashboardApi extends runtime.BaseAPI implements ManagementDashboardApiInterface {
|
|
68
68
|
/**
|
|
69
|
-
* Generate
|
|
69
|
+
* Generate operations report with graph data
|
|
70
70
|
*/
|
|
71
|
-
|
|
71
|
+
getManagementOperationsReportRaw(requestParameters: GetManagementOperationsReportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ManagementOperationsReportSuccessResponse>>;
|
|
72
72
|
/**
|
|
73
|
-
* Generate
|
|
73
|
+
* Generate operations report with graph data
|
|
74
74
|
*/
|
|
75
|
-
|
|
75
|
+
getManagementOperationsReport(requestParameters?: GetManagementOperationsReportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ManagementOperationsReportSuccessResponse>;
|
|
76
76
|
/**
|
|
77
77
|
* Get recent activities for management dashboard
|
|
78
78
|
*/
|
|
@@ -21,15 +21,15 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
21
21
|
});
|
|
22
22
|
};
|
|
23
23
|
import * as runtime from '../runtime';
|
|
24
|
-
import { ManagementDashboardStatsSuccessResponseFromJSON,
|
|
24
|
+
import { ManagementDashboardStatsSuccessResponseFromJSON, ManagementOperationsReportSuccessResponseFromJSON, ManagementRecentActivitiesSuccessResponseFromJSON, } from '../models/index';
|
|
25
25
|
/**
|
|
26
26
|
*
|
|
27
27
|
*/
|
|
28
28
|
export class ManagementDashboardApi extends runtime.BaseAPI {
|
|
29
29
|
/**
|
|
30
|
-
* Generate
|
|
30
|
+
* Generate operations report with graph data
|
|
31
31
|
*/
|
|
32
|
-
|
|
32
|
+
getManagementOperationsReportRaw(requestParameters, initOverrides) {
|
|
33
33
|
return __awaiter(this, void 0, void 0, function* () {
|
|
34
34
|
const queryParameters = {};
|
|
35
35
|
if (requestParameters['year'] != null) {
|
|
@@ -53,15 +53,15 @@ export class ManagementDashboardApi extends runtime.BaseAPI {
|
|
|
53
53
|
headers: headerParameters,
|
|
54
54
|
query: queryParameters,
|
|
55
55
|
}, initOverrides);
|
|
56
|
-
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
|
56
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ManagementOperationsReportSuccessResponseFromJSON(jsonValue));
|
|
57
57
|
});
|
|
58
58
|
}
|
|
59
59
|
/**
|
|
60
|
-
* Generate
|
|
60
|
+
* Generate operations report with graph data
|
|
61
61
|
*/
|
|
62
|
-
|
|
62
|
+
getManagementOperationsReport() {
|
|
63
63
|
return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
|
|
64
|
-
const response = yield this.
|
|
64
|
+
const response = yield this.getManagementOperationsReportRaw(requestParameters, initOverrides);
|
|
65
65
|
return yield response.value();
|
|
66
66
|
});
|
|
67
67
|
}
|
|
@@ -0,0 +1,56 @@
|
|
|
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 BillingDashboardStatsDto
|
|
16
|
+
*/
|
|
17
|
+
export interface BillingDashboardStatsDto {
|
|
18
|
+
/**
|
|
19
|
+
* Current billing period (YYYY-MM)
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof BillingDashboardStatsDto
|
|
22
|
+
*/
|
|
23
|
+
billingPeriod: string;
|
|
24
|
+
/**
|
|
25
|
+
* Number of bills issued this period
|
|
26
|
+
* @type {number}
|
|
27
|
+
* @memberof BillingDashboardStatsDto
|
|
28
|
+
*/
|
|
29
|
+
totalBills: number;
|
|
30
|
+
/**
|
|
31
|
+
* Total amount billed (sum of netDue) this period
|
|
32
|
+
* @type {number}
|
|
33
|
+
* @memberof BillingDashboardStatsDto
|
|
34
|
+
*/
|
|
35
|
+
totalBilled: number;
|
|
36
|
+
/**
|
|
37
|
+
* Total amount collected (sum of amountPaid) this period
|
|
38
|
+
* @type {number}
|
|
39
|
+
* @memberof BillingDashboardStatsDto
|
|
40
|
+
*/
|
|
41
|
+
totalCollected: number;
|
|
42
|
+
/**
|
|
43
|
+
* Number of accounts with overdue status across all periods
|
|
44
|
+
* @type {number}
|
|
45
|
+
* @memberof BillingDashboardStatsDto
|
|
46
|
+
*/
|
|
47
|
+
overdueAccounts: number;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Check if a given object implements the BillingDashboardStatsDto interface.
|
|
51
|
+
*/
|
|
52
|
+
export declare function instanceOfBillingDashboardStatsDto(value: object): value is BillingDashboardStatsDto;
|
|
53
|
+
export declare function BillingDashboardStatsDtoFromJSON(json: any): BillingDashboardStatsDto;
|
|
54
|
+
export declare function BillingDashboardStatsDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): BillingDashboardStatsDto;
|
|
55
|
+
export declare function BillingDashboardStatsDtoToJSON(json: any): BillingDashboardStatsDto;
|
|
56
|
+
export declare function BillingDashboardStatsDtoToJSONTyped(value?: BillingDashboardStatsDto | null, ignoreDiscriminator?: boolean): any;
|