electric-coop-api 0.1.49 → 0.1.52

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 (68) hide show
  1. package/.openapi-generator/FILES +9 -0
  2. package/README.md +2 -2
  3. package/dist/apis/AdminAuditLogsApi.d.ts +84 -0
  4. package/dist/apis/AdminAuditLogsApi.js +123 -0
  5. package/dist/apis/AdminNotificationsApi.d.ts +50 -0
  6. package/dist/apis/AdminNotificationsApi.js +71 -0
  7. package/dist/apis/AdminWorkOrdersApi.d.ts +3 -1
  8. package/dist/apis/AdminWorkOrdersApi.js +3 -0
  9. package/dist/apis/index.d.ts +2 -0
  10. package/dist/apis/index.js +2 -0
  11. package/dist/esm/apis/AdminAuditLogsApi.d.ts +84 -0
  12. package/dist/esm/apis/AdminAuditLogsApi.js +119 -0
  13. package/dist/esm/apis/AdminNotificationsApi.d.ts +50 -0
  14. package/dist/esm/apis/AdminNotificationsApi.js +67 -0
  15. package/dist/esm/apis/AdminWorkOrdersApi.d.ts +3 -1
  16. package/dist/esm/apis/AdminWorkOrdersApi.js +3 -0
  17. package/dist/esm/apis/index.d.ts +2 -0
  18. package/dist/esm/apis/index.js +2 -0
  19. package/dist/esm/models/AdminAuditLogsPaginatedResponse.d.ts +52 -0
  20. package/dist/esm/models/AdminAuditLogsPaginatedResponse.js +55 -0
  21. package/dist/esm/models/AdminSendNotificationDto.d.ts +58 -0
  22. package/dist/esm/models/AdminSendNotificationDto.js +59 -0
  23. package/dist/esm/models/AdminSendNotificationResponse.d.ts +44 -0
  24. package/dist/esm/models/AdminSendNotificationResponse.js +49 -0
  25. package/dist/esm/models/AuditLog.d.ts +98 -0
  26. package/dist/esm/models/AuditLog.js +79 -0
  27. package/dist/esm/models/AuditLogEntityTypeFilterDto.d.ts +38 -0
  28. package/dist/esm/models/AuditLogEntityTypeFilterDto.js +47 -0
  29. package/dist/esm/models/AuditLogsFiltersResponseDto.d.ts +33 -0
  30. package/dist/esm/models/AuditLogsFiltersResponseDto.js +44 -0
  31. package/dist/esm/models/NotificationTargetEnum.d.ts +27 -0
  32. package/dist/esm/models/NotificationTargetEnum.js +45 -0
  33. package/dist/esm/models/UpdateWorkOrderDto.d.ts +6 -0
  34. package/dist/esm/models/UpdateWorkOrderDto.js +2 -0
  35. package/dist/esm/models/index.d.ts +7 -0
  36. package/dist/esm/models/index.js +7 -0
  37. package/dist/models/AdminAuditLogsPaginatedResponse.d.ts +52 -0
  38. package/dist/models/AdminAuditLogsPaginatedResponse.js +62 -0
  39. package/dist/models/AdminSendNotificationDto.d.ts +58 -0
  40. package/dist/models/AdminSendNotificationDto.js +66 -0
  41. package/dist/models/AdminSendNotificationResponse.d.ts +44 -0
  42. package/dist/models/AdminSendNotificationResponse.js +56 -0
  43. package/dist/models/AuditLog.d.ts +98 -0
  44. package/dist/models/AuditLog.js +86 -0
  45. package/dist/models/AuditLogEntityTypeFilterDto.d.ts +38 -0
  46. package/dist/models/AuditLogEntityTypeFilterDto.js +54 -0
  47. package/dist/models/AuditLogsFiltersResponseDto.d.ts +33 -0
  48. package/dist/models/AuditLogsFiltersResponseDto.js +51 -0
  49. package/dist/models/NotificationTargetEnum.d.ts +27 -0
  50. package/dist/models/NotificationTargetEnum.js +53 -0
  51. package/dist/models/UpdateWorkOrderDto.d.ts +6 -0
  52. package/dist/models/UpdateWorkOrderDto.js +2 -0
  53. package/dist/models/index.d.ts +7 -0
  54. package/dist/models/index.js +7 -0
  55. package/package.json +1 -1
  56. package/src/apis/AdminAuditLogsApi.ts +198 -0
  57. package/src/apis/AdminNotificationsApi.ts +111 -0
  58. package/src/apis/AdminWorkOrdersApi.ts +7 -1
  59. package/src/apis/index.ts +2 -0
  60. package/src/models/AdminAuditLogsPaginatedResponse.ts +107 -0
  61. package/src/models/AdminSendNotificationDto.ts +118 -0
  62. package/src/models/AdminSendNotificationResponse.ts +83 -0
  63. package/src/models/AuditLog.ts +161 -0
  64. package/src/models/AuditLogEntityTypeFilterDto.ts +75 -0
  65. package/src/models/AuditLogsFiltersResponseDto.ts +74 -0
  66. package/src/models/NotificationTargetEnum.ts +55 -0
  67. package/src/models/UpdateWorkOrderDto.ts +8 -0
  68. package/src/models/index.ts +7 -0
@@ -0,0 +1,50 @@
1
+ /**
2
+ * Electric Cooperative Consumer Portal API
3
+ * Multi-tenant SaaS platform for Philippine electric cooperatives
4
+ *
5
+ * The version of the OpenAPI document: 1.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import * as runtime from '../runtime';
13
+ import type { AdminSendNotificationDto, AdminSendNotificationResponse } from '../models/index';
14
+ export interface AdminSendNotificationRequest {
15
+ adminSendNotificationDto: AdminSendNotificationDto;
16
+ }
17
+ /**
18
+ * AdminNotificationsApi - interface
19
+ *
20
+ * @export
21
+ * @interface AdminNotificationsApiInterface
22
+ */
23
+ export interface AdminNotificationsApiInterface {
24
+ /**
25
+ *
26
+ * @summary Send/broadcast a notification (admin)
27
+ * @param {AdminSendNotificationDto} adminSendNotificationDto
28
+ * @param {*} [options] Override http request option.
29
+ * @throws {RequiredError}
30
+ * @memberof AdminNotificationsApiInterface
31
+ */
32
+ adminSendNotificationRaw(requestParameters: AdminSendNotificationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdminSendNotificationResponse>>;
33
+ /**
34
+ * Send/broadcast a notification (admin)
35
+ */
36
+ adminSendNotification(requestParameters: AdminSendNotificationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminSendNotificationResponse>;
37
+ }
38
+ /**
39
+ *
40
+ */
41
+ export declare class AdminNotificationsApi extends runtime.BaseAPI implements AdminNotificationsApiInterface {
42
+ /**
43
+ * Send/broadcast a notification (admin)
44
+ */
45
+ adminSendNotificationRaw(requestParameters: AdminSendNotificationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdminSendNotificationResponse>>;
46
+ /**
47
+ * Send/broadcast a notification (admin)
48
+ */
49
+ adminSendNotification(requestParameters: AdminSendNotificationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminSendNotificationResponse>;
50
+ }
@@ -0,0 +1,67 @@
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
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
15
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16
+ return new (P || (P = Promise))(function (resolve, reject) {
17
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
18
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
19
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
20
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
21
+ });
22
+ };
23
+ import * as runtime from '../runtime';
24
+ import { AdminSendNotificationDtoToJSON, AdminSendNotificationResponseFromJSON, } from '../models/index';
25
+ /**
26
+ *
27
+ */
28
+ export class AdminNotificationsApi extends runtime.BaseAPI {
29
+ /**
30
+ * Send/broadcast a notification (admin)
31
+ */
32
+ adminSendNotificationRaw(requestParameters, initOverrides) {
33
+ return __awaiter(this, void 0, void 0, function* () {
34
+ if (requestParameters['adminSendNotificationDto'] == null) {
35
+ throw new runtime.RequiredError('adminSendNotificationDto', 'Required parameter "adminSendNotificationDto" was null or undefined when calling adminSendNotification().');
36
+ }
37
+ const queryParameters = {};
38
+ const headerParameters = {};
39
+ headerParameters['Content-Type'] = 'application/json';
40
+ if (this.configuration && this.configuration.accessToken) {
41
+ const token = this.configuration.accessToken;
42
+ const tokenString = yield token("bearer", []);
43
+ if (tokenString) {
44
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
45
+ }
46
+ }
47
+ let urlPath = `/api/v1/admin/notifications/send`;
48
+ const response = yield this.request({
49
+ path: urlPath,
50
+ method: 'POST',
51
+ headers: headerParameters,
52
+ query: queryParameters,
53
+ body: AdminSendNotificationDtoToJSON(requestParameters['adminSendNotificationDto']),
54
+ }, initOverrides);
55
+ return new runtime.JSONApiResponse(response, (jsonValue) => AdminSendNotificationResponseFromJSON(jsonValue));
56
+ });
57
+ }
58
+ /**
59
+ * Send/broadcast a notification (admin)
60
+ */
61
+ adminSendNotification(requestParameters, initOverrides) {
62
+ return __awaiter(this, void 0, void 0, function* () {
63
+ const response = yield this.adminSendNotificationRaw(requestParameters, initOverrides);
64
+ return yield response.value();
65
+ });
66
+ }
67
+ }
@@ -29,6 +29,7 @@ export interface GetAdminWorkOrdersRequest {
29
29
  type?: WorkOrderTypeEnum;
30
30
  assignedTo?: string;
31
31
  consumerId?: string;
32
+ outageId?: string;
32
33
  }
33
34
  export interface UpdateAdminWorkOrderRequest {
34
35
  id: string;
@@ -98,11 +99,12 @@ export interface AdminWorkOrdersApiInterface {
98
99
  * @summary List work orders (admin)
99
100
  * @param {number} [page]
100
101
  * @param {number} [limit]
101
- * @param {string} [search]
102
+ * @param {string} [search] Search by work order number, title, or location
102
103
  * @param {WorkOrderStatusEnum} [status]
103
104
  * @param {WorkOrderTypeEnum} [type]
104
105
  * @param {string} [assignedTo]
105
106
  * @param {string} [consumerId]
107
+ * @param {string} [outageId] Filter work orders by linked outage
106
108
  * @param {*} [options] Override http request option.
107
109
  * @throws {RequiredError}
108
110
  * @memberof AdminWorkOrdersApiInterface
@@ -203,6 +203,9 @@ export class AdminWorkOrdersApi extends runtime.BaseAPI {
203
203
  if (requestParameters['consumerId'] != null) {
204
204
  queryParameters['consumerId'] = requestParameters['consumerId'];
205
205
  }
206
+ if (requestParameters['outageId'] != null) {
207
+ queryParameters['outageId'] = requestParameters['outageId'];
208
+ }
206
209
  const headerParameters = {};
207
210
  if (this.configuration && this.configuration.accessToken) {
208
211
  const token = this.configuration.accessToken;
@@ -1,8 +1,10 @@
1
1
  export * from './AdminApi';
2
+ export * from './AdminAuditLogsApi';
2
3
  export * from './AdminAuthApi';
3
4
  export * from './AdminBillsApi';
4
5
  export * from './AdminComplaintsApi';
5
6
  export * from './AdminConsumersApi';
7
+ export * from './AdminNotificationsApi';
6
8
  export * from './AdminOutagesApi';
7
9
  export * from './AdminServiceRequestsApi';
8
10
  export * from './AdminWorkOrdersApi';
@@ -1,10 +1,12 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  export * from './AdminApi';
4
+ export * from './AdminAuditLogsApi';
4
5
  export * from './AdminAuthApi';
5
6
  export * from './AdminBillsApi';
6
7
  export * from './AdminComplaintsApi';
7
8
  export * from './AdminConsumersApi';
9
+ export * from './AdminNotificationsApi';
8
10
  export * from './AdminOutagesApi';
9
11
  export * from './AdminServiceRequestsApi';
10
12
  export * from './AdminWorkOrdersApi';
@@ -0,0 +1,52 @@
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 { PaginationMetaDto } from './PaginationMetaDto';
13
+ import type { AuditLog } from './AuditLog';
14
+ /**
15
+ *
16
+ * @export
17
+ * @interface AdminAuditLogsPaginatedResponse
18
+ */
19
+ export interface AdminAuditLogsPaginatedResponse {
20
+ /**
21
+ *
22
+ * @type {boolean}
23
+ * @memberof AdminAuditLogsPaginatedResponse
24
+ */
25
+ success: boolean;
26
+ /**
27
+ *
28
+ * @type {string}
29
+ * @memberof AdminAuditLogsPaginatedResponse
30
+ */
31
+ error?: string;
32
+ /**
33
+ *
34
+ * @type {Array<AuditLog>}
35
+ * @memberof AdminAuditLogsPaginatedResponse
36
+ */
37
+ data: Array<AuditLog>;
38
+ /**
39
+ *
40
+ * @type {PaginationMetaDto}
41
+ * @memberof AdminAuditLogsPaginatedResponse
42
+ */
43
+ meta: PaginationMetaDto;
44
+ }
45
+ /**
46
+ * Check if a given object implements the AdminAuditLogsPaginatedResponse interface.
47
+ */
48
+ export declare function instanceOfAdminAuditLogsPaginatedResponse(value: object): value is AdminAuditLogsPaginatedResponse;
49
+ export declare function AdminAuditLogsPaginatedResponseFromJSON(json: any): AdminAuditLogsPaginatedResponse;
50
+ export declare function AdminAuditLogsPaginatedResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): AdminAuditLogsPaginatedResponse;
51
+ export declare function AdminAuditLogsPaginatedResponseToJSON(json: any): AdminAuditLogsPaginatedResponse;
52
+ export declare function AdminAuditLogsPaginatedResponseToJSONTyped(value?: AdminAuditLogsPaginatedResponse | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,55 @@
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 { PaginationMetaDtoFromJSON, PaginationMetaDtoToJSON, } from './PaginationMetaDto';
15
+ import { AuditLogFromJSON, AuditLogToJSON, } from './AuditLog';
16
+ /**
17
+ * Check if a given object implements the AdminAuditLogsPaginatedResponse interface.
18
+ */
19
+ export function instanceOfAdminAuditLogsPaginatedResponse(value) {
20
+ if (!('success' in value) || value['success'] === undefined)
21
+ return false;
22
+ if (!('data' in value) || value['data'] === undefined)
23
+ return false;
24
+ if (!('meta' in value) || value['meta'] === undefined)
25
+ return false;
26
+ return true;
27
+ }
28
+ export function AdminAuditLogsPaginatedResponseFromJSON(json) {
29
+ return AdminAuditLogsPaginatedResponseFromJSONTyped(json, false);
30
+ }
31
+ export function AdminAuditLogsPaginatedResponseFromJSONTyped(json, ignoreDiscriminator) {
32
+ if (json == null) {
33
+ return json;
34
+ }
35
+ return {
36
+ 'success': json['success'],
37
+ 'error': json['error'] == null ? undefined : json['error'],
38
+ 'data': (json['data'].map(AuditLogFromJSON)),
39
+ 'meta': PaginationMetaDtoFromJSON(json['meta']),
40
+ };
41
+ }
42
+ export function AdminAuditLogsPaginatedResponseToJSON(json) {
43
+ return AdminAuditLogsPaginatedResponseToJSONTyped(json, false);
44
+ }
45
+ export function AdminAuditLogsPaginatedResponseToJSONTyped(value, ignoreDiscriminator = false) {
46
+ if (value == null) {
47
+ return value;
48
+ }
49
+ return {
50
+ 'success': value['success'],
51
+ 'error': value['error'],
52
+ 'data': (value['data'].map(AuditLogToJSON)),
53
+ 'meta': PaginationMetaDtoToJSON(value['meta']),
54
+ };
55
+ }
@@ -0,0 +1,58 @@
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 { NotificationTargetEnum } from './NotificationTargetEnum';
13
+ import type { NotificationTypeEnum } from './NotificationTypeEnum';
14
+ /**
15
+ *
16
+ * @export
17
+ * @interface AdminSendNotificationDto
18
+ */
19
+ export interface AdminSendNotificationDto {
20
+ /**
21
+ *
22
+ * @type {string}
23
+ * @memberof AdminSendNotificationDto
24
+ */
25
+ title: string;
26
+ /**
27
+ *
28
+ * @type {string}
29
+ * @memberof AdminSendNotificationDto
30
+ */
31
+ message: string;
32
+ /**
33
+ *
34
+ * @type {NotificationTypeEnum}
35
+ * @memberof AdminSendNotificationDto
36
+ */
37
+ type: NotificationTypeEnum;
38
+ /**
39
+ * Who to send the notification to
40
+ * @type {NotificationTargetEnum}
41
+ * @memberof AdminSendNotificationDto
42
+ */
43
+ target: NotificationTargetEnum;
44
+ /**
45
+ * Required when target is "user"
46
+ * @type {string}
47
+ * @memberof AdminSendNotificationDto
48
+ */
49
+ userId?: string;
50
+ }
51
+ /**
52
+ * Check if a given object implements the AdminSendNotificationDto interface.
53
+ */
54
+ export declare function instanceOfAdminSendNotificationDto(value: object): value is AdminSendNotificationDto;
55
+ export declare function AdminSendNotificationDtoFromJSON(json: any): AdminSendNotificationDto;
56
+ export declare function AdminSendNotificationDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): AdminSendNotificationDto;
57
+ export declare function AdminSendNotificationDtoToJSON(json: any): AdminSendNotificationDto;
58
+ export declare function AdminSendNotificationDtoToJSONTyped(value?: AdminSendNotificationDto | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,59 @@
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 { NotificationTargetEnumFromJSON, NotificationTargetEnumToJSON, } from './NotificationTargetEnum';
15
+ import { NotificationTypeEnumFromJSON, NotificationTypeEnumToJSON, } from './NotificationTypeEnum';
16
+ /**
17
+ * Check if a given object implements the AdminSendNotificationDto interface.
18
+ */
19
+ export function instanceOfAdminSendNotificationDto(value) {
20
+ if (!('title' in value) || value['title'] === undefined)
21
+ return false;
22
+ if (!('message' in value) || value['message'] === undefined)
23
+ return false;
24
+ if (!('type' in value) || value['type'] === undefined)
25
+ return false;
26
+ if (!('target' in value) || value['target'] === undefined)
27
+ return false;
28
+ return true;
29
+ }
30
+ export function AdminSendNotificationDtoFromJSON(json) {
31
+ return AdminSendNotificationDtoFromJSONTyped(json, false);
32
+ }
33
+ export function AdminSendNotificationDtoFromJSONTyped(json, ignoreDiscriminator) {
34
+ if (json == null) {
35
+ return json;
36
+ }
37
+ return {
38
+ 'title': json['title'],
39
+ 'message': json['message'],
40
+ 'type': NotificationTypeEnumFromJSON(json['type']),
41
+ 'target': NotificationTargetEnumFromJSON(json['target']),
42
+ 'userId': json['userId'] == null ? undefined : json['userId'],
43
+ };
44
+ }
45
+ export function AdminSendNotificationDtoToJSON(json) {
46
+ return AdminSendNotificationDtoToJSONTyped(json, false);
47
+ }
48
+ export function AdminSendNotificationDtoToJSONTyped(value, ignoreDiscriminator = false) {
49
+ if (value == null) {
50
+ return value;
51
+ }
52
+ return {
53
+ 'title': value['title'],
54
+ 'message': value['message'],
55
+ 'type': NotificationTypeEnumToJSON(value['type']),
56
+ 'target': NotificationTargetEnumToJSON(value['target']),
57
+ 'userId': value['userId'],
58
+ };
59
+ }
@@ -0,0 +1,44 @@
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 AdminSendNotificationResponse
16
+ */
17
+ export interface AdminSendNotificationResponse {
18
+ /**
19
+ *
20
+ * @type {boolean}
21
+ * @memberof AdminSendNotificationResponse
22
+ */
23
+ success: boolean;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof AdminSendNotificationResponse
28
+ */
29
+ error?: string;
30
+ /**
31
+ *
32
+ * @type {object}
33
+ * @memberof AdminSendNotificationResponse
34
+ */
35
+ data: object;
36
+ }
37
+ /**
38
+ * Check if a given object implements the AdminSendNotificationResponse interface.
39
+ */
40
+ export declare function instanceOfAdminSendNotificationResponse(value: object): value is AdminSendNotificationResponse;
41
+ export declare function AdminSendNotificationResponseFromJSON(json: any): AdminSendNotificationResponse;
42
+ export declare function AdminSendNotificationResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): AdminSendNotificationResponse;
43
+ export declare function AdminSendNotificationResponseToJSON(json: any): AdminSendNotificationResponse;
44
+ export declare function AdminSendNotificationResponseToJSONTyped(value?: AdminSendNotificationResponse | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,49 @@
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 AdminSendNotificationResponse interface.
16
+ */
17
+ export function instanceOfAdminSendNotificationResponse(value) {
18
+ if (!('success' in value) || value['success'] === undefined)
19
+ return false;
20
+ if (!('data' in value) || value['data'] === undefined)
21
+ return false;
22
+ return true;
23
+ }
24
+ export function AdminSendNotificationResponseFromJSON(json) {
25
+ return AdminSendNotificationResponseFromJSONTyped(json, false);
26
+ }
27
+ export function AdminSendNotificationResponseFromJSONTyped(json, ignoreDiscriminator) {
28
+ if (json == null) {
29
+ return json;
30
+ }
31
+ return {
32
+ 'success': json['success'],
33
+ 'error': json['error'] == null ? undefined : json['error'],
34
+ 'data': json['data'],
35
+ };
36
+ }
37
+ export function AdminSendNotificationResponseToJSON(json) {
38
+ return AdminSendNotificationResponseToJSONTyped(json, false);
39
+ }
40
+ export function AdminSendNotificationResponseToJSONTyped(value, ignoreDiscriminator = false) {
41
+ if (value == null) {
42
+ return value;
43
+ }
44
+ return {
45
+ 'success': value['success'],
46
+ 'error': value['error'],
47
+ 'data': value['data'],
48
+ };
49
+ }
@@ -0,0 +1,98 @@
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 AuditLog
16
+ */
17
+ export interface AuditLog {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof AuditLog
22
+ */
23
+ id: string;
24
+ /**
25
+ *
26
+ * @type {Date}
27
+ * @memberof AuditLog
28
+ */
29
+ createdAt: Date;
30
+ /**
31
+ *
32
+ * @type {Date}
33
+ * @memberof AuditLog
34
+ */
35
+ updatedAt: Date;
36
+ /**
37
+ *
38
+ * @type {Date}
39
+ * @memberof AuditLog
40
+ */
41
+ deletedAt?: Date;
42
+ /**
43
+ *
44
+ * @type {string}
45
+ * @memberof AuditLog
46
+ */
47
+ tenantId: string;
48
+ /**
49
+ *
50
+ * @type {string}
51
+ * @memberof AuditLog
52
+ */
53
+ userId: string;
54
+ /**
55
+ *
56
+ * @type {string}
57
+ * @memberof AuditLog
58
+ */
59
+ actorEmail?: string;
60
+ /**
61
+ * CREATE | UPDATE | ASSIGN | STATUS_CHANGE
62
+ * @type {string}
63
+ * @memberof AuditLog
64
+ */
65
+ action: string;
66
+ /**
67
+ * outage | work_order
68
+ * @type {string}
69
+ * @memberof AuditLog
70
+ */
71
+ entityType: string;
72
+ /**
73
+ *
74
+ * @type {string}
75
+ * @memberof AuditLog
76
+ */
77
+ entityId: string;
78
+ /**
79
+ *
80
+ * @type {string}
81
+ * @memberof AuditLog
82
+ */
83
+ entityLabel?: string;
84
+ /**
85
+ * Before/after snapshot of changed fields
86
+ * @type {object}
87
+ * @memberof AuditLog
88
+ */
89
+ changes?: object;
90
+ }
91
+ /**
92
+ * Check if a given object implements the AuditLog interface.
93
+ */
94
+ export declare function instanceOfAuditLog(value: object): value is AuditLog;
95
+ export declare function AuditLogFromJSON(json: any): AuditLog;
96
+ export declare function AuditLogFromJSONTyped(json: any, ignoreDiscriminator: boolean): AuditLog;
97
+ export declare function AuditLogToJSON(json: any): AuditLog;
98
+ export declare function AuditLogToJSONTyped(value?: AuditLog | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,79 @@
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 AuditLog interface.
16
+ */
17
+ export function instanceOfAuditLog(value) {
18
+ if (!('id' in value) || value['id'] === undefined)
19
+ return false;
20
+ if (!('createdAt' in value) || value['createdAt'] === undefined)
21
+ return false;
22
+ if (!('updatedAt' in value) || value['updatedAt'] === undefined)
23
+ return false;
24
+ if (!('tenantId' in value) || value['tenantId'] === undefined)
25
+ return false;
26
+ if (!('userId' in value) || value['userId'] === undefined)
27
+ return false;
28
+ if (!('action' in value) || value['action'] === undefined)
29
+ return false;
30
+ if (!('entityType' in value) || value['entityType'] === undefined)
31
+ return false;
32
+ if (!('entityId' in value) || value['entityId'] === undefined)
33
+ return false;
34
+ return true;
35
+ }
36
+ export function AuditLogFromJSON(json) {
37
+ return AuditLogFromJSONTyped(json, false);
38
+ }
39
+ export function AuditLogFromJSONTyped(json, ignoreDiscriminator) {
40
+ if (json == null) {
41
+ return json;
42
+ }
43
+ return {
44
+ 'id': json['id'],
45
+ 'createdAt': (new Date(json['createdAt'])),
46
+ 'updatedAt': (new Date(json['updatedAt'])),
47
+ 'deletedAt': json['deletedAt'] == null ? undefined : (new Date(json['deletedAt'])),
48
+ 'tenantId': json['tenantId'],
49
+ 'userId': json['userId'],
50
+ 'actorEmail': json['actorEmail'] == null ? undefined : json['actorEmail'],
51
+ 'action': json['action'],
52
+ 'entityType': json['entityType'],
53
+ 'entityId': json['entityId'],
54
+ 'entityLabel': json['entityLabel'] == null ? undefined : json['entityLabel'],
55
+ 'changes': json['changes'] == null ? undefined : json['changes'],
56
+ };
57
+ }
58
+ export function AuditLogToJSON(json) {
59
+ return AuditLogToJSONTyped(json, false);
60
+ }
61
+ export function AuditLogToJSONTyped(value, ignoreDiscriminator = false) {
62
+ if (value == null) {
63
+ return value;
64
+ }
65
+ return {
66
+ 'id': value['id'],
67
+ 'createdAt': ((value['createdAt']).toISOString()),
68
+ 'updatedAt': ((value['updatedAt']).toISOString()),
69
+ 'deletedAt': value['deletedAt'] == null ? undefined : ((value['deletedAt']).toISOString()),
70
+ 'tenantId': value['tenantId'],
71
+ 'userId': value['userId'],
72
+ 'actorEmail': value['actorEmail'],
73
+ 'action': value['action'],
74
+ 'entityType': value['entityType'],
75
+ 'entityId': value['entityId'],
76
+ 'entityLabel': value['entityLabel'],
77
+ 'changes': value['changes'],
78
+ };
79
+ }