@digital8/security-registers-backend-ts-sdk 0.0.269 → 0.0.271

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/.openapi-generator/FILES +8 -0
  2. package/README.md +2 -2
  3. package/dist/apis/GeneralApi.d.ts +72 -1
  4. package/dist/apis/GeneralApi.js +352 -0
  5. package/dist/models/AddressResource.d.ts +1 -1
  6. package/dist/models/AddressResource.js +3 -1
  7. package/dist/models/AssetResource.d.ts +1 -1
  8. package/dist/models/AssetResource.js +3 -1
  9. package/dist/models/IncidentResource.d.ts +13 -0
  10. package/dist/models/IncidentResource.js +7 -0
  11. package/dist/models/IncidentVideoResource.d.ts +74 -0
  12. package/dist/models/IncidentVideoResource.js +72 -0
  13. package/dist/models/IncidentVideoResourceArrayResponse.d.ts +33 -0
  14. package/dist/models/IncidentVideoResourceArrayResponse.js +50 -0
  15. package/dist/models/IncidentVideoSignedUrlResource.d.ts +32 -0
  16. package/dist/models/IncidentVideoSignedUrlResource.js +51 -0
  17. package/dist/models/IncidentVideoSignedUrlResourceArrayResponse.d.ts +33 -0
  18. package/dist/models/IncidentVideoSignedUrlResourceArrayResponse.js +50 -0
  19. package/dist/models/IncidentVideoUploadTokenResource.d.ts +50 -0
  20. package/dist/models/IncidentVideoUploadTokenResource.js +63 -0
  21. package/dist/models/IncidentVideoUploadTokenResourceArrayResponse.d.ts +33 -0
  22. package/dist/models/IncidentVideoUploadTokenResourceArrayResponse.js +50 -0
  23. package/dist/models/IncidentsVideosStoreRequest.d.ts +44 -0
  24. package/dist/models/IncidentsVideosStoreRequest.js +59 -0
  25. package/dist/models/IncidentsVideosUploadTokenRequest.d.ts +44 -0
  26. package/dist/models/IncidentsVideosUploadTokenRequest.js +59 -0
  27. package/dist/models/RegisterListResource.d.ts +4 -4
  28. package/dist/models/RegisterListResource.js +6 -5
  29. package/dist/models/RegisterResource.d.ts +1 -1
  30. package/dist/models/RegisterResource.js +1 -3
  31. package/dist/models/RosterListResource.d.ts +1 -1
  32. package/dist/models/RosterListResource.js +4 -3
  33. package/dist/models/RosterResource.d.ts +1 -1
  34. package/dist/models/RosterResource.js +4 -3
  35. package/dist/models/SecurityCompanyResource.d.ts +1 -1
  36. package/dist/models/SecurityCompanyResource.js +1 -3
  37. package/dist/models/index.d.ts +8 -0
  38. package/dist/models/index.js +8 -0
  39. package/package.json +1 -1
  40. package/src/apis/GeneralApi.ts +344 -0
  41. package/src/models/AddressResource.ts +3 -2
  42. package/src/models/AssetResource.ts +3 -2
  43. package/src/models/IncidentResource.ts +24 -0
  44. package/src/models/IncidentVideoResource.ts +125 -0
  45. package/src/models/IncidentVideoResourceArrayResponse.ts +73 -0
  46. package/src/models/IncidentVideoSignedUrlResource.ts +66 -0
  47. package/src/models/IncidentVideoSignedUrlResourceArrayResponse.ts +73 -0
  48. package/src/models/IncidentVideoUploadTokenResource.ts +93 -0
  49. package/src/models/IncidentVideoUploadTokenResourceArrayResponse.ts +73 -0
  50. package/src/models/IncidentsVideosStoreRequest.ts +84 -0
  51. package/src/models/IncidentsVideosUploadTokenRequest.ts +84 -0
  52. package/src/models/RegisterListResource.ts +8 -8
  53. package/src/models/RegisterResource.ts +2 -3
  54. package/src/models/RosterListResource.ts +4 -3
  55. package/src/models/RosterResource.ts +4 -3
  56. package/src/models/SecurityCompanyResource.ts +2 -3
  57. package/src/models/index.ts +8 -0
@@ -22,9 +22,14 @@ import type {
22
22
  IncidentResource,
23
23
  IncidentVersionResource,
24
24
  IncidentVersionResourceArrayResponse,
25
+ IncidentVideoResource,
26
+ IncidentVideoSignedUrlResource,
27
+ IncidentVideoUploadTokenResource,
25
28
  IncidentsApproveRequest,
26
29
  IncidentsStoreRequest,
27
30
  IncidentsUpdateRequest,
31
+ IncidentsVideosStoreRequest,
32
+ IncidentsVideosUploadTokenRequest,
28
33
  IndexMinimalUserRequest,
29
34
  IndexUserRequest,
30
35
  LicenceLiteResourceArrayResponse,
@@ -107,12 +112,22 @@ import {
107
112
  IncidentVersionResourceToJSON,
108
113
  IncidentVersionResourceArrayResponseFromJSON,
109
114
  IncidentVersionResourceArrayResponseToJSON,
115
+ IncidentVideoResourceFromJSON,
116
+ IncidentVideoResourceToJSON,
117
+ IncidentVideoSignedUrlResourceFromJSON,
118
+ IncidentVideoSignedUrlResourceToJSON,
119
+ IncidentVideoUploadTokenResourceFromJSON,
120
+ IncidentVideoUploadTokenResourceToJSON,
110
121
  IncidentsApproveRequestFromJSON,
111
122
  IncidentsApproveRequestToJSON,
112
123
  IncidentsStoreRequestFromJSON,
113
124
  IncidentsStoreRequestToJSON,
114
125
  IncidentsUpdateRequestFromJSON,
115
126
  IncidentsUpdateRequestToJSON,
127
+ IncidentsVideosStoreRequestFromJSON,
128
+ IncidentsVideosStoreRequestToJSON,
129
+ IncidentsVideosUploadTokenRequestFromJSON,
130
+ IncidentsVideosUploadTokenRequestToJSON,
116
131
  IndexMinimalUserRequestFromJSON,
117
132
  IndexMinimalUserRequestToJSON,
118
133
  IndexUserRequestFromJSON,
@@ -260,6 +275,10 @@ export interface IncidentsApproveOperationRequest {
260
275
  incidentsApproveRequest?: IncidentsApproveRequest;
261
276
  }
262
277
 
278
+ export interface IncidentsShowRequest {
279
+ incident: number;
280
+ }
281
+
263
282
  export interface IncidentsStoreOperationRequest {
264
283
  incidentsStoreRequest?: IncidentsStoreRequest;
265
284
  }
@@ -282,6 +301,31 @@ export interface IncidentsVersionsShowRequest {
282
301
  version: number;
283
302
  }
284
303
 
304
+ export interface IncidentsVideosDestroyRequest {
305
+ incident: number;
306
+ video: number;
307
+ }
308
+
309
+ export interface IncidentsVideosRetryRequest {
310
+ incident: number;
311
+ video: number;
312
+ }
313
+
314
+ export interface IncidentsVideosSignedUrlRequest {
315
+ incident: number;
316
+ video: number;
317
+ }
318
+
319
+ export interface IncidentsVideosStoreOperationRequest {
320
+ incident: number;
321
+ incidentsVideosStoreRequest?: IncidentsVideosStoreRequest;
322
+ }
323
+
324
+ export interface IncidentsVideosUploadTokenOperationRequest {
325
+ incident: number;
326
+ incidentsVideosUploadTokenRequest?: IncidentsVideosUploadTokenRequest;
327
+ }
328
+
285
329
  export interface IndexMinimalUserOperationRequest {
286
330
  indexMinimalUserRequest?: IndexMinimalUserRequest;
287
331
  }
@@ -707,6 +751,51 @@ export class GeneralApi extends runtime.BaseAPI {
707
751
  return await response.value();
708
752
  }
709
753
 
754
+ /**
755
+ * Auto-generated: incidents.show
756
+ */
757
+ async incidentsShowRaw(requestParameters: IncidentsShowRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<IncidentResource>> {
758
+ if (requestParameters['incident'] == null) {
759
+ throw new runtime.RequiredError(
760
+ 'incident',
761
+ 'Required parameter "incident" was null or undefined when calling incidentsShow().'
762
+ );
763
+ }
764
+
765
+ const queryParameters: any = {};
766
+
767
+ const headerParameters: runtime.HTTPHeaders = {};
768
+
769
+ if (this.configuration && this.configuration.accessToken) {
770
+ const token = this.configuration.accessToken;
771
+ const tokenString = await token("bearerAuth", []);
772
+
773
+ if (tokenString) {
774
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
775
+ }
776
+ }
777
+
778
+ let urlPath = `/api/incidents/{incident}`;
779
+ urlPath = urlPath.replace(`{${"incident"}}`, encodeURIComponent(String(requestParameters['incident'])));
780
+
781
+ const response = await this.request({
782
+ path: urlPath,
783
+ method: 'GET',
784
+ headers: headerParameters,
785
+ query: queryParameters,
786
+ }, initOverrides);
787
+
788
+ return new runtime.JSONApiResponse(response, (jsonValue) => IncidentResourceFromJSON(jsonValue));
789
+ }
790
+
791
+ /**
792
+ * Auto-generated: incidents.show
793
+ */
794
+ async incidentsShow(requestParameters: IncidentsShowRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IncidentResource> {
795
+ const response = await this.incidentsShowRaw(requestParameters, initOverrides);
796
+ return await response.value();
797
+ }
798
+
710
799
  /**
711
800
  * Auto-generated: incidents.store
712
801
  */
@@ -938,6 +1027,261 @@ export class GeneralApi extends runtime.BaseAPI {
938
1027
  return await response.value();
939
1028
  }
940
1029
 
1030
+ /**
1031
+ * Auto-generated: incidents.videos.destroy
1032
+ */
1033
+ async incidentsVideosDestroyRaw(requestParameters: IncidentsVideosDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GenericResponse>> {
1034
+ if (requestParameters['incident'] == null) {
1035
+ throw new runtime.RequiredError(
1036
+ 'incident',
1037
+ 'Required parameter "incident" was null or undefined when calling incidentsVideosDestroy().'
1038
+ );
1039
+ }
1040
+
1041
+ if (requestParameters['video'] == null) {
1042
+ throw new runtime.RequiredError(
1043
+ 'video',
1044
+ 'Required parameter "video" was null or undefined when calling incidentsVideosDestroy().'
1045
+ );
1046
+ }
1047
+
1048
+ const queryParameters: any = {};
1049
+
1050
+ const headerParameters: runtime.HTTPHeaders = {};
1051
+
1052
+ if (this.configuration && this.configuration.accessToken) {
1053
+ const token = this.configuration.accessToken;
1054
+ const tokenString = await token("bearerAuth", []);
1055
+
1056
+ if (tokenString) {
1057
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1058
+ }
1059
+ }
1060
+
1061
+ let urlPath = `/api/incidents/{incident}/videos/{video}`;
1062
+ urlPath = urlPath.replace(`{${"incident"}}`, encodeURIComponent(String(requestParameters['incident'])));
1063
+ urlPath = urlPath.replace(`{${"video"}}`, encodeURIComponent(String(requestParameters['video'])));
1064
+
1065
+ const response = await this.request({
1066
+ path: urlPath,
1067
+ method: 'DELETE',
1068
+ headers: headerParameters,
1069
+ query: queryParameters,
1070
+ }, initOverrides);
1071
+
1072
+ return new runtime.JSONApiResponse(response, (jsonValue) => GenericResponseFromJSON(jsonValue));
1073
+ }
1074
+
1075
+ /**
1076
+ * Auto-generated: incidents.videos.destroy
1077
+ */
1078
+ async incidentsVideosDestroy(requestParameters: IncidentsVideosDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GenericResponse> {
1079
+ const response = await this.incidentsVideosDestroyRaw(requestParameters, initOverrides);
1080
+ return await response.value();
1081
+ }
1082
+
1083
+ /**
1084
+ * Auto-generated: incidents.videos.retry
1085
+ */
1086
+ async incidentsVideosRetryRaw(requestParameters: IncidentsVideosRetryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<IncidentVideoResource>> {
1087
+ if (requestParameters['incident'] == null) {
1088
+ throw new runtime.RequiredError(
1089
+ 'incident',
1090
+ 'Required parameter "incident" was null or undefined when calling incidentsVideosRetry().'
1091
+ );
1092
+ }
1093
+
1094
+ if (requestParameters['video'] == null) {
1095
+ throw new runtime.RequiredError(
1096
+ 'video',
1097
+ 'Required parameter "video" was null or undefined when calling incidentsVideosRetry().'
1098
+ );
1099
+ }
1100
+
1101
+ const queryParameters: any = {};
1102
+
1103
+ const headerParameters: runtime.HTTPHeaders = {};
1104
+
1105
+ if (this.configuration && this.configuration.accessToken) {
1106
+ const token = this.configuration.accessToken;
1107
+ const tokenString = await token("bearerAuth", []);
1108
+
1109
+ if (tokenString) {
1110
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1111
+ }
1112
+ }
1113
+
1114
+ let urlPath = `/api/incidents/{incident}/videos/{video}/retry`;
1115
+ urlPath = urlPath.replace(`{${"incident"}}`, encodeURIComponent(String(requestParameters['incident'])));
1116
+ urlPath = urlPath.replace(`{${"video"}}`, encodeURIComponent(String(requestParameters['video'])));
1117
+
1118
+ const response = await this.request({
1119
+ path: urlPath,
1120
+ method: 'POST',
1121
+ headers: headerParameters,
1122
+ query: queryParameters,
1123
+ }, initOverrides);
1124
+
1125
+ return new runtime.JSONApiResponse(response, (jsonValue) => IncidentVideoResourceFromJSON(jsonValue));
1126
+ }
1127
+
1128
+ /**
1129
+ * Auto-generated: incidents.videos.retry
1130
+ */
1131
+ async incidentsVideosRetry(requestParameters: IncidentsVideosRetryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IncidentVideoResource> {
1132
+ const response = await this.incidentsVideosRetryRaw(requestParameters, initOverrides);
1133
+ return await response.value();
1134
+ }
1135
+
1136
+ /**
1137
+ * Auto-generated: incidents.videos.signedUrl
1138
+ */
1139
+ async incidentsVideosSignedUrlRaw(requestParameters: IncidentsVideosSignedUrlRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<IncidentVideoSignedUrlResource>> {
1140
+ if (requestParameters['incident'] == null) {
1141
+ throw new runtime.RequiredError(
1142
+ 'incident',
1143
+ 'Required parameter "incident" was null or undefined when calling incidentsVideosSignedUrl().'
1144
+ );
1145
+ }
1146
+
1147
+ if (requestParameters['video'] == null) {
1148
+ throw new runtime.RequiredError(
1149
+ 'video',
1150
+ 'Required parameter "video" was null or undefined when calling incidentsVideosSignedUrl().'
1151
+ );
1152
+ }
1153
+
1154
+ const queryParameters: any = {};
1155
+
1156
+ const headerParameters: runtime.HTTPHeaders = {};
1157
+
1158
+ if (this.configuration && this.configuration.accessToken) {
1159
+ const token = this.configuration.accessToken;
1160
+ const tokenString = await token("bearerAuth", []);
1161
+
1162
+ if (tokenString) {
1163
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1164
+ }
1165
+ }
1166
+
1167
+ let urlPath = `/api/incidents/{incident}/videos/{video}/signed-url`;
1168
+ urlPath = urlPath.replace(`{${"incident"}}`, encodeURIComponent(String(requestParameters['incident'])));
1169
+ urlPath = urlPath.replace(`{${"video"}}`, encodeURIComponent(String(requestParameters['video'])));
1170
+
1171
+ const response = await this.request({
1172
+ path: urlPath,
1173
+ method: 'GET',
1174
+ headers: headerParameters,
1175
+ query: queryParameters,
1176
+ }, initOverrides);
1177
+
1178
+ return new runtime.JSONApiResponse(response, (jsonValue) => IncidentVideoSignedUrlResourceFromJSON(jsonValue));
1179
+ }
1180
+
1181
+ /**
1182
+ * Auto-generated: incidents.videos.signedUrl
1183
+ */
1184
+ async incidentsVideosSignedUrl(requestParameters: IncidentsVideosSignedUrlRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IncidentVideoSignedUrlResource> {
1185
+ const response = await this.incidentsVideosSignedUrlRaw(requestParameters, initOverrides);
1186
+ return await response.value();
1187
+ }
1188
+
1189
+ /**
1190
+ * Auto-generated: incidents.videos.store
1191
+ */
1192
+ async incidentsVideosStoreRaw(requestParameters: IncidentsVideosStoreOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<IncidentVideoResource>> {
1193
+ if (requestParameters['incident'] == null) {
1194
+ throw new runtime.RequiredError(
1195
+ 'incident',
1196
+ 'Required parameter "incident" was null or undefined when calling incidentsVideosStore().'
1197
+ );
1198
+ }
1199
+
1200
+ const queryParameters: any = {};
1201
+
1202
+ const headerParameters: runtime.HTTPHeaders = {};
1203
+
1204
+ headerParameters['Content-Type'] = 'application/json';
1205
+
1206
+ if (this.configuration && this.configuration.accessToken) {
1207
+ const token = this.configuration.accessToken;
1208
+ const tokenString = await token("bearerAuth", []);
1209
+
1210
+ if (tokenString) {
1211
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1212
+ }
1213
+ }
1214
+
1215
+ let urlPath = `/api/incidents/{incident}/videos`;
1216
+ urlPath = urlPath.replace(`{${"incident"}}`, encodeURIComponent(String(requestParameters['incident'])));
1217
+
1218
+ const response = await this.request({
1219
+ path: urlPath,
1220
+ method: 'POST',
1221
+ headers: headerParameters,
1222
+ query: queryParameters,
1223
+ body: IncidentsVideosStoreRequestToJSON(requestParameters['incidentsVideosStoreRequest']),
1224
+ }, initOverrides);
1225
+
1226
+ return new runtime.JSONApiResponse(response, (jsonValue) => IncidentVideoResourceFromJSON(jsonValue));
1227
+ }
1228
+
1229
+ /**
1230
+ * Auto-generated: incidents.videos.store
1231
+ */
1232
+ async incidentsVideosStore(requestParameters: IncidentsVideosStoreOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IncidentVideoResource> {
1233
+ const response = await this.incidentsVideosStoreRaw(requestParameters, initOverrides);
1234
+ return await response.value();
1235
+ }
1236
+
1237
+ /**
1238
+ * Auto-generated: incidents.videos.uploadToken
1239
+ */
1240
+ async incidentsVideosUploadTokenRaw(requestParameters: IncidentsVideosUploadTokenOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<IncidentVideoUploadTokenResource>> {
1241
+ if (requestParameters['incident'] == null) {
1242
+ throw new runtime.RequiredError(
1243
+ 'incident',
1244
+ 'Required parameter "incident" was null or undefined when calling incidentsVideosUploadToken().'
1245
+ );
1246
+ }
1247
+
1248
+ const queryParameters: any = {};
1249
+
1250
+ const headerParameters: runtime.HTTPHeaders = {};
1251
+
1252
+ headerParameters['Content-Type'] = 'application/json';
1253
+
1254
+ if (this.configuration && this.configuration.accessToken) {
1255
+ const token = this.configuration.accessToken;
1256
+ const tokenString = await token("bearerAuth", []);
1257
+
1258
+ if (tokenString) {
1259
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1260
+ }
1261
+ }
1262
+
1263
+ let urlPath = `/api/incidents/{incident}/videos/upload-token`;
1264
+ urlPath = urlPath.replace(`{${"incident"}}`, encodeURIComponent(String(requestParameters['incident'])));
1265
+
1266
+ const response = await this.request({
1267
+ path: urlPath,
1268
+ method: 'POST',
1269
+ headers: headerParameters,
1270
+ query: queryParameters,
1271
+ body: IncidentsVideosUploadTokenRequestToJSON(requestParameters['incidentsVideosUploadTokenRequest']),
1272
+ }, initOverrides);
1273
+
1274
+ return new runtime.JSONApiResponse(response, (jsonValue) => IncidentVideoUploadTokenResourceFromJSON(jsonValue));
1275
+ }
1276
+
1277
+ /**
1278
+ * Auto-generated: incidents.videos.uploadToken
1279
+ */
1280
+ async incidentsVideosUploadToken(requestParameters: IncidentsVideosUploadTokenOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IncidentVideoUploadTokenResource> {
1281
+ const response = await this.incidentsVideosUploadTokenRaw(requestParameters, initOverrides);
1282
+ return await response.value();
1283
+ }
1284
+
941
1285
  /**
942
1286
  * Auto-generated: indexMinimalUser
943
1287
  */
@@ -36,7 +36,7 @@ export interface AddressResource {
36
36
  * @type {string}
37
37
  * @memberof AddressResource
38
38
  */
39
- addressLine2?: string | null;
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'] == null ? undefined : 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?: string | null;
51
+ altText: string;
52
52
  /**
53
53
  *
54
54
  * @type {number}
@@ -71,6 +71,7 @@ export function instanceOfAssetResource(value: object): value is AssetResource {
71
71
  if (!('filePath' in value) || value['filePath'] === undefined) return false;
72
72
  if (!('fileName' in value) || value['fileName'] === undefined) return false;
73
73
  if (!('mimeType' in value) || value['mimeType'] === undefined) return false;
74
+ if (!('altText' in value) || value['altText'] === undefined) return false;
74
75
  if (!('index' in value) || value['index'] === undefined) return false;
75
76
  if (!('fileId' in value) || value['fileId'] === undefined) return false;
76
77
  return true;
@@ -90,7 +91,7 @@ export function AssetResourceFromJSONTyped(json: any, ignoreDiscriminator: boole
90
91
  'filePath': json['filePath'],
91
92
  'fileName': json['fileName'],
92
93
  'mimeType': json['mimeType'],
93
- 'altText': json['altText'] == null ? undefined : json['altText'],
94
+ 'altText': json['altText'],
94
95
  'index': json['index'],
95
96
  'fileId': json['fileId'],
96
97
  };
@@ -48,6 +48,13 @@ import {
48
48
  SecurityCompanyLiteResourceToJSON,
49
49
  SecurityCompanyLiteResourceToJSONTyped,
50
50
  } from './SecurityCompanyLiteResource';
51
+ import type { IncidentVideoResource } from './IncidentVideoResource';
52
+ import {
53
+ IncidentVideoResourceFromJSON,
54
+ IncidentVideoResourceFromJSONTyped,
55
+ IncidentVideoResourceToJSON,
56
+ IncidentVideoResourceToJSONTyped,
57
+ } from './IncidentVideoResource';
51
58
  import type { UserLiteResource } from './UserLiteResource';
52
59
  import {
53
60
  UserLiteResourceFromJSON,
@@ -147,6 +154,18 @@ export interface IncidentResource {
147
154
  * @memberof IncidentResource
148
155
  */
149
156
  fieldAudits: Array<IncidentFieldAuditResource> | null;
157
+ /**
158
+ *
159
+ * @type {Array<IncidentVideoResource>}
160
+ * @memberof IncidentResource
161
+ */
162
+ videos: Array<IncidentVideoResource> | null;
163
+ /**
164
+ *
165
+ * @type {string}
166
+ * @memberof IncidentResource
167
+ */
168
+ state?: string | null;
150
169
  }
151
170
 
152
171
  /**
@@ -163,6 +182,7 @@ export function instanceOfIncidentResource(value: object): value is IncidentReso
163
182
  if (!('incidentFieldSchema' in value) || value['incidentFieldSchema'] === undefined) return false;
164
183
  if (!('fields' in value) || value['fields'] === undefined) return false;
165
184
  if (!('fieldAudits' in value) || value['fieldAudits'] === undefined) return false;
185
+ if (!('videos' in value) || value['videos'] === undefined) return false;
166
186
  return true;
167
187
  }
168
188
 
@@ -189,6 +209,8 @@ export function IncidentResourceFromJSONTyped(json: any, ignoreDiscriminator: bo
189
209
  'updatedAt': json['updatedAt'] == null ? undefined : (new Date(json['updatedAt'])),
190
210
  'fields': json['fields'],
191
211
  'fieldAudits': (json['fieldAudits'] == null ? null : (json['fieldAudits'] as Array<any>).map(IncidentFieldAuditResourceFromJSON)),
212
+ 'videos': (json['videos'] == null ? null : (json['videos'] as Array<any>).map(IncidentVideoResourceFromJSON)),
213
+ 'state': json['state'] == null ? undefined : json['state'],
192
214
  };
193
215
  }
194
216
 
@@ -216,6 +238,8 @@ export function IncidentResourceToJSONTyped(value?: IncidentResource | null, ign
216
238
  'updatedAt': value['updatedAt'] === null ? null : ((value['updatedAt'] as any)?.toISOString()),
217
239
  'fields': value['fields'],
218
240
  'fieldAudits': (value['fieldAudits'] == null ? null : (value['fieldAudits'] as Array<any>).map(IncidentFieldAuditResourceToJSON)),
241
+ 'videos': (value['videos'] == null ? null : (value['videos'] as Array<any>).map(IncidentVideoResourceToJSON)),
242
+ 'state': value['state'],
219
243
  };
220
244
  }
221
245
 
@@ -0,0 +1,125 @@
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 IncidentVideoResource
20
+ */
21
+ export interface IncidentVideoResource {
22
+ /**
23
+ *
24
+ * @type {number}
25
+ * @memberof IncidentVideoResource
26
+ */
27
+ id: number;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof IncidentVideoResource
32
+ */
33
+ status: string;
34
+ /**
35
+ *
36
+ * @type {string}
37
+ * @memberof IncidentVideoResource
38
+ */
39
+ originalFilename: string;
40
+ /**
41
+ *
42
+ * @type {string}
43
+ * @memberof IncidentVideoResource
44
+ */
45
+ mimeType: string;
46
+ /**
47
+ *
48
+ * @type {number}
49
+ * @memberof IncidentVideoResource
50
+ */
51
+ sizeBytes?: number | null;
52
+ /**
53
+ *
54
+ * @type {string}
55
+ * @memberof IncidentVideoResource
56
+ */
57
+ failureReason?: string | null;
58
+ /**
59
+ *
60
+ * @type {Date}
61
+ * @memberof IncidentVideoResource
62
+ */
63
+ createdAt?: Date | null;
64
+ /**
65
+ *
66
+ * @type {Date}
67
+ * @memberof IncidentVideoResource
68
+ */
69
+ updatedAt?: Date | null;
70
+ }
71
+
72
+ /**
73
+ * Check if a given object implements the IncidentVideoResource interface.
74
+ */
75
+ export function instanceOfIncidentVideoResource(value: object): value is IncidentVideoResource {
76
+ if (!('id' in value) || value['id'] === undefined) return false;
77
+ if (!('status' in value) || value['status'] === undefined) return false;
78
+ if (!('originalFilename' in value) || value['originalFilename'] === undefined) return false;
79
+ if (!('mimeType' in value) || value['mimeType'] === undefined) return false;
80
+ return true;
81
+ }
82
+
83
+ export function IncidentVideoResourceFromJSON(json: any): IncidentVideoResource {
84
+ return IncidentVideoResourceFromJSONTyped(json, false);
85
+ }
86
+
87
+ export function IncidentVideoResourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): IncidentVideoResource {
88
+ if (json == null) {
89
+ return json;
90
+ }
91
+ return {
92
+
93
+ 'id': json['id'],
94
+ 'status': json['status'],
95
+ 'originalFilename': json['originalFilename'],
96
+ 'mimeType': json['mimeType'],
97
+ 'sizeBytes': json['sizeBytes'] == null ? undefined : json['sizeBytes'],
98
+ 'failureReason': json['failureReason'] == null ? undefined : json['failureReason'],
99
+ 'createdAt': json['createdAt'] == null ? undefined : (new Date(json['createdAt'])),
100
+ 'updatedAt': json['updatedAt'] == null ? undefined : (new Date(json['updatedAt'])),
101
+ };
102
+ }
103
+
104
+ export function IncidentVideoResourceToJSON(json: any): IncidentVideoResource {
105
+ return IncidentVideoResourceToJSONTyped(json, false);
106
+ }
107
+
108
+ export function IncidentVideoResourceToJSONTyped(value?: IncidentVideoResource | null, ignoreDiscriminator: boolean = false): any {
109
+ if (value == null) {
110
+ return value;
111
+ }
112
+
113
+ return {
114
+
115
+ 'id': value['id'],
116
+ 'status': value['status'],
117
+ 'originalFilename': value['originalFilename'],
118
+ 'mimeType': value['mimeType'],
119
+ 'sizeBytes': value['sizeBytes'],
120
+ 'failureReason': value['failureReason'],
121
+ 'createdAt': value['createdAt'] === null ? null : ((value['createdAt'] as any)?.toISOString()),
122
+ 'updatedAt': value['updatedAt'] === null ? null : ((value['updatedAt'] as any)?.toISOString()),
123
+ };
124
+ }
125
+