electric-coop-api 0.1.73 → 0.1.75
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 +2 -0
- package/README.md +2 -2
- package/dist/esm/models/AuditLogEntityTypeEnum.d.ts +1 -0
- package/dist/esm/models/AuditLogEntityTypeEnum.js +2 -1
- package/dist/esm/models/AuthTenantDto.d.ts +1 -1
- package/dist/esm/models/AuthTenantDto.js +3 -3
- package/dist/esm/models/ManagementDashboardStatsResponseDto.d.ts +12 -0
- package/dist/esm/models/ManagementDashboardStatsResponseDto.js +8 -0
- package/dist/esm/models/ResourceEnum.d.ts +43 -0
- package/dist/esm/models/ResourceEnum.js +61 -0
- package/dist/esm/models/SwaggerEnumSchemas.d.ts +33 -0
- package/dist/esm/models/SwaggerEnumSchemas.js +44 -0
- package/dist/esm/models/Tenant.d.ts +1 -1
- package/dist/esm/models/Tenant.js +3 -3
- package/dist/esm/models/index.d.ts +2 -0
- package/dist/esm/models/index.js +2 -0
- package/dist/models/AuditLogEntityTypeEnum.d.ts +1 -0
- package/dist/models/AuditLogEntityTypeEnum.js +2 -1
- package/dist/models/AuthTenantDto.d.ts +1 -1
- package/dist/models/AuthTenantDto.js +3 -3
- package/dist/models/ManagementDashboardStatsResponseDto.d.ts +12 -0
- package/dist/models/ManagementDashboardStatsResponseDto.js +8 -0
- package/dist/models/ResourceEnum.d.ts +43 -0
- package/dist/models/ResourceEnum.js +69 -0
- package/dist/models/SwaggerEnumSchemas.d.ts +33 -0
- package/dist/models/SwaggerEnumSchemas.js +51 -0
- package/dist/models/Tenant.d.ts +1 -1
- package/dist/models/Tenant.js +3 -3
- package/dist/models/index.d.ts +2 -0
- package/dist/models/index.js +2 -0
- package/package.json +1 -1
- package/src/models/AuditLogEntityTypeEnum.ts +2 -1
- package/src/models/AuthTenantDto.ts +4 -4
- package/src/models/ManagementDashboardStatsResponseDto.ts +18 -0
- package/src/models/ResourceEnum.ts +71 -0
- package/src/models/SwaggerEnumSchemas.ts +74 -0
- package/src/models/Tenant.ts +4 -4
- package/src/models/index.ts +2 -0
package/.openapi-generator/FILES
CHANGED
|
@@ -198,6 +198,7 @@ src/models/RefreshTokenDto.ts
|
|
|
198
198
|
src/models/RefreshTokenResponse.ts
|
|
199
199
|
src/models/RefreshTokenResponseDto.ts
|
|
200
200
|
src/models/RejectRateAdjustmentDto.ts
|
|
201
|
+
src/models/ResourceEnum.ts
|
|
201
202
|
src/models/RevenueByStatusDto.ts
|
|
202
203
|
src/models/RevenueReportDto.ts
|
|
203
204
|
src/models/RevenueReportSuccessResponse.ts
|
|
@@ -208,6 +209,7 @@ src/models/ServiceRequestStatusEnum.ts
|
|
|
208
209
|
src/models/ServiceRequestTypeEnum.ts
|
|
209
210
|
src/models/StaffUsersPaginatedResponse.ts
|
|
210
211
|
src/models/SubmitMeterReadingDto.ts
|
|
212
|
+
src/models/SwaggerEnumSchemas.ts
|
|
211
213
|
src/models/Tenant.ts
|
|
212
214
|
src/models/TenantSettingsResponseDto.ts
|
|
213
215
|
src/models/TenantSettingsSuccessResponse.ts
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## electric-coop-api@0.1.
|
|
1
|
+
## electric-coop-api@0.1.75
|
|
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.75 --save
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
_unPublished (not recommended):_
|
|
@@ -18,6 +18,7 @@ export declare const AuditLogEntityTypeEnum: {
|
|
|
18
18
|
readonly WorkOrder: "work_order";
|
|
19
19
|
readonly User: "user";
|
|
20
20
|
readonly ConsumerAccount: "consumer_account";
|
|
21
|
+
readonly ServiceRequest: "service_request";
|
|
21
22
|
};
|
|
22
23
|
export type AuditLogEntityTypeEnum = typeof AuditLogEntityTypeEnum[keyof typeof AuditLogEntityTypeEnum];
|
|
23
24
|
export declare function instanceOfAuditLogEntityTypeEnum(value: any): boolean;
|
|
@@ -19,7 +19,8 @@ export const AuditLogEntityTypeEnum = {
|
|
|
19
19
|
Outage: 'outage',
|
|
20
20
|
WorkOrder: 'work_order',
|
|
21
21
|
User: 'user',
|
|
22
|
-
ConsumerAccount: 'consumer_account'
|
|
22
|
+
ConsumerAccount: 'consumer_account',
|
|
23
|
+
ServiceRequest: 'service_request'
|
|
23
24
|
};
|
|
24
25
|
export function instanceOfAuditLogEntityTypeEnum(value) {
|
|
25
26
|
for (const key in AuditLogEntityTypeEnum) {
|
|
@@ -19,7 +19,7 @@ export function instanceOfAuthTenantDto(value) {
|
|
|
19
19
|
return false;
|
|
20
20
|
if (!('name' in value) || value['name'] === undefined)
|
|
21
21
|
return false;
|
|
22
|
-
if (!('
|
|
22
|
+
if (!('domain' in value) || value['domain'] === undefined)
|
|
23
23
|
return false;
|
|
24
24
|
return true;
|
|
25
25
|
}
|
|
@@ -33,7 +33,7 @@ export function AuthTenantDtoFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
33
33
|
return {
|
|
34
34
|
'id': json['id'],
|
|
35
35
|
'name': json['name'],
|
|
36
|
-
'
|
|
36
|
+
'domain': json['domain'],
|
|
37
37
|
};
|
|
38
38
|
}
|
|
39
39
|
export function AuthTenantDtoToJSON(json) {
|
|
@@ -46,6 +46,6 @@ export function AuthTenantDtoToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
46
46
|
return {
|
|
47
47
|
'id': value['id'],
|
|
48
48
|
'name': value['name'],
|
|
49
|
-
'
|
|
49
|
+
'domain': value['domain'],
|
|
50
50
|
};
|
|
51
51
|
}
|
|
@@ -63,6 +63,18 @@ export interface ManagementDashboardStatsResponseDto {
|
|
|
63
63
|
* @memberof ManagementDashboardStatsResponseDto
|
|
64
64
|
*/
|
|
65
65
|
totalStaff: number;
|
|
66
|
+
/**
|
|
67
|
+
* Revenue from paid bills in the previous billing period
|
|
68
|
+
* @type {number}
|
|
69
|
+
* @memberof ManagementDashboardStatsResponseDto
|
|
70
|
+
*/
|
|
71
|
+
prevMonthRevenue: number;
|
|
72
|
+
/**
|
|
73
|
+
* Collection rate in the previous billing period
|
|
74
|
+
* @type {number}
|
|
75
|
+
* @memberof ManagementDashboardStatsResponseDto
|
|
76
|
+
*/
|
|
77
|
+
prevMonthCollectionRate: number;
|
|
66
78
|
}
|
|
67
79
|
/**
|
|
68
80
|
* Check if a given object implements the ManagementDashboardStatsResponseDto interface.
|
|
@@ -31,6 +31,10 @@ export function instanceOfManagementDashboardStatsResponseDto(value) {
|
|
|
31
31
|
return false;
|
|
32
32
|
if (!('totalStaff' in value) || value['totalStaff'] === undefined)
|
|
33
33
|
return false;
|
|
34
|
+
if (!('prevMonthRevenue' in value) || value['prevMonthRevenue'] === undefined)
|
|
35
|
+
return false;
|
|
36
|
+
if (!('prevMonthCollectionRate' in value) || value['prevMonthCollectionRate'] === undefined)
|
|
37
|
+
return false;
|
|
34
38
|
return true;
|
|
35
39
|
}
|
|
36
40
|
export function ManagementDashboardStatsResponseDtoFromJSON(json) {
|
|
@@ -49,6 +53,8 @@ export function ManagementDashboardStatsResponseDtoFromJSONTyped(json, ignoreDis
|
|
|
49
53
|
'openWorkOrders': json['openWorkOrders'],
|
|
50
54
|
'pendingComplaints': json['pendingComplaints'],
|
|
51
55
|
'totalStaff': json['totalStaff'],
|
|
56
|
+
'prevMonthRevenue': json['prevMonthRevenue'],
|
|
57
|
+
'prevMonthCollectionRate': json['prevMonthCollectionRate'],
|
|
52
58
|
};
|
|
53
59
|
}
|
|
54
60
|
export function ManagementDashboardStatsResponseDtoToJSON(json) {
|
|
@@ -67,5 +73,7 @@ export function ManagementDashboardStatsResponseDtoToJSONTyped(value, ignoreDisc
|
|
|
67
73
|
'openWorkOrders': value['openWorkOrders'],
|
|
68
74
|
'pendingComplaints': value['pendingComplaints'],
|
|
69
75
|
'totalStaff': value['totalStaff'],
|
|
76
|
+
'prevMonthRevenue': value['prevMonthRevenue'],
|
|
77
|
+
'prevMonthCollectionRate': value['prevMonthCollectionRate'],
|
|
70
78
|
};
|
|
71
79
|
}
|
|
@@ -0,0 +1,43 @@
|
|
|
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
|
+
* All available resource identifiers for permission-based access control.
|
|
14
|
+
* @export
|
|
15
|
+
*/
|
|
16
|
+
export declare const ResourceEnum: {
|
|
17
|
+
readonly Consumers: "consumers";
|
|
18
|
+
readonly Users: "users";
|
|
19
|
+
readonly Bills: "bills";
|
|
20
|
+
readonly Payments: "payments";
|
|
21
|
+
readonly Collections: "collections";
|
|
22
|
+
readonly Field: "field";
|
|
23
|
+
readonly Meters: "meters";
|
|
24
|
+
readonly Outages: "outages";
|
|
25
|
+
readonly WorkOrders: "work_orders";
|
|
26
|
+
readonly Service: "service";
|
|
27
|
+
readonly Complaints: "complaints";
|
|
28
|
+
readonly Inquiries: "inquiries";
|
|
29
|
+
readonly ServiceRequests: "service_requests";
|
|
30
|
+
readonly Engineering: "engineering";
|
|
31
|
+
readonly Technical: "technical";
|
|
32
|
+
readonly Billing: "billing";
|
|
33
|
+
readonly Reports: "reports";
|
|
34
|
+
readonly Analytics: "analytics";
|
|
35
|
+
readonly Settings: "settings";
|
|
36
|
+
readonly AuditLogs: "audit_logs";
|
|
37
|
+
};
|
|
38
|
+
export type ResourceEnum = typeof ResourceEnum[keyof typeof ResourceEnum];
|
|
39
|
+
export declare function instanceOfResourceEnum(value: any): boolean;
|
|
40
|
+
export declare function ResourceEnumFromJSON(json: any): ResourceEnum;
|
|
41
|
+
export declare function ResourceEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): ResourceEnum;
|
|
42
|
+
export declare function ResourceEnumToJSON(value?: ResourceEnum | null): any;
|
|
43
|
+
export declare function ResourceEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): ResourceEnum;
|
|
@@ -0,0 +1,61 @@
|
|
|
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
|
+
* All available resource identifiers for permission-based access control.
|
|
16
|
+
* @export
|
|
17
|
+
*/
|
|
18
|
+
export const ResourceEnum = {
|
|
19
|
+
Consumers: 'consumers',
|
|
20
|
+
Users: 'users',
|
|
21
|
+
Bills: 'bills',
|
|
22
|
+
Payments: 'payments',
|
|
23
|
+
Collections: 'collections',
|
|
24
|
+
Field: 'field',
|
|
25
|
+
Meters: 'meters',
|
|
26
|
+
Outages: 'outages',
|
|
27
|
+
WorkOrders: 'work_orders',
|
|
28
|
+
Service: 'service',
|
|
29
|
+
Complaints: 'complaints',
|
|
30
|
+
Inquiries: 'inquiries',
|
|
31
|
+
ServiceRequests: 'service_requests',
|
|
32
|
+
Engineering: 'engineering',
|
|
33
|
+
Technical: 'technical',
|
|
34
|
+
Billing: 'billing',
|
|
35
|
+
Reports: 'reports',
|
|
36
|
+
Analytics: 'analytics',
|
|
37
|
+
Settings: 'settings',
|
|
38
|
+
AuditLogs: 'audit_logs'
|
|
39
|
+
};
|
|
40
|
+
export function instanceOfResourceEnum(value) {
|
|
41
|
+
for (const key in ResourceEnum) {
|
|
42
|
+
if (Object.prototype.hasOwnProperty.call(ResourceEnum, key)) {
|
|
43
|
+
if (ResourceEnum[key] === value) {
|
|
44
|
+
return true;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
return false;
|
|
49
|
+
}
|
|
50
|
+
export function ResourceEnumFromJSON(json) {
|
|
51
|
+
return ResourceEnumFromJSONTyped(json, false);
|
|
52
|
+
}
|
|
53
|
+
export function ResourceEnumFromJSONTyped(json, ignoreDiscriminator) {
|
|
54
|
+
return json;
|
|
55
|
+
}
|
|
56
|
+
export function ResourceEnumToJSON(value) {
|
|
57
|
+
return value;
|
|
58
|
+
}
|
|
59
|
+
export function ResourceEnumToJSONTyped(value, ignoreDiscriminator) {
|
|
60
|
+
return value;
|
|
61
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
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 { ResourceEnum } from './ResourceEnum';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface SwaggerEnumSchemas
|
|
17
|
+
*/
|
|
18
|
+
export interface SwaggerEnumSchemas {
|
|
19
|
+
/**
|
|
20
|
+
* All available resource identifiers for permission-based access control.
|
|
21
|
+
* @type {Array<ResourceEnum>}
|
|
22
|
+
* @memberof SwaggerEnumSchemas
|
|
23
|
+
*/
|
|
24
|
+
resources: Array<ResourceEnum>;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Check if a given object implements the SwaggerEnumSchemas interface.
|
|
28
|
+
*/
|
|
29
|
+
export declare function instanceOfSwaggerEnumSchemas(value: object): value is SwaggerEnumSchemas;
|
|
30
|
+
export declare function SwaggerEnumSchemasFromJSON(json: any): SwaggerEnumSchemas;
|
|
31
|
+
export declare function SwaggerEnumSchemasFromJSONTyped(json: any, ignoreDiscriminator: boolean): SwaggerEnumSchemas;
|
|
32
|
+
export declare function SwaggerEnumSchemasToJSON(json: any): SwaggerEnumSchemas;
|
|
33
|
+
export declare function SwaggerEnumSchemasToJSONTyped(value?: SwaggerEnumSchemas | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,44 @@
|
|
|
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 { ResourceEnumFromJSON, ResourceEnumToJSON, } from './ResourceEnum';
|
|
15
|
+
/**
|
|
16
|
+
* Check if a given object implements the SwaggerEnumSchemas interface.
|
|
17
|
+
*/
|
|
18
|
+
export function instanceOfSwaggerEnumSchemas(value) {
|
|
19
|
+
if (!('resources' in value) || value['resources'] === undefined)
|
|
20
|
+
return false;
|
|
21
|
+
return true;
|
|
22
|
+
}
|
|
23
|
+
export function SwaggerEnumSchemasFromJSON(json) {
|
|
24
|
+
return SwaggerEnumSchemasFromJSONTyped(json, false);
|
|
25
|
+
}
|
|
26
|
+
export function SwaggerEnumSchemasFromJSONTyped(json, ignoreDiscriminator) {
|
|
27
|
+
if (json == null) {
|
|
28
|
+
return json;
|
|
29
|
+
}
|
|
30
|
+
return {
|
|
31
|
+
'resources': (json['resources'].map(ResourceEnumFromJSON)),
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
export function SwaggerEnumSchemasToJSON(json) {
|
|
35
|
+
return SwaggerEnumSchemasToJSONTyped(json, false);
|
|
36
|
+
}
|
|
37
|
+
export function SwaggerEnumSchemasToJSONTyped(value, ignoreDiscriminator = false) {
|
|
38
|
+
if (value == null) {
|
|
39
|
+
return value;
|
|
40
|
+
}
|
|
41
|
+
return {
|
|
42
|
+
'resources': (value['resources'].map(ResourceEnumToJSON)),
|
|
43
|
+
};
|
|
44
|
+
}
|
|
@@ -25,7 +25,7 @@ export function instanceOfTenant(value) {
|
|
|
25
25
|
return false;
|
|
26
26
|
if (!('updatedAt' in value) || value['updatedAt'] === undefined)
|
|
27
27
|
return false;
|
|
28
|
-
if (!('
|
|
28
|
+
if (!('domain' in value) || value['domain'] === undefined)
|
|
29
29
|
return false;
|
|
30
30
|
if (!('name' in value) || value['name'] === undefined)
|
|
31
31
|
return false;
|
|
@@ -45,7 +45,7 @@ export function TenantFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
45
45
|
'createdAt': (new Date(json['createdAt'])),
|
|
46
46
|
'updatedAt': (new Date(json['updatedAt'])),
|
|
47
47
|
'deletedAt': json['deletedAt'] == null ? undefined : (new Date(json['deletedAt'])),
|
|
48
|
-
'
|
|
48
|
+
'domain': json['domain'],
|
|
49
49
|
'name': json['name'],
|
|
50
50
|
'logo': json['logo'] == null ? undefined : json['logo'],
|
|
51
51
|
'settings': json['settings'] == null ? undefined : json['settings'],
|
|
@@ -69,7 +69,7 @@ export function TenantToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
69
69
|
'createdAt': ((value['createdAt']).toISOString()),
|
|
70
70
|
'updatedAt': ((value['updatedAt']).toISOString()),
|
|
71
71
|
'deletedAt': value['deletedAt'] == null ? undefined : ((value['deletedAt']).toISOString()),
|
|
72
|
-
'
|
|
72
|
+
'domain': value['domain'],
|
|
73
73
|
'name': value['name'],
|
|
74
74
|
'logo': value['logo'],
|
|
75
75
|
'settings': value['settings'],
|
|
@@ -163,6 +163,7 @@ export * from './RefreshTokenDto';
|
|
|
163
163
|
export * from './RefreshTokenResponse';
|
|
164
164
|
export * from './RefreshTokenResponseDto';
|
|
165
165
|
export * from './RejectRateAdjustmentDto';
|
|
166
|
+
export * from './ResourceEnum';
|
|
166
167
|
export * from './RevenueByStatusDto';
|
|
167
168
|
export * from './RevenueReportDto';
|
|
168
169
|
export * from './RevenueReportSuccessResponse';
|
|
@@ -173,6 +174,7 @@ export * from './ServiceRequestStatusEnum';
|
|
|
173
174
|
export * from './ServiceRequestTypeEnum';
|
|
174
175
|
export * from './StaffUsersPaginatedResponse';
|
|
175
176
|
export * from './SubmitMeterReadingDto';
|
|
177
|
+
export * from './SwaggerEnumSchemas';
|
|
176
178
|
export * from './Tenant';
|
|
177
179
|
export * from './TenantSettingsResponseDto';
|
|
178
180
|
export * from './TenantSettingsSuccessResponse';
|
package/dist/esm/models/index.js
CHANGED
|
@@ -165,6 +165,7 @@ export * from './RefreshTokenDto';
|
|
|
165
165
|
export * from './RefreshTokenResponse';
|
|
166
166
|
export * from './RefreshTokenResponseDto';
|
|
167
167
|
export * from './RejectRateAdjustmentDto';
|
|
168
|
+
export * from './ResourceEnum';
|
|
168
169
|
export * from './RevenueByStatusDto';
|
|
169
170
|
export * from './RevenueReportDto';
|
|
170
171
|
export * from './RevenueReportSuccessResponse';
|
|
@@ -175,6 +176,7 @@ export * from './ServiceRequestStatusEnum';
|
|
|
175
176
|
export * from './ServiceRequestTypeEnum';
|
|
176
177
|
export * from './StaffUsersPaginatedResponse';
|
|
177
178
|
export * from './SubmitMeterReadingDto';
|
|
179
|
+
export * from './SwaggerEnumSchemas';
|
|
178
180
|
export * from './Tenant';
|
|
179
181
|
export * from './TenantSettingsResponseDto';
|
|
180
182
|
export * from './TenantSettingsSuccessResponse';
|
|
@@ -18,6 +18,7 @@ export declare const AuditLogEntityTypeEnum: {
|
|
|
18
18
|
readonly WorkOrder: "work_order";
|
|
19
19
|
readonly User: "user";
|
|
20
20
|
readonly ConsumerAccount: "consumer_account";
|
|
21
|
+
readonly ServiceRequest: "service_request";
|
|
21
22
|
};
|
|
22
23
|
export type AuditLogEntityTypeEnum = typeof AuditLogEntityTypeEnum[keyof typeof AuditLogEntityTypeEnum];
|
|
23
24
|
export declare function instanceOfAuditLogEntityTypeEnum(value: any): boolean;
|
|
@@ -27,7 +27,8 @@ exports.AuditLogEntityTypeEnum = {
|
|
|
27
27
|
Outage: 'outage',
|
|
28
28
|
WorkOrder: 'work_order',
|
|
29
29
|
User: 'user',
|
|
30
|
-
ConsumerAccount: 'consumer_account'
|
|
30
|
+
ConsumerAccount: 'consumer_account',
|
|
31
|
+
ServiceRequest: 'service_request'
|
|
31
32
|
};
|
|
32
33
|
function instanceOfAuditLogEntityTypeEnum(value) {
|
|
33
34
|
for (const key in exports.AuditLogEntityTypeEnum) {
|
|
@@ -26,7 +26,7 @@ function instanceOfAuthTenantDto(value) {
|
|
|
26
26
|
return false;
|
|
27
27
|
if (!('name' in value) || value['name'] === undefined)
|
|
28
28
|
return false;
|
|
29
|
-
if (!('
|
|
29
|
+
if (!('domain' in value) || value['domain'] === undefined)
|
|
30
30
|
return false;
|
|
31
31
|
return true;
|
|
32
32
|
}
|
|
@@ -40,7 +40,7 @@ function AuthTenantDtoFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
40
40
|
return {
|
|
41
41
|
'id': json['id'],
|
|
42
42
|
'name': json['name'],
|
|
43
|
-
'
|
|
43
|
+
'domain': json['domain'],
|
|
44
44
|
};
|
|
45
45
|
}
|
|
46
46
|
function AuthTenantDtoToJSON(json) {
|
|
@@ -53,6 +53,6 @@ function AuthTenantDtoToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
53
53
|
return {
|
|
54
54
|
'id': value['id'],
|
|
55
55
|
'name': value['name'],
|
|
56
|
-
'
|
|
56
|
+
'domain': value['domain'],
|
|
57
57
|
};
|
|
58
58
|
}
|
|
@@ -63,6 +63,18 @@ export interface ManagementDashboardStatsResponseDto {
|
|
|
63
63
|
* @memberof ManagementDashboardStatsResponseDto
|
|
64
64
|
*/
|
|
65
65
|
totalStaff: number;
|
|
66
|
+
/**
|
|
67
|
+
* Revenue from paid bills in the previous billing period
|
|
68
|
+
* @type {number}
|
|
69
|
+
* @memberof ManagementDashboardStatsResponseDto
|
|
70
|
+
*/
|
|
71
|
+
prevMonthRevenue: number;
|
|
72
|
+
/**
|
|
73
|
+
* Collection rate in the previous billing period
|
|
74
|
+
* @type {number}
|
|
75
|
+
* @memberof ManagementDashboardStatsResponseDto
|
|
76
|
+
*/
|
|
77
|
+
prevMonthCollectionRate: number;
|
|
66
78
|
}
|
|
67
79
|
/**
|
|
68
80
|
* Check if a given object implements the ManagementDashboardStatsResponseDto interface.
|
|
@@ -38,6 +38,10 @@ function instanceOfManagementDashboardStatsResponseDto(value) {
|
|
|
38
38
|
return false;
|
|
39
39
|
if (!('totalStaff' in value) || value['totalStaff'] === undefined)
|
|
40
40
|
return false;
|
|
41
|
+
if (!('prevMonthRevenue' in value) || value['prevMonthRevenue'] === undefined)
|
|
42
|
+
return false;
|
|
43
|
+
if (!('prevMonthCollectionRate' in value) || value['prevMonthCollectionRate'] === undefined)
|
|
44
|
+
return false;
|
|
41
45
|
return true;
|
|
42
46
|
}
|
|
43
47
|
function ManagementDashboardStatsResponseDtoFromJSON(json) {
|
|
@@ -56,6 +60,8 @@ function ManagementDashboardStatsResponseDtoFromJSONTyped(json, ignoreDiscrimina
|
|
|
56
60
|
'openWorkOrders': json['openWorkOrders'],
|
|
57
61
|
'pendingComplaints': json['pendingComplaints'],
|
|
58
62
|
'totalStaff': json['totalStaff'],
|
|
63
|
+
'prevMonthRevenue': json['prevMonthRevenue'],
|
|
64
|
+
'prevMonthCollectionRate': json['prevMonthCollectionRate'],
|
|
59
65
|
};
|
|
60
66
|
}
|
|
61
67
|
function ManagementDashboardStatsResponseDtoToJSON(json) {
|
|
@@ -74,5 +80,7 @@ function ManagementDashboardStatsResponseDtoToJSONTyped(value, ignoreDiscriminat
|
|
|
74
80
|
'openWorkOrders': value['openWorkOrders'],
|
|
75
81
|
'pendingComplaints': value['pendingComplaints'],
|
|
76
82
|
'totalStaff': value['totalStaff'],
|
|
83
|
+
'prevMonthRevenue': value['prevMonthRevenue'],
|
|
84
|
+
'prevMonthCollectionRate': value['prevMonthCollectionRate'],
|
|
77
85
|
};
|
|
78
86
|
}
|
|
@@ -0,0 +1,43 @@
|
|
|
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
|
+
* All available resource identifiers for permission-based access control.
|
|
14
|
+
* @export
|
|
15
|
+
*/
|
|
16
|
+
export declare const ResourceEnum: {
|
|
17
|
+
readonly Consumers: "consumers";
|
|
18
|
+
readonly Users: "users";
|
|
19
|
+
readonly Bills: "bills";
|
|
20
|
+
readonly Payments: "payments";
|
|
21
|
+
readonly Collections: "collections";
|
|
22
|
+
readonly Field: "field";
|
|
23
|
+
readonly Meters: "meters";
|
|
24
|
+
readonly Outages: "outages";
|
|
25
|
+
readonly WorkOrders: "work_orders";
|
|
26
|
+
readonly Service: "service";
|
|
27
|
+
readonly Complaints: "complaints";
|
|
28
|
+
readonly Inquiries: "inquiries";
|
|
29
|
+
readonly ServiceRequests: "service_requests";
|
|
30
|
+
readonly Engineering: "engineering";
|
|
31
|
+
readonly Technical: "technical";
|
|
32
|
+
readonly Billing: "billing";
|
|
33
|
+
readonly Reports: "reports";
|
|
34
|
+
readonly Analytics: "analytics";
|
|
35
|
+
readonly Settings: "settings";
|
|
36
|
+
readonly AuditLogs: "audit_logs";
|
|
37
|
+
};
|
|
38
|
+
export type ResourceEnum = typeof ResourceEnum[keyof typeof ResourceEnum];
|
|
39
|
+
export declare function instanceOfResourceEnum(value: any): boolean;
|
|
40
|
+
export declare function ResourceEnumFromJSON(json: any): ResourceEnum;
|
|
41
|
+
export declare function ResourceEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): ResourceEnum;
|
|
42
|
+
export declare function ResourceEnumToJSON(value?: ResourceEnum | null): any;
|
|
43
|
+
export declare function ResourceEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): ResourceEnum;
|
|
@@ -0,0 +1,69 @@
|
|
|
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.ResourceEnum = void 0;
|
|
17
|
+
exports.instanceOfResourceEnum = instanceOfResourceEnum;
|
|
18
|
+
exports.ResourceEnumFromJSON = ResourceEnumFromJSON;
|
|
19
|
+
exports.ResourceEnumFromJSONTyped = ResourceEnumFromJSONTyped;
|
|
20
|
+
exports.ResourceEnumToJSON = ResourceEnumToJSON;
|
|
21
|
+
exports.ResourceEnumToJSONTyped = ResourceEnumToJSONTyped;
|
|
22
|
+
/**
|
|
23
|
+
* All available resource identifiers for permission-based access control.
|
|
24
|
+
* @export
|
|
25
|
+
*/
|
|
26
|
+
exports.ResourceEnum = {
|
|
27
|
+
Consumers: 'consumers',
|
|
28
|
+
Users: 'users',
|
|
29
|
+
Bills: 'bills',
|
|
30
|
+
Payments: 'payments',
|
|
31
|
+
Collections: 'collections',
|
|
32
|
+
Field: 'field',
|
|
33
|
+
Meters: 'meters',
|
|
34
|
+
Outages: 'outages',
|
|
35
|
+
WorkOrders: 'work_orders',
|
|
36
|
+
Service: 'service',
|
|
37
|
+
Complaints: 'complaints',
|
|
38
|
+
Inquiries: 'inquiries',
|
|
39
|
+
ServiceRequests: 'service_requests',
|
|
40
|
+
Engineering: 'engineering',
|
|
41
|
+
Technical: 'technical',
|
|
42
|
+
Billing: 'billing',
|
|
43
|
+
Reports: 'reports',
|
|
44
|
+
Analytics: 'analytics',
|
|
45
|
+
Settings: 'settings',
|
|
46
|
+
AuditLogs: 'audit_logs'
|
|
47
|
+
};
|
|
48
|
+
function instanceOfResourceEnum(value) {
|
|
49
|
+
for (const key in exports.ResourceEnum) {
|
|
50
|
+
if (Object.prototype.hasOwnProperty.call(exports.ResourceEnum, key)) {
|
|
51
|
+
if (exports.ResourceEnum[key] === value) {
|
|
52
|
+
return true;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
return false;
|
|
57
|
+
}
|
|
58
|
+
function ResourceEnumFromJSON(json) {
|
|
59
|
+
return ResourceEnumFromJSONTyped(json, false);
|
|
60
|
+
}
|
|
61
|
+
function ResourceEnumFromJSONTyped(json, ignoreDiscriminator) {
|
|
62
|
+
return json;
|
|
63
|
+
}
|
|
64
|
+
function ResourceEnumToJSON(value) {
|
|
65
|
+
return value;
|
|
66
|
+
}
|
|
67
|
+
function ResourceEnumToJSONTyped(value, ignoreDiscriminator) {
|
|
68
|
+
return value;
|
|
69
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
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 { ResourceEnum } from './ResourceEnum';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface SwaggerEnumSchemas
|
|
17
|
+
*/
|
|
18
|
+
export interface SwaggerEnumSchemas {
|
|
19
|
+
/**
|
|
20
|
+
* All available resource identifiers for permission-based access control.
|
|
21
|
+
* @type {Array<ResourceEnum>}
|
|
22
|
+
* @memberof SwaggerEnumSchemas
|
|
23
|
+
*/
|
|
24
|
+
resources: Array<ResourceEnum>;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Check if a given object implements the SwaggerEnumSchemas interface.
|
|
28
|
+
*/
|
|
29
|
+
export declare function instanceOfSwaggerEnumSchemas(value: object): value is SwaggerEnumSchemas;
|
|
30
|
+
export declare function SwaggerEnumSchemasFromJSON(json: any): SwaggerEnumSchemas;
|
|
31
|
+
export declare function SwaggerEnumSchemasFromJSONTyped(json: any, ignoreDiscriminator: boolean): SwaggerEnumSchemas;
|
|
32
|
+
export declare function SwaggerEnumSchemasToJSON(json: any): SwaggerEnumSchemas;
|
|
33
|
+
export declare function SwaggerEnumSchemasToJSONTyped(value?: SwaggerEnumSchemas | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,51 @@
|
|
|
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.instanceOfSwaggerEnumSchemas = instanceOfSwaggerEnumSchemas;
|
|
17
|
+
exports.SwaggerEnumSchemasFromJSON = SwaggerEnumSchemasFromJSON;
|
|
18
|
+
exports.SwaggerEnumSchemasFromJSONTyped = SwaggerEnumSchemasFromJSONTyped;
|
|
19
|
+
exports.SwaggerEnumSchemasToJSON = SwaggerEnumSchemasToJSON;
|
|
20
|
+
exports.SwaggerEnumSchemasToJSONTyped = SwaggerEnumSchemasToJSONTyped;
|
|
21
|
+
const ResourceEnum_1 = require("./ResourceEnum");
|
|
22
|
+
/**
|
|
23
|
+
* Check if a given object implements the SwaggerEnumSchemas interface.
|
|
24
|
+
*/
|
|
25
|
+
function instanceOfSwaggerEnumSchemas(value) {
|
|
26
|
+
if (!('resources' in value) || value['resources'] === undefined)
|
|
27
|
+
return false;
|
|
28
|
+
return true;
|
|
29
|
+
}
|
|
30
|
+
function SwaggerEnumSchemasFromJSON(json) {
|
|
31
|
+
return SwaggerEnumSchemasFromJSONTyped(json, false);
|
|
32
|
+
}
|
|
33
|
+
function SwaggerEnumSchemasFromJSONTyped(json, ignoreDiscriminator) {
|
|
34
|
+
if (json == null) {
|
|
35
|
+
return json;
|
|
36
|
+
}
|
|
37
|
+
return {
|
|
38
|
+
'resources': (json['resources'].map(ResourceEnum_1.ResourceEnumFromJSON)),
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
function SwaggerEnumSchemasToJSON(json) {
|
|
42
|
+
return SwaggerEnumSchemasToJSONTyped(json, false);
|
|
43
|
+
}
|
|
44
|
+
function SwaggerEnumSchemasToJSONTyped(value, ignoreDiscriminator = false) {
|
|
45
|
+
if (value == null) {
|
|
46
|
+
return value;
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
'resources': (value['resources'].map(ResourceEnum_1.ResourceEnumToJSON)),
|
|
50
|
+
};
|
|
51
|
+
}
|
package/dist/models/Tenant.d.ts
CHANGED
package/dist/models/Tenant.js
CHANGED
|
@@ -32,7 +32,7 @@ function instanceOfTenant(value) {
|
|
|
32
32
|
return false;
|
|
33
33
|
if (!('updatedAt' in value) || value['updatedAt'] === undefined)
|
|
34
34
|
return false;
|
|
35
|
-
if (!('
|
|
35
|
+
if (!('domain' in value) || value['domain'] === undefined)
|
|
36
36
|
return false;
|
|
37
37
|
if (!('name' in value) || value['name'] === undefined)
|
|
38
38
|
return false;
|
|
@@ -52,7 +52,7 @@ function TenantFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
52
52
|
'createdAt': (new Date(json['createdAt'])),
|
|
53
53
|
'updatedAt': (new Date(json['updatedAt'])),
|
|
54
54
|
'deletedAt': json['deletedAt'] == null ? undefined : (new Date(json['deletedAt'])),
|
|
55
|
-
'
|
|
55
|
+
'domain': json['domain'],
|
|
56
56
|
'name': json['name'],
|
|
57
57
|
'logo': json['logo'] == null ? undefined : json['logo'],
|
|
58
58
|
'settings': json['settings'] == null ? undefined : json['settings'],
|
|
@@ -76,7 +76,7 @@ function TenantToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
76
76
|
'createdAt': ((value['createdAt']).toISOString()),
|
|
77
77
|
'updatedAt': ((value['updatedAt']).toISOString()),
|
|
78
78
|
'deletedAt': value['deletedAt'] == null ? undefined : ((value['deletedAt']).toISOString()),
|
|
79
|
-
'
|
|
79
|
+
'domain': value['domain'],
|
|
80
80
|
'name': value['name'],
|
|
81
81
|
'logo': value['logo'],
|
|
82
82
|
'settings': value['settings'],
|
package/dist/models/index.d.ts
CHANGED
|
@@ -163,6 +163,7 @@ export * from './RefreshTokenDto';
|
|
|
163
163
|
export * from './RefreshTokenResponse';
|
|
164
164
|
export * from './RefreshTokenResponseDto';
|
|
165
165
|
export * from './RejectRateAdjustmentDto';
|
|
166
|
+
export * from './ResourceEnum';
|
|
166
167
|
export * from './RevenueByStatusDto';
|
|
167
168
|
export * from './RevenueReportDto';
|
|
168
169
|
export * from './RevenueReportSuccessResponse';
|
|
@@ -173,6 +174,7 @@ export * from './ServiceRequestStatusEnum';
|
|
|
173
174
|
export * from './ServiceRequestTypeEnum';
|
|
174
175
|
export * from './StaffUsersPaginatedResponse';
|
|
175
176
|
export * from './SubmitMeterReadingDto';
|
|
177
|
+
export * from './SwaggerEnumSchemas';
|
|
176
178
|
export * from './Tenant';
|
|
177
179
|
export * from './TenantSettingsResponseDto';
|
|
178
180
|
export * from './TenantSettingsSuccessResponse';
|
package/dist/models/index.js
CHANGED
|
@@ -181,6 +181,7 @@ __exportStar(require("./RefreshTokenDto"), exports);
|
|
|
181
181
|
__exportStar(require("./RefreshTokenResponse"), exports);
|
|
182
182
|
__exportStar(require("./RefreshTokenResponseDto"), exports);
|
|
183
183
|
__exportStar(require("./RejectRateAdjustmentDto"), exports);
|
|
184
|
+
__exportStar(require("./ResourceEnum"), exports);
|
|
184
185
|
__exportStar(require("./RevenueByStatusDto"), exports);
|
|
185
186
|
__exportStar(require("./RevenueReportDto"), exports);
|
|
186
187
|
__exportStar(require("./RevenueReportSuccessResponse"), exports);
|
|
@@ -191,6 +192,7 @@ __exportStar(require("./ServiceRequestStatusEnum"), exports);
|
|
|
191
192
|
__exportStar(require("./ServiceRequestTypeEnum"), exports);
|
|
192
193
|
__exportStar(require("./StaffUsersPaginatedResponse"), exports);
|
|
193
194
|
__exportStar(require("./SubmitMeterReadingDto"), exports);
|
|
195
|
+
__exportStar(require("./SwaggerEnumSchemas"), exports);
|
|
194
196
|
__exportStar(require("./Tenant"), exports);
|
|
195
197
|
__exportStar(require("./TenantSettingsResponseDto"), exports);
|
|
196
198
|
__exportStar(require("./TenantSettingsSuccessResponse"), exports);
|
package/package.json
CHANGED
|
@@ -21,7 +21,8 @@ export const AuditLogEntityTypeEnum = {
|
|
|
21
21
|
Outage: 'outage',
|
|
22
22
|
WorkOrder: 'work_order',
|
|
23
23
|
User: 'user',
|
|
24
|
-
ConsumerAccount: 'consumer_account'
|
|
24
|
+
ConsumerAccount: 'consumer_account',
|
|
25
|
+
ServiceRequest: 'service_request'
|
|
25
26
|
} as const;
|
|
26
27
|
export type AuditLogEntityTypeEnum = typeof AuditLogEntityTypeEnum[keyof typeof AuditLogEntityTypeEnum];
|
|
27
28
|
|
|
@@ -36,7 +36,7 @@ export interface AuthTenantDto {
|
|
|
36
36
|
* @type {string}
|
|
37
37
|
* @memberof AuthTenantDto
|
|
38
38
|
*/
|
|
39
|
-
|
|
39
|
+
domain: string;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
/**
|
|
@@ -45,7 +45,7 @@ export interface AuthTenantDto {
|
|
|
45
45
|
export function instanceOfAuthTenantDto(value: object): value is AuthTenantDto {
|
|
46
46
|
if (!('id' in value) || value['id'] === undefined) return false;
|
|
47
47
|
if (!('name' in value) || value['name'] === undefined) return false;
|
|
48
|
-
if (!('
|
|
48
|
+
if (!('domain' in value) || value['domain'] === undefined) return false;
|
|
49
49
|
return true;
|
|
50
50
|
}
|
|
51
51
|
|
|
@@ -61,7 +61,7 @@ export function AuthTenantDtoFromJSONTyped(json: any, ignoreDiscriminator: boole
|
|
|
61
61
|
|
|
62
62
|
'id': json['id'],
|
|
63
63
|
'name': json['name'],
|
|
64
|
-
'
|
|
64
|
+
'domain': json['domain'],
|
|
65
65
|
};
|
|
66
66
|
}
|
|
67
67
|
|
|
@@ -78,7 +78,7 @@ export function AuthTenantDtoToJSONTyped(value?: AuthTenantDto | null, ignoreDis
|
|
|
78
78
|
|
|
79
79
|
'id': value['id'],
|
|
80
80
|
'name': value['name'],
|
|
81
|
-
'
|
|
81
|
+
'domain': value['domain'],
|
|
82
82
|
};
|
|
83
83
|
}
|
|
84
84
|
|
|
@@ -67,6 +67,18 @@ export interface ManagementDashboardStatsResponseDto {
|
|
|
67
67
|
* @memberof ManagementDashboardStatsResponseDto
|
|
68
68
|
*/
|
|
69
69
|
totalStaff: number;
|
|
70
|
+
/**
|
|
71
|
+
* Revenue from paid bills in the previous billing period
|
|
72
|
+
* @type {number}
|
|
73
|
+
* @memberof ManagementDashboardStatsResponseDto
|
|
74
|
+
*/
|
|
75
|
+
prevMonthRevenue: number;
|
|
76
|
+
/**
|
|
77
|
+
* Collection rate in the previous billing period
|
|
78
|
+
* @type {number}
|
|
79
|
+
* @memberof ManagementDashboardStatsResponseDto
|
|
80
|
+
*/
|
|
81
|
+
prevMonthCollectionRate: number;
|
|
70
82
|
}
|
|
71
83
|
|
|
72
84
|
/**
|
|
@@ -81,6 +93,8 @@ export function instanceOfManagementDashboardStatsResponseDto(value: object): va
|
|
|
81
93
|
if (!('openWorkOrders' in value) || value['openWorkOrders'] === undefined) return false;
|
|
82
94
|
if (!('pendingComplaints' in value) || value['pendingComplaints'] === undefined) return false;
|
|
83
95
|
if (!('totalStaff' in value) || value['totalStaff'] === undefined) return false;
|
|
96
|
+
if (!('prevMonthRevenue' in value) || value['prevMonthRevenue'] === undefined) return false;
|
|
97
|
+
if (!('prevMonthCollectionRate' in value) || value['prevMonthCollectionRate'] === undefined) return false;
|
|
84
98
|
return true;
|
|
85
99
|
}
|
|
86
100
|
|
|
@@ -102,6 +116,8 @@ export function ManagementDashboardStatsResponseDtoFromJSONTyped(json: any, igno
|
|
|
102
116
|
'openWorkOrders': json['openWorkOrders'],
|
|
103
117
|
'pendingComplaints': json['pendingComplaints'],
|
|
104
118
|
'totalStaff': json['totalStaff'],
|
|
119
|
+
'prevMonthRevenue': json['prevMonthRevenue'],
|
|
120
|
+
'prevMonthCollectionRate': json['prevMonthCollectionRate'],
|
|
105
121
|
};
|
|
106
122
|
}
|
|
107
123
|
|
|
@@ -124,6 +140,8 @@ export function ManagementDashboardStatsResponseDtoToJSONTyped(value?: Managemen
|
|
|
124
140
|
'openWorkOrders': value['openWorkOrders'],
|
|
125
141
|
'pendingComplaints': value['pendingComplaints'],
|
|
126
142
|
'totalStaff': value['totalStaff'],
|
|
143
|
+
'prevMonthRevenue': value['prevMonthRevenue'],
|
|
144
|
+
'prevMonthCollectionRate': value['prevMonthCollectionRate'],
|
|
127
145
|
};
|
|
128
146
|
}
|
|
129
147
|
|
|
@@ -0,0 +1,71 @@
|
|
|
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
|
+
|
|
16
|
+
/**
|
|
17
|
+
* All available resource identifiers for permission-based access control.
|
|
18
|
+
* @export
|
|
19
|
+
*/
|
|
20
|
+
export const ResourceEnum = {
|
|
21
|
+
Consumers: 'consumers',
|
|
22
|
+
Users: 'users',
|
|
23
|
+
Bills: 'bills',
|
|
24
|
+
Payments: 'payments',
|
|
25
|
+
Collections: 'collections',
|
|
26
|
+
Field: 'field',
|
|
27
|
+
Meters: 'meters',
|
|
28
|
+
Outages: 'outages',
|
|
29
|
+
WorkOrders: 'work_orders',
|
|
30
|
+
Service: 'service',
|
|
31
|
+
Complaints: 'complaints',
|
|
32
|
+
Inquiries: 'inquiries',
|
|
33
|
+
ServiceRequests: 'service_requests',
|
|
34
|
+
Engineering: 'engineering',
|
|
35
|
+
Technical: 'technical',
|
|
36
|
+
Billing: 'billing',
|
|
37
|
+
Reports: 'reports',
|
|
38
|
+
Analytics: 'analytics',
|
|
39
|
+
Settings: 'settings',
|
|
40
|
+
AuditLogs: 'audit_logs'
|
|
41
|
+
} as const;
|
|
42
|
+
export type ResourceEnum = typeof ResourceEnum[keyof typeof ResourceEnum];
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
export function instanceOfResourceEnum(value: any): boolean {
|
|
46
|
+
for (const key in ResourceEnum) {
|
|
47
|
+
if (Object.prototype.hasOwnProperty.call(ResourceEnum, key)) {
|
|
48
|
+
if (ResourceEnum[key as keyof typeof ResourceEnum] === value) {
|
|
49
|
+
return true;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
return false;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function ResourceEnumFromJSON(json: any): ResourceEnum {
|
|
57
|
+
return ResourceEnumFromJSONTyped(json, false);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function ResourceEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): ResourceEnum {
|
|
61
|
+
return json as ResourceEnum;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function ResourceEnumToJSON(value?: ResourceEnum | null): any {
|
|
65
|
+
return value as any;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function ResourceEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): ResourceEnum {
|
|
69
|
+
return value as ResourceEnum;
|
|
70
|
+
}
|
|
71
|
+
|
|
@@ -0,0 +1,74 @@
|
|
|
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 { ResourceEnum } from './ResourceEnum';
|
|
17
|
+
import {
|
|
18
|
+
ResourceEnumFromJSON,
|
|
19
|
+
ResourceEnumFromJSONTyped,
|
|
20
|
+
ResourceEnumToJSON,
|
|
21
|
+
ResourceEnumToJSONTyped,
|
|
22
|
+
} from './ResourceEnum';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface SwaggerEnumSchemas
|
|
28
|
+
*/
|
|
29
|
+
export interface SwaggerEnumSchemas {
|
|
30
|
+
/**
|
|
31
|
+
* All available resource identifiers for permission-based access control.
|
|
32
|
+
* @type {Array<ResourceEnum>}
|
|
33
|
+
* @memberof SwaggerEnumSchemas
|
|
34
|
+
*/
|
|
35
|
+
resources: Array<ResourceEnum>;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Check if a given object implements the SwaggerEnumSchemas interface.
|
|
40
|
+
*/
|
|
41
|
+
export function instanceOfSwaggerEnumSchemas(value: object): value is SwaggerEnumSchemas {
|
|
42
|
+
if (!('resources' in value) || value['resources'] === undefined) return false;
|
|
43
|
+
return true;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export function SwaggerEnumSchemasFromJSON(json: any): SwaggerEnumSchemas {
|
|
47
|
+
return SwaggerEnumSchemasFromJSONTyped(json, false);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function SwaggerEnumSchemasFromJSONTyped(json: any, ignoreDiscriminator: boolean): SwaggerEnumSchemas {
|
|
51
|
+
if (json == null) {
|
|
52
|
+
return json;
|
|
53
|
+
}
|
|
54
|
+
return {
|
|
55
|
+
|
|
56
|
+
'resources': ((json['resources'] as Array<any>).map(ResourceEnumFromJSON)),
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function SwaggerEnumSchemasToJSON(json: any): SwaggerEnumSchemas {
|
|
61
|
+
return SwaggerEnumSchemasToJSONTyped(json, false);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function SwaggerEnumSchemasToJSONTyped(value?: SwaggerEnumSchemas | null, ignoreDiscriminator: boolean = false): any {
|
|
65
|
+
if (value == null) {
|
|
66
|
+
return value;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
return {
|
|
70
|
+
|
|
71
|
+
'resources': ((value['resources'] as Array<any>).map(ResourceEnumToJSON)),
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
|
package/src/models/Tenant.ts
CHANGED
|
@@ -77,7 +77,7 @@ export interface Tenant {
|
|
|
77
77
|
* @type {string}
|
|
78
78
|
* @memberof Tenant
|
|
79
79
|
*/
|
|
80
|
-
|
|
80
|
+
domain: string;
|
|
81
81
|
/**
|
|
82
82
|
*
|
|
83
83
|
* @type {string}
|
|
@@ -143,7 +143,7 @@ export function instanceOfTenant(value: object): value is Tenant {
|
|
|
143
143
|
if (!('id' in value) || value['id'] === undefined) return false;
|
|
144
144
|
if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
|
|
145
145
|
if (!('updatedAt' in value) || value['updatedAt'] === undefined) return false;
|
|
146
|
-
if (!('
|
|
146
|
+
if (!('domain' in value) || value['domain'] === undefined) return false;
|
|
147
147
|
if (!('name' in value) || value['name'] === undefined) return false;
|
|
148
148
|
if (!('status' in value) || value['status'] === undefined) return false;
|
|
149
149
|
return true;
|
|
@@ -163,7 +163,7 @@ export function TenantFromJSONTyped(json: any, ignoreDiscriminator: boolean): Te
|
|
|
163
163
|
'createdAt': (new Date(json['createdAt'])),
|
|
164
164
|
'updatedAt': (new Date(json['updatedAt'])),
|
|
165
165
|
'deletedAt': json['deletedAt'] == null ? undefined : (new Date(json['deletedAt'])),
|
|
166
|
-
'
|
|
166
|
+
'domain': json['domain'],
|
|
167
167
|
'name': json['name'],
|
|
168
168
|
'logo': json['logo'] == null ? undefined : json['logo'],
|
|
169
169
|
'settings': json['settings'] == null ? undefined : json['settings'],
|
|
@@ -191,7 +191,7 @@ export function TenantToJSONTyped(value?: Tenant | null, ignoreDiscriminator: bo
|
|
|
191
191
|
'createdAt': ((value['createdAt']).toISOString()),
|
|
192
192
|
'updatedAt': ((value['updatedAt']).toISOString()),
|
|
193
193
|
'deletedAt': value['deletedAt'] == null ? undefined : ((value['deletedAt']).toISOString()),
|
|
194
|
-
'
|
|
194
|
+
'domain': value['domain'],
|
|
195
195
|
'name': value['name'],
|
|
196
196
|
'logo': value['logo'],
|
|
197
197
|
'settings': value['settings'],
|
package/src/models/index.ts
CHANGED
|
@@ -165,6 +165,7 @@ export * from './RefreshTokenDto';
|
|
|
165
165
|
export * from './RefreshTokenResponse';
|
|
166
166
|
export * from './RefreshTokenResponseDto';
|
|
167
167
|
export * from './RejectRateAdjustmentDto';
|
|
168
|
+
export * from './ResourceEnum';
|
|
168
169
|
export * from './RevenueByStatusDto';
|
|
169
170
|
export * from './RevenueReportDto';
|
|
170
171
|
export * from './RevenueReportSuccessResponse';
|
|
@@ -175,6 +176,7 @@ export * from './ServiceRequestStatusEnum';
|
|
|
175
176
|
export * from './ServiceRequestTypeEnum';
|
|
176
177
|
export * from './StaffUsersPaginatedResponse';
|
|
177
178
|
export * from './SubmitMeterReadingDto';
|
|
179
|
+
export * from './SwaggerEnumSchemas';
|
|
178
180
|
export * from './Tenant';
|
|
179
181
|
export * from './TenantSettingsResponseDto';
|
|
180
182
|
export * from './TenantSettingsSuccessResponse';
|