@digital8/security-registers-backend-ts-sdk 0.0.227 → 0.0.228

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 (54) 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/IncidentResource.d.ts +7 -0
  8. package/dist/models/IncidentResource.js +5 -0
  9. package/dist/models/IncidentVideoResource.d.ts +74 -0
  10. package/dist/models/IncidentVideoResource.js +72 -0
  11. package/dist/models/IncidentVideoResourceArrayResponse.d.ts +33 -0
  12. package/dist/models/IncidentVideoResourceArrayResponse.js +50 -0
  13. package/dist/models/IncidentVideoSignedUrlResource.d.ts +32 -0
  14. package/dist/models/IncidentVideoSignedUrlResource.js +51 -0
  15. package/dist/models/IncidentVideoSignedUrlResourceArrayResponse.d.ts +33 -0
  16. package/dist/models/IncidentVideoSignedUrlResourceArrayResponse.js +50 -0
  17. package/dist/models/IncidentVideoUploadTokenResource.d.ts +50 -0
  18. package/dist/models/IncidentVideoUploadTokenResource.js +63 -0
  19. package/dist/models/IncidentVideoUploadTokenResourceArrayResponse.d.ts +33 -0
  20. package/dist/models/IncidentVideoUploadTokenResourceArrayResponse.js +50 -0
  21. package/dist/models/IncidentsVideosStoreRequest.d.ts +44 -0
  22. package/dist/models/IncidentsVideosStoreRequest.js +59 -0
  23. package/dist/models/IncidentsVideosUploadTokenRequest.d.ts +44 -0
  24. package/dist/models/IncidentsVideosUploadTokenRequest.js +59 -0
  25. package/dist/models/RegisterGroupedByRosterResource.d.ts +1 -1
  26. package/dist/models/RegisterGroupedByRosterResource.js +3 -4
  27. package/dist/models/RegisterListResource.d.ts +5 -5
  28. package/dist/models/RegisterListResource.js +6 -9
  29. package/dist/models/RosterLiteResource.d.ts +1 -1
  30. package/dist/models/RosterLiteResource.js +4 -3
  31. package/dist/models/RosterWithRegistersResource.d.ts +1 -1
  32. package/dist/models/RosterWithRegistersResource.js +3 -4
  33. package/dist/models/SecurityCompanyResource.d.ts +1 -1
  34. package/dist/models/SecurityCompanyResource.js +1 -3
  35. package/dist/models/index.d.ts +8 -0
  36. package/dist/models/index.js +8 -0
  37. package/package.json +1 -1
  38. package/src/apis/GeneralApi.ts +344 -0
  39. package/src/models/AddressResource.ts +3 -2
  40. package/src/models/IncidentResource.ts +16 -0
  41. package/src/models/IncidentVideoResource.ts +125 -0
  42. package/src/models/IncidentVideoResourceArrayResponse.ts +73 -0
  43. package/src/models/IncidentVideoSignedUrlResource.ts +66 -0
  44. package/src/models/IncidentVideoSignedUrlResourceArrayResponse.ts +73 -0
  45. package/src/models/IncidentVideoUploadTokenResource.ts +93 -0
  46. package/src/models/IncidentVideoUploadTokenResourceArrayResponse.ts +73 -0
  47. package/src/models/IncidentsVideosStoreRequest.ts +84 -0
  48. package/src/models/IncidentsVideosUploadTokenRequest.ts +84 -0
  49. package/src/models/RegisterGroupedByRosterResource.ts +3 -4
  50. package/src/models/RegisterListResource.ts +10 -11
  51. package/src/models/RosterLiteResource.ts +4 -3
  52. package/src/models/RosterWithRegistersResource.ts +3 -4
  53. package/src/models/SecurityCompanyResource.ts +2 -3
  54. 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,
@@ -106,12 +111,22 @@ import {
106
111
  IncidentVersionResourceToJSON,
107
112
  IncidentVersionResourceArrayResponseFromJSON,
108
113
  IncidentVersionResourceArrayResponseToJSON,
114
+ IncidentVideoResourceFromJSON,
115
+ IncidentVideoResourceToJSON,
116
+ IncidentVideoSignedUrlResourceFromJSON,
117
+ IncidentVideoSignedUrlResourceToJSON,
118
+ IncidentVideoUploadTokenResourceFromJSON,
119
+ IncidentVideoUploadTokenResourceToJSON,
109
120
  IncidentsApproveRequestFromJSON,
110
121
  IncidentsApproveRequestToJSON,
111
122
  IncidentsStoreRequestFromJSON,
112
123
  IncidentsStoreRequestToJSON,
113
124
  IncidentsUpdateRequestFromJSON,
114
125
  IncidentsUpdateRequestToJSON,
126
+ IncidentsVideosStoreRequestFromJSON,
127
+ IncidentsVideosStoreRequestToJSON,
128
+ IncidentsVideosUploadTokenRequestFromJSON,
129
+ IncidentsVideosUploadTokenRequestToJSON,
115
130
  IndexMinimalUserRequestFromJSON,
116
131
  IndexMinimalUserRequestToJSON,
117
132
  IndexUserRequestFromJSON,
@@ -257,6 +272,10 @@ export interface IncidentsApproveOperationRequest {
257
272
  incidentsApproveRequest?: IncidentsApproveRequest;
258
273
  }
259
274
 
275
+ export interface IncidentsShowRequest {
276
+ incident: number;
277
+ }
278
+
260
279
  export interface IncidentsStoreOperationRequest {
261
280
  incidentsStoreRequest?: IncidentsStoreRequest;
262
281
  }
@@ -279,6 +298,31 @@ export interface IncidentsVersionsShowRequest {
279
298
  version: number;
280
299
  }
281
300
 
301
+ export interface IncidentsVideosDestroyRequest {
302
+ incident: number;
303
+ video: number;
304
+ }
305
+
306
+ export interface IncidentsVideosRetryRequest {
307
+ incident: number;
308
+ video: number;
309
+ }
310
+
311
+ export interface IncidentsVideosSignedUrlRequest {
312
+ incident: number;
313
+ video: number;
314
+ }
315
+
316
+ export interface IncidentsVideosStoreOperationRequest {
317
+ incident: number;
318
+ incidentsVideosStoreRequest?: IncidentsVideosStoreRequest;
319
+ }
320
+
321
+ export interface IncidentsVideosUploadTokenOperationRequest {
322
+ incident: number;
323
+ incidentsVideosUploadTokenRequest?: IncidentsVideosUploadTokenRequest;
324
+ }
325
+
282
326
  export interface IndexMinimalUserOperationRequest {
283
327
  indexMinimalUserRequest?: IndexMinimalUserRequest;
284
328
  }
@@ -700,6 +744,51 @@ export class GeneralApi extends runtime.BaseAPI {
700
744
  return await response.value();
701
745
  }
702
746
 
747
+ /**
748
+ * Auto-generated: incidents.show
749
+ */
750
+ async incidentsShowRaw(requestParameters: IncidentsShowRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<IncidentResource>> {
751
+ if (requestParameters['incident'] == null) {
752
+ throw new runtime.RequiredError(
753
+ 'incident',
754
+ 'Required parameter "incident" was null or undefined when calling incidentsShow().'
755
+ );
756
+ }
757
+
758
+ const queryParameters: any = {};
759
+
760
+ const headerParameters: runtime.HTTPHeaders = {};
761
+
762
+ if (this.configuration && this.configuration.accessToken) {
763
+ const token = this.configuration.accessToken;
764
+ const tokenString = await token("bearerAuth", []);
765
+
766
+ if (tokenString) {
767
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
768
+ }
769
+ }
770
+
771
+ let urlPath = `/api/incidents/{incident}`;
772
+ urlPath = urlPath.replace(`{${"incident"}}`, encodeURIComponent(String(requestParameters['incident'])));
773
+
774
+ const response = await this.request({
775
+ path: urlPath,
776
+ method: 'GET',
777
+ headers: headerParameters,
778
+ query: queryParameters,
779
+ }, initOverrides);
780
+
781
+ return new runtime.JSONApiResponse(response, (jsonValue) => IncidentResourceFromJSON(jsonValue));
782
+ }
783
+
784
+ /**
785
+ * Auto-generated: incidents.show
786
+ */
787
+ async incidentsShow(requestParameters: IncidentsShowRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IncidentResource> {
788
+ const response = await this.incidentsShowRaw(requestParameters, initOverrides);
789
+ return await response.value();
790
+ }
791
+
703
792
  /**
704
793
  * Auto-generated: incidents.store
705
794
  */
@@ -931,6 +1020,261 @@ export class GeneralApi extends runtime.BaseAPI {
931
1020
  return await response.value();
932
1021
  }
933
1022
 
1023
+ /**
1024
+ * Auto-generated: incidents.videos.destroy
1025
+ */
1026
+ async incidentsVideosDestroyRaw(requestParameters: IncidentsVideosDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GenericResponse>> {
1027
+ if (requestParameters['incident'] == null) {
1028
+ throw new runtime.RequiredError(
1029
+ 'incident',
1030
+ 'Required parameter "incident" was null or undefined when calling incidentsVideosDestroy().'
1031
+ );
1032
+ }
1033
+
1034
+ if (requestParameters['video'] == null) {
1035
+ throw new runtime.RequiredError(
1036
+ 'video',
1037
+ 'Required parameter "video" was null or undefined when calling incidentsVideosDestroy().'
1038
+ );
1039
+ }
1040
+
1041
+ const queryParameters: any = {};
1042
+
1043
+ const headerParameters: runtime.HTTPHeaders = {};
1044
+
1045
+ if (this.configuration && this.configuration.accessToken) {
1046
+ const token = this.configuration.accessToken;
1047
+ const tokenString = await token("bearerAuth", []);
1048
+
1049
+ if (tokenString) {
1050
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1051
+ }
1052
+ }
1053
+
1054
+ let urlPath = `/api/incidents/{incident}/videos/{video}`;
1055
+ urlPath = urlPath.replace(`{${"incident"}}`, encodeURIComponent(String(requestParameters['incident'])));
1056
+ urlPath = urlPath.replace(`{${"video"}}`, encodeURIComponent(String(requestParameters['video'])));
1057
+
1058
+ const response = await this.request({
1059
+ path: urlPath,
1060
+ method: 'DELETE',
1061
+ headers: headerParameters,
1062
+ query: queryParameters,
1063
+ }, initOverrides);
1064
+
1065
+ return new runtime.JSONApiResponse(response, (jsonValue) => GenericResponseFromJSON(jsonValue));
1066
+ }
1067
+
1068
+ /**
1069
+ * Auto-generated: incidents.videos.destroy
1070
+ */
1071
+ async incidentsVideosDestroy(requestParameters: IncidentsVideosDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GenericResponse> {
1072
+ const response = await this.incidentsVideosDestroyRaw(requestParameters, initOverrides);
1073
+ return await response.value();
1074
+ }
1075
+
1076
+ /**
1077
+ * Auto-generated: incidents.videos.retry
1078
+ */
1079
+ async incidentsVideosRetryRaw(requestParameters: IncidentsVideosRetryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<IncidentVideoResource>> {
1080
+ if (requestParameters['incident'] == null) {
1081
+ throw new runtime.RequiredError(
1082
+ 'incident',
1083
+ 'Required parameter "incident" was null or undefined when calling incidentsVideosRetry().'
1084
+ );
1085
+ }
1086
+
1087
+ if (requestParameters['video'] == null) {
1088
+ throw new runtime.RequiredError(
1089
+ 'video',
1090
+ 'Required parameter "video" was null or undefined when calling incidentsVideosRetry().'
1091
+ );
1092
+ }
1093
+
1094
+ const queryParameters: any = {};
1095
+
1096
+ const headerParameters: runtime.HTTPHeaders = {};
1097
+
1098
+ if (this.configuration && this.configuration.accessToken) {
1099
+ const token = this.configuration.accessToken;
1100
+ const tokenString = await token("bearerAuth", []);
1101
+
1102
+ if (tokenString) {
1103
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1104
+ }
1105
+ }
1106
+
1107
+ let urlPath = `/api/incidents/{incident}/videos/{video}/retry`;
1108
+ urlPath = urlPath.replace(`{${"incident"}}`, encodeURIComponent(String(requestParameters['incident'])));
1109
+ urlPath = urlPath.replace(`{${"video"}}`, encodeURIComponent(String(requestParameters['video'])));
1110
+
1111
+ const response = await this.request({
1112
+ path: urlPath,
1113
+ method: 'POST',
1114
+ headers: headerParameters,
1115
+ query: queryParameters,
1116
+ }, initOverrides);
1117
+
1118
+ return new runtime.JSONApiResponse(response, (jsonValue) => IncidentVideoResourceFromJSON(jsonValue));
1119
+ }
1120
+
1121
+ /**
1122
+ * Auto-generated: incidents.videos.retry
1123
+ */
1124
+ async incidentsVideosRetry(requestParameters: IncidentsVideosRetryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IncidentVideoResource> {
1125
+ const response = await this.incidentsVideosRetryRaw(requestParameters, initOverrides);
1126
+ return await response.value();
1127
+ }
1128
+
1129
+ /**
1130
+ * Auto-generated: incidents.videos.signedUrl
1131
+ */
1132
+ async incidentsVideosSignedUrlRaw(requestParameters: IncidentsVideosSignedUrlRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<IncidentVideoSignedUrlResource>> {
1133
+ if (requestParameters['incident'] == null) {
1134
+ throw new runtime.RequiredError(
1135
+ 'incident',
1136
+ 'Required parameter "incident" was null or undefined when calling incidentsVideosSignedUrl().'
1137
+ );
1138
+ }
1139
+
1140
+ if (requestParameters['video'] == null) {
1141
+ throw new runtime.RequiredError(
1142
+ 'video',
1143
+ 'Required parameter "video" was null or undefined when calling incidentsVideosSignedUrl().'
1144
+ );
1145
+ }
1146
+
1147
+ const queryParameters: any = {};
1148
+
1149
+ const headerParameters: runtime.HTTPHeaders = {};
1150
+
1151
+ if (this.configuration && this.configuration.accessToken) {
1152
+ const token = this.configuration.accessToken;
1153
+ const tokenString = await token("bearerAuth", []);
1154
+
1155
+ if (tokenString) {
1156
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1157
+ }
1158
+ }
1159
+
1160
+ let urlPath = `/api/incidents/{incident}/videos/{video}/signed-url`;
1161
+ urlPath = urlPath.replace(`{${"incident"}}`, encodeURIComponent(String(requestParameters['incident'])));
1162
+ urlPath = urlPath.replace(`{${"video"}}`, encodeURIComponent(String(requestParameters['video'])));
1163
+
1164
+ const response = await this.request({
1165
+ path: urlPath,
1166
+ method: 'GET',
1167
+ headers: headerParameters,
1168
+ query: queryParameters,
1169
+ }, initOverrides);
1170
+
1171
+ return new runtime.JSONApiResponse(response, (jsonValue) => IncidentVideoSignedUrlResourceFromJSON(jsonValue));
1172
+ }
1173
+
1174
+ /**
1175
+ * Auto-generated: incidents.videos.signedUrl
1176
+ */
1177
+ async incidentsVideosSignedUrl(requestParameters: IncidentsVideosSignedUrlRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IncidentVideoSignedUrlResource> {
1178
+ const response = await this.incidentsVideosSignedUrlRaw(requestParameters, initOverrides);
1179
+ return await response.value();
1180
+ }
1181
+
1182
+ /**
1183
+ * Auto-generated: incidents.videos.store
1184
+ */
1185
+ async incidentsVideosStoreRaw(requestParameters: IncidentsVideosStoreOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<IncidentVideoResource>> {
1186
+ if (requestParameters['incident'] == null) {
1187
+ throw new runtime.RequiredError(
1188
+ 'incident',
1189
+ 'Required parameter "incident" was null or undefined when calling incidentsVideosStore().'
1190
+ );
1191
+ }
1192
+
1193
+ const queryParameters: any = {};
1194
+
1195
+ const headerParameters: runtime.HTTPHeaders = {};
1196
+
1197
+ headerParameters['Content-Type'] = 'application/json';
1198
+
1199
+ if (this.configuration && this.configuration.accessToken) {
1200
+ const token = this.configuration.accessToken;
1201
+ const tokenString = await token("bearerAuth", []);
1202
+
1203
+ if (tokenString) {
1204
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1205
+ }
1206
+ }
1207
+
1208
+ let urlPath = `/api/incidents/{incident}/videos`;
1209
+ urlPath = urlPath.replace(`{${"incident"}}`, encodeURIComponent(String(requestParameters['incident'])));
1210
+
1211
+ const response = await this.request({
1212
+ path: urlPath,
1213
+ method: 'POST',
1214
+ headers: headerParameters,
1215
+ query: queryParameters,
1216
+ body: IncidentsVideosStoreRequestToJSON(requestParameters['incidentsVideosStoreRequest']),
1217
+ }, initOverrides);
1218
+
1219
+ return new runtime.JSONApiResponse(response, (jsonValue) => IncidentVideoResourceFromJSON(jsonValue));
1220
+ }
1221
+
1222
+ /**
1223
+ * Auto-generated: incidents.videos.store
1224
+ */
1225
+ async incidentsVideosStore(requestParameters: IncidentsVideosStoreOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IncidentVideoResource> {
1226
+ const response = await this.incidentsVideosStoreRaw(requestParameters, initOverrides);
1227
+ return await response.value();
1228
+ }
1229
+
1230
+ /**
1231
+ * Auto-generated: incidents.videos.uploadToken
1232
+ */
1233
+ async incidentsVideosUploadTokenRaw(requestParameters: IncidentsVideosUploadTokenOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<IncidentVideoUploadTokenResource>> {
1234
+ if (requestParameters['incident'] == null) {
1235
+ throw new runtime.RequiredError(
1236
+ 'incident',
1237
+ 'Required parameter "incident" was null or undefined when calling incidentsVideosUploadToken().'
1238
+ );
1239
+ }
1240
+
1241
+ const queryParameters: any = {};
1242
+
1243
+ const headerParameters: runtime.HTTPHeaders = {};
1244
+
1245
+ headerParameters['Content-Type'] = 'application/json';
1246
+
1247
+ if (this.configuration && this.configuration.accessToken) {
1248
+ const token = this.configuration.accessToken;
1249
+ const tokenString = await token("bearerAuth", []);
1250
+
1251
+ if (tokenString) {
1252
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1253
+ }
1254
+ }
1255
+
1256
+ let urlPath = `/api/incidents/{incident}/videos/upload-token`;
1257
+ urlPath = urlPath.replace(`{${"incident"}}`, encodeURIComponent(String(requestParameters['incident'])));
1258
+
1259
+ const response = await this.request({
1260
+ path: urlPath,
1261
+ method: 'POST',
1262
+ headers: headerParameters,
1263
+ query: queryParameters,
1264
+ body: IncidentsVideosUploadTokenRequestToJSON(requestParameters['incidentsVideosUploadTokenRequest']),
1265
+ }, initOverrides);
1266
+
1267
+ return new runtime.JSONApiResponse(response, (jsonValue) => IncidentVideoUploadTokenResourceFromJSON(jsonValue));
1268
+ }
1269
+
1270
+ /**
1271
+ * Auto-generated: incidents.videos.uploadToken
1272
+ */
1273
+ async incidentsVideosUploadToken(requestParameters: IncidentsVideosUploadTokenOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IncidentVideoUploadTokenResource> {
1274
+ const response = await this.incidentsVideosUploadTokenRaw(requestParameters, initOverrides);
1275
+ return await response.value();
1276
+ }
1277
+
934
1278
  /**
935
1279
  * Auto-generated: indexMinimalUser
936
1280
  */
@@ -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,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,12 @@ 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;
150
163
  }
151
164
 
152
165
  /**
@@ -163,6 +176,7 @@ export function instanceOfIncidentResource(value: object): value is IncidentReso
163
176
  if (!('incidentFieldSchema' in value) || value['incidentFieldSchema'] === undefined) return false;
164
177
  if (!('fields' in value) || value['fields'] === undefined) return false;
165
178
  if (!('fieldAudits' in value) || value['fieldAudits'] === undefined) return false;
179
+ if (!('videos' in value) || value['videos'] === undefined) return false;
166
180
  return true;
167
181
  }
168
182
 
@@ -189,6 +203,7 @@ export function IncidentResourceFromJSONTyped(json: any, ignoreDiscriminator: bo
189
203
  'updatedAt': json['updatedAt'] == null ? undefined : (new Date(json['updatedAt'])),
190
204
  'fields': json['fields'],
191
205
  'fieldAudits': (json['fieldAudits'] == null ? null : (json['fieldAudits'] as Array<any>).map(IncidentFieldAuditResourceFromJSON)),
206
+ 'videos': (json['videos'] == null ? null : (json['videos'] as Array<any>).map(IncidentVideoResourceFromJSON)),
192
207
  };
193
208
  }
194
209
 
@@ -216,6 +231,7 @@ export function IncidentResourceToJSONTyped(value?: IncidentResource | null, ign
216
231
  'updatedAt': value['updatedAt'] === null ? null : ((value['updatedAt'] as any)?.toISOString()),
217
232
  'fields': value['fields'],
218
233
  'fieldAudits': (value['fieldAudits'] == null ? null : (value['fieldAudits'] as Array<any>).map(IncidentFieldAuditResourceToJSON)),
234
+ 'videos': (value['videos'] == null ? null : (value['videos'] as Array<any>).map(IncidentVideoResourceToJSON)),
219
235
  };
220
236
  }
221
237
 
@@ -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
+
@@ -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 { IncidentVideoResource } from './IncidentVideoResource';
17
+ import {
18
+ IncidentVideoResourceFromJSON,
19
+ IncidentVideoResourceFromJSONTyped,
20
+ IncidentVideoResourceToJSON,
21
+ IncidentVideoResourceToJSONTyped,
22
+ } from './IncidentVideoResource';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface IncidentVideoResourceArrayResponse
28
+ */
29
+ export interface IncidentVideoResourceArrayResponse {
30
+ /**
31
+ *
32
+ * @type {Array<IncidentVideoResource>}
33
+ * @memberof IncidentVideoResourceArrayResponse
34
+ */
35
+ data?: Array<IncidentVideoResource>;
36
+ }
37
+
38
+ /**
39
+ * Check if a given object implements the IncidentVideoResourceArrayResponse interface.
40
+ */
41
+ export function instanceOfIncidentVideoResourceArrayResponse(value: object): value is IncidentVideoResourceArrayResponse {
42
+ return true;
43
+ }
44
+
45
+ export function IncidentVideoResourceArrayResponseFromJSON(json: any): IncidentVideoResourceArrayResponse {
46
+ return IncidentVideoResourceArrayResponseFromJSONTyped(json, false);
47
+ }
48
+
49
+ export function IncidentVideoResourceArrayResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): IncidentVideoResourceArrayResponse {
50
+ if (json == null) {
51
+ return json;
52
+ }
53
+ return {
54
+
55
+ 'data': json['data'] == null ? undefined : ((json['data'] as Array<any>).map(IncidentVideoResourceFromJSON)),
56
+ };
57
+ }
58
+
59
+ export function IncidentVideoResourceArrayResponseToJSON(json: any): IncidentVideoResourceArrayResponse {
60
+ return IncidentVideoResourceArrayResponseToJSONTyped(json, false);
61
+ }
62
+
63
+ export function IncidentVideoResourceArrayResponseToJSONTyped(value?: IncidentVideoResourceArrayResponse | 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(IncidentVideoResourceToJSON)),
71
+ };
72
+ }
73
+