electric-coop-api 0.1.61 → 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.
Files changed (48) hide show
  1. package/.openapi-generator/FILES +1 -0
  2. package/README.md +2 -2
  3. package/dist/apis/UsersApi.d.ts +5 -5
  4. package/dist/apis/UsersApi.js +1 -1
  5. package/dist/esm/apis/UsersApi.d.ts +5 -5
  6. package/dist/esm/apis/UsersApi.js +2 -2
  7. package/dist/esm/models/AccountDto.d.ts +1 -1
  8. package/dist/esm/models/AccountDto.js +3 -3
  9. package/dist/esm/models/AuthConsumerAccountDto.d.ts +1 -1
  10. package/dist/esm/models/AuthConsumerAccountDto.js +3 -3
  11. package/dist/esm/models/Bill.d.ts +6 -0
  12. package/dist/esm/models/Bill.js +2 -0
  13. package/dist/esm/models/Consumer.d.ts +2 -2
  14. package/dist/esm/models/Consumer.js +4 -6
  15. package/dist/esm/models/ConsumerAccounts.d.ts +45 -0
  16. package/dist/esm/models/ConsumerAccounts.js +50 -0
  17. package/dist/esm/models/LinkConsumerAccountDto.d.ts +1 -1
  18. package/dist/esm/models/LinkConsumerAccountDto.js +2 -2
  19. package/dist/esm/models/UpdateBillDto.d.ts +0 -13
  20. package/dist/esm/models/UpdateBillDto.js +0 -5
  21. package/dist/esm/models/index.d.ts +1 -0
  22. package/dist/esm/models/index.js +1 -0
  23. package/dist/models/AccountDto.d.ts +1 -1
  24. package/dist/models/AccountDto.js +3 -3
  25. package/dist/models/AuthConsumerAccountDto.d.ts +1 -1
  26. package/dist/models/AuthConsumerAccountDto.js +3 -3
  27. package/dist/models/Bill.d.ts +6 -0
  28. package/dist/models/Bill.js +2 -0
  29. package/dist/models/Consumer.d.ts +2 -2
  30. package/dist/models/Consumer.js +4 -6
  31. package/dist/models/ConsumerAccounts.d.ts +45 -0
  32. package/dist/models/ConsumerAccounts.js +57 -0
  33. package/dist/models/LinkConsumerAccountDto.d.ts +1 -1
  34. package/dist/models/LinkConsumerAccountDto.js +2 -2
  35. package/dist/models/UpdateBillDto.d.ts +0 -13
  36. package/dist/models/UpdateBillDto.js +0 -5
  37. package/dist/models/index.d.ts +1 -0
  38. package/dist/models/index.js +1 -0
  39. package/package.json +1 -1
  40. package/src/apis/UsersApi.ts +8 -5
  41. package/src/models/AccountDto.ts +4 -4
  42. package/src/models/AuthConsumerAccountDto.ts +4 -4
  43. package/src/models/Bill.ts +8 -0
  44. package/src/models/Consumer.ts +6 -7
  45. package/src/models/ConsumerAccounts.ts +91 -0
  46. package/src/models/LinkConsumerAccountDto.ts +3 -3
  47. package/src/models/UpdateBillDto.ts +0 -26
  48. package/src/models/index.ts +1 -0
@@ -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.61
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.61 --save
39
+ npm install electric-coop-api@0.1.63 --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 { 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<ConsumersSuccessResponse>>;
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<ConsumersSuccessResponse>;
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<ConsumersSuccessResponse>>;
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<ConsumersSuccessResponse>;
257
+ getAdminUserConsumerAccounts(requestParameters: GetAdminUserConsumerAccountsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConsumerAccounts>;
258
258
  /**
259
259
  * Get paginated staff users
260
260
  */
@@ -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.ConsumersSuccessResponseFromJSON)(jsonValue));
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<ConsumersSuccessResponse>>;
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<ConsumersSuccessResponse>;
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<ConsumersSuccessResponse>>;
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<ConsumersSuccessResponse>;
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) => ConsumersSuccessResponseFromJSON(jsonValue));
255
+ return new runtime.JSONApiResponse(response, (jsonValue) => ConsumerAccountsFromJSON(jsonValue));
256
256
  });
257
257
  }
258
258
  /**
@@ -50,7 +50,7 @@ export interface AccountDto {
50
50
  * @type {boolean}
51
51
  * @memberof AccountDto
52
52
  */
53
- isPrimary: boolean;
53
+ primary: boolean;
54
54
  }
55
55
  /**
56
56
  * Check if a given object implements the AccountDto interface.
@@ -25,7 +25,7 @@ export function instanceOfAccountDto(value) {
25
25
  return false;
26
26
  if (!('status' in value) || value['status'] === undefined)
27
27
  return false;
28
- if (!('isPrimary' in value) || value['isPrimary'] === undefined)
28
+ if (!('primary' in value) || value['primary'] === undefined)
29
29
  return false;
30
30
  return true;
31
31
  }
@@ -42,7 +42,7 @@ export function AccountDtoFromJSONTyped(json, ignoreDiscriminator) {
42
42
  'name': json['name'],
43
43
  'address': json['address'],
44
44
  'status': json['status'],
45
- 'isPrimary': json['isPrimary'],
45
+ 'primary': json['primary'],
46
46
  };
47
47
  }
48
48
  export function AccountDtoToJSON(json) {
@@ -58,6 +58,6 @@ export function AccountDtoToJSONTyped(value, ignoreDiscriminator = false) {
58
58
  'name': value['name'],
59
59
  'address': value['address'],
60
60
  'status': value['status'],
61
- 'isPrimary': value['isPrimary'],
61
+ 'primary': value['primary'],
62
62
  };
63
63
  }
@@ -44,7 +44,7 @@ export interface AuthConsumerAccountDto {
44
44
  * @type {boolean}
45
45
  * @memberof AuthConsumerAccountDto
46
46
  */
47
- isPrimary: boolean;
47
+ primary: boolean;
48
48
  }
49
49
  /**
50
50
  * Check if a given object implements the AuthConsumerAccountDto interface.
@@ -23,7 +23,7 @@ export function instanceOfAuthConsumerAccountDto(value) {
23
23
  return false;
24
24
  if (!('consumerType' in value) || value['consumerType'] === undefined)
25
25
  return false;
26
- if (!('isPrimary' in value) || value['isPrimary'] === undefined)
26
+ if (!('primary' in value) || value['primary'] === undefined)
27
27
  return false;
28
28
  return true;
29
29
  }
@@ -39,7 +39,7 @@ export function AuthConsumerAccountDtoFromJSONTyped(json, ignoreDiscriminator) {
39
39
  'name': json['name'],
40
40
  'address': json['address'],
41
41
  'consumerType': json['consumerType'],
42
- 'isPrimary': json['isPrimary'],
42
+ 'primary': json['primary'],
43
43
  };
44
44
  }
45
45
  export function AuthConsumerAccountDtoToJSON(json) {
@@ -54,6 +54,6 @@ export function AuthConsumerAccountDtoToJSONTyped(value, ignoreDiscriminator = f
54
54
  'name': value['name'],
55
55
  'address': value['address'],
56
56
  'consumerType': value['consumerType'],
57
- 'isPrimary': value['isPrimary'],
57
+ 'primary': value['primary'],
58
58
  };
59
59
  }
@@ -176,6 +176,12 @@ export interface Bill {
176
176
  * @memberof Bill
177
177
  */
178
178
  breakdown?: BillBreakdownDto;
179
+ /**
180
+ *
181
+ * @type {object}
182
+ * @memberof Bill
183
+ */
184
+ rateDisplayId?: object;
179
185
  /**
180
186
  *
181
187
  * @type {{ [key: string]: any; }}
@@ -92,6 +92,7 @@ export function BillFromJSONTyped(json, ignoreDiscriminator) {
92
92
  'paymentDate': json['paymentDate'] == null ? undefined : (new Date(json['paymentDate'])),
93
93
  'status': BillStatusEnumFromJSON(json['status']),
94
94
  'breakdown': json['breakdown'] == null ? undefined : BillBreakdownDtoFromJSON(json['breakdown']),
95
+ 'rateDisplayId': json['rateDisplayId'] == null ? undefined : json['rateDisplayId'],
95
96
  'metadata': json['metadata'] == null ? undefined : json['metadata'],
96
97
  };
97
98
  }
@@ -129,6 +130,7 @@ export function BillToJSONTyped(value, ignoreDiscriminator = false) {
129
130
  'paymentDate': value['paymentDate'] == null ? undefined : ((value['paymentDate']).toISOString()),
130
131
  'status': BillStatusEnumToJSON(value['status']),
131
132
  'breakdown': BillBreakdownDtoToJSON(value['breakdown']),
133
+ 'rateDisplayId': value['rateDisplayId'],
132
134
  'metadata': value['metadata'],
133
135
  };
134
136
  }
@@ -124,13 +124,13 @@ export interface Consumer {
124
124
  * @type {ConsumerStatusEnum}
125
125
  * @memberof Consumer
126
126
  */
127
- status: ConsumerStatusEnum;
127
+ status?: ConsumerStatusEnum;
128
128
  /**
129
129
  *
130
130
  * @type {boolean}
131
131
  * @memberof Consumer
132
132
  */
133
- isPrimary: boolean;
133
+ primary: boolean;
134
134
  /**
135
135
  *
136
136
  * @type {boolean}
@@ -41,9 +41,7 @@ export function instanceOfConsumer(value) {
41
41
  return false;
42
42
  if (!('role' in value) || value['role'] === undefined)
43
43
  return false;
44
- if (!('status' in value) || value['status'] === undefined)
45
- return false;
46
- if (!('isPrimary' in value) || value['isPrimary'] === undefined)
44
+ if (!('primary' in value) || value['primary'] === undefined)
47
45
  return false;
48
46
  if (!('hasNetMetering' in value) || value['hasNetMetering'] === undefined)
49
47
  return false;
@@ -73,8 +71,8 @@ export function ConsumerFromJSONTyped(json, ignoreDiscriminator) {
73
71
  'mobile': json['mobile'] == null ? undefined : json['mobile'],
74
72
  'birthdate': json['birthdate'] == null ? undefined : (new Date(json['birthdate'])),
75
73
  'role': ConsumerRoleEnumFromJSON(json['role']),
76
- 'status': ConsumerStatusEnumFromJSON(json['status']),
77
- 'isPrimary': json['isPrimary'],
74
+ 'status': json['status'] == null ? undefined : ConsumerStatusEnumFromJSON(json['status']),
75
+ 'primary': json['primary'],
78
76
  'hasNetMetering': json['hasNetMetering'],
79
77
  'metadata': json['metadata'] == null ? undefined : ConsumerMetadataDtoFromJSON(json['metadata']),
80
78
  'bills': json['bills'] == null ? undefined : (json['bills'].map(BillFromJSON)),
@@ -106,7 +104,7 @@ export function ConsumerToJSONTyped(value, ignoreDiscriminator = false) {
106
104
  'birthdate': value['birthdate'] == null ? undefined : ((value['birthdate']).toISOString()),
107
105
  'role': ConsumerRoleEnumToJSON(value['role']),
108
106
  'status': ConsumerStatusEnumToJSON(value['status']),
109
- 'isPrimary': value['isPrimary'],
107
+ 'primary': value['primary'],
110
108
  'hasNetMetering': value['hasNetMetering'],
111
109
  'metadata': ConsumerMetadataDtoToJSON(value['metadata']),
112
110
  'bills': value['bills'] == null ? undefined : (value['bills'].map(BillToJSON)),
@@ -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
+ }
@@ -26,7 +26,7 @@ export interface LinkConsumerAccountDto {
26
26
  * @type {boolean}
27
27
  * @memberof LinkConsumerAccountDto
28
28
  */
29
- isPrimary?: boolean;
29
+ primary?: boolean;
30
30
  }
31
31
  /**
32
32
  * Check if a given object implements the LinkConsumerAccountDto interface.
@@ -28,7 +28,7 @@ export function LinkConsumerAccountDtoFromJSONTyped(json, ignoreDiscriminator) {
28
28
  }
29
29
  return {
30
30
  'accountNumber': json['accountNumber'],
31
- 'isPrimary': json['isPrimary'] == null ? undefined : json['isPrimary'],
31
+ 'primary': json['primary'] == null ? undefined : json['primary'],
32
32
  };
33
33
  }
34
34
  export function LinkConsumerAccountDtoToJSON(json) {
@@ -40,6 +40,6 @@ export function LinkConsumerAccountDtoToJSONTyped(value, ignoreDiscriminator = f
40
40
  }
41
41
  return {
42
42
  'accountNumber': value['accountNumber'],
43
- 'isPrimary': value['isPrimary'],
43
+ 'primary': value['primary'],
44
44
  };
45
45
  }
@@ -9,7 +9,6 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
- import type { BillStatusEnum } from './BillStatusEnum';
13
12
  /**
14
13
  *
15
14
  * @export
@@ -40,18 +39,6 @@ export interface UpdateBillDto {
40
39
  * @memberof UpdateBillDto
41
40
  */
42
41
  currentReading?: number;
43
- /**
44
- *
45
- * @type {number}
46
- * @memberof UpdateBillDto
47
- */
48
- previousReading?: number;
49
- /**
50
- *
51
- * @type {BillStatusEnum}
52
- * @memberof UpdateBillDto
53
- */
54
- status?: BillStatusEnum;
55
42
  }
56
43
  /**
57
44
  * Check if a given object implements the UpdateBillDto interface.
@@ -11,7 +11,6 @@
11
11
  * https://openapi-generator.tech
12
12
  * Do not edit the class manually.
13
13
  */
14
- import { BillStatusEnumFromJSON, BillStatusEnumToJSON, } from './BillStatusEnum';
15
14
  /**
16
15
  * Check if a given object implements the UpdateBillDto interface.
17
16
  */
@@ -30,8 +29,6 @@ export function UpdateBillDtoFromJSONTyped(json, ignoreDiscriminator) {
30
29
  'billingPeriod': json['billingPeriod'] == null ? undefined : json['billingPeriod'],
31
30
  'dueDate': json['dueDate'] == null ? undefined : (new Date(json['dueDate'])),
32
31
  'currentReading': json['currentReading'] == null ? undefined : json['currentReading'],
33
- 'previousReading': json['previousReading'] == null ? undefined : json['previousReading'],
34
- 'status': json['status'] == null ? undefined : BillStatusEnumFromJSON(json['status']),
35
32
  };
36
33
  }
37
34
  export function UpdateBillDtoToJSON(json) {
@@ -46,7 +43,5 @@ export function UpdateBillDtoToJSONTyped(value, ignoreDiscriminator = false) {
46
43
  'billingPeriod': value['billingPeriod'],
47
44
  'dueDate': value['dueDate'] == null ? undefined : ((value['dueDate']).toISOString()),
48
45
  'currentReading': value['currentReading'],
49
- 'previousReading': value['previousReading'],
50
- 'status': BillStatusEnumToJSON(value['status']),
51
46
  };
52
47
  }
@@ -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';
@@ -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';
@@ -50,7 +50,7 @@ export interface AccountDto {
50
50
  * @type {boolean}
51
51
  * @memberof AccountDto
52
52
  */
53
- isPrimary: boolean;
53
+ primary: boolean;
54
54
  }
55
55
  /**
56
56
  * Check if a given object implements the AccountDto interface.
@@ -32,7 +32,7 @@ function instanceOfAccountDto(value) {
32
32
  return false;
33
33
  if (!('status' in value) || value['status'] === undefined)
34
34
  return false;
35
- if (!('isPrimary' in value) || value['isPrimary'] === undefined)
35
+ if (!('primary' in value) || value['primary'] === undefined)
36
36
  return false;
37
37
  return true;
38
38
  }
@@ -49,7 +49,7 @@ function AccountDtoFromJSONTyped(json, ignoreDiscriminator) {
49
49
  'name': json['name'],
50
50
  'address': json['address'],
51
51
  'status': json['status'],
52
- 'isPrimary': json['isPrimary'],
52
+ 'primary': json['primary'],
53
53
  };
54
54
  }
55
55
  function AccountDtoToJSON(json) {
@@ -65,6 +65,6 @@ function AccountDtoToJSONTyped(value, ignoreDiscriminator = false) {
65
65
  'name': value['name'],
66
66
  'address': value['address'],
67
67
  'status': value['status'],
68
- 'isPrimary': value['isPrimary'],
68
+ 'primary': value['primary'],
69
69
  };
70
70
  }
@@ -44,7 +44,7 @@ export interface AuthConsumerAccountDto {
44
44
  * @type {boolean}
45
45
  * @memberof AuthConsumerAccountDto
46
46
  */
47
- isPrimary: boolean;
47
+ primary: boolean;
48
48
  }
49
49
  /**
50
50
  * Check if a given object implements the AuthConsumerAccountDto interface.
@@ -30,7 +30,7 @@ function instanceOfAuthConsumerAccountDto(value) {
30
30
  return false;
31
31
  if (!('consumerType' in value) || value['consumerType'] === undefined)
32
32
  return false;
33
- if (!('isPrimary' in value) || value['isPrimary'] === undefined)
33
+ if (!('primary' in value) || value['primary'] === undefined)
34
34
  return false;
35
35
  return true;
36
36
  }
@@ -46,7 +46,7 @@ function AuthConsumerAccountDtoFromJSONTyped(json, ignoreDiscriminator) {
46
46
  'name': json['name'],
47
47
  'address': json['address'],
48
48
  'consumerType': json['consumerType'],
49
- 'isPrimary': json['isPrimary'],
49
+ 'primary': json['primary'],
50
50
  };
51
51
  }
52
52
  function AuthConsumerAccountDtoToJSON(json) {
@@ -61,6 +61,6 @@ function AuthConsumerAccountDtoToJSONTyped(value, ignoreDiscriminator = false) {
61
61
  'name': value['name'],
62
62
  'address': value['address'],
63
63
  'consumerType': value['consumerType'],
64
- 'isPrimary': value['isPrimary'],
64
+ 'primary': value['primary'],
65
65
  };
66
66
  }
@@ -176,6 +176,12 @@ export interface Bill {
176
176
  * @memberof Bill
177
177
  */
178
178
  breakdown?: BillBreakdownDto;
179
+ /**
180
+ *
181
+ * @type {object}
182
+ * @memberof Bill
183
+ */
184
+ rateDisplayId?: object;
179
185
  /**
180
186
  *
181
187
  * @type {{ [key: string]: any; }}
@@ -99,6 +99,7 @@ function BillFromJSONTyped(json, ignoreDiscriminator) {
99
99
  'paymentDate': json['paymentDate'] == null ? undefined : (new Date(json['paymentDate'])),
100
100
  'status': (0, BillStatusEnum_1.BillStatusEnumFromJSON)(json['status']),
101
101
  'breakdown': json['breakdown'] == null ? undefined : (0, BillBreakdownDto_1.BillBreakdownDtoFromJSON)(json['breakdown']),
102
+ 'rateDisplayId': json['rateDisplayId'] == null ? undefined : json['rateDisplayId'],
102
103
  'metadata': json['metadata'] == null ? undefined : json['metadata'],
103
104
  };
104
105
  }
@@ -136,6 +137,7 @@ function BillToJSONTyped(value, ignoreDiscriminator = false) {
136
137
  'paymentDate': value['paymentDate'] == null ? undefined : ((value['paymentDate']).toISOString()),
137
138
  'status': (0, BillStatusEnum_1.BillStatusEnumToJSON)(value['status']),
138
139
  'breakdown': (0, BillBreakdownDto_1.BillBreakdownDtoToJSON)(value['breakdown']),
140
+ 'rateDisplayId': value['rateDisplayId'],
139
141
  'metadata': value['metadata'],
140
142
  };
141
143
  }
@@ -124,13 +124,13 @@ export interface Consumer {
124
124
  * @type {ConsumerStatusEnum}
125
125
  * @memberof Consumer
126
126
  */
127
- status: ConsumerStatusEnum;
127
+ status?: ConsumerStatusEnum;
128
128
  /**
129
129
  *
130
130
  * @type {boolean}
131
131
  * @memberof Consumer
132
132
  */
133
- isPrimary: boolean;
133
+ primary: boolean;
134
134
  /**
135
135
  *
136
136
  * @type {boolean}
@@ -48,9 +48,7 @@ function instanceOfConsumer(value) {
48
48
  return false;
49
49
  if (!('role' in value) || value['role'] === undefined)
50
50
  return false;
51
- if (!('status' in value) || value['status'] === undefined)
52
- return false;
53
- if (!('isPrimary' in value) || value['isPrimary'] === undefined)
51
+ if (!('primary' in value) || value['primary'] === undefined)
54
52
  return false;
55
53
  if (!('hasNetMetering' in value) || value['hasNetMetering'] === undefined)
56
54
  return false;
@@ -80,8 +78,8 @@ function ConsumerFromJSONTyped(json, ignoreDiscriminator) {
80
78
  'mobile': json['mobile'] == null ? undefined : json['mobile'],
81
79
  'birthdate': json['birthdate'] == null ? undefined : (new Date(json['birthdate'])),
82
80
  'role': (0, ConsumerRoleEnum_1.ConsumerRoleEnumFromJSON)(json['role']),
83
- 'status': (0, ConsumerStatusEnum_1.ConsumerStatusEnumFromJSON)(json['status']),
84
- 'isPrimary': json['isPrimary'],
81
+ 'status': json['status'] == null ? undefined : (0, ConsumerStatusEnum_1.ConsumerStatusEnumFromJSON)(json['status']),
82
+ 'primary': json['primary'],
85
83
  'hasNetMetering': json['hasNetMetering'],
86
84
  'metadata': json['metadata'] == null ? undefined : (0, ConsumerMetadataDto_1.ConsumerMetadataDtoFromJSON)(json['metadata']),
87
85
  'bills': json['bills'] == null ? undefined : (json['bills'].map(Bill_1.BillFromJSON)),
@@ -113,7 +111,7 @@ function ConsumerToJSONTyped(value, ignoreDiscriminator = false) {
113
111
  'birthdate': value['birthdate'] == null ? undefined : ((value['birthdate']).toISOString()),
114
112
  'role': (0, ConsumerRoleEnum_1.ConsumerRoleEnumToJSON)(value['role']),
115
113
  'status': (0, ConsumerStatusEnum_1.ConsumerStatusEnumToJSON)(value['status']),
116
- 'isPrimary': value['isPrimary'],
114
+ 'primary': value['primary'],
117
115
  'hasNetMetering': value['hasNetMetering'],
118
116
  'metadata': (0, ConsumerMetadataDto_1.ConsumerMetadataDtoToJSON)(value['metadata']),
119
117
  'bills': value['bills'] == null ? undefined : (value['bills'].map(Bill_1.BillToJSON)),
@@ -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
+ }
@@ -26,7 +26,7 @@ export interface LinkConsumerAccountDto {
26
26
  * @type {boolean}
27
27
  * @memberof LinkConsumerAccountDto
28
28
  */
29
- isPrimary?: boolean;
29
+ primary?: boolean;
30
30
  }
31
31
  /**
32
32
  * Check if a given object implements the LinkConsumerAccountDto interface.
@@ -35,7 +35,7 @@ function LinkConsumerAccountDtoFromJSONTyped(json, ignoreDiscriminator) {
35
35
  }
36
36
  return {
37
37
  'accountNumber': json['accountNumber'],
38
- 'isPrimary': json['isPrimary'] == null ? undefined : json['isPrimary'],
38
+ 'primary': json['primary'] == null ? undefined : json['primary'],
39
39
  };
40
40
  }
41
41
  function LinkConsumerAccountDtoToJSON(json) {
@@ -47,6 +47,6 @@ function LinkConsumerAccountDtoToJSONTyped(value, ignoreDiscriminator = false) {
47
47
  }
48
48
  return {
49
49
  'accountNumber': value['accountNumber'],
50
- 'isPrimary': value['isPrimary'],
50
+ 'primary': value['primary'],
51
51
  };
52
52
  }
@@ -9,7 +9,6 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
- import type { BillStatusEnum } from './BillStatusEnum';
13
12
  /**
14
13
  *
15
14
  * @export
@@ -40,18 +39,6 @@ export interface UpdateBillDto {
40
39
  * @memberof UpdateBillDto
41
40
  */
42
41
  currentReading?: number;
43
- /**
44
- *
45
- * @type {number}
46
- * @memberof UpdateBillDto
47
- */
48
- previousReading?: number;
49
- /**
50
- *
51
- * @type {BillStatusEnum}
52
- * @memberof UpdateBillDto
53
- */
54
- status?: BillStatusEnum;
55
42
  }
56
43
  /**
57
44
  * Check if a given object implements the UpdateBillDto interface.
@@ -18,7 +18,6 @@ exports.UpdateBillDtoFromJSON = UpdateBillDtoFromJSON;
18
18
  exports.UpdateBillDtoFromJSONTyped = UpdateBillDtoFromJSONTyped;
19
19
  exports.UpdateBillDtoToJSON = UpdateBillDtoToJSON;
20
20
  exports.UpdateBillDtoToJSONTyped = UpdateBillDtoToJSONTyped;
21
- const BillStatusEnum_1 = require("./BillStatusEnum");
22
21
  /**
23
22
  * Check if a given object implements the UpdateBillDto interface.
24
23
  */
@@ -37,8 +36,6 @@ function UpdateBillDtoFromJSONTyped(json, ignoreDiscriminator) {
37
36
  'billingPeriod': json['billingPeriod'] == null ? undefined : json['billingPeriod'],
38
37
  'dueDate': json['dueDate'] == null ? undefined : (new Date(json['dueDate'])),
39
38
  'currentReading': json['currentReading'] == null ? undefined : json['currentReading'],
40
- 'previousReading': json['previousReading'] == null ? undefined : json['previousReading'],
41
- 'status': json['status'] == null ? undefined : (0, BillStatusEnum_1.BillStatusEnumFromJSON)(json['status']),
42
39
  };
43
40
  }
44
41
  function UpdateBillDtoToJSON(json) {
@@ -53,7 +50,5 @@ function UpdateBillDtoToJSONTyped(value, ignoreDiscriminator = false) {
53
50
  'billingPeriod': value['billingPeriod'],
54
51
  'dueDate': value['dueDate'] == null ? undefined : ((value['dueDate']).toISOString()),
55
52
  'currentReading': value['currentReading'],
56
- 'previousReading': value['previousReading'],
57
- 'status': (0, BillStatusEnum_1.BillStatusEnumToJSON)(value['status']),
58
53
  };
59
54
  }
@@ -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';
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "electric-coop-api",
3
- "version": "0.1.61",
3
+ "version": "0.1.63",
4
4
  "description": "OpenAPI client for electric-coop-api",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -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<ConsumersSuccessResponse>>;
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<ConsumersSuccessResponse>;
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<ConsumersSuccessResponse>> {
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) => ConsumersSuccessResponseFromJSON(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<ConsumersSuccessResponse> {
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
  }
@@ -54,7 +54,7 @@ export interface AccountDto {
54
54
  * @type {boolean}
55
55
  * @memberof AccountDto
56
56
  */
57
- isPrimary: boolean;
57
+ primary: boolean;
58
58
  }
59
59
 
60
60
  /**
@@ -66,7 +66,7 @@ export function instanceOfAccountDto(value: object): value is AccountDto {
66
66
  if (!('name' in value) || value['name'] === undefined) return false;
67
67
  if (!('address' in value) || value['address'] === undefined) return false;
68
68
  if (!('status' in value) || value['status'] === undefined) return false;
69
- if (!('isPrimary' in value) || value['isPrimary'] === undefined) return false;
69
+ if (!('primary' in value) || value['primary'] === undefined) return false;
70
70
  return true;
71
71
  }
72
72
 
@@ -85,7 +85,7 @@ export function AccountDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean)
85
85
  'name': json['name'],
86
86
  'address': json['address'],
87
87
  'status': json['status'],
88
- 'isPrimary': json['isPrimary'],
88
+ 'primary': json['primary'],
89
89
  };
90
90
  }
91
91
 
@@ -105,7 +105,7 @@ export function AccountDtoToJSONTyped(value?: AccountDto | null, ignoreDiscrimin
105
105
  'name': value['name'],
106
106
  'address': value['address'],
107
107
  'status': value['status'],
108
- 'isPrimary': value['isPrimary'],
108
+ 'primary': value['primary'],
109
109
  };
110
110
  }
111
111
 
@@ -48,7 +48,7 @@ export interface AuthConsumerAccountDto {
48
48
  * @type {boolean}
49
49
  * @memberof AuthConsumerAccountDto
50
50
  */
51
- isPrimary: boolean;
51
+ primary: boolean;
52
52
  }
53
53
 
54
54
  /**
@@ -59,7 +59,7 @@ export function instanceOfAuthConsumerAccountDto(value: object): value is AuthCo
59
59
  if (!('name' in value) || value['name'] === undefined) return false;
60
60
  if (!('address' in value) || value['address'] === undefined) return false;
61
61
  if (!('consumerType' in value) || value['consumerType'] === undefined) return false;
62
- if (!('isPrimary' in value) || value['isPrimary'] === undefined) return false;
62
+ if (!('primary' in value) || value['primary'] === undefined) return false;
63
63
  return true;
64
64
  }
65
65
 
@@ -77,7 +77,7 @@ export function AuthConsumerAccountDtoFromJSONTyped(json: any, ignoreDiscriminat
77
77
  'name': json['name'],
78
78
  'address': json['address'],
79
79
  'consumerType': json['consumerType'],
80
- 'isPrimary': json['isPrimary'],
80
+ 'primary': json['primary'],
81
81
  };
82
82
  }
83
83
 
@@ -96,7 +96,7 @@ export function AuthConsumerAccountDtoToJSONTyped(value?: AuthConsumerAccountDto
96
96
  'name': value['name'],
97
97
  'address': value['address'],
98
98
  'consumerType': value['consumerType'],
99
- 'isPrimary': value['isPrimary'],
99
+ 'primary': value['primary'],
100
100
  };
101
101
  }
102
102
 
@@ -211,6 +211,12 @@ export interface Bill {
211
211
  * @memberof Bill
212
212
  */
213
213
  breakdown?: BillBreakdownDto;
214
+ /**
215
+ *
216
+ * @type {object}
217
+ * @memberof Bill
218
+ */
219
+ rateDisplayId?: object;
214
220
  /**
215
221
  *
216
222
  * @type {{ [key: string]: any; }}
@@ -282,6 +288,7 @@ export function BillFromJSONTyped(json: any, ignoreDiscriminator: boolean): Bill
282
288
  'paymentDate': json['paymentDate'] == null ? undefined : (new Date(json['paymentDate'])),
283
289
  'status': BillStatusEnumFromJSON(json['status']),
284
290
  'breakdown': json['breakdown'] == null ? undefined : BillBreakdownDtoFromJSON(json['breakdown']),
291
+ 'rateDisplayId': json['rateDisplayId'] == null ? undefined : json['rateDisplayId'],
285
292
  'metadata': json['metadata'] == null ? undefined : json['metadata'],
286
293
  };
287
294
  }
@@ -323,6 +330,7 @@ export function BillToJSONTyped(value?: Bill | null, ignoreDiscriminator: boolea
323
330
  'paymentDate': value['paymentDate'] == null ? undefined : ((value['paymentDate']).toISOString()),
324
331
  'status': BillStatusEnumToJSON(value['status']),
325
332
  'breakdown': BillBreakdownDtoToJSON(value['breakdown']),
333
+ 'rateDisplayId': value['rateDisplayId'],
326
334
  'metadata': value['metadata'],
327
335
  };
328
336
  }
@@ -177,13 +177,13 @@ export interface Consumer {
177
177
  * @type {ConsumerStatusEnum}
178
178
  * @memberof Consumer
179
179
  */
180
- status: ConsumerStatusEnum;
180
+ status?: ConsumerStatusEnum;
181
181
  /**
182
182
  *
183
183
  * @type {boolean}
184
184
  * @memberof Consumer
185
185
  */
186
- isPrimary: boolean;
186
+ primary: boolean;
187
187
  /**
188
188
  *
189
189
  * @type {boolean}
@@ -225,8 +225,7 @@ export function instanceOfConsumer(value: object): value is Consumer {
225
225
  if (!('name' in value) || value['name'] === undefined) return false;
226
226
  if (!('address' in value) || value['address'] === undefined) return false;
227
227
  if (!('role' in value) || value['role'] === undefined) return false;
228
- if (!('status' in value) || value['status'] === undefined) return false;
229
- if (!('isPrimary' in value) || value['isPrimary'] === undefined) return false;
228
+ if (!('primary' in value) || value['primary'] === undefined) return false;
230
229
  if (!('hasNetMetering' in value) || value['hasNetMetering'] === undefined) return false;
231
230
  return true;
232
231
  }
@@ -257,8 +256,8 @@ export function ConsumerFromJSONTyped(json: any, ignoreDiscriminator: boolean):
257
256
  'mobile': json['mobile'] == null ? undefined : json['mobile'],
258
257
  'birthdate': json['birthdate'] == null ? undefined : (new Date(json['birthdate'])),
259
258
  'role': ConsumerRoleEnumFromJSON(json['role']),
260
- 'status': ConsumerStatusEnumFromJSON(json['status']),
261
- 'isPrimary': json['isPrimary'],
259
+ 'status': json['status'] == null ? undefined : ConsumerStatusEnumFromJSON(json['status']),
260
+ 'primary': json['primary'],
262
261
  'hasNetMetering': json['hasNetMetering'],
263
262
  'metadata': json['metadata'] == null ? undefined : ConsumerMetadataDtoFromJSON(json['metadata']),
264
263
  'bills': json['bills'] == null ? undefined : ((json['bills'] as Array<any>).map(BillFromJSON)),
@@ -294,7 +293,7 @@ export function ConsumerToJSONTyped(value?: Consumer | null, ignoreDiscriminator
294
293
  'birthdate': value['birthdate'] == null ? undefined : ((value['birthdate']).toISOString()),
295
294
  'role': ConsumerRoleEnumToJSON(value['role']),
296
295
  'status': ConsumerStatusEnumToJSON(value['status']),
297
- 'isPrimary': value['isPrimary'],
296
+ 'primary': value['primary'],
298
297
  'hasNetMetering': value['hasNetMetering'],
299
298
  'metadata': ConsumerMetadataDtoToJSON(value['metadata']),
300
299
  'bills': value['bills'] == null ? undefined : ((value['bills'] as Array<any>).map(BillToJSON)),
@@ -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
+
@@ -30,7 +30,7 @@ export interface LinkConsumerAccountDto {
30
30
  * @type {boolean}
31
31
  * @memberof LinkConsumerAccountDto
32
32
  */
33
- isPrimary?: boolean;
33
+ primary?: boolean;
34
34
  }
35
35
 
36
36
  /**
@@ -52,7 +52,7 @@ export function LinkConsumerAccountDtoFromJSONTyped(json: any, ignoreDiscriminat
52
52
  return {
53
53
 
54
54
  'accountNumber': json['accountNumber'],
55
- 'isPrimary': json['isPrimary'] == null ? undefined : json['isPrimary'],
55
+ 'primary': json['primary'] == null ? undefined : json['primary'],
56
56
  };
57
57
  }
58
58
 
@@ -68,7 +68,7 @@ export function LinkConsumerAccountDtoToJSONTyped(value?: LinkConsumerAccountDto
68
68
  return {
69
69
 
70
70
  'accountNumber': value['accountNumber'],
71
- 'isPrimary': value['isPrimary'],
71
+ 'primary': value['primary'],
72
72
  };
73
73
  }
74
74
 
@@ -13,14 +13,6 @@
13
13
  */
14
14
 
15
15
  import { mapValues } from '../runtime';
16
- import type { BillStatusEnum } from './BillStatusEnum';
17
- import {
18
- BillStatusEnumFromJSON,
19
- BillStatusEnumFromJSONTyped,
20
- BillStatusEnumToJSON,
21
- BillStatusEnumToJSONTyped,
22
- } from './BillStatusEnum';
23
-
24
16
  /**
25
17
  *
26
18
  * @export
@@ -51,22 +43,8 @@ export interface UpdateBillDto {
51
43
  * @memberof UpdateBillDto
52
44
  */
53
45
  currentReading?: number;
54
- /**
55
- *
56
- * @type {number}
57
- * @memberof UpdateBillDto
58
- */
59
- previousReading?: number;
60
- /**
61
- *
62
- * @type {BillStatusEnum}
63
- * @memberof UpdateBillDto
64
- */
65
- status?: BillStatusEnum;
66
46
  }
67
47
 
68
-
69
-
70
48
  /**
71
49
  * Check if a given object implements the UpdateBillDto interface.
72
50
  */
@@ -88,8 +66,6 @@ export function UpdateBillDtoFromJSONTyped(json: any, ignoreDiscriminator: boole
88
66
  'billingPeriod': json['billingPeriod'] == null ? undefined : json['billingPeriod'],
89
67
  'dueDate': json['dueDate'] == null ? undefined : (new Date(json['dueDate'])),
90
68
  'currentReading': json['currentReading'] == null ? undefined : json['currentReading'],
91
- 'previousReading': json['previousReading'] == null ? undefined : json['previousReading'],
92
- 'status': json['status'] == null ? undefined : BillStatusEnumFromJSON(json['status']),
93
69
  };
94
70
  }
95
71
 
@@ -108,8 +84,6 @@ export function UpdateBillDtoToJSONTyped(value?: UpdateBillDto | null, ignoreDis
108
84
  'billingPeriod': value['billingPeriod'],
109
85
  'dueDate': value['dueDate'] == null ? undefined : ((value['dueDate']).toISOString()),
110
86
  'currentReading': value['currentReading'],
111
- 'previousReading': value['previousReading'],
112
- 'status': BillStatusEnumToJSON(value['status']),
113
87
  };
114
88
  }
115
89
 
@@ -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';