electric-coop-api 0.1.86 → 0.1.87

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 (38) hide show
  1. package/.openapi-generator/FILES +1 -0
  2. package/README.md +2 -2
  3. package/dist/esm/models/AuditLogActionEnum.d.ts +33 -0
  4. package/dist/esm/models/AuditLogActionEnum.js +51 -0
  5. package/dist/esm/models/Bill.d.ts +7 -0
  6. package/dist/esm/models/Bill.js +3 -0
  7. package/dist/esm/models/Payment.d.ts +12 -0
  8. package/dist/esm/models/Payment.js +4 -0
  9. package/dist/esm/models/PaymentMethodEnum.d.ts +1 -1
  10. package/dist/esm/models/PaymentMethodEnum.js +1 -1
  11. package/dist/esm/models/RecordPaymentDto.d.ts +12 -0
  12. package/dist/esm/models/RecordPaymentDto.js +4 -0
  13. package/dist/esm/models/SwaggerEnumSchemas.d.ts +14 -0
  14. package/dist/esm/models/SwaggerEnumSchemas.js +10 -0
  15. package/dist/esm/models/index.d.ts +1 -0
  16. package/dist/esm/models/index.js +1 -0
  17. package/dist/models/AuditLogActionEnum.d.ts +33 -0
  18. package/dist/models/AuditLogActionEnum.js +59 -0
  19. package/dist/models/Bill.d.ts +7 -0
  20. package/dist/models/Bill.js +3 -0
  21. package/dist/models/Payment.d.ts +12 -0
  22. package/dist/models/Payment.js +4 -0
  23. package/dist/models/PaymentMethodEnum.d.ts +1 -1
  24. package/dist/models/PaymentMethodEnum.js +1 -1
  25. package/dist/models/RecordPaymentDto.d.ts +12 -0
  26. package/dist/models/RecordPaymentDto.js +4 -0
  27. package/dist/models/SwaggerEnumSchemas.d.ts +14 -0
  28. package/dist/models/SwaggerEnumSchemas.js +10 -0
  29. package/dist/models/index.d.ts +1 -0
  30. package/dist/models/index.js +1 -0
  31. package/package.json +1 -1
  32. package/src/models/AuditLogActionEnum.ts +61 -0
  33. package/src/models/Bill.ts +15 -0
  34. package/src/models/Payment.ts +16 -0
  35. package/src/models/PaymentMethodEnum.ts +1 -1
  36. package/src/models/RecordPaymentDto.ts +16 -0
  37. package/src/models/SwaggerEnumSchemas.ts +34 -0
  38. package/src/models/index.ts +1 -0
@@ -52,6 +52,7 @@ src/models/AnnualSummaryReportSuccessResponse.ts
52
52
  src/models/AssignOutageDto.ts
53
53
  src/models/AssignWorkOrderDto.ts
54
54
  src/models/AuditLog.ts
55
+ src/models/AuditLogActionEnum.ts
55
56
  src/models/AuditLogActionsResponseDto.ts
56
57
  src/models/AuditLogActionsSuccessResponse.ts
57
58
  src/models/AuditLogEntityTypeEnum.ts
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ## electric-coop-api@0.1.86
1
+ ## electric-coop-api@0.1.87
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.86 --save
39
+ npm install electric-coop-api@0.1.87 --save
40
40
  ```
41
41
 
42
42
  _unPublished (not recommended):_
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Electric Cooperative Consumer Portal API
3
+ * Multi-tenant SaaS platform for Philippine electric cooperatives
4
+ *
5
+ * The version of the OpenAPI document: 1.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ * All possible actions that can appear in an audit log entry.
14
+ * @export
15
+ */
16
+ export declare const AuditLogActionEnum: {
17
+ readonly Create: "create";
18
+ readonly Update: "update";
19
+ readonly Delete: "delete";
20
+ readonly StatusChange: "status_change";
21
+ readonly Assign: "assign";
22
+ readonly Link: "link";
23
+ readonly Unlink: "unlink";
24
+ readonly SetPrimary: "set_primary";
25
+ readonly Login: "login";
26
+ readonly Logout: "logout";
27
+ };
28
+ export type AuditLogActionEnum = typeof AuditLogActionEnum[keyof typeof AuditLogActionEnum];
29
+ export declare function instanceOfAuditLogActionEnum(value: any): boolean;
30
+ export declare function AuditLogActionEnumFromJSON(json: any): AuditLogActionEnum;
31
+ export declare function AuditLogActionEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): AuditLogActionEnum;
32
+ export declare function AuditLogActionEnumToJSON(value?: AuditLogActionEnum | null): any;
33
+ export declare function AuditLogActionEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): AuditLogActionEnum;
@@ -0,0 +1,51 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Electric Cooperative Consumer Portal API
5
+ * Multi-tenant SaaS platform for Philippine electric cooperatives
6
+ *
7
+ * The version of the OpenAPI document: 1.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ /**
15
+ * All possible actions that can appear in an audit log entry.
16
+ * @export
17
+ */
18
+ export const AuditLogActionEnum = {
19
+ Create: 'create',
20
+ Update: 'update',
21
+ Delete: 'delete',
22
+ StatusChange: 'status_change',
23
+ Assign: 'assign',
24
+ Link: 'link',
25
+ Unlink: 'unlink',
26
+ SetPrimary: 'set_primary',
27
+ Login: 'login',
28
+ Logout: 'logout'
29
+ };
30
+ export function instanceOfAuditLogActionEnum(value) {
31
+ for (const key in AuditLogActionEnum) {
32
+ if (Object.prototype.hasOwnProperty.call(AuditLogActionEnum, key)) {
33
+ if (AuditLogActionEnum[key] === value) {
34
+ return true;
35
+ }
36
+ }
37
+ }
38
+ return false;
39
+ }
40
+ export function AuditLogActionEnumFromJSON(json) {
41
+ return AuditLogActionEnumFromJSONTyped(json, false);
42
+ }
43
+ export function AuditLogActionEnumFromJSONTyped(json, ignoreDiscriminator) {
44
+ return json;
45
+ }
46
+ export function AuditLogActionEnumToJSON(value) {
47
+ return value;
48
+ }
49
+ export function AuditLogActionEnumToJSONTyped(value, ignoreDiscriminator) {
50
+ return value;
51
+ }
@@ -10,6 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import type { BillBreakdownDto } from './BillBreakdownDto';
13
+ import type { PaymentMethodEnum } from './PaymentMethodEnum';
13
14
  import type { Tenant } from './Tenant';
14
15
  import type { Consumer } from './Consumer';
15
16
  import type { BillStatusEnum } from './BillStatusEnum';
@@ -170,6 +171,12 @@ export interface Bill {
170
171
  * @memberof Bill
171
172
  */
172
173
  orNumber?: string;
174
+ /**
175
+ * Payment method used for the most recent payment transaction
176
+ * @type {PaymentMethodEnum}
177
+ * @memberof Bill
178
+ */
179
+ paymentMethod?: PaymentMethodEnum;
173
180
  /**
174
181
  *
175
182
  * @type {BillStatusEnum}
@@ -12,6 +12,7 @@
12
12
  * Do not edit the class manually.
13
13
  */
14
14
  import { BillBreakdownDtoFromJSON, BillBreakdownDtoToJSON, } from './BillBreakdownDto';
15
+ import { PaymentMethodEnumFromJSON, PaymentMethodEnumToJSON, } from './PaymentMethodEnum';
15
16
  import { TenantFromJSON, TenantToJSON, } from './Tenant';
16
17
  import { ConsumerFromJSON, ConsumerToJSON, } from './Consumer';
17
18
  import { BillStatusEnumFromJSON, BillStatusEnumToJSON, } from './BillStatusEnum';
@@ -91,6 +92,7 @@ export function BillFromJSONTyped(json, ignoreDiscriminator) {
91
92
  'amountPaid': json['amountPaid'],
92
93
  'paymentDate': json['paymentDate'] == null ? undefined : (new Date(json['paymentDate'])),
93
94
  'orNumber': json['orNumber'] == null ? undefined : json['orNumber'],
95
+ 'paymentMethod': json['paymentMethod'] == null ? undefined : PaymentMethodEnumFromJSON(json['paymentMethod']),
94
96
  'status': BillStatusEnumFromJSON(json['status']),
95
97
  'breakdown': json['breakdown'] == null ? undefined : BillBreakdownDtoFromJSON(json['breakdown']),
96
98
  'rateDisplayId': json['rateDisplayId'] == null ? undefined : json['rateDisplayId'],
@@ -130,6 +132,7 @@ export function BillToJSONTyped(value, ignoreDiscriminator = false) {
130
132
  'amountPaid': value['amountPaid'],
131
133
  'paymentDate': value['paymentDate'] == null ? undefined : ((value['paymentDate']).toISOString()),
132
134
  'orNumber': value['orNumber'],
135
+ 'paymentMethod': PaymentMethodEnumToJSON(value['paymentMethod']),
133
136
  'status': BillStatusEnumToJSON(value['status']),
134
137
  'breakdown': BillBreakdownDtoToJSON(value['breakdown']),
135
138
  'rateDisplayId': value['rateDisplayId'],
@@ -127,6 +127,18 @@ export interface Payment {
127
127
  * @memberof Payment
128
128
  */
129
129
  orNumber: string;
130
+ /**
131
+ * Cash tendered by the customer (OTC cash payments only)
132
+ * @type {object}
133
+ * @memberof Payment
134
+ */
135
+ cashReceived?: object;
136
+ /**
137
+ * Change returned to the customer (OTC cash payments only)
138
+ * @type {object}
139
+ * @memberof Payment
140
+ */
141
+ changeDue?: object;
130
142
  }
131
143
  /**
132
144
  * Check if a given object implements the Payment interface.
@@ -67,6 +67,8 @@ export function PaymentFromJSONTyped(json, ignoreDiscriminator) {
67
67
  'gatewayPayload': json['gatewayPayload'] == null ? undefined : json['gatewayPayload'],
68
68
  'paidAt': json['paidAt'] == null ? undefined : json['paidAt'],
69
69
  'orNumber': json['orNumber'],
70
+ 'cashReceived': json['cashReceived'] == null ? undefined : json['cashReceived'],
71
+ 'changeDue': json['changeDue'] == null ? undefined : json['changeDue'],
70
72
  };
71
73
  }
72
74
  export function PaymentToJSON(json) {
@@ -95,5 +97,7 @@ export function PaymentToJSONTyped(value, ignoreDiscriminator = false) {
95
97
  'gatewayPayload': value['gatewayPayload'],
96
98
  'paidAt': value['paidAt'],
97
99
  'orNumber': value['orNumber'],
100
+ 'cashReceived': value['cashReceived'],
101
+ 'changeDue': value['changeDue'],
98
102
  };
99
103
  }
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  /**
13
- *
13
+ * Payment method used for the most recent payment transaction
14
14
  * @export
15
15
  */
16
16
  export declare const PaymentMethodEnum: {
@@ -12,7 +12,7 @@
12
12
  * Do not edit the class manually.
13
13
  */
14
14
  /**
15
- *
15
+ * Payment method used for the most recent payment transaction
16
16
  * @export
17
17
  */
18
18
  export const PaymentMethodEnum = {
@@ -33,6 +33,18 @@ export interface RecordPaymentDto {
33
33
  * @memberof RecordPaymentDto
34
34
  */
35
35
  paymentDate?: Date;
36
+ /**
37
+ * Cash tendered by the customer. Required for cash payments to enable change calculation.
38
+ * @type {number}
39
+ * @memberof RecordPaymentDto
40
+ */
41
+ cashReceived?: number;
42
+ /**
43
+ * Change returned to the customer. Computed as cashReceived − amountPaid.
44
+ * @type {number}
45
+ * @memberof RecordPaymentDto
46
+ */
47
+ changeDue?: number;
36
48
  }
37
49
  /**
38
50
  * @export
@@ -42,6 +42,8 @@ export function RecordPaymentDtoFromJSONTyped(json, ignoreDiscriminator) {
42
42
  'amountPaid': json['amountPaid'],
43
43
  'paymentMethod': json['paymentMethod'],
44
44
  'paymentDate': json['paymentDate'] == null ? undefined : (new Date(json['paymentDate'])),
45
+ 'cashReceived': json['cashReceived'] == null ? undefined : json['cashReceived'],
46
+ 'changeDue': json['changeDue'] == null ? undefined : json['changeDue'],
45
47
  };
46
48
  }
47
49
  export function RecordPaymentDtoToJSON(json) {
@@ -55,5 +57,7 @@ export function RecordPaymentDtoToJSONTyped(value, ignoreDiscriminator = false)
55
57
  'amountPaid': value['amountPaid'],
56
58
  'paymentMethod': value['paymentMethod'],
57
59
  'paymentDate': value['paymentDate'] == null ? undefined : ((value['paymentDate']).toISOString()),
60
+ 'cashReceived': value['cashReceived'],
61
+ 'changeDue': value['changeDue'],
58
62
  };
59
63
  }
@@ -9,7 +9,9 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import type { AuditLogActionEnum } from './AuditLogActionEnum';
12
13
  import type { ResourceEnum } from './ResourceEnum';
14
+ import type { AuditLogEntityTypeEnum } from './AuditLogEntityTypeEnum';
13
15
  /**
14
16
  *
15
17
  * @export
@@ -22,6 +24,18 @@ export interface SwaggerEnumSchemas {
22
24
  * @memberof SwaggerEnumSchemas
23
25
  */
24
26
  resources: Array<ResourceEnum>;
27
+ /**
28
+ * All possible actions that can appear in an audit log entry.
29
+ * @type {AuditLogActionEnum}
30
+ * @memberof SwaggerEnumSchemas
31
+ */
32
+ auditLogAction: AuditLogActionEnum;
33
+ /**
34
+ * All entity types that can appear in an audit log entry.
35
+ * @type {AuditLogEntityTypeEnum}
36
+ * @memberof SwaggerEnumSchemas
37
+ */
38
+ auditLogEntityType: AuditLogEntityTypeEnum;
25
39
  }
26
40
  /**
27
41
  * Check if a given object implements the SwaggerEnumSchemas interface.
@@ -11,13 +11,19 @@
11
11
  * https://openapi-generator.tech
12
12
  * Do not edit the class manually.
13
13
  */
14
+ import { AuditLogActionEnumFromJSON, AuditLogActionEnumToJSON, } from './AuditLogActionEnum';
14
15
  import { ResourceEnumFromJSON, ResourceEnumToJSON, } from './ResourceEnum';
16
+ import { AuditLogEntityTypeEnumFromJSON, AuditLogEntityTypeEnumToJSON, } from './AuditLogEntityTypeEnum';
15
17
  /**
16
18
  * Check if a given object implements the SwaggerEnumSchemas interface.
17
19
  */
18
20
  export function instanceOfSwaggerEnumSchemas(value) {
19
21
  if (!('resources' in value) || value['resources'] === undefined)
20
22
  return false;
23
+ if (!('auditLogAction' in value) || value['auditLogAction'] === undefined)
24
+ return false;
25
+ if (!('auditLogEntityType' in value) || value['auditLogEntityType'] === undefined)
26
+ return false;
21
27
  return true;
22
28
  }
23
29
  export function SwaggerEnumSchemasFromJSON(json) {
@@ -29,6 +35,8 @@ export function SwaggerEnumSchemasFromJSONTyped(json, ignoreDiscriminator) {
29
35
  }
30
36
  return {
31
37
  'resources': (json['resources'].map(ResourceEnumFromJSON)),
38
+ 'auditLogAction': AuditLogActionEnumFromJSON(json['auditLogAction']),
39
+ 'auditLogEntityType': AuditLogEntityTypeEnumFromJSON(json['auditLogEntityType']),
32
40
  };
33
41
  }
34
42
  export function SwaggerEnumSchemasToJSON(json) {
@@ -40,5 +48,7 @@ export function SwaggerEnumSchemasToJSONTyped(value, ignoreDiscriminator = false
40
48
  }
41
49
  return {
42
50
  'resources': (value['resources'].map(ResourceEnumToJSON)),
51
+ 'auditLogAction': AuditLogActionEnumToJSON(value['auditLogAction']),
52
+ 'auditLogEntityType': AuditLogEntityTypeEnumToJSON(value['auditLogEntityType']),
43
53
  };
44
54
  }
@@ -21,6 +21,7 @@ export * from './AnnualSummaryReportSuccessResponse';
21
21
  export * from './AssignOutageDto';
22
22
  export * from './AssignWorkOrderDto';
23
23
  export * from './AuditLog';
24
+ export * from './AuditLogActionEnum';
24
25
  export * from './AuditLogActionsResponseDto';
25
26
  export * from './AuditLogActionsSuccessResponse';
26
27
  export * from './AuditLogEntityTypeEnum';
@@ -23,6 +23,7 @@ export * from './AnnualSummaryReportSuccessResponse';
23
23
  export * from './AssignOutageDto';
24
24
  export * from './AssignWorkOrderDto';
25
25
  export * from './AuditLog';
26
+ export * from './AuditLogActionEnum';
26
27
  export * from './AuditLogActionsResponseDto';
27
28
  export * from './AuditLogActionsSuccessResponse';
28
29
  export * from './AuditLogEntityTypeEnum';
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Electric Cooperative Consumer Portal API
3
+ * Multi-tenant SaaS platform for Philippine electric cooperatives
4
+ *
5
+ * The version of the OpenAPI document: 1.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ * All possible actions that can appear in an audit log entry.
14
+ * @export
15
+ */
16
+ export declare const AuditLogActionEnum: {
17
+ readonly Create: "create";
18
+ readonly Update: "update";
19
+ readonly Delete: "delete";
20
+ readonly StatusChange: "status_change";
21
+ readonly Assign: "assign";
22
+ readonly Link: "link";
23
+ readonly Unlink: "unlink";
24
+ readonly SetPrimary: "set_primary";
25
+ readonly Login: "login";
26
+ readonly Logout: "logout";
27
+ };
28
+ export type AuditLogActionEnum = typeof AuditLogActionEnum[keyof typeof AuditLogActionEnum];
29
+ export declare function instanceOfAuditLogActionEnum(value: any): boolean;
30
+ export declare function AuditLogActionEnumFromJSON(json: any): AuditLogActionEnum;
31
+ export declare function AuditLogActionEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): AuditLogActionEnum;
32
+ export declare function AuditLogActionEnumToJSON(value?: AuditLogActionEnum | null): any;
33
+ export declare function AuditLogActionEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): AuditLogActionEnum;
@@ -0,0 +1,59 @@
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.AuditLogActionEnum = void 0;
17
+ exports.instanceOfAuditLogActionEnum = instanceOfAuditLogActionEnum;
18
+ exports.AuditLogActionEnumFromJSON = AuditLogActionEnumFromJSON;
19
+ exports.AuditLogActionEnumFromJSONTyped = AuditLogActionEnumFromJSONTyped;
20
+ exports.AuditLogActionEnumToJSON = AuditLogActionEnumToJSON;
21
+ exports.AuditLogActionEnumToJSONTyped = AuditLogActionEnumToJSONTyped;
22
+ /**
23
+ * All possible actions that can appear in an audit log entry.
24
+ * @export
25
+ */
26
+ exports.AuditLogActionEnum = {
27
+ Create: 'create',
28
+ Update: 'update',
29
+ Delete: 'delete',
30
+ StatusChange: 'status_change',
31
+ Assign: 'assign',
32
+ Link: 'link',
33
+ Unlink: 'unlink',
34
+ SetPrimary: 'set_primary',
35
+ Login: 'login',
36
+ Logout: 'logout'
37
+ };
38
+ function instanceOfAuditLogActionEnum(value) {
39
+ for (const key in exports.AuditLogActionEnum) {
40
+ if (Object.prototype.hasOwnProperty.call(exports.AuditLogActionEnum, key)) {
41
+ if (exports.AuditLogActionEnum[key] === value) {
42
+ return true;
43
+ }
44
+ }
45
+ }
46
+ return false;
47
+ }
48
+ function AuditLogActionEnumFromJSON(json) {
49
+ return AuditLogActionEnumFromJSONTyped(json, false);
50
+ }
51
+ function AuditLogActionEnumFromJSONTyped(json, ignoreDiscriminator) {
52
+ return json;
53
+ }
54
+ function AuditLogActionEnumToJSON(value) {
55
+ return value;
56
+ }
57
+ function AuditLogActionEnumToJSONTyped(value, ignoreDiscriminator) {
58
+ return value;
59
+ }
@@ -10,6 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import type { BillBreakdownDto } from './BillBreakdownDto';
13
+ import type { PaymentMethodEnum } from './PaymentMethodEnum';
13
14
  import type { Tenant } from './Tenant';
14
15
  import type { Consumer } from './Consumer';
15
16
  import type { BillStatusEnum } from './BillStatusEnum';
@@ -170,6 +171,12 @@ export interface Bill {
170
171
  * @memberof Bill
171
172
  */
172
173
  orNumber?: string;
174
+ /**
175
+ * Payment method used for the most recent payment transaction
176
+ * @type {PaymentMethodEnum}
177
+ * @memberof Bill
178
+ */
179
+ paymentMethod?: PaymentMethodEnum;
173
180
  /**
174
181
  *
175
182
  * @type {BillStatusEnum}
@@ -19,6 +19,7 @@ exports.BillFromJSONTyped = BillFromJSONTyped;
19
19
  exports.BillToJSON = BillToJSON;
20
20
  exports.BillToJSONTyped = BillToJSONTyped;
21
21
  const BillBreakdownDto_1 = require("./BillBreakdownDto");
22
+ const PaymentMethodEnum_1 = require("./PaymentMethodEnum");
22
23
  const Tenant_1 = require("./Tenant");
23
24
  const Consumer_1 = require("./Consumer");
24
25
  const BillStatusEnum_1 = require("./BillStatusEnum");
@@ -98,6 +99,7 @@ function BillFromJSONTyped(json, ignoreDiscriminator) {
98
99
  'amountPaid': json['amountPaid'],
99
100
  'paymentDate': json['paymentDate'] == null ? undefined : (new Date(json['paymentDate'])),
100
101
  'orNumber': json['orNumber'] == null ? undefined : json['orNumber'],
102
+ 'paymentMethod': json['paymentMethod'] == null ? undefined : (0, PaymentMethodEnum_1.PaymentMethodEnumFromJSON)(json['paymentMethod']),
101
103
  'status': (0, BillStatusEnum_1.BillStatusEnumFromJSON)(json['status']),
102
104
  'breakdown': json['breakdown'] == null ? undefined : (0, BillBreakdownDto_1.BillBreakdownDtoFromJSON)(json['breakdown']),
103
105
  'rateDisplayId': json['rateDisplayId'] == null ? undefined : json['rateDisplayId'],
@@ -137,6 +139,7 @@ function BillToJSONTyped(value, ignoreDiscriminator = false) {
137
139
  'amountPaid': value['amountPaid'],
138
140
  'paymentDate': value['paymentDate'] == null ? undefined : ((value['paymentDate']).toISOString()),
139
141
  'orNumber': value['orNumber'],
142
+ 'paymentMethod': (0, PaymentMethodEnum_1.PaymentMethodEnumToJSON)(value['paymentMethod']),
140
143
  'status': (0, BillStatusEnum_1.BillStatusEnumToJSON)(value['status']),
141
144
  'breakdown': (0, BillBreakdownDto_1.BillBreakdownDtoToJSON)(value['breakdown']),
142
145
  'rateDisplayId': value['rateDisplayId'],
@@ -127,6 +127,18 @@ export interface Payment {
127
127
  * @memberof Payment
128
128
  */
129
129
  orNumber: string;
130
+ /**
131
+ * Cash tendered by the customer (OTC cash payments only)
132
+ * @type {object}
133
+ * @memberof Payment
134
+ */
135
+ cashReceived?: object;
136
+ /**
137
+ * Change returned to the customer (OTC cash payments only)
138
+ * @type {object}
139
+ * @memberof Payment
140
+ */
141
+ changeDue?: object;
130
142
  }
131
143
  /**
132
144
  * Check if a given object implements the Payment interface.
@@ -74,6 +74,8 @@ function PaymentFromJSONTyped(json, ignoreDiscriminator) {
74
74
  'gatewayPayload': json['gatewayPayload'] == null ? undefined : json['gatewayPayload'],
75
75
  'paidAt': json['paidAt'] == null ? undefined : json['paidAt'],
76
76
  'orNumber': json['orNumber'],
77
+ 'cashReceived': json['cashReceived'] == null ? undefined : json['cashReceived'],
78
+ 'changeDue': json['changeDue'] == null ? undefined : json['changeDue'],
77
79
  };
78
80
  }
79
81
  function PaymentToJSON(json) {
@@ -102,5 +104,7 @@ function PaymentToJSONTyped(value, ignoreDiscriminator = false) {
102
104
  'gatewayPayload': value['gatewayPayload'],
103
105
  'paidAt': value['paidAt'],
104
106
  'orNumber': value['orNumber'],
107
+ 'cashReceived': value['cashReceived'],
108
+ 'changeDue': value['changeDue'],
105
109
  };
106
110
  }
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  /**
13
- *
13
+ * Payment method used for the most recent payment transaction
14
14
  * @export
15
15
  */
16
16
  export declare const PaymentMethodEnum: {
@@ -20,7 +20,7 @@ exports.PaymentMethodEnumFromJSONTyped = PaymentMethodEnumFromJSONTyped;
20
20
  exports.PaymentMethodEnumToJSON = PaymentMethodEnumToJSON;
21
21
  exports.PaymentMethodEnumToJSONTyped = PaymentMethodEnumToJSONTyped;
22
22
  /**
23
- *
23
+ * Payment method used for the most recent payment transaction
24
24
  * @export
25
25
  */
26
26
  exports.PaymentMethodEnum = {
@@ -33,6 +33,18 @@ export interface RecordPaymentDto {
33
33
  * @memberof RecordPaymentDto
34
34
  */
35
35
  paymentDate?: Date;
36
+ /**
37
+ * Cash tendered by the customer. Required for cash payments to enable change calculation.
38
+ * @type {number}
39
+ * @memberof RecordPaymentDto
40
+ */
41
+ cashReceived?: number;
42
+ /**
43
+ * Change returned to the customer. Computed as cashReceived − amountPaid.
44
+ * @type {number}
45
+ * @memberof RecordPaymentDto
46
+ */
47
+ changeDue?: number;
36
48
  }
37
49
  /**
38
50
  * @export
@@ -50,6 +50,8 @@ function RecordPaymentDtoFromJSONTyped(json, ignoreDiscriminator) {
50
50
  'amountPaid': json['amountPaid'],
51
51
  'paymentMethod': json['paymentMethod'],
52
52
  'paymentDate': json['paymentDate'] == null ? undefined : (new Date(json['paymentDate'])),
53
+ 'cashReceived': json['cashReceived'] == null ? undefined : json['cashReceived'],
54
+ 'changeDue': json['changeDue'] == null ? undefined : json['changeDue'],
53
55
  };
54
56
  }
55
57
  function RecordPaymentDtoToJSON(json) {
@@ -63,5 +65,7 @@ function RecordPaymentDtoToJSONTyped(value, ignoreDiscriminator = false) {
63
65
  'amountPaid': value['amountPaid'],
64
66
  'paymentMethod': value['paymentMethod'],
65
67
  'paymentDate': value['paymentDate'] == null ? undefined : ((value['paymentDate']).toISOString()),
68
+ 'cashReceived': value['cashReceived'],
69
+ 'changeDue': value['changeDue'],
66
70
  };
67
71
  }
@@ -9,7 +9,9 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import type { AuditLogActionEnum } from './AuditLogActionEnum';
12
13
  import type { ResourceEnum } from './ResourceEnum';
14
+ import type { AuditLogEntityTypeEnum } from './AuditLogEntityTypeEnum';
13
15
  /**
14
16
  *
15
17
  * @export
@@ -22,6 +24,18 @@ export interface SwaggerEnumSchemas {
22
24
  * @memberof SwaggerEnumSchemas
23
25
  */
24
26
  resources: Array<ResourceEnum>;
27
+ /**
28
+ * All possible actions that can appear in an audit log entry.
29
+ * @type {AuditLogActionEnum}
30
+ * @memberof SwaggerEnumSchemas
31
+ */
32
+ auditLogAction: AuditLogActionEnum;
33
+ /**
34
+ * All entity types that can appear in an audit log entry.
35
+ * @type {AuditLogEntityTypeEnum}
36
+ * @memberof SwaggerEnumSchemas
37
+ */
38
+ auditLogEntityType: AuditLogEntityTypeEnum;
25
39
  }
26
40
  /**
27
41
  * Check if a given object implements the SwaggerEnumSchemas interface.
@@ -18,13 +18,19 @@ exports.SwaggerEnumSchemasFromJSON = SwaggerEnumSchemasFromJSON;
18
18
  exports.SwaggerEnumSchemasFromJSONTyped = SwaggerEnumSchemasFromJSONTyped;
19
19
  exports.SwaggerEnumSchemasToJSON = SwaggerEnumSchemasToJSON;
20
20
  exports.SwaggerEnumSchemasToJSONTyped = SwaggerEnumSchemasToJSONTyped;
21
+ const AuditLogActionEnum_1 = require("./AuditLogActionEnum");
21
22
  const ResourceEnum_1 = require("./ResourceEnum");
23
+ const AuditLogEntityTypeEnum_1 = require("./AuditLogEntityTypeEnum");
22
24
  /**
23
25
  * Check if a given object implements the SwaggerEnumSchemas interface.
24
26
  */
25
27
  function instanceOfSwaggerEnumSchemas(value) {
26
28
  if (!('resources' in value) || value['resources'] === undefined)
27
29
  return false;
30
+ if (!('auditLogAction' in value) || value['auditLogAction'] === undefined)
31
+ return false;
32
+ if (!('auditLogEntityType' in value) || value['auditLogEntityType'] === undefined)
33
+ return false;
28
34
  return true;
29
35
  }
30
36
  function SwaggerEnumSchemasFromJSON(json) {
@@ -36,6 +42,8 @@ function SwaggerEnumSchemasFromJSONTyped(json, ignoreDiscriminator) {
36
42
  }
37
43
  return {
38
44
  'resources': (json['resources'].map(ResourceEnum_1.ResourceEnumFromJSON)),
45
+ 'auditLogAction': (0, AuditLogActionEnum_1.AuditLogActionEnumFromJSON)(json['auditLogAction']),
46
+ 'auditLogEntityType': (0, AuditLogEntityTypeEnum_1.AuditLogEntityTypeEnumFromJSON)(json['auditLogEntityType']),
39
47
  };
40
48
  }
41
49
  function SwaggerEnumSchemasToJSON(json) {
@@ -47,5 +55,7 @@ function SwaggerEnumSchemasToJSONTyped(value, ignoreDiscriminator = false) {
47
55
  }
48
56
  return {
49
57
  'resources': (value['resources'].map(ResourceEnum_1.ResourceEnumToJSON)),
58
+ 'auditLogAction': (0, AuditLogActionEnum_1.AuditLogActionEnumToJSON)(value['auditLogAction']),
59
+ 'auditLogEntityType': (0, AuditLogEntityTypeEnum_1.AuditLogEntityTypeEnumToJSON)(value['auditLogEntityType']),
50
60
  };
51
61
  }
@@ -21,6 +21,7 @@ export * from './AnnualSummaryReportSuccessResponse';
21
21
  export * from './AssignOutageDto';
22
22
  export * from './AssignWorkOrderDto';
23
23
  export * from './AuditLog';
24
+ export * from './AuditLogActionEnum';
24
25
  export * from './AuditLogActionsResponseDto';
25
26
  export * from './AuditLogActionsSuccessResponse';
26
27
  export * from './AuditLogEntityTypeEnum';
@@ -39,6 +39,7 @@ __exportStar(require("./AnnualSummaryReportSuccessResponse"), exports);
39
39
  __exportStar(require("./AssignOutageDto"), exports);
40
40
  __exportStar(require("./AssignWorkOrderDto"), exports);
41
41
  __exportStar(require("./AuditLog"), exports);
42
+ __exportStar(require("./AuditLogActionEnum"), exports);
42
43
  __exportStar(require("./AuditLogActionsResponseDto"), exports);
43
44
  __exportStar(require("./AuditLogActionsSuccessResponse"), exports);
44
45
  __exportStar(require("./AuditLogEntityTypeEnum"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "electric-coop-api",
3
- "version": "0.1.86",
3
+ "version": "0.1.87",
4
4
  "description": "OpenAPI client for electric-coop-api",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -0,0 +1,61 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Electric Cooperative Consumer Portal API
5
+ * Multi-tenant SaaS platform for Philippine electric cooperatives
6
+ *
7
+ * The version of the OpenAPI document: 1.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+ /**
17
+ * All possible actions that can appear in an audit log entry.
18
+ * @export
19
+ */
20
+ export const AuditLogActionEnum = {
21
+ Create: 'create',
22
+ Update: 'update',
23
+ Delete: 'delete',
24
+ StatusChange: 'status_change',
25
+ Assign: 'assign',
26
+ Link: 'link',
27
+ Unlink: 'unlink',
28
+ SetPrimary: 'set_primary',
29
+ Login: 'login',
30
+ Logout: 'logout'
31
+ } as const;
32
+ export type AuditLogActionEnum = typeof AuditLogActionEnum[keyof typeof AuditLogActionEnum];
33
+
34
+
35
+ export function instanceOfAuditLogActionEnum(value: any): boolean {
36
+ for (const key in AuditLogActionEnum) {
37
+ if (Object.prototype.hasOwnProperty.call(AuditLogActionEnum, key)) {
38
+ if (AuditLogActionEnum[key as keyof typeof AuditLogActionEnum] === value) {
39
+ return true;
40
+ }
41
+ }
42
+ }
43
+ return false;
44
+ }
45
+
46
+ export function AuditLogActionEnumFromJSON(json: any): AuditLogActionEnum {
47
+ return AuditLogActionEnumFromJSONTyped(json, false);
48
+ }
49
+
50
+ export function AuditLogActionEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): AuditLogActionEnum {
51
+ return json as AuditLogActionEnum;
52
+ }
53
+
54
+ export function AuditLogActionEnumToJSON(value?: AuditLogActionEnum | null): any {
55
+ return value as any;
56
+ }
57
+
58
+ export function AuditLogActionEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): AuditLogActionEnum {
59
+ return value as AuditLogActionEnum;
60
+ }
61
+
@@ -20,6 +20,13 @@ import {
20
20
  BillBreakdownDtoToJSON,
21
21
  BillBreakdownDtoToJSONTyped,
22
22
  } from './BillBreakdownDto';
23
+ import type { PaymentMethodEnum } from './PaymentMethodEnum';
24
+ import {
25
+ PaymentMethodEnumFromJSON,
26
+ PaymentMethodEnumFromJSONTyped,
27
+ PaymentMethodEnumToJSON,
28
+ PaymentMethodEnumToJSONTyped,
29
+ } from './PaymentMethodEnum';
23
30
  import type { Tenant } from './Tenant';
24
31
  import {
25
32
  TenantFromJSON,
@@ -205,6 +212,12 @@ export interface Bill {
205
212
  * @memberof Bill
206
213
  */
207
214
  orNumber?: string;
215
+ /**
216
+ * Payment method used for the most recent payment transaction
217
+ * @type {PaymentMethodEnum}
218
+ * @memberof Bill
219
+ */
220
+ paymentMethod?: PaymentMethodEnum;
208
221
  /**
209
222
  *
210
223
  * @type {BillStatusEnum}
@@ -293,6 +306,7 @@ export function BillFromJSONTyped(json: any, ignoreDiscriminator: boolean): Bill
293
306
  'amountPaid': json['amountPaid'],
294
307
  'paymentDate': json['paymentDate'] == null ? undefined : (new Date(json['paymentDate'])),
295
308
  'orNumber': json['orNumber'] == null ? undefined : json['orNumber'],
309
+ 'paymentMethod': json['paymentMethod'] == null ? undefined : PaymentMethodEnumFromJSON(json['paymentMethod']),
296
310
  'status': BillStatusEnumFromJSON(json['status']),
297
311
  'breakdown': json['breakdown'] == null ? undefined : BillBreakdownDtoFromJSON(json['breakdown']),
298
312
  'rateDisplayId': json['rateDisplayId'] == null ? undefined : json['rateDisplayId'],
@@ -336,6 +350,7 @@ export function BillToJSONTyped(value?: Bill | null, ignoreDiscriminator: boolea
336
350
  'amountPaid': value['amountPaid'],
337
351
  'paymentDate': value['paymentDate'] == null ? undefined : ((value['paymentDate']).toISOString()),
338
352
  'orNumber': value['orNumber'],
353
+ 'paymentMethod': PaymentMethodEnumToJSON(value['paymentMethod']),
339
354
  'status': BillStatusEnumToJSON(value['status']),
340
355
  'breakdown': BillBreakdownDtoToJSON(value['breakdown']),
341
356
  'rateDisplayId': value['rateDisplayId'],
@@ -156,6 +156,18 @@ export interface Payment {
156
156
  * @memberof Payment
157
157
  */
158
158
  orNumber: string;
159
+ /**
160
+ * Cash tendered by the customer (OTC cash payments only)
161
+ * @type {object}
162
+ * @memberof Payment
163
+ */
164
+ cashReceived?: object;
165
+ /**
166
+ * Change returned to the customer (OTC cash payments only)
167
+ * @type {object}
168
+ * @memberof Payment
169
+ */
170
+ changeDue?: object;
159
171
  }
160
172
 
161
173
 
@@ -205,6 +217,8 @@ export function PaymentFromJSONTyped(json: any, ignoreDiscriminator: boolean): P
205
217
  'gatewayPayload': json['gatewayPayload'] == null ? undefined : json['gatewayPayload'],
206
218
  'paidAt': json['paidAt'] == null ? undefined : json['paidAt'],
207
219
  'orNumber': json['orNumber'],
220
+ 'cashReceived': json['cashReceived'] == null ? undefined : json['cashReceived'],
221
+ 'changeDue': json['changeDue'] == null ? undefined : json['changeDue'],
208
222
  };
209
223
  }
210
224
 
@@ -237,6 +251,8 @@ export function PaymentToJSONTyped(value?: Payment | null, ignoreDiscriminator:
237
251
  'gatewayPayload': value['gatewayPayload'],
238
252
  'paidAt': value['paidAt'],
239
253
  'orNumber': value['orNumber'],
254
+ 'cashReceived': value['cashReceived'],
255
+ 'changeDue': value['changeDue'],
240
256
  };
241
257
  }
242
258
 
@@ -14,7 +14,7 @@
14
14
 
15
15
 
16
16
  /**
17
- *
17
+ * Payment method used for the most recent payment transaction
18
18
  * @export
19
19
  */
20
20
  export const PaymentMethodEnum = {
@@ -37,6 +37,18 @@ export interface RecordPaymentDto {
37
37
  * @memberof RecordPaymentDto
38
38
  */
39
39
  paymentDate?: Date;
40
+ /**
41
+ * Cash tendered by the customer. Required for cash payments to enable change calculation.
42
+ * @type {number}
43
+ * @memberof RecordPaymentDto
44
+ */
45
+ cashReceived?: number;
46
+ /**
47
+ * Change returned to the customer. Computed as cashReceived − amountPaid.
48
+ * @type {number}
49
+ * @memberof RecordPaymentDto
50
+ */
51
+ changeDue?: number;
40
52
  }
41
53
 
42
54
 
@@ -75,6 +87,8 @@ export function RecordPaymentDtoFromJSONTyped(json: any, ignoreDiscriminator: bo
75
87
  'amountPaid': json['amountPaid'],
76
88
  'paymentMethod': json['paymentMethod'],
77
89
  'paymentDate': json['paymentDate'] == null ? undefined : (new Date(json['paymentDate'])),
90
+ 'cashReceived': json['cashReceived'] == null ? undefined : json['cashReceived'],
91
+ 'changeDue': json['changeDue'] == null ? undefined : json['changeDue'],
78
92
  };
79
93
  }
80
94
 
@@ -92,6 +106,8 @@ export function RecordPaymentDtoToJSONTyped(value?: RecordPaymentDto | null, ign
92
106
  'amountPaid': value['amountPaid'],
93
107
  'paymentMethod': value['paymentMethod'],
94
108
  'paymentDate': value['paymentDate'] == null ? undefined : ((value['paymentDate']).toISOString()),
109
+ 'cashReceived': value['cashReceived'],
110
+ 'changeDue': value['changeDue'],
95
111
  };
96
112
  }
97
113
 
@@ -13,6 +13,13 @@
13
13
  */
14
14
 
15
15
  import { mapValues } from '../runtime';
16
+ import type { AuditLogActionEnum } from './AuditLogActionEnum';
17
+ import {
18
+ AuditLogActionEnumFromJSON,
19
+ AuditLogActionEnumFromJSONTyped,
20
+ AuditLogActionEnumToJSON,
21
+ AuditLogActionEnumToJSONTyped,
22
+ } from './AuditLogActionEnum';
16
23
  import type { ResourceEnum } from './ResourceEnum';
17
24
  import {
18
25
  ResourceEnumFromJSON,
@@ -20,6 +27,13 @@ import {
20
27
  ResourceEnumToJSON,
21
28
  ResourceEnumToJSONTyped,
22
29
  } from './ResourceEnum';
30
+ import type { AuditLogEntityTypeEnum } from './AuditLogEntityTypeEnum';
31
+ import {
32
+ AuditLogEntityTypeEnumFromJSON,
33
+ AuditLogEntityTypeEnumFromJSONTyped,
34
+ AuditLogEntityTypeEnumToJSON,
35
+ AuditLogEntityTypeEnumToJSONTyped,
36
+ } from './AuditLogEntityTypeEnum';
23
37
 
24
38
  /**
25
39
  *
@@ -33,13 +47,29 @@ export interface SwaggerEnumSchemas {
33
47
  * @memberof SwaggerEnumSchemas
34
48
  */
35
49
  resources: Array<ResourceEnum>;
50
+ /**
51
+ * All possible actions that can appear in an audit log entry.
52
+ * @type {AuditLogActionEnum}
53
+ * @memberof SwaggerEnumSchemas
54
+ */
55
+ auditLogAction: AuditLogActionEnum;
56
+ /**
57
+ * All entity types that can appear in an audit log entry.
58
+ * @type {AuditLogEntityTypeEnum}
59
+ * @memberof SwaggerEnumSchemas
60
+ */
61
+ auditLogEntityType: AuditLogEntityTypeEnum;
36
62
  }
37
63
 
64
+
65
+
38
66
  /**
39
67
  * Check if a given object implements the SwaggerEnumSchemas interface.
40
68
  */
41
69
  export function instanceOfSwaggerEnumSchemas(value: object): value is SwaggerEnumSchemas {
42
70
  if (!('resources' in value) || value['resources'] === undefined) return false;
71
+ if (!('auditLogAction' in value) || value['auditLogAction'] === undefined) return false;
72
+ if (!('auditLogEntityType' in value) || value['auditLogEntityType'] === undefined) return false;
43
73
  return true;
44
74
  }
45
75
 
@@ -54,6 +84,8 @@ export function SwaggerEnumSchemasFromJSONTyped(json: any, ignoreDiscriminator:
54
84
  return {
55
85
 
56
86
  'resources': ((json['resources'] as Array<any>).map(ResourceEnumFromJSON)),
87
+ 'auditLogAction': AuditLogActionEnumFromJSON(json['auditLogAction']),
88
+ 'auditLogEntityType': AuditLogEntityTypeEnumFromJSON(json['auditLogEntityType']),
57
89
  };
58
90
  }
59
91
 
@@ -69,6 +101,8 @@ export function SwaggerEnumSchemasToJSONTyped(value?: SwaggerEnumSchemas | null,
69
101
  return {
70
102
 
71
103
  'resources': ((value['resources'] as Array<any>).map(ResourceEnumToJSON)),
104
+ 'auditLogAction': AuditLogActionEnumToJSON(value['auditLogAction']),
105
+ 'auditLogEntityType': AuditLogEntityTypeEnumToJSON(value['auditLogEntityType']),
72
106
  };
73
107
  }
74
108
 
@@ -23,6 +23,7 @@ export * from './AnnualSummaryReportSuccessResponse';
23
23
  export * from './AssignOutageDto';
24
24
  export * from './AssignWorkOrderDto';
25
25
  export * from './AuditLog';
26
+ export * from './AuditLogActionEnum';
26
27
  export * from './AuditLogActionsResponseDto';
27
28
  export * from './AuditLogActionsSuccessResponse';
28
29
  export * from './AuditLogEntityTypeEnum';