electric-coop-api 0.1.77 → 0.1.78
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +3 -13
- package/README.md +2 -2
- package/dist/apis/AdminNotificationsApi.d.ts +99 -5
- package/dist/apis/AdminNotificationsApi.js +149 -2
- package/dist/apis/index.d.ts +0 -2
- package/dist/apis/index.js +0 -2
- package/dist/esm/apis/AdminNotificationsApi.d.ts +99 -5
- package/dist/esm/apis/AdminNotificationsApi.js +150 -3
- package/dist/esm/apis/index.d.ts +0 -2
- package/dist/esm/apis/index.js +0 -2
- package/dist/esm/models/AdminNotificationMarkedAsRead.d.ts +45 -0
- package/dist/esm/models/{RatesSuccessResponse.js → AdminNotificationMarkedAsRead.js} +11 -11
- package/dist/esm/models/AdminNotificationUnreadCount.d.ts +45 -0
- package/dist/esm/models/{RateAdjustmentsSuccessResponse.js → AdminNotificationUnreadCount.js} +11 -11
- package/dist/esm/models/AuditLogEntityTypeEnum.d.ts +1 -0
- package/dist/esm/models/AuditLogEntityTypeEnum.js +1 -0
- package/dist/esm/models/NotificationTypeEnum.d.ts +5 -0
- package/dist/esm/models/NotificationTypeEnum.js +6 -1
- package/dist/esm/models/PaginatedAdminNotifications.d.ts +52 -0
- package/dist/esm/models/PaginatedAdminNotifications.js +55 -0
- package/dist/esm/models/index.d.ts +3 -11
- package/dist/esm/models/index.js +3 -11
- package/dist/models/AdminNotificationMarkedAsRead.d.ts +45 -0
- package/dist/models/AdminNotificationMarkedAsRead.js +57 -0
- package/dist/models/AdminNotificationUnreadCount.d.ts +45 -0
- package/dist/models/AdminNotificationUnreadCount.js +57 -0
- package/dist/models/AuditLogEntityTypeEnum.d.ts +1 -0
- package/dist/models/AuditLogEntityTypeEnum.js +1 -0
- package/dist/models/NotificationTypeEnum.d.ts +5 -0
- package/dist/models/NotificationTypeEnum.js +6 -1
- package/dist/models/PaginatedAdminNotifications.d.ts +52 -0
- package/dist/models/PaginatedAdminNotifications.js +62 -0
- package/dist/models/index.d.ts +3 -11
- package/dist/models/index.js +3 -11
- package/package.json +1 -1
- package/src/apis/AdminNotificationsApi.ts +256 -4
- package/src/apis/index.ts +0 -2
- package/src/models/AdminNotificationMarkedAsRead.ts +91 -0
- package/src/models/AdminNotificationUnreadCount.ts +91 -0
- package/src/models/AuditLogEntityTypeEnum.ts +1 -0
- package/src/models/NotificationTypeEnum.ts +6 -1
- package/src/models/PaginatedAdminNotifications.ts +107 -0
- package/src/models/index.ts +3 -11
- package/dist/apis/RateAdjustmentsApi.d.ts +0 -150
- package/dist/apis/RateAdjustmentsApi.js +0 -227
- package/dist/apis/RatesApi.d.ts +0 -94
- package/dist/apis/RatesApi.js +0 -140
- package/dist/esm/apis/RateAdjustmentsApi.d.ts +0 -150
- package/dist/esm/apis/RateAdjustmentsApi.js +0 -223
- package/dist/esm/apis/RatesApi.d.ts +0 -94
- package/dist/esm/apis/RatesApi.js +0 -136
- package/dist/esm/models/ApproveRateAdjustmentDto.d.ts +0 -32
- package/dist/esm/models/ApproveRateAdjustmentDto.js +0 -41
- package/dist/esm/models/CreateRateAdjustmentDto.d.ts +0 -52
- package/dist/esm/models/CreateRateAdjustmentDto.js +0 -57
- package/dist/esm/models/Rate.d.ts +0 -172
- package/dist/esm/models/Rate.js +0 -135
- package/dist/esm/models/RateAdjustment.d.ts +0 -143
- package/dist/esm/models/RateAdjustment.js +0 -100
- package/dist/esm/models/RateAdjustmentChargeDto.d.ts +0 -45
- package/dist/esm/models/RateAdjustmentChargeDto.js +0 -52
- package/dist/esm/models/RateAdjustmentStatusEnum.d.ts +0 -27
- package/dist/esm/models/RateAdjustmentStatusEnum.js +0 -45
- package/dist/esm/models/RateAdjustmentsSuccessResponse.d.ts +0 -45
- package/dist/esm/models/RateChargeTypeEnum.d.ts +0 -40
- package/dist/esm/models/RateChargeTypeEnum.js +0 -58
- package/dist/esm/models/RateStatusEnum.d.ts +0 -26
- package/dist/esm/models/RateStatusEnum.js +0 -44
- package/dist/esm/models/RatesSuccessResponse.d.ts +0 -45
- package/dist/esm/models/RejectRateAdjustmentDto.d.ts +0 -32
- package/dist/esm/models/RejectRateAdjustmentDto.js +0 -43
- package/dist/models/ApproveRateAdjustmentDto.d.ts +0 -32
- package/dist/models/ApproveRateAdjustmentDto.js +0 -48
- package/dist/models/CreateRateAdjustmentDto.d.ts +0 -52
- package/dist/models/CreateRateAdjustmentDto.js +0 -64
- package/dist/models/Rate.d.ts +0 -172
- package/dist/models/Rate.js +0 -142
- package/dist/models/RateAdjustment.d.ts +0 -143
- package/dist/models/RateAdjustment.js +0 -107
- package/dist/models/RateAdjustmentChargeDto.d.ts +0 -45
- package/dist/models/RateAdjustmentChargeDto.js +0 -59
- package/dist/models/RateAdjustmentStatusEnum.d.ts +0 -27
- package/dist/models/RateAdjustmentStatusEnum.js +0 -53
- package/dist/models/RateAdjustmentsSuccessResponse.d.ts +0 -45
- package/dist/models/RateAdjustmentsSuccessResponse.js +0 -57
- package/dist/models/RateChargeTypeEnum.d.ts +0 -40
- package/dist/models/RateChargeTypeEnum.js +0 -66
- package/dist/models/RateStatusEnum.d.ts +0 -26
- package/dist/models/RateStatusEnum.js +0 -52
- package/dist/models/RatesSuccessResponse.d.ts +0 -45
- package/dist/models/RatesSuccessResponse.js +0 -57
- package/dist/models/RejectRateAdjustmentDto.d.ts +0 -32
- package/dist/models/RejectRateAdjustmentDto.js +0 -50
- package/src/apis/RateAdjustmentsApi.ts +0 -395
- package/src/apis/RatesApi.ts +0 -224
- package/src/models/ApproveRateAdjustmentDto.ts +0 -65
- package/src/models/CreateRateAdjustmentDto.ts +0 -110
- package/src/models/Rate.ts +0 -289
- package/src/models/RateAdjustment.ts +0 -243
- package/src/models/RateAdjustmentChargeDto.ts +0 -94
- package/src/models/RateAdjustmentStatusEnum.ts +0 -55
- package/src/models/RateAdjustmentsSuccessResponse.ts +0 -91
- package/src/models/RateChargeTypeEnum.ts +0 -68
- package/src/models/RateStatusEnum.ts +0 -54
- package/src/models/RatesSuccessResponse.ts +0 -91
- package/src/models/RejectRateAdjustmentDto.ts +0 -66
|
@@ -21,13 +21,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
21
21
|
});
|
|
22
22
|
};
|
|
23
23
|
import * as runtime from '../runtime';
|
|
24
|
-
import { AdminSendNotificationDtoToJSON, AdminSendNotificationResponseFromJSON, } from '../models/index';
|
|
24
|
+
import { AdminNotificationMarkedAsReadFromJSON, AdminNotificationUnreadCountFromJSON, AdminSendNotificationDtoToJSON, AdminSendNotificationResponseFromJSON, PaginatedAdminNotificationsFromJSON, } from '../models/index';
|
|
25
25
|
/**
|
|
26
26
|
*
|
|
27
27
|
*/
|
|
28
28
|
export class AdminNotificationsApi extends runtime.BaseAPI {
|
|
29
29
|
/**
|
|
30
|
-
*
|
|
30
|
+
* Broadcast a notification to admins, consumers or a specific user
|
|
31
31
|
*/
|
|
32
32
|
adminSendNotificationRaw(requestParameters, initOverrides) {
|
|
33
33
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -56,7 +56,7 @@ export class AdminNotificationsApi extends runtime.BaseAPI {
|
|
|
56
56
|
});
|
|
57
57
|
}
|
|
58
58
|
/**
|
|
59
|
-
*
|
|
59
|
+
* Broadcast a notification to admins, consumers or a specific user
|
|
60
60
|
*/
|
|
61
61
|
adminSendNotification(requestParameters, initOverrides) {
|
|
62
62
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -64,4 +64,151 @@ export class AdminNotificationsApi extends runtime.BaseAPI {
|
|
|
64
64
|
return yield response.value();
|
|
65
65
|
});
|
|
66
66
|
}
|
|
67
|
+
/**
|
|
68
|
+
* List admin notifications (paginated)
|
|
69
|
+
*/
|
|
70
|
+
getAdminNotificationsRaw(requestParameters, initOverrides) {
|
|
71
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
72
|
+
const queryParameters = {};
|
|
73
|
+
if (requestParameters['page'] != null) {
|
|
74
|
+
queryParameters['page'] = requestParameters['page'];
|
|
75
|
+
}
|
|
76
|
+
if (requestParameters['limit'] != null) {
|
|
77
|
+
queryParameters['limit'] = requestParameters['limit'];
|
|
78
|
+
}
|
|
79
|
+
if (requestParameters['search'] != null) {
|
|
80
|
+
queryParameters['search'] = requestParameters['search'];
|
|
81
|
+
}
|
|
82
|
+
if (requestParameters['unreadOnly'] != null) {
|
|
83
|
+
queryParameters['unreadOnly'] = requestParameters['unreadOnly'];
|
|
84
|
+
}
|
|
85
|
+
const headerParameters = {};
|
|
86
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
87
|
+
const token = this.configuration.accessToken;
|
|
88
|
+
const tokenString = yield token("bearer", []);
|
|
89
|
+
if (tokenString) {
|
|
90
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
let urlPath = `/api/v1/admin/notifications`;
|
|
94
|
+
const response = yield this.request({
|
|
95
|
+
path: urlPath,
|
|
96
|
+
method: 'GET',
|
|
97
|
+
headers: headerParameters,
|
|
98
|
+
query: queryParameters,
|
|
99
|
+
}, initOverrides);
|
|
100
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedAdminNotificationsFromJSON(jsonValue));
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* List admin notifications (paginated)
|
|
105
|
+
*/
|
|
106
|
+
getAdminNotifications() {
|
|
107
|
+
return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
|
|
108
|
+
const response = yield this.getAdminNotificationsRaw(requestParameters, initOverrides);
|
|
109
|
+
return yield response.value();
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Get unread admin notification count
|
|
114
|
+
*/
|
|
115
|
+
getAdminUnreadNotificationCountRaw(initOverrides) {
|
|
116
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
117
|
+
const queryParameters = {};
|
|
118
|
+
const headerParameters = {};
|
|
119
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
120
|
+
const token = this.configuration.accessToken;
|
|
121
|
+
const tokenString = yield token("bearer", []);
|
|
122
|
+
if (tokenString) {
|
|
123
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
let urlPath = `/api/v1/admin/notifications/unread-count`;
|
|
127
|
+
const response = yield this.request({
|
|
128
|
+
path: urlPath,
|
|
129
|
+
method: 'GET',
|
|
130
|
+
headers: headerParameters,
|
|
131
|
+
query: queryParameters,
|
|
132
|
+
}, initOverrides);
|
|
133
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => AdminNotificationUnreadCountFromJSON(jsonValue));
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Get unread admin notification count
|
|
138
|
+
*/
|
|
139
|
+
getAdminUnreadNotificationCount(initOverrides) {
|
|
140
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
141
|
+
const response = yield this.getAdminUnreadNotificationCountRaw(initOverrides);
|
|
142
|
+
return yield response.value();
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Mark admin notification as read
|
|
147
|
+
*/
|
|
148
|
+
markAdminNotificationReadRaw(requestParameters, initOverrides) {
|
|
149
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
150
|
+
if (requestParameters['id'] == null) {
|
|
151
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling markAdminNotificationRead().');
|
|
152
|
+
}
|
|
153
|
+
const queryParameters = {};
|
|
154
|
+
const headerParameters = {};
|
|
155
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
156
|
+
const token = this.configuration.accessToken;
|
|
157
|
+
const tokenString = yield token("bearer", []);
|
|
158
|
+
if (tokenString) {
|
|
159
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
let urlPath = `/api/v1/admin/notifications/{id}/read`;
|
|
163
|
+
urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
|
|
164
|
+
const response = yield this.request({
|
|
165
|
+
path: urlPath,
|
|
166
|
+
method: 'PATCH',
|
|
167
|
+
headers: headerParameters,
|
|
168
|
+
query: queryParameters,
|
|
169
|
+
}, initOverrides);
|
|
170
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => AdminNotificationMarkedAsReadFromJSON(jsonValue));
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* Mark admin notification as read
|
|
175
|
+
*/
|
|
176
|
+
markAdminNotificationRead(requestParameters, initOverrides) {
|
|
177
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
178
|
+
const response = yield this.markAdminNotificationReadRaw(requestParameters, initOverrides);
|
|
179
|
+
return yield response.value();
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* Mark all admin notifications as read
|
|
184
|
+
*/
|
|
185
|
+
markAllAdminNotificationsReadRaw(initOverrides) {
|
|
186
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
187
|
+
const queryParameters = {};
|
|
188
|
+
const headerParameters = {};
|
|
189
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
190
|
+
const token = this.configuration.accessToken;
|
|
191
|
+
const tokenString = yield token("bearer", []);
|
|
192
|
+
if (tokenString) {
|
|
193
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
let urlPath = `/api/v1/admin/notifications/mark-all-read`;
|
|
197
|
+
const response = yield this.request({
|
|
198
|
+
path: urlPath,
|
|
199
|
+
method: 'PATCH',
|
|
200
|
+
headers: headerParameters,
|
|
201
|
+
query: queryParameters,
|
|
202
|
+
}, initOverrides);
|
|
203
|
+
return new runtime.VoidApiResponse(response);
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* Mark all admin notifications as read
|
|
208
|
+
*/
|
|
209
|
+
markAllAdminNotificationsRead(initOverrides) {
|
|
210
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
211
|
+
yield this.markAllAdminNotificationsReadRaw(initOverrides);
|
|
212
|
+
});
|
|
213
|
+
}
|
|
67
214
|
}
|
package/dist/esm/apis/index.d.ts
CHANGED
|
@@ -19,9 +19,7 @@ export * from './FieldWorkOrdersApi';
|
|
|
19
19
|
export * from './ManagementDashboardApi';
|
|
20
20
|
export * from './MetersApi';
|
|
21
21
|
export * from './NotificationsApi';
|
|
22
|
-
export * from './RateAdjustmentsApi';
|
|
23
22
|
export * from './RateDisplayApi';
|
|
24
|
-
export * from './RatesApi';
|
|
25
23
|
export * from './ReportsApi';
|
|
26
24
|
export * from './SettingsApi';
|
|
27
25
|
export * from './UsersApi';
|
package/dist/esm/apis/index.js
CHANGED
|
@@ -21,9 +21,7 @@ export * from './FieldWorkOrdersApi';
|
|
|
21
21
|
export * from './ManagementDashboardApi';
|
|
22
22
|
export * from './MetersApi';
|
|
23
23
|
export * from './NotificationsApi';
|
|
24
|
-
export * from './RateAdjustmentsApi';
|
|
25
24
|
export * from './RateDisplayApi';
|
|
26
|
-
export * from './RatesApi';
|
|
27
25
|
export * from './ReportsApi';
|
|
28
26
|
export * from './SettingsApi';
|
|
29
27
|
export * from './UsersApi';
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Electric Cooperative Consumer Portal API
|
|
3
|
+
* Multi-tenant SaaS platform for Philippine electric cooperatives
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { Notification } from './Notification';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface AdminNotificationMarkedAsRead
|
|
17
|
+
*/
|
|
18
|
+
export interface AdminNotificationMarkedAsRead {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {boolean}
|
|
22
|
+
* @memberof AdminNotificationMarkedAsRead
|
|
23
|
+
*/
|
|
24
|
+
success: boolean;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {string}
|
|
28
|
+
* @memberof AdminNotificationMarkedAsRead
|
|
29
|
+
*/
|
|
30
|
+
error?: string;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @type {Notification}
|
|
34
|
+
* @memberof AdminNotificationMarkedAsRead
|
|
35
|
+
*/
|
|
36
|
+
data: Notification;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Check if a given object implements the AdminNotificationMarkedAsRead interface.
|
|
40
|
+
*/
|
|
41
|
+
export declare function instanceOfAdminNotificationMarkedAsRead(value: object): value is AdminNotificationMarkedAsRead;
|
|
42
|
+
export declare function AdminNotificationMarkedAsReadFromJSON(json: any): AdminNotificationMarkedAsRead;
|
|
43
|
+
export declare function AdminNotificationMarkedAsReadFromJSONTyped(json: any, ignoreDiscriminator: boolean): AdminNotificationMarkedAsRead;
|
|
44
|
+
export declare function AdminNotificationMarkedAsReadToJSON(json: any): AdminNotificationMarkedAsRead;
|
|
45
|
+
export declare function AdminNotificationMarkedAsReadToJSONTyped(value?: AdminNotificationMarkedAsRead | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -11,40 +11,40 @@
|
|
|
11
11
|
* https://openapi-generator.tech
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
|
-
import {
|
|
14
|
+
import { NotificationFromJSON, NotificationToJSON, } from './Notification';
|
|
15
15
|
/**
|
|
16
|
-
* Check if a given object implements the
|
|
16
|
+
* Check if a given object implements the AdminNotificationMarkedAsRead interface.
|
|
17
17
|
*/
|
|
18
|
-
export function
|
|
18
|
+
export function instanceOfAdminNotificationMarkedAsRead(value) {
|
|
19
19
|
if (!('success' in value) || value['success'] === undefined)
|
|
20
20
|
return false;
|
|
21
21
|
if (!('data' in value) || value['data'] === undefined)
|
|
22
22
|
return false;
|
|
23
23
|
return true;
|
|
24
24
|
}
|
|
25
|
-
export function
|
|
26
|
-
return
|
|
25
|
+
export function AdminNotificationMarkedAsReadFromJSON(json) {
|
|
26
|
+
return AdminNotificationMarkedAsReadFromJSONTyped(json, false);
|
|
27
27
|
}
|
|
28
|
-
export function
|
|
28
|
+
export function AdminNotificationMarkedAsReadFromJSONTyped(json, ignoreDiscriminator) {
|
|
29
29
|
if (json == null) {
|
|
30
30
|
return json;
|
|
31
31
|
}
|
|
32
32
|
return {
|
|
33
33
|
'success': json['success'],
|
|
34
34
|
'error': json['error'] == null ? undefined : json['error'],
|
|
35
|
-
'data':
|
|
35
|
+
'data': NotificationFromJSON(json['data']),
|
|
36
36
|
};
|
|
37
37
|
}
|
|
38
|
-
export function
|
|
39
|
-
return
|
|
38
|
+
export function AdminNotificationMarkedAsReadToJSON(json) {
|
|
39
|
+
return AdminNotificationMarkedAsReadToJSONTyped(json, false);
|
|
40
40
|
}
|
|
41
|
-
export function
|
|
41
|
+
export function AdminNotificationMarkedAsReadToJSONTyped(value, ignoreDiscriminator = false) {
|
|
42
42
|
if (value == null) {
|
|
43
43
|
return value;
|
|
44
44
|
}
|
|
45
45
|
return {
|
|
46
46
|
'success': value['success'],
|
|
47
47
|
'error': value['error'],
|
|
48
|
-
'data':
|
|
48
|
+
'data': NotificationToJSON(value['data']),
|
|
49
49
|
};
|
|
50
50
|
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Electric Cooperative Consumer Portal API
|
|
3
|
+
* Multi-tenant SaaS platform for Philippine electric cooperatives
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { NotificationUnreadCountResponseDto } from './NotificationUnreadCountResponseDto';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface AdminNotificationUnreadCount
|
|
17
|
+
*/
|
|
18
|
+
export interface AdminNotificationUnreadCount {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {boolean}
|
|
22
|
+
* @memberof AdminNotificationUnreadCount
|
|
23
|
+
*/
|
|
24
|
+
success: boolean;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {string}
|
|
28
|
+
* @memberof AdminNotificationUnreadCount
|
|
29
|
+
*/
|
|
30
|
+
error?: string;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @type {NotificationUnreadCountResponseDto}
|
|
34
|
+
* @memberof AdminNotificationUnreadCount
|
|
35
|
+
*/
|
|
36
|
+
data: NotificationUnreadCountResponseDto;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Check if a given object implements the AdminNotificationUnreadCount interface.
|
|
40
|
+
*/
|
|
41
|
+
export declare function instanceOfAdminNotificationUnreadCount(value: object): value is AdminNotificationUnreadCount;
|
|
42
|
+
export declare function AdminNotificationUnreadCountFromJSON(json: any): AdminNotificationUnreadCount;
|
|
43
|
+
export declare function AdminNotificationUnreadCountFromJSONTyped(json: any, ignoreDiscriminator: boolean): AdminNotificationUnreadCount;
|
|
44
|
+
export declare function AdminNotificationUnreadCountToJSON(json: any): AdminNotificationUnreadCount;
|
|
45
|
+
export declare function AdminNotificationUnreadCountToJSONTyped(value?: AdminNotificationUnreadCount | null, ignoreDiscriminator?: boolean): any;
|
package/dist/esm/models/{RateAdjustmentsSuccessResponse.js → AdminNotificationUnreadCount.js}
RENAMED
|
@@ -11,40 +11,40 @@
|
|
|
11
11
|
* https://openapi-generator.tech
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
|
-
import {
|
|
14
|
+
import { NotificationUnreadCountResponseDtoFromJSON, NotificationUnreadCountResponseDtoToJSON, } from './NotificationUnreadCountResponseDto';
|
|
15
15
|
/**
|
|
16
|
-
* Check if a given object implements the
|
|
16
|
+
* Check if a given object implements the AdminNotificationUnreadCount interface.
|
|
17
17
|
*/
|
|
18
|
-
export function
|
|
18
|
+
export function instanceOfAdminNotificationUnreadCount(value) {
|
|
19
19
|
if (!('success' in value) || value['success'] === undefined)
|
|
20
20
|
return false;
|
|
21
21
|
if (!('data' in value) || value['data'] === undefined)
|
|
22
22
|
return false;
|
|
23
23
|
return true;
|
|
24
24
|
}
|
|
25
|
-
export function
|
|
26
|
-
return
|
|
25
|
+
export function AdminNotificationUnreadCountFromJSON(json) {
|
|
26
|
+
return AdminNotificationUnreadCountFromJSONTyped(json, false);
|
|
27
27
|
}
|
|
28
|
-
export function
|
|
28
|
+
export function AdminNotificationUnreadCountFromJSONTyped(json, ignoreDiscriminator) {
|
|
29
29
|
if (json == null) {
|
|
30
30
|
return json;
|
|
31
31
|
}
|
|
32
32
|
return {
|
|
33
33
|
'success': json['success'],
|
|
34
34
|
'error': json['error'] == null ? undefined : json['error'],
|
|
35
|
-
'data': (json['data']
|
|
35
|
+
'data': NotificationUnreadCountResponseDtoFromJSON(json['data']),
|
|
36
36
|
};
|
|
37
37
|
}
|
|
38
|
-
export function
|
|
39
|
-
return
|
|
38
|
+
export function AdminNotificationUnreadCountToJSON(json) {
|
|
39
|
+
return AdminNotificationUnreadCountToJSONTyped(json, false);
|
|
40
40
|
}
|
|
41
|
-
export function
|
|
41
|
+
export function AdminNotificationUnreadCountToJSONTyped(value, ignoreDiscriminator = false) {
|
|
42
42
|
if (value == null) {
|
|
43
43
|
return value;
|
|
44
44
|
}
|
|
45
45
|
return {
|
|
46
46
|
'success': value['success'],
|
|
47
47
|
'error': value['error'],
|
|
48
|
-
'data': (value['data']
|
|
48
|
+
'data': NotificationUnreadCountResponseDtoToJSON(value['data']),
|
|
49
49
|
};
|
|
50
50
|
}
|
|
@@ -22,6 +22,7 @@ export declare const AuditLogEntityTypeEnum: {
|
|
|
22
22
|
readonly Complaint: "complaint";
|
|
23
23
|
readonly Consumer: "consumer";
|
|
24
24
|
readonly RateAdjustment: "rate_adjustment";
|
|
25
|
+
readonly RateDisplay: "rate_display";
|
|
25
26
|
readonly Bill: "bill";
|
|
26
27
|
readonly Settings: "settings";
|
|
27
28
|
};
|
|
@@ -17,6 +17,11 @@ export declare const NotificationTypeEnum: {
|
|
|
17
17
|
readonly Bill: "bill";
|
|
18
18
|
readonly Complaint: "complaint";
|
|
19
19
|
readonly System: "system";
|
|
20
|
+
readonly ServiceRequest: "service_request";
|
|
21
|
+
readonly WorkOrder: "work_order";
|
|
22
|
+
readonly Outage: "outage";
|
|
23
|
+
readonly Payment: "payment";
|
|
24
|
+
readonly MeterReading: "meter_reading";
|
|
20
25
|
};
|
|
21
26
|
export type NotificationTypeEnum = typeof NotificationTypeEnum[keyof typeof NotificationTypeEnum];
|
|
22
27
|
export declare function instanceOfNotificationTypeEnum(value: any): boolean;
|
|
@@ -18,7 +18,12 @@
|
|
|
18
18
|
export const NotificationTypeEnum = {
|
|
19
19
|
Bill: 'bill',
|
|
20
20
|
Complaint: 'complaint',
|
|
21
|
-
System: 'system'
|
|
21
|
+
System: 'system',
|
|
22
|
+
ServiceRequest: 'service_request',
|
|
23
|
+
WorkOrder: 'work_order',
|
|
24
|
+
Outage: 'outage',
|
|
25
|
+
Payment: 'payment',
|
|
26
|
+
MeterReading: 'meter_reading'
|
|
22
27
|
};
|
|
23
28
|
export function instanceOfNotificationTypeEnum(value) {
|
|
24
29
|
for (const key in NotificationTypeEnum) {
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Electric Cooperative Consumer Portal API
|
|
3
|
+
* Multi-tenant SaaS platform for Philippine electric cooperatives
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { PaginationMetaDto } from './PaginationMetaDto';
|
|
13
|
+
import type { PaginatedResponseDto } from './PaginatedResponseDto';
|
|
14
|
+
/**
|
|
15
|
+
*
|
|
16
|
+
* @export
|
|
17
|
+
* @interface PaginatedAdminNotifications
|
|
18
|
+
*/
|
|
19
|
+
export interface PaginatedAdminNotifications {
|
|
20
|
+
/**
|
|
21
|
+
*
|
|
22
|
+
* @type {boolean}
|
|
23
|
+
* @memberof PaginatedAdminNotifications
|
|
24
|
+
*/
|
|
25
|
+
success: boolean;
|
|
26
|
+
/**
|
|
27
|
+
*
|
|
28
|
+
* @type {string}
|
|
29
|
+
* @memberof PaginatedAdminNotifications
|
|
30
|
+
*/
|
|
31
|
+
error?: string;
|
|
32
|
+
/**
|
|
33
|
+
*
|
|
34
|
+
* @type {Array<PaginatedResponseDto>}
|
|
35
|
+
* @memberof PaginatedAdminNotifications
|
|
36
|
+
*/
|
|
37
|
+
data: Array<PaginatedResponseDto>;
|
|
38
|
+
/**
|
|
39
|
+
*
|
|
40
|
+
* @type {PaginationMetaDto}
|
|
41
|
+
* @memberof PaginatedAdminNotifications
|
|
42
|
+
*/
|
|
43
|
+
meta: PaginationMetaDto;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Check if a given object implements the PaginatedAdminNotifications interface.
|
|
47
|
+
*/
|
|
48
|
+
export declare function instanceOfPaginatedAdminNotifications(value: object): value is PaginatedAdminNotifications;
|
|
49
|
+
export declare function PaginatedAdminNotificationsFromJSON(json: any): PaginatedAdminNotifications;
|
|
50
|
+
export declare function PaginatedAdminNotificationsFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedAdminNotifications;
|
|
51
|
+
export declare function PaginatedAdminNotificationsToJSON(json: any): PaginatedAdminNotifications;
|
|
52
|
+
export declare function PaginatedAdminNotificationsToJSONTyped(value?: PaginatedAdminNotifications | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Electric Cooperative Consumer Portal API
|
|
5
|
+
* Multi-tenant SaaS platform for Philippine electric cooperatives
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
import { PaginationMetaDtoFromJSON, PaginationMetaDtoToJSON, } from './PaginationMetaDto';
|
|
15
|
+
import { PaginatedResponseDtoFromJSON, PaginatedResponseDtoToJSON, } from './PaginatedResponseDto';
|
|
16
|
+
/**
|
|
17
|
+
* Check if a given object implements the PaginatedAdminNotifications interface.
|
|
18
|
+
*/
|
|
19
|
+
export function instanceOfPaginatedAdminNotifications(value) {
|
|
20
|
+
if (!('success' in value) || value['success'] === undefined)
|
|
21
|
+
return false;
|
|
22
|
+
if (!('data' in value) || value['data'] === undefined)
|
|
23
|
+
return false;
|
|
24
|
+
if (!('meta' in value) || value['meta'] === undefined)
|
|
25
|
+
return false;
|
|
26
|
+
return true;
|
|
27
|
+
}
|
|
28
|
+
export function PaginatedAdminNotificationsFromJSON(json) {
|
|
29
|
+
return PaginatedAdminNotificationsFromJSONTyped(json, false);
|
|
30
|
+
}
|
|
31
|
+
export function PaginatedAdminNotificationsFromJSONTyped(json, ignoreDiscriminator) {
|
|
32
|
+
if (json == null) {
|
|
33
|
+
return json;
|
|
34
|
+
}
|
|
35
|
+
return {
|
|
36
|
+
'success': json['success'],
|
|
37
|
+
'error': json['error'] == null ? undefined : json['error'],
|
|
38
|
+
'data': (json['data'].map(PaginatedResponseDtoFromJSON)),
|
|
39
|
+
'meta': PaginationMetaDtoFromJSON(json['meta']),
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
export function PaginatedAdminNotificationsToJSON(json) {
|
|
43
|
+
return PaginatedAdminNotificationsToJSONTyped(json, false);
|
|
44
|
+
}
|
|
45
|
+
export function PaginatedAdminNotificationsToJSONTyped(value, ignoreDiscriminator = false) {
|
|
46
|
+
if (value == null) {
|
|
47
|
+
return value;
|
|
48
|
+
}
|
|
49
|
+
return {
|
|
50
|
+
'success': value['success'],
|
|
51
|
+
'error': value['error'],
|
|
52
|
+
'data': (value['data'].map(PaginatedResponseDtoToJSON)),
|
|
53
|
+
'meta': PaginationMetaDtoToJSON(value['meta']),
|
|
54
|
+
};
|
|
55
|
+
}
|
|
@@ -7,6 +7,8 @@ export * from './AdminAuditLogsPaginatedResponse';
|
|
|
7
7
|
export * from './AdminCreateServiceRequestResponse';
|
|
8
8
|
export * from './AdminCreateWorkOrderResponse';
|
|
9
9
|
export * from './AdminLoginDto';
|
|
10
|
+
export * from './AdminNotificationMarkedAsRead';
|
|
11
|
+
export * from './AdminNotificationUnreadCount';
|
|
10
12
|
export * from './AdminOutageStatsResponse';
|
|
11
13
|
export * from './AdminOutagesPaginatedResponse';
|
|
12
14
|
export * from './AdminSendNotificationDto';
|
|
@@ -22,7 +24,6 @@ export * from './AdminWorkOrdersPaginatedResponse';
|
|
|
22
24
|
export * from './AnnualMonthSummaryDto';
|
|
23
25
|
export * from './AnnualSummaryReportDto';
|
|
24
26
|
export * from './AnnualSummaryReportSuccessResponse';
|
|
25
|
-
export * from './ApproveRateAdjustmentDto';
|
|
26
27
|
export * from './AssignWorkOrderDto';
|
|
27
28
|
export * from './AuditLog';
|
|
28
29
|
export * from './AuditLogActionsResponseDto';
|
|
@@ -81,7 +82,6 @@ export * from './CreateBillDto';
|
|
|
81
82
|
export * from './CreateConsumerAccountDto';
|
|
82
83
|
export * from './CreateConsumerDto';
|
|
83
84
|
export * from './CreateOutageDto';
|
|
84
|
-
export * from './CreateRateAdjustmentDto';
|
|
85
85
|
export * from './CreateRateDisplayVersionDto';
|
|
86
86
|
export * from './CreateServiceRequestDto';
|
|
87
87
|
export * from './CreateUserDto';
|
|
@@ -131,6 +131,7 @@ export * from './OutageSeverityEnum';
|
|
|
131
131
|
export * from './OutageStatsDto';
|
|
132
132
|
export * from './OutageStatusEnum';
|
|
133
133
|
export * from './OutagesSuccessResponse';
|
|
134
|
+
export * from './PaginatedAdminNotifications';
|
|
134
135
|
export * from './PaginatedNotifications';
|
|
135
136
|
export * from './PaginatedResponseDto';
|
|
136
137
|
export * from './PaginationMetaDto';
|
|
@@ -138,27 +139,18 @@ export * from './PerformanceReportSuccessResponse';
|
|
|
138
139
|
export * from './PickTypeClass';
|
|
139
140
|
export * from './PreviewBillDto';
|
|
140
141
|
export * from './PreviewMeterReadingDto';
|
|
141
|
-
export * from './Rate';
|
|
142
|
-
export * from './RateAdjustment';
|
|
143
|
-
export * from './RateAdjustmentChargeDto';
|
|
144
|
-
export * from './RateAdjustmentStatusEnum';
|
|
145
|
-
export * from './RateAdjustmentsSuccessResponse';
|
|
146
142
|
export * from './RateCategoryDto';
|
|
147
143
|
export * from './RateChargeDto';
|
|
148
|
-
export * from './RateChargeTypeEnum';
|
|
149
144
|
export * from './RateDisplay';
|
|
150
145
|
export * from './RateDisplayStructureDto';
|
|
151
146
|
export * from './RateDisplayStructureResponse';
|
|
152
147
|
export * from './RateDisplayVersionResponse';
|
|
153
148
|
export * from './RateDisplaysSuccessResponse';
|
|
154
149
|
export * from './RateSectionDto';
|
|
155
|
-
export * from './RateStatusEnum';
|
|
156
|
-
export * from './RatesSuccessResponse';
|
|
157
150
|
export * from './ReadingHistoryItemDto';
|
|
158
151
|
export * from './RefreshTokenDto';
|
|
159
152
|
export * from './RefreshTokenResponse';
|
|
160
153
|
export * from './RefreshTokenResponseDto';
|
|
161
|
-
export * from './RejectRateAdjustmentDto';
|
|
162
154
|
export * from './ResourceEnum';
|
|
163
155
|
export * from './RevenueByStatusDto';
|
|
164
156
|
export * from './RevenueReportDto';
|
package/dist/esm/models/index.js
CHANGED
|
@@ -9,6 +9,8 @@ export * from './AdminAuditLogsPaginatedResponse';
|
|
|
9
9
|
export * from './AdminCreateServiceRequestResponse';
|
|
10
10
|
export * from './AdminCreateWorkOrderResponse';
|
|
11
11
|
export * from './AdminLoginDto';
|
|
12
|
+
export * from './AdminNotificationMarkedAsRead';
|
|
13
|
+
export * from './AdminNotificationUnreadCount';
|
|
12
14
|
export * from './AdminOutageStatsResponse';
|
|
13
15
|
export * from './AdminOutagesPaginatedResponse';
|
|
14
16
|
export * from './AdminSendNotificationDto';
|
|
@@ -24,7 +26,6 @@ export * from './AdminWorkOrdersPaginatedResponse';
|
|
|
24
26
|
export * from './AnnualMonthSummaryDto';
|
|
25
27
|
export * from './AnnualSummaryReportDto';
|
|
26
28
|
export * from './AnnualSummaryReportSuccessResponse';
|
|
27
|
-
export * from './ApproveRateAdjustmentDto';
|
|
28
29
|
export * from './AssignWorkOrderDto';
|
|
29
30
|
export * from './AuditLog';
|
|
30
31
|
export * from './AuditLogActionsResponseDto';
|
|
@@ -83,7 +84,6 @@ export * from './CreateBillDto';
|
|
|
83
84
|
export * from './CreateConsumerAccountDto';
|
|
84
85
|
export * from './CreateConsumerDto';
|
|
85
86
|
export * from './CreateOutageDto';
|
|
86
|
-
export * from './CreateRateAdjustmentDto';
|
|
87
87
|
export * from './CreateRateDisplayVersionDto';
|
|
88
88
|
export * from './CreateServiceRequestDto';
|
|
89
89
|
export * from './CreateUserDto';
|
|
@@ -133,6 +133,7 @@ export * from './OutageSeverityEnum';
|
|
|
133
133
|
export * from './OutageStatsDto';
|
|
134
134
|
export * from './OutageStatusEnum';
|
|
135
135
|
export * from './OutagesSuccessResponse';
|
|
136
|
+
export * from './PaginatedAdminNotifications';
|
|
136
137
|
export * from './PaginatedNotifications';
|
|
137
138
|
export * from './PaginatedResponseDto';
|
|
138
139
|
export * from './PaginationMetaDto';
|
|
@@ -140,27 +141,18 @@ export * from './PerformanceReportSuccessResponse';
|
|
|
140
141
|
export * from './PickTypeClass';
|
|
141
142
|
export * from './PreviewBillDto';
|
|
142
143
|
export * from './PreviewMeterReadingDto';
|
|
143
|
-
export * from './Rate';
|
|
144
|
-
export * from './RateAdjustment';
|
|
145
|
-
export * from './RateAdjustmentChargeDto';
|
|
146
|
-
export * from './RateAdjustmentStatusEnum';
|
|
147
|
-
export * from './RateAdjustmentsSuccessResponse';
|
|
148
144
|
export * from './RateCategoryDto';
|
|
149
145
|
export * from './RateChargeDto';
|
|
150
|
-
export * from './RateChargeTypeEnum';
|
|
151
146
|
export * from './RateDisplay';
|
|
152
147
|
export * from './RateDisplayStructureDto';
|
|
153
148
|
export * from './RateDisplayStructureResponse';
|
|
154
149
|
export * from './RateDisplayVersionResponse';
|
|
155
150
|
export * from './RateDisplaysSuccessResponse';
|
|
156
151
|
export * from './RateSectionDto';
|
|
157
|
-
export * from './RateStatusEnum';
|
|
158
|
-
export * from './RatesSuccessResponse';
|
|
159
152
|
export * from './ReadingHistoryItemDto';
|
|
160
153
|
export * from './RefreshTokenDto';
|
|
161
154
|
export * from './RefreshTokenResponse';
|
|
162
155
|
export * from './RefreshTokenResponseDto';
|
|
163
|
-
export * from './RejectRateAdjustmentDto';
|
|
164
156
|
export * from './ResourceEnum';
|
|
165
157
|
export * from './RevenueByStatusDto';
|
|
166
158
|
export * from './RevenueReportDto';
|