@digital8/security-registers-backend-ts-sdk 0.0.229 → 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 +3 -0
- package/README.md +2 -2
- package/dist/models/AddressResource.d.ts +1 -1
- package/dist/models/AddressResource.js +3 -1
- package/dist/models/AssetResource.d.ts +1 -1
- package/dist/models/AssetResource.js +1 -3
- package/dist/models/IncidentImageResource.d.ts +1 -1
- package/dist/models/IncidentImageResource.js +3 -1
- package/dist/models/IncidentLiteResource.d.ts +75 -0
- package/dist/models/IncidentLiteResource.js +67 -0
- package/dist/models/IncidentLiteResourceArrayResponse.d.ts +33 -0
- package/dist/models/IncidentLiteResourceArrayResponse.js +50 -0
- package/dist/models/IncidentLiteResourceStaff.d.ts +32 -0
- package/dist/models/IncidentLiteResourceStaff.js +51 -0
- package/dist/models/RegisterGroupedByRosterResource.d.ts +1 -1
- package/dist/models/RegisterGroupedByRosterResource.js +3 -4
- package/dist/models/RegisterListResource.d.ts +5 -4
- package/dist/models/RegisterListResource.js +5 -8
- package/dist/models/RegisterResource.d.ts +3 -3
- package/dist/models/RegisterResource.js +11 -9
- package/dist/models/RosterListResource.d.ts +1 -1
- package/dist/models/RosterListResource.js +4 -3
- package/dist/models/RosterResource.d.ts +1 -1
- package/dist/models/RosterResource.js +3 -4
- package/dist/models/RosterWithRegistersResource.d.ts +1 -1
- package/dist/models/RosterWithRegistersResource.js +3 -4
- package/dist/models/SecurityCompanyResource.d.ts +1 -1
- package/dist/models/SecurityCompanyResource.js +3 -1
- package/dist/models/index.d.ts +3 -0
- package/dist/models/index.js +3 -0
- package/package.json +1 -1
- package/src/models/AddressResource.ts +3 -2
- package/src/models/AssetResource.ts +2 -3
- package/src/models/IncidentImageResource.ts +3 -2
- package/src/models/IncidentLiteResource.ts +130 -0
- package/src/models/IncidentLiteResourceArrayResponse.ts +73 -0
- package/src/models/IncidentLiteResourceStaff.ts +66 -0
- package/src/models/RegisterGroupedByRosterResource.ts +3 -4
- package/src/models/RegisterListResource.ts +15 -10
- package/src/models/RegisterResource.ts +9 -8
- package/src/models/RosterListResource.ts +4 -3
- package/src/models/RosterResource.ts +3 -4
- package/src/models/RosterWithRegistersResource.ts +3 -4
- package/src/models/SecurityCompanyResource.ts +3 -2
- package/src/models/index.ts +3 -0
package/.openapi-generator/FILES
CHANGED
|
@@ -25,6 +25,9 @@ src/models/IncidentFieldSchemasShowRequest.ts
|
|
|
25
25
|
src/models/IncidentFieldsResourceArrayResponse.ts
|
|
26
26
|
src/models/IncidentImageResource.ts
|
|
27
27
|
src/models/IncidentImageResourceArrayResponse.ts
|
|
28
|
+
src/models/IncidentLiteResource.ts
|
|
29
|
+
src/models/IncidentLiteResourceArrayResponse.ts
|
|
30
|
+
src/models/IncidentLiteResourceStaff.ts
|
|
28
31
|
src/models/IncidentResource.ts
|
|
29
32
|
src/models/IncidentResourceArrayResponse.ts
|
|
30
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'],
|
|
@@ -30,8 +30,6 @@ function instanceOfAssetResource(value) {
|
|
|
30
30
|
return false;
|
|
31
31
|
if (!('mimeType' in value) || value['mimeType'] === undefined)
|
|
32
32
|
return false;
|
|
33
|
-
if (!('altText' in value) || value['altText'] === undefined)
|
|
34
|
-
return false;
|
|
35
33
|
if (!('index' in value) || value['index'] === undefined)
|
|
36
34
|
return false;
|
|
37
35
|
if (!('fileId' in value) || value['fileId'] === undefined)
|
|
@@ -50,7 +48,7 @@ function AssetResourceFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
50
48
|
'filePath': json['filePath'],
|
|
51
49
|
'fileName': json['fileName'],
|
|
52
50
|
'mimeType': json['mimeType'],
|
|
53
|
-
'altText': json['altText'],
|
|
51
|
+
'altText': json['altText'] == null ? undefined : json['altText'],
|
|
54
52
|
'index': json['index'],
|
|
55
53
|
'fileId': json['fileId'],
|
|
56
54
|
};
|
|
@@ -26,6 +26,8 @@ function instanceOfIncidentImageResource(value) {
|
|
|
26
26
|
return false;
|
|
27
27
|
if (!('mimeType' in value) || value['mimeType'] === undefined)
|
|
28
28
|
return false;
|
|
29
|
+
if (!('altText' in value) || value['altText'] === undefined)
|
|
30
|
+
return false;
|
|
29
31
|
if (!('assetId' in value) || value['assetId'] === undefined)
|
|
30
32
|
return false;
|
|
31
33
|
if (!('url' in value) || value['url'] === undefined)
|
|
@@ -42,7 +44,7 @@ function IncidentImageResourceFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
42
44
|
return {
|
|
43
45
|
'fileId': json['file_id'],
|
|
44
46
|
'mimeType': json['mime_type'],
|
|
45
|
-
'altText': json['alt_text']
|
|
47
|
+
'altText': json['alt_text'],
|
|
46
48
|
'assetId': json['asset_id'],
|
|
47
49
|
'url': json['url'],
|
|
48
50
|
};
|
|
@@ -0,0 +1,75 @@
|
|
|
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
|
+
import type { IncidentLiteResourceStaff } from './IncidentLiteResourceStaff';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface IncidentLiteResource
|
|
17
|
+
*/
|
|
18
|
+
export interface IncidentLiteResource {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {number}
|
|
22
|
+
* @memberof IncidentLiteResource
|
|
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;
|
|
61
|
+
/**
|
|
62
|
+
*
|
|
63
|
+
* @type {Date}
|
|
64
|
+
* @memberof IncidentLiteResource
|
|
65
|
+
*/
|
|
66
|
+
approvedAt?: Date | null;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Check if a given object implements the IncidentLiteResource interface.
|
|
70
|
+
*/
|
|
71
|
+
export declare function instanceOfIncidentLiteResource(value: object): value is IncidentLiteResource;
|
|
72
|
+
export declare function IncidentLiteResourceFromJSON(json: any): IncidentLiteResource;
|
|
73
|
+
export declare function IncidentLiteResourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): IncidentLiteResource;
|
|
74
|
+
export declare function IncidentLiteResourceToJSON(json: any): IncidentLiteResource;
|
|
75
|
+
export declare function IncidentLiteResourceToJSONTyped(value?: IncidentLiteResource | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,67 @@
|
|
|
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.instanceOfIncidentLiteResource = instanceOfIncidentLiteResource;
|
|
17
|
+
exports.IncidentLiteResourceFromJSON = IncidentLiteResourceFromJSON;
|
|
18
|
+
exports.IncidentLiteResourceFromJSONTyped = IncidentLiteResourceFromJSONTyped;
|
|
19
|
+
exports.IncidentLiteResourceToJSON = IncidentLiteResourceToJSON;
|
|
20
|
+
exports.IncidentLiteResourceToJSONTyped = IncidentLiteResourceToJSONTyped;
|
|
21
|
+
var IncidentLiteResourceStaff_1 = require("./IncidentLiteResourceStaff");
|
|
22
|
+
/**
|
|
23
|
+
* Check if a given object implements the IncidentLiteResource interface.
|
|
24
|
+
*/
|
|
25
|
+
function instanceOfIncidentLiteResource(value) {
|
|
26
|
+
if (!('id' in value) || value['id'] === undefined)
|
|
27
|
+
return false;
|
|
28
|
+
return true;
|
|
29
|
+
}
|
|
30
|
+
function IncidentLiteResourceFromJSON(json) {
|
|
31
|
+
return IncidentLiteResourceFromJSONTyped(json, false);
|
|
32
|
+
}
|
|
33
|
+
function IncidentLiteResourceFromJSONTyped(json, ignoreDiscriminator) {
|
|
34
|
+
if (json == null) {
|
|
35
|
+
return json;
|
|
36
|
+
}
|
|
37
|
+
return {
|
|
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'])),
|
|
45
|
+
'approvedAt': json['approvedAt'] == null ? undefined : (new Date(json['approvedAt'])),
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
function IncidentLiteResourceToJSON(json) {
|
|
49
|
+
return IncidentLiteResourceToJSONTyped(json, false);
|
|
50
|
+
}
|
|
51
|
+
function IncidentLiteResourceToJSONTyped(value, ignoreDiscriminator) {
|
|
52
|
+
var _a, _b, _c;
|
|
53
|
+
if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; }
|
|
54
|
+
if (value == null) {
|
|
55
|
+
return value;
|
|
56
|
+
}
|
|
57
|
+
return {
|
|
58
|
+
'id': value['id'],
|
|
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()),
|
|
66
|
+
};
|
|
67
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
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
|
+
import type { IncidentLiteResource } from './IncidentLiteResource';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface IncidentLiteResourceArrayResponse
|
|
17
|
+
*/
|
|
18
|
+
export interface IncidentLiteResourceArrayResponse {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {Array<IncidentLiteResource>}
|
|
22
|
+
* @memberof IncidentLiteResourceArrayResponse
|
|
23
|
+
*/
|
|
24
|
+
data?: Array<IncidentLiteResource>;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Check if a given object implements the IncidentLiteResourceArrayResponse interface.
|
|
28
|
+
*/
|
|
29
|
+
export declare function instanceOfIncidentLiteResourceArrayResponse(value: object): value is IncidentLiteResourceArrayResponse;
|
|
30
|
+
export declare function IncidentLiteResourceArrayResponseFromJSON(json: any): IncidentLiteResourceArrayResponse;
|
|
31
|
+
export declare function IncidentLiteResourceArrayResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): IncidentLiteResourceArrayResponse;
|
|
32
|
+
export declare function IncidentLiteResourceArrayResponseToJSON(json: any): IncidentLiteResourceArrayResponse;
|
|
33
|
+
export declare function IncidentLiteResourceArrayResponseToJSONTyped(value?: IncidentLiteResourceArrayResponse | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,50 @@
|
|
|
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.instanceOfIncidentLiteResourceArrayResponse = instanceOfIncidentLiteResourceArrayResponse;
|
|
17
|
+
exports.IncidentLiteResourceArrayResponseFromJSON = IncidentLiteResourceArrayResponseFromJSON;
|
|
18
|
+
exports.IncidentLiteResourceArrayResponseFromJSONTyped = IncidentLiteResourceArrayResponseFromJSONTyped;
|
|
19
|
+
exports.IncidentLiteResourceArrayResponseToJSON = IncidentLiteResourceArrayResponseToJSON;
|
|
20
|
+
exports.IncidentLiteResourceArrayResponseToJSONTyped = IncidentLiteResourceArrayResponseToJSONTyped;
|
|
21
|
+
var IncidentLiteResource_1 = require("./IncidentLiteResource");
|
|
22
|
+
/**
|
|
23
|
+
* Check if a given object implements the IncidentLiteResourceArrayResponse interface.
|
|
24
|
+
*/
|
|
25
|
+
function instanceOfIncidentLiteResourceArrayResponse(value) {
|
|
26
|
+
return true;
|
|
27
|
+
}
|
|
28
|
+
function IncidentLiteResourceArrayResponseFromJSON(json) {
|
|
29
|
+
return IncidentLiteResourceArrayResponseFromJSONTyped(json, false);
|
|
30
|
+
}
|
|
31
|
+
function IncidentLiteResourceArrayResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
32
|
+
if (json == null) {
|
|
33
|
+
return json;
|
|
34
|
+
}
|
|
35
|
+
return {
|
|
36
|
+
'data': json['data'] == null ? undefined : (json['data'].map(IncidentLiteResource_1.IncidentLiteResourceFromJSON)),
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
function IncidentLiteResourceArrayResponseToJSON(json) {
|
|
40
|
+
return IncidentLiteResourceArrayResponseToJSONTyped(json, false);
|
|
41
|
+
}
|
|
42
|
+
function IncidentLiteResourceArrayResponseToJSONTyped(value, ignoreDiscriminator) {
|
|
43
|
+
if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; }
|
|
44
|
+
if (value == null) {
|
|
45
|
+
return value;
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
'data': value['data'] == null ? undefined : (value['data'].map(IncidentLiteResource_1.IncidentLiteResourceToJSON)),
|
|
49
|
+
};
|
|
50
|
+
}
|
|
@@ -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
|
+
}
|
|
@@ -32,8 +32,6 @@ function instanceOfRegisterGroupedByRosterResource(value) {
|
|
|
32
32
|
return false;
|
|
33
33
|
if (!('startDateTime' in value) || value['startDateTime'] === undefined)
|
|
34
34
|
return false;
|
|
35
|
-
if (!('finishDateTime' in value) || value['finishDateTime'] === undefined)
|
|
36
|
-
return false;
|
|
37
35
|
if (!('registers' in value) || value['registers'] === undefined)
|
|
38
36
|
return false;
|
|
39
37
|
return true;
|
|
@@ -51,7 +49,7 @@ function RegisterGroupedByRosterResourceFromJSONTyped(json, ignoreDiscriminator)
|
|
|
51
49
|
'timezone': json['timezone'],
|
|
52
50
|
'state': json['state'],
|
|
53
51
|
'startDateTime': (new Date(json['startDateTime'])),
|
|
54
|
-
'finishDateTime': (new Date(json['finishDateTime'])),
|
|
52
|
+
'finishDateTime': json['finishDateTime'] == null ? undefined : (new Date(json['finishDateTime'])),
|
|
55
53
|
'registers': (json['registers'] == null ? null : json['registers'].map(RegisterListResource_1.RegisterListResourceFromJSON)),
|
|
56
54
|
};
|
|
57
55
|
}
|
|
@@ -59,6 +57,7 @@ function RegisterGroupedByRosterResourceToJSON(json) {
|
|
|
59
57
|
return RegisterGroupedByRosterResourceToJSONTyped(json, false);
|
|
60
58
|
}
|
|
61
59
|
function RegisterGroupedByRosterResourceToJSONTyped(value, ignoreDiscriminator) {
|
|
60
|
+
var _a;
|
|
62
61
|
if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; }
|
|
63
62
|
if (value == null) {
|
|
64
63
|
return value;
|
|
@@ -69,7 +68,7 @@ function RegisterGroupedByRosterResourceToJSONTyped(value, ignoreDiscriminator)
|
|
|
69
68
|
'timezone': value['timezone'],
|
|
70
69
|
'state': value['state'],
|
|
71
70
|
'startDateTime': ((value['startDateTime']).toISOString()),
|
|
72
|
-
'finishDateTime': ((value['finishDateTime']).toISOString()),
|
|
71
|
+
'finishDateTime': value['finishDateTime'] === null ? null : ((_a = value['finishDateTime']) === null || _a === void 0 ? void 0 : _a.toISOString()),
|
|
73
72
|
'registers': (value['registers'] == null ? null : value['registers'].map(RegisterListResource_1.RegisterListResourceToJSON)),
|
|
74
73
|
};
|
|
75
74
|
}
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
*/
|
|
12
12
|
import type { VenueLiteResource } from './VenueLiteResource';
|
|
13
13
|
import type { UserLiteResource } from './UserLiteResource';
|
|
14
|
+
import type { IncidentLiteResource } from './IncidentLiteResource';
|
|
14
15
|
/**
|
|
15
16
|
*
|
|
16
17
|
* @export
|
|
@@ -142,19 +143,19 @@ export interface RegisterListResource {
|
|
|
142
143
|
* @type {number}
|
|
143
144
|
* @memberof RegisterListResource
|
|
144
145
|
*/
|
|
145
|
-
signOffLat
|
|
146
|
+
signOffLat?: number | null;
|
|
146
147
|
/**
|
|
147
148
|
*
|
|
148
149
|
* @type {number}
|
|
149
150
|
* @memberof RegisterListResource
|
|
150
151
|
*/
|
|
151
|
-
signOffLong
|
|
152
|
+
signOffLong?: number | null;
|
|
152
153
|
/**
|
|
153
154
|
*
|
|
154
|
-
* @type {Array<
|
|
155
|
+
* @type {Array<IncidentLiteResource>}
|
|
155
156
|
* @memberof RegisterListResource
|
|
156
157
|
*/
|
|
157
|
-
incidents: Array<
|
|
158
|
+
incidents: Array<IncidentLiteResource> | null;
|
|
158
159
|
}
|
|
159
160
|
/**
|
|
160
161
|
* Check if a given object implements the RegisterListResource interface.
|
|
@@ -20,6 +20,7 @@ exports.RegisterListResourceToJSON = RegisterListResourceToJSON;
|
|
|
20
20
|
exports.RegisterListResourceToJSONTyped = RegisterListResourceToJSONTyped;
|
|
21
21
|
var VenueLiteResource_1 = require("./VenueLiteResource");
|
|
22
22
|
var UserLiteResource_1 = require("./UserLiteResource");
|
|
23
|
+
var IncidentLiteResource_1 = require("./IncidentLiteResource");
|
|
23
24
|
/**
|
|
24
25
|
* Check if a given object implements the RegisterListResource interface.
|
|
25
26
|
*/
|
|
@@ -60,10 +61,6 @@ function instanceOfRegisterListResource(value) {
|
|
|
60
61
|
return false;
|
|
61
62
|
if (!('signOnLong' in value) || value['signOnLong'] === undefined)
|
|
62
63
|
return false;
|
|
63
|
-
if (!('signOffLat' in value) || value['signOffLat'] === undefined)
|
|
64
|
-
return false;
|
|
65
|
-
if (!('signOffLong' in value) || value['signOffLong'] === undefined)
|
|
66
|
-
return false;
|
|
67
64
|
if (!('incidents' in value) || value['incidents'] === undefined)
|
|
68
65
|
return false;
|
|
69
66
|
return true;
|
|
@@ -96,9 +93,9 @@ function RegisterListResourceFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
96
93
|
'firstAid': json['firstAid'],
|
|
97
94
|
'signOnLat': json['signOnLat'],
|
|
98
95
|
'signOnLong': json['signOnLong'],
|
|
99
|
-
'signOffLat': json['signOffLat'],
|
|
100
|
-
'signOffLong': json['signOffLong'],
|
|
101
|
-
'incidents': json['incidents'],
|
|
96
|
+
'signOffLat': json['signOffLat'] == null ? undefined : json['signOffLat'],
|
|
97
|
+
'signOffLong': json['signOffLong'] == null ? undefined : json['signOffLong'],
|
|
98
|
+
'incidents': (json['incidents'] == null ? null : json['incidents'].map(IncidentLiteResource_1.IncidentLiteResourceFromJSON)),
|
|
102
99
|
};
|
|
103
100
|
}
|
|
104
101
|
function RegisterListResourceToJSON(json) {
|
|
@@ -132,6 +129,6 @@ function RegisterListResourceToJSONTyped(value, ignoreDiscriminator) {
|
|
|
132
129
|
'signOnLong': value['signOnLong'],
|
|
133
130
|
'signOffLat': value['signOffLat'],
|
|
134
131
|
'signOffLong': value['signOffLong'],
|
|
135
|
-
'incidents': value['incidents'],
|
|
132
|
+
'incidents': (value['incidents'] == null ? null : value['incidents'].map(IncidentLiteResource_1.IncidentLiteResourceToJSON)),
|
|
136
133
|
};
|
|
137
134
|
}
|
|
@@ -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,7 +106,7 @@ 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}
|
|
@@ -142,7 +142,7 @@ export interface RegisterResource {
|
|
|
142
142
|
* @type {string}
|
|
143
143
|
* @memberof RegisterResource
|
|
144
144
|
*/
|
|
145
|
-
badgeNumber
|
|
145
|
+
badgeNumber: string;
|
|
146
146
|
/**
|
|
147
147
|
*
|
|
148
148
|
* @type {Date}
|
|
@@ -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,8 @@ 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
53
|
if (!('signOffLong' in value) || value['signOffLong'] === undefined)
|
|
54
54
|
return false;
|
|
55
55
|
if (!('licenceNumber' in value) || value['licenceNumber'] === undefined)
|
|
@@ -60,6 +60,8 @@ function instanceOfRegisterResource(value) {
|
|
|
60
60
|
return false;
|
|
61
61
|
if (!('licenceLastName' in value) || value['licenceLastName'] === undefined)
|
|
62
62
|
return false;
|
|
63
|
+
if (!('badgeNumber' in value) || value['badgeNumber'] === undefined)
|
|
64
|
+
return false;
|
|
63
65
|
return true;
|
|
64
66
|
}
|
|
65
67
|
function RegisterResourceFromJSON(json) {
|
|
@@ -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,13 +86,13 @@ function RegisterResourceFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
84
86
|
'firstAidImage': json['firstAidImage'],
|
|
85
87
|
'signOnLat': json['signOnLat'],
|
|
86
88
|
'signOnLong': json['signOnLong'],
|
|
87
|
-
'signOffLat': json['signOffLat']
|
|
89
|
+
'signOffLat': json['signOffLat'],
|
|
88
90
|
'signOffLong': json['signOffLong'],
|
|
89
91
|
'licenceNumber': json['licenceNumber'],
|
|
90
92
|
'licenceExpiry': json['licenceExpiry'],
|
|
91
93
|
'licenceFirstName': json['licenceFirstName'],
|
|
92
94
|
'licenceLastName': json['licenceLastName'],
|
|
93
|
-
'badgeNumber': json['badgeNumber']
|
|
95
|
+
'badgeNumber': json['badgeNumber'],
|
|
94
96
|
'createdAt': json['createdAt'] == null ? undefined : (new Date(json['createdAt'])),
|
|
95
97
|
'updatedAt': json['updatedAt'] == null ? undefined : (new Date(json['updatedAt'])),
|
|
96
98
|
};
|
|
@@ -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
|
}
|