electric-coop-api 0.1.13 → 0.1.14
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 -0
- package/README.md +2 -2
- package/dist/apis/AdminConsumersApi.d.ts +5 -5
- package/dist/apis/AdminConsumersApi.js +3 -2
- package/dist/esm/apis/AdminConsumersApi.d.ts +5 -5
- package/dist/esm/apis/AdminConsumersApi.js +4 -3
- package/dist/esm/models/ConsumersAdminPaginatedResponse.d.ts +3 -3
- package/dist/esm/models/ConsumersAdminPaginatedResponse.js +3 -3
- package/dist/esm/models/ConsumersUnBilledResponse.d.ts +45 -0
- package/dist/esm/models/ConsumersUnBilledResponse.js +50 -0
- package/dist/esm/models/UnbilledConsumersMetaDto.d.ts +50 -0
- package/dist/esm/models/UnbilledConsumersMetaDto.js +55 -0
- package/dist/esm/models/UnbilledConsumersResponseDto.d.ts +40 -0
- package/dist/esm/models/UnbilledConsumersResponseDto.js +49 -0
- package/dist/esm/models/index.d.ts +3 -0
- package/dist/esm/models/index.js +3 -0
- package/dist/models/ConsumersAdminPaginatedResponse.d.ts +3 -3
- package/dist/models/ConsumersAdminPaginatedResponse.js +3 -3
- package/dist/models/ConsumersUnBilledResponse.d.ts +45 -0
- package/dist/models/ConsumersUnBilledResponse.js +57 -0
- package/dist/models/UnbilledConsumersMetaDto.d.ts +50 -0
- package/dist/models/UnbilledConsumersMetaDto.js +62 -0
- package/dist/models/UnbilledConsumersResponseDto.d.ts +40 -0
- package/dist/models/UnbilledConsumersResponseDto.js +56 -0
- package/dist/models/index.d.ts +3 -0
- package/dist/models/index.js +3 -0
- package/package.json +1 -1
- package/src/apis/AdminConsumersApi.ts +10 -6
- package/src/models/ConsumersAdminPaginatedResponse.ts +11 -11
- package/src/models/ConsumersUnBilledResponse.ts +91 -0
- package/src/models/UnbilledConsumersMetaDto.ts +93 -0
- package/src/models/UnbilledConsumersResponseDto.ts +90 -0
- package/src/models/index.ts +3 -0
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Electric Cooperative Consumer Portal API
|
|
6
|
+
* Multi-tenant SaaS platform for Philippine electric cooperatives
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.instanceOfConsumersUnBilledResponse = instanceOfConsumersUnBilledResponse;
|
|
17
|
+
exports.ConsumersUnBilledResponseFromJSON = ConsumersUnBilledResponseFromJSON;
|
|
18
|
+
exports.ConsumersUnBilledResponseFromJSONTyped = ConsumersUnBilledResponseFromJSONTyped;
|
|
19
|
+
exports.ConsumersUnBilledResponseToJSON = ConsumersUnBilledResponseToJSON;
|
|
20
|
+
exports.ConsumersUnBilledResponseToJSONTyped = ConsumersUnBilledResponseToJSONTyped;
|
|
21
|
+
const UnbilledConsumersResponseDto_1 = require("./UnbilledConsumersResponseDto");
|
|
22
|
+
/**
|
|
23
|
+
* Check if a given object implements the ConsumersUnBilledResponse interface.
|
|
24
|
+
*/
|
|
25
|
+
function instanceOfConsumersUnBilledResponse(value) {
|
|
26
|
+
if (!('success' in value) || value['success'] === undefined)
|
|
27
|
+
return false;
|
|
28
|
+
if (!('data' in value) || value['data'] === undefined)
|
|
29
|
+
return false;
|
|
30
|
+
return true;
|
|
31
|
+
}
|
|
32
|
+
function ConsumersUnBilledResponseFromJSON(json) {
|
|
33
|
+
return ConsumersUnBilledResponseFromJSONTyped(json, false);
|
|
34
|
+
}
|
|
35
|
+
function ConsumersUnBilledResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
36
|
+
if (json == null) {
|
|
37
|
+
return json;
|
|
38
|
+
}
|
|
39
|
+
return {
|
|
40
|
+
'success': json['success'],
|
|
41
|
+
'error': json['error'] == null ? undefined : json['error'],
|
|
42
|
+
'data': (0, UnbilledConsumersResponseDto_1.UnbilledConsumersResponseDtoFromJSON)(json['data']),
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
function ConsumersUnBilledResponseToJSON(json) {
|
|
46
|
+
return ConsumersUnBilledResponseToJSONTyped(json, false);
|
|
47
|
+
}
|
|
48
|
+
function ConsumersUnBilledResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
49
|
+
if (value == null) {
|
|
50
|
+
return value;
|
|
51
|
+
}
|
|
52
|
+
return {
|
|
53
|
+
'success': value['success'],
|
|
54
|
+
'error': value['error'],
|
|
55
|
+
'data': (0, UnbilledConsumersResponseDto_1.UnbilledConsumersResponseDtoToJSON)(value['data']),
|
|
56
|
+
};
|
|
57
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
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
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface UnbilledConsumersMetaDto
|
|
16
|
+
*/
|
|
17
|
+
export interface UnbilledConsumersMetaDto {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {number}
|
|
21
|
+
* @memberof UnbilledConsumersMetaDto
|
|
22
|
+
*/
|
|
23
|
+
unbilled: number;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {number}
|
|
27
|
+
* @memberof UnbilledConsumersMetaDto
|
|
28
|
+
*/
|
|
29
|
+
billed: number;
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {number}
|
|
33
|
+
* @memberof UnbilledConsumersMetaDto
|
|
34
|
+
*/
|
|
35
|
+
total: number;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof UnbilledConsumersMetaDto
|
|
40
|
+
*/
|
|
41
|
+
billingPeriod: string;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Check if a given object implements the UnbilledConsumersMetaDto interface.
|
|
45
|
+
*/
|
|
46
|
+
export declare function instanceOfUnbilledConsumersMetaDto(value: object): value is UnbilledConsumersMetaDto;
|
|
47
|
+
export declare function UnbilledConsumersMetaDtoFromJSON(json: any): UnbilledConsumersMetaDto;
|
|
48
|
+
export declare function UnbilledConsumersMetaDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): UnbilledConsumersMetaDto;
|
|
49
|
+
export declare function UnbilledConsumersMetaDtoToJSON(json: any): UnbilledConsumersMetaDto;
|
|
50
|
+
export declare function UnbilledConsumersMetaDtoToJSONTyped(value?: UnbilledConsumersMetaDto | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Electric Cooperative Consumer Portal API
|
|
6
|
+
* Multi-tenant SaaS platform for Philippine electric cooperatives
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.instanceOfUnbilledConsumersMetaDto = instanceOfUnbilledConsumersMetaDto;
|
|
17
|
+
exports.UnbilledConsumersMetaDtoFromJSON = UnbilledConsumersMetaDtoFromJSON;
|
|
18
|
+
exports.UnbilledConsumersMetaDtoFromJSONTyped = UnbilledConsumersMetaDtoFromJSONTyped;
|
|
19
|
+
exports.UnbilledConsumersMetaDtoToJSON = UnbilledConsumersMetaDtoToJSON;
|
|
20
|
+
exports.UnbilledConsumersMetaDtoToJSONTyped = UnbilledConsumersMetaDtoToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the UnbilledConsumersMetaDto interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfUnbilledConsumersMetaDto(value) {
|
|
25
|
+
if (!('unbilled' in value) || value['unbilled'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
if (!('billed' in value) || value['billed'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
if (!('total' in value) || value['total'] === undefined)
|
|
30
|
+
return false;
|
|
31
|
+
if (!('billingPeriod' in value) || value['billingPeriod'] === undefined)
|
|
32
|
+
return false;
|
|
33
|
+
return true;
|
|
34
|
+
}
|
|
35
|
+
function UnbilledConsumersMetaDtoFromJSON(json) {
|
|
36
|
+
return UnbilledConsumersMetaDtoFromJSONTyped(json, false);
|
|
37
|
+
}
|
|
38
|
+
function UnbilledConsumersMetaDtoFromJSONTyped(json, ignoreDiscriminator) {
|
|
39
|
+
if (json == null) {
|
|
40
|
+
return json;
|
|
41
|
+
}
|
|
42
|
+
return {
|
|
43
|
+
'unbilled': json['unbilled'],
|
|
44
|
+
'billed': json['billed'],
|
|
45
|
+
'total': json['total'],
|
|
46
|
+
'billingPeriod': json['billingPeriod'],
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
function UnbilledConsumersMetaDtoToJSON(json) {
|
|
50
|
+
return UnbilledConsumersMetaDtoToJSONTyped(json, false);
|
|
51
|
+
}
|
|
52
|
+
function UnbilledConsumersMetaDtoToJSONTyped(value, ignoreDiscriminator = false) {
|
|
53
|
+
if (value == null) {
|
|
54
|
+
return value;
|
|
55
|
+
}
|
|
56
|
+
return {
|
|
57
|
+
'unbilled': value['unbilled'],
|
|
58
|
+
'billed': value['billed'],
|
|
59
|
+
'total': value['total'],
|
|
60
|
+
'billingPeriod': value['billingPeriod'],
|
|
61
|
+
};
|
|
62
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
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 { UnbilledConsumersMetaDto } from './UnbilledConsumersMetaDto';
|
|
13
|
+
import type { Consumer } from './Consumer';
|
|
14
|
+
/**
|
|
15
|
+
*
|
|
16
|
+
* @export
|
|
17
|
+
* @interface UnbilledConsumersResponseDto
|
|
18
|
+
*/
|
|
19
|
+
export interface UnbilledConsumersResponseDto {
|
|
20
|
+
/**
|
|
21
|
+
*
|
|
22
|
+
* @type {Array<Consumer>}
|
|
23
|
+
* @memberof UnbilledConsumersResponseDto
|
|
24
|
+
*/
|
|
25
|
+
data: Array<Consumer>;
|
|
26
|
+
/**
|
|
27
|
+
*
|
|
28
|
+
* @type {UnbilledConsumersMetaDto}
|
|
29
|
+
* @memberof UnbilledConsumersResponseDto
|
|
30
|
+
*/
|
|
31
|
+
meta: UnbilledConsumersMetaDto;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Check if a given object implements the UnbilledConsumersResponseDto interface.
|
|
35
|
+
*/
|
|
36
|
+
export declare function instanceOfUnbilledConsumersResponseDto(value: object): value is UnbilledConsumersResponseDto;
|
|
37
|
+
export declare function UnbilledConsumersResponseDtoFromJSON(json: any): UnbilledConsumersResponseDto;
|
|
38
|
+
export declare function UnbilledConsumersResponseDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): UnbilledConsumersResponseDto;
|
|
39
|
+
export declare function UnbilledConsumersResponseDtoToJSON(json: any): UnbilledConsumersResponseDto;
|
|
40
|
+
export declare function UnbilledConsumersResponseDtoToJSONTyped(value?: UnbilledConsumersResponseDto | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Electric Cooperative Consumer Portal API
|
|
6
|
+
* Multi-tenant SaaS platform for Philippine electric cooperatives
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.instanceOfUnbilledConsumersResponseDto = instanceOfUnbilledConsumersResponseDto;
|
|
17
|
+
exports.UnbilledConsumersResponseDtoFromJSON = UnbilledConsumersResponseDtoFromJSON;
|
|
18
|
+
exports.UnbilledConsumersResponseDtoFromJSONTyped = UnbilledConsumersResponseDtoFromJSONTyped;
|
|
19
|
+
exports.UnbilledConsumersResponseDtoToJSON = UnbilledConsumersResponseDtoToJSON;
|
|
20
|
+
exports.UnbilledConsumersResponseDtoToJSONTyped = UnbilledConsumersResponseDtoToJSONTyped;
|
|
21
|
+
const UnbilledConsumersMetaDto_1 = require("./UnbilledConsumersMetaDto");
|
|
22
|
+
const Consumer_1 = require("./Consumer");
|
|
23
|
+
/**
|
|
24
|
+
* Check if a given object implements the UnbilledConsumersResponseDto interface.
|
|
25
|
+
*/
|
|
26
|
+
function instanceOfUnbilledConsumersResponseDto(value) {
|
|
27
|
+
if (!('data' in value) || value['data'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
if (!('meta' in value) || value['meta'] === undefined)
|
|
30
|
+
return false;
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
function UnbilledConsumersResponseDtoFromJSON(json) {
|
|
34
|
+
return UnbilledConsumersResponseDtoFromJSONTyped(json, false);
|
|
35
|
+
}
|
|
36
|
+
function UnbilledConsumersResponseDtoFromJSONTyped(json, ignoreDiscriminator) {
|
|
37
|
+
if (json == null) {
|
|
38
|
+
return json;
|
|
39
|
+
}
|
|
40
|
+
return {
|
|
41
|
+
'data': (json['data'].map(Consumer_1.ConsumerFromJSON)),
|
|
42
|
+
'meta': (0, UnbilledConsumersMetaDto_1.UnbilledConsumersMetaDtoFromJSON)(json['meta']),
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
function UnbilledConsumersResponseDtoToJSON(json) {
|
|
46
|
+
return UnbilledConsumersResponseDtoToJSONTyped(json, false);
|
|
47
|
+
}
|
|
48
|
+
function UnbilledConsumersResponseDtoToJSONTyped(value, ignoreDiscriminator = false) {
|
|
49
|
+
if (value == null) {
|
|
50
|
+
return value;
|
|
51
|
+
}
|
|
52
|
+
return {
|
|
53
|
+
'data': (value['data'].map(Consumer_1.ConsumerToJSON)),
|
|
54
|
+
'meta': (0, UnbilledConsumersMetaDto_1.UnbilledConsumersMetaDtoToJSON)(value['meta']),
|
|
55
|
+
};
|
|
56
|
+
}
|
package/dist/models/index.d.ts
CHANGED
|
@@ -44,6 +44,7 @@ export * from './ConsumerStatusEnum';
|
|
|
44
44
|
export * from './ConsumerTypeEnum';
|
|
45
45
|
export * from './ConsumersAdminPaginatedResponse';
|
|
46
46
|
export * from './ConsumersSuccessResponse';
|
|
47
|
+
export * from './ConsumersUnBilledResponse';
|
|
47
48
|
export * from './CreateBillDto';
|
|
48
49
|
export * from './CreateConsumerAccountDto';
|
|
49
50
|
export * from './CreateConsumerDto';
|
|
@@ -97,6 +98,8 @@ export * from './ServiceRequestTypeEnum';
|
|
|
97
98
|
export * from './StaffUsersPaginatedResponse';
|
|
98
99
|
export * from './Tenant';
|
|
99
100
|
export * from './TenantStatusEnum';
|
|
101
|
+
export * from './UnbilledConsumersMetaDto';
|
|
102
|
+
export * from './UnbilledConsumersResponseDto';
|
|
100
103
|
export * from './UpdateBillDto';
|
|
101
104
|
export * from './UpdateComplaintDto';
|
|
102
105
|
export * from './UpdateConsumerDto';
|
package/dist/models/index.js
CHANGED
|
@@ -62,6 +62,7 @@ __exportStar(require("./ConsumerStatusEnum"), exports);
|
|
|
62
62
|
__exportStar(require("./ConsumerTypeEnum"), exports);
|
|
63
63
|
__exportStar(require("./ConsumersAdminPaginatedResponse"), exports);
|
|
64
64
|
__exportStar(require("./ConsumersSuccessResponse"), exports);
|
|
65
|
+
__exportStar(require("./ConsumersUnBilledResponse"), exports);
|
|
65
66
|
__exportStar(require("./CreateBillDto"), exports);
|
|
66
67
|
__exportStar(require("./CreateConsumerAccountDto"), exports);
|
|
67
68
|
__exportStar(require("./CreateConsumerDto"), exports);
|
|
@@ -115,6 +116,8 @@ __exportStar(require("./ServiceRequestTypeEnum"), exports);
|
|
|
115
116
|
__exportStar(require("./StaffUsersPaginatedResponse"), exports);
|
|
116
117
|
__exportStar(require("./Tenant"), exports);
|
|
117
118
|
__exportStar(require("./TenantStatusEnum"), exports);
|
|
119
|
+
__exportStar(require("./UnbilledConsumersMetaDto"), exports);
|
|
120
|
+
__exportStar(require("./UnbilledConsumersResponseDto"), exports);
|
|
118
121
|
__exportStar(require("./UpdateBillDto"), exports);
|
|
119
122
|
__exportStar(require("./UpdateComplaintDto"), exports);
|
|
120
123
|
__exportStar(require("./UpdateConsumerDto"), exports);
|
package/package.json
CHANGED
|
@@ -18,6 +18,7 @@ import type {
|
|
|
18
18
|
ConsumerStatusEnum,
|
|
19
19
|
ConsumersAdminPaginatedResponse,
|
|
20
20
|
ConsumersSuccessResponse,
|
|
21
|
+
ConsumersUnBilledResponse,
|
|
21
22
|
CreateConsumerDto,
|
|
22
23
|
UpdateConsumerDto,
|
|
23
24
|
} from '../models/index';
|
|
@@ -28,6 +29,8 @@ import {
|
|
|
28
29
|
ConsumersAdminPaginatedResponseToJSON,
|
|
29
30
|
ConsumersSuccessResponseFromJSON,
|
|
30
31
|
ConsumersSuccessResponseToJSON,
|
|
32
|
+
ConsumersUnBilledResponseFromJSON,
|
|
33
|
+
ConsumersUnBilledResponseToJSON,
|
|
31
34
|
CreateConsumerDtoFromJSON,
|
|
32
35
|
CreateConsumerDtoToJSON,
|
|
33
36
|
UpdateConsumerDtoFromJSON,
|
|
@@ -144,12 +147,12 @@ export interface AdminConsumersApiInterface {
|
|
|
144
147
|
* @throws {RequiredError}
|
|
145
148
|
* @memberof AdminConsumersApiInterface
|
|
146
149
|
*/
|
|
147
|
-
getAdminUnbilledConsumersRaw(requestParameters: GetAdminUnbilledConsumersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<
|
|
150
|
+
getAdminUnbilledConsumersRaw(requestParameters: GetAdminUnbilledConsumersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ConsumersUnBilledResponse>>;
|
|
148
151
|
|
|
149
152
|
/**
|
|
150
153
|
* Get unbilled consumers by billing period
|
|
151
154
|
*/
|
|
152
|
-
getAdminUnbilledConsumers(requestParameters: GetAdminUnbilledConsumersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<
|
|
155
|
+
getAdminUnbilledConsumers(requestParameters: GetAdminUnbilledConsumersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConsumersUnBilledResponse>;
|
|
153
156
|
|
|
154
157
|
/**
|
|
155
158
|
*
|
|
@@ -374,7 +377,7 @@ export class AdminConsumersApi extends runtime.BaseAPI implements AdminConsumers
|
|
|
374
377
|
/**
|
|
375
378
|
* Get unbilled consumers by billing period
|
|
376
379
|
*/
|
|
377
|
-
async getAdminUnbilledConsumersRaw(requestParameters: GetAdminUnbilledConsumersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<
|
|
380
|
+
async getAdminUnbilledConsumersRaw(requestParameters: GetAdminUnbilledConsumersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ConsumersUnBilledResponse>> {
|
|
378
381
|
if (requestParameters['billingPeriod'] == null) {
|
|
379
382
|
throw new runtime.RequiredError(
|
|
380
383
|
'billingPeriod',
|
|
@@ -405,14 +408,15 @@ export class AdminConsumersApi extends runtime.BaseAPI implements AdminConsumers
|
|
|
405
408
|
query: queryParameters,
|
|
406
409
|
}, initOverrides);
|
|
407
410
|
|
|
408
|
-
return new runtime.
|
|
411
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ConsumersUnBilledResponseFromJSON(jsonValue));
|
|
409
412
|
}
|
|
410
413
|
|
|
411
414
|
/**
|
|
412
415
|
* Get unbilled consumers by billing period
|
|
413
416
|
*/
|
|
414
|
-
async getAdminUnbilledConsumers(requestParameters: GetAdminUnbilledConsumersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<
|
|
415
|
-
await this.getAdminUnbilledConsumersRaw(requestParameters, initOverrides);
|
|
417
|
+
async getAdminUnbilledConsumers(requestParameters: GetAdminUnbilledConsumersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConsumersUnBilledResponse> {
|
|
418
|
+
const response = await this.getAdminUnbilledConsumersRaw(requestParameters, initOverrides);
|
|
419
|
+
return await response.value();
|
|
416
420
|
}
|
|
417
421
|
|
|
418
422
|
/**
|
|
@@ -13,6 +13,13 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { mapValues } from '../runtime';
|
|
16
|
+
import type { Consumer } from './Consumer';
|
|
17
|
+
import {
|
|
18
|
+
ConsumerFromJSON,
|
|
19
|
+
ConsumerFromJSONTyped,
|
|
20
|
+
ConsumerToJSON,
|
|
21
|
+
ConsumerToJSONTyped,
|
|
22
|
+
} from './Consumer';
|
|
16
23
|
import type { PaginationMetaDto } from './PaginationMetaDto';
|
|
17
24
|
import {
|
|
18
25
|
PaginationMetaDtoFromJSON,
|
|
@@ -20,13 +27,6 @@ import {
|
|
|
20
27
|
PaginationMetaDtoToJSON,
|
|
21
28
|
PaginationMetaDtoToJSONTyped,
|
|
22
29
|
} from './PaginationMetaDto';
|
|
23
|
-
import type { PaginatedResponseDto } from './PaginatedResponseDto';
|
|
24
|
-
import {
|
|
25
|
-
PaginatedResponseDtoFromJSON,
|
|
26
|
-
PaginatedResponseDtoFromJSONTyped,
|
|
27
|
-
PaginatedResponseDtoToJSON,
|
|
28
|
-
PaginatedResponseDtoToJSONTyped,
|
|
29
|
-
} from './PaginatedResponseDto';
|
|
30
30
|
|
|
31
31
|
/**
|
|
32
32
|
*
|
|
@@ -48,10 +48,10 @@ export interface ConsumersAdminPaginatedResponse {
|
|
|
48
48
|
error?: string;
|
|
49
49
|
/**
|
|
50
50
|
*
|
|
51
|
-
* @type {Array<
|
|
51
|
+
* @type {Array<Consumer>}
|
|
52
52
|
* @memberof ConsumersAdminPaginatedResponse
|
|
53
53
|
*/
|
|
54
|
-
data: Array<
|
|
54
|
+
data: Array<Consumer>;
|
|
55
55
|
/**
|
|
56
56
|
*
|
|
57
57
|
* @type {PaginationMetaDto}
|
|
@@ -82,7 +82,7 @@ export function ConsumersAdminPaginatedResponseFromJSONTyped(json: any, ignoreDi
|
|
|
82
82
|
|
|
83
83
|
'success': json['success'],
|
|
84
84
|
'error': json['error'] == null ? undefined : json['error'],
|
|
85
|
-
'data': ((json['data'] as Array<any>).map(
|
|
85
|
+
'data': ((json['data'] as Array<any>).map(ConsumerFromJSON)),
|
|
86
86
|
'meta': PaginationMetaDtoFromJSON(json['meta']),
|
|
87
87
|
};
|
|
88
88
|
}
|
|
@@ -100,7 +100,7 @@ export function ConsumersAdminPaginatedResponseToJSONTyped(value?: ConsumersAdmi
|
|
|
100
100
|
|
|
101
101
|
'success': value['success'],
|
|
102
102
|
'error': value['error'],
|
|
103
|
-
'data': ((value['data'] as Array<any>).map(
|
|
103
|
+
'data': ((value['data'] as Array<any>).map(ConsumerToJSON)),
|
|
104
104
|
'meta': PaginationMetaDtoToJSON(value['meta']),
|
|
105
105
|
};
|
|
106
106
|
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Electric Cooperative Consumer Portal API
|
|
5
|
+
* Multi-tenant SaaS platform for Philippine electric cooperatives
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { UnbilledConsumersResponseDto } from './UnbilledConsumersResponseDto';
|
|
17
|
+
import {
|
|
18
|
+
UnbilledConsumersResponseDtoFromJSON,
|
|
19
|
+
UnbilledConsumersResponseDtoFromJSONTyped,
|
|
20
|
+
UnbilledConsumersResponseDtoToJSON,
|
|
21
|
+
UnbilledConsumersResponseDtoToJSONTyped,
|
|
22
|
+
} from './UnbilledConsumersResponseDto';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface ConsumersUnBilledResponse
|
|
28
|
+
*/
|
|
29
|
+
export interface ConsumersUnBilledResponse {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {boolean}
|
|
33
|
+
* @memberof ConsumersUnBilledResponse
|
|
34
|
+
*/
|
|
35
|
+
success: boolean;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof ConsumersUnBilledResponse
|
|
40
|
+
*/
|
|
41
|
+
error?: string;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {UnbilledConsumersResponseDto}
|
|
45
|
+
* @memberof ConsumersUnBilledResponse
|
|
46
|
+
*/
|
|
47
|
+
data: UnbilledConsumersResponseDto;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Check if a given object implements the ConsumersUnBilledResponse interface.
|
|
52
|
+
*/
|
|
53
|
+
export function instanceOfConsumersUnBilledResponse(value: object): value is ConsumersUnBilledResponse {
|
|
54
|
+
if (!('success' in value) || value['success'] === undefined) return false;
|
|
55
|
+
if (!('data' in value) || value['data'] === undefined) return false;
|
|
56
|
+
return true;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function ConsumersUnBilledResponseFromJSON(json: any): ConsumersUnBilledResponse {
|
|
60
|
+
return ConsumersUnBilledResponseFromJSONTyped(json, false);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function ConsumersUnBilledResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConsumersUnBilledResponse {
|
|
64
|
+
if (json == null) {
|
|
65
|
+
return json;
|
|
66
|
+
}
|
|
67
|
+
return {
|
|
68
|
+
|
|
69
|
+
'success': json['success'],
|
|
70
|
+
'error': json['error'] == null ? undefined : json['error'],
|
|
71
|
+
'data': UnbilledConsumersResponseDtoFromJSON(json['data']),
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export function ConsumersUnBilledResponseToJSON(json: any): ConsumersUnBilledResponse {
|
|
76
|
+
return ConsumersUnBilledResponseToJSONTyped(json, false);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function ConsumersUnBilledResponseToJSONTyped(value?: ConsumersUnBilledResponse | null, ignoreDiscriminator: boolean = false): any {
|
|
80
|
+
if (value == null) {
|
|
81
|
+
return value;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
return {
|
|
85
|
+
|
|
86
|
+
'success': value['success'],
|
|
87
|
+
'error': value['error'],
|
|
88
|
+
'data': UnbilledConsumersResponseDtoToJSON(value['data']),
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Electric Cooperative Consumer Portal API
|
|
5
|
+
* Multi-tenant SaaS platform for Philippine electric cooperatives
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface UnbilledConsumersMetaDto
|
|
20
|
+
*/
|
|
21
|
+
export interface UnbilledConsumersMetaDto {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof UnbilledConsumersMetaDto
|
|
26
|
+
*/
|
|
27
|
+
unbilled: number;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {number}
|
|
31
|
+
* @memberof UnbilledConsumersMetaDto
|
|
32
|
+
*/
|
|
33
|
+
billed: number;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {number}
|
|
37
|
+
* @memberof UnbilledConsumersMetaDto
|
|
38
|
+
*/
|
|
39
|
+
total: number;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {string}
|
|
43
|
+
* @memberof UnbilledConsumersMetaDto
|
|
44
|
+
*/
|
|
45
|
+
billingPeriod: string;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Check if a given object implements the UnbilledConsumersMetaDto interface.
|
|
50
|
+
*/
|
|
51
|
+
export function instanceOfUnbilledConsumersMetaDto(value: object): value is UnbilledConsumersMetaDto {
|
|
52
|
+
if (!('unbilled' in value) || value['unbilled'] === undefined) return false;
|
|
53
|
+
if (!('billed' in value) || value['billed'] === undefined) return false;
|
|
54
|
+
if (!('total' in value) || value['total'] === undefined) return false;
|
|
55
|
+
if (!('billingPeriod' in value) || value['billingPeriod'] === undefined) return false;
|
|
56
|
+
return true;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function UnbilledConsumersMetaDtoFromJSON(json: any): UnbilledConsumersMetaDto {
|
|
60
|
+
return UnbilledConsumersMetaDtoFromJSONTyped(json, false);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function UnbilledConsumersMetaDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): UnbilledConsumersMetaDto {
|
|
64
|
+
if (json == null) {
|
|
65
|
+
return json;
|
|
66
|
+
}
|
|
67
|
+
return {
|
|
68
|
+
|
|
69
|
+
'unbilled': json['unbilled'],
|
|
70
|
+
'billed': json['billed'],
|
|
71
|
+
'total': json['total'],
|
|
72
|
+
'billingPeriod': json['billingPeriod'],
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export function UnbilledConsumersMetaDtoToJSON(json: any): UnbilledConsumersMetaDto {
|
|
77
|
+
return UnbilledConsumersMetaDtoToJSONTyped(json, false);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export function UnbilledConsumersMetaDtoToJSONTyped(value?: UnbilledConsumersMetaDto | null, ignoreDiscriminator: boolean = false): any {
|
|
81
|
+
if (value == null) {
|
|
82
|
+
return value;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
return {
|
|
86
|
+
|
|
87
|
+
'unbilled': value['unbilled'],
|
|
88
|
+
'billed': value['billed'],
|
|
89
|
+
'total': value['total'],
|
|
90
|
+
'billingPeriod': value['billingPeriod'],
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
|