electric-coop-api 0.1.62 → 0.1.63
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 +1 -0
- package/README.md +2 -2
- package/dist/apis/UsersApi.d.ts +5 -5
- package/dist/apis/UsersApi.js +1 -1
- package/dist/esm/apis/UsersApi.d.ts +5 -5
- package/dist/esm/apis/UsersApi.js +2 -2
- package/dist/esm/models/ConsumerAccounts.d.ts +45 -0
- package/dist/esm/models/ConsumerAccounts.js +50 -0
- package/dist/esm/models/index.d.ts +1 -0
- package/dist/esm/models/index.js +1 -0
- package/dist/models/ConsumerAccounts.d.ts +45 -0
- package/dist/models/ConsumerAccounts.js +57 -0
- package/dist/models/index.d.ts +1 -0
- package/dist/models/index.js +1 -0
- package/package.json +1 -1
- package/src/apis/UsersApi.ts +8 -5
- package/src/models/ConsumerAccounts.ts +91 -0
- package/src/models/index.ts +1 -0
package/.openapi-generator/FILES
CHANGED
|
@@ -94,6 +94,7 @@ src/models/ComplaintsAdminPaginatedResponse.ts
|
|
|
94
94
|
src/models/ComplaintsPaginatedResponse.ts
|
|
95
95
|
src/models/ComplaintsSuccessResponse.ts
|
|
96
96
|
src/models/Consumer.ts
|
|
97
|
+
src/models/ConsumerAccounts.ts
|
|
97
98
|
src/models/ConsumerBasicInfoDto.ts
|
|
98
99
|
src/models/ConsumerInfoDto.ts
|
|
99
100
|
src/models/ConsumerMetadataDto.ts
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## electric-coop-api@0.1.
|
|
1
|
+
## electric-coop-api@0.1.63
|
|
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.63 --save
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
_unPublished (not recommended):_
|
package/dist/apis/UsersApi.d.ts
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { ConsumersSuccessResponse, CreateConsumerAccountDto, CreateUserDto, FieldRoleEnum, LinkConsumerAccountDto, StaffUsersPaginatedResponse, UpdateUserDto, UserDepartmentEnum, UserRoleEnum, UsersPaginatedResponse, UsersSuccessResponse } from '../models/index';
|
|
13
|
+
import type { ConsumerAccounts, ConsumersSuccessResponse, CreateConsumerAccountDto, CreateUserDto, FieldRoleEnum, LinkConsumerAccountDto, StaffUsersPaginatedResponse, UpdateUserDto, UserDepartmentEnum, UserRoleEnum, UsersPaginatedResponse, UsersSuccessResponse } from '../models/index';
|
|
14
14
|
export interface CreateAdminUserRequest {
|
|
15
15
|
createUserDto: CreateUserDto;
|
|
16
16
|
}
|
|
@@ -138,11 +138,11 @@ export interface UsersApiInterface {
|
|
|
138
138
|
* @throws {RequiredError}
|
|
139
139
|
* @memberof UsersApiInterface
|
|
140
140
|
*/
|
|
141
|
-
getAdminUserConsumerAccountsRaw(requestParameters: GetAdminUserConsumerAccountsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<
|
|
141
|
+
getAdminUserConsumerAccountsRaw(requestParameters: GetAdminUserConsumerAccountsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ConsumerAccounts>>;
|
|
142
142
|
/**
|
|
143
143
|
* Get user consumer accounts
|
|
144
144
|
*/
|
|
145
|
-
getAdminUserConsumerAccounts(requestParameters: GetAdminUserConsumerAccountsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<
|
|
145
|
+
getAdminUserConsumerAccounts(requestParameters: GetAdminUserConsumerAccountsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConsumerAccounts>;
|
|
146
146
|
/**
|
|
147
147
|
*
|
|
148
148
|
* @summary Get paginated staff users
|
|
@@ -250,11 +250,11 @@ export declare class UsersApi extends runtime.BaseAPI implements UsersApiInterfa
|
|
|
250
250
|
/**
|
|
251
251
|
* Get user consumer accounts
|
|
252
252
|
*/
|
|
253
|
-
getAdminUserConsumerAccountsRaw(requestParameters: GetAdminUserConsumerAccountsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<
|
|
253
|
+
getAdminUserConsumerAccountsRaw(requestParameters: GetAdminUserConsumerAccountsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ConsumerAccounts>>;
|
|
254
254
|
/**
|
|
255
255
|
* Get user consumer accounts
|
|
256
256
|
*/
|
|
257
|
-
getAdminUserConsumerAccounts(requestParameters: GetAdminUserConsumerAccountsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<
|
|
257
|
+
getAdminUserConsumerAccounts(requestParameters: GetAdminUserConsumerAccountsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConsumerAccounts>;
|
|
258
258
|
/**
|
|
259
259
|
* Get paginated staff users
|
|
260
260
|
*/
|
package/dist/apis/UsersApi.js
CHANGED
|
@@ -255,7 +255,7 @@ class UsersApi extends runtime.BaseAPI {
|
|
|
255
255
|
headers: headerParameters,
|
|
256
256
|
query: queryParameters,
|
|
257
257
|
}, initOverrides);
|
|
258
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.
|
|
258
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ConsumerAccountsFromJSON)(jsonValue));
|
|
259
259
|
});
|
|
260
260
|
}
|
|
261
261
|
/**
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { ConsumersSuccessResponse, CreateConsumerAccountDto, CreateUserDto, FieldRoleEnum, LinkConsumerAccountDto, StaffUsersPaginatedResponse, UpdateUserDto, UserDepartmentEnum, UserRoleEnum, UsersPaginatedResponse, UsersSuccessResponse } from '../models/index';
|
|
13
|
+
import type { ConsumerAccounts, ConsumersSuccessResponse, CreateConsumerAccountDto, CreateUserDto, FieldRoleEnum, LinkConsumerAccountDto, StaffUsersPaginatedResponse, UpdateUserDto, UserDepartmentEnum, UserRoleEnum, UsersPaginatedResponse, UsersSuccessResponse } from '../models/index';
|
|
14
14
|
export interface CreateAdminUserRequest {
|
|
15
15
|
createUserDto: CreateUserDto;
|
|
16
16
|
}
|
|
@@ -138,11 +138,11 @@ export interface UsersApiInterface {
|
|
|
138
138
|
* @throws {RequiredError}
|
|
139
139
|
* @memberof UsersApiInterface
|
|
140
140
|
*/
|
|
141
|
-
getAdminUserConsumerAccountsRaw(requestParameters: GetAdminUserConsumerAccountsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<
|
|
141
|
+
getAdminUserConsumerAccountsRaw(requestParameters: GetAdminUserConsumerAccountsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ConsumerAccounts>>;
|
|
142
142
|
/**
|
|
143
143
|
* Get user consumer accounts
|
|
144
144
|
*/
|
|
145
|
-
getAdminUserConsumerAccounts(requestParameters: GetAdminUserConsumerAccountsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<
|
|
145
|
+
getAdminUserConsumerAccounts(requestParameters: GetAdminUserConsumerAccountsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConsumerAccounts>;
|
|
146
146
|
/**
|
|
147
147
|
*
|
|
148
148
|
* @summary Get paginated staff users
|
|
@@ -250,11 +250,11 @@ export declare class UsersApi extends runtime.BaseAPI implements UsersApiInterfa
|
|
|
250
250
|
/**
|
|
251
251
|
* Get user consumer accounts
|
|
252
252
|
*/
|
|
253
|
-
getAdminUserConsumerAccountsRaw(requestParameters: GetAdminUserConsumerAccountsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<
|
|
253
|
+
getAdminUserConsumerAccountsRaw(requestParameters: GetAdminUserConsumerAccountsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ConsumerAccounts>>;
|
|
254
254
|
/**
|
|
255
255
|
* Get user consumer accounts
|
|
256
256
|
*/
|
|
257
|
-
getAdminUserConsumerAccounts(requestParameters: GetAdminUserConsumerAccountsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<
|
|
257
|
+
getAdminUserConsumerAccounts(requestParameters: GetAdminUserConsumerAccountsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConsumerAccounts>;
|
|
258
258
|
/**
|
|
259
259
|
* Get paginated staff users
|
|
260
260
|
*/
|
|
@@ -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 { ConsumersSuccessResponseFromJSON, CreateConsumerAccountDtoToJSON, CreateUserDtoToJSON, LinkConsumerAccountDtoToJSON, StaffUsersPaginatedResponseFromJSON, UpdateUserDtoToJSON, UsersPaginatedResponseFromJSON, UsersSuccessResponseFromJSON, } from '../models/index';
|
|
24
|
+
import { ConsumerAccountsFromJSON, ConsumersSuccessResponseFromJSON, CreateConsumerAccountDtoToJSON, CreateUserDtoToJSON, LinkConsumerAccountDtoToJSON, StaffUsersPaginatedResponseFromJSON, UpdateUserDtoToJSON, UsersPaginatedResponseFromJSON, UsersSuccessResponseFromJSON, } from '../models/index';
|
|
25
25
|
/**
|
|
26
26
|
*
|
|
27
27
|
*/
|
|
@@ -252,7 +252,7 @@ export class UsersApi extends runtime.BaseAPI {
|
|
|
252
252
|
headers: headerParameters,
|
|
253
253
|
query: queryParameters,
|
|
254
254
|
}, initOverrides);
|
|
255
|
-
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
|
255
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ConsumerAccountsFromJSON(jsonValue));
|
|
256
256
|
});
|
|
257
257
|
}
|
|
258
258
|
/**
|
|
@@ -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 { Consumer } from './Consumer';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface ConsumerAccounts
|
|
17
|
+
*/
|
|
18
|
+
export interface ConsumerAccounts {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {boolean}
|
|
22
|
+
* @memberof ConsumerAccounts
|
|
23
|
+
*/
|
|
24
|
+
success: boolean;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {string}
|
|
28
|
+
* @memberof ConsumerAccounts
|
|
29
|
+
*/
|
|
30
|
+
error?: string;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @type {Array<Consumer>}
|
|
34
|
+
* @memberof ConsumerAccounts
|
|
35
|
+
*/
|
|
36
|
+
data: Array<Consumer>;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Check if a given object implements the ConsumerAccounts interface.
|
|
40
|
+
*/
|
|
41
|
+
export declare function instanceOfConsumerAccounts(value: object): value is ConsumerAccounts;
|
|
42
|
+
export declare function ConsumerAccountsFromJSON(json: any): ConsumerAccounts;
|
|
43
|
+
export declare function ConsumerAccountsFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConsumerAccounts;
|
|
44
|
+
export declare function ConsumerAccountsToJSON(json: any): ConsumerAccounts;
|
|
45
|
+
export declare function ConsumerAccountsToJSONTyped(value?: ConsumerAccounts | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Electric Cooperative Consumer Portal API
|
|
5
|
+
* Multi-tenant SaaS platform for Philippine electric cooperatives
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
import { ConsumerFromJSON, ConsumerToJSON, } from './Consumer';
|
|
15
|
+
/**
|
|
16
|
+
* Check if a given object implements the ConsumerAccounts interface.
|
|
17
|
+
*/
|
|
18
|
+
export function instanceOfConsumerAccounts(value) {
|
|
19
|
+
if (!('success' in value) || value['success'] === undefined)
|
|
20
|
+
return false;
|
|
21
|
+
if (!('data' in value) || value['data'] === undefined)
|
|
22
|
+
return false;
|
|
23
|
+
return true;
|
|
24
|
+
}
|
|
25
|
+
export function ConsumerAccountsFromJSON(json) {
|
|
26
|
+
return ConsumerAccountsFromJSONTyped(json, false);
|
|
27
|
+
}
|
|
28
|
+
export function ConsumerAccountsFromJSONTyped(json, ignoreDiscriminator) {
|
|
29
|
+
if (json == null) {
|
|
30
|
+
return json;
|
|
31
|
+
}
|
|
32
|
+
return {
|
|
33
|
+
'success': json['success'],
|
|
34
|
+
'error': json['error'] == null ? undefined : json['error'],
|
|
35
|
+
'data': (json['data'].map(ConsumerFromJSON)),
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
export function ConsumerAccountsToJSON(json) {
|
|
39
|
+
return ConsumerAccountsToJSONTyped(json, false);
|
|
40
|
+
}
|
|
41
|
+
export function ConsumerAccountsToJSONTyped(value, ignoreDiscriminator = false) {
|
|
42
|
+
if (value == null) {
|
|
43
|
+
return value;
|
|
44
|
+
}
|
|
45
|
+
return {
|
|
46
|
+
'success': value['success'],
|
|
47
|
+
'error': value['error'],
|
|
48
|
+
'data': (value['data'].map(ConsumerToJSON)),
|
|
49
|
+
};
|
|
50
|
+
}
|
|
@@ -61,6 +61,7 @@ export * from './ComplaintsAdminPaginatedResponse';
|
|
|
61
61
|
export * from './ComplaintsPaginatedResponse';
|
|
62
62
|
export * from './ComplaintsSuccessResponse';
|
|
63
63
|
export * from './Consumer';
|
|
64
|
+
export * from './ConsumerAccounts';
|
|
64
65
|
export * from './ConsumerBasicInfoDto';
|
|
65
66
|
export * from './ConsumerInfoDto';
|
|
66
67
|
export * from './ConsumerMetadataDto';
|
package/dist/esm/models/index.js
CHANGED
|
@@ -63,6 +63,7 @@ export * from './ComplaintsAdminPaginatedResponse';
|
|
|
63
63
|
export * from './ComplaintsPaginatedResponse';
|
|
64
64
|
export * from './ComplaintsSuccessResponse';
|
|
65
65
|
export * from './Consumer';
|
|
66
|
+
export * from './ConsumerAccounts';
|
|
66
67
|
export * from './ConsumerBasicInfoDto';
|
|
67
68
|
export * from './ConsumerInfoDto';
|
|
68
69
|
export * from './ConsumerMetadataDto';
|
|
@@ -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 { Consumer } from './Consumer';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface ConsumerAccounts
|
|
17
|
+
*/
|
|
18
|
+
export interface ConsumerAccounts {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {boolean}
|
|
22
|
+
* @memberof ConsumerAccounts
|
|
23
|
+
*/
|
|
24
|
+
success: boolean;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {string}
|
|
28
|
+
* @memberof ConsumerAccounts
|
|
29
|
+
*/
|
|
30
|
+
error?: string;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @type {Array<Consumer>}
|
|
34
|
+
* @memberof ConsumerAccounts
|
|
35
|
+
*/
|
|
36
|
+
data: Array<Consumer>;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Check if a given object implements the ConsumerAccounts interface.
|
|
40
|
+
*/
|
|
41
|
+
export declare function instanceOfConsumerAccounts(value: object): value is ConsumerAccounts;
|
|
42
|
+
export declare function ConsumerAccountsFromJSON(json: any): ConsumerAccounts;
|
|
43
|
+
export declare function ConsumerAccountsFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConsumerAccounts;
|
|
44
|
+
export declare function ConsumerAccountsToJSON(json: any): ConsumerAccounts;
|
|
45
|
+
export declare function ConsumerAccountsToJSONTyped(value?: ConsumerAccounts | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -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.instanceOfConsumerAccounts = instanceOfConsumerAccounts;
|
|
17
|
+
exports.ConsumerAccountsFromJSON = ConsumerAccountsFromJSON;
|
|
18
|
+
exports.ConsumerAccountsFromJSONTyped = ConsumerAccountsFromJSONTyped;
|
|
19
|
+
exports.ConsumerAccountsToJSON = ConsumerAccountsToJSON;
|
|
20
|
+
exports.ConsumerAccountsToJSONTyped = ConsumerAccountsToJSONTyped;
|
|
21
|
+
const Consumer_1 = require("./Consumer");
|
|
22
|
+
/**
|
|
23
|
+
* Check if a given object implements the ConsumerAccounts interface.
|
|
24
|
+
*/
|
|
25
|
+
function instanceOfConsumerAccounts(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 ConsumerAccountsFromJSON(json) {
|
|
33
|
+
return ConsumerAccountsFromJSONTyped(json, false);
|
|
34
|
+
}
|
|
35
|
+
function ConsumerAccountsFromJSONTyped(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': (json['data'].map(Consumer_1.ConsumerFromJSON)),
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
function ConsumerAccountsToJSON(json) {
|
|
46
|
+
return ConsumerAccountsToJSONTyped(json, false);
|
|
47
|
+
}
|
|
48
|
+
function ConsumerAccountsToJSONTyped(value, ignoreDiscriminator = false) {
|
|
49
|
+
if (value == null) {
|
|
50
|
+
return value;
|
|
51
|
+
}
|
|
52
|
+
return {
|
|
53
|
+
'success': value['success'],
|
|
54
|
+
'error': value['error'],
|
|
55
|
+
'data': (value['data'].map(Consumer_1.ConsumerToJSON)),
|
|
56
|
+
};
|
|
57
|
+
}
|
package/dist/models/index.d.ts
CHANGED
|
@@ -61,6 +61,7 @@ export * from './ComplaintsAdminPaginatedResponse';
|
|
|
61
61
|
export * from './ComplaintsPaginatedResponse';
|
|
62
62
|
export * from './ComplaintsSuccessResponse';
|
|
63
63
|
export * from './Consumer';
|
|
64
|
+
export * from './ConsumerAccounts';
|
|
64
65
|
export * from './ConsumerBasicInfoDto';
|
|
65
66
|
export * from './ConsumerInfoDto';
|
|
66
67
|
export * from './ConsumerMetadataDto';
|
package/dist/models/index.js
CHANGED
|
@@ -79,6 +79,7 @@ __exportStar(require("./ComplaintsAdminPaginatedResponse"), exports);
|
|
|
79
79
|
__exportStar(require("./ComplaintsPaginatedResponse"), exports);
|
|
80
80
|
__exportStar(require("./ComplaintsSuccessResponse"), exports);
|
|
81
81
|
__exportStar(require("./Consumer"), exports);
|
|
82
|
+
__exportStar(require("./ConsumerAccounts"), exports);
|
|
82
83
|
__exportStar(require("./ConsumerBasicInfoDto"), exports);
|
|
83
84
|
__exportStar(require("./ConsumerInfoDto"), exports);
|
|
84
85
|
__exportStar(require("./ConsumerMetadataDto"), exports);
|
package/package.json
CHANGED
package/src/apis/UsersApi.ts
CHANGED
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
|
|
16
16
|
import * as runtime from '../runtime';
|
|
17
17
|
import type {
|
|
18
|
+
ConsumerAccounts,
|
|
18
19
|
ConsumersSuccessResponse,
|
|
19
20
|
CreateConsumerAccountDto,
|
|
20
21
|
CreateUserDto,
|
|
@@ -29,6 +30,8 @@ import type {
|
|
|
29
30
|
UsersSuccessResponse,
|
|
30
31
|
} from '../models/index';
|
|
31
32
|
import {
|
|
33
|
+
ConsumerAccountsFromJSON,
|
|
34
|
+
ConsumerAccountsToJSON,
|
|
32
35
|
ConsumersSuccessResponseFromJSON,
|
|
33
36
|
ConsumersSuccessResponseToJSON,
|
|
34
37
|
CreateConsumerAccountDtoFromJSON,
|
|
@@ -202,12 +205,12 @@ export interface UsersApiInterface {
|
|
|
202
205
|
* @throws {RequiredError}
|
|
203
206
|
* @memberof UsersApiInterface
|
|
204
207
|
*/
|
|
205
|
-
getAdminUserConsumerAccountsRaw(requestParameters: GetAdminUserConsumerAccountsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<
|
|
208
|
+
getAdminUserConsumerAccountsRaw(requestParameters: GetAdminUserConsumerAccountsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ConsumerAccounts>>;
|
|
206
209
|
|
|
207
210
|
/**
|
|
208
211
|
* Get user consumer accounts
|
|
209
212
|
*/
|
|
210
|
-
getAdminUserConsumerAccounts(requestParameters: GetAdminUserConsumerAccountsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<
|
|
213
|
+
getAdminUserConsumerAccounts(requestParameters: GetAdminUserConsumerAccountsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConsumerAccounts>;
|
|
211
214
|
|
|
212
215
|
/**
|
|
213
216
|
*
|
|
@@ -534,7 +537,7 @@ export class UsersApi extends runtime.BaseAPI implements UsersApiInterface {
|
|
|
534
537
|
/**
|
|
535
538
|
* Get user consumer accounts
|
|
536
539
|
*/
|
|
537
|
-
async getAdminUserConsumerAccountsRaw(requestParameters: GetAdminUserConsumerAccountsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<
|
|
540
|
+
async getAdminUserConsumerAccountsRaw(requestParameters: GetAdminUserConsumerAccountsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ConsumerAccounts>> {
|
|
538
541
|
if (requestParameters['id'] == null) {
|
|
539
542
|
throw new runtime.RequiredError(
|
|
540
543
|
'id',
|
|
@@ -565,13 +568,13 @@ export class UsersApi extends runtime.BaseAPI implements UsersApiInterface {
|
|
|
565
568
|
query: queryParameters,
|
|
566
569
|
}, initOverrides);
|
|
567
570
|
|
|
568
|
-
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
|
571
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ConsumerAccountsFromJSON(jsonValue));
|
|
569
572
|
}
|
|
570
573
|
|
|
571
574
|
/**
|
|
572
575
|
* Get user consumer accounts
|
|
573
576
|
*/
|
|
574
|
-
async getAdminUserConsumerAccounts(requestParameters: GetAdminUserConsumerAccountsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<
|
|
577
|
+
async getAdminUserConsumerAccounts(requestParameters: GetAdminUserConsumerAccountsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConsumerAccounts> {
|
|
575
578
|
const response = await this.getAdminUserConsumerAccountsRaw(requestParameters, initOverrides);
|
|
576
579
|
return await response.value();
|
|
577
580
|
}
|
|
@@ -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 { Consumer } from './Consumer';
|
|
17
|
+
import {
|
|
18
|
+
ConsumerFromJSON,
|
|
19
|
+
ConsumerFromJSONTyped,
|
|
20
|
+
ConsumerToJSON,
|
|
21
|
+
ConsumerToJSONTyped,
|
|
22
|
+
} from './Consumer';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface ConsumerAccounts
|
|
28
|
+
*/
|
|
29
|
+
export interface ConsumerAccounts {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {boolean}
|
|
33
|
+
* @memberof ConsumerAccounts
|
|
34
|
+
*/
|
|
35
|
+
success: boolean;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof ConsumerAccounts
|
|
40
|
+
*/
|
|
41
|
+
error?: string;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {Array<Consumer>}
|
|
45
|
+
* @memberof ConsumerAccounts
|
|
46
|
+
*/
|
|
47
|
+
data: Array<Consumer>;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Check if a given object implements the ConsumerAccounts interface.
|
|
52
|
+
*/
|
|
53
|
+
export function instanceOfConsumerAccounts(value: object): value is ConsumerAccounts {
|
|
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 ConsumerAccountsFromJSON(json: any): ConsumerAccounts {
|
|
60
|
+
return ConsumerAccountsFromJSONTyped(json, false);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function ConsumerAccountsFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConsumerAccounts {
|
|
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': ((json['data'] as Array<any>).map(ConsumerFromJSON)),
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export function ConsumerAccountsToJSON(json: any): ConsumerAccounts {
|
|
76
|
+
return ConsumerAccountsToJSONTyped(json, false);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function ConsumerAccountsToJSONTyped(value?: ConsumerAccounts | 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': ((value['data'] as Array<any>).map(ConsumerToJSON)),
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
|
package/src/models/index.ts
CHANGED
|
@@ -63,6 +63,7 @@ export * from './ComplaintsAdminPaginatedResponse';
|
|
|
63
63
|
export * from './ComplaintsPaginatedResponse';
|
|
64
64
|
export * from './ComplaintsSuccessResponse';
|
|
65
65
|
export * from './Consumer';
|
|
66
|
+
export * from './ConsumerAccounts';
|
|
66
67
|
export * from './ConsumerBasicInfoDto';
|
|
67
68
|
export * from './ConsumerInfoDto';
|
|
68
69
|
export * from './ConsumerMetadataDto';
|