@digital8/security-registers-backend-ts-sdk 0.0.283 → 0.0.284
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 +4 -0
- package/README.md +2 -2
- package/dist/apis/GeneralApi.d.ts +12 -1
- package/dist/apis/GeneralApi.js +55 -0
- package/dist/models/AddressResource.d.ts +1 -1
- package/dist/models/AddressResource.js +1 -3
- package/dist/models/AssetLiteResource.d.ts +0 -12
- package/dist/models/AssetLiteResource.js +0 -6
- package/dist/models/AssetResource.d.ts +1 -13
- package/dist/models/AssetResource.js +1 -9
- package/dist/models/IncidentListResource.d.ts +101 -0
- package/dist/models/IncidentListResource.js +79 -0
- package/dist/models/IncidentListResourceArrayResponse.d.ts +33 -0
- package/dist/models/IncidentListResourceArrayResponse.js +50 -0
- package/dist/models/IncidentsListRequest.d.ts +151 -0
- package/dist/models/IncidentsListRequest.js +99 -0
- package/dist/models/PaginatedIncidentListResourceResponse.d.ts +40 -0
- package/dist/models/PaginatedIncidentListResourceResponse.js +57 -0
- package/dist/models/RegisterListResource.d.ts +2 -2
- package/dist/models/RegisterListResource.js +4 -4
- package/dist/models/RegisterResource.d.ts +3 -15
- package/dist/models/RegisterResource.js +4 -14
- package/dist/models/RosterListResource.d.ts +1 -1
- package/dist/models/RosterListResource.js +4 -3
- package/dist/models/RosterLiteResource.d.ts +1 -1
- package/dist/models/RosterLiteResource.js +4 -3
- package/dist/models/RosterResource.d.ts +1 -1
- package/dist/models/RosterResource.js +3 -4
- package/dist/models/SecurityCompanyResource.d.ts +1 -1
- package/dist/models/SecurityCompanyResource.js +3 -1
- package/dist/models/VenueLiteResource.d.ts +6 -0
- package/dist/models/VenueLiteResource.js +4 -0
- package/dist/models/index.d.ts +4 -0
- package/dist/models/index.js +4 -0
- package/package.json +1 -1
- package/src/apis/GeneralApi.ts +50 -0
- package/src/models/AddressResource.ts +2 -3
- package/src/models/AssetLiteResource.ts +0 -17
- package/src/models/AssetResource.ts +2 -20
- package/src/models/IncidentListResource.ts +177 -0
- package/src/models/IncidentListResourceArrayResponse.ts +73 -0
- package/src/models/IncidentsListRequest.ts +222 -0
- package/src/models/PaginatedIncidentListResourceResponse.ts +90 -0
- package/src/models/RegisterListResource.ts +5 -5
- package/src/models/RegisterResource.ts +7 -26
- package/src/models/RosterListResource.ts +4 -3
- package/src/models/RosterLiteResource.ts +4 -3
- package/src/models/RosterResource.ts +3 -4
- package/src/models/SecurityCompanyResource.ts +3 -2
- package/src/models/VenueLiteResource.ts +9 -0
- package/src/models/index.ts +4 -0
|
@@ -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'],
|
|
@@ -33,6 +33,12 @@ export interface VenueLiteResource {
|
|
|
33
33
|
* @memberof VenueLiteResource
|
|
34
34
|
*/
|
|
35
35
|
venueCode: string;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof VenueLiteResource
|
|
40
|
+
*/
|
|
41
|
+
timezone: string;
|
|
36
42
|
}
|
|
37
43
|
/**
|
|
38
44
|
* Check if a given object implements the VenueLiteResource interface.
|
|
@@ -26,6 +26,8 @@ function instanceOfVenueLiteResource(value) {
|
|
|
26
26
|
return false;
|
|
27
27
|
if (!('venueCode' in value) || value['venueCode'] === undefined)
|
|
28
28
|
return false;
|
|
29
|
+
if (!('timezone' in value) || value['timezone'] === undefined)
|
|
30
|
+
return false;
|
|
29
31
|
return true;
|
|
30
32
|
}
|
|
31
33
|
function VenueLiteResourceFromJSON(json) {
|
|
@@ -39,6 +41,7 @@ function VenueLiteResourceFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
39
41
|
'id': json['id'] == null ? undefined : json['id'],
|
|
40
42
|
'name': json['name'],
|
|
41
43
|
'venueCode': json['venueCode'],
|
|
44
|
+
'timezone': json['timezone'],
|
|
42
45
|
};
|
|
43
46
|
}
|
|
44
47
|
function VenueLiteResourceToJSON(json) {
|
|
@@ -53,5 +56,6 @@ function VenueLiteResourceToJSONTyped(value, ignoreDiscriminator) {
|
|
|
53
56
|
'id': value['id'],
|
|
54
57
|
'name': value['name'],
|
|
55
58
|
'venueCode': value['venueCode'],
|
|
59
|
+
'timezone': value['timezone'],
|
|
56
60
|
};
|
|
57
61
|
}
|
package/dist/models/index.d.ts
CHANGED
|
@@ -17,6 +17,8 @@ export * from './IncidentFieldSchemasShowRequest';
|
|
|
17
17
|
export * from './IncidentFieldsResourceArrayResponse';
|
|
18
18
|
export * from './IncidentImageResource';
|
|
19
19
|
export * from './IncidentImageResourceArrayResponse';
|
|
20
|
+
export * from './IncidentListResource';
|
|
21
|
+
export * from './IncidentListResourceArrayResponse';
|
|
20
22
|
export * from './IncidentLiteResource';
|
|
21
23
|
export * from './IncidentLiteResourceArrayResponse';
|
|
22
24
|
export * from './IncidentLiteResourceStaff';
|
|
@@ -31,6 +33,7 @@ export * from './IncidentVideoSignedUrlResourceArrayResponse';
|
|
|
31
33
|
export * from './IncidentVideoUploadTokenResource';
|
|
32
34
|
export * from './IncidentVideoUploadTokenResourceArrayResponse';
|
|
33
35
|
export * from './IncidentsApproveRequest';
|
|
36
|
+
export * from './IncidentsListRequest';
|
|
34
37
|
export * from './IncidentsStoreRequest';
|
|
35
38
|
export * from './IncidentsUpdateRequest';
|
|
36
39
|
export * from './IncidentsVideosStoreRequest';
|
|
@@ -54,6 +57,7 @@ export * from './NotificationPreferenceResourceArrayResponse';
|
|
|
54
57
|
export * from './NotificationPreferencesStoreRequest';
|
|
55
58
|
export * from './NotificationTypeResource';
|
|
56
59
|
export * from './NotificationTypeResourceArrayResponse';
|
|
60
|
+
export * from './PaginatedIncidentListResourceResponse';
|
|
57
61
|
export * from './PaginatedLicenceListResourceResponse';
|
|
58
62
|
export * from './PaginatedLicenceResourceResponse';
|
|
59
63
|
export * from './PaginatedRegisterGroupedByRosterResourceResponse';
|
package/dist/models/index.js
CHANGED
|
@@ -35,6 +35,8 @@ __exportStar(require("./IncidentFieldSchemasShowRequest"), exports);
|
|
|
35
35
|
__exportStar(require("./IncidentFieldsResourceArrayResponse"), exports);
|
|
36
36
|
__exportStar(require("./IncidentImageResource"), exports);
|
|
37
37
|
__exportStar(require("./IncidentImageResourceArrayResponse"), exports);
|
|
38
|
+
__exportStar(require("./IncidentListResource"), exports);
|
|
39
|
+
__exportStar(require("./IncidentListResourceArrayResponse"), exports);
|
|
38
40
|
__exportStar(require("./IncidentLiteResource"), exports);
|
|
39
41
|
__exportStar(require("./IncidentLiteResourceArrayResponse"), exports);
|
|
40
42
|
__exportStar(require("./IncidentLiteResourceStaff"), exports);
|
|
@@ -49,6 +51,7 @@ __exportStar(require("./IncidentVideoSignedUrlResourceArrayResponse"), exports);
|
|
|
49
51
|
__exportStar(require("./IncidentVideoUploadTokenResource"), exports);
|
|
50
52
|
__exportStar(require("./IncidentVideoUploadTokenResourceArrayResponse"), exports);
|
|
51
53
|
__exportStar(require("./IncidentsApproveRequest"), exports);
|
|
54
|
+
__exportStar(require("./IncidentsListRequest"), exports);
|
|
52
55
|
__exportStar(require("./IncidentsStoreRequest"), exports);
|
|
53
56
|
__exportStar(require("./IncidentsUpdateRequest"), exports);
|
|
54
57
|
__exportStar(require("./IncidentsVideosStoreRequest"), exports);
|
|
@@ -72,6 +75,7 @@ __exportStar(require("./NotificationPreferenceResourceArrayResponse"), exports);
|
|
|
72
75
|
__exportStar(require("./NotificationPreferencesStoreRequest"), exports);
|
|
73
76
|
__exportStar(require("./NotificationTypeResource"), exports);
|
|
74
77
|
__exportStar(require("./NotificationTypeResourceArrayResponse"), exports);
|
|
78
|
+
__exportStar(require("./PaginatedIncidentListResourceResponse"), exports);
|
|
75
79
|
__exportStar(require("./PaginatedLicenceListResourceResponse"), exports);
|
|
76
80
|
__exportStar(require("./PaginatedLicenceResourceResponse"), exports);
|
|
77
81
|
__exportStar(require("./PaginatedRegisterGroupedByRosterResourceResponse"), exports);
|
package/package.json
CHANGED
package/src/apis/GeneralApi.ts
CHANGED
|
@@ -26,6 +26,7 @@ import type {
|
|
|
26
26
|
IncidentVideoSignedUrlResource,
|
|
27
27
|
IncidentVideoUploadTokenResource,
|
|
28
28
|
IncidentsApproveRequest,
|
|
29
|
+
IncidentsListRequest,
|
|
29
30
|
IncidentsStoreRequest,
|
|
30
31
|
IncidentsUpdateRequest,
|
|
31
32
|
IncidentsVideosStoreRequest,
|
|
@@ -44,6 +45,7 @@ import type {
|
|
|
44
45
|
NotificationPreferenceResourceArrayResponse,
|
|
45
46
|
NotificationPreferencesStoreRequest,
|
|
46
47
|
NotificationTypeResourceArrayResponse,
|
|
48
|
+
PaginatedIncidentListResourceResponse,
|
|
47
49
|
PaginatedLicenceListResourceResponse,
|
|
48
50
|
PaginatedRegisterGroupedByRosterResourceResponse,
|
|
49
51
|
PaginatedRosterListResourceResponse,
|
|
@@ -120,6 +122,8 @@ import {
|
|
|
120
122
|
IncidentVideoUploadTokenResourceToJSON,
|
|
121
123
|
IncidentsApproveRequestFromJSON,
|
|
122
124
|
IncidentsApproveRequestToJSON,
|
|
125
|
+
IncidentsListRequestFromJSON,
|
|
126
|
+
IncidentsListRequestToJSON,
|
|
123
127
|
IncidentsStoreRequestFromJSON,
|
|
124
128
|
IncidentsStoreRequestToJSON,
|
|
125
129
|
IncidentsUpdateRequestFromJSON,
|
|
@@ -156,6 +160,8 @@ import {
|
|
|
156
160
|
NotificationPreferencesStoreRequestToJSON,
|
|
157
161
|
NotificationTypeResourceArrayResponseFromJSON,
|
|
158
162
|
NotificationTypeResourceArrayResponseToJSON,
|
|
163
|
+
PaginatedIncidentListResourceResponseFromJSON,
|
|
164
|
+
PaginatedIncidentListResourceResponseToJSON,
|
|
159
165
|
PaginatedLicenceListResourceResponseFromJSON,
|
|
160
166
|
PaginatedLicenceListResourceResponseToJSON,
|
|
161
167
|
PaginatedRegisterGroupedByRosterResourceResponseFromJSON,
|
|
@@ -275,6 +281,10 @@ export interface IncidentsApproveOperationRequest {
|
|
|
275
281
|
incidentsApproveRequest?: IncidentsApproveRequest;
|
|
276
282
|
}
|
|
277
283
|
|
|
284
|
+
export interface IncidentsListOperationRequest {
|
|
285
|
+
incidentsListRequest?: IncidentsListRequest;
|
|
286
|
+
}
|
|
287
|
+
|
|
278
288
|
export interface IncidentsShowRequest {
|
|
279
289
|
incident: number;
|
|
280
290
|
}
|
|
@@ -751,6 +761,46 @@ export class GeneralApi extends runtime.BaseAPI {
|
|
|
751
761
|
return await response.value();
|
|
752
762
|
}
|
|
753
763
|
|
|
764
|
+
/**
|
|
765
|
+
* Auto-generated: incidents.list
|
|
766
|
+
*/
|
|
767
|
+
async incidentsListRaw(requestParameters: IncidentsListOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedIncidentListResourceResponse>> {
|
|
768
|
+
const queryParameters: any = {};
|
|
769
|
+
|
|
770
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
771
|
+
|
|
772
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
773
|
+
|
|
774
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
775
|
+
const token = this.configuration.accessToken;
|
|
776
|
+
const tokenString = await token("bearerAuth", []);
|
|
777
|
+
|
|
778
|
+
if (tokenString) {
|
|
779
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
780
|
+
}
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
let urlPath = `/api/incidents/list`;
|
|
784
|
+
|
|
785
|
+
const response = await this.request({
|
|
786
|
+
path: urlPath,
|
|
787
|
+
method: 'POST',
|
|
788
|
+
headers: headerParameters,
|
|
789
|
+
query: queryParameters,
|
|
790
|
+
body: IncidentsListRequestToJSON(requestParameters['incidentsListRequest']),
|
|
791
|
+
}, initOverrides);
|
|
792
|
+
|
|
793
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedIncidentListResourceResponseFromJSON(jsonValue));
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
/**
|
|
797
|
+
* Auto-generated: incidents.list
|
|
798
|
+
*/
|
|
799
|
+
async incidentsList(requestParameters: IncidentsListOperationRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedIncidentListResourceResponse> {
|
|
800
|
+
const response = await this.incidentsListRaw(requestParameters, initOverrides);
|
|
801
|
+
return await response.value();
|
|
802
|
+
}
|
|
803
|
+
|
|
754
804
|
/**
|
|
755
805
|
* Auto-generated: incidents.show
|
|
756
806
|
*/
|
|
@@ -36,7 +36,7 @@ export interface AddressResource {
|
|
|
36
36
|
* @type {string}
|
|
37
37
|
* @memberof AddressResource
|
|
38
38
|
*/
|
|
39
|
-
addressLine2
|
|
39
|
+
addressLine2?: string | null;
|
|
40
40
|
/**
|
|
41
41
|
*
|
|
42
42
|
* @type {string}
|
|
@@ -80,7 +80,6 @@ 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;
|
|
84
83
|
if (!('suburb' in value) || value['suburb'] === undefined) return false;
|
|
85
84
|
if (!('city' in value) || value['city'] === undefined) return false;
|
|
86
85
|
if (!('state' in value) || value['state'] === undefined) return false;
|
|
@@ -102,7 +101,7 @@ export function AddressResourceFromJSONTyped(json: any, ignoreDiscriminator: boo
|
|
|
102
101
|
|
|
103
102
|
'id': json['id'] == null ? undefined : json['id'],
|
|
104
103
|
'addressLine1': json['addressLine1'],
|
|
105
|
-
'addressLine2': json['addressLine2'],
|
|
104
|
+
'addressLine2': json['addressLine2'] == null ? undefined : json['addressLine2'],
|
|
106
105
|
'suburb': json['suburb'],
|
|
107
106
|
'city': json['city'],
|
|
108
107
|
'state': json['state'],
|
|
@@ -31,18 +31,6 @@ export interface AssetLiteResource {
|
|
|
31
31
|
* @memberof AssetLiteResource
|
|
32
32
|
*/
|
|
33
33
|
filePath: string;
|
|
34
|
-
/**
|
|
35
|
-
*
|
|
36
|
-
* @type {boolean}
|
|
37
|
-
* @memberof AssetLiteResource
|
|
38
|
-
*/
|
|
39
|
-
isExternal: boolean;
|
|
40
|
-
/**
|
|
41
|
-
*
|
|
42
|
-
* @type {string}
|
|
43
|
-
* @memberof AssetLiteResource
|
|
44
|
-
*/
|
|
45
|
-
externalUrl?: string | null;
|
|
46
34
|
}
|
|
47
35
|
|
|
48
36
|
/**
|
|
@@ -51,7 +39,6 @@ export interface AssetLiteResource {
|
|
|
51
39
|
export function instanceOfAssetLiteResource(value: object): value is AssetLiteResource {
|
|
52
40
|
if (!('id' in value) || value['id'] === undefined) return false;
|
|
53
41
|
if (!('filePath' in value) || value['filePath'] === undefined) return false;
|
|
54
|
-
if (!('isExternal' in value) || value['isExternal'] === undefined) return false;
|
|
55
42
|
return true;
|
|
56
43
|
}
|
|
57
44
|
|
|
@@ -67,8 +54,6 @@ export function AssetLiteResourceFromJSONTyped(json: any, ignoreDiscriminator: b
|
|
|
67
54
|
|
|
68
55
|
'id': json['id'],
|
|
69
56
|
'filePath': json['filePath'],
|
|
70
|
-
'isExternal': json['isExternal'],
|
|
71
|
-
'externalUrl': json['externalUrl'] == null ? undefined : json['externalUrl'],
|
|
72
57
|
};
|
|
73
58
|
}
|
|
74
59
|
|
|
@@ -85,8 +70,6 @@ export function AssetLiteResourceToJSONTyped(value?: AssetLiteResource | null, i
|
|
|
85
70
|
|
|
86
71
|
'id': value['id'],
|
|
87
72
|
'filePath': value['filePath'],
|
|
88
|
-
'isExternal': value['isExternal'],
|
|
89
|
-
'externalUrl': value['externalUrl'],
|
|
90
73
|
};
|
|
91
74
|
}
|
|
92
75
|
|
|
@@ -48,7 +48,7 @@ export interface AssetResource {
|
|
|
48
48
|
* @type {string}
|
|
49
49
|
* @memberof AssetResource
|
|
50
50
|
*/
|
|
51
|
-
altText
|
|
51
|
+
altText?: string | null;
|
|
52
52
|
/**
|
|
53
53
|
*
|
|
54
54
|
* @type {number}
|
|
@@ -61,18 +61,6 @@ export interface AssetResource {
|
|
|
61
61
|
* @memberof AssetResource
|
|
62
62
|
*/
|
|
63
63
|
fileId: number;
|
|
64
|
-
/**
|
|
65
|
-
*
|
|
66
|
-
* @type {boolean}
|
|
67
|
-
* @memberof AssetResource
|
|
68
|
-
*/
|
|
69
|
-
isExternal: boolean;
|
|
70
|
-
/**
|
|
71
|
-
*
|
|
72
|
-
* @type {string}
|
|
73
|
-
* @memberof AssetResource
|
|
74
|
-
*/
|
|
75
|
-
externalUrl?: string | null;
|
|
76
64
|
}
|
|
77
65
|
|
|
78
66
|
/**
|
|
@@ -83,10 +71,8 @@ export function instanceOfAssetResource(value: object): value is AssetResource {
|
|
|
83
71
|
if (!('filePath' in value) || value['filePath'] === undefined) return false;
|
|
84
72
|
if (!('fileName' in value) || value['fileName'] === undefined) return false;
|
|
85
73
|
if (!('mimeType' in value) || value['mimeType'] === undefined) return false;
|
|
86
|
-
if (!('altText' in value) || value['altText'] === undefined) return false;
|
|
87
74
|
if (!('index' in value) || value['index'] === undefined) return false;
|
|
88
75
|
if (!('fileId' in value) || value['fileId'] === undefined) return false;
|
|
89
|
-
if (!('isExternal' in value) || value['isExternal'] === undefined) return false;
|
|
90
76
|
return true;
|
|
91
77
|
}
|
|
92
78
|
|
|
@@ -104,11 +90,9 @@ export function AssetResourceFromJSONTyped(json: any, ignoreDiscriminator: boole
|
|
|
104
90
|
'filePath': json['filePath'],
|
|
105
91
|
'fileName': json['fileName'],
|
|
106
92
|
'mimeType': json['mimeType'],
|
|
107
|
-
'altText': json['altText'],
|
|
93
|
+
'altText': json['altText'] == null ? undefined : json['altText'],
|
|
108
94
|
'index': json['index'],
|
|
109
95
|
'fileId': json['fileId'],
|
|
110
|
-
'isExternal': json['isExternal'],
|
|
111
|
-
'externalUrl': json['externalUrl'] == null ? undefined : json['externalUrl'],
|
|
112
96
|
};
|
|
113
97
|
}
|
|
114
98
|
|
|
@@ -130,8 +114,6 @@ export function AssetResourceToJSONTyped(value?: AssetResource | null, ignoreDis
|
|
|
130
114
|
'altText': value['altText'],
|
|
131
115
|
'index': value['index'],
|
|
132
116
|
'fileId': value['fileId'],
|
|
133
|
-
'isExternal': value['isExternal'],
|
|
134
|
-
'externalUrl': value['externalUrl'],
|
|
135
117
|
};
|
|
136
118
|
}
|
|
137
119
|
|
|
@@ -0,0 +1,177 @@
|
|
|
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
|
+
import type { VenueLiteResource } from './VenueLiteResource';
|
|
17
|
+
import {
|
|
18
|
+
VenueLiteResourceFromJSON,
|
|
19
|
+
VenueLiteResourceFromJSONTyped,
|
|
20
|
+
VenueLiteResourceToJSON,
|
|
21
|
+
VenueLiteResourceToJSONTyped,
|
|
22
|
+
} from './VenueLiteResource';
|
|
23
|
+
import type { SecurityCompanyLiteResource } from './SecurityCompanyLiteResource';
|
|
24
|
+
import {
|
|
25
|
+
SecurityCompanyLiteResourceFromJSON,
|
|
26
|
+
SecurityCompanyLiteResourceFromJSONTyped,
|
|
27
|
+
SecurityCompanyLiteResourceToJSON,
|
|
28
|
+
SecurityCompanyLiteResourceToJSONTyped,
|
|
29
|
+
} from './SecurityCompanyLiteResource';
|
|
30
|
+
import type { UserLiteResource } from './UserLiteResource';
|
|
31
|
+
import {
|
|
32
|
+
UserLiteResourceFromJSON,
|
|
33
|
+
UserLiteResourceFromJSONTyped,
|
|
34
|
+
UserLiteResourceToJSON,
|
|
35
|
+
UserLiteResourceToJSONTyped,
|
|
36
|
+
} from './UserLiteResource';
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
*
|
|
40
|
+
* @export
|
|
41
|
+
* @interface IncidentListResource
|
|
42
|
+
*/
|
|
43
|
+
export interface IncidentListResource {
|
|
44
|
+
/**
|
|
45
|
+
*
|
|
46
|
+
* @type {number}
|
|
47
|
+
* @memberof IncidentListResource
|
|
48
|
+
*/
|
|
49
|
+
id: number;
|
|
50
|
+
/**
|
|
51
|
+
*
|
|
52
|
+
* @type {VenueLiteResource}
|
|
53
|
+
* @memberof IncidentListResource
|
|
54
|
+
*/
|
|
55
|
+
venue?: VenueLiteResource;
|
|
56
|
+
/**
|
|
57
|
+
*
|
|
58
|
+
* @type {SecurityCompanyLiteResource}
|
|
59
|
+
* @memberof IncidentListResource
|
|
60
|
+
*/
|
|
61
|
+
securityCompany?: SecurityCompanyLiteResource;
|
|
62
|
+
/**
|
|
63
|
+
*
|
|
64
|
+
* @type {UserLiteResource}
|
|
65
|
+
* @memberof IncidentListResource
|
|
66
|
+
*/
|
|
67
|
+
user?: UserLiteResource;
|
|
68
|
+
/**
|
|
69
|
+
*
|
|
70
|
+
* @type {UserLiteResource}
|
|
71
|
+
* @memberof IncidentListResource
|
|
72
|
+
*/
|
|
73
|
+
approvedByUser?: UserLiteResource;
|
|
74
|
+
/**
|
|
75
|
+
*
|
|
76
|
+
* @type {string}
|
|
77
|
+
* @memberof IncidentListResource
|
|
78
|
+
*/
|
|
79
|
+
title?: string | null;
|
|
80
|
+
/**
|
|
81
|
+
*
|
|
82
|
+
* @type {string}
|
|
83
|
+
* @memberof IncidentListResource
|
|
84
|
+
*/
|
|
85
|
+
dutyManager?: string | null;
|
|
86
|
+
/**
|
|
87
|
+
*
|
|
88
|
+
* @type {Date}
|
|
89
|
+
* @memberof IncidentListResource
|
|
90
|
+
*/
|
|
91
|
+
incidentDateTime?: Date | null;
|
|
92
|
+
/**
|
|
93
|
+
*
|
|
94
|
+
* @type {string}
|
|
95
|
+
* @memberof IncidentListResource
|
|
96
|
+
*/
|
|
97
|
+
state?: string | null;
|
|
98
|
+
/**
|
|
99
|
+
*
|
|
100
|
+
* @type {boolean}
|
|
101
|
+
* @memberof IncidentListResource
|
|
102
|
+
*/
|
|
103
|
+
submittedByGuard: boolean;
|
|
104
|
+
/**
|
|
105
|
+
*
|
|
106
|
+
* @type {Date}
|
|
107
|
+
* @memberof IncidentListResource
|
|
108
|
+
*/
|
|
109
|
+
approvedAt?: Date | null;
|
|
110
|
+
/**
|
|
111
|
+
*
|
|
112
|
+
* @type {Date}
|
|
113
|
+
* @memberof IncidentListResource
|
|
114
|
+
*/
|
|
115
|
+
createdAt?: Date | null;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Check if a given object implements the IncidentListResource interface.
|
|
120
|
+
*/
|
|
121
|
+
export function instanceOfIncidentListResource(value: object): value is IncidentListResource {
|
|
122
|
+
if (!('id' in value) || value['id'] === undefined) return false;
|
|
123
|
+
if (!('submittedByGuard' in value) || value['submittedByGuard'] === undefined) return false;
|
|
124
|
+
return true;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export function IncidentListResourceFromJSON(json: any): IncidentListResource {
|
|
128
|
+
return IncidentListResourceFromJSONTyped(json, false);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
export function IncidentListResourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): IncidentListResource {
|
|
132
|
+
if (json == null) {
|
|
133
|
+
return json;
|
|
134
|
+
}
|
|
135
|
+
return {
|
|
136
|
+
|
|
137
|
+
'id': json['id'],
|
|
138
|
+
'venue': json['venue'] == null ? undefined : VenueLiteResourceFromJSON(json['venue']),
|
|
139
|
+
'securityCompany': json['securityCompany'] == null ? undefined : SecurityCompanyLiteResourceFromJSON(json['securityCompany']),
|
|
140
|
+
'user': json['user'] == null ? undefined : UserLiteResourceFromJSON(json['user']),
|
|
141
|
+
'approvedByUser': json['approvedByUser'] == null ? undefined : UserLiteResourceFromJSON(json['approvedByUser']),
|
|
142
|
+
'title': json['title'] == null ? undefined : json['title'],
|
|
143
|
+
'dutyManager': json['dutyManager'] == null ? undefined : json['dutyManager'],
|
|
144
|
+
'incidentDateTime': json['incidentDateTime'] == null ? undefined : (new Date(json['incidentDateTime'])),
|
|
145
|
+
'state': json['state'] == null ? undefined : json['state'],
|
|
146
|
+
'submittedByGuard': json['submittedByGuard'],
|
|
147
|
+
'approvedAt': json['approvedAt'] == null ? undefined : (new Date(json['approvedAt'])),
|
|
148
|
+
'createdAt': json['createdAt'] == null ? undefined : (new Date(json['createdAt'])),
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
export function IncidentListResourceToJSON(json: any): IncidentListResource {
|
|
153
|
+
return IncidentListResourceToJSONTyped(json, false);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
export function IncidentListResourceToJSONTyped(value?: IncidentListResource | null, ignoreDiscriminator: boolean = false): any {
|
|
157
|
+
if (value == null) {
|
|
158
|
+
return value;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
return {
|
|
162
|
+
|
|
163
|
+
'id': value['id'],
|
|
164
|
+
'venue': VenueLiteResourceToJSON(value['venue']),
|
|
165
|
+
'securityCompany': SecurityCompanyLiteResourceToJSON(value['securityCompany']),
|
|
166
|
+
'user': UserLiteResourceToJSON(value['user']),
|
|
167
|
+
'approvedByUser': UserLiteResourceToJSON(value['approvedByUser']),
|
|
168
|
+
'title': value['title'],
|
|
169
|
+
'dutyManager': value['dutyManager'],
|
|
170
|
+
'incidentDateTime': value['incidentDateTime'] === null ? null : ((value['incidentDateTime'] as any)?.toISOString()),
|
|
171
|
+
'state': value['state'],
|
|
172
|
+
'submittedByGuard': value['submittedByGuard'],
|
|
173
|
+
'approvedAt': value['approvedAt'] === null ? null : ((value['approvedAt'] as any)?.toISOString()),
|
|
174
|
+
'createdAt': value['createdAt'] === null ? null : ((value['createdAt'] as any)?.toISOString()),
|
|
175
|
+
};
|
|
176
|
+
}
|
|
177
|
+
|
|
@@ -0,0 +1,73 @@
|
|
|
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
|
+
import type { IncidentListResource } from './IncidentListResource';
|
|
17
|
+
import {
|
|
18
|
+
IncidentListResourceFromJSON,
|
|
19
|
+
IncidentListResourceFromJSONTyped,
|
|
20
|
+
IncidentListResourceToJSON,
|
|
21
|
+
IncidentListResourceToJSONTyped,
|
|
22
|
+
} from './IncidentListResource';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface IncidentListResourceArrayResponse
|
|
28
|
+
*/
|
|
29
|
+
export interface IncidentListResourceArrayResponse {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {Array<IncidentListResource>}
|
|
33
|
+
* @memberof IncidentListResourceArrayResponse
|
|
34
|
+
*/
|
|
35
|
+
data?: Array<IncidentListResource>;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Check if a given object implements the IncidentListResourceArrayResponse interface.
|
|
40
|
+
*/
|
|
41
|
+
export function instanceOfIncidentListResourceArrayResponse(value: object): value is IncidentListResourceArrayResponse {
|
|
42
|
+
return true;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function IncidentListResourceArrayResponseFromJSON(json: any): IncidentListResourceArrayResponse {
|
|
46
|
+
return IncidentListResourceArrayResponseFromJSONTyped(json, false);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function IncidentListResourceArrayResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): IncidentListResourceArrayResponse {
|
|
50
|
+
if (json == null) {
|
|
51
|
+
return json;
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
|
|
55
|
+
'data': json['data'] == null ? undefined : ((json['data'] as Array<any>).map(IncidentListResourceFromJSON)),
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function IncidentListResourceArrayResponseToJSON(json: any): IncidentListResourceArrayResponse {
|
|
60
|
+
return IncidentListResourceArrayResponseToJSONTyped(json, false);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function IncidentListResourceArrayResponseToJSONTyped(value?: IncidentListResourceArrayResponse | null, ignoreDiscriminator: boolean = false): any {
|
|
64
|
+
if (value == null) {
|
|
65
|
+
return value;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
return {
|
|
69
|
+
|
|
70
|
+
'data': value['data'] == null ? undefined : ((value['data'] as Array<any>).map(IncidentListResourceToJSON)),
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
|