electric-coop-api 0.1.85 → 0.1.86
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 -2
- package/README.md +2 -2
- package/dist/apis/AdminBillsApi.d.ts +5 -29
- package/dist/apis/AdminBillsApi.js +1 -38
- package/dist/apis/AdminConsumersApi.d.ts +27 -1
- package/dist/apis/AdminConsumersApi.js +42 -0
- package/dist/esm/apis/AdminBillsApi.d.ts +5 -29
- package/dist/esm/apis/AdminBillsApi.js +2 -39
- package/dist/esm/apis/AdminConsumersApi.d.ts +27 -1
- package/dist/esm/apis/AdminConsumersApi.js +43 -1
- package/dist/esm/models/InitiatePaymentDto.d.ts +2 -0
- package/dist/esm/models/InitiatePaymentDto.js +2 -0
- package/dist/esm/models/Payment.d.ts +6 -0
- package/dist/esm/models/Payment.js +4 -0
- package/dist/esm/models/PaymentMethodEnum.d.ts +2 -0
- package/dist/esm/models/PaymentMethodEnum.js +2 -0
- package/dist/esm/models/RecordPaymentResponseDto.d.ts +51 -0
- package/dist/esm/models/RecordPaymentResponseDto.js +56 -0
- package/dist/esm/models/RecordPaymentSuccessResponse.d.ts +45 -0
- package/dist/esm/models/{IssueOrForBillSuccessResponse.js → RecordPaymentSuccessResponse.js} +11 -11
- package/dist/esm/models/UpdateConsumerStatusDto.d.ts +33 -0
- package/dist/esm/models/UpdateConsumerStatusDto.js +44 -0
- package/dist/esm/models/index.d.ts +3 -2
- package/dist/esm/models/index.js +3 -2
- package/dist/models/InitiatePaymentDto.d.ts +2 -0
- package/dist/models/InitiatePaymentDto.js +2 -0
- package/dist/models/Payment.d.ts +6 -0
- package/dist/models/Payment.js +4 -0
- package/dist/models/PaymentMethodEnum.d.ts +2 -0
- package/dist/models/PaymentMethodEnum.js +2 -0
- package/dist/models/RecordPaymentResponseDto.d.ts +51 -0
- package/dist/models/RecordPaymentResponseDto.js +63 -0
- package/dist/models/RecordPaymentSuccessResponse.d.ts +45 -0
- package/dist/models/RecordPaymentSuccessResponse.js +57 -0
- package/dist/models/UpdateConsumerStatusDto.d.ts +33 -0
- package/dist/models/UpdateConsumerStatusDto.js +51 -0
- package/dist/models/index.d.ts +3 -2
- package/dist/models/index.js +3 -2
- package/package.json +1 -1
- package/src/apis/AdminBillsApi.ts +8 -72
- package/src/apis/AdminConsumersApi.ts +79 -0
- package/src/models/InitiatePaymentDto.ts +2 -0
- package/src/models/Payment.ts +9 -0
- package/src/models/PaymentMethodEnum.ts +2 -0
- package/src/models/RecordPaymentResponseDto.ts +101 -0
- package/src/models/RecordPaymentSuccessResponse.ts +91 -0
- package/src/models/UpdateConsumerStatusDto.ts +76 -0
- package/src/models/index.ts +3 -2
- package/dist/esm/models/IssueOrForBillDto.d.ts +0 -38
- package/dist/esm/models/IssueOrForBillDto.js +0 -47
- package/dist/esm/models/IssueOrForBillSuccessResponse.d.ts +0 -45
- package/dist/models/IssueOrForBillDto.d.ts +0 -38
- package/dist/models/IssueOrForBillDto.js +0 -54
- package/dist/models/IssueOrForBillSuccessResponse.d.ts +0 -45
- package/dist/models/IssueOrForBillSuccessResponse.js +0 -57
- package/src/models/IssueOrForBillDto.ts +0 -75
- package/src/models/IssueOrForBillSuccessResponse.ts +0 -91
package/.openapi-generator/FILES
CHANGED
|
@@ -120,8 +120,6 @@ src/models/ErrorResponseDtoMessage.ts
|
|
|
120
120
|
src/models/FieldRoleEnum.ts
|
|
121
121
|
src/models/InitiatePaymentDto.ts
|
|
122
122
|
src/models/InitiatePaymentResponse.ts
|
|
123
|
-
src/models/IssueOrForBillDto.ts
|
|
124
|
-
src/models/IssueOrForBillSuccessResponse.ts
|
|
125
123
|
src/models/LastReadingDto.ts
|
|
126
124
|
src/models/LinkConsumerAccountDto.ts
|
|
127
125
|
src/models/LoginDto.ts
|
|
@@ -188,6 +186,8 @@ src/models/RateDisplaysSuccessResponse.ts
|
|
|
188
186
|
src/models/RateSectionDto.ts
|
|
189
187
|
src/models/ReadingHistoryItemDto.ts
|
|
190
188
|
src/models/RecordPaymentDto.ts
|
|
189
|
+
src/models/RecordPaymentResponseDto.ts
|
|
190
|
+
src/models/RecordPaymentSuccessResponse.ts
|
|
191
191
|
src/models/RefreshTokenDto.ts
|
|
192
192
|
src/models/RefreshTokenResponse.ts
|
|
193
193
|
src/models/RefreshTokenResponseDto.ts
|
|
@@ -220,6 +220,7 @@ src/models/TenantStatusEnum.ts
|
|
|
220
220
|
src/models/UpdateBillDto.ts
|
|
221
221
|
src/models/UpdateComplaintDto.ts
|
|
222
222
|
src/models/UpdateConsumerDto.ts
|
|
223
|
+
src/models/UpdateConsumerStatusDto.ts
|
|
223
224
|
src/models/UpdateMeterReadingSettingsDto.ts
|
|
224
225
|
src/models/UpdateOfficialReceiptSettingsDto.ts
|
|
225
226
|
src/models/UpdateOfficialReceiptSettingsSuccessResponse.ts
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## electric-coop-api@0.1.
|
|
1
|
+
## electric-coop-api@0.1.86
|
|
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.86 --save
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
_unPublished (not recommended):_
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { BillStatusEnum, BillingDashboardStatsResponse, BillsAdminPaginatedResponse, BillsCalculationSuccessResponse, BillsSuccessResponse, CreateBillDto,
|
|
13
|
+
import type { BillStatusEnum, BillingDashboardStatsResponse, BillsAdminPaginatedResponse, BillsCalculationSuccessResponse, BillsSuccessResponse, CreateBillDto, PreviewBillDto, RecordPaymentDto, RecordPaymentSuccessResponse, UpdateBillDto } from '../models/index';
|
|
14
14
|
export interface CreateAdminBillRequest {
|
|
15
15
|
createBillDto: CreateBillDto;
|
|
16
16
|
}
|
|
@@ -29,9 +29,6 @@ export interface GetAdminBillsRequest {
|
|
|
29
29
|
accountNumber?: string;
|
|
30
30
|
consumerId?: string;
|
|
31
31
|
}
|
|
32
|
-
export interface IssueOrForBillRequest {
|
|
33
|
-
id: string;
|
|
34
|
-
}
|
|
35
32
|
export interface PreviewAdminBillRequest {
|
|
36
33
|
previewBillDto: PreviewBillDto;
|
|
37
34
|
}
|
|
@@ -144,19 +141,6 @@ export interface AdminBillsApiInterface {
|
|
|
144
141
|
* Get paginated bills (admin)
|
|
145
142
|
*/
|
|
146
143
|
getAdminBills(requestParameters: GetAdminBillsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BillsAdminPaginatedResponse>;
|
|
147
|
-
/**
|
|
148
|
-
*
|
|
149
|
-
* @summary Issue or retrieve Official Receipt number for a paid bill (idempotent)
|
|
150
|
-
* @param {string} id
|
|
151
|
-
* @param {*} [options] Override http request option.
|
|
152
|
-
* @throws {RequiredError}
|
|
153
|
-
* @memberof AdminBillsApiInterface
|
|
154
|
-
*/
|
|
155
|
-
issueOrForBillRaw(requestParameters: IssueOrForBillRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<IssueOrForBillSuccessResponse>>;
|
|
156
|
-
/**
|
|
157
|
-
* Issue or retrieve Official Receipt number for a paid bill (idempotent)
|
|
158
|
-
*/
|
|
159
|
-
issueOrForBill(requestParameters: IssueOrForBillRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IssueOrForBillSuccessResponse>;
|
|
160
144
|
/**
|
|
161
145
|
*
|
|
162
146
|
* @summary Preview bill calculation without saving (admin)
|
|
@@ -179,11 +163,11 @@ export interface AdminBillsApiInterface {
|
|
|
179
163
|
* @throws {RequiredError}
|
|
180
164
|
* @memberof AdminBillsApiInterface
|
|
181
165
|
*/
|
|
182
|
-
recordAdminBillPaymentRaw(requestParameters: RecordAdminBillPaymentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<
|
|
166
|
+
recordAdminBillPaymentRaw(requestParameters: RecordAdminBillPaymentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RecordPaymentSuccessResponse>>;
|
|
183
167
|
/**
|
|
184
168
|
* Record an over-the-counter payment for a bill (admin)
|
|
185
169
|
*/
|
|
186
|
-
recordAdminBillPayment(requestParameters: RecordAdminBillPaymentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<
|
|
170
|
+
recordAdminBillPayment(requestParameters: RecordAdminBillPaymentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RecordPaymentSuccessResponse>;
|
|
187
171
|
/**
|
|
188
172
|
*
|
|
189
173
|
* @summary Update bill (admin)
|
|
@@ -259,14 +243,6 @@ export declare class AdminBillsApi extends runtime.BaseAPI implements AdminBills
|
|
|
259
243
|
* Get paginated bills (admin)
|
|
260
244
|
*/
|
|
261
245
|
getAdminBills(requestParameters?: GetAdminBillsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BillsAdminPaginatedResponse>;
|
|
262
|
-
/**
|
|
263
|
-
* Issue or retrieve Official Receipt number for a paid bill (idempotent)
|
|
264
|
-
*/
|
|
265
|
-
issueOrForBillRaw(requestParameters: IssueOrForBillRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<IssueOrForBillSuccessResponse>>;
|
|
266
|
-
/**
|
|
267
|
-
* Issue or retrieve Official Receipt number for a paid bill (idempotent)
|
|
268
|
-
*/
|
|
269
|
-
issueOrForBill(requestParameters: IssueOrForBillRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IssueOrForBillSuccessResponse>;
|
|
270
246
|
/**
|
|
271
247
|
* Preview bill calculation without saving (admin)
|
|
272
248
|
*/
|
|
@@ -278,11 +254,11 @@ export declare class AdminBillsApi extends runtime.BaseAPI implements AdminBills
|
|
|
278
254
|
/**
|
|
279
255
|
* Record an over-the-counter payment for a bill (admin)
|
|
280
256
|
*/
|
|
281
|
-
recordAdminBillPaymentRaw(requestParameters: RecordAdminBillPaymentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<
|
|
257
|
+
recordAdminBillPaymentRaw(requestParameters: RecordAdminBillPaymentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RecordPaymentSuccessResponse>>;
|
|
282
258
|
/**
|
|
283
259
|
* Record an over-the-counter payment for a bill (admin)
|
|
284
260
|
*/
|
|
285
|
-
recordAdminBillPayment(requestParameters: RecordAdminBillPaymentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<
|
|
261
|
+
recordAdminBillPayment(requestParameters: RecordAdminBillPaymentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RecordPaymentSuccessResponse>;
|
|
286
262
|
/**
|
|
287
263
|
* Update bill (admin)
|
|
288
264
|
*/
|
|
@@ -293,43 +293,6 @@ class AdminBillsApi extends runtime.BaseAPI {
|
|
|
293
293
|
return yield response.value();
|
|
294
294
|
});
|
|
295
295
|
}
|
|
296
|
-
/**
|
|
297
|
-
* Issue or retrieve Official Receipt number for a paid bill (idempotent)
|
|
298
|
-
*/
|
|
299
|
-
issueOrForBillRaw(requestParameters, initOverrides) {
|
|
300
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
301
|
-
if (requestParameters['id'] == null) {
|
|
302
|
-
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling issueOrForBill().');
|
|
303
|
-
}
|
|
304
|
-
const queryParameters = {};
|
|
305
|
-
const headerParameters = {};
|
|
306
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
307
|
-
const token = this.configuration.accessToken;
|
|
308
|
-
const tokenString = yield token("bearer", []);
|
|
309
|
-
if (tokenString) {
|
|
310
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
311
|
-
}
|
|
312
|
-
}
|
|
313
|
-
let urlPath = `/api/v1/admin/bills/{id}/issue-or`;
|
|
314
|
-
urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
|
|
315
|
-
const response = yield this.request({
|
|
316
|
-
path: urlPath,
|
|
317
|
-
method: 'POST',
|
|
318
|
-
headers: headerParameters,
|
|
319
|
-
query: queryParameters,
|
|
320
|
-
}, initOverrides);
|
|
321
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.IssueOrForBillSuccessResponseFromJSON)(jsonValue));
|
|
322
|
-
});
|
|
323
|
-
}
|
|
324
|
-
/**
|
|
325
|
-
* Issue or retrieve Official Receipt number for a paid bill (idempotent)
|
|
326
|
-
*/
|
|
327
|
-
issueOrForBill(requestParameters, initOverrides) {
|
|
328
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
329
|
-
const response = yield this.issueOrForBillRaw(requestParameters, initOverrides);
|
|
330
|
-
return yield response.value();
|
|
331
|
-
});
|
|
332
|
-
}
|
|
333
296
|
/**
|
|
334
297
|
* Preview bill calculation without saving (admin)
|
|
335
298
|
*/
|
|
@@ -398,7 +361,7 @@ class AdminBillsApi extends runtime.BaseAPI {
|
|
|
398
361
|
query: queryParameters,
|
|
399
362
|
body: (0, index_1.RecordPaymentDtoToJSON)(requestParameters['recordPaymentDto']),
|
|
400
363
|
}, initOverrides);
|
|
401
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.
|
|
364
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.RecordPaymentSuccessResponseFromJSON)(jsonValue));
|
|
402
365
|
});
|
|
403
366
|
}
|
|
404
367
|
/**
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { ConsumerStatusEnum, ConsumersAdminPaginatedResponse, ConsumersAdminUnBilledPaginatedResponse, ConsumersSuccessResponse, CreateConsumerDto, UpdateConsumerDto } from '../models/index';
|
|
13
|
+
import type { ConsumerStatusEnum, ConsumersAdminPaginatedResponse, ConsumersAdminUnBilledPaginatedResponse, ConsumersSuccessResponse, CreateConsumerDto, UpdateConsumerDto, UpdateConsumerStatusDto } from '../models/index';
|
|
14
14
|
export interface CreateAdminConsumerRequest {
|
|
15
15
|
createConsumerDto: CreateConsumerDto;
|
|
16
16
|
}
|
|
@@ -39,6 +39,10 @@ export interface UpdateAdminConsumerRequest {
|
|
|
39
39
|
id: string;
|
|
40
40
|
updateConsumerDto: UpdateConsumerDto;
|
|
41
41
|
}
|
|
42
|
+
export interface UpdateAdminConsumerStatusRequest {
|
|
43
|
+
id: string;
|
|
44
|
+
updateConsumerStatusDto: UpdateConsumerStatusDto;
|
|
45
|
+
}
|
|
42
46
|
/**
|
|
43
47
|
* AdminConsumersApi - interface
|
|
44
48
|
*
|
|
@@ -134,6 +138,20 @@ export interface AdminConsumersApiInterface {
|
|
|
134
138
|
* Update consumer
|
|
135
139
|
*/
|
|
136
140
|
updateAdminConsumer(requestParameters: UpdateAdminConsumerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConsumersSuccessResponse>;
|
|
141
|
+
/**
|
|
142
|
+
*
|
|
143
|
+
* @summary Update consumer status
|
|
144
|
+
* @param {string} id
|
|
145
|
+
* @param {UpdateConsumerStatusDto} updateConsumerStatusDto
|
|
146
|
+
* @param {*} [options] Override http request option.
|
|
147
|
+
* @throws {RequiredError}
|
|
148
|
+
* @memberof AdminConsumersApiInterface
|
|
149
|
+
*/
|
|
150
|
+
updateAdminConsumerStatusRaw(requestParameters: UpdateAdminConsumerStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ConsumersSuccessResponse>>;
|
|
151
|
+
/**
|
|
152
|
+
* Update consumer status
|
|
153
|
+
*/
|
|
154
|
+
updateAdminConsumerStatus(requestParameters: UpdateAdminConsumerStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConsumersSuccessResponse>;
|
|
137
155
|
}
|
|
138
156
|
/**
|
|
139
157
|
*
|
|
@@ -187,6 +205,14 @@ export declare class AdminConsumersApi extends runtime.BaseAPI implements AdminC
|
|
|
187
205
|
* Update consumer
|
|
188
206
|
*/
|
|
189
207
|
updateAdminConsumer(requestParameters: UpdateAdminConsumerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConsumersSuccessResponse>;
|
|
208
|
+
/**
|
|
209
|
+
* Update consumer status
|
|
210
|
+
*/
|
|
211
|
+
updateAdminConsumerStatusRaw(requestParameters: UpdateAdminConsumerStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ConsumersSuccessResponse>>;
|
|
212
|
+
/**
|
|
213
|
+
* Update consumer status
|
|
214
|
+
*/
|
|
215
|
+
updateAdminConsumerStatus(requestParameters: UpdateAdminConsumerStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConsumersSuccessResponse>;
|
|
190
216
|
}
|
|
191
217
|
/**
|
|
192
218
|
* @export
|
|
@@ -282,6 +282,48 @@ class AdminConsumersApi extends runtime.BaseAPI {
|
|
|
282
282
|
return yield response.value();
|
|
283
283
|
});
|
|
284
284
|
}
|
|
285
|
+
/**
|
|
286
|
+
* Update consumer status
|
|
287
|
+
*/
|
|
288
|
+
updateAdminConsumerStatusRaw(requestParameters, initOverrides) {
|
|
289
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
290
|
+
if (requestParameters['id'] == null) {
|
|
291
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling updateAdminConsumerStatus().');
|
|
292
|
+
}
|
|
293
|
+
if (requestParameters['updateConsumerStatusDto'] == null) {
|
|
294
|
+
throw new runtime.RequiredError('updateConsumerStatusDto', 'Required parameter "updateConsumerStatusDto" was null or undefined when calling updateAdminConsumerStatus().');
|
|
295
|
+
}
|
|
296
|
+
const queryParameters = {};
|
|
297
|
+
const headerParameters = {};
|
|
298
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
299
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
300
|
+
const token = this.configuration.accessToken;
|
|
301
|
+
const tokenString = yield token("bearer", []);
|
|
302
|
+
if (tokenString) {
|
|
303
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
let urlPath = `/api/v1/admin/consumers/{id}/status`;
|
|
307
|
+
urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
|
|
308
|
+
const response = yield this.request({
|
|
309
|
+
path: urlPath,
|
|
310
|
+
method: 'PATCH',
|
|
311
|
+
headers: headerParameters,
|
|
312
|
+
query: queryParameters,
|
|
313
|
+
body: (0, index_1.UpdateConsumerStatusDtoToJSON)(requestParameters['updateConsumerStatusDto']),
|
|
314
|
+
}, initOverrides);
|
|
315
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ConsumersSuccessResponseFromJSON)(jsonValue));
|
|
316
|
+
});
|
|
317
|
+
}
|
|
318
|
+
/**
|
|
319
|
+
* Update consumer status
|
|
320
|
+
*/
|
|
321
|
+
updateAdminConsumerStatus(requestParameters, initOverrides) {
|
|
322
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
323
|
+
const response = yield this.updateAdminConsumerStatusRaw(requestParameters, initOverrides);
|
|
324
|
+
return yield response.value();
|
|
325
|
+
});
|
|
326
|
+
}
|
|
285
327
|
}
|
|
286
328
|
exports.AdminConsumersApi = AdminConsumersApi;
|
|
287
329
|
/**
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { BillStatusEnum, BillingDashboardStatsResponse, BillsAdminPaginatedResponse, BillsCalculationSuccessResponse, BillsSuccessResponse, CreateBillDto,
|
|
13
|
+
import type { BillStatusEnum, BillingDashboardStatsResponse, BillsAdminPaginatedResponse, BillsCalculationSuccessResponse, BillsSuccessResponse, CreateBillDto, PreviewBillDto, RecordPaymentDto, RecordPaymentSuccessResponse, UpdateBillDto } from '../models/index';
|
|
14
14
|
export interface CreateAdminBillRequest {
|
|
15
15
|
createBillDto: CreateBillDto;
|
|
16
16
|
}
|
|
@@ -29,9 +29,6 @@ export interface GetAdminBillsRequest {
|
|
|
29
29
|
accountNumber?: string;
|
|
30
30
|
consumerId?: string;
|
|
31
31
|
}
|
|
32
|
-
export interface IssueOrForBillRequest {
|
|
33
|
-
id: string;
|
|
34
|
-
}
|
|
35
32
|
export interface PreviewAdminBillRequest {
|
|
36
33
|
previewBillDto: PreviewBillDto;
|
|
37
34
|
}
|
|
@@ -144,19 +141,6 @@ export interface AdminBillsApiInterface {
|
|
|
144
141
|
* Get paginated bills (admin)
|
|
145
142
|
*/
|
|
146
143
|
getAdminBills(requestParameters: GetAdminBillsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BillsAdminPaginatedResponse>;
|
|
147
|
-
/**
|
|
148
|
-
*
|
|
149
|
-
* @summary Issue or retrieve Official Receipt number for a paid bill (idempotent)
|
|
150
|
-
* @param {string} id
|
|
151
|
-
* @param {*} [options] Override http request option.
|
|
152
|
-
* @throws {RequiredError}
|
|
153
|
-
* @memberof AdminBillsApiInterface
|
|
154
|
-
*/
|
|
155
|
-
issueOrForBillRaw(requestParameters: IssueOrForBillRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<IssueOrForBillSuccessResponse>>;
|
|
156
|
-
/**
|
|
157
|
-
* Issue or retrieve Official Receipt number for a paid bill (idempotent)
|
|
158
|
-
*/
|
|
159
|
-
issueOrForBill(requestParameters: IssueOrForBillRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IssueOrForBillSuccessResponse>;
|
|
160
144
|
/**
|
|
161
145
|
*
|
|
162
146
|
* @summary Preview bill calculation without saving (admin)
|
|
@@ -179,11 +163,11 @@ export interface AdminBillsApiInterface {
|
|
|
179
163
|
* @throws {RequiredError}
|
|
180
164
|
* @memberof AdminBillsApiInterface
|
|
181
165
|
*/
|
|
182
|
-
recordAdminBillPaymentRaw(requestParameters: RecordAdminBillPaymentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<
|
|
166
|
+
recordAdminBillPaymentRaw(requestParameters: RecordAdminBillPaymentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RecordPaymentSuccessResponse>>;
|
|
183
167
|
/**
|
|
184
168
|
* Record an over-the-counter payment for a bill (admin)
|
|
185
169
|
*/
|
|
186
|
-
recordAdminBillPayment(requestParameters: RecordAdminBillPaymentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<
|
|
170
|
+
recordAdminBillPayment(requestParameters: RecordAdminBillPaymentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RecordPaymentSuccessResponse>;
|
|
187
171
|
/**
|
|
188
172
|
*
|
|
189
173
|
* @summary Update bill (admin)
|
|
@@ -259,14 +243,6 @@ export declare class AdminBillsApi extends runtime.BaseAPI implements AdminBills
|
|
|
259
243
|
* Get paginated bills (admin)
|
|
260
244
|
*/
|
|
261
245
|
getAdminBills(requestParameters?: GetAdminBillsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BillsAdminPaginatedResponse>;
|
|
262
|
-
/**
|
|
263
|
-
* Issue or retrieve Official Receipt number for a paid bill (idempotent)
|
|
264
|
-
*/
|
|
265
|
-
issueOrForBillRaw(requestParameters: IssueOrForBillRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<IssueOrForBillSuccessResponse>>;
|
|
266
|
-
/**
|
|
267
|
-
* Issue or retrieve Official Receipt number for a paid bill (idempotent)
|
|
268
|
-
*/
|
|
269
|
-
issueOrForBill(requestParameters: IssueOrForBillRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IssueOrForBillSuccessResponse>;
|
|
270
246
|
/**
|
|
271
247
|
* Preview bill calculation without saving (admin)
|
|
272
248
|
*/
|
|
@@ -278,11 +254,11 @@ export declare class AdminBillsApi extends runtime.BaseAPI implements AdminBills
|
|
|
278
254
|
/**
|
|
279
255
|
* Record an over-the-counter payment for a bill (admin)
|
|
280
256
|
*/
|
|
281
|
-
recordAdminBillPaymentRaw(requestParameters: RecordAdminBillPaymentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<
|
|
257
|
+
recordAdminBillPaymentRaw(requestParameters: RecordAdminBillPaymentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RecordPaymentSuccessResponse>>;
|
|
282
258
|
/**
|
|
283
259
|
* Record an over-the-counter payment for a bill (admin)
|
|
284
260
|
*/
|
|
285
|
-
recordAdminBillPayment(requestParameters: RecordAdminBillPaymentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<
|
|
261
|
+
recordAdminBillPayment(requestParameters: RecordAdminBillPaymentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RecordPaymentSuccessResponse>;
|
|
286
262
|
/**
|
|
287
263
|
* Update bill (admin)
|
|
288
264
|
*/
|
|
@@ -21,7 +21,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
21
21
|
});
|
|
22
22
|
};
|
|
23
23
|
import * as runtime from '../runtime';
|
|
24
|
-
import { BillingDashboardStatsResponseFromJSON, BillsAdminPaginatedResponseFromJSON, BillsCalculationSuccessResponseFromJSON, BillsSuccessResponseFromJSON, CreateBillDtoToJSON,
|
|
24
|
+
import { BillingDashboardStatsResponseFromJSON, BillsAdminPaginatedResponseFromJSON, BillsCalculationSuccessResponseFromJSON, BillsSuccessResponseFromJSON, CreateBillDtoToJSON, PreviewBillDtoToJSON, RecordPaymentDtoToJSON, RecordPaymentSuccessResponseFromJSON, UpdateBillDtoToJSON, } from '../models/index';
|
|
25
25
|
/**
|
|
26
26
|
*
|
|
27
27
|
*/
|
|
@@ -290,43 +290,6 @@ export class AdminBillsApi extends runtime.BaseAPI {
|
|
|
290
290
|
return yield response.value();
|
|
291
291
|
});
|
|
292
292
|
}
|
|
293
|
-
/**
|
|
294
|
-
* Issue or retrieve Official Receipt number for a paid bill (idempotent)
|
|
295
|
-
*/
|
|
296
|
-
issueOrForBillRaw(requestParameters, initOverrides) {
|
|
297
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
298
|
-
if (requestParameters['id'] == null) {
|
|
299
|
-
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling issueOrForBill().');
|
|
300
|
-
}
|
|
301
|
-
const queryParameters = {};
|
|
302
|
-
const headerParameters = {};
|
|
303
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
304
|
-
const token = this.configuration.accessToken;
|
|
305
|
-
const tokenString = yield token("bearer", []);
|
|
306
|
-
if (tokenString) {
|
|
307
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
308
|
-
}
|
|
309
|
-
}
|
|
310
|
-
let urlPath = `/api/v1/admin/bills/{id}/issue-or`;
|
|
311
|
-
urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
|
|
312
|
-
const response = yield this.request({
|
|
313
|
-
path: urlPath,
|
|
314
|
-
method: 'POST',
|
|
315
|
-
headers: headerParameters,
|
|
316
|
-
query: queryParameters,
|
|
317
|
-
}, initOverrides);
|
|
318
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => IssueOrForBillSuccessResponseFromJSON(jsonValue));
|
|
319
|
-
});
|
|
320
|
-
}
|
|
321
|
-
/**
|
|
322
|
-
* Issue or retrieve Official Receipt number for a paid bill (idempotent)
|
|
323
|
-
*/
|
|
324
|
-
issueOrForBill(requestParameters, initOverrides) {
|
|
325
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
326
|
-
const response = yield this.issueOrForBillRaw(requestParameters, initOverrides);
|
|
327
|
-
return yield response.value();
|
|
328
|
-
});
|
|
329
|
-
}
|
|
330
293
|
/**
|
|
331
294
|
* Preview bill calculation without saving (admin)
|
|
332
295
|
*/
|
|
@@ -395,7 +358,7 @@ export class AdminBillsApi extends runtime.BaseAPI {
|
|
|
395
358
|
query: queryParameters,
|
|
396
359
|
body: RecordPaymentDtoToJSON(requestParameters['recordPaymentDto']),
|
|
397
360
|
}, initOverrides);
|
|
398
|
-
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
|
361
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => RecordPaymentSuccessResponseFromJSON(jsonValue));
|
|
399
362
|
});
|
|
400
363
|
}
|
|
401
364
|
/**
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { ConsumerStatusEnum, ConsumersAdminPaginatedResponse, ConsumersAdminUnBilledPaginatedResponse, ConsumersSuccessResponse, CreateConsumerDto, UpdateConsumerDto } from '../models/index';
|
|
13
|
+
import type { ConsumerStatusEnum, ConsumersAdminPaginatedResponse, ConsumersAdminUnBilledPaginatedResponse, ConsumersSuccessResponse, CreateConsumerDto, UpdateConsumerDto, UpdateConsumerStatusDto } from '../models/index';
|
|
14
14
|
export interface CreateAdminConsumerRequest {
|
|
15
15
|
createConsumerDto: CreateConsumerDto;
|
|
16
16
|
}
|
|
@@ -39,6 +39,10 @@ export interface UpdateAdminConsumerRequest {
|
|
|
39
39
|
id: string;
|
|
40
40
|
updateConsumerDto: UpdateConsumerDto;
|
|
41
41
|
}
|
|
42
|
+
export interface UpdateAdminConsumerStatusRequest {
|
|
43
|
+
id: string;
|
|
44
|
+
updateConsumerStatusDto: UpdateConsumerStatusDto;
|
|
45
|
+
}
|
|
42
46
|
/**
|
|
43
47
|
* AdminConsumersApi - interface
|
|
44
48
|
*
|
|
@@ -134,6 +138,20 @@ export interface AdminConsumersApiInterface {
|
|
|
134
138
|
* Update consumer
|
|
135
139
|
*/
|
|
136
140
|
updateAdminConsumer(requestParameters: UpdateAdminConsumerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConsumersSuccessResponse>;
|
|
141
|
+
/**
|
|
142
|
+
*
|
|
143
|
+
* @summary Update consumer status
|
|
144
|
+
* @param {string} id
|
|
145
|
+
* @param {UpdateConsumerStatusDto} updateConsumerStatusDto
|
|
146
|
+
* @param {*} [options] Override http request option.
|
|
147
|
+
* @throws {RequiredError}
|
|
148
|
+
* @memberof AdminConsumersApiInterface
|
|
149
|
+
*/
|
|
150
|
+
updateAdminConsumerStatusRaw(requestParameters: UpdateAdminConsumerStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ConsumersSuccessResponse>>;
|
|
151
|
+
/**
|
|
152
|
+
* Update consumer status
|
|
153
|
+
*/
|
|
154
|
+
updateAdminConsumerStatus(requestParameters: UpdateAdminConsumerStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConsumersSuccessResponse>;
|
|
137
155
|
}
|
|
138
156
|
/**
|
|
139
157
|
*
|
|
@@ -187,6 +205,14 @@ export declare class AdminConsumersApi extends runtime.BaseAPI implements AdminC
|
|
|
187
205
|
* Update consumer
|
|
188
206
|
*/
|
|
189
207
|
updateAdminConsumer(requestParameters: UpdateAdminConsumerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConsumersSuccessResponse>;
|
|
208
|
+
/**
|
|
209
|
+
* Update consumer status
|
|
210
|
+
*/
|
|
211
|
+
updateAdminConsumerStatusRaw(requestParameters: UpdateAdminConsumerStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ConsumersSuccessResponse>>;
|
|
212
|
+
/**
|
|
213
|
+
* Update consumer status
|
|
214
|
+
*/
|
|
215
|
+
updateAdminConsumerStatus(requestParameters: UpdateAdminConsumerStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConsumersSuccessResponse>;
|
|
190
216
|
}
|
|
191
217
|
/**
|
|
192
218
|
* @export
|
|
@@ -21,7 +21,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
21
21
|
});
|
|
22
22
|
};
|
|
23
23
|
import * as runtime from '../runtime';
|
|
24
|
-
import { ConsumersAdminPaginatedResponseFromJSON, ConsumersAdminUnBilledPaginatedResponseFromJSON, ConsumersSuccessResponseFromJSON, CreateConsumerDtoToJSON, UpdateConsumerDtoToJSON, } from '../models/index';
|
|
24
|
+
import { ConsumersAdminPaginatedResponseFromJSON, ConsumersAdminUnBilledPaginatedResponseFromJSON, ConsumersSuccessResponseFromJSON, CreateConsumerDtoToJSON, UpdateConsumerDtoToJSON, UpdateConsumerStatusDtoToJSON, } from '../models/index';
|
|
25
25
|
/**
|
|
26
26
|
*
|
|
27
27
|
*/
|
|
@@ -279,6 +279,48 @@ export class AdminConsumersApi extends runtime.BaseAPI {
|
|
|
279
279
|
return yield response.value();
|
|
280
280
|
});
|
|
281
281
|
}
|
|
282
|
+
/**
|
|
283
|
+
* Update consumer status
|
|
284
|
+
*/
|
|
285
|
+
updateAdminConsumerStatusRaw(requestParameters, initOverrides) {
|
|
286
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
287
|
+
if (requestParameters['id'] == null) {
|
|
288
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling updateAdminConsumerStatus().');
|
|
289
|
+
}
|
|
290
|
+
if (requestParameters['updateConsumerStatusDto'] == null) {
|
|
291
|
+
throw new runtime.RequiredError('updateConsumerStatusDto', 'Required parameter "updateConsumerStatusDto" was null or undefined when calling updateAdminConsumerStatus().');
|
|
292
|
+
}
|
|
293
|
+
const queryParameters = {};
|
|
294
|
+
const headerParameters = {};
|
|
295
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
296
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
297
|
+
const token = this.configuration.accessToken;
|
|
298
|
+
const tokenString = yield token("bearer", []);
|
|
299
|
+
if (tokenString) {
|
|
300
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
let urlPath = `/api/v1/admin/consumers/{id}/status`;
|
|
304
|
+
urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
|
|
305
|
+
const response = yield this.request({
|
|
306
|
+
path: urlPath,
|
|
307
|
+
method: 'PATCH',
|
|
308
|
+
headers: headerParameters,
|
|
309
|
+
query: queryParameters,
|
|
310
|
+
body: UpdateConsumerStatusDtoToJSON(requestParameters['updateConsumerStatusDto']),
|
|
311
|
+
}, initOverrides);
|
|
312
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ConsumersSuccessResponseFromJSON(jsonValue));
|
|
313
|
+
});
|
|
314
|
+
}
|
|
315
|
+
/**
|
|
316
|
+
* Update consumer status
|
|
317
|
+
*/
|
|
318
|
+
updateAdminConsumerStatus(requestParameters, initOverrides) {
|
|
319
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
320
|
+
const response = yield this.updateAdminConsumerStatusRaw(requestParameters, initOverrides);
|
|
321
|
+
return yield response.value();
|
|
322
|
+
});
|
|
323
|
+
}
|
|
282
324
|
}
|
|
283
325
|
/**
|
|
284
326
|
* @export
|
|
@@ -32,6 +32,8 @@ export interface InitiatePaymentDto {
|
|
|
32
32
|
* @export
|
|
33
33
|
*/
|
|
34
34
|
export declare const InitiatePaymentDtoMethodEnum: {
|
|
35
|
+
readonly Cash: "cash";
|
|
36
|
+
readonly Check: "check";
|
|
35
37
|
readonly Gcash: "gcash";
|
|
36
38
|
readonly OnlineBanking: "online_banking";
|
|
37
39
|
readonly BankTransfer: "bank_transfer";
|
|
@@ -121,6 +121,12 @@ export interface Payment {
|
|
|
121
121
|
* @memberof Payment
|
|
122
122
|
*/
|
|
123
123
|
paidAt?: object;
|
|
124
|
+
/**
|
|
125
|
+
* Official Receipt number for this payment transaction
|
|
126
|
+
* @type {string}
|
|
127
|
+
* @memberof Payment
|
|
128
|
+
*/
|
|
129
|
+
orNumber: string;
|
|
124
130
|
}
|
|
125
131
|
/**
|
|
126
132
|
* Check if a given object implements the Payment interface.
|
|
@@ -37,6 +37,8 @@ export function instanceOfPayment(value) {
|
|
|
37
37
|
return false;
|
|
38
38
|
if (!('status' in value) || value['status'] === undefined)
|
|
39
39
|
return false;
|
|
40
|
+
if (!('orNumber' in value) || value['orNumber'] === undefined)
|
|
41
|
+
return false;
|
|
40
42
|
return true;
|
|
41
43
|
}
|
|
42
44
|
export function PaymentFromJSON(json) {
|
|
@@ -64,6 +66,7 @@ export function PaymentFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
64
66
|
'checkoutUrl': json['checkoutUrl'] == null ? undefined : json['checkoutUrl'],
|
|
65
67
|
'gatewayPayload': json['gatewayPayload'] == null ? undefined : json['gatewayPayload'],
|
|
66
68
|
'paidAt': json['paidAt'] == null ? undefined : json['paidAt'],
|
|
69
|
+
'orNumber': json['orNumber'],
|
|
67
70
|
};
|
|
68
71
|
}
|
|
69
72
|
export function PaymentToJSON(json) {
|
|
@@ -91,5 +94,6 @@ export function PaymentToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
91
94
|
'checkoutUrl': value['checkoutUrl'],
|
|
92
95
|
'gatewayPayload': value['gatewayPayload'],
|
|
93
96
|
'paidAt': value['paidAt'],
|
|
97
|
+
'orNumber': value['orNumber'],
|
|
94
98
|
};
|
|
95
99
|
}
|