electric-coop-api 0.1.57 → 0.1.59
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 +17 -0
- package/README.md +2 -2
- package/dist/apis/ManagementDashboardApi.d.ts +92 -0
- package/dist/apis/ManagementDashboardApi.js +138 -0
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/esm/apis/ManagementDashboardApi.d.ts +92 -0
- package/dist/esm/apis/ManagementDashboardApi.js +134 -0
- package/dist/esm/apis/index.d.ts +1 -0
- package/dist/esm/apis/index.js +1 -0
- package/dist/esm/models/ChartDataPointDto.d.ts +38 -0
- package/dist/esm/models/ChartDataPointDto.js +47 -0
- package/dist/esm/models/ChartSegmentDto.d.ts +44 -0
- package/dist/esm/models/ChartSegmentDto.js +51 -0
- package/dist/esm/models/ManagementDashboardStatsResponseDto.d.ts +74 -0
- package/dist/esm/models/ManagementDashboardStatsResponseDto.js +71 -0
- package/dist/esm/models/ManagementDashboardStatsSuccessResponse.d.ts +45 -0
- package/dist/esm/models/ManagementDashboardStatsSuccessResponse.js +50 -0
- package/dist/esm/models/ManagementMonthlyReportDto.d.ts +93 -0
- package/dist/esm/models/ManagementMonthlyReportDto.js +86 -0
- package/dist/esm/models/ManagementMonthlyReportResponse.d.ts +45 -0
- package/dist/esm/models/ManagementMonthlyReportResponse.js +50 -0
- package/dist/esm/models/ManagementRecentActivitiesResponseDto.d.ts +33 -0
- package/dist/esm/models/ManagementRecentActivitiesResponseDto.js +44 -0
- package/dist/esm/models/ManagementRecentActivitiesSuccessResponse.d.ts +45 -0
- package/dist/esm/models/ManagementRecentActivitiesSuccessResponse.js +50 -0
- package/dist/esm/models/ManagementRecentActivityDto.d.ts +68 -0
- package/dist/esm/models/ManagementRecentActivityDto.js +61 -0
- package/dist/esm/models/MonthlyBillsBreakdownDto.d.ts +45 -0
- package/dist/esm/models/MonthlyBillsBreakdownDto.js +52 -0
- package/dist/esm/models/MonthlyCollectionRateDto.d.ts +45 -0
- package/dist/esm/models/MonthlyCollectionRateDto.js +52 -0
- package/dist/esm/models/MonthlyComplaintsSummaryDto.d.ts +51 -0
- package/dist/esm/models/MonthlyComplaintsSummaryDto.js +56 -0
- package/dist/esm/models/MonthlyConsumersSummaryDto.d.ts +51 -0
- package/dist/esm/models/MonthlyConsumersSummaryDto.js +56 -0
- package/dist/esm/models/MonthlyOutagesSummaryDto.d.ts +58 -0
- package/dist/esm/models/MonthlyOutagesSummaryDto.js +61 -0
- package/dist/esm/models/MonthlyRevenueTrendDto.d.ts +51 -0
- package/dist/esm/models/MonthlyRevenueTrendDto.js +56 -0
- package/dist/esm/models/MonthlyWorkOrdersSummaryDto.d.ts +51 -0
- package/dist/esm/models/MonthlyWorkOrdersSummaryDto.js +56 -0
- package/dist/esm/models/UserPermissionEnum.d.ts +4 -0
- package/dist/esm/models/UserPermissionEnum.js +5 -1
- package/dist/esm/models/index.d.ts +16 -0
- package/dist/esm/models/index.js +16 -0
- package/dist/models/ChartDataPointDto.d.ts +38 -0
- package/dist/models/ChartDataPointDto.js +54 -0
- package/dist/models/ChartSegmentDto.d.ts +44 -0
- package/dist/models/ChartSegmentDto.js +58 -0
- package/dist/models/ManagementDashboardStatsResponseDto.d.ts +74 -0
- package/dist/models/ManagementDashboardStatsResponseDto.js +78 -0
- package/dist/models/ManagementDashboardStatsSuccessResponse.d.ts +45 -0
- package/dist/models/ManagementDashboardStatsSuccessResponse.js +57 -0
- package/dist/models/ManagementMonthlyReportDto.d.ts +93 -0
- package/dist/models/ManagementMonthlyReportDto.js +93 -0
- package/dist/models/ManagementMonthlyReportResponse.d.ts +45 -0
- package/dist/models/ManagementMonthlyReportResponse.js +57 -0
- package/dist/models/ManagementRecentActivitiesResponseDto.d.ts +33 -0
- package/dist/models/ManagementRecentActivitiesResponseDto.js +51 -0
- package/dist/models/ManagementRecentActivitiesSuccessResponse.d.ts +45 -0
- package/dist/models/ManagementRecentActivitiesSuccessResponse.js +57 -0
- package/dist/models/ManagementRecentActivityDto.d.ts +68 -0
- package/dist/models/ManagementRecentActivityDto.js +68 -0
- package/dist/models/MonthlyBillsBreakdownDto.d.ts +45 -0
- package/dist/models/MonthlyBillsBreakdownDto.js +59 -0
- package/dist/models/MonthlyCollectionRateDto.d.ts +45 -0
- package/dist/models/MonthlyCollectionRateDto.js +59 -0
- package/dist/models/MonthlyComplaintsSummaryDto.d.ts +51 -0
- package/dist/models/MonthlyComplaintsSummaryDto.js +63 -0
- package/dist/models/MonthlyConsumersSummaryDto.d.ts +51 -0
- package/dist/models/MonthlyConsumersSummaryDto.js +63 -0
- package/dist/models/MonthlyOutagesSummaryDto.d.ts +58 -0
- package/dist/models/MonthlyOutagesSummaryDto.js +68 -0
- package/dist/models/MonthlyRevenueTrendDto.d.ts +51 -0
- package/dist/models/MonthlyRevenueTrendDto.js +63 -0
- package/dist/models/MonthlyWorkOrdersSummaryDto.d.ts +51 -0
- package/dist/models/MonthlyWorkOrdersSummaryDto.js +63 -0
- package/dist/models/UserPermissionEnum.d.ts +4 -0
- package/dist/models/UserPermissionEnum.js +5 -1
- package/dist/models/index.d.ts +16 -0
- package/dist/models/index.js +16 -0
- package/package.json +1 -1
- package/src/apis/ManagementDashboardApi.ts +216 -0
- package/src/apis/index.ts +1 -0
- package/src/models/ChartDataPointDto.ts +75 -0
- package/src/models/ChartSegmentDto.ts +84 -0
- package/src/models/ManagementDashboardStatsResponseDto.ts +129 -0
- package/src/models/ManagementDashboardStatsSuccessResponse.ts +91 -0
- package/src/models/ManagementMonthlyReportDto.ts +197 -0
- package/src/models/ManagementMonthlyReportResponse.ts +91 -0
- package/src/models/ManagementRecentActivitiesResponseDto.ts +74 -0
- package/src/models/ManagementRecentActivitiesSuccessResponse.ts +91 -0
- package/src/models/ManagementRecentActivityDto.ts +117 -0
- package/src/models/MonthlyBillsBreakdownDto.ts +92 -0
- package/src/models/MonthlyCollectionRateDto.ts +92 -0
- package/src/models/MonthlyComplaintsSummaryDto.ts +101 -0
- package/src/models/MonthlyConsumersSummaryDto.ts +101 -0
- package/src/models/MonthlyOutagesSummaryDto.ts +117 -0
- package/src/models/MonthlyRevenueTrendDto.ts +101 -0
- package/src/models/MonthlyWorkOrdersSummaryDto.ts +101 -0
- package/src/models/UserPermissionEnum.ts +5 -1
- package/src/models/index.ts +16 -0
package/.openapi-generator/FILES
CHANGED
|
@@ -21,6 +21,7 @@ src/apis/ConsumersApi.ts
|
|
|
21
21
|
src/apis/DashboardApi.ts
|
|
22
22
|
src/apis/FieldOutagesApi.ts
|
|
23
23
|
src/apis/FieldWorkOrdersApi.ts
|
|
24
|
+
src/apis/ManagementDashboardApi.ts
|
|
24
25
|
src/apis/MetersApi.ts
|
|
25
26
|
src/apis/NotificationsApi.ts
|
|
26
27
|
src/apis/RateAdjustmentsApi.ts
|
|
@@ -76,6 +77,8 @@ src/models/BillsAdminPaginatedResponse.ts
|
|
|
76
77
|
src/models/BillsCalculationSuccessResponse.ts
|
|
77
78
|
src/models/BillsPaginatedResponse.ts
|
|
78
79
|
src/models/BillsSuccessResponse.ts
|
|
80
|
+
src/models/ChartDataPointDto.ts
|
|
81
|
+
src/models/ChartSegmentDto.ts
|
|
79
82
|
src/models/Complaint.ts
|
|
80
83
|
src/models/ComplaintPriorityEnum.ts
|
|
81
84
|
src/models/ComplaintStatsResponse.ts
|
|
@@ -117,6 +120,13 @@ src/models/LastReadingDto.ts
|
|
|
117
120
|
src/models/LinkConsumerAccountDto.ts
|
|
118
121
|
src/models/LoginDto.ts
|
|
119
122
|
src/models/LogoutDto.ts
|
|
123
|
+
src/models/ManagementDashboardStatsResponseDto.ts
|
|
124
|
+
src/models/ManagementDashboardStatsSuccessResponse.ts
|
|
125
|
+
src/models/ManagementMonthlyReportDto.ts
|
|
126
|
+
src/models/ManagementMonthlyReportResponse.ts
|
|
127
|
+
src/models/ManagementRecentActivitiesResponseDto.ts
|
|
128
|
+
src/models/ManagementRecentActivitiesSuccessResponse.ts
|
|
129
|
+
src/models/ManagementRecentActivityDto.ts
|
|
120
130
|
src/models/MeterLookup.ts
|
|
121
131
|
src/models/MeterLookupResponseDto.ts
|
|
122
132
|
src/models/MeterReadingHistoryResponseDto.ts
|
|
@@ -126,6 +136,13 @@ src/models/MeterReadingSettingsResponseDto.ts
|
|
|
126
136
|
src/models/MeterReadingSettingsSuccessResponse.ts
|
|
127
137
|
src/models/MeterStatsResponseDto.ts
|
|
128
138
|
src/models/MeterStatsSuccessResponse.ts
|
|
139
|
+
src/models/MonthlyBillsBreakdownDto.ts
|
|
140
|
+
src/models/MonthlyCollectionRateDto.ts
|
|
141
|
+
src/models/MonthlyComplaintsSummaryDto.ts
|
|
142
|
+
src/models/MonthlyConsumersSummaryDto.ts
|
|
143
|
+
src/models/MonthlyOutagesSummaryDto.ts
|
|
144
|
+
src/models/MonthlyRevenueTrendDto.ts
|
|
145
|
+
src/models/MonthlyWorkOrdersSummaryDto.ts
|
|
129
146
|
src/models/Notification.ts
|
|
130
147
|
src/models/NotificationMarkedAsRead.ts
|
|
131
148
|
src/models/NotificationTargetEnum.ts
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## electric-coop-api@0.1.
|
|
1
|
+
## electric-coop-api@0.1.59
|
|
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.59 --save
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
_unPublished (not recommended):_
|
|
@@ -0,0 +1,92 @@
|
|
|
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 * as runtime from '../runtime';
|
|
13
|
+
import type { ManagementDashboardStatsSuccessResponse, ManagementMonthlyReportResponse, ManagementRecentActivitiesSuccessResponse } from '../models/index';
|
|
14
|
+
export interface GetManagementMonthlyReportRequest {
|
|
15
|
+
year?: number;
|
|
16
|
+
month?: number;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* ManagementDashboardApi - interface
|
|
20
|
+
*
|
|
21
|
+
* @export
|
|
22
|
+
* @interface ManagementDashboardApiInterface
|
|
23
|
+
*/
|
|
24
|
+
export interface ManagementDashboardApiInterface {
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @summary Generate monthly report with graph data
|
|
28
|
+
* @param {number} [year] Year (defaults to current year)
|
|
29
|
+
* @param {number} [month] Month 1-12 (defaults to current month)
|
|
30
|
+
* @param {*} [options] Override http request option.
|
|
31
|
+
* @throws {RequiredError}
|
|
32
|
+
* @memberof ManagementDashboardApiInterface
|
|
33
|
+
*/
|
|
34
|
+
getManagementMonthlyReportRaw(requestParameters: GetManagementMonthlyReportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ManagementMonthlyReportResponse>>;
|
|
35
|
+
/**
|
|
36
|
+
* Generate monthly report with graph data
|
|
37
|
+
*/
|
|
38
|
+
getManagementMonthlyReport(requestParameters: GetManagementMonthlyReportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ManagementMonthlyReportResponse>;
|
|
39
|
+
/**
|
|
40
|
+
*
|
|
41
|
+
* @summary Get recent activities for management dashboard
|
|
42
|
+
* @param {*} [options] Override http request option.
|
|
43
|
+
* @throws {RequiredError}
|
|
44
|
+
* @memberof ManagementDashboardApiInterface
|
|
45
|
+
*/
|
|
46
|
+
getManagementRecentActivitiesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ManagementRecentActivitiesSuccessResponse>>;
|
|
47
|
+
/**
|
|
48
|
+
* Get recent activities for management dashboard
|
|
49
|
+
*/
|
|
50
|
+
getManagementRecentActivities(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ManagementRecentActivitiesSuccessResponse>;
|
|
51
|
+
/**
|
|
52
|
+
*
|
|
53
|
+
* @summary Get management dashboard stats
|
|
54
|
+
* @param {*} [options] Override http request option.
|
|
55
|
+
* @throws {RequiredError}
|
|
56
|
+
* @memberof ManagementDashboardApiInterface
|
|
57
|
+
*/
|
|
58
|
+
getManagementStatsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ManagementDashboardStatsSuccessResponse>>;
|
|
59
|
+
/**
|
|
60
|
+
* Get management dashboard stats
|
|
61
|
+
*/
|
|
62
|
+
getManagementStats(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ManagementDashboardStatsSuccessResponse>;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
*
|
|
66
|
+
*/
|
|
67
|
+
export declare class ManagementDashboardApi extends runtime.BaseAPI implements ManagementDashboardApiInterface {
|
|
68
|
+
/**
|
|
69
|
+
* Generate monthly report with graph data
|
|
70
|
+
*/
|
|
71
|
+
getManagementMonthlyReportRaw(requestParameters: GetManagementMonthlyReportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ManagementMonthlyReportResponse>>;
|
|
72
|
+
/**
|
|
73
|
+
* Generate monthly report with graph data
|
|
74
|
+
*/
|
|
75
|
+
getManagementMonthlyReport(requestParameters?: GetManagementMonthlyReportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ManagementMonthlyReportResponse>;
|
|
76
|
+
/**
|
|
77
|
+
* Get recent activities for management dashboard
|
|
78
|
+
*/
|
|
79
|
+
getManagementRecentActivitiesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ManagementRecentActivitiesSuccessResponse>>;
|
|
80
|
+
/**
|
|
81
|
+
* Get recent activities for management dashboard
|
|
82
|
+
*/
|
|
83
|
+
getManagementRecentActivities(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ManagementRecentActivitiesSuccessResponse>;
|
|
84
|
+
/**
|
|
85
|
+
* Get management dashboard stats
|
|
86
|
+
*/
|
|
87
|
+
getManagementStatsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ManagementDashboardStatsSuccessResponse>>;
|
|
88
|
+
/**
|
|
89
|
+
* Get management dashboard stats
|
|
90
|
+
*/
|
|
91
|
+
getManagementStats(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ManagementDashboardStatsSuccessResponse>;
|
|
92
|
+
}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Electric Cooperative Consumer Portal API
|
|
6
|
+
* Multi-tenant SaaS platform for Philippine electric cooperatives
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
16
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
17
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
18
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
19
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
20
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
21
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.ManagementDashboardApi = void 0;
|
|
26
|
+
const runtime = require("../runtime");
|
|
27
|
+
const index_1 = require("../models/index");
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
31
|
+
class ManagementDashboardApi extends runtime.BaseAPI {
|
|
32
|
+
/**
|
|
33
|
+
* Generate monthly report with graph data
|
|
34
|
+
*/
|
|
35
|
+
getManagementMonthlyReportRaw(requestParameters, initOverrides) {
|
|
36
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
37
|
+
const queryParameters = {};
|
|
38
|
+
if (requestParameters['year'] != null) {
|
|
39
|
+
queryParameters['year'] = requestParameters['year'];
|
|
40
|
+
}
|
|
41
|
+
if (requestParameters['month'] != null) {
|
|
42
|
+
queryParameters['month'] = requestParameters['month'];
|
|
43
|
+
}
|
|
44
|
+
const headerParameters = {};
|
|
45
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
46
|
+
const token = this.configuration.accessToken;
|
|
47
|
+
const tokenString = yield token("bearer", []);
|
|
48
|
+
if (tokenString) {
|
|
49
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
let urlPath = `/api/v1/management/dashboard/monthly-report`;
|
|
53
|
+
const response = yield this.request({
|
|
54
|
+
path: urlPath,
|
|
55
|
+
method: 'GET',
|
|
56
|
+
headers: headerParameters,
|
|
57
|
+
query: queryParameters,
|
|
58
|
+
}, initOverrides);
|
|
59
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ManagementMonthlyReportResponseFromJSON)(jsonValue));
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Generate monthly report with graph data
|
|
64
|
+
*/
|
|
65
|
+
getManagementMonthlyReport() {
|
|
66
|
+
return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
|
|
67
|
+
const response = yield this.getManagementMonthlyReportRaw(requestParameters, initOverrides);
|
|
68
|
+
return yield response.value();
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Get recent activities for management dashboard
|
|
73
|
+
*/
|
|
74
|
+
getManagementRecentActivitiesRaw(initOverrides) {
|
|
75
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
76
|
+
const queryParameters = {};
|
|
77
|
+
const headerParameters = {};
|
|
78
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
79
|
+
const token = this.configuration.accessToken;
|
|
80
|
+
const tokenString = yield token("bearer", []);
|
|
81
|
+
if (tokenString) {
|
|
82
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
let urlPath = `/api/v1/management/dashboard/recent-activities`;
|
|
86
|
+
const response = yield this.request({
|
|
87
|
+
path: urlPath,
|
|
88
|
+
method: 'GET',
|
|
89
|
+
headers: headerParameters,
|
|
90
|
+
query: queryParameters,
|
|
91
|
+
}, initOverrides);
|
|
92
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ManagementRecentActivitiesSuccessResponseFromJSON)(jsonValue));
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Get recent activities for management dashboard
|
|
97
|
+
*/
|
|
98
|
+
getManagementRecentActivities(initOverrides) {
|
|
99
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
100
|
+
const response = yield this.getManagementRecentActivitiesRaw(initOverrides);
|
|
101
|
+
return yield response.value();
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Get management dashboard stats
|
|
106
|
+
*/
|
|
107
|
+
getManagementStatsRaw(initOverrides) {
|
|
108
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
109
|
+
const queryParameters = {};
|
|
110
|
+
const headerParameters = {};
|
|
111
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
112
|
+
const token = this.configuration.accessToken;
|
|
113
|
+
const tokenString = yield token("bearer", []);
|
|
114
|
+
if (tokenString) {
|
|
115
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
let urlPath = `/api/v1/management/dashboard/stats`;
|
|
119
|
+
const response = yield this.request({
|
|
120
|
+
path: urlPath,
|
|
121
|
+
method: 'GET',
|
|
122
|
+
headers: headerParameters,
|
|
123
|
+
query: queryParameters,
|
|
124
|
+
}, initOverrides);
|
|
125
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ManagementDashboardStatsSuccessResponseFromJSON)(jsonValue));
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Get management dashboard stats
|
|
130
|
+
*/
|
|
131
|
+
getManagementStats(initOverrides) {
|
|
132
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
133
|
+
const response = yield this.getManagementStatsRaw(initOverrides);
|
|
134
|
+
return yield response.value();
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
exports.ManagementDashboardApi = ManagementDashboardApi;
|
package/dist/apis/index.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ export * from './ConsumersApi';
|
|
|
16
16
|
export * from './DashboardApi';
|
|
17
17
|
export * from './FieldOutagesApi';
|
|
18
18
|
export * from './FieldWorkOrdersApi';
|
|
19
|
+
export * from './ManagementDashboardApi';
|
|
19
20
|
export * from './MetersApi';
|
|
20
21
|
export * from './NotificationsApi';
|
|
21
22
|
export * from './RateAdjustmentsApi';
|
package/dist/apis/index.js
CHANGED
|
@@ -34,6 +34,7 @@ __exportStar(require("./ConsumersApi"), exports);
|
|
|
34
34
|
__exportStar(require("./DashboardApi"), exports);
|
|
35
35
|
__exportStar(require("./FieldOutagesApi"), exports);
|
|
36
36
|
__exportStar(require("./FieldWorkOrdersApi"), exports);
|
|
37
|
+
__exportStar(require("./ManagementDashboardApi"), exports);
|
|
37
38
|
__exportStar(require("./MetersApi"), exports);
|
|
38
39
|
__exportStar(require("./NotificationsApi"), exports);
|
|
39
40
|
__exportStar(require("./RateAdjustmentsApi"), exports);
|
|
@@ -0,0 +1,92 @@
|
|
|
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 * as runtime from '../runtime';
|
|
13
|
+
import type { ManagementDashboardStatsSuccessResponse, ManagementMonthlyReportResponse, ManagementRecentActivitiesSuccessResponse } from '../models/index';
|
|
14
|
+
export interface GetManagementMonthlyReportRequest {
|
|
15
|
+
year?: number;
|
|
16
|
+
month?: number;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* ManagementDashboardApi - interface
|
|
20
|
+
*
|
|
21
|
+
* @export
|
|
22
|
+
* @interface ManagementDashboardApiInterface
|
|
23
|
+
*/
|
|
24
|
+
export interface ManagementDashboardApiInterface {
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @summary Generate monthly report with graph data
|
|
28
|
+
* @param {number} [year] Year (defaults to current year)
|
|
29
|
+
* @param {number} [month] Month 1-12 (defaults to current month)
|
|
30
|
+
* @param {*} [options] Override http request option.
|
|
31
|
+
* @throws {RequiredError}
|
|
32
|
+
* @memberof ManagementDashboardApiInterface
|
|
33
|
+
*/
|
|
34
|
+
getManagementMonthlyReportRaw(requestParameters: GetManagementMonthlyReportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ManagementMonthlyReportResponse>>;
|
|
35
|
+
/**
|
|
36
|
+
* Generate monthly report with graph data
|
|
37
|
+
*/
|
|
38
|
+
getManagementMonthlyReport(requestParameters: GetManagementMonthlyReportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ManagementMonthlyReportResponse>;
|
|
39
|
+
/**
|
|
40
|
+
*
|
|
41
|
+
* @summary Get recent activities for management dashboard
|
|
42
|
+
* @param {*} [options] Override http request option.
|
|
43
|
+
* @throws {RequiredError}
|
|
44
|
+
* @memberof ManagementDashboardApiInterface
|
|
45
|
+
*/
|
|
46
|
+
getManagementRecentActivitiesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ManagementRecentActivitiesSuccessResponse>>;
|
|
47
|
+
/**
|
|
48
|
+
* Get recent activities for management dashboard
|
|
49
|
+
*/
|
|
50
|
+
getManagementRecentActivities(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ManagementRecentActivitiesSuccessResponse>;
|
|
51
|
+
/**
|
|
52
|
+
*
|
|
53
|
+
* @summary Get management dashboard stats
|
|
54
|
+
* @param {*} [options] Override http request option.
|
|
55
|
+
* @throws {RequiredError}
|
|
56
|
+
* @memberof ManagementDashboardApiInterface
|
|
57
|
+
*/
|
|
58
|
+
getManagementStatsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ManagementDashboardStatsSuccessResponse>>;
|
|
59
|
+
/**
|
|
60
|
+
* Get management dashboard stats
|
|
61
|
+
*/
|
|
62
|
+
getManagementStats(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ManagementDashboardStatsSuccessResponse>;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
*
|
|
66
|
+
*/
|
|
67
|
+
export declare class ManagementDashboardApi extends runtime.BaseAPI implements ManagementDashboardApiInterface {
|
|
68
|
+
/**
|
|
69
|
+
* Generate monthly report with graph data
|
|
70
|
+
*/
|
|
71
|
+
getManagementMonthlyReportRaw(requestParameters: GetManagementMonthlyReportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ManagementMonthlyReportResponse>>;
|
|
72
|
+
/**
|
|
73
|
+
* Generate monthly report with graph data
|
|
74
|
+
*/
|
|
75
|
+
getManagementMonthlyReport(requestParameters?: GetManagementMonthlyReportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ManagementMonthlyReportResponse>;
|
|
76
|
+
/**
|
|
77
|
+
* Get recent activities for management dashboard
|
|
78
|
+
*/
|
|
79
|
+
getManagementRecentActivitiesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ManagementRecentActivitiesSuccessResponse>>;
|
|
80
|
+
/**
|
|
81
|
+
* Get recent activities for management dashboard
|
|
82
|
+
*/
|
|
83
|
+
getManagementRecentActivities(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ManagementRecentActivitiesSuccessResponse>;
|
|
84
|
+
/**
|
|
85
|
+
* Get management dashboard stats
|
|
86
|
+
*/
|
|
87
|
+
getManagementStatsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ManagementDashboardStatsSuccessResponse>>;
|
|
88
|
+
/**
|
|
89
|
+
* Get management dashboard stats
|
|
90
|
+
*/
|
|
91
|
+
getManagementStats(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ManagementDashboardStatsSuccessResponse>;
|
|
92
|
+
}
|
|
@@ -0,0 +1,134 @@
|
|
|
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
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
15
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
16
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
17
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
18
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
19
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
20
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
import * as runtime from '../runtime';
|
|
24
|
+
import { ManagementDashboardStatsSuccessResponseFromJSON, ManagementMonthlyReportResponseFromJSON, ManagementRecentActivitiesSuccessResponseFromJSON, } from '../models/index';
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
28
|
+
export class ManagementDashboardApi extends runtime.BaseAPI {
|
|
29
|
+
/**
|
|
30
|
+
* Generate monthly report with graph data
|
|
31
|
+
*/
|
|
32
|
+
getManagementMonthlyReportRaw(requestParameters, initOverrides) {
|
|
33
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
34
|
+
const queryParameters = {};
|
|
35
|
+
if (requestParameters['year'] != null) {
|
|
36
|
+
queryParameters['year'] = requestParameters['year'];
|
|
37
|
+
}
|
|
38
|
+
if (requestParameters['month'] != null) {
|
|
39
|
+
queryParameters['month'] = requestParameters['month'];
|
|
40
|
+
}
|
|
41
|
+
const headerParameters = {};
|
|
42
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
43
|
+
const token = this.configuration.accessToken;
|
|
44
|
+
const tokenString = yield token("bearer", []);
|
|
45
|
+
if (tokenString) {
|
|
46
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
let urlPath = `/api/v1/management/dashboard/monthly-report`;
|
|
50
|
+
const response = yield this.request({
|
|
51
|
+
path: urlPath,
|
|
52
|
+
method: 'GET',
|
|
53
|
+
headers: headerParameters,
|
|
54
|
+
query: queryParameters,
|
|
55
|
+
}, initOverrides);
|
|
56
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ManagementMonthlyReportResponseFromJSON(jsonValue));
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Generate monthly report with graph data
|
|
61
|
+
*/
|
|
62
|
+
getManagementMonthlyReport() {
|
|
63
|
+
return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
|
|
64
|
+
const response = yield this.getManagementMonthlyReportRaw(requestParameters, initOverrides);
|
|
65
|
+
return yield response.value();
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Get recent activities for management dashboard
|
|
70
|
+
*/
|
|
71
|
+
getManagementRecentActivitiesRaw(initOverrides) {
|
|
72
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
73
|
+
const queryParameters = {};
|
|
74
|
+
const headerParameters = {};
|
|
75
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
76
|
+
const token = this.configuration.accessToken;
|
|
77
|
+
const tokenString = yield token("bearer", []);
|
|
78
|
+
if (tokenString) {
|
|
79
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
let urlPath = `/api/v1/management/dashboard/recent-activities`;
|
|
83
|
+
const response = yield this.request({
|
|
84
|
+
path: urlPath,
|
|
85
|
+
method: 'GET',
|
|
86
|
+
headers: headerParameters,
|
|
87
|
+
query: queryParameters,
|
|
88
|
+
}, initOverrides);
|
|
89
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ManagementRecentActivitiesSuccessResponseFromJSON(jsonValue));
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Get recent activities for management dashboard
|
|
94
|
+
*/
|
|
95
|
+
getManagementRecentActivities(initOverrides) {
|
|
96
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
97
|
+
const response = yield this.getManagementRecentActivitiesRaw(initOverrides);
|
|
98
|
+
return yield response.value();
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Get management dashboard stats
|
|
103
|
+
*/
|
|
104
|
+
getManagementStatsRaw(initOverrides) {
|
|
105
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
106
|
+
const queryParameters = {};
|
|
107
|
+
const headerParameters = {};
|
|
108
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
109
|
+
const token = this.configuration.accessToken;
|
|
110
|
+
const tokenString = yield token("bearer", []);
|
|
111
|
+
if (tokenString) {
|
|
112
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
let urlPath = `/api/v1/management/dashboard/stats`;
|
|
116
|
+
const response = yield this.request({
|
|
117
|
+
path: urlPath,
|
|
118
|
+
method: 'GET',
|
|
119
|
+
headers: headerParameters,
|
|
120
|
+
query: queryParameters,
|
|
121
|
+
}, initOverrides);
|
|
122
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ManagementDashboardStatsSuccessResponseFromJSON(jsonValue));
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Get management dashboard stats
|
|
127
|
+
*/
|
|
128
|
+
getManagementStats(initOverrides) {
|
|
129
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
130
|
+
const response = yield this.getManagementStatsRaw(initOverrides);
|
|
131
|
+
return yield response.value();
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
}
|
package/dist/esm/apis/index.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ export * from './ConsumersApi';
|
|
|
16
16
|
export * from './DashboardApi';
|
|
17
17
|
export * from './FieldOutagesApi';
|
|
18
18
|
export * from './FieldWorkOrdersApi';
|
|
19
|
+
export * from './ManagementDashboardApi';
|
|
19
20
|
export * from './MetersApi';
|
|
20
21
|
export * from './NotificationsApi';
|
|
21
22
|
export * from './RateAdjustmentsApi';
|
package/dist/esm/apis/index.js
CHANGED
|
@@ -18,6 +18,7 @@ export * from './ConsumersApi';
|
|
|
18
18
|
export * from './DashboardApi';
|
|
19
19
|
export * from './FieldOutagesApi';
|
|
20
20
|
export * from './FieldWorkOrdersApi';
|
|
21
|
+
export * from './ManagementDashboardApi';
|
|
21
22
|
export * from './MetersApi';
|
|
22
23
|
export * from './NotificationsApi';
|
|
23
24
|
export * from './RateAdjustmentsApi';
|
|
@@ -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 ChartDataPointDto
|
|
16
|
+
*/
|
|
17
|
+
export interface ChartDataPointDto {
|
|
18
|
+
/**
|
|
19
|
+
* X-axis label (date string or category)
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof ChartDataPointDto
|
|
22
|
+
*/
|
|
23
|
+
label: string;
|
|
24
|
+
/**
|
|
25
|
+
* Numeric value
|
|
26
|
+
* @type {number}
|
|
27
|
+
* @memberof ChartDataPointDto
|
|
28
|
+
*/
|
|
29
|
+
value: number;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Check if a given object implements the ChartDataPointDto interface.
|
|
33
|
+
*/
|
|
34
|
+
export declare function instanceOfChartDataPointDto(value: object): value is ChartDataPointDto;
|
|
35
|
+
export declare function ChartDataPointDtoFromJSON(json: any): ChartDataPointDto;
|
|
36
|
+
export declare function ChartDataPointDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): ChartDataPointDto;
|
|
37
|
+
export declare function ChartDataPointDtoToJSON(json: any): ChartDataPointDto;
|
|
38
|
+
export declare function ChartDataPointDtoToJSONTyped(value?: ChartDataPointDto | 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 ChartDataPointDto interface.
|
|
16
|
+
*/
|
|
17
|
+
export function instanceOfChartDataPointDto(value) {
|
|
18
|
+
if (!('label' in value) || value['label'] === undefined)
|
|
19
|
+
return false;
|
|
20
|
+
if (!('value' in value) || value['value'] === undefined)
|
|
21
|
+
return false;
|
|
22
|
+
return true;
|
|
23
|
+
}
|
|
24
|
+
export function ChartDataPointDtoFromJSON(json) {
|
|
25
|
+
return ChartDataPointDtoFromJSONTyped(json, false);
|
|
26
|
+
}
|
|
27
|
+
export function ChartDataPointDtoFromJSONTyped(json, ignoreDiscriminator) {
|
|
28
|
+
if (json == null) {
|
|
29
|
+
return json;
|
|
30
|
+
}
|
|
31
|
+
return {
|
|
32
|
+
'label': json['label'],
|
|
33
|
+
'value': json['value'],
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
export function ChartDataPointDtoToJSON(json) {
|
|
37
|
+
return ChartDataPointDtoToJSONTyped(json, false);
|
|
38
|
+
}
|
|
39
|
+
export function ChartDataPointDtoToJSONTyped(value, ignoreDiscriminator = false) {
|
|
40
|
+
if (value == null) {
|
|
41
|
+
return value;
|
|
42
|
+
}
|
|
43
|
+
return {
|
|
44
|
+
'label': value['label'],
|
|
45
|
+
'value': value['value'],
|
|
46
|
+
};
|
|
47
|
+
}
|