electric-coop-api 0.1.76 → 0.1.77
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +1 -0
- package/README.md +2 -2
- package/dist/apis/AdminComplaintsApi.d.ts +25 -1
- package/dist/apis/AdminComplaintsApi.js +38 -0
- package/dist/esm/apis/AdminComplaintsApi.d.ts +25 -1
- package/dist/esm/apis/AdminComplaintsApi.js +39 -1
- package/dist/esm/models/AuditLogEntityTypeEnum.d.ts +4 -0
- package/dist/esm/models/AuditLogEntityTypeEnum.js +5 -1
- package/dist/esm/models/CreateAdminComplaintDto.d.ts +64 -0
- package/dist/esm/models/CreateAdminComplaintDto.js +61 -0
- package/dist/esm/models/index.d.ts +1 -0
- package/dist/esm/models/index.js +1 -0
- package/dist/models/AuditLogEntityTypeEnum.d.ts +4 -0
- package/dist/models/AuditLogEntityTypeEnum.js +5 -1
- package/dist/models/CreateAdminComplaintDto.d.ts +64 -0
- package/dist/models/CreateAdminComplaintDto.js +68 -0
- package/dist/models/index.d.ts +1 -0
- package/dist/models/index.js +1 -0
- package/package.json +1 -1
- package/src/apis/AdminComplaintsApi.ts +69 -0
- package/src/models/AuditLogEntityTypeEnum.ts +5 -1
- package/src/models/CreateAdminComplaintDto.ts +126 -0
- package/src/models/index.ts +1 -0
package/.openapi-generator/FILES
CHANGED
|
@@ -110,6 +110,7 @@ src/models/ConsumerTypeEnum.ts
|
|
|
110
110
|
src/models/ConsumersAdminPaginatedResponse.ts
|
|
111
111
|
src/models/ConsumersAdminUnBilledPaginatedResponse.ts
|
|
112
112
|
src/models/ConsumersSuccessResponse.ts
|
|
113
|
+
src/models/CreateAdminComplaintDto.ts
|
|
113
114
|
src/models/CreateBillDto.ts
|
|
114
115
|
src/models/CreateConsumerAccountDto.ts
|
|
115
116
|
src/models/CreateConsumerDto.ts
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## electric-coop-api@0.1.
|
|
1
|
+
## electric-coop-api@0.1.77
|
|
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.77 --save
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
_unPublished (not recommended):_
|
|
@@ -10,7 +10,10 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { ComplaintPriorityEnum, ComplaintStatusEnum, ComplaintTypeEnum, ComplaintsAdminGetStatsResponse, ComplaintsAdminPaginatedResponse, ComplaintsSuccessResponse, UpdateComplaintDto } from '../models/index';
|
|
13
|
+
import type { ComplaintPriorityEnum, ComplaintStatusEnum, ComplaintTypeEnum, ComplaintsAdminGetStatsResponse, ComplaintsAdminPaginatedResponse, ComplaintsSuccessResponse, CreateAdminComplaintDto, UpdateComplaintDto } from '../models/index';
|
|
14
|
+
export interface CreateAdminComplaintRequest {
|
|
15
|
+
createAdminComplaintDto: CreateAdminComplaintDto;
|
|
16
|
+
}
|
|
14
17
|
export interface GetAdminComplaintByIdRequest {
|
|
15
18
|
id: string;
|
|
16
19
|
}
|
|
@@ -39,6 +42,19 @@ export interface UpdateAdminComplaintStatusRequest {
|
|
|
39
42
|
* @interface AdminComplaintsApiInterface
|
|
40
43
|
*/
|
|
41
44
|
export interface AdminComplaintsApiInterface {
|
|
45
|
+
/**
|
|
46
|
+
*
|
|
47
|
+
* @summary Create complaint on behalf of consumer (admin)
|
|
48
|
+
* @param {CreateAdminComplaintDto} createAdminComplaintDto
|
|
49
|
+
* @param {*} [options] Override http request option.
|
|
50
|
+
* @throws {RequiredError}
|
|
51
|
+
* @memberof AdminComplaintsApiInterface
|
|
52
|
+
*/
|
|
53
|
+
createAdminComplaintRaw(requestParameters: CreateAdminComplaintRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ComplaintsSuccessResponse>>;
|
|
54
|
+
/**
|
|
55
|
+
* Create complaint on behalf of consumer (admin)
|
|
56
|
+
*/
|
|
57
|
+
createAdminComplaint(requestParameters: CreateAdminComplaintRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ComplaintsSuccessResponse>;
|
|
42
58
|
/**
|
|
43
59
|
*
|
|
44
60
|
* @summary Get complaint by id (admin)
|
|
@@ -117,6 +133,14 @@ export interface AdminComplaintsApiInterface {
|
|
|
117
133
|
*
|
|
118
134
|
*/
|
|
119
135
|
export declare class AdminComplaintsApi extends runtime.BaseAPI implements AdminComplaintsApiInterface {
|
|
136
|
+
/**
|
|
137
|
+
* Create complaint on behalf of consumer (admin)
|
|
138
|
+
*/
|
|
139
|
+
createAdminComplaintRaw(requestParameters: CreateAdminComplaintRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ComplaintsSuccessResponse>>;
|
|
140
|
+
/**
|
|
141
|
+
* Create complaint on behalf of consumer (admin)
|
|
142
|
+
*/
|
|
143
|
+
createAdminComplaint(requestParameters: CreateAdminComplaintRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ComplaintsSuccessResponse>;
|
|
120
144
|
/**
|
|
121
145
|
* Get complaint by id (admin)
|
|
122
146
|
*/
|
|
@@ -29,6 +29,44 @@ const index_1 = require("../models/index");
|
|
|
29
29
|
*
|
|
30
30
|
*/
|
|
31
31
|
class AdminComplaintsApi extends runtime.BaseAPI {
|
|
32
|
+
/**
|
|
33
|
+
* Create complaint on behalf of consumer (admin)
|
|
34
|
+
*/
|
|
35
|
+
createAdminComplaintRaw(requestParameters, initOverrides) {
|
|
36
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
37
|
+
if (requestParameters['createAdminComplaintDto'] == null) {
|
|
38
|
+
throw new runtime.RequiredError('createAdminComplaintDto', 'Required parameter "createAdminComplaintDto" was null or undefined when calling createAdminComplaint().');
|
|
39
|
+
}
|
|
40
|
+
const queryParameters = {};
|
|
41
|
+
const headerParameters = {};
|
|
42
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
43
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
44
|
+
const token = this.configuration.accessToken;
|
|
45
|
+
const tokenString = yield token("bearer", []);
|
|
46
|
+
if (tokenString) {
|
|
47
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
let urlPath = `/api/v1/admin/complaints`;
|
|
51
|
+
const response = yield this.request({
|
|
52
|
+
path: urlPath,
|
|
53
|
+
method: 'POST',
|
|
54
|
+
headers: headerParameters,
|
|
55
|
+
query: queryParameters,
|
|
56
|
+
body: (0, index_1.CreateAdminComplaintDtoToJSON)(requestParameters['createAdminComplaintDto']),
|
|
57
|
+
}, initOverrides);
|
|
58
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ComplaintsSuccessResponseFromJSON)(jsonValue));
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Create complaint on behalf of consumer (admin)
|
|
63
|
+
*/
|
|
64
|
+
createAdminComplaint(requestParameters, initOverrides) {
|
|
65
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
66
|
+
const response = yield this.createAdminComplaintRaw(requestParameters, initOverrides);
|
|
67
|
+
return yield response.value();
|
|
68
|
+
});
|
|
69
|
+
}
|
|
32
70
|
/**
|
|
33
71
|
* Get complaint by id (admin)
|
|
34
72
|
*/
|
|
@@ -10,7 +10,10 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { ComplaintPriorityEnum, ComplaintStatusEnum, ComplaintTypeEnum, ComplaintsAdminGetStatsResponse, ComplaintsAdminPaginatedResponse, ComplaintsSuccessResponse, UpdateComplaintDto } from '../models/index';
|
|
13
|
+
import type { ComplaintPriorityEnum, ComplaintStatusEnum, ComplaintTypeEnum, ComplaintsAdminGetStatsResponse, ComplaintsAdminPaginatedResponse, ComplaintsSuccessResponse, CreateAdminComplaintDto, UpdateComplaintDto } from '../models/index';
|
|
14
|
+
export interface CreateAdminComplaintRequest {
|
|
15
|
+
createAdminComplaintDto: CreateAdminComplaintDto;
|
|
16
|
+
}
|
|
14
17
|
export interface GetAdminComplaintByIdRequest {
|
|
15
18
|
id: string;
|
|
16
19
|
}
|
|
@@ -39,6 +42,19 @@ export interface UpdateAdminComplaintStatusRequest {
|
|
|
39
42
|
* @interface AdminComplaintsApiInterface
|
|
40
43
|
*/
|
|
41
44
|
export interface AdminComplaintsApiInterface {
|
|
45
|
+
/**
|
|
46
|
+
*
|
|
47
|
+
* @summary Create complaint on behalf of consumer (admin)
|
|
48
|
+
* @param {CreateAdminComplaintDto} createAdminComplaintDto
|
|
49
|
+
* @param {*} [options] Override http request option.
|
|
50
|
+
* @throws {RequiredError}
|
|
51
|
+
* @memberof AdminComplaintsApiInterface
|
|
52
|
+
*/
|
|
53
|
+
createAdminComplaintRaw(requestParameters: CreateAdminComplaintRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ComplaintsSuccessResponse>>;
|
|
54
|
+
/**
|
|
55
|
+
* Create complaint on behalf of consumer (admin)
|
|
56
|
+
*/
|
|
57
|
+
createAdminComplaint(requestParameters: CreateAdminComplaintRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ComplaintsSuccessResponse>;
|
|
42
58
|
/**
|
|
43
59
|
*
|
|
44
60
|
* @summary Get complaint by id (admin)
|
|
@@ -117,6 +133,14 @@ export interface AdminComplaintsApiInterface {
|
|
|
117
133
|
*
|
|
118
134
|
*/
|
|
119
135
|
export declare class AdminComplaintsApi extends runtime.BaseAPI implements AdminComplaintsApiInterface {
|
|
136
|
+
/**
|
|
137
|
+
* Create complaint on behalf of consumer (admin)
|
|
138
|
+
*/
|
|
139
|
+
createAdminComplaintRaw(requestParameters: CreateAdminComplaintRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ComplaintsSuccessResponse>>;
|
|
140
|
+
/**
|
|
141
|
+
* Create complaint on behalf of consumer (admin)
|
|
142
|
+
*/
|
|
143
|
+
createAdminComplaint(requestParameters: CreateAdminComplaintRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ComplaintsSuccessResponse>;
|
|
120
144
|
/**
|
|
121
145
|
* Get complaint by id (admin)
|
|
122
146
|
*/
|
|
@@ -21,11 +21,49 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
21
21
|
});
|
|
22
22
|
};
|
|
23
23
|
import * as runtime from '../runtime';
|
|
24
|
-
import { ComplaintsAdminGetStatsResponseFromJSON, ComplaintsAdminPaginatedResponseFromJSON, ComplaintsSuccessResponseFromJSON, UpdateComplaintDtoToJSON, } from '../models/index';
|
|
24
|
+
import { ComplaintsAdminGetStatsResponseFromJSON, ComplaintsAdminPaginatedResponseFromJSON, ComplaintsSuccessResponseFromJSON, CreateAdminComplaintDtoToJSON, UpdateComplaintDtoToJSON, } from '../models/index';
|
|
25
25
|
/**
|
|
26
26
|
*
|
|
27
27
|
*/
|
|
28
28
|
export class AdminComplaintsApi extends runtime.BaseAPI {
|
|
29
|
+
/**
|
|
30
|
+
* Create complaint on behalf of consumer (admin)
|
|
31
|
+
*/
|
|
32
|
+
createAdminComplaintRaw(requestParameters, initOverrides) {
|
|
33
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
34
|
+
if (requestParameters['createAdminComplaintDto'] == null) {
|
|
35
|
+
throw new runtime.RequiredError('createAdminComplaintDto', 'Required parameter "createAdminComplaintDto" was null or undefined when calling createAdminComplaint().');
|
|
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/complaints`;
|
|
48
|
+
const response = yield this.request({
|
|
49
|
+
path: urlPath,
|
|
50
|
+
method: 'POST',
|
|
51
|
+
headers: headerParameters,
|
|
52
|
+
query: queryParameters,
|
|
53
|
+
body: CreateAdminComplaintDtoToJSON(requestParameters['createAdminComplaintDto']),
|
|
54
|
+
}, initOverrides);
|
|
55
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ComplaintsSuccessResponseFromJSON(jsonValue));
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Create complaint on behalf of consumer (admin)
|
|
60
|
+
*/
|
|
61
|
+
createAdminComplaint(requestParameters, initOverrides) {
|
|
62
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
63
|
+
const response = yield this.createAdminComplaintRaw(requestParameters, initOverrides);
|
|
64
|
+
return yield response.value();
|
|
65
|
+
});
|
|
66
|
+
}
|
|
29
67
|
/**
|
|
30
68
|
* Get complaint by id (admin)
|
|
31
69
|
*/
|
|
@@ -20,6 +20,10 @@ export declare const AuditLogEntityTypeEnum: {
|
|
|
20
20
|
readonly ConsumerAccount: "consumer_account";
|
|
21
21
|
readonly ServiceRequest: "service_request";
|
|
22
22
|
readonly Complaint: "complaint";
|
|
23
|
+
readonly Consumer: "consumer";
|
|
24
|
+
readonly RateAdjustment: "rate_adjustment";
|
|
25
|
+
readonly Bill: "bill";
|
|
26
|
+
readonly Settings: "settings";
|
|
23
27
|
};
|
|
24
28
|
export type AuditLogEntityTypeEnum = typeof AuditLogEntityTypeEnum[keyof typeof AuditLogEntityTypeEnum];
|
|
25
29
|
export declare function instanceOfAuditLogEntityTypeEnum(value: any): boolean;
|
|
@@ -21,7 +21,11 @@ export const AuditLogEntityTypeEnum = {
|
|
|
21
21
|
User: 'user',
|
|
22
22
|
ConsumerAccount: 'consumer_account',
|
|
23
23
|
ServiceRequest: 'service_request',
|
|
24
|
-
Complaint: 'complaint'
|
|
24
|
+
Complaint: 'complaint',
|
|
25
|
+
Consumer: 'consumer',
|
|
26
|
+
RateAdjustment: 'rate_adjustment',
|
|
27
|
+
Bill: 'bill',
|
|
28
|
+
Settings: 'settings'
|
|
25
29
|
};
|
|
26
30
|
export function instanceOfAuditLogEntityTypeEnum(value) {
|
|
27
31
|
for (const key in AuditLogEntityTypeEnum) {
|
|
@@ -0,0 +1,64 @@
|
|
|
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 { ComplaintPriorityEnum } from './ComplaintPriorityEnum';
|
|
13
|
+
import type { ComplaintTypeEnum } from './ComplaintTypeEnum';
|
|
14
|
+
/**
|
|
15
|
+
*
|
|
16
|
+
* @export
|
|
17
|
+
* @interface CreateAdminComplaintDto
|
|
18
|
+
*/
|
|
19
|
+
export interface CreateAdminComplaintDto {
|
|
20
|
+
/**
|
|
21
|
+
* Consumer ID to file the complaint on behalf of
|
|
22
|
+
* @type {string}
|
|
23
|
+
* @memberof CreateAdminComplaintDto
|
|
24
|
+
*/
|
|
25
|
+
consumerId: string;
|
|
26
|
+
/**
|
|
27
|
+
*
|
|
28
|
+
* @type {ComplaintTypeEnum}
|
|
29
|
+
* @memberof CreateAdminComplaintDto
|
|
30
|
+
*/
|
|
31
|
+
type: ComplaintTypeEnum;
|
|
32
|
+
/**
|
|
33
|
+
*
|
|
34
|
+
* @type {string}
|
|
35
|
+
* @memberof CreateAdminComplaintDto
|
|
36
|
+
*/
|
|
37
|
+
subject: string;
|
|
38
|
+
/**
|
|
39
|
+
*
|
|
40
|
+
* @type {string}
|
|
41
|
+
* @memberof CreateAdminComplaintDto
|
|
42
|
+
*/
|
|
43
|
+
description: string;
|
|
44
|
+
/**
|
|
45
|
+
*
|
|
46
|
+
* @type {ComplaintPriorityEnum}
|
|
47
|
+
* @memberof CreateAdminComplaintDto
|
|
48
|
+
*/
|
|
49
|
+
priority?: ComplaintPriorityEnum;
|
|
50
|
+
/**
|
|
51
|
+
*
|
|
52
|
+
* @type {Array<string>}
|
|
53
|
+
* @memberof CreateAdminComplaintDto
|
|
54
|
+
*/
|
|
55
|
+
photos?: Array<string>;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Check if a given object implements the CreateAdminComplaintDto interface.
|
|
59
|
+
*/
|
|
60
|
+
export declare function instanceOfCreateAdminComplaintDto(value: object): value is CreateAdminComplaintDto;
|
|
61
|
+
export declare function CreateAdminComplaintDtoFromJSON(json: any): CreateAdminComplaintDto;
|
|
62
|
+
export declare function CreateAdminComplaintDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateAdminComplaintDto;
|
|
63
|
+
export declare function CreateAdminComplaintDtoToJSON(json: any): CreateAdminComplaintDto;
|
|
64
|
+
export declare function CreateAdminComplaintDtoToJSONTyped(value?: CreateAdminComplaintDto | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -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
|
+
import { ComplaintPriorityEnumFromJSON, ComplaintPriorityEnumToJSON, } from './ComplaintPriorityEnum';
|
|
15
|
+
import { ComplaintTypeEnumFromJSON, ComplaintTypeEnumToJSON, } from './ComplaintTypeEnum';
|
|
16
|
+
/**
|
|
17
|
+
* Check if a given object implements the CreateAdminComplaintDto interface.
|
|
18
|
+
*/
|
|
19
|
+
export function instanceOfCreateAdminComplaintDto(value) {
|
|
20
|
+
if (!('consumerId' in value) || value['consumerId'] === undefined)
|
|
21
|
+
return false;
|
|
22
|
+
if (!('type' in value) || value['type'] === undefined)
|
|
23
|
+
return false;
|
|
24
|
+
if (!('subject' in value) || value['subject'] === undefined)
|
|
25
|
+
return false;
|
|
26
|
+
if (!('description' in value) || value['description'] === undefined)
|
|
27
|
+
return false;
|
|
28
|
+
return true;
|
|
29
|
+
}
|
|
30
|
+
export function CreateAdminComplaintDtoFromJSON(json) {
|
|
31
|
+
return CreateAdminComplaintDtoFromJSONTyped(json, false);
|
|
32
|
+
}
|
|
33
|
+
export function CreateAdminComplaintDtoFromJSONTyped(json, ignoreDiscriminator) {
|
|
34
|
+
if (json == null) {
|
|
35
|
+
return json;
|
|
36
|
+
}
|
|
37
|
+
return {
|
|
38
|
+
'consumerId': json['consumerId'],
|
|
39
|
+
'type': ComplaintTypeEnumFromJSON(json['type']),
|
|
40
|
+
'subject': json['subject'],
|
|
41
|
+
'description': json['description'],
|
|
42
|
+
'priority': json['priority'] == null ? undefined : ComplaintPriorityEnumFromJSON(json['priority']),
|
|
43
|
+
'photos': json['photos'] == null ? undefined : json['photos'],
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
export function CreateAdminComplaintDtoToJSON(json) {
|
|
47
|
+
return CreateAdminComplaintDtoToJSONTyped(json, false);
|
|
48
|
+
}
|
|
49
|
+
export function CreateAdminComplaintDtoToJSONTyped(value, ignoreDiscriminator = false) {
|
|
50
|
+
if (value == null) {
|
|
51
|
+
return value;
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
'consumerId': value['consumerId'],
|
|
55
|
+
'type': ComplaintTypeEnumToJSON(value['type']),
|
|
56
|
+
'subject': value['subject'],
|
|
57
|
+
'description': value['description'],
|
|
58
|
+
'priority': ComplaintPriorityEnumToJSON(value['priority']),
|
|
59
|
+
'photos': value['photos'],
|
|
60
|
+
};
|
|
61
|
+
}
|
|
@@ -76,6 +76,7 @@ export * from './ConsumerTypeEnum';
|
|
|
76
76
|
export * from './ConsumersAdminPaginatedResponse';
|
|
77
77
|
export * from './ConsumersAdminUnBilledPaginatedResponse';
|
|
78
78
|
export * from './ConsumersSuccessResponse';
|
|
79
|
+
export * from './CreateAdminComplaintDto';
|
|
79
80
|
export * from './CreateBillDto';
|
|
80
81
|
export * from './CreateConsumerAccountDto';
|
|
81
82
|
export * from './CreateConsumerDto';
|
package/dist/esm/models/index.js
CHANGED
|
@@ -78,6 +78,7 @@ export * from './ConsumerTypeEnum';
|
|
|
78
78
|
export * from './ConsumersAdminPaginatedResponse';
|
|
79
79
|
export * from './ConsumersAdminUnBilledPaginatedResponse';
|
|
80
80
|
export * from './ConsumersSuccessResponse';
|
|
81
|
+
export * from './CreateAdminComplaintDto';
|
|
81
82
|
export * from './CreateBillDto';
|
|
82
83
|
export * from './CreateConsumerAccountDto';
|
|
83
84
|
export * from './CreateConsumerDto';
|
|
@@ -20,6 +20,10 @@ export declare const AuditLogEntityTypeEnum: {
|
|
|
20
20
|
readonly ConsumerAccount: "consumer_account";
|
|
21
21
|
readonly ServiceRequest: "service_request";
|
|
22
22
|
readonly Complaint: "complaint";
|
|
23
|
+
readonly Consumer: "consumer";
|
|
24
|
+
readonly RateAdjustment: "rate_adjustment";
|
|
25
|
+
readonly Bill: "bill";
|
|
26
|
+
readonly Settings: "settings";
|
|
23
27
|
};
|
|
24
28
|
export type AuditLogEntityTypeEnum = typeof AuditLogEntityTypeEnum[keyof typeof AuditLogEntityTypeEnum];
|
|
25
29
|
export declare function instanceOfAuditLogEntityTypeEnum(value: any): boolean;
|
|
@@ -29,7 +29,11 @@ exports.AuditLogEntityTypeEnum = {
|
|
|
29
29
|
User: 'user',
|
|
30
30
|
ConsumerAccount: 'consumer_account',
|
|
31
31
|
ServiceRequest: 'service_request',
|
|
32
|
-
Complaint: 'complaint'
|
|
32
|
+
Complaint: 'complaint',
|
|
33
|
+
Consumer: 'consumer',
|
|
34
|
+
RateAdjustment: 'rate_adjustment',
|
|
35
|
+
Bill: 'bill',
|
|
36
|
+
Settings: 'settings'
|
|
33
37
|
};
|
|
34
38
|
function instanceOfAuditLogEntityTypeEnum(value) {
|
|
35
39
|
for (const key in exports.AuditLogEntityTypeEnum) {
|
|
@@ -0,0 +1,64 @@
|
|
|
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 { ComplaintPriorityEnum } from './ComplaintPriorityEnum';
|
|
13
|
+
import type { ComplaintTypeEnum } from './ComplaintTypeEnum';
|
|
14
|
+
/**
|
|
15
|
+
*
|
|
16
|
+
* @export
|
|
17
|
+
* @interface CreateAdminComplaintDto
|
|
18
|
+
*/
|
|
19
|
+
export interface CreateAdminComplaintDto {
|
|
20
|
+
/**
|
|
21
|
+
* Consumer ID to file the complaint on behalf of
|
|
22
|
+
* @type {string}
|
|
23
|
+
* @memberof CreateAdminComplaintDto
|
|
24
|
+
*/
|
|
25
|
+
consumerId: string;
|
|
26
|
+
/**
|
|
27
|
+
*
|
|
28
|
+
* @type {ComplaintTypeEnum}
|
|
29
|
+
* @memberof CreateAdminComplaintDto
|
|
30
|
+
*/
|
|
31
|
+
type: ComplaintTypeEnum;
|
|
32
|
+
/**
|
|
33
|
+
*
|
|
34
|
+
* @type {string}
|
|
35
|
+
* @memberof CreateAdminComplaintDto
|
|
36
|
+
*/
|
|
37
|
+
subject: string;
|
|
38
|
+
/**
|
|
39
|
+
*
|
|
40
|
+
* @type {string}
|
|
41
|
+
* @memberof CreateAdminComplaintDto
|
|
42
|
+
*/
|
|
43
|
+
description: string;
|
|
44
|
+
/**
|
|
45
|
+
*
|
|
46
|
+
* @type {ComplaintPriorityEnum}
|
|
47
|
+
* @memberof CreateAdminComplaintDto
|
|
48
|
+
*/
|
|
49
|
+
priority?: ComplaintPriorityEnum;
|
|
50
|
+
/**
|
|
51
|
+
*
|
|
52
|
+
* @type {Array<string>}
|
|
53
|
+
* @memberof CreateAdminComplaintDto
|
|
54
|
+
*/
|
|
55
|
+
photos?: Array<string>;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Check if a given object implements the CreateAdminComplaintDto interface.
|
|
59
|
+
*/
|
|
60
|
+
export declare function instanceOfCreateAdminComplaintDto(value: object): value is CreateAdminComplaintDto;
|
|
61
|
+
export declare function CreateAdminComplaintDtoFromJSON(json: any): CreateAdminComplaintDto;
|
|
62
|
+
export declare function CreateAdminComplaintDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateAdminComplaintDto;
|
|
63
|
+
export declare function CreateAdminComplaintDtoToJSON(json: any): CreateAdminComplaintDto;
|
|
64
|
+
export declare function CreateAdminComplaintDtoToJSONTyped(value?: CreateAdminComplaintDto | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,68 @@
|
|
|
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.instanceOfCreateAdminComplaintDto = instanceOfCreateAdminComplaintDto;
|
|
17
|
+
exports.CreateAdminComplaintDtoFromJSON = CreateAdminComplaintDtoFromJSON;
|
|
18
|
+
exports.CreateAdminComplaintDtoFromJSONTyped = CreateAdminComplaintDtoFromJSONTyped;
|
|
19
|
+
exports.CreateAdminComplaintDtoToJSON = CreateAdminComplaintDtoToJSON;
|
|
20
|
+
exports.CreateAdminComplaintDtoToJSONTyped = CreateAdminComplaintDtoToJSONTyped;
|
|
21
|
+
const ComplaintPriorityEnum_1 = require("./ComplaintPriorityEnum");
|
|
22
|
+
const ComplaintTypeEnum_1 = require("./ComplaintTypeEnum");
|
|
23
|
+
/**
|
|
24
|
+
* Check if a given object implements the CreateAdminComplaintDto interface.
|
|
25
|
+
*/
|
|
26
|
+
function instanceOfCreateAdminComplaintDto(value) {
|
|
27
|
+
if (!('consumerId' in value) || value['consumerId'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
if (!('type' in value) || value['type'] === undefined)
|
|
30
|
+
return false;
|
|
31
|
+
if (!('subject' in value) || value['subject'] === undefined)
|
|
32
|
+
return false;
|
|
33
|
+
if (!('description' in value) || value['description'] === undefined)
|
|
34
|
+
return false;
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
function CreateAdminComplaintDtoFromJSON(json) {
|
|
38
|
+
return CreateAdminComplaintDtoFromJSONTyped(json, false);
|
|
39
|
+
}
|
|
40
|
+
function CreateAdminComplaintDtoFromJSONTyped(json, ignoreDiscriminator) {
|
|
41
|
+
if (json == null) {
|
|
42
|
+
return json;
|
|
43
|
+
}
|
|
44
|
+
return {
|
|
45
|
+
'consumerId': json['consumerId'],
|
|
46
|
+
'type': (0, ComplaintTypeEnum_1.ComplaintTypeEnumFromJSON)(json['type']),
|
|
47
|
+
'subject': json['subject'],
|
|
48
|
+
'description': json['description'],
|
|
49
|
+
'priority': json['priority'] == null ? undefined : (0, ComplaintPriorityEnum_1.ComplaintPriorityEnumFromJSON)(json['priority']),
|
|
50
|
+
'photos': json['photos'] == null ? undefined : json['photos'],
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
function CreateAdminComplaintDtoToJSON(json) {
|
|
54
|
+
return CreateAdminComplaintDtoToJSONTyped(json, false);
|
|
55
|
+
}
|
|
56
|
+
function CreateAdminComplaintDtoToJSONTyped(value, ignoreDiscriminator = false) {
|
|
57
|
+
if (value == null) {
|
|
58
|
+
return value;
|
|
59
|
+
}
|
|
60
|
+
return {
|
|
61
|
+
'consumerId': value['consumerId'],
|
|
62
|
+
'type': (0, ComplaintTypeEnum_1.ComplaintTypeEnumToJSON)(value['type']),
|
|
63
|
+
'subject': value['subject'],
|
|
64
|
+
'description': value['description'],
|
|
65
|
+
'priority': (0, ComplaintPriorityEnum_1.ComplaintPriorityEnumToJSON)(value['priority']),
|
|
66
|
+
'photos': value['photos'],
|
|
67
|
+
};
|
|
68
|
+
}
|
package/dist/models/index.d.ts
CHANGED
|
@@ -76,6 +76,7 @@ export * from './ConsumerTypeEnum';
|
|
|
76
76
|
export * from './ConsumersAdminPaginatedResponse';
|
|
77
77
|
export * from './ConsumersAdminUnBilledPaginatedResponse';
|
|
78
78
|
export * from './ConsumersSuccessResponse';
|
|
79
|
+
export * from './CreateAdminComplaintDto';
|
|
79
80
|
export * from './CreateBillDto';
|
|
80
81
|
export * from './CreateConsumerAccountDto';
|
|
81
82
|
export * from './CreateConsumerDto';
|
package/dist/models/index.js
CHANGED
|
@@ -94,6 +94,7 @@ __exportStar(require("./ConsumerTypeEnum"), exports);
|
|
|
94
94
|
__exportStar(require("./ConsumersAdminPaginatedResponse"), exports);
|
|
95
95
|
__exportStar(require("./ConsumersAdminUnBilledPaginatedResponse"), exports);
|
|
96
96
|
__exportStar(require("./ConsumersSuccessResponse"), exports);
|
|
97
|
+
__exportStar(require("./CreateAdminComplaintDto"), exports);
|
|
97
98
|
__exportStar(require("./CreateBillDto"), exports);
|
|
98
99
|
__exportStar(require("./CreateConsumerAccountDto"), exports);
|
|
99
100
|
__exportStar(require("./CreateConsumerDto"), exports);
|
package/package.json
CHANGED
|
@@ -21,6 +21,7 @@ import type {
|
|
|
21
21
|
ComplaintsAdminGetStatsResponse,
|
|
22
22
|
ComplaintsAdminPaginatedResponse,
|
|
23
23
|
ComplaintsSuccessResponse,
|
|
24
|
+
CreateAdminComplaintDto,
|
|
24
25
|
ErrorResponseDto,
|
|
25
26
|
UpdateComplaintDto,
|
|
26
27
|
} from '../models/index';
|
|
@@ -37,12 +38,18 @@ import {
|
|
|
37
38
|
ComplaintsAdminPaginatedResponseToJSON,
|
|
38
39
|
ComplaintsSuccessResponseFromJSON,
|
|
39
40
|
ComplaintsSuccessResponseToJSON,
|
|
41
|
+
CreateAdminComplaintDtoFromJSON,
|
|
42
|
+
CreateAdminComplaintDtoToJSON,
|
|
40
43
|
ErrorResponseDtoFromJSON,
|
|
41
44
|
ErrorResponseDtoToJSON,
|
|
42
45
|
UpdateComplaintDtoFromJSON,
|
|
43
46
|
UpdateComplaintDtoToJSON,
|
|
44
47
|
} from '../models/index';
|
|
45
48
|
|
|
49
|
+
export interface CreateAdminComplaintRequest {
|
|
50
|
+
createAdminComplaintDto: CreateAdminComplaintDto;
|
|
51
|
+
}
|
|
52
|
+
|
|
46
53
|
export interface GetAdminComplaintByIdRequest {
|
|
47
54
|
id: string;
|
|
48
55
|
}
|
|
@@ -75,6 +82,21 @@ export interface UpdateAdminComplaintStatusRequest {
|
|
|
75
82
|
* @interface AdminComplaintsApiInterface
|
|
76
83
|
*/
|
|
77
84
|
export interface AdminComplaintsApiInterface {
|
|
85
|
+
/**
|
|
86
|
+
*
|
|
87
|
+
* @summary Create complaint on behalf of consumer (admin)
|
|
88
|
+
* @param {CreateAdminComplaintDto} createAdminComplaintDto
|
|
89
|
+
* @param {*} [options] Override http request option.
|
|
90
|
+
* @throws {RequiredError}
|
|
91
|
+
* @memberof AdminComplaintsApiInterface
|
|
92
|
+
*/
|
|
93
|
+
createAdminComplaintRaw(requestParameters: CreateAdminComplaintRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ComplaintsSuccessResponse>>;
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Create complaint on behalf of consumer (admin)
|
|
97
|
+
*/
|
|
98
|
+
createAdminComplaint(requestParameters: CreateAdminComplaintRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ComplaintsSuccessResponse>;
|
|
99
|
+
|
|
78
100
|
/**
|
|
79
101
|
*
|
|
80
102
|
* @summary Get complaint by id (admin)
|
|
@@ -165,6 +187,53 @@ export interface AdminComplaintsApiInterface {
|
|
|
165
187
|
*/
|
|
166
188
|
export class AdminComplaintsApi extends runtime.BaseAPI implements AdminComplaintsApiInterface {
|
|
167
189
|
|
|
190
|
+
/**
|
|
191
|
+
* Create complaint on behalf of consumer (admin)
|
|
192
|
+
*/
|
|
193
|
+
async createAdminComplaintRaw(requestParameters: CreateAdminComplaintRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ComplaintsSuccessResponse>> {
|
|
194
|
+
if (requestParameters['createAdminComplaintDto'] == null) {
|
|
195
|
+
throw new runtime.RequiredError(
|
|
196
|
+
'createAdminComplaintDto',
|
|
197
|
+
'Required parameter "createAdminComplaintDto" was null or undefined when calling createAdminComplaint().'
|
|
198
|
+
);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
const queryParameters: any = {};
|
|
202
|
+
|
|
203
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
204
|
+
|
|
205
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
206
|
+
|
|
207
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
208
|
+
const token = this.configuration.accessToken;
|
|
209
|
+
const tokenString = await token("bearer", []);
|
|
210
|
+
|
|
211
|
+
if (tokenString) {
|
|
212
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
let urlPath = `/api/v1/admin/complaints`;
|
|
217
|
+
|
|
218
|
+
const response = await this.request({
|
|
219
|
+
path: urlPath,
|
|
220
|
+
method: 'POST',
|
|
221
|
+
headers: headerParameters,
|
|
222
|
+
query: queryParameters,
|
|
223
|
+
body: CreateAdminComplaintDtoToJSON(requestParameters['createAdminComplaintDto']),
|
|
224
|
+
}, initOverrides);
|
|
225
|
+
|
|
226
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ComplaintsSuccessResponseFromJSON(jsonValue));
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* Create complaint on behalf of consumer (admin)
|
|
231
|
+
*/
|
|
232
|
+
async createAdminComplaint(requestParameters: CreateAdminComplaintRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ComplaintsSuccessResponse> {
|
|
233
|
+
const response = await this.createAdminComplaintRaw(requestParameters, initOverrides);
|
|
234
|
+
return await response.value();
|
|
235
|
+
}
|
|
236
|
+
|
|
168
237
|
/**
|
|
169
238
|
* Get complaint by id (admin)
|
|
170
239
|
*/
|
|
@@ -23,7 +23,11 @@ export const AuditLogEntityTypeEnum = {
|
|
|
23
23
|
User: 'user',
|
|
24
24
|
ConsumerAccount: 'consumer_account',
|
|
25
25
|
ServiceRequest: 'service_request',
|
|
26
|
-
Complaint: 'complaint'
|
|
26
|
+
Complaint: 'complaint',
|
|
27
|
+
Consumer: 'consumer',
|
|
28
|
+
RateAdjustment: 'rate_adjustment',
|
|
29
|
+
Bill: 'bill',
|
|
30
|
+
Settings: 'settings'
|
|
27
31
|
} as const;
|
|
28
32
|
export type AuditLogEntityTypeEnum = typeof AuditLogEntityTypeEnum[keyof typeof AuditLogEntityTypeEnum];
|
|
29
33
|
|
|
@@ -0,0 +1,126 @@
|
|
|
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 { ComplaintPriorityEnum } from './ComplaintPriorityEnum';
|
|
17
|
+
import {
|
|
18
|
+
ComplaintPriorityEnumFromJSON,
|
|
19
|
+
ComplaintPriorityEnumFromJSONTyped,
|
|
20
|
+
ComplaintPriorityEnumToJSON,
|
|
21
|
+
ComplaintPriorityEnumToJSONTyped,
|
|
22
|
+
} from './ComplaintPriorityEnum';
|
|
23
|
+
import type { ComplaintTypeEnum } from './ComplaintTypeEnum';
|
|
24
|
+
import {
|
|
25
|
+
ComplaintTypeEnumFromJSON,
|
|
26
|
+
ComplaintTypeEnumFromJSONTyped,
|
|
27
|
+
ComplaintTypeEnumToJSON,
|
|
28
|
+
ComplaintTypeEnumToJSONTyped,
|
|
29
|
+
} from './ComplaintTypeEnum';
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @export
|
|
34
|
+
* @interface CreateAdminComplaintDto
|
|
35
|
+
*/
|
|
36
|
+
export interface CreateAdminComplaintDto {
|
|
37
|
+
/**
|
|
38
|
+
* Consumer ID to file the complaint on behalf of
|
|
39
|
+
* @type {string}
|
|
40
|
+
* @memberof CreateAdminComplaintDto
|
|
41
|
+
*/
|
|
42
|
+
consumerId: string;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {ComplaintTypeEnum}
|
|
46
|
+
* @memberof CreateAdminComplaintDto
|
|
47
|
+
*/
|
|
48
|
+
type: ComplaintTypeEnum;
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
51
|
+
* @type {string}
|
|
52
|
+
* @memberof CreateAdminComplaintDto
|
|
53
|
+
*/
|
|
54
|
+
subject: string;
|
|
55
|
+
/**
|
|
56
|
+
*
|
|
57
|
+
* @type {string}
|
|
58
|
+
* @memberof CreateAdminComplaintDto
|
|
59
|
+
*/
|
|
60
|
+
description: string;
|
|
61
|
+
/**
|
|
62
|
+
*
|
|
63
|
+
* @type {ComplaintPriorityEnum}
|
|
64
|
+
* @memberof CreateAdminComplaintDto
|
|
65
|
+
*/
|
|
66
|
+
priority?: ComplaintPriorityEnum;
|
|
67
|
+
/**
|
|
68
|
+
*
|
|
69
|
+
* @type {Array<string>}
|
|
70
|
+
* @memberof CreateAdminComplaintDto
|
|
71
|
+
*/
|
|
72
|
+
photos?: Array<string>;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Check if a given object implements the CreateAdminComplaintDto interface.
|
|
79
|
+
*/
|
|
80
|
+
export function instanceOfCreateAdminComplaintDto(value: object): value is CreateAdminComplaintDto {
|
|
81
|
+
if (!('consumerId' in value) || value['consumerId'] === undefined) return false;
|
|
82
|
+
if (!('type' in value) || value['type'] === undefined) return false;
|
|
83
|
+
if (!('subject' in value) || value['subject'] === undefined) return false;
|
|
84
|
+
if (!('description' in value) || value['description'] === undefined) return false;
|
|
85
|
+
return true;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export function CreateAdminComplaintDtoFromJSON(json: any): CreateAdminComplaintDto {
|
|
89
|
+
return CreateAdminComplaintDtoFromJSONTyped(json, false);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export function CreateAdminComplaintDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateAdminComplaintDto {
|
|
93
|
+
if (json == null) {
|
|
94
|
+
return json;
|
|
95
|
+
}
|
|
96
|
+
return {
|
|
97
|
+
|
|
98
|
+
'consumerId': json['consumerId'],
|
|
99
|
+
'type': ComplaintTypeEnumFromJSON(json['type']),
|
|
100
|
+
'subject': json['subject'],
|
|
101
|
+
'description': json['description'],
|
|
102
|
+
'priority': json['priority'] == null ? undefined : ComplaintPriorityEnumFromJSON(json['priority']),
|
|
103
|
+
'photos': json['photos'] == null ? undefined : json['photos'],
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export function CreateAdminComplaintDtoToJSON(json: any): CreateAdminComplaintDto {
|
|
108
|
+
return CreateAdminComplaintDtoToJSONTyped(json, false);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export function CreateAdminComplaintDtoToJSONTyped(value?: CreateAdminComplaintDto | null, ignoreDiscriminator: boolean = false): any {
|
|
112
|
+
if (value == null) {
|
|
113
|
+
return value;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
return {
|
|
117
|
+
|
|
118
|
+
'consumerId': value['consumerId'],
|
|
119
|
+
'type': ComplaintTypeEnumToJSON(value['type']),
|
|
120
|
+
'subject': value['subject'],
|
|
121
|
+
'description': value['description'],
|
|
122
|
+
'priority': ComplaintPriorityEnumToJSON(value['priority']),
|
|
123
|
+
'photos': value['photos'],
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
|
package/src/models/index.ts
CHANGED
|
@@ -78,6 +78,7 @@ export * from './ConsumerTypeEnum';
|
|
|
78
78
|
export * from './ConsumersAdminPaginatedResponse';
|
|
79
79
|
export * from './ConsumersAdminUnBilledPaginatedResponse';
|
|
80
80
|
export * from './ConsumersSuccessResponse';
|
|
81
|
+
export * from './CreateAdminComplaintDto';
|
|
81
82
|
export * from './CreateBillDto';
|
|
82
83
|
export * from './CreateConsumerAccountDto';
|
|
83
84
|
export * from './CreateConsumerDto';
|