electric-coop-api 0.1.54 → 0.1.55

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 (55) hide show
  1. package/.openapi-generator/FILES +5 -3
  2. package/README.md +2 -2
  3. package/dist/apis/AdminAuditLogsApi.d.ts +33 -9
  4. package/dist/apis/AdminAuditLogsApi.js +46 -7
  5. package/dist/apis/AdminWorkOrdersApi.d.ts +1 -1
  6. package/dist/esm/apis/AdminAuditLogsApi.d.ts +33 -9
  7. package/dist/esm/apis/AdminAuditLogsApi.js +47 -8
  8. package/dist/esm/apis/AdminWorkOrdersApi.d.ts +1 -1
  9. package/dist/esm/models/AuditLogActionsResponseDto.d.ts +32 -0
  10. package/dist/esm/models/AuditLogActionsResponseDto.js +43 -0
  11. package/dist/esm/models/AuditLogActionsSuccessResponse.d.ts +45 -0
  12. package/dist/esm/models/{AuditLogsFiltersSuccessResponse.js → AuditLogActionsSuccessResponse.js} +11 -11
  13. package/dist/esm/models/AuditLogEntityTypeEnum.d.ts +25 -0
  14. package/dist/esm/models/AuditLogEntityTypeEnum.js +43 -0
  15. package/dist/esm/models/AuditLogEntityTypesResponseDto.d.ts +32 -0
  16. package/dist/esm/models/AuditLogEntityTypesResponseDto.js +43 -0
  17. package/dist/esm/models/AuditLogEntityTypesSuccessResponse.d.ts +45 -0
  18. package/dist/esm/models/AuditLogEntityTypesSuccessResponse.js +50 -0
  19. package/dist/esm/models/index.d.ts +5 -3
  20. package/dist/esm/models/index.js +5 -3
  21. package/dist/models/AuditLogActionsResponseDto.d.ts +32 -0
  22. package/dist/models/AuditLogActionsResponseDto.js +50 -0
  23. package/dist/models/AuditLogActionsSuccessResponse.d.ts +45 -0
  24. package/dist/models/AuditLogActionsSuccessResponse.js +57 -0
  25. package/dist/models/AuditLogEntityTypeEnum.d.ts +25 -0
  26. package/dist/models/AuditLogEntityTypeEnum.js +51 -0
  27. package/dist/models/AuditLogEntityTypesResponseDto.d.ts +32 -0
  28. package/dist/models/AuditLogEntityTypesResponseDto.js +50 -0
  29. package/dist/models/AuditLogEntityTypesSuccessResponse.d.ts +45 -0
  30. package/dist/models/AuditLogEntityTypesSuccessResponse.js +57 -0
  31. package/dist/models/index.d.ts +5 -3
  32. package/dist/models/index.js +5 -3
  33. package/package.json +1 -1
  34. package/src/apis/AdminAuditLogsApi.ts +87 -14
  35. package/src/apis/AdminWorkOrdersApi.ts +1 -1
  36. package/src/models/AuditLogActionsResponseDto.ts +66 -0
  37. package/src/models/AuditLogActionsSuccessResponse.ts +91 -0
  38. package/src/models/AuditLogEntityTypeEnum.ts +53 -0
  39. package/src/models/AuditLogEntityTypesResponseDto.ts +66 -0
  40. package/src/models/AuditLogEntityTypesSuccessResponse.ts +91 -0
  41. package/src/models/index.ts +5 -3
  42. package/dist/esm/models/AuditLogEntityTypeFilterDto.d.ts +0 -38
  43. package/dist/esm/models/AuditLogEntityTypeFilterDto.js +0 -47
  44. package/dist/esm/models/AuditLogsFiltersResponseDto.d.ts +0 -33
  45. package/dist/esm/models/AuditLogsFiltersResponseDto.js +0 -44
  46. package/dist/esm/models/AuditLogsFiltersSuccessResponse.d.ts +0 -45
  47. package/dist/models/AuditLogEntityTypeFilterDto.d.ts +0 -38
  48. package/dist/models/AuditLogEntityTypeFilterDto.js +0 -54
  49. package/dist/models/AuditLogsFiltersResponseDto.d.ts +0 -33
  50. package/dist/models/AuditLogsFiltersResponseDto.js +0 -51
  51. package/dist/models/AuditLogsFiltersSuccessResponse.d.ts +0 -45
  52. package/dist/models/AuditLogsFiltersSuccessResponse.js +0 -57
  53. package/src/models/AuditLogEntityTypeFilterDto.ts +0 -75
  54. package/src/models/AuditLogsFiltersResponseDto.ts +0 -74
  55. package/src/models/AuditLogsFiltersSuccessResponse.ts +0 -91
@@ -52,9 +52,11 @@ src/models/AdminWorkOrdersPaginatedResponse.ts
52
52
  src/models/ApproveRateAdjustmentDto.ts
53
53
  src/models/AssignWorkOrderDto.ts
54
54
  src/models/AuditLog.ts
55
- src/models/AuditLogEntityTypeFilterDto.ts
56
- src/models/AuditLogsFiltersResponseDto.ts
57
- src/models/AuditLogsFiltersSuccessResponse.ts
55
+ src/models/AuditLogActionsResponseDto.ts
56
+ src/models/AuditLogActionsSuccessResponse.ts
57
+ src/models/AuditLogEntityTypeEnum.ts
58
+ src/models/AuditLogEntityTypesResponseDto.ts
59
+ src/models/AuditLogEntityTypesSuccessResponse.ts
58
60
  src/models/AuthAdminLoginResponse.ts
59
61
  src/models/AuthConsumerAccountDto.ts
60
62
  src/models/AuthLoginResponse.ts
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ## electric-coop-api@0.1.54
1
+ ## electric-coop-api@0.1.55
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.54 --save
39
+ npm install electric-coop-api@0.1.55 --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 { AdminAuditLogsPaginatedResponse, AuditLogsFiltersSuccessResponse } from '../models/index';
13
+ import type { AdminAuditLogsPaginatedResponse, AuditLogActionsSuccessResponse, AuditLogEntityTypeEnum, AuditLogEntityTypesSuccessResponse } from '../models/index';
14
14
  export interface GetAdminAuditLogsRequest {
15
15
  page?: number;
16
16
  limit?: number;
@@ -21,6 +21,9 @@ export interface GetAdminAuditLogsRequest {
21
21
  from?: string;
22
22
  to?: string;
23
23
  }
24
+ export interface GetAdminAuditLogsActionsRequest {
25
+ entityType: AuditLogEntityTypeEnum;
26
+ }
24
27
  /**
25
28
  * AdminAuditLogsApi - interface
26
29
  *
@@ -50,16 +53,29 @@ export interface AdminAuditLogsApiInterface {
50
53
  getAdminAuditLogs(requestParameters: GetAdminAuditLogsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminAuditLogsPaginatedResponse>;
51
54
  /**
52
55
  *
53
- * @summary Get available filter values (entity types & actions)
56
+ * @summary Get available actions for a given entity type
57
+ * @param {AuditLogEntityTypeEnum} entityType The entity type to retrieve available actions for
54
58
  * @param {*} [options] Override http request option.
55
59
  * @throws {RequiredError}
56
60
  * @memberof AdminAuditLogsApiInterface
57
61
  */
58
- getAdminAuditLogsFiltersRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AuditLogsFiltersSuccessResponse>>;
62
+ getAdminAuditLogsActionsRaw(requestParameters: GetAdminAuditLogsActionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AuditLogActionsSuccessResponse>>;
63
+ /**
64
+ * Get available actions for a given entity type
65
+ */
66
+ getAdminAuditLogsActions(requestParameters: GetAdminAuditLogsActionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AuditLogActionsSuccessResponse>;
59
67
  /**
60
- * Get available filter values (entity types & actions)
68
+ *
69
+ * @summary Get all available entity types
70
+ * @param {*} [options] Override http request option.
71
+ * @throws {RequiredError}
72
+ * @memberof AdminAuditLogsApiInterface
61
73
  */
62
- getAdminAuditLogsFilters(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AuditLogsFiltersSuccessResponse>;
74
+ getAdminAuditLogsEntityTypesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AuditLogEntityTypesSuccessResponse>>;
75
+ /**
76
+ * Get all available entity types
77
+ */
78
+ getAdminAuditLogsEntityTypes(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AuditLogEntityTypesSuccessResponse>;
63
79
  }
64
80
  /**
65
81
  *
@@ -74,11 +90,19 @@ export declare class AdminAuditLogsApi extends runtime.BaseAPI implements AdminA
74
90
  */
75
91
  getAdminAuditLogs(requestParameters?: GetAdminAuditLogsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminAuditLogsPaginatedResponse>;
76
92
  /**
77
- * Get available filter values (entity types & actions)
93
+ * Get available actions for a given entity type
94
+ */
95
+ getAdminAuditLogsActionsRaw(requestParameters: GetAdminAuditLogsActionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AuditLogActionsSuccessResponse>>;
96
+ /**
97
+ * Get available actions for a given entity type
98
+ */
99
+ getAdminAuditLogsActions(requestParameters: GetAdminAuditLogsActionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AuditLogActionsSuccessResponse>;
100
+ /**
101
+ * Get all available entity types
78
102
  */
79
- getAdminAuditLogsFiltersRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AuditLogsFiltersSuccessResponse>>;
103
+ getAdminAuditLogsEntityTypesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AuditLogEntityTypesSuccessResponse>>;
80
104
  /**
81
- * Get available filter values (entity types & actions)
105
+ * Get all available entity types
82
106
  */
83
- getAdminAuditLogsFilters(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AuditLogsFiltersSuccessResponse>;
107
+ getAdminAuditLogsEntityTypes(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AuditLogEntityTypesSuccessResponse>;
84
108
  }
@@ -87,9 +87,48 @@ class AdminAuditLogsApi extends runtime.BaseAPI {
87
87
  });
88
88
  }
89
89
  /**
90
- * Get available filter values (entity types & actions)
90
+ * Get available actions for a given entity type
91
91
  */
92
- getAdminAuditLogsFiltersRaw(initOverrides) {
92
+ getAdminAuditLogsActionsRaw(requestParameters, initOverrides) {
93
+ return __awaiter(this, void 0, void 0, function* () {
94
+ if (requestParameters['entityType'] == null) {
95
+ throw new runtime.RequiredError('entityType', 'Required parameter "entityType" was null or undefined when calling getAdminAuditLogsActions().');
96
+ }
97
+ const queryParameters = {};
98
+ if (requestParameters['entityType'] != null) {
99
+ queryParameters['entityType'] = requestParameters['entityType'];
100
+ }
101
+ const headerParameters = {};
102
+ if (this.configuration && this.configuration.accessToken) {
103
+ const token = this.configuration.accessToken;
104
+ const tokenString = yield token("bearer", []);
105
+ if (tokenString) {
106
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
107
+ }
108
+ }
109
+ let urlPath = `/api/v1/admin/audit-logs/filter/actions`;
110
+ const response = yield this.request({
111
+ path: urlPath,
112
+ method: 'GET',
113
+ headers: headerParameters,
114
+ query: queryParameters,
115
+ }, initOverrides);
116
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AuditLogActionsSuccessResponseFromJSON)(jsonValue));
117
+ });
118
+ }
119
+ /**
120
+ * Get available actions for a given entity type
121
+ */
122
+ getAdminAuditLogsActions(requestParameters, initOverrides) {
123
+ return __awaiter(this, void 0, void 0, function* () {
124
+ const response = yield this.getAdminAuditLogsActionsRaw(requestParameters, initOverrides);
125
+ return yield response.value();
126
+ });
127
+ }
128
+ /**
129
+ * Get all available entity types
130
+ */
131
+ getAdminAuditLogsEntityTypesRaw(initOverrides) {
93
132
  return __awaiter(this, void 0, void 0, function* () {
94
133
  const queryParameters = {};
95
134
  const headerParameters = {};
@@ -100,22 +139,22 @@ class AdminAuditLogsApi extends runtime.BaseAPI {
100
139
  headerParameters["Authorization"] = `Bearer ${tokenString}`;
101
140
  }
102
141
  }
103
- let urlPath = `/api/v1/admin/audit-logs/filters`;
142
+ let urlPath = `/api/v1/admin/audit-logs/filter/entity-types`;
104
143
  const response = yield this.request({
105
144
  path: urlPath,
106
145
  method: 'GET',
107
146
  headers: headerParameters,
108
147
  query: queryParameters,
109
148
  }, initOverrides);
110
- return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AuditLogsFiltersSuccessResponseFromJSON)(jsonValue));
149
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AuditLogEntityTypesSuccessResponseFromJSON)(jsonValue));
111
150
  });
112
151
  }
113
152
  /**
114
- * Get available filter values (entity types & actions)
153
+ * Get all available entity types
115
154
  */
116
- getAdminAuditLogsFilters(initOverrides) {
155
+ getAdminAuditLogsEntityTypes(initOverrides) {
117
156
  return __awaiter(this, void 0, void 0, function* () {
118
- const response = yield this.getAdminAuditLogsFiltersRaw(initOverrides);
157
+ const response = yield this.getAdminAuditLogsEntityTypesRaw(initOverrides);
119
158
  return yield response.value();
120
159
  });
121
160
  }
@@ -99,7 +99,7 @@ export interface AdminWorkOrdersApiInterface {
99
99
  * @summary List work orders (admin)
100
100
  * @param {number} [page]
101
101
  * @param {number} [limit]
102
- * @param {string} [search] Search by work order number, title, or location
102
+ * @param {string} [search]
103
103
  * @param {WorkOrderStatusEnum} [status]
104
104
  * @param {WorkOrderTypeEnum} [type]
105
105
  * @param {string} [assignedTo]
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { AdminAuditLogsPaginatedResponse, AuditLogsFiltersSuccessResponse } from '../models/index';
13
+ import type { AdminAuditLogsPaginatedResponse, AuditLogActionsSuccessResponse, AuditLogEntityTypeEnum, AuditLogEntityTypesSuccessResponse } from '../models/index';
14
14
  export interface GetAdminAuditLogsRequest {
15
15
  page?: number;
16
16
  limit?: number;
@@ -21,6 +21,9 @@ export interface GetAdminAuditLogsRequest {
21
21
  from?: string;
22
22
  to?: string;
23
23
  }
24
+ export interface GetAdminAuditLogsActionsRequest {
25
+ entityType: AuditLogEntityTypeEnum;
26
+ }
24
27
  /**
25
28
  * AdminAuditLogsApi - interface
26
29
  *
@@ -50,16 +53,29 @@ export interface AdminAuditLogsApiInterface {
50
53
  getAdminAuditLogs(requestParameters: GetAdminAuditLogsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminAuditLogsPaginatedResponse>;
51
54
  /**
52
55
  *
53
- * @summary Get available filter values (entity types & actions)
56
+ * @summary Get available actions for a given entity type
57
+ * @param {AuditLogEntityTypeEnum} entityType The entity type to retrieve available actions for
54
58
  * @param {*} [options] Override http request option.
55
59
  * @throws {RequiredError}
56
60
  * @memberof AdminAuditLogsApiInterface
57
61
  */
58
- getAdminAuditLogsFiltersRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AuditLogsFiltersSuccessResponse>>;
62
+ getAdminAuditLogsActionsRaw(requestParameters: GetAdminAuditLogsActionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AuditLogActionsSuccessResponse>>;
63
+ /**
64
+ * Get available actions for a given entity type
65
+ */
66
+ getAdminAuditLogsActions(requestParameters: GetAdminAuditLogsActionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AuditLogActionsSuccessResponse>;
59
67
  /**
60
- * Get available filter values (entity types & actions)
68
+ *
69
+ * @summary Get all available entity types
70
+ * @param {*} [options] Override http request option.
71
+ * @throws {RequiredError}
72
+ * @memberof AdminAuditLogsApiInterface
61
73
  */
62
- getAdminAuditLogsFilters(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AuditLogsFiltersSuccessResponse>;
74
+ getAdminAuditLogsEntityTypesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AuditLogEntityTypesSuccessResponse>>;
75
+ /**
76
+ * Get all available entity types
77
+ */
78
+ getAdminAuditLogsEntityTypes(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AuditLogEntityTypesSuccessResponse>;
63
79
  }
64
80
  /**
65
81
  *
@@ -74,11 +90,19 @@ export declare class AdminAuditLogsApi extends runtime.BaseAPI implements AdminA
74
90
  */
75
91
  getAdminAuditLogs(requestParameters?: GetAdminAuditLogsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminAuditLogsPaginatedResponse>;
76
92
  /**
77
- * Get available filter values (entity types & actions)
93
+ * Get available actions for a given entity type
94
+ */
95
+ getAdminAuditLogsActionsRaw(requestParameters: GetAdminAuditLogsActionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AuditLogActionsSuccessResponse>>;
96
+ /**
97
+ * Get available actions for a given entity type
98
+ */
99
+ getAdminAuditLogsActions(requestParameters: GetAdminAuditLogsActionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AuditLogActionsSuccessResponse>;
100
+ /**
101
+ * Get all available entity types
78
102
  */
79
- getAdminAuditLogsFiltersRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AuditLogsFiltersSuccessResponse>>;
103
+ getAdminAuditLogsEntityTypesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AuditLogEntityTypesSuccessResponse>>;
80
104
  /**
81
- * Get available filter values (entity types & actions)
105
+ * Get all available entity types
82
106
  */
83
- getAdminAuditLogsFilters(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AuditLogsFiltersSuccessResponse>;
107
+ getAdminAuditLogsEntityTypes(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AuditLogEntityTypesSuccessResponse>;
84
108
  }
@@ -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 { AdminAuditLogsPaginatedResponseFromJSON, AuditLogsFiltersSuccessResponseFromJSON, } from '../models/index';
24
+ import { AdminAuditLogsPaginatedResponseFromJSON, AuditLogActionsSuccessResponseFromJSON, AuditLogEntityTypesSuccessResponseFromJSON, } from '../models/index';
25
25
  /**
26
26
  *
27
27
  */
@@ -84,9 +84,48 @@ export class AdminAuditLogsApi extends runtime.BaseAPI {
84
84
  });
85
85
  }
86
86
  /**
87
- * Get available filter values (entity types & actions)
87
+ * Get available actions for a given entity type
88
88
  */
89
- getAdminAuditLogsFiltersRaw(initOverrides) {
89
+ getAdminAuditLogsActionsRaw(requestParameters, initOverrides) {
90
+ return __awaiter(this, void 0, void 0, function* () {
91
+ if (requestParameters['entityType'] == null) {
92
+ throw new runtime.RequiredError('entityType', 'Required parameter "entityType" was null or undefined when calling getAdminAuditLogsActions().');
93
+ }
94
+ const queryParameters = {};
95
+ if (requestParameters['entityType'] != null) {
96
+ queryParameters['entityType'] = requestParameters['entityType'];
97
+ }
98
+ const headerParameters = {};
99
+ if (this.configuration && this.configuration.accessToken) {
100
+ const token = this.configuration.accessToken;
101
+ const tokenString = yield token("bearer", []);
102
+ if (tokenString) {
103
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
104
+ }
105
+ }
106
+ let urlPath = `/api/v1/admin/audit-logs/filter/actions`;
107
+ const response = yield this.request({
108
+ path: urlPath,
109
+ method: 'GET',
110
+ headers: headerParameters,
111
+ query: queryParameters,
112
+ }, initOverrides);
113
+ return new runtime.JSONApiResponse(response, (jsonValue) => AuditLogActionsSuccessResponseFromJSON(jsonValue));
114
+ });
115
+ }
116
+ /**
117
+ * Get available actions for a given entity type
118
+ */
119
+ getAdminAuditLogsActions(requestParameters, initOverrides) {
120
+ return __awaiter(this, void 0, void 0, function* () {
121
+ const response = yield this.getAdminAuditLogsActionsRaw(requestParameters, initOverrides);
122
+ return yield response.value();
123
+ });
124
+ }
125
+ /**
126
+ * Get all available entity types
127
+ */
128
+ getAdminAuditLogsEntityTypesRaw(initOverrides) {
90
129
  return __awaiter(this, void 0, void 0, function* () {
91
130
  const queryParameters = {};
92
131
  const headerParameters = {};
@@ -97,22 +136,22 @@ export class AdminAuditLogsApi extends runtime.BaseAPI {
97
136
  headerParameters["Authorization"] = `Bearer ${tokenString}`;
98
137
  }
99
138
  }
100
- let urlPath = `/api/v1/admin/audit-logs/filters`;
139
+ let urlPath = `/api/v1/admin/audit-logs/filter/entity-types`;
101
140
  const response = yield this.request({
102
141
  path: urlPath,
103
142
  method: 'GET',
104
143
  headers: headerParameters,
105
144
  query: queryParameters,
106
145
  }, initOverrides);
107
- return new runtime.JSONApiResponse(response, (jsonValue) => AuditLogsFiltersSuccessResponseFromJSON(jsonValue));
146
+ return new runtime.JSONApiResponse(response, (jsonValue) => AuditLogEntityTypesSuccessResponseFromJSON(jsonValue));
108
147
  });
109
148
  }
110
149
  /**
111
- * Get available filter values (entity types & actions)
150
+ * Get all available entity types
112
151
  */
113
- getAdminAuditLogsFilters(initOverrides) {
152
+ getAdminAuditLogsEntityTypes(initOverrides) {
114
153
  return __awaiter(this, void 0, void 0, function* () {
115
- const response = yield this.getAdminAuditLogsFiltersRaw(initOverrides);
154
+ const response = yield this.getAdminAuditLogsEntityTypesRaw(initOverrides);
116
155
  return yield response.value();
117
156
  });
118
157
  }
@@ -99,7 +99,7 @@ export interface AdminWorkOrdersApiInterface {
99
99
  * @summary List work orders (admin)
100
100
  * @param {number} [page]
101
101
  * @param {number} [limit]
102
- * @param {string} [search] Search by work order number, title, or location
102
+ * @param {string} [search]
103
103
  * @param {WorkOrderStatusEnum} [status]
104
104
  * @param {WorkOrderTypeEnum} [type]
105
105
  * @param {string} [assignedTo]
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Electric Cooperative Consumer Portal API
3
+ * Multi-tenant SaaS platform for Philippine electric cooperatives
4
+ *
5
+ * The version of the OpenAPI document: 1.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface AuditLogActionsResponseDto
16
+ */
17
+ export interface AuditLogActionsResponseDto {
18
+ /**
19
+ *
20
+ * @type {Array<string>}
21
+ * @memberof AuditLogActionsResponseDto
22
+ */
23
+ actions: Array<string>;
24
+ }
25
+ /**
26
+ * Check if a given object implements the AuditLogActionsResponseDto interface.
27
+ */
28
+ export declare function instanceOfAuditLogActionsResponseDto(value: object): value is AuditLogActionsResponseDto;
29
+ export declare function AuditLogActionsResponseDtoFromJSON(json: any): AuditLogActionsResponseDto;
30
+ export declare function AuditLogActionsResponseDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): AuditLogActionsResponseDto;
31
+ export declare function AuditLogActionsResponseDtoToJSON(json: any): AuditLogActionsResponseDto;
32
+ export declare function AuditLogActionsResponseDtoToJSONTyped(value?: AuditLogActionsResponseDto | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,43 @@
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
+ * Check if a given object implements the AuditLogActionsResponseDto interface.
16
+ */
17
+ export function instanceOfAuditLogActionsResponseDto(value) {
18
+ if (!('actions' in value) || value['actions'] === undefined)
19
+ return false;
20
+ return true;
21
+ }
22
+ export function AuditLogActionsResponseDtoFromJSON(json) {
23
+ return AuditLogActionsResponseDtoFromJSONTyped(json, false);
24
+ }
25
+ export function AuditLogActionsResponseDtoFromJSONTyped(json, ignoreDiscriminator) {
26
+ if (json == null) {
27
+ return json;
28
+ }
29
+ return {
30
+ 'actions': json['actions'],
31
+ };
32
+ }
33
+ export function AuditLogActionsResponseDtoToJSON(json) {
34
+ return AuditLogActionsResponseDtoToJSONTyped(json, false);
35
+ }
36
+ export function AuditLogActionsResponseDtoToJSONTyped(value, ignoreDiscriminator = false) {
37
+ if (value == null) {
38
+ return value;
39
+ }
40
+ return {
41
+ 'actions': value['actions'],
42
+ };
43
+ }
@@ -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 { AuditLogActionsResponseDto } from './AuditLogActionsResponseDto';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface AuditLogActionsSuccessResponse
17
+ */
18
+ export interface AuditLogActionsSuccessResponse {
19
+ /**
20
+ *
21
+ * @type {boolean}
22
+ * @memberof AuditLogActionsSuccessResponse
23
+ */
24
+ success: boolean;
25
+ /**
26
+ *
27
+ * @type {string}
28
+ * @memberof AuditLogActionsSuccessResponse
29
+ */
30
+ error?: string;
31
+ /**
32
+ *
33
+ * @type {AuditLogActionsResponseDto}
34
+ * @memberof AuditLogActionsSuccessResponse
35
+ */
36
+ data: AuditLogActionsResponseDto;
37
+ }
38
+ /**
39
+ * Check if a given object implements the AuditLogActionsSuccessResponse interface.
40
+ */
41
+ export declare function instanceOfAuditLogActionsSuccessResponse(value: object): value is AuditLogActionsSuccessResponse;
42
+ export declare function AuditLogActionsSuccessResponseFromJSON(json: any): AuditLogActionsSuccessResponse;
43
+ export declare function AuditLogActionsSuccessResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): AuditLogActionsSuccessResponse;
44
+ export declare function AuditLogActionsSuccessResponseToJSON(json: any): AuditLogActionsSuccessResponse;
45
+ export declare function AuditLogActionsSuccessResponseToJSONTyped(value?: AuditLogActionsSuccessResponse | null, ignoreDiscriminator?: boolean): any;
@@ -11,40 +11,40 @@
11
11
  * https://openapi-generator.tech
12
12
  * Do not edit the class manually.
13
13
  */
14
- import { AuditLogsFiltersResponseDtoFromJSON, AuditLogsFiltersResponseDtoToJSON, } from './AuditLogsFiltersResponseDto';
14
+ import { AuditLogActionsResponseDtoFromJSON, AuditLogActionsResponseDtoToJSON, } from './AuditLogActionsResponseDto';
15
15
  /**
16
- * Check if a given object implements the AuditLogsFiltersSuccessResponse interface.
16
+ * Check if a given object implements the AuditLogActionsSuccessResponse interface.
17
17
  */
18
- export function instanceOfAuditLogsFiltersSuccessResponse(value) {
18
+ export function instanceOfAuditLogActionsSuccessResponse(value) {
19
19
  if (!('success' in value) || value['success'] === undefined)
20
20
  return false;
21
21
  if (!('data' in value) || value['data'] === undefined)
22
22
  return false;
23
23
  return true;
24
24
  }
25
- export function AuditLogsFiltersSuccessResponseFromJSON(json) {
26
- return AuditLogsFiltersSuccessResponseFromJSONTyped(json, false);
25
+ export function AuditLogActionsSuccessResponseFromJSON(json) {
26
+ return AuditLogActionsSuccessResponseFromJSONTyped(json, false);
27
27
  }
28
- export function AuditLogsFiltersSuccessResponseFromJSONTyped(json, ignoreDiscriminator) {
28
+ export function AuditLogActionsSuccessResponseFromJSONTyped(json, ignoreDiscriminator) {
29
29
  if (json == null) {
30
30
  return json;
31
31
  }
32
32
  return {
33
33
  'success': json['success'],
34
34
  'error': json['error'] == null ? undefined : json['error'],
35
- 'data': AuditLogsFiltersResponseDtoFromJSON(json['data']),
35
+ 'data': AuditLogActionsResponseDtoFromJSON(json['data']),
36
36
  };
37
37
  }
38
- export function AuditLogsFiltersSuccessResponseToJSON(json) {
39
- return AuditLogsFiltersSuccessResponseToJSONTyped(json, false);
38
+ export function AuditLogActionsSuccessResponseToJSON(json) {
39
+ return AuditLogActionsSuccessResponseToJSONTyped(json, false);
40
40
  }
41
- export function AuditLogsFiltersSuccessResponseToJSONTyped(value, ignoreDiscriminator = false) {
41
+ export function AuditLogActionsSuccessResponseToJSONTyped(value, ignoreDiscriminator = false) {
42
42
  if (value == null) {
43
43
  return value;
44
44
  }
45
45
  return {
46
46
  'success': value['success'],
47
47
  'error': value['error'],
48
- 'data': AuditLogsFiltersResponseDtoToJSON(value['data']),
48
+ 'data': AuditLogActionsResponseDtoToJSON(value['data']),
49
49
  };
50
50
  }
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Electric Cooperative Consumer Portal API
3
+ * Multi-tenant SaaS platform for Philippine electric cooperatives
4
+ *
5
+ * The version of the OpenAPI document: 1.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ */
16
+ export declare const AuditLogEntityTypeEnum: {
17
+ readonly Outage: "outage";
18
+ readonly WorkOrder: "work_order";
19
+ };
20
+ export type AuditLogEntityTypeEnum = typeof AuditLogEntityTypeEnum[keyof typeof AuditLogEntityTypeEnum];
21
+ export declare function instanceOfAuditLogEntityTypeEnum(value: any): boolean;
22
+ export declare function AuditLogEntityTypeEnumFromJSON(json: any): AuditLogEntityTypeEnum;
23
+ export declare function AuditLogEntityTypeEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): AuditLogEntityTypeEnum;
24
+ export declare function AuditLogEntityTypeEnumToJSON(value?: AuditLogEntityTypeEnum | null): any;
25
+ export declare function AuditLogEntityTypeEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): AuditLogEntityTypeEnum;
@@ -0,0 +1,43 @@
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
+ * @export
17
+ */
18
+ export const AuditLogEntityTypeEnum = {
19
+ Outage: 'outage',
20
+ WorkOrder: 'work_order'
21
+ };
22
+ export function instanceOfAuditLogEntityTypeEnum(value) {
23
+ for (const key in AuditLogEntityTypeEnum) {
24
+ if (Object.prototype.hasOwnProperty.call(AuditLogEntityTypeEnum, key)) {
25
+ if (AuditLogEntityTypeEnum[key] === value) {
26
+ return true;
27
+ }
28
+ }
29
+ }
30
+ return false;
31
+ }
32
+ export function AuditLogEntityTypeEnumFromJSON(json) {
33
+ return AuditLogEntityTypeEnumFromJSONTyped(json, false);
34
+ }
35
+ export function AuditLogEntityTypeEnumFromJSONTyped(json, ignoreDiscriminator) {
36
+ return json;
37
+ }
38
+ export function AuditLogEntityTypeEnumToJSON(value) {
39
+ return value;
40
+ }
41
+ export function AuditLogEntityTypeEnumToJSONTyped(value, ignoreDiscriminator) {
42
+ return value;
43
+ }
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Electric Cooperative Consumer Portal API
3
+ * Multi-tenant SaaS platform for Philippine electric cooperatives
4
+ *
5
+ * The version of the OpenAPI document: 1.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface AuditLogEntityTypesResponseDto
16
+ */
17
+ export interface AuditLogEntityTypesResponseDto {
18
+ /**
19
+ *
20
+ * @type {Array<string>}
21
+ * @memberof AuditLogEntityTypesResponseDto
22
+ */
23
+ entityTypes: Array<string>;
24
+ }
25
+ /**
26
+ * Check if a given object implements the AuditLogEntityTypesResponseDto interface.
27
+ */
28
+ export declare function instanceOfAuditLogEntityTypesResponseDto(value: object): value is AuditLogEntityTypesResponseDto;
29
+ export declare function AuditLogEntityTypesResponseDtoFromJSON(json: any): AuditLogEntityTypesResponseDto;
30
+ export declare function AuditLogEntityTypesResponseDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): AuditLogEntityTypesResponseDto;
31
+ export declare function AuditLogEntityTypesResponseDtoToJSON(json: any): AuditLogEntityTypesResponseDto;
32
+ export declare function AuditLogEntityTypesResponseDtoToJSONTyped(value?: AuditLogEntityTypesResponseDto | null, ignoreDiscriminator?: boolean): any;