electric-coop-api 0.1.76 → 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 +4 -13
- package/README.md +2 -2
- package/dist/apis/AdminComplaintsApi.d.ts +25 -1
- package/dist/apis/AdminComplaintsApi.js +38 -0
- 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/AdminComplaintsApi.d.ts +25 -1
- package/dist/esm/apis/AdminComplaintsApi.js +39 -1
- 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 +5 -0
- package/dist/esm/models/AuditLogEntityTypeEnum.js +6 -1
- package/dist/esm/models/CreateAdminComplaintDto.d.ts +64 -0
- package/dist/esm/models/CreateAdminComplaintDto.js +61 -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 +4 -11
- package/dist/esm/models/index.js +4 -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 +5 -0
- package/dist/models/AuditLogEntityTypeEnum.js +6 -1
- package/dist/models/CreateAdminComplaintDto.d.ts +64 -0
- package/dist/models/CreateAdminComplaintDto.js +68 -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 +4 -11
- package/dist/models/index.js +4 -11
- package/package.json +1 -1
- package/src/apis/AdminComplaintsApi.ts +69 -0
- 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 +6 -1
- package/src/models/CreateAdminComplaintDto.ts +126 -0
- package/src/models/NotificationTypeEnum.ts +6 -1
- package/src/models/PaginatedAdminNotifications.ts +107 -0
- package/src/models/index.ts +4 -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
|
@@ -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
|
}
|
|
@@ -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
|
}
|
|
@@ -20,6 +20,11 @@ export declare const AuditLogEntityTypeEnum: {
|
|
|
20
20
|
readonly ConsumerAccount: "consumer_account";
|
|
21
21
|
readonly ServiceRequest: "service_request";
|
|
22
22
|
readonly Complaint: "complaint";
|
|
23
|
+
readonly Consumer: "consumer";
|
|
24
|
+
readonly RateAdjustment: "rate_adjustment";
|
|
25
|
+
readonly RateDisplay: "rate_display";
|
|
26
|
+
readonly Bill: "bill";
|
|
27
|
+
readonly Settings: "settings";
|
|
23
28
|
};
|
|
24
29
|
export type AuditLogEntityTypeEnum = typeof AuditLogEntityTypeEnum[keyof typeof AuditLogEntityTypeEnum];
|
|
25
30
|
export declare function instanceOfAuditLogEntityTypeEnum(value: any): boolean;
|
|
@@ -21,7 +21,12 @@ export const AuditLogEntityTypeEnum = {
|
|
|
21
21
|
User: 'user',
|
|
22
22
|
ConsumerAccount: 'consumer_account',
|
|
23
23
|
ServiceRequest: 'service_request',
|
|
24
|
-
Complaint: 'complaint'
|
|
24
|
+
Complaint: 'complaint',
|
|
25
|
+
Consumer: 'consumer',
|
|
26
|
+
RateAdjustment: 'rate_adjustment',
|
|
27
|
+
RateDisplay: 'rate_display',
|
|
28
|
+
Bill: 'bill',
|
|
29
|
+
Settings: 'settings'
|
|
25
30
|
};
|
|
26
31
|
export function instanceOfAuditLogEntityTypeEnum(value) {
|
|
27
32
|
for (const key in AuditLogEntityTypeEnum) {
|
|
@@ -0,0 +1,64 @@
|
|
|
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 { ComplaintPriorityEnum } from './ComplaintPriorityEnum';
|
|
13
|
+
import type { ComplaintTypeEnum } from './ComplaintTypeEnum';
|
|
14
|
+
/**
|
|
15
|
+
*
|
|
16
|
+
* @export
|
|
17
|
+
* @interface CreateAdminComplaintDto
|
|
18
|
+
*/
|
|
19
|
+
export interface CreateAdminComplaintDto {
|
|
20
|
+
/**
|
|
21
|
+
* Consumer ID to file the complaint on behalf of
|
|
22
|
+
* @type {string}
|
|
23
|
+
* @memberof CreateAdminComplaintDto
|
|
24
|
+
*/
|
|
25
|
+
consumerId: string;
|
|
26
|
+
/**
|
|
27
|
+
*
|
|
28
|
+
* @type {ComplaintTypeEnum}
|
|
29
|
+
* @memberof CreateAdminComplaintDto
|
|
30
|
+
*/
|
|
31
|
+
type: ComplaintTypeEnum;
|
|
32
|
+
/**
|
|
33
|
+
*
|
|
34
|
+
* @type {string}
|
|
35
|
+
* @memberof CreateAdminComplaintDto
|
|
36
|
+
*/
|
|
37
|
+
subject: string;
|
|
38
|
+
/**
|
|
39
|
+
*
|
|
40
|
+
* @type {string}
|
|
41
|
+
* @memberof CreateAdminComplaintDto
|
|
42
|
+
*/
|
|
43
|
+
description: string;
|
|
44
|
+
/**
|
|
45
|
+
*
|
|
46
|
+
* @type {ComplaintPriorityEnum}
|
|
47
|
+
* @memberof CreateAdminComplaintDto
|
|
48
|
+
*/
|
|
49
|
+
priority?: ComplaintPriorityEnum;
|
|
50
|
+
/**
|
|
51
|
+
*
|
|
52
|
+
* @type {Array<string>}
|
|
53
|
+
* @memberof CreateAdminComplaintDto
|
|
54
|
+
*/
|
|
55
|
+
photos?: Array<string>;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Check if a given object implements the CreateAdminComplaintDto interface.
|
|
59
|
+
*/
|
|
60
|
+
export declare function instanceOfCreateAdminComplaintDto(value: object): value is CreateAdminComplaintDto;
|
|
61
|
+
export declare function CreateAdminComplaintDtoFromJSON(json: any): CreateAdminComplaintDto;
|
|
62
|
+
export declare function CreateAdminComplaintDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateAdminComplaintDto;
|
|
63
|
+
export declare function CreateAdminComplaintDtoToJSON(json: any): CreateAdminComplaintDto;
|
|
64
|
+
export declare function CreateAdminComplaintDtoToJSONTyped(value?: CreateAdminComplaintDto | null, ignoreDiscriminator?: boolean): any;
|