@digital8/security-registers-backend-ts-sdk 0.0.490 → 0.0.492
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/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 +3 -1
- package/dist/models/RegisterResource.d.ts +1 -1
- package/dist/models/RegisterResource.js +1 -3
- package/dist/models/RosterListResource.d.ts +1 -1
- package/dist/models/RosterListResource.js +3 -4
- package/dist/models/RosterLiteResource.d.ts +1 -1
- package/dist/models/RosterLiteResource.js +4 -3
- package/package.json +1 -1
- package/src/models/AddressResource.ts +3 -2
- package/src/models/AssetResource.ts +3 -2
- package/src/models/RegisterResource.ts +2 -3
- package/src/models/RosterListResource.ts +3 -4
- package/src/models/RosterLiteResource.ts +4 -3
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.492
|
|
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.492 --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,6 +30,8 @@ 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;
|
|
33
35
|
if (!('index' in value) || value['index'] === undefined)
|
|
34
36
|
return false;
|
|
35
37
|
if (!('fileId' in value) || value['fileId'] === undefined)
|
|
@@ -50,7 +52,7 @@ function AssetResourceFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
50
52
|
'filePath': json['filePath'],
|
|
51
53
|
'fileName': json['fileName'],
|
|
52
54
|
'mimeType': json['mimeType'],
|
|
53
|
-
'altText': json['altText']
|
|
55
|
+
'altText': json['altText'],
|
|
54
56
|
'index': json['index'],
|
|
55
57
|
'fileId': json['fileId'],
|
|
56
58
|
'isExternal': json['isExternal'],
|
|
@@ -48,8 +48,6 @@ function instanceOfRegisterResource(value) {
|
|
|
48
48
|
return false;
|
|
49
49
|
if (!('signOnLong' in value) || value['signOnLong'] === undefined)
|
|
50
50
|
return false;
|
|
51
|
-
if (!('signOffLat' in value) || value['signOffLat'] === undefined)
|
|
52
|
-
return false;
|
|
53
51
|
if (!('licenceNumber' in value) || value['licenceNumber'] === undefined)
|
|
54
52
|
return false;
|
|
55
53
|
if (!('licenceExpiry' in value) || value['licenceExpiry'] === undefined)
|
|
@@ -84,7 +82,7 @@ function RegisterResourceFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
84
82
|
'firstAidImage': json['firstAidImage'],
|
|
85
83
|
'signOnLat': json['signOnLat'],
|
|
86
84
|
'signOnLong': json['signOnLong'],
|
|
87
|
-
'signOffLat': json['signOffLat'],
|
|
85
|
+
'signOffLat': json['signOffLat'] == null ? undefined : json['signOffLat'],
|
|
88
86
|
'signOffLong': json['signOffLong'] == null ? undefined : json['signOffLong'],
|
|
89
87
|
'licenceNumber': json['licenceNumber'],
|
|
90
88
|
'licenceExpiry': json['licenceExpiry'],
|
|
@@ -30,8 +30,6 @@ function instanceOfRosterListResource(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 (!('isCompliant' in value) || value['isCompliant'] === undefined)
|
|
36
34
|
return false;
|
|
37
35
|
if (!('isComplete' in value) || value['isComplete'] === undefined)
|
|
@@ -54,7 +52,7 @@ function RosterListResourceFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
54
52
|
'venue': (0, VenueLiteResource_1.VenueLiteResourceFromJSON)(json['venue']),
|
|
55
53
|
'securityCompany': (0, SecurityCompanyLiteResource_1.SecurityCompanyLiteResourceFromJSON)(json['securityCompany']),
|
|
56
54
|
'startDateTime': (new Date(json['startDateTime'])),
|
|
57
|
-
'finishDateTime': (new Date(json['finishDateTime'])),
|
|
55
|
+
'finishDateTime': json['finishDateTime'] == null ? undefined : (new Date(json['finishDateTime'])),
|
|
58
56
|
'isCompliant': json['isCompliant'],
|
|
59
57
|
'isComplete': json['isComplete'],
|
|
60
58
|
'signOffStatus': json['signOffStatus'],
|
|
@@ -65,6 +63,7 @@ function RosterListResourceToJSON(json) {
|
|
|
65
63
|
return RosterListResourceToJSONTyped(json, false);
|
|
66
64
|
}
|
|
67
65
|
function RosterListResourceToJSONTyped(value, ignoreDiscriminator) {
|
|
66
|
+
var _a;
|
|
68
67
|
if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; }
|
|
69
68
|
if (value == null) {
|
|
70
69
|
return value;
|
|
@@ -74,7 +73,7 @@ function RosterListResourceToJSONTyped(value, ignoreDiscriminator) {
|
|
|
74
73
|
'venue': (0, VenueLiteResource_1.VenueLiteResourceToJSON)(value['venue']),
|
|
75
74
|
'securityCompany': (0, SecurityCompanyLiteResource_1.SecurityCompanyLiteResourceToJSON)(value['securityCompany']),
|
|
76
75
|
'startDateTime': ((value['startDateTime']).toISOString()),
|
|
77
|
-
'finishDateTime': ((value['finishDateTime']).toISOString()),
|
|
76
|
+
'finishDateTime': value['finishDateTime'] === null ? null : ((_a = value['finishDateTime']) === null || _a === void 0 ? void 0 : _a.toISOString()),
|
|
78
77
|
'isCompliant': value['isCompliant'],
|
|
79
78
|
'isComplete': value['isComplete'],
|
|
80
79
|
'signOffStatus': value['signOffStatus'],
|
|
@@ -24,6 +24,8 @@ 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;
|
|
27
29
|
return true;
|
|
28
30
|
}
|
|
29
31
|
function RosterLiteResourceFromJSON(json) {
|
|
@@ -36,14 +38,13 @@ function RosterLiteResourceFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
36
38
|
return {
|
|
37
39
|
'id': json['id'] == null ? undefined : json['id'],
|
|
38
40
|
'startDateTime': (new Date(json['startDateTime'])),
|
|
39
|
-
'finishDateTime':
|
|
41
|
+
'finishDateTime': (new Date(json['finishDateTime'])),
|
|
40
42
|
};
|
|
41
43
|
}
|
|
42
44
|
function RosterLiteResourceToJSON(json) {
|
|
43
45
|
return RosterLiteResourceToJSONTyped(json, false);
|
|
44
46
|
}
|
|
45
47
|
function RosterLiteResourceToJSONTyped(value, ignoreDiscriminator) {
|
|
46
|
-
var _a;
|
|
47
48
|
if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; }
|
|
48
49
|
if (value == null) {
|
|
49
50
|
return value;
|
|
@@ -51,6 +52,6 @@ function RosterLiteResourceToJSONTyped(value, ignoreDiscriminator) {
|
|
|
51
52
|
return {
|
|
52
53
|
'id': value['id'],
|
|
53
54
|
'startDateTime': ((value['startDateTime']).toISOString()),
|
|
54
|
-
'finishDateTime':
|
|
55
|
+
'finishDateTime': ((value['finishDateTime']).toISOString()),
|
|
55
56
|
};
|
|
56
57
|
}
|
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'],
|
|
@@ -48,7 +48,7 @@ export interface AssetResource {
|
|
|
48
48
|
* @type {string}
|
|
49
49
|
* @memberof AssetResource
|
|
50
50
|
*/
|
|
51
|
-
altText
|
|
51
|
+
altText: string;
|
|
52
52
|
/**
|
|
53
53
|
*
|
|
54
54
|
* @type {number}
|
|
@@ -83,6 +83,7 @@ export function instanceOfAssetResource(value: object): value is AssetResource {
|
|
|
83
83
|
if (!('filePath' in value) || value['filePath'] === undefined) return false;
|
|
84
84
|
if (!('fileName' in value) || value['fileName'] === undefined) return false;
|
|
85
85
|
if (!('mimeType' in value) || value['mimeType'] === undefined) return false;
|
|
86
|
+
if (!('altText' in value) || value['altText'] === undefined) return false;
|
|
86
87
|
if (!('index' in value) || value['index'] === undefined) return false;
|
|
87
88
|
if (!('fileId' in value) || value['fileId'] === undefined) return false;
|
|
88
89
|
if (!('isExternal' in value) || value['isExternal'] === undefined) return false;
|
|
@@ -103,7 +104,7 @@ export function AssetResourceFromJSONTyped(json: any, ignoreDiscriminator: boole
|
|
|
103
104
|
'filePath': json['filePath'],
|
|
104
105
|
'fileName': json['fileName'],
|
|
105
106
|
'mimeType': json['mimeType'],
|
|
106
|
-
'altText': json['altText']
|
|
107
|
+
'altText': json['altText'],
|
|
107
108
|
'index': json['index'],
|
|
108
109
|
'fileId': json['fileId'],
|
|
109
110
|
'isExternal': json['isExternal'],
|
|
@@ -123,7 +123,7 @@ export interface RegisterResource {
|
|
|
123
123
|
* @type {number}
|
|
124
124
|
* @memberof RegisterResource
|
|
125
125
|
*/
|
|
126
|
-
signOffLat
|
|
126
|
+
signOffLat?: number | null;
|
|
127
127
|
/**
|
|
128
128
|
*
|
|
129
129
|
* @type {number}
|
|
@@ -196,7 +196,6 @@ export function instanceOfRegisterResource(value: object): value is RegisterReso
|
|
|
196
196
|
if (!('firstAidImage' in value) || value['firstAidImage'] === undefined) return false;
|
|
197
197
|
if (!('signOnLat' in value) || value['signOnLat'] === undefined) return false;
|
|
198
198
|
if (!('signOnLong' in value) || value['signOnLong'] === undefined) return false;
|
|
199
|
-
if (!('signOffLat' in value) || value['signOffLat'] === undefined) return false;
|
|
200
199
|
if (!('licenceNumber' in value) || value['licenceNumber'] === undefined) return false;
|
|
201
200
|
if (!('licenceExpiry' in value) || value['licenceExpiry'] === undefined) return false;
|
|
202
201
|
if (!('licenceFirstName' in value) || value['licenceFirstName'] === undefined) return false;
|
|
@@ -229,7 +228,7 @@ export function RegisterResourceFromJSONTyped(json: any, ignoreDiscriminator: bo
|
|
|
229
228
|
'firstAidImage': json['firstAidImage'],
|
|
230
229
|
'signOnLat': json['signOnLat'],
|
|
231
230
|
'signOnLong': json['signOnLong'],
|
|
232
|
-
'signOffLat': json['signOffLat'],
|
|
231
|
+
'signOffLat': json['signOffLat'] == null ? undefined : json['signOffLat'],
|
|
233
232
|
'signOffLong': json['signOffLong'] == null ? undefined : json['signOffLong'],
|
|
234
233
|
'licenceNumber': json['licenceNumber'],
|
|
235
234
|
'licenceExpiry': json['licenceExpiry'],
|
|
@@ -63,7 +63,7 @@ export interface RosterListResource {
|
|
|
63
63
|
* @type {Date}
|
|
64
64
|
* @memberof RosterListResource
|
|
65
65
|
*/
|
|
66
|
-
finishDateTime
|
|
66
|
+
finishDateTime?: Date | null;
|
|
67
67
|
/**
|
|
68
68
|
*
|
|
69
69
|
* @type {boolean}
|
|
@@ -97,7 +97,6 @@ export function instanceOfRosterListResource(value: object): value is RosterList
|
|
|
97
97
|
if (!('venue' in value) || value['venue'] === undefined) return false;
|
|
98
98
|
if (!('securityCompany' in value) || value['securityCompany'] === undefined) return false;
|
|
99
99
|
if (!('startDateTime' in value) || value['startDateTime'] === undefined) return false;
|
|
100
|
-
if (!('finishDateTime' in value) || value['finishDateTime'] === undefined) return false;
|
|
101
100
|
if (!('isCompliant' in value) || value['isCompliant'] === undefined) return false;
|
|
102
101
|
if (!('isComplete' in value) || value['isComplete'] === undefined) return false;
|
|
103
102
|
if (!('signOffStatus' in value) || value['signOffStatus'] === undefined) return false;
|
|
@@ -119,7 +118,7 @@ export function RosterListResourceFromJSONTyped(json: any, ignoreDiscriminator:
|
|
|
119
118
|
'venue': VenueLiteResourceFromJSON(json['venue']),
|
|
120
119
|
'securityCompany': SecurityCompanyLiteResourceFromJSON(json['securityCompany']),
|
|
121
120
|
'startDateTime': (new Date(json['startDateTime'])),
|
|
122
|
-
'finishDateTime': (new Date(json['finishDateTime'])),
|
|
121
|
+
'finishDateTime': json['finishDateTime'] == null ? undefined : (new Date(json['finishDateTime'])),
|
|
123
122
|
'isCompliant': json['isCompliant'],
|
|
124
123
|
'isComplete': json['isComplete'],
|
|
125
124
|
'signOffStatus': json['signOffStatus'],
|
|
@@ -142,7 +141,7 @@ export function RosterListResourceToJSONTyped(value?: RosterListResource | null,
|
|
|
142
141
|
'venue': VenueLiteResourceToJSON(value['venue']),
|
|
143
142
|
'securityCompany': SecurityCompanyLiteResourceToJSON(value['securityCompany']),
|
|
144
143
|
'startDateTime': ((value['startDateTime']).toISOString()),
|
|
145
|
-
'finishDateTime': ((value['finishDateTime'])
|
|
144
|
+
'finishDateTime': value['finishDateTime'] === null ? null : ((value['finishDateTime'] as any)?.toISOString()),
|
|
146
145
|
'isCompliant': value['isCompliant'],
|
|
147
146
|
'isComplete': value['isComplete'],
|
|
148
147
|
'signOffStatus': value['signOffStatus'],
|
|
@@ -36,7 +36,7 @@ export interface RosterLiteResource {
|
|
|
36
36
|
* @type {Date}
|
|
37
37
|
* @memberof RosterLiteResource
|
|
38
38
|
*/
|
|
39
|
-
finishDateTime
|
|
39
|
+
finishDateTime: Date;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
/**
|
|
@@ -44,6 +44,7 @@ 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;
|
|
47
48
|
return true;
|
|
48
49
|
}
|
|
49
50
|
|
|
@@ -59,7 +60,7 @@ export function RosterLiteResourceFromJSONTyped(json: any, ignoreDiscriminator:
|
|
|
59
60
|
|
|
60
61
|
'id': json['id'] == null ? undefined : json['id'],
|
|
61
62
|
'startDateTime': (new Date(json['startDateTime'])),
|
|
62
|
-
'finishDateTime':
|
|
63
|
+
'finishDateTime': (new Date(json['finishDateTime'])),
|
|
63
64
|
};
|
|
64
65
|
}
|
|
65
66
|
|
|
@@ -76,7 +77,7 @@ export function RosterLiteResourceToJSONTyped(value?: RosterLiteResource | null,
|
|
|
76
77
|
|
|
77
78
|
'id': value['id'],
|
|
78
79
|
'startDateTime': ((value['startDateTime']).toISOString()),
|
|
79
|
-
'finishDateTime':
|
|
80
|
+
'finishDateTime': ((value['finishDateTime']).toISOString()),
|
|
80
81
|
};
|
|
81
82
|
}
|
|
82
83
|
|