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
package/.openapi-generator/FILES
CHANGED
|
@@ -24,9 +24,7 @@ src/apis/FieldWorkOrdersApi.ts
|
|
|
24
24
|
src/apis/ManagementDashboardApi.ts
|
|
25
25
|
src/apis/MetersApi.ts
|
|
26
26
|
src/apis/NotificationsApi.ts
|
|
27
|
-
src/apis/RateAdjustmentsApi.ts
|
|
28
27
|
src/apis/RateDisplayApi.ts
|
|
29
|
-
src/apis/RatesApi.ts
|
|
30
28
|
src/apis/ReportsApi.ts
|
|
31
29
|
src/apis/SettingsApi.ts
|
|
32
30
|
src/apis/UsersApi.ts
|
|
@@ -41,6 +39,8 @@ src/models/AdminAuditLogsPaginatedResponse.ts
|
|
|
41
39
|
src/models/AdminCreateServiceRequestResponse.ts
|
|
42
40
|
src/models/AdminCreateWorkOrderResponse.ts
|
|
43
41
|
src/models/AdminLoginDto.ts
|
|
42
|
+
src/models/AdminNotificationMarkedAsRead.ts
|
|
43
|
+
src/models/AdminNotificationUnreadCount.ts
|
|
44
44
|
src/models/AdminOutageStatsResponse.ts
|
|
45
45
|
src/models/AdminOutagesPaginatedResponse.ts
|
|
46
46
|
src/models/AdminSendNotificationDto.ts
|
|
@@ -56,7 +56,6 @@ src/models/AdminWorkOrdersPaginatedResponse.ts
|
|
|
56
56
|
src/models/AnnualMonthSummaryDto.ts
|
|
57
57
|
src/models/AnnualSummaryReportDto.ts
|
|
58
58
|
src/models/AnnualSummaryReportSuccessResponse.ts
|
|
59
|
-
src/models/ApproveRateAdjustmentDto.ts
|
|
60
59
|
src/models/AssignWorkOrderDto.ts
|
|
61
60
|
src/models/AuditLog.ts
|
|
62
61
|
src/models/AuditLogActionsResponseDto.ts
|
|
@@ -115,7 +114,6 @@ src/models/CreateBillDto.ts
|
|
|
115
114
|
src/models/CreateConsumerAccountDto.ts
|
|
116
115
|
src/models/CreateConsumerDto.ts
|
|
117
116
|
src/models/CreateOutageDto.ts
|
|
118
|
-
src/models/CreateRateAdjustmentDto.ts
|
|
119
117
|
src/models/CreateRateDisplayVersionDto.ts
|
|
120
118
|
src/models/CreateServiceRequestDto.ts
|
|
121
119
|
src/models/CreateUserDto.ts
|
|
@@ -165,6 +163,7 @@ src/models/OutageSeverityEnum.ts
|
|
|
165
163
|
src/models/OutageStatsDto.ts
|
|
166
164
|
src/models/OutageStatusEnum.ts
|
|
167
165
|
src/models/OutagesSuccessResponse.ts
|
|
166
|
+
src/models/PaginatedAdminNotifications.ts
|
|
168
167
|
src/models/PaginatedNotifications.ts
|
|
169
168
|
src/models/PaginatedResponseDto.ts
|
|
170
169
|
src/models/PaginationMetaDto.ts
|
|
@@ -172,27 +171,18 @@ src/models/PerformanceReportSuccessResponse.ts
|
|
|
172
171
|
src/models/PickTypeClass.ts
|
|
173
172
|
src/models/PreviewBillDto.ts
|
|
174
173
|
src/models/PreviewMeterReadingDto.ts
|
|
175
|
-
src/models/Rate.ts
|
|
176
|
-
src/models/RateAdjustment.ts
|
|
177
|
-
src/models/RateAdjustmentChargeDto.ts
|
|
178
|
-
src/models/RateAdjustmentStatusEnum.ts
|
|
179
|
-
src/models/RateAdjustmentsSuccessResponse.ts
|
|
180
174
|
src/models/RateCategoryDto.ts
|
|
181
175
|
src/models/RateChargeDto.ts
|
|
182
|
-
src/models/RateChargeTypeEnum.ts
|
|
183
176
|
src/models/RateDisplay.ts
|
|
184
177
|
src/models/RateDisplayStructureDto.ts
|
|
185
178
|
src/models/RateDisplayStructureResponse.ts
|
|
186
179
|
src/models/RateDisplayVersionResponse.ts
|
|
187
180
|
src/models/RateDisplaysSuccessResponse.ts
|
|
188
181
|
src/models/RateSectionDto.ts
|
|
189
|
-
src/models/RateStatusEnum.ts
|
|
190
|
-
src/models/RatesSuccessResponse.ts
|
|
191
182
|
src/models/ReadingHistoryItemDto.ts
|
|
192
183
|
src/models/RefreshTokenDto.ts
|
|
193
184
|
src/models/RefreshTokenResponse.ts
|
|
194
185
|
src/models/RefreshTokenResponseDto.ts
|
|
195
|
-
src/models/RejectRateAdjustmentDto.ts
|
|
196
186
|
src/models/ResourceEnum.ts
|
|
197
187
|
src/models/RevenueByStatusDto.ts
|
|
198
188
|
src/models/RevenueReportDto.ts
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## electric-coop-api@0.1.
|
|
1
|
+
## electric-coop-api@0.1.78
|
|
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.78 --save
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
_unPublished (not recommended):_
|
|
@@ -10,10 +10,19 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { AdminSendNotificationDto, AdminSendNotificationResponse } from '../models/index';
|
|
13
|
+
import type { AdminNotificationMarkedAsRead, AdminNotificationUnreadCount, AdminSendNotificationDto, AdminSendNotificationResponse, PaginatedAdminNotifications } from '../models/index';
|
|
14
14
|
export interface AdminSendNotificationRequest {
|
|
15
15
|
adminSendNotificationDto: AdminSendNotificationDto;
|
|
16
16
|
}
|
|
17
|
+
export interface GetAdminNotificationsRequest {
|
|
18
|
+
page?: number;
|
|
19
|
+
limit?: number;
|
|
20
|
+
search?: string;
|
|
21
|
+
unreadOnly?: boolean;
|
|
22
|
+
}
|
|
23
|
+
export interface MarkAdminNotificationReadRequest {
|
|
24
|
+
id: string;
|
|
25
|
+
}
|
|
17
26
|
/**
|
|
18
27
|
* AdminNotificationsApi - interface
|
|
19
28
|
*
|
|
@@ -23,7 +32,7 @@ export interface AdminSendNotificationRequest {
|
|
|
23
32
|
export interface AdminNotificationsApiInterface {
|
|
24
33
|
/**
|
|
25
34
|
*
|
|
26
|
-
* @summary
|
|
35
|
+
* @summary Broadcast a notification to admins, consumers or a specific user
|
|
27
36
|
* @param {AdminSendNotificationDto} adminSendNotificationDto
|
|
28
37
|
* @param {*} [options] Override http request option.
|
|
29
38
|
* @throws {RequiredError}
|
|
@@ -31,20 +40,105 @@ export interface AdminNotificationsApiInterface {
|
|
|
31
40
|
*/
|
|
32
41
|
adminSendNotificationRaw(requestParameters: AdminSendNotificationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdminSendNotificationResponse>>;
|
|
33
42
|
/**
|
|
34
|
-
*
|
|
43
|
+
* Broadcast a notification to admins, consumers or a specific user
|
|
35
44
|
*/
|
|
36
45
|
adminSendNotification(requestParameters: AdminSendNotificationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminSendNotificationResponse>;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @summary List admin notifications (paginated)
|
|
49
|
+
* @param {number} [page]
|
|
50
|
+
* @param {number} [limit]
|
|
51
|
+
* @param {string} [search]
|
|
52
|
+
* @param {boolean} [unreadOnly]
|
|
53
|
+
* @param {*} [options] Override http request option.
|
|
54
|
+
* @throws {RequiredError}
|
|
55
|
+
* @memberof AdminNotificationsApiInterface
|
|
56
|
+
*/
|
|
57
|
+
getAdminNotificationsRaw(requestParameters: GetAdminNotificationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedAdminNotifications>>;
|
|
58
|
+
/**
|
|
59
|
+
* List admin notifications (paginated)
|
|
60
|
+
*/
|
|
61
|
+
getAdminNotifications(requestParameters: GetAdminNotificationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedAdminNotifications>;
|
|
62
|
+
/**
|
|
63
|
+
*
|
|
64
|
+
* @summary Get unread admin notification count
|
|
65
|
+
* @param {*} [options] Override http request option.
|
|
66
|
+
* @throws {RequiredError}
|
|
67
|
+
* @memberof AdminNotificationsApiInterface
|
|
68
|
+
*/
|
|
69
|
+
getAdminUnreadNotificationCountRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdminNotificationUnreadCount>>;
|
|
70
|
+
/**
|
|
71
|
+
* Get unread admin notification count
|
|
72
|
+
*/
|
|
73
|
+
getAdminUnreadNotificationCount(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminNotificationUnreadCount>;
|
|
74
|
+
/**
|
|
75
|
+
*
|
|
76
|
+
* @summary Mark admin notification as read
|
|
77
|
+
* @param {string} id
|
|
78
|
+
* @param {*} [options] Override http request option.
|
|
79
|
+
* @throws {RequiredError}
|
|
80
|
+
* @memberof AdminNotificationsApiInterface
|
|
81
|
+
*/
|
|
82
|
+
markAdminNotificationReadRaw(requestParameters: MarkAdminNotificationReadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdminNotificationMarkedAsRead>>;
|
|
83
|
+
/**
|
|
84
|
+
* Mark admin notification as read
|
|
85
|
+
*/
|
|
86
|
+
markAdminNotificationRead(requestParameters: MarkAdminNotificationReadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminNotificationMarkedAsRead>;
|
|
87
|
+
/**
|
|
88
|
+
*
|
|
89
|
+
* @summary Mark all admin notifications as read
|
|
90
|
+
* @param {*} [options] Override http request option.
|
|
91
|
+
* @throws {RequiredError}
|
|
92
|
+
* @memberof AdminNotificationsApiInterface
|
|
93
|
+
*/
|
|
94
|
+
markAllAdminNotificationsReadRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
95
|
+
/**
|
|
96
|
+
* Mark all admin notifications as read
|
|
97
|
+
*/
|
|
98
|
+
markAllAdminNotificationsRead(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
37
99
|
}
|
|
38
100
|
/**
|
|
39
101
|
*
|
|
40
102
|
*/
|
|
41
103
|
export declare class AdminNotificationsApi extends runtime.BaseAPI implements AdminNotificationsApiInterface {
|
|
42
104
|
/**
|
|
43
|
-
*
|
|
105
|
+
* Broadcast a notification to admins, consumers or a specific user
|
|
44
106
|
*/
|
|
45
107
|
adminSendNotificationRaw(requestParameters: AdminSendNotificationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdminSendNotificationResponse>>;
|
|
46
108
|
/**
|
|
47
|
-
*
|
|
109
|
+
* Broadcast a notification to admins, consumers or a specific user
|
|
48
110
|
*/
|
|
49
111
|
adminSendNotification(requestParameters: AdminSendNotificationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminSendNotificationResponse>;
|
|
112
|
+
/**
|
|
113
|
+
* List admin notifications (paginated)
|
|
114
|
+
*/
|
|
115
|
+
getAdminNotificationsRaw(requestParameters: GetAdminNotificationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedAdminNotifications>>;
|
|
116
|
+
/**
|
|
117
|
+
* List admin notifications (paginated)
|
|
118
|
+
*/
|
|
119
|
+
getAdminNotifications(requestParameters?: GetAdminNotificationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedAdminNotifications>;
|
|
120
|
+
/**
|
|
121
|
+
* Get unread admin notification count
|
|
122
|
+
*/
|
|
123
|
+
getAdminUnreadNotificationCountRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdminNotificationUnreadCount>>;
|
|
124
|
+
/**
|
|
125
|
+
* Get unread admin notification count
|
|
126
|
+
*/
|
|
127
|
+
getAdminUnreadNotificationCount(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminNotificationUnreadCount>;
|
|
128
|
+
/**
|
|
129
|
+
* Mark admin notification as read
|
|
130
|
+
*/
|
|
131
|
+
markAdminNotificationReadRaw(requestParameters: MarkAdminNotificationReadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdminNotificationMarkedAsRead>>;
|
|
132
|
+
/**
|
|
133
|
+
* Mark admin notification as read
|
|
134
|
+
*/
|
|
135
|
+
markAdminNotificationRead(requestParameters: MarkAdminNotificationReadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminNotificationMarkedAsRead>;
|
|
136
|
+
/**
|
|
137
|
+
* Mark all admin notifications as read
|
|
138
|
+
*/
|
|
139
|
+
markAllAdminNotificationsReadRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
140
|
+
/**
|
|
141
|
+
* Mark all admin notifications as read
|
|
142
|
+
*/
|
|
143
|
+
markAllAdminNotificationsRead(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
50
144
|
}
|
|
@@ -30,7 +30,7 @@ const index_1 = require("../models/index");
|
|
|
30
30
|
*/
|
|
31
31
|
class AdminNotificationsApi extends runtime.BaseAPI {
|
|
32
32
|
/**
|
|
33
|
-
*
|
|
33
|
+
* Broadcast a notification to admins, consumers or a specific user
|
|
34
34
|
*/
|
|
35
35
|
adminSendNotificationRaw(requestParameters, initOverrides) {
|
|
36
36
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -59,7 +59,7 @@ class AdminNotificationsApi extends runtime.BaseAPI {
|
|
|
59
59
|
});
|
|
60
60
|
}
|
|
61
61
|
/**
|
|
62
|
-
*
|
|
62
|
+
* Broadcast a notification to admins, consumers or a specific user
|
|
63
63
|
*/
|
|
64
64
|
adminSendNotification(requestParameters, initOverrides) {
|
|
65
65
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -67,5 +67,152 @@ class AdminNotificationsApi extends runtime.BaseAPI {
|
|
|
67
67
|
return yield response.value();
|
|
68
68
|
});
|
|
69
69
|
}
|
|
70
|
+
/**
|
|
71
|
+
* List admin notifications (paginated)
|
|
72
|
+
*/
|
|
73
|
+
getAdminNotificationsRaw(requestParameters, initOverrides) {
|
|
74
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
75
|
+
const queryParameters = {};
|
|
76
|
+
if (requestParameters['page'] != null) {
|
|
77
|
+
queryParameters['page'] = requestParameters['page'];
|
|
78
|
+
}
|
|
79
|
+
if (requestParameters['limit'] != null) {
|
|
80
|
+
queryParameters['limit'] = requestParameters['limit'];
|
|
81
|
+
}
|
|
82
|
+
if (requestParameters['search'] != null) {
|
|
83
|
+
queryParameters['search'] = requestParameters['search'];
|
|
84
|
+
}
|
|
85
|
+
if (requestParameters['unreadOnly'] != null) {
|
|
86
|
+
queryParameters['unreadOnly'] = requestParameters['unreadOnly'];
|
|
87
|
+
}
|
|
88
|
+
const headerParameters = {};
|
|
89
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
90
|
+
const token = this.configuration.accessToken;
|
|
91
|
+
const tokenString = yield token("bearer", []);
|
|
92
|
+
if (tokenString) {
|
|
93
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
let urlPath = `/api/v1/admin/notifications`;
|
|
97
|
+
const response = yield this.request({
|
|
98
|
+
path: urlPath,
|
|
99
|
+
method: 'GET',
|
|
100
|
+
headers: headerParameters,
|
|
101
|
+
query: queryParameters,
|
|
102
|
+
}, initOverrides);
|
|
103
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.PaginatedAdminNotificationsFromJSON)(jsonValue));
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* List admin notifications (paginated)
|
|
108
|
+
*/
|
|
109
|
+
getAdminNotifications() {
|
|
110
|
+
return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
|
|
111
|
+
const response = yield this.getAdminNotificationsRaw(requestParameters, initOverrides);
|
|
112
|
+
return yield response.value();
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Get unread admin notification count
|
|
117
|
+
*/
|
|
118
|
+
getAdminUnreadNotificationCountRaw(initOverrides) {
|
|
119
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
120
|
+
const queryParameters = {};
|
|
121
|
+
const headerParameters = {};
|
|
122
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
123
|
+
const token = this.configuration.accessToken;
|
|
124
|
+
const tokenString = yield token("bearer", []);
|
|
125
|
+
if (tokenString) {
|
|
126
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
let urlPath = `/api/v1/admin/notifications/unread-count`;
|
|
130
|
+
const response = yield this.request({
|
|
131
|
+
path: urlPath,
|
|
132
|
+
method: 'GET',
|
|
133
|
+
headers: headerParameters,
|
|
134
|
+
query: queryParameters,
|
|
135
|
+
}, initOverrides);
|
|
136
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AdminNotificationUnreadCountFromJSON)(jsonValue));
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Get unread admin notification count
|
|
141
|
+
*/
|
|
142
|
+
getAdminUnreadNotificationCount(initOverrides) {
|
|
143
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
144
|
+
const response = yield this.getAdminUnreadNotificationCountRaw(initOverrides);
|
|
145
|
+
return yield response.value();
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Mark admin notification as read
|
|
150
|
+
*/
|
|
151
|
+
markAdminNotificationReadRaw(requestParameters, initOverrides) {
|
|
152
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
153
|
+
if (requestParameters['id'] == null) {
|
|
154
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling markAdminNotificationRead().');
|
|
155
|
+
}
|
|
156
|
+
const queryParameters = {};
|
|
157
|
+
const headerParameters = {};
|
|
158
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
159
|
+
const token = this.configuration.accessToken;
|
|
160
|
+
const tokenString = yield token("bearer", []);
|
|
161
|
+
if (tokenString) {
|
|
162
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
let urlPath = `/api/v1/admin/notifications/{id}/read`;
|
|
166
|
+
urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
|
|
167
|
+
const response = yield this.request({
|
|
168
|
+
path: urlPath,
|
|
169
|
+
method: 'PATCH',
|
|
170
|
+
headers: headerParameters,
|
|
171
|
+
query: queryParameters,
|
|
172
|
+
}, initOverrides);
|
|
173
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AdminNotificationMarkedAsReadFromJSON)(jsonValue));
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* Mark admin notification as read
|
|
178
|
+
*/
|
|
179
|
+
markAdminNotificationRead(requestParameters, initOverrides) {
|
|
180
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
181
|
+
const response = yield this.markAdminNotificationReadRaw(requestParameters, initOverrides);
|
|
182
|
+
return yield response.value();
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Mark all admin notifications as read
|
|
187
|
+
*/
|
|
188
|
+
markAllAdminNotificationsReadRaw(initOverrides) {
|
|
189
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
190
|
+
const queryParameters = {};
|
|
191
|
+
const headerParameters = {};
|
|
192
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
193
|
+
const token = this.configuration.accessToken;
|
|
194
|
+
const tokenString = yield token("bearer", []);
|
|
195
|
+
if (tokenString) {
|
|
196
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
let urlPath = `/api/v1/admin/notifications/mark-all-read`;
|
|
200
|
+
const response = yield this.request({
|
|
201
|
+
path: urlPath,
|
|
202
|
+
method: 'PATCH',
|
|
203
|
+
headers: headerParameters,
|
|
204
|
+
query: queryParameters,
|
|
205
|
+
}, initOverrides);
|
|
206
|
+
return new runtime.VoidApiResponse(response);
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Mark all admin notifications as read
|
|
211
|
+
*/
|
|
212
|
+
markAllAdminNotificationsRead(initOverrides) {
|
|
213
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
214
|
+
yield this.markAllAdminNotificationsReadRaw(initOverrides);
|
|
215
|
+
});
|
|
216
|
+
}
|
|
70
217
|
}
|
|
71
218
|
exports.AdminNotificationsApi = AdminNotificationsApi;
|
package/dist/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/apis/index.js
CHANGED
|
@@ -37,9 +37,7 @@ __exportStar(require("./FieldWorkOrdersApi"), exports);
|
|
|
37
37
|
__exportStar(require("./ManagementDashboardApi"), exports);
|
|
38
38
|
__exportStar(require("./MetersApi"), exports);
|
|
39
39
|
__exportStar(require("./NotificationsApi"), exports);
|
|
40
|
-
__exportStar(require("./RateAdjustmentsApi"), exports);
|
|
41
40
|
__exportStar(require("./RateDisplayApi"), exports);
|
|
42
|
-
__exportStar(require("./RatesApi"), exports);
|
|
43
41
|
__exportStar(require("./ReportsApi"), exports);
|
|
44
42
|
__exportStar(require("./SettingsApi"), exports);
|
|
45
43
|
__exportStar(require("./UsersApi"), exports);
|
|
@@ -10,10 +10,19 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { AdminSendNotificationDto, AdminSendNotificationResponse } from '../models/index';
|
|
13
|
+
import type { AdminNotificationMarkedAsRead, AdminNotificationUnreadCount, AdminSendNotificationDto, AdminSendNotificationResponse, PaginatedAdminNotifications } from '../models/index';
|
|
14
14
|
export interface AdminSendNotificationRequest {
|
|
15
15
|
adminSendNotificationDto: AdminSendNotificationDto;
|
|
16
16
|
}
|
|
17
|
+
export interface GetAdminNotificationsRequest {
|
|
18
|
+
page?: number;
|
|
19
|
+
limit?: number;
|
|
20
|
+
search?: string;
|
|
21
|
+
unreadOnly?: boolean;
|
|
22
|
+
}
|
|
23
|
+
export interface MarkAdminNotificationReadRequest {
|
|
24
|
+
id: string;
|
|
25
|
+
}
|
|
17
26
|
/**
|
|
18
27
|
* AdminNotificationsApi - interface
|
|
19
28
|
*
|
|
@@ -23,7 +32,7 @@ export interface AdminSendNotificationRequest {
|
|
|
23
32
|
export interface AdminNotificationsApiInterface {
|
|
24
33
|
/**
|
|
25
34
|
*
|
|
26
|
-
* @summary
|
|
35
|
+
* @summary Broadcast a notification to admins, consumers or a specific user
|
|
27
36
|
* @param {AdminSendNotificationDto} adminSendNotificationDto
|
|
28
37
|
* @param {*} [options] Override http request option.
|
|
29
38
|
* @throws {RequiredError}
|
|
@@ -31,20 +40,105 @@ export interface AdminNotificationsApiInterface {
|
|
|
31
40
|
*/
|
|
32
41
|
adminSendNotificationRaw(requestParameters: AdminSendNotificationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdminSendNotificationResponse>>;
|
|
33
42
|
/**
|
|
34
|
-
*
|
|
43
|
+
* Broadcast a notification to admins, consumers or a specific user
|
|
35
44
|
*/
|
|
36
45
|
adminSendNotification(requestParameters: AdminSendNotificationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminSendNotificationResponse>;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @summary List admin notifications (paginated)
|
|
49
|
+
* @param {number} [page]
|
|
50
|
+
* @param {number} [limit]
|
|
51
|
+
* @param {string} [search]
|
|
52
|
+
* @param {boolean} [unreadOnly]
|
|
53
|
+
* @param {*} [options] Override http request option.
|
|
54
|
+
* @throws {RequiredError}
|
|
55
|
+
* @memberof AdminNotificationsApiInterface
|
|
56
|
+
*/
|
|
57
|
+
getAdminNotificationsRaw(requestParameters: GetAdminNotificationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedAdminNotifications>>;
|
|
58
|
+
/**
|
|
59
|
+
* List admin notifications (paginated)
|
|
60
|
+
*/
|
|
61
|
+
getAdminNotifications(requestParameters: GetAdminNotificationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedAdminNotifications>;
|
|
62
|
+
/**
|
|
63
|
+
*
|
|
64
|
+
* @summary Get unread admin notification count
|
|
65
|
+
* @param {*} [options] Override http request option.
|
|
66
|
+
* @throws {RequiredError}
|
|
67
|
+
* @memberof AdminNotificationsApiInterface
|
|
68
|
+
*/
|
|
69
|
+
getAdminUnreadNotificationCountRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdminNotificationUnreadCount>>;
|
|
70
|
+
/**
|
|
71
|
+
* Get unread admin notification count
|
|
72
|
+
*/
|
|
73
|
+
getAdminUnreadNotificationCount(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminNotificationUnreadCount>;
|
|
74
|
+
/**
|
|
75
|
+
*
|
|
76
|
+
* @summary Mark admin notification as read
|
|
77
|
+
* @param {string} id
|
|
78
|
+
* @param {*} [options] Override http request option.
|
|
79
|
+
* @throws {RequiredError}
|
|
80
|
+
* @memberof AdminNotificationsApiInterface
|
|
81
|
+
*/
|
|
82
|
+
markAdminNotificationReadRaw(requestParameters: MarkAdminNotificationReadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdminNotificationMarkedAsRead>>;
|
|
83
|
+
/**
|
|
84
|
+
* Mark admin notification as read
|
|
85
|
+
*/
|
|
86
|
+
markAdminNotificationRead(requestParameters: MarkAdminNotificationReadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminNotificationMarkedAsRead>;
|
|
87
|
+
/**
|
|
88
|
+
*
|
|
89
|
+
* @summary Mark all admin notifications as read
|
|
90
|
+
* @param {*} [options] Override http request option.
|
|
91
|
+
* @throws {RequiredError}
|
|
92
|
+
* @memberof AdminNotificationsApiInterface
|
|
93
|
+
*/
|
|
94
|
+
markAllAdminNotificationsReadRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
95
|
+
/**
|
|
96
|
+
* Mark all admin notifications as read
|
|
97
|
+
*/
|
|
98
|
+
markAllAdminNotificationsRead(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
37
99
|
}
|
|
38
100
|
/**
|
|
39
101
|
*
|
|
40
102
|
*/
|
|
41
103
|
export declare class AdminNotificationsApi extends runtime.BaseAPI implements AdminNotificationsApiInterface {
|
|
42
104
|
/**
|
|
43
|
-
*
|
|
105
|
+
* Broadcast a notification to admins, consumers or a specific user
|
|
44
106
|
*/
|
|
45
107
|
adminSendNotificationRaw(requestParameters: AdminSendNotificationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdminSendNotificationResponse>>;
|
|
46
108
|
/**
|
|
47
|
-
*
|
|
109
|
+
* Broadcast a notification to admins, consumers or a specific user
|
|
48
110
|
*/
|
|
49
111
|
adminSendNotification(requestParameters: AdminSendNotificationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminSendNotificationResponse>;
|
|
112
|
+
/**
|
|
113
|
+
* List admin notifications (paginated)
|
|
114
|
+
*/
|
|
115
|
+
getAdminNotificationsRaw(requestParameters: GetAdminNotificationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedAdminNotifications>>;
|
|
116
|
+
/**
|
|
117
|
+
* List admin notifications (paginated)
|
|
118
|
+
*/
|
|
119
|
+
getAdminNotifications(requestParameters?: GetAdminNotificationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedAdminNotifications>;
|
|
120
|
+
/**
|
|
121
|
+
* Get unread admin notification count
|
|
122
|
+
*/
|
|
123
|
+
getAdminUnreadNotificationCountRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdminNotificationUnreadCount>>;
|
|
124
|
+
/**
|
|
125
|
+
* Get unread admin notification count
|
|
126
|
+
*/
|
|
127
|
+
getAdminUnreadNotificationCount(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminNotificationUnreadCount>;
|
|
128
|
+
/**
|
|
129
|
+
* Mark admin notification as read
|
|
130
|
+
*/
|
|
131
|
+
markAdminNotificationReadRaw(requestParameters: MarkAdminNotificationReadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdminNotificationMarkedAsRead>>;
|
|
132
|
+
/**
|
|
133
|
+
* Mark admin notification as read
|
|
134
|
+
*/
|
|
135
|
+
markAdminNotificationRead(requestParameters: MarkAdminNotificationReadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminNotificationMarkedAsRead>;
|
|
136
|
+
/**
|
|
137
|
+
* Mark all admin notifications as read
|
|
138
|
+
*/
|
|
139
|
+
markAllAdminNotificationsReadRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
140
|
+
/**
|
|
141
|
+
* Mark all admin notifications as read
|
|
142
|
+
*/
|
|
143
|
+
markAllAdminNotificationsRead(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
50
144
|
}
|