electric-coop-api 0.1.49 → 0.1.52
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 +9 -0
- package/README.md +2 -2
- package/dist/apis/AdminAuditLogsApi.d.ts +84 -0
- package/dist/apis/AdminAuditLogsApi.js +123 -0
- package/dist/apis/AdminNotificationsApi.d.ts +50 -0
- package/dist/apis/AdminNotificationsApi.js +71 -0
- package/dist/apis/AdminWorkOrdersApi.d.ts +3 -1
- package/dist/apis/AdminWorkOrdersApi.js +3 -0
- package/dist/apis/index.d.ts +2 -0
- package/dist/apis/index.js +2 -0
- package/dist/esm/apis/AdminAuditLogsApi.d.ts +84 -0
- package/dist/esm/apis/AdminAuditLogsApi.js +119 -0
- package/dist/esm/apis/AdminNotificationsApi.d.ts +50 -0
- package/dist/esm/apis/AdminNotificationsApi.js +67 -0
- package/dist/esm/apis/AdminWorkOrdersApi.d.ts +3 -1
- package/dist/esm/apis/AdminWorkOrdersApi.js +3 -0
- package/dist/esm/apis/index.d.ts +2 -0
- package/dist/esm/apis/index.js +2 -0
- package/dist/esm/models/AdminAuditLogsPaginatedResponse.d.ts +52 -0
- package/dist/esm/models/AdminAuditLogsPaginatedResponse.js +55 -0
- package/dist/esm/models/AdminSendNotificationDto.d.ts +58 -0
- package/dist/esm/models/AdminSendNotificationDto.js +59 -0
- package/dist/esm/models/AdminSendNotificationResponse.d.ts +44 -0
- package/dist/esm/models/AdminSendNotificationResponse.js +49 -0
- package/dist/esm/models/AuditLog.d.ts +98 -0
- package/dist/esm/models/AuditLog.js +79 -0
- package/dist/esm/models/AuditLogEntityTypeFilterDto.d.ts +38 -0
- package/dist/esm/models/AuditLogEntityTypeFilterDto.js +47 -0
- package/dist/esm/models/AuditLogsFiltersResponseDto.d.ts +33 -0
- package/dist/esm/models/AuditLogsFiltersResponseDto.js +44 -0
- package/dist/esm/models/NotificationTargetEnum.d.ts +27 -0
- package/dist/esm/models/NotificationTargetEnum.js +45 -0
- package/dist/esm/models/UpdateWorkOrderDto.d.ts +6 -0
- package/dist/esm/models/UpdateWorkOrderDto.js +2 -0
- package/dist/esm/models/index.d.ts +7 -0
- package/dist/esm/models/index.js +7 -0
- package/dist/models/AdminAuditLogsPaginatedResponse.d.ts +52 -0
- package/dist/models/AdminAuditLogsPaginatedResponse.js +62 -0
- package/dist/models/AdminSendNotificationDto.d.ts +58 -0
- package/dist/models/AdminSendNotificationDto.js +66 -0
- package/dist/models/AdminSendNotificationResponse.d.ts +44 -0
- package/dist/models/AdminSendNotificationResponse.js +56 -0
- package/dist/models/AuditLog.d.ts +98 -0
- package/dist/models/AuditLog.js +86 -0
- package/dist/models/AuditLogEntityTypeFilterDto.d.ts +38 -0
- package/dist/models/AuditLogEntityTypeFilterDto.js +54 -0
- package/dist/models/AuditLogsFiltersResponseDto.d.ts +33 -0
- package/dist/models/AuditLogsFiltersResponseDto.js +51 -0
- package/dist/models/NotificationTargetEnum.d.ts +27 -0
- package/dist/models/NotificationTargetEnum.js +53 -0
- package/dist/models/UpdateWorkOrderDto.d.ts +6 -0
- package/dist/models/UpdateWorkOrderDto.js +2 -0
- package/dist/models/index.d.ts +7 -0
- package/dist/models/index.js +7 -0
- package/package.json +1 -1
- package/src/apis/AdminAuditLogsApi.ts +198 -0
- package/src/apis/AdminNotificationsApi.ts +111 -0
- package/src/apis/AdminWorkOrdersApi.ts +7 -1
- package/src/apis/index.ts +2 -0
- package/src/models/AdminAuditLogsPaginatedResponse.ts +107 -0
- package/src/models/AdminSendNotificationDto.ts +118 -0
- package/src/models/AdminSendNotificationResponse.ts +83 -0
- package/src/models/AuditLog.ts +161 -0
- package/src/models/AuditLogEntityTypeFilterDto.ts +75 -0
- package/src/models/AuditLogsFiltersResponseDto.ts +74 -0
- package/src/models/NotificationTargetEnum.ts +55 -0
- package/src/models/UpdateWorkOrderDto.ts +8 -0
- package/src/models/index.ts +7 -0
|
@@ -0,0 +1,198 @@
|
|
|
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
|
+
|
|
16
|
+
import * as runtime from '../runtime';
|
|
17
|
+
import type {
|
|
18
|
+
AdminAuditLogsPaginatedResponse,
|
|
19
|
+
AuditLogsFiltersResponseDto,
|
|
20
|
+
ErrorResponseDto,
|
|
21
|
+
} from '../models/index';
|
|
22
|
+
import {
|
|
23
|
+
AdminAuditLogsPaginatedResponseFromJSON,
|
|
24
|
+
AdminAuditLogsPaginatedResponseToJSON,
|
|
25
|
+
AuditLogsFiltersResponseDtoFromJSON,
|
|
26
|
+
AuditLogsFiltersResponseDtoToJSON,
|
|
27
|
+
ErrorResponseDtoFromJSON,
|
|
28
|
+
ErrorResponseDtoToJSON,
|
|
29
|
+
} from '../models/index';
|
|
30
|
+
|
|
31
|
+
export interface GetAdminAuditLogsRequest {
|
|
32
|
+
page?: number;
|
|
33
|
+
limit?: number;
|
|
34
|
+
search?: string;
|
|
35
|
+
entityType?: string;
|
|
36
|
+
action?: string;
|
|
37
|
+
userId?: string;
|
|
38
|
+
from?: string;
|
|
39
|
+
to?: string;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* AdminAuditLogsApi - interface
|
|
44
|
+
*
|
|
45
|
+
* @export
|
|
46
|
+
* @interface AdminAuditLogsApiInterface
|
|
47
|
+
*/
|
|
48
|
+
export interface AdminAuditLogsApiInterface {
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
51
|
+
* @summary List audit logs (admin)
|
|
52
|
+
* @param {number} [page]
|
|
53
|
+
* @param {number} [limit]
|
|
54
|
+
* @param {string} [search]
|
|
55
|
+
* @param {string} [entityType] outage | work_order
|
|
56
|
+
* @param {string} [action] CREATE | UPDATE | ASSIGN | STATUS_CHANGE
|
|
57
|
+
* @param {string} [userId] Filter by actor user ID
|
|
58
|
+
* @param {string} [from] From date (ISO)
|
|
59
|
+
* @param {string} [to] To date (ISO)
|
|
60
|
+
* @param {*} [options] Override http request option.
|
|
61
|
+
* @throws {RequiredError}
|
|
62
|
+
* @memberof AdminAuditLogsApiInterface
|
|
63
|
+
*/
|
|
64
|
+
getAdminAuditLogsRaw(requestParameters: GetAdminAuditLogsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdminAuditLogsPaginatedResponse>>;
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* List audit logs (admin)
|
|
68
|
+
*/
|
|
69
|
+
getAdminAuditLogs(requestParameters: GetAdminAuditLogsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminAuditLogsPaginatedResponse>;
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
*
|
|
73
|
+
* @summary Get available filter values (entity types & actions)
|
|
74
|
+
* @param {*} [options] Override http request option.
|
|
75
|
+
* @throws {RequiredError}
|
|
76
|
+
* @memberof AdminAuditLogsApiInterface
|
|
77
|
+
*/
|
|
78
|
+
getAdminAuditLogsFiltersRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AuditLogsFiltersResponseDto>>;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Get available filter values (entity types & actions)
|
|
82
|
+
*/
|
|
83
|
+
getAdminAuditLogsFilters(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AuditLogsFiltersResponseDto>;
|
|
84
|
+
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
*
|
|
89
|
+
*/
|
|
90
|
+
export class AdminAuditLogsApi extends runtime.BaseAPI implements AdminAuditLogsApiInterface {
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* List audit logs (admin)
|
|
94
|
+
*/
|
|
95
|
+
async getAdminAuditLogsRaw(requestParameters: GetAdminAuditLogsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdminAuditLogsPaginatedResponse>> {
|
|
96
|
+
const queryParameters: any = {};
|
|
97
|
+
|
|
98
|
+
if (requestParameters['page'] != null) {
|
|
99
|
+
queryParameters['page'] = requestParameters['page'];
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
if (requestParameters['limit'] != null) {
|
|
103
|
+
queryParameters['limit'] = requestParameters['limit'];
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
if (requestParameters['search'] != null) {
|
|
107
|
+
queryParameters['search'] = requestParameters['search'];
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
if (requestParameters['entityType'] != null) {
|
|
111
|
+
queryParameters['entityType'] = requestParameters['entityType'];
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
if (requestParameters['action'] != null) {
|
|
115
|
+
queryParameters['action'] = requestParameters['action'];
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
if (requestParameters['userId'] != null) {
|
|
119
|
+
queryParameters['userId'] = requestParameters['userId'];
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
if (requestParameters['from'] != null) {
|
|
123
|
+
queryParameters['from'] = requestParameters['from'];
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
if (requestParameters['to'] != null) {
|
|
127
|
+
queryParameters['to'] = requestParameters['to'];
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
131
|
+
|
|
132
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
133
|
+
const token = this.configuration.accessToken;
|
|
134
|
+
const tokenString = await token("bearer", []);
|
|
135
|
+
|
|
136
|
+
if (tokenString) {
|
|
137
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
let urlPath = `/api/v1/admin/audit-logs`;
|
|
142
|
+
|
|
143
|
+
const response = await this.request({
|
|
144
|
+
path: urlPath,
|
|
145
|
+
method: 'GET',
|
|
146
|
+
headers: headerParameters,
|
|
147
|
+
query: queryParameters,
|
|
148
|
+
}, initOverrides);
|
|
149
|
+
|
|
150
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => AdminAuditLogsPaginatedResponseFromJSON(jsonValue));
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* List audit logs (admin)
|
|
155
|
+
*/
|
|
156
|
+
async getAdminAuditLogs(requestParameters: GetAdminAuditLogsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminAuditLogsPaginatedResponse> {
|
|
157
|
+
const response = await this.getAdminAuditLogsRaw(requestParameters, initOverrides);
|
|
158
|
+
return await response.value();
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* Get available filter values (entity types & actions)
|
|
163
|
+
*/
|
|
164
|
+
async getAdminAuditLogsFiltersRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AuditLogsFiltersResponseDto>> {
|
|
165
|
+
const queryParameters: any = {};
|
|
166
|
+
|
|
167
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
168
|
+
|
|
169
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
170
|
+
const token = this.configuration.accessToken;
|
|
171
|
+
const tokenString = await token("bearer", []);
|
|
172
|
+
|
|
173
|
+
if (tokenString) {
|
|
174
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
let urlPath = `/api/v1/admin/audit-logs/filters`;
|
|
179
|
+
|
|
180
|
+
const response = await this.request({
|
|
181
|
+
path: urlPath,
|
|
182
|
+
method: 'GET',
|
|
183
|
+
headers: headerParameters,
|
|
184
|
+
query: queryParameters,
|
|
185
|
+
}, initOverrides);
|
|
186
|
+
|
|
187
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => AuditLogsFiltersResponseDtoFromJSON(jsonValue));
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* Get available filter values (entity types & actions)
|
|
192
|
+
*/
|
|
193
|
+
async getAdminAuditLogsFilters(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AuditLogsFiltersResponseDto> {
|
|
194
|
+
const response = await this.getAdminAuditLogsFiltersRaw(initOverrides);
|
|
195
|
+
return await response.value();
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
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
|
+
|
|
16
|
+
import * as runtime from '../runtime';
|
|
17
|
+
import type {
|
|
18
|
+
AdminSendNotificationDto,
|
|
19
|
+
AdminSendNotificationResponse,
|
|
20
|
+
ErrorResponseDto,
|
|
21
|
+
} from '../models/index';
|
|
22
|
+
import {
|
|
23
|
+
AdminSendNotificationDtoFromJSON,
|
|
24
|
+
AdminSendNotificationDtoToJSON,
|
|
25
|
+
AdminSendNotificationResponseFromJSON,
|
|
26
|
+
AdminSendNotificationResponseToJSON,
|
|
27
|
+
ErrorResponseDtoFromJSON,
|
|
28
|
+
ErrorResponseDtoToJSON,
|
|
29
|
+
} from '../models/index';
|
|
30
|
+
|
|
31
|
+
export interface AdminSendNotificationRequest {
|
|
32
|
+
adminSendNotificationDto: AdminSendNotificationDto;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* AdminNotificationsApi - interface
|
|
37
|
+
*
|
|
38
|
+
* @export
|
|
39
|
+
* @interface AdminNotificationsApiInterface
|
|
40
|
+
*/
|
|
41
|
+
export interface AdminNotificationsApiInterface {
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @summary Send/broadcast a notification (admin)
|
|
45
|
+
* @param {AdminSendNotificationDto} adminSendNotificationDto
|
|
46
|
+
* @param {*} [options] Override http request option.
|
|
47
|
+
* @throws {RequiredError}
|
|
48
|
+
* @memberof AdminNotificationsApiInterface
|
|
49
|
+
*/
|
|
50
|
+
adminSendNotificationRaw(requestParameters: AdminSendNotificationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdminSendNotificationResponse>>;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Send/broadcast a notification (admin)
|
|
54
|
+
*/
|
|
55
|
+
adminSendNotification(requestParameters: AdminSendNotificationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminSendNotificationResponse>;
|
|
56
|
+
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
*
|
|
61
|
+
*/
|
|
62
|
+
export class AdminNotificationsApi extends runtime.BaseAPI implements AdminNotificationsApiInterface {
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Send/broadcast a notification (admin)
|
|
66
|
+
*/
|
|
67
|
+
async adminSendNotificationRaw(requestParameters: AdminSendNotificationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdminSendNotificationResponse>> {
|
|
68
|
+
if (requestParameters['adminSendNotificationDto'] == null) {
|
|
69
|
+
throw new runtime.RequiredError(
|
|
70
|
+
'adminSendNotificationDto',
|
|
71
|
+
'Required parameter "adminSendNotificationDto" was null or undefined when calling adminSendNotification().'
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
const queryParameters: any = {};
|
|
76
|
+
|
|
77
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
78
|
+
|
|
79
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
80
|
+
|
|
81
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
82
|
+
const token = this.configuration.accessToken;
|
|
83
|
+
const tokenString = await token("bearer", []);
|
|
84
|
+
|
|
85
|
+
if (tokenString) {
|
|
86
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
let urlPath = `/api/v1/admin/notifications/send`;
|
|
91
|
+
|
|
92
|
+
const response = await this.request({
|
|
93
|
+
path: urlPath,
|
|
94
|
+
method: 'POST',
|
|
95
|
+
headers: headerParameters,
|
|
96
|
+
query: queryParameters,
|
|
97
|
+
body: AdminSendNotificationDtoToJSON(requestParameters['adminSendNotificationDto']),
|
|
98
|
+
}, initOverrides);
|
|
99
|
+
|
|
100
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => AdminSendNotificationResponseFromJSON(jsonValue));
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Send/broadcast a notification (admin)
|
|
105
|
+
*/
|
|
106
|
+
async adminSendNotification(requestParameters: AdminSendNotificationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminSendNotificationResponse> {
|
|
107
|
+
const response = await this.adminSendNotificationRaw(requestParameters, initOverrides);
|
|
108
|
+
return await response.value();
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
}
|
|
@@ -76,6 +76,7 @@ export interface GetAdminWorkOrdersRequest {
|
|
|
76
76
|
type?: WorkOrderTypeEnum;
|
|
77
77
|
assignedTo?: string;
|
|
78
78
|
consumerId?: string;
|
|
79
|
+
outageId?: string;
|
|
79
80
|
}
|
|
80
81
|
|
|
81
82
|
export interface UpdateAdminWorkOrderRequest {
|
|
@@ -155,11 +156,12 @@ export interface AdminWorkOrdersApiInterface {
|
|
|
155
156
|
* @summary List work orders (admin)
|
|
156
157
|
* @param {number} [page]
|
|
157
158
|
* @param {number} [limit]
|
|
158
|
-
* @param {string} [search]
|
|
159
|
+
* @param {string} [search] Search by work order number, title, or location
|
|
159
160
|
* @param {WorkOrderStatusEnum} [status]
|
|
160
161
|
* @param {WorkOrderTypeEnum} [type]
|
|
161
162
|
* @param {string} [assignedTo]
|
|
162
163
|
* @param {string} [consumerId]
|
|
164
|
+
* @param {string} [outageId] Filter work orders by linked outage
|
|
163
165
|
* @param {*} [options] Override http request option.
|
|
164
166
|
* @throws {RequiredError}
|
|
165
167
|
* @memberof AdminWorkOrdersApiInterface
|
|
@@ -412,6 +414,10 @@ export class AdminWorkOrdersApi extends runtime.BaseAPI implements AdminWorkOrde
|
|
|
412
414
|
queryParameters['consumerId'] = requestParameters['consumerId'];
|
|
413
415
|
}
|
|
414
416
|
|
|
417
|
+
if (requestParameters['outageId'] != null) {
|
|
418
|
+
queryParameters['outageId'] = requestParameters['outageId'];
|
|
419
|
+
}
|
|
420
|
+
|
|
415
421
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
416
422
|
|
|
417
423
|
if (this.configuration && this.configuration.accessToken) {
|
package/src/apis/index.ts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export * from './AdminApi';
|
|
4
|
+
export * from './AdminAuditLogsApi';
|
|
4
5
|
export * from './AdminAuthApi';
|
|
5
6
|
export * from './AdminBillsApi';
|
|
6
7
|
export * from './AdminComplaintsApi';
|
|
7
8
|
export * from './AdminConsumersApi';
|
|
9
|
+
export * from './AdminNotificationsApi';
|
|
8
10
|
export * from './AdminOutagesApi';
|
|
9
11
|
export * from './AdminServiceRequestsApi';
|
|
10
12
|
export * from './AdminWorkOrdersApi';
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Electric Cooperative Consumer Portal API
|
|
5
|
+
* Multi-tenant SaaS platform for Philippine electric cooperatives
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { PaginationMetaDto } from './PaginationMetaDto';
|
|
17
|
+
import {
|
|
18
|
+
PaginationMetaDtoFromJSON,
|
|
19
|
+
PaginationMetaDtoFromJSONTyped,
|
|
20
|
+
PaginationMetaDtoToJSON,
|
|
21
|
+
PaginationMetaDtoToJSONTyped,
|
|
22
|
+
} from './PaginationMetaDto';
|
|
23
|
+
import type { AuditLog } from './AuditLog';
|
|
24
|
+
import {
|
|
25
|
+
AuditLogFromJSON,
|
|
26
|
+
AuditLogFromJSONTyped,
|
|
27
|
+
AuditLogToJSON,
|
|
28
|
+
AuditLogToJSONTyped,
|
|
29
|
+
} from './AuditLog';
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @export
|
|
34
|
+
* @interface AdminAuditLogsPaginatedResponse
|
|
35
|
+
*/
|
|
36
|
+
export interface AdminAuditLogsPaginatedResponse {
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {boolean}
|
|
40
|
+
* @memberof AdminAuditLogsPaginatedResponse
|
|
41
|
+
*/
|
|
42
|
+
success: boolean;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {string}
|
|
46
|
+
* @memberof AdminAuditLogsPaginatedResponse
|
|
47
|
+
*/
|
|
48
|
+
error?: string;
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
51
|
+
* @type {Array<AuditLog>}
|
|
52
|
+
* @memberof AdminAuditLogsPaginatedResponse
|
|
53
|
+
*/
|
|
54
|
+
data: Array<AuditLog>;
|
|
55
|
+
/**
|
|
56
|
+
*
|
|
57
|
+
* @type {PaginationMetaDto}
|
|
58
|
+
* @memberof AdminAuditLogsPaginatedResponse
|
|
59
|
+
*/
|
|
60
|
+
meta: PaginationMetaDto;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Check if a given object implements the AdminAuditLogsPaginatedResponse interface.
|
|
65
|
+
*/
|
|
66
|
+
export function instanceOfAdminAuditLogsPaginatedResponse(value: object): value is AdminAuditLogsPaginatedResponse {
|
|
67
|
+
if (!('success' in value) || value['success'] === undefined) return false;
|
|
68
|
+
if (!('data' in value) || value['data'] === undefined) return false;
|
|
69
|
+
if (!('meta' in value) || value['meta'] === undefined) return false;
|
|
70
|
+
return true;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function AdminAuditLogsPaginatedResponseFromJSON(json: any): AdminAuditLogsPaginatedResponse {
|
|
74
|
+
return AdminAuditLogsPaginatedResponseFromJSONTyped(json, false);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export function AdminAuditLogsPaginatedResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): AdminAuditLogsPaginatedResponse {
|
|
78
|
+
if (json == null) {
|
|
79
|
+
return json;
|
|
80
|
+
}
|
|
81
|
+
return {
|
|
82
|
+
|
|
83
|
+
'success': json['success'],
|
|
84
|
+
'error': json['error'] == null ? undefined : json['error'],
|
|
85
|
+
'data': ((json['data'] as Array<any>).map(AuditLogFromJSON)),
|
|
86
|
+
'meta': PaginationMetaDtoFromJSON(json['meta']),
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export function AdminAuditLogsPaginatedResponseToJSON(json: any): AdminAuditLogsPaginatedResponse {
|
|
91
|
+
return AdminAuditLogsPaginatedResponseToJSONTyped(json, false);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export function AdminAuditLogsPaginatedResponseToJSONTyped(value?: AdminAuditLogsPaginatedResponse | null, ignoreDiscriminator: boolean = false): any {
|
|
95
|
+
if (value == null) {
|
|
96
|
+
return value;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
return {
|
|
100
|
+
|
|
101
|
+
'success': value['success'],
|
|
102
|
+
'error': value['error'],
|
|
103
|
+
'data': ((value['data'] as Array<any>).map(AuditLogToJSON)),
|
|
104
|
+
'meta': PaginationMetaDtoToJSON(value['meta']),
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Electric Cooperative Consumer Portal API
|
|
5
|
+
* Multi-tenant SaaS platform for Philippine electric cooperatives
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { NotificationTargetEnum } from './NotificationTargetEnum';
|
|
17
|
+
import {
|
|
18
|
+
NotificationTargetEnumFromJSON,
|
|
19
|
+
NotificationTargetEnumFromJSONTyped,
|
|
20
|
+
NotificationTargetEnumToJSON,
|
|
21
|
+
NotificationTargetEnumToJSONTyped,
|
|
22
|
+
} from './NotificationTargetEnum';
|
|
23
|
+
import type { NotificationTypeEnum } from './NotificationTypeEnum';
|
|
24
|
+
import {
|
|
25
|
+
NotificationTypeEnumFromJSON,
|
|
26
|
+
NotificationTypeEnumFromJSONTyped,
|
|
27
|
+
NotificationTypeEnumToJSON,
|
|
28
|
+
NotificationTypeEnumToJSONTyped,
|
|
29
|
+
} from './NotificationTypeEnum';
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @export
|
|
34
|
+
* @interface AdminSendNotificationDto
|
|
35
|
+
*/
|
|
36
|
+
export interface AdminSendNotificationDto {
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {string}
|
|
40
|
+
* @memberof AdminSendNotificationDto
|
|
41
|
+
*/
|
|
42
|
+
title: string;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {string}
|
|
46
|
+
* @memberof AdminSendNotificationDto
|
|
47
|
+
*/
|
|
48
|
+
message: string;
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
51
|
+
* @type {NotificationTypeEnum}
|
|
52
|
+
* @memberof AdminSendNotificationDto
|
|
53
|
+
*/
|
|
54
|
+
type: NotificationTypeEnum;
|
|
55
|
+
/**
|
|
56
|
+
* Who to send the notification to
|
|
57
|
+
* @type {NotificationTargetEnum}
|
|
58
|
+
* @memberof AdminSendNotificationDto
|
|
59
|
+
*/
|
|
60
|
+
target: NotificationTargetEnum;
|
|
61
|
+
/**
|
|
62
|
+
* Required when target is "user"
|
|
63
|
+
* @type {string}
|
|
64
|
+
* @memberof AdminSendNotificationDto
|
|
65
|
+
*/
|
|
66
|
+
userId?: string;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Check if a given object implements the AdminSendNotificationDto interface.
|
|
73
|
+
*/
|
|
74
|
+
export function instanceOfAdminSendNotificationDto(value: object): value is AdminSendNotificationDto {
|
|
75
|
+
if (!('title' in value) || value['title'] === undefined) return false;
|
|
76
|
+
if (!('message' in value) || value['message'] === undefined) return false;
|
|
77
|
+
if (!('type' in value) || value['type'] === undefined) return false;
|
|
78
|
+
if (!('target' in value) || value['target'] === undefined) return false;
|
|
79
|
+
return true;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export function AdminSendNotificationDtoFromJSON(json: any): AdminSendNotificationDto {
|
|
83
|
+
return AdminSendNotificationDtoFromJSONTyped(json, false);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export function AdminSendNotificationDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): AdminSendNotificationDto {
|
|
87
|
+
if (json == null) {
|
|
88
|
+
return json;
|
|
89
|
+
}
|
|
90
|
+
return {
|
|
91
|
+
|
|
92
|
+
'title': json['title'],
|
|
93
|
+
'message': json['message'],
|
|
94
|
+
'type': NotificationTypeEnumFromJSON(json['type']),
|
|
95
|
+
'target': NotificationTargetEnumFromJSON(json['target']),
|
|
96
|
+
'userId': json['userId'] == null ? undefined : json['userId'],
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export function AdminSendNotificationDtoToJSON(json: any): AdminSendNotificationDto {
|
|
101
|
+
return AdminSendNotificationDtoToJSONTyped(json, false);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export function AdminSendNotificationDtoToJSONTyped(value?: AdminSendNotificationDto | null, ignoreDiscriminator: boolean = false): any {
|
|
105
|
+
if (value == null) {
|
|
106
|
+
return value;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
return {
|
|
110
|
+
|
|
111
|
+
'title': value['title'],
|
|
112
|
+
'message': value['message'],
|
|
113
|
+
'type': NotificationTypeEnumToJSON(value['type']),
|
|
114
|
+
'target': NotificationTargetEnumToJSON(value['target']),
|
|
115
|
+
'userId': value['userId'],
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Electric Cooperative Consumer Portal API
|
|
5
|
+
* Multi-tenant SaaS platform for Philippine electric cooperatives
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface AdminSendNotificationResponse
|
|
20
|
+
*/
|
|
21
|
+
export interface AdminSendNotificationResponse {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {boolean}
|
|
25
|
+
* @memberof AdminSendNotificationResponse
|
|
26
|
+
*/
|
|
27
|
+
success: boolean;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof AdminSendNotificationResponse
|
|
32
|
+
*/
|
|
33
|
+
error?: string;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {object}
|
|
37
|
+
* @memberof AdminSendNotificationResponse
|
|
38
|
+
*/
|
|
39
|
+
data: object;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Check if a given object implements the AdminSendNotificationResponse interface.
|
|
44
|
+
*/
|
|
45
|
+
export function instanceOfAdminSendNotificationResponse(value: object): value is AdminSendNotificationResponse {
|
|
46
|
+
if (!('success' in value) || value['success'] === undefined) return false;
|
|
47
|
+
if (!('data' in value) || value['data'] === undefined) return false;
|
|
48
|
+
return true;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function AdminSendNotificationResponseFromJSON(json: any): AdminSendNotificationResponse {
|
|
52
|
+
return AdminSendNotificationResponseFromJSONTyped(json, false);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export function AdminSendNotificationResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): AdminSendNotificationResponse {
|
|
56
|
+
if (json == null) {
|
|
57
|
+
return json;
|
|
58
|
+
}
|
|
59
|
+
return {
|
|
60
|
+
|
|
61
|
+
'success': json['success'],
|
|
62
|
+
'error': json['error'] == null ? undefined : json['error'],
|
|
63
|
+
'data': json['data'],
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export function AdminSendNotificationResponseToJSON(json: any): AdminSendNotificationResponse {
|
|
68
|
+
return AdminSendNotificationResponseToJSONTyped(json, false);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export function AdminSendNotificationResponseToJSONTyped(value?: AdminSendNotificationResponse | null, ignoreDiscriminator: boolean = false): any {
|
|
72
|
+
if (value == null) {
|
|
73
|
+
return value;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
return {
|
|
77
|
+
|
|
78
|
+
'success': value['success'],
|
|
79
|
+
'error': value['error'],
|
|
80
|
+
'data': value['data'],
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
|