@digital8/security-registers-backend-ts-sdk 0.0.230 → 0.0.231
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/models/AddressResource.d.ts +1 -1
- package/dist/models/AddressResource.js +3 -1
- package/dist/models/IncidentLiteResource.d.ts +37 -0
- package/dist/models/IncidentLiteResource.js +15 -2
- package/dist/models/IncidentLiteResourceStaff.d.ts +32 -0
- package/dist/models/IncidentLiteResourceStaff.js +51 -0
- package/dist/models/RegisterListResource.d.ts +1 -1
- package/dist/models/RegisterListResource.js +1 -3
- package/dist/models/RegisterResource.d.ts +3 -3
- package/dist/models/RegisterResource.js +11 -9
- package/dist/models/RosterLiteResource.d.ts +1 -1
- package/dist/models/RosterLiteResource.js +3 -4
- package/dist/models/SecurityCompanyResource.d.ts +1 -1
- package/dist/models/SecurityCompanyResource.js +3 -1
- package/dist/models/index.d.ts +1 -0
- package/dist/models/index.js +1 -0
- package/package.json +1 -1
- package/src/models/AddressResource.ts +3 -2
- package/src/models/IncidentLiteResource.ts +56 -0
- package/src/models/IncidentLiteResourceStaff.ts +66 -0
- package/src/models/RegisterListResource.ts +2 -3
- package/src/models/RegisterResource.ts +9 -8
- package/src/models/RosterLiteResource.ts +3 -4
- package/src/models/SecurityCompanyResource.ts +3 -2
- package/src/models/index.ts +1 -0
package/.openapi-generator/FILES
CHANGED
|
@@ -27,6 +27,7 @@ src/models/IncidentImageResource.ts
|
|
|
27
27
|
src/models/IncidentImageResourceArrayResponse.ts
|
|
28
28
|
src/models/IncidentLiteResource.ts
|
|
29
29
|
src/models/IncidentLiteResourceArrayResponse.ts
|
|
30
|
+
src/models/IncidentLiteResourceStaff.ts
|
|
30
31
|
src/models/IncidentResource.ts
|
|
31
32
|
src/models/IncidentResourceArrayResponse.ts
|
|
32
33
|
src/models/IncidentVersionResource.ts
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## @digital8/security-registers-backend-ts-sdk@0.0.
|
|
1
|
+
## @digital8/security-registers-backend-ts-sdk@0.0.231
|
|
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 @digital8/security-registers-backend-ts-sdk@0.0.
|
|
39
|
+
npm install @digital8/security-registers-backend-ts-sdk@0.0.231 --save
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
_unPublished (not recommended):_
|
|
@@ -24,6 +24,8 @@ exports.AddressResourceToJSONTyped = AddressResourceToJSONTyped;
|
|
|
24
24
|
function instanceOfAddressResource(value) {
|
|
25
25
|
if (!('addressLine1' in value) || value['addressLine1'] === undefined)
|
|
26
26
|
return false;
|
|
27
|
+
if (!('addressLine2' in value) || value['addressLine2'] === undefined)
|
|
28
|
+
return false;
|
|
27
29
|
if (!('suburb' in value) || value['suburb'] === undefined)
|
|
28
30
|
return false;
|
|
29
31
|
if (!('city' in value) || value['city'] === undefined)
|
|
@@ -48,7 +50,7 @@ function AddressResourceFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
48
50
|
return {
|
|
49
51
|
'id': json['id'] == null ? undefined : json['id'],
|
|
50
52
|
'addressLine1': json['addressLine1'],
|
|
51
|
-
'addressLine2': json['addressLine2']
|
|
53
|
+
'addressLine2': json['addressLine2'],
|
|
52
54
|
'suburb': json['suburb'],
|
|
53
55
|
'city': json['city'],
|
|
54
56
|
'state': json['state'],
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
+
import type { IncidentLiteResourceStaff } from './IncidentLiteResourceStaff';
|
|
12
13
|
/**
|
|
13
14
|
*
|
|
14
15
|
* @export
|
|
@@ -21,6 +22,42 @@ export interface IncidentLiteResource {
|
|
|
21
22
|
* @memberof IncidentLiteResource
|
|
22
23
|
*/
|
|
23
24
|
id: number;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {string}
|
|
28
|
+
* @memberof IncidentLiteResource
|
|
29
|
+
*/
|
|
30
|
+
title?: string | null;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @type {string}
|
|
34
|
+
* @memberof IncidentLiteResource
|
|
35
|
+
*/
|
|
36
|
+
manager?: string | null;
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {Date}
|
|
40
|
+
* @memberof IncidentLiteResource
|
|
41
|
+
*/
|
|
42
|
+
date?: Date | null;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {string}
|
|
46
|
+
* @memberof IncidentLiteResource
|
|
47
|
+
*/
|
|
48
|
+
startTime?: string | null;
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
51
|
+
* @type {IncidentLiteResourceStaff}
|
|
52
|
+
* @memberof IncidentLiteResource
|
|
53
|
+
*/
|
|
54
|
+
staff?: IncidentLiteResourceStaff | null;
|
|
55
|
+
/**
|
|
56
|
+
*
|
|
57
|
+
* @type {Date}
|
|
58
|
+
* @memberof IncidentLiteResource
|
|
59
|
+
*/
|
|
60
|
+
lastUpdated?: Date | null;
|
|
24
61
|
/**
|
|
25
62
|
*
|
|
26
63
|
* @type {Date}
|
|
@@ -18,6 +18,7 @@ exports.IncidentLiteResourceFromJSON = IncidentLiteResourceFromJSON;
|
|
|
18
18
|
exports.IncidentLiteResourceFromJSONTyped = IncidentLiteResourceFromJSONTyped;
|
|
19
19
|
exports.IncidentLiteResourceToJSON = IncidentLiteResourceToJSON;
|
|
20
20
|
exports.IncidentLiteResourceToJSONTyped = IncidentLiteResourceToJSONTyped;
|
|
21
|
+
var IncidentLiteResourceStaff_1 = require("./IncidentLiteResourceStaff");
|
|
21
22
|
/**
|
|
22
23
|
* Check if a given object implements the IncidentLiteResource interface.
|
|
23
24
|
*/
|
|
@@ -35,6 +36,12 @@ function IncidentLiteResourceFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
35
36
|
}
|
|
36
37
|
return {
|
|
37
38
|
'id': json['id'],
|
|
39
|
+
'title': json['title'] == null ? undefined : json['title'],
|
|
40
|
+
'manager': json['manager'] == null ? undefined : json['manager'],
|
|
41
|
+
'date': json['date'] == null ? undefined : (new Date(json['date'])),
|
|
42
|
+
'startTime': json['startTime'] == null ? undefined : json['startTime'],
|
|
43
|
+
'staff': json['staff'] == null ? undefined : (0, IncidentLiteResourceStaff_1.IncidentLiteResourceStaffFromJSON)(json['staff']),
|
|
44
|
+
'lastUpdated': json['lastUpdated'] == null ? undefined : (new Date(json['lastUpdated'])),
|
|
38
45
|
'approvedAt': json['approvedAt'] == null ? undefined : (new Date(json['approvedAt'])),
|
|
39
46
|
};
|
|
40
47
|
}
|
|
@@ -42,13 +49,19 @@ function IncidentLiteResourceToJSON(json) {
|
|
|
42
49
|
return IncidentLiteResourceToJSONTyped(json, false);
|
|
43
50
|
}
|
|
44
51
|
function IncidentLiteResourceToJSONTyped(value, ignoreDiscriminator) {
|
|
45
|
-
var _a;
|
|
52
|
+
var _a, _b, _c;
|
|
46
53
|
if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; }
|
|
47
54
|
if (value == null) {
|
|
48
55
|
return value;
|
|
49
56
|
}
|
|
50
57
|
return {
|
|
51
58
|
'id': value['id'],
|
|
52
|
-
'
|
|
59
|
+
'title': value['title'],
|
|
60
|
+
'manager': value['manager'],
|
|
61
|
+
'date': value['date'] === null ? null : ((_a = value['date']) === null || _a === void 0 ? void 0 : _a.toISOString().substring(0, 10)),
|
|
62
|
+
'startTime': value['startTime'],
|
|
63
|
+
'staff': (0, IncidentLiteResourceStaff_1.IncidentLiteResourceStaffToJSON)(value['staff']),
|
|
64
|
+
'lastUpdated': value['lastUpdated'] === null ? null : ((_b = value['lastUpdated']) === null || _b === void 0 ? void 0 : _b.toISOString()),
|
|
65
|
+
'approvedAt': value['approvedAt'] === null ? null : ((_c = value['approvedAt']) === null || _c === void 0 ? void 0 : _c.toISOString()),
|
|
53
66
|
};
|
|
54
67
|
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* My API
|
|
3
|
+
* API documentation for my Laravel app
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.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 IncidentLiteResourceStaff
|
|
16
|
+
*/
|
|
17
|
+
export interface IncidentLiteResourceStaff {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof IncidentLiteResourceStaff
|
|
22
|
+
*/
|
|
23
|
+
name: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Check if a given object implements the IncidentLiteResourceStaff interface.
|
|
27
|
+
*/
|
|
28
|
+
export declare function instanceOfIncidentLiteResourceStaff(value: object): value is IncidentLiteResourceStaff;
|
|
29
|
+
export declare function IncidentLiteResourceStaffFromJSON(json: any): IncidentLiteResourceStaff;
|
|
30
|
+
export declare function IncidentLiteResourceStaffFromJSONTyped(json: any, ignoreDiscriminator: boolean): IncidentLiteResourceStaff;
|
|
31
|
+
export declare function IncidentLiteResourceStaffToJSON(json: any): IncidentLiteResourceStaff;
|
|
32
|
+
export declare function IncidentLiteResourceStaffToJSONTyped(value?: IncidentLiteResourceStaff | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* My API
|
|
6
|
+
* API documentation for my Laravel app
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.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.instanceOfIncidentLiteResourceStaff = instanceOfIncidentLiteResourceStaff;
|
|
17
|
+
exports.IncidentLiteResourceStaffFromJSON = IncidentLiteResourceStaffFromJSON;
|
|
18
|
+
exports.IncidentLiteResourceStaffFromJSONTyped = IncidentLiteResourceStaffFromJSONTyped;
|
|
19
|
+
exports.IncidentLiteResourceStaffToJSON = IncidentLiteResourceStaffToJSON;
|
|
20
|
+
exports.IncidentLiteResourceStaffToJSONTyped = IncidentLiteResourceStaffToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the IncidentLiteResourceStaff interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfIncidentLiteResourceStaff(value) {
|
|
25
|
+
if (!('name' in value) || value['name'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
function IncidentLiteResourceStaffFromJSON(json) {
|
|
30
|
+
return IncidentLiteResourceStaffFromJSONTyped(json, false);
|
|
31
|
+
}
|
|
32
|
+
function IncidentLiteResourceStaffFromJSONTyped(json, ignoreDiscriminator) {
|
|
33
|
+
if (json == null) {
|
|
34
|
+
return json;
|
|
35
|
+
}
|
|
36
|
+
return {
|
|
37
|
+
'name': json['name'],
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
function IncidentLiteResourceStaffToJSON(json) {
|
|
41
|
+
return IncidentLiteResourceStaffToJSONTyped(json, false);
|
|
42
|
+
}
|
|
43
|
+
function IncidentLiteResourceStaffToJSONTyped(value, ignoreDiscriminator) {
|
|
44
|
+
if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; }
|
|
45
|
+
if (value == null) {
|
|
46
|
+
return value;
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
'name': value['name'],
|
|
50
|
+
};
|
|
51
|
+
}
|
|
@@ -61,8 +61,6 @@ function instanceOfRegisterListResource(value) {
|
|
|
61
61
|
return false;
|
|
62
62
|
if (!('signOnLong' in value) || value['signOnLong'] === undefined)
|
|
63
63
|
return false;
|
|
64
|
-
if (!('signOffLat' in value) || value['signOffLat'] === undefined)
|
|
65
|
-
return false;
|
|
66
64
|
if (!('incidents' in value) || value['incidents'] === undefined)
|
|
67
65
|
return false;
|
|
68
66
|
return true;
|
|
@@ -95,7 +93,7 @@ function RegisterListResourceFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
95
93
|
'firstAid': json['firstAid'],
|
|
96
94
|
'signOnLat': json['signOnLat'],
|
|
97
95
|
'signOnLong': json['signOnLong'],
|
|
98
|
-
'signOffLat': json['signOffLat'],
|
|
96
|
+
'signOffLat': json['signOffLat'] == null ? undefined : json['signOffLat'],
|
|
99
97
|
'signOffLong': json['signOffLong'] == null ? undefined : json['signOffLong'],
|
|
100
98
|
'incidents': (json['incidents'] == null ? null : json['incidents'].map(IncidentLiteResource_1.IncidentLiteResourceFromJSON)),
|
|
101
99
|
};
|
|
@@ -46,7 +46,7 @@ export interface RegisterResource {
|
|
|
46
46
|
* @type {Date}
|
|
47
47
|
* @memberof RegisterResource
|
|
48
48
|
*/
|
|
49
|
-
finishDateTime
|
|
49
|
+
finishDateTime?: Date | null;
|
|
50
50
|
/**
|
|
51
51
|
*
|
|
52
52
|
* @type {number}
|
|
@@ -106,13 +106,13 @@ export interface RegisterResource {
|
|
|
106
106
|
* @type {number}
|
|
107
107
|
* @memberof RegisterResource
|
|
108
108
|
*/
|
|
109
|
-
signOffLat
|
|
109
|
+
signOffLat: number;
|
|
110
110
|
/**
|
|
111
111
|
*
|
|
112
112
|
* @type {number}
|
|
113
113
|
* @memberof RegisterResource
|
|
114
114
|
*/
|
|
115
|
-
signOffLong
|
|
115
|
+
signOffLong: number;
|
|
116
116
|
/**
|
|
117
117
|
*
|
|
118
118
|
* @type {string}
|
|
@@ -30,8 +30,6 @@ function instanceOfRegisterResource(value) {
|
|
|
30
30
|
return false;
|
|
31
31
|
if (!('startDateTime' in value) || value['startDateTime'] === undefined)
|
|
32
32
|
return false;
|
|
33
|
-
if (!('finishDateTime' in value) || value['finishDateTime'] === undefined)
|
|
34
|
-
return false;
|
|
35
33
|
if (!('signOffStatus' in value) || value['signOffStatus'] === undefined)
|
|
36
34
|
return false;
|
|
37
35
|
if (!('signOnSignature' in value) || value['signOnSignature'] === undefined)
|
|
@@ -50,6 +48,10 @@ function instanceOfRegisterResource(value) {
|
|
|
50
48
|
return false;
|
|
51
49
|
if (!('signOnLong' in value) || value['signOnLong'] === undefined)
|
|
52
50
|
return false;
|
|
51
|
+
if (!('signOffLat' in value) || value['signOffLat'] === undefined)
|
|
52
|
+
return false;
|
|
53
|
+
if (!('signOffLong' in value) || value['signOffLong'] === undefined)
|
|
54
|
+
return false;
|
|
53
55
|
if (!('licenceNumber' in value) || value['licenceNumber'] === undefined)
|
|
54
56
|
return false;
|
|
55
57
|
if (!('licenceExpiry' in value) || value['licenceExpiry'] === undefined)
|
|
@@ -74,7 +76,7 @@ function RegisterResourceFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
74
76
|
'venue': (0, VenueLiteResource_1.VenueLiteResourceFromJSON)(json['venue']),
|
|
75
77
|
'user': (0, UserLiteResource_1.UserLiteResourceFromJSON)(json['user']),
|
|
76
78
|
'startDateTime': (new Date(json['startDateTime'])),
|
|
77
|
-
'finishDateTime': (new Date(json['finishDateTime'])),
|
|
79
|
+
'finishDateTime': json['finishDateTime'] == null ? undefined : (new Date(json['finishDateTime'])),
|
|
78
80
|
'signOffStatus': json['signOffStatus'],
|
|
79
81
|
'signOnSignature': json['signOnSignature'],
|
|
80
82
|
'signOffSignature': json['signOffSignature'],
|
|
@@ -84,8 +86,8 @@ function RegisterResourceFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
84
86
|
'firstAidImage': json['firstAidImage'],
|
|
85
87
|
'signOnLat': json['signOnLat'],
|
|
86
88
|
'signOnLong': json['signOnLong'],
|
|
87
|
-
'signOffLat': json['signOffLat']
|
|
88
|
-
'signOffLong': json['signOffLong']
|
|
89
|
+
'signOffLat': json['signOffLat'],
|
|
90
|
+
'signOffLong': json['signOffLong'],
|
|
89
91
|
'licenceNumber': json['licenceNumber'],
|
|
90
92
|
'licenceExpiry': json['licenceExpiry'],
|
|
91
93
|
'licenceFirstName': json['licenceFirstName'],
|
|
@@ -99,7 +101,7 @@ function RegisterResourceToJSON(json) {
|
|
|
99
101
|
return RegisterResourceToJSONTyped(json, false);
|
|
100
102
|
}
|
|
101
103
|
function RegisterResourceToJSONTyped(value, ignoreDiscriminator) {
|
|
102
|
-
var _a, _b;
|
|
104
|
+
var _a, _b, _c;
|
|
103
105
|
if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; }
|
|
104
106
|
if (value == null) {
|
|
105
107
|
return value;
|
|
@@ -109,7 +111,7 @@ function RegisterResourceToJSONTyped(value, ignoreDiscriminator) {
|
|
|
109
111
|
'venue': (0, VenueLiteResource_1.VenueLiteResourceToJSON)(value['venue']),
|
|
110
112
|
'user': (0, UserLiteResource_1.UserLiteResourceToJSON)(value['user']),
|
|
111
113
|
'startDateTime': ((value['startDateTime']).toISOString()),
|
|
112
|
-
'finishDateTime': ((value['finishDateTime']).toISOString()),
|
|
114
|
+
'finishDateTime': value['finishDateTime'] === null ? null : ((_a = value['finishDateTime']) === null || _a === void 0 ? void 0 : _a.toISOString()),
|
|
113
115
|
'signOffStatus': value['signOffStatus'],
|
|
114
116
|
'signOnSignature': value['signOnSignature'],
|
|
115
117
|
'signOffSignature': value['signOffSignature'],
|
|
@@ -126,7 +128,7 @@ function RegisterResourceToJSONTyped(value, ignoreDiscriminator) {
|
|
|
126
128
|
'licenceFirstName': value['licenceFirstName'],
|
|
127
129
|
'licenceLastName': value['licenceLastName'],
|
|
128
130
|
'badgeNumber': value['badgeNumber'],
|
|
129
|
-
'createdAt': value['createdAt'] === null ? null : ((
|
|
130
|
-
'updatedAt': value['updatedAt'] === null ? null : ((
|
|
131
|
+
'createdAt': value['createdAt'] === null ? null : ((_b = value['createdAt']) === null || _b === void 0 ? void 0 : _b.toISOString()),
|
|
132
|
+
'updatedAt': value['updatedAt'] === null ? null : ((_c = value['updatedAt']) === null || _c === void 0 ? void 0 : _c.toISOString()),
|
|
131
133
|
};
|
|
132
134
|
}
|
|
@@ -24,8 +24,6 @@ exports.RosterLiteResourceToJSONTyped = RosterLiteResourceToJSONTyped;
|
|
|
24
24
|
function instanceOfRosterLiteResource(value) {
|
|
25
25
|
if (!('startDateTime' in value) || value['startDateTime'] === undefined)
|
|
26
26
|
return false;
|
|
27
|
-
if (!('finishDateTime' in value) || value['finishDateTime'] === undefined)
|
|
28
|
-
return false;
|
|
29
27
|
return true;
|
|
30
28
|
}
|
|
31
29
|
function RosterLiteResourceFromJSON(json) {
|
|
@@ -38,13 +36,14 @@ function RosterLiteResourceFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
38
36
|
return {
|
|
39
37
|
'id': json['id'] == null ? undefined : json['id'],
|
|
40
38
|
'startDateTime': (new Date(json['startDateTime'])),
|
|
41
|
-
'finishDateTime': (new Date(json['finishDateTime'])),
|
|
39
|
+
'finishDateTime': json['finishDateTime'] == null ? undefined : (new Date(json['finishDateTime'])),
|
|
42
40
|
};
|
|
43
41
|
}
|
|
44
42
|
function RosterLiteResourceToJSON(json) {
|
|
45
43
|
return RosterLiteResourceToJSONTyped(json, false);
|
|
46
44
|
}
|
|
47
45
|
function RosterLiteResourceToJSONTyped(value, ignoreDiscriminator) {
|
|
46
|
+
var _a;
|
|
48
47
|
if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; }
|
|
49
48
|
if (value == null) {
|
|
50
49
|
return value;
|
|
@@ -52,6 +51,6 @@ function RosterLiteResourceToJSONTyped(value, ignoreDiscriminator) {
|
|
|
52
51
|
return {
|
|
53
52
|
'id': value['id'],
|
|
54
53
|
'startDateTime': ((value['startDateTime']).toISOString()),
|
|
55
|
-
'finishDateTime': ((value['finishDateTime']).toISOString()),
|
|
54
|
+
'finishDateTime': value['finishDateTime'] === null ? null : ((_a = value['finishDateTime']) === null || _a === void 0 ? void 0 : _a.toISOString()),
|
|
56
55
|
};
|
|
57
56
|
}
|
|
@@ -25,6 +25,8 @@ var AddressResource_1 = require("./AddressResource");
|
|
|
25
25
|
function instanceOfSecurityCompanyResource(value) {
|
|
26
26
|
if (!('name' in value) || value['name'] === undefined)
|
|
27
27
|
return false;
|
|
28
|
+
if (!('email' in value) || value['email'] === undefined)
|
|
29
|
+
return false;
|
|
28
30
|
if (!('isEnabled' in value) || value['isEnabled'] === undefined)
|
|
29
31
|
return false;
|
|
30
32
|
if (!('address' in value) || value['address'] === undefined)
|
|
@@ -43,7 +45,7 @@ function SecurityCompanyResourceFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
43
45
|
return {
|
|
44
46
|
'id': json['id'] == null ? undefined : json['id'],
|
|
45
47
|
'name': json['name'],
|
|
46
|
-
'email': json['email']
|
|
48
|
+
'email': json['email'],
|
|
47
49
|
'isEnabled': json['isEnabled'],
|
|
48
50
|
'address': (0, AddressResource_1.AddressResourceFromJSON)(json['address']),
|
|
49
51
|
'licenceNumber': json['licenceNumber'],
|
package/dist/models/index.d.ts
CHANGED
|
@@ -19,6 +19,7 @@ export * from './IncidentImageResource';
|
|
|
19
19
|
export * from './IncidentImageResourceArrayResponse';
|
|
20
20
|
export * from './IncidentLiteResource';
|
|
21
21
|
export * from './IncidentLiteResourceArrayResponse';
|
|
22
|
+
export * from './IncidentLiteResourceStaff';
|
|
22
23
|
export * from './IncidentResource';
|
|
23
24
|
export * from './IncidentResourceArrayResponse';
|
|
24
25
|
export * from './IncidentVersionResource';
|
package/dist/models/index.js
CHANGED
|
@@ -37,6 +37,7 @@ __exportStar(require("./IncidentImageResource"), exports);
|
|
|
37
37
|
__exportStar(require("./IncidentImageResourceArrayResponse"), exports);
|
|
38
38
|
__exportStar(require("./IncidentLiteResource"), exports);
|
|
39
39
|
__exportStar(require("./IncidentLiteResourceArrayResponse"), exports);
|
|
40
|
+
__exportStar(require("./IncidentLiteResourceStaff"), exports);
|
|
40
41
|
__exportStar(require("./IncidentResource"), exports);
|
|
41
42
|
__exportStar(require("./IncidentResourceArrayResponse"), exports);
|
|
42
43
|
__exportStar(require("./IncidentVersionResource"), exports);
|
package/package.json
CHANGED
|
@@ -36,7 +36,7 @@ export interface AddressResource {
|
|
|
36
36
|
* @type {string}
|
|
37
37
|
* @memberof AddressResource
|
|
38
38
|
*/
|
|
39
|
-
addressLine2
|
|
39
|
+
addressLine2: string;
|
|
40
40
|
/**
|
|
41
41
|
*
|
|
42
42
|
* @type {string}
|
|
@@ -80,6 +80,7 @@ export interface AddressResource {
|
|
|
80
80
|
*/
|
|
81
81
|
export function instanceOfAddressResource(value: object): value is AddressResource {
|
|
82
82
|
if (!('addressLine1' in value) || value['addressLine1'] === undefined) return false;
|
|
83
|
+
if (!('addressLine2' in value) || value['addressLine2'] === undefined) return false;
|
|
83
84
|
if (!('suburb' in value) || value['suburb'] === undefined) return false;
|
|
84
85
|
if (!('city' in value) || value['city'] === undefined) return false;
|
|
85
86
|
if (!('state' in value) || value['state'] === undefined) return false;
|
|
@@ -101,7 +102,7 @@ export function AddressResourceFromJSONTyped(json: any, ignoreDiscriminator: boo
|
|
|
101
102
|
|
|
102
103
|
'id': json['id'] == null ? undefined : json['id'],
|
|
103
104
|
'addressLine1': json['addressLine1'],
|
|
104
|
-
'addressLine2': json['addressLine2']
|
|
105
|
+
'addressLine2': json['addressLine2'],
|
|
105
106
|
'suburb': json['suburb'],
|
|
106
107
|
'city': json['city'],
|
|
107
108
|
'state': json['state'],
|
|
@@ -13,6 +13,14 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { mapValues } from '../runtime';
|
|
16
|
+
import type { IncidentLiteResourceStaff } from './IncidentLiteResourceStaff';
|
|
17
|
+
import {
|
|
18
|
+
IncidentLiteResourceStaffFromJSON,
|
|
19
|
+
IncidentLiteResourceStaffFromJSONTyped,
|
|
20
|
+
IncidentLiteResourceStaffToJSON,
|
|
21
|
+
IncidentLiteResourceStaffToJSONTyped,
|
|
22
|
+
} from './IncidentLiteResourceStaff';
|
|
23
|
+
|
|
16
24
|
/**
|
|
17
25
|
*
|
|
18
26
|
* @export
|
|
@@ -25,6 +33,42 @@ export interface IncidentLiteResource {
|
|
|
25
33
|
* @memberof IncidentLiteResource
|
|
26
34
|
*/
|
|
27
35
|
id: number;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof IncidentLiteResource
|
|
40
|
+
*/
|
|
41
|
+
title?: string | null;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof IncidentLiteResource
|
|
46
|
+
*/
|
|
47
|
+
manager?: string | null;
|
|
48
|
+
/**
|
|
49
|
+
*
|
|
50
|
+
* @type {Date}
|
|
51
|
+
* @memberof IncidentLiteResource
|
|
52
|
+
*/
|
|
53
|
+
date?: Date | null;
|
|
54
|
+
/**
|
|
55
|
+
*
|
|
56
|
+
* @type {string}
|
|
57
|
+
* @memberof IncidentLiteResource
|
|
58
|
+
*/
|
|
59
|
+
startTime?: string | null;
|
|
60
|
+
/**
|
|
61
|
+
*
|
|
62
|
+
* @type {IncidentLiteResourceStaff}
|
|
63
|
+
* @memberof IncidentLiteResource
|
|
64
|
+
*/
|
|
65
|
+
staff?: IncidentLiteResourceStaff | null;
|
|
66
|
+
/**
|
|
67
|
+
*
|
|
68
|
+
* @type {Date}
|
|
69
|
+
* @memberof IncidentLiteResource
|
|
70
|
+
*/
|
|
71
|
+
lastUpdated?: Date | null;
|
|
28
72
|
/**
|
|
29
73
|
*
|
|
30
74
|
* @type {Date}
|
|
@@ -52,6 +96,12 @@ export function IncidentLiteResourceFromJSONTyped(json: any, ignoreDiscriminator
|
|
|
52
96
|
return {
|
|
53
97
|
|
|
54
98
|
'id': json['id'],
|
|
99
|
+
'title': json['title'] == null ? undefined : json['title'],
|
|
100
|
+
'manager': json['manager'] == null ? undefined : json['manager'],
|
|
101
|
+
'date': json['date'] == null ? undefined : (new Date(json['date'])),
|
|
102
|
+
'startTime': json['startTime'] == null ? undefined : json['startTime'],
|
|
103
|
+
'staff': json['staff'] == null ? undefined : IncidentLiteResourceStaffFromJSON(json['staff']),
|
|
104
|
+
'lastUpdated': json['lastUpdated'] == null ? undefined : (new Date(json['lastUpdated'])),
|
|
55
105
|
'approvedAt': json['approvedAt'] == null ? undefined : (new Date(json['approvedAt'])),
|
|
56
106
|
};
|
|
57
107
|
}
|
|
@@ -68,6 +118,12 @@ export function IncidentLiteResourceToJSONTyped(value?: IncidentLiteResource | n
|
|
|
68
118
|
return {
|
|
69
119
|
|
|
70
120
|
'id': value['id'],
|
|
121
|
+
'title': value['title'],
|
|
122
|
+
'manager': value['manager'],
|
|
123
|
+
'date': value['date'] === null ? null : ((value['date'] as any)?.toISOString().substring(0,10)),
|
|
124
|
+
'startTime': value['startTime'],
|
|
125
|
+
'staff': IncidentLiteResourceStaffToJSON(value['staff']),
|
|
126
|
+
'lastUpdated': value['lastUpdated'] === null ? null : ((value['lastUpdated'] as any)?.toISOString()),
|
|
71
127
|
'approvedAt': value['approvedAt'] === null ? null : ((value['approvedAt'] as any)?.toISOString()),
|
|
72
128
|
};
|
|
73
129
|
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* My API
|
|
5
|
+
* API documentation for my Laravel app
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.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
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface IncidentLiteResourceStaff
|
|
20
|
+
*/
|
|
21
|
+
export interface IncidentLiteResourceStaff {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof IncidentLiteResourceStaff
|
|
26
|
+
*/
|
|
27
|
+
name: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Check if a given object implements the IncidentLiteResourceStaff interface.
|
|
32
|
+
*/
|
|
33
|
+
export function instanceOfIncidentLiteResourceStaff(value: object): value is IncidentLiteResourceStaff {
|
|
34
|
+
if (!('name' in value) || value['name'] === undefined) return false;
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function IncidentLiteResourceStaffFromJSON(json: any): IncidentLiteResourceStaff {
|
|
39
|
+
return IncidentLiteResourceStaffFromJSONTyped(json, false);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function IncidentLiteResourceStaffFromJSONTyped(json: any, ignoreDiscriminator: boolean): IncidentLiteResourceStaff {
|
|
43
|
+
if (json == null) {
|
|
44
|
+
return json;
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
|
|
48
|
+
'name': json['name'],
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function IncidentLiteResourceStaffToJSON(json: any): IncidentLiteResourceStaff {
|
|
53
|
+
return IncidentLiteResourceStaffToJSONTyped(json, false);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function IncidentLiteResourceStaffToJSONTyped(value?: IncidentLiteResourceStaff | null, ignoreDiscriminator: boolean = false): any {
|
|
57
|
+
if (value == null) {
|
|
58
|
+
return value;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
return {
|
|
62
|
+
|
|
63
|
+
'name': value['name'],
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
|
|
@@ -166,7 +166,7 @@ export interface RegisterListResource {
|
|
|
166
166
|
* @type {number}
|
|
167
167
|
* @memberof RegisterListResource
|
|
168
168
|
*/
|
|
169
|
-
signOffLat
|
|
169
|
+
signOffLat?: number | null;
|
|
170
170
|
/**
|
|
171
171
|
*
|
|
172
172
|
* @type {number}
|
|
@@ -203,7 +203,6 @@ export function instanceOfRegisterListResource(value: object): value is Register
|
|
|
203
203
|
if (!('firstAid' in value) || value['firstAid'] === undefined) return false;
|
|
204
204
|
if (!('signOnLat' in value) || value['signOnLat'] === undefined) return false;
|
|
205
205
|
if (!('signOnLong' in value) || value['signOnLong'] === undefined) return false;
|
|
206
|
-
if (!('signOffLat' in value) || value['signOffLat'] === undefined) return false;
|
|
207
206
|
if (!('incidents' in value) || value['incidents'] === undefined) return false;
|
|
208
207
|
return true;
|
|
209
208
|
}
|
|
@@ -238,7 +237,7 @@ export function RegisterListResourceFromJSONTyped(json: any, ignoreDiscriminator
|
|
|
238
237
|
'firstAid': json['firstAid'],
|
|
239
238
|
'signOnLat': json['signOnLat'],
|
|
240
239
|
'signOnLong': json['signOnLong'],
|
|
241
|
-
'signOffLat': json['signOffLat'],
|
|
240
|
+
'signOffLat': json['signOffLat'] == null ? undefined : json['signOffLat'],
|
|
242
241
|
'signOffLong': json['signOffLong'] == null ? undefined : json['signOffLong'],
|
|
243
242
|
'incidents': (json['incidents'] == null ? null : (json['incidents'] as Array<any>).map(IncidentLiteResourceFromJSON)),
|
|
244
243
|
};
|
|
@@ -63,7 +63,7 @@ export interface RegisterResource {
|
|
|
63
63
|
* @type {Date}
|
|
64
64
|
* @memberof RegisterResource
|
|
65
65
|
*/
|
|
66
|
-
finishDateTime
|
|
66
|
+
finishDateTime?: Date | null;
|
|
67
67
|
/**
|
|
68
68
|
*
|
|
69
69
|
* @type {number}
|
|
@@ -123,13 +123,13 @@ export interface RegisterResource {
|
|
|
123
123
|
* @type {number}
|
|
124
124
|
* @memberof RegisterResource
|
|
125
125
|
*/
|
|
126
|
-
signOffLat
|
|
126
|
+
signOffLat: number;
|
|
127
127
|
/**
|
|
128
128
|
*
|
|
129
129
|
* @type {number}
|
|
130
130
|
* @memberof RegisterResource
|
|
131
131
|
*/
|
|
132
|
-
signOffLong
|
|
132
|
+
signOffLong: number;
|
|
133
133
|
/**
|
|
134
134
|
*
|
|
135
135
|
* @type {string}
|
|
@@ -181,7 +181,6 @@ export function instanceOfRegisterResource(value: object): value is RegisterReso
|
|
|
181
181
|
if (!('venue' in value) || value['venue'] === undefined) return false;
|
|
182
182
|
if (!('user' in value) || value['user'] === undefined) return false;
|
|
183
183
|
if (!('startDateTime' in value) || value['startDateTime'] === undefined) return false;
|
|
184
|
-
if (!('finishDateTime' in value) || value['finishDateTime'] === undefined) return false;
|
|
185
184
|
if (!('signOffStatus' in value) || value['signOffStatus'] === undefined) return false;
|
|
186
185
|
if (!('signOnSignature' in value) || value['signOnSignature'] === undefined) return false;
|
|
187
186
|
if (!('signOffSignature' in value) || value['signOffSignature'] === undefined) return false;
|
|
@@ -191,6 +190,8 @@ export function instanceOfRegisterResource(value: object): value is RegisterReso
|
|
|
191
190
|
if (!('firstAidImage' in value) || value['firstAidImage'] === undefined) return false;
|
|
192
191
|
if (!('signOnLat' in value) || value['signOnLat'] === undefined) return false;
|
|
193
192
|
if (!('signOnLong' in value) || value['signOnLong'] === undefined) return false;
|
|
193
|
+
if (!('signOffLat' in value) || value['signOffLat'] === undefined) return false;
|
|
194
|
+
if (!('signOffLong' in value) || value['signOffLong'] === undefined) return false;
|
|
194
195
|
if (!('licenceNumber' in value) || value['licenceNumber'] === undefined) return false;
|
|
195
196
|
if (!('licenceExpiry' in value) || value['licenceExpiry'] === undefined) return false;
|
|
196
197
|
if (!('licenceFirstName' in value) || value['licenceFirstName'] === undefined) return false;
|
|
@@ -213,7 +214,7 @@ export function RegisterResourceFromJSONTyped(json: any, ignoreDiscriminator: bo
|
|
|
213
214
|
'venue': VenueLiteResourceFromJSON(json['venue']),
|
|
214
215
|
'user': UserLiteResourceFromJSON(json['user']),
|
|
215
216
|
'startDateTime': (new Date(json['startDateTime'])),
|
|
216
|
-
'finishDateTime': (new Date(json['finishDateTime'])),
|
|
217
|
+
'finishDateTime': json['finishDateTime'] == null ? undefined : (new Date(json['finishDateTime'])),
|
|
217
218
|
'signOffStatus': json['signOffStatus'],
|
|
218
219
|
'signOnSignature': json['signOnSignature'],
|
|
219
220
|
'signOffSignature': json['signOffSignature'],
|
|
@@ -223,8 +224,8 @@ export function RegisterResourceFromJSONTyped(json: any, ignoreDiscriminator: bo
|
|
|
223
224
|
'firstAidImage': json['firstAidImage'],
|
|
224
225
|
'signOnLat': json['signOnLat'],
|
|
225
226
|
'signOnLong': json['signOnLong'],
|
|
226
|
-
'signOffLat': json['signOffLat']
|
|
227
|
-
'signOffLong': json['signOffLong']
|
|
227
|
+
'signOffLat': json['signOffLat'],
|
|
228
|
+
'signOffLong': json['signOffLong'],
|
|
228
229
|
'licenceNumber': json['licenceNumber'],
|
|
229
230
|
'licenceExpiry': json['licenceExpiry'],
|
|
230
231
|
'licenceFirstName': json['licenceFirstName'],
|
|
@@ -250,7 +251,7 @@ export function RegisterResourceToJSONTyped(value?: RegisterResource | null, ign
|
|
|
250
251
|
'venue': VenueLiteResourceToJSON(value['venue']),
|
|
251
252
|
'user': UserLiteResourceToJSON(value['user']),
|
|
252
253
|
'startDateTime': ((value['startDateTime']).toISOString()),
|
|
253
|
-
'finishDateTime': ((value['finishDateTime'])
|
|
254
|
+
'finishDateTime': value['finishDateTime'] === null ? null : ((value['finishDateTime'] as any)?.toISOString()),
|
|
254
255
|
'signOffStatus': value['signOffStatus'],
|
|
255
256
|
'signOnSignature': value['signOnSignature'],
|
|
256
257
|
'signOffSignature': value['signOffSignature'],
|
|
@@ -36,7 +36,7 @@ export interface RosterLiteResource {
|
|
|
36
36
|
* @type {Date}
|
|
37
37
|
* @memberof RosterLiteResource
|
|
38
38
|
*/
|
|
39
|
-
finishDateTime
|
|
39
|
+
finishDateTime?: Date | null;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
/**
|
|
@@ -44,7 +44,6 @@ export interface RosterLiteResource {
|
|
|
44
44
|
*/
|
|
45
45
|
export function instanceOfRosterLiteResource(value: object): value is RosterLiteResource {
|
|
46
46
|
if (!('startDateTime' in value) || value['startDateTime'] === undefined) return false;
|
|
47
|
-
if (!('finishDateTime' in value) || value['finishDateTime'] === undefined) return false;
|
|
48
47
|
return true;
|
|
49
48
|
}
|
|
50
49
|
|
|
@@ -60,7 +59,7 @@ export function RosterLiteResourceFromJSONTyped(json: any, ignoreDiscriminator:
|
|
|
60
59
|
|
|
61
60
|
'id': json['id'] == null ? undefined : json['id'],
|
|
62
61
|
'startDateTime': (new Date(json['startDateTime'])),
|
|
63
|
-
'finishDateTime': (new Date(json['finishDateTime'])),
|
|
62
|
+
'finishDateTime': json['finishDateTime'] == null ? undefined : (new Date(json['finishDateTime'])),
|
|
64
63
|
};
|
|
65
64
|
}
|
|
66
65
|
|
|
@@ -77,7 +76,7 @@ export function RosterLiteResourceToJSONTyped(value?: RosterLiteResource | null,
|
|
|
77
76
|
|
|
78
77
|
'id': value['id'],
|
|
79
78
|
'startDateTime': ((value['startDateTime']).toISOString()),
|
|
80
|
-
'finishDateTime': ((value['finishDateTime'])
|
|
79
|
+
'finishDateTime': value['finishDateTime'] === null ? null : ((value['finishDateTime'] as any)?.toISOString()),
|
|
81
80
|
};
|
|
82
81
|
}
|
|
83
82
|
|
|
@@ -44,7 +44,7 @@ export interface SecurityCompanyResource {
|
|
|
44
44
|
* @type {string}
|
|
45
45
|
* @memberof SecurityCompanyResource
|
|
46
46
|
*/
|
|
47
|
-
email
|
|
47
|
+
email: string;
|
|
48
48
|
/**
|
|
49
49
|
*
|
|
50
50
|
* @type {boolean}
|
|
@@ -82,6 +82,7 @@ export interface SecurityCompanyResource {
|
|
|
82
82
|
*/
|
|
83
83
|
export function instanceOfSecurityCompanyResource(value: object): value is SecurityCompanyResource {
|
|
84
84
|
if (!('name' in value) || value['name'] === undefined) return false;
|
|
85
|
+
if (!('email' in value) || value['email'] === undefined) return false;
|
|
85
86
|
if (!('isEnabled' in value) || value['isEnabled'] === undefined) return false;
|
|
86
87
|
if (!('address' in value) || value['address'] === undefined) return false;
|
|
87
88
|
if (!('licenceNumber' in value) || value['licenceNumber'] === undefined) return false;
|
|
@@ -100,7 +101,7 @@ export function SecurityCompanyResourceFromJSONTyped(json: any, ignoreDiscrimina
|
|
|
100
101
|
|
|
101
102
|
'id': json['id'] == null ? undefined : json['id'],
|
|
102
103
|
'name': json['name'],
|
|
103
|
-
'email': json['email']
|
|
104
|
+
'email': json['email'],
|
|
104
105
|
'isEnabled': json['isEnabled'],
|
|
105
106
|
'address': AddressResourceFromJSON(json['address']),
|
|
106
107
|
'licenceNumber': json['licenceNumber'],
|
package/src/models/index.ts
CHANGED
|
@@ -21,6 +21,7 @@ export * from './IncidentImageResource';
|
|
|
21
21
|
export * from './IncidentImageResourceArrayResponse';
|
|
22
22
|
export * from './IncidentLiteResource';
|
|
23
23
|
export * from './IncidentLiteResourceArrayResponse';
|
|
24
|
+
export * from './IncidentLiteResourceStaff';
|
|
24
25
|
export * from './IncidentResource';
|
|
25
26
|
export * from './IncidentResourceArrayResponse';
|
|
26
27
|
export * from './IncidentVersionResource';
|