@digital8/security-registers-backend-ts-sdk 0.0.216 → 0.0.217

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 (90) hide show
  1. package/.openapi-generator/FILES +17 -2
  2. package/README.md +2 -2
  3. package/dist/apis/GeneralApi.d.ts +142 -3
  4. package/dist/apis/GeneralApi.js +694 -1
  5. package/dist/models/AssetResource.d.ts +1 -1
  6. package/dist/models/AssetResource.js +1 -3
  7. package/dist/models/IncidentFieldAuditResource.d.ts +56 -0
  8. package/dist/models/IncidentFieldAuditResource.js +67 -0
  9. package/dist/models/IncidentFieldAuditResourceArrayResponse.d.ts +33 -0
  10. package/dist/models/IncidentFieldAuditResourceArrayResponse.js +50 -0
  11. package/dist/models/IncidentFieldsResourceArrayResponse.d.ts +32 -0
  12. package/dist/models/IncidentFieldsResourceArrayResponse.js +49 -0
  13. package/dist/models/IncidentResource.d.ts +118 -0
  14. package/dist/models/IncidentResource.js +106 -0
  15. package/dist/models/IncidentResourceArrayResponse.d.ts +33 -0
  16. package/dist/models/IncidentResourceArrayResponse.js +50 -0
  17. package/dist/models/IncidentVersionResource.d.ts +57 -0
  18. package/dist/models/IncidentVersionResource.js +68 -0
  19. package/dist/models/IncidentVersionResourceArrayResponse.d.ts +33 -0
  20. package/dist/models/IncidentVersionResourceArrayResponse.js +50 -0
  21. package/dist/models/IncidentVideoResource.d.ts +74 -0
  22. package/dist/models/IncidentVideoResource.js +72 -0
  23. package/dist/models/IncidentVideoResourceArrayResponse.d.ts +33 -0
  24. package/dist/models/IncidentVideoResourceArrayResponse.js +50 -0
  25. package/dist/models/IncidentVideoSignedUrlResource.d.ts +32 -0
  26. package/dist/models/IncidentVideoSignedUrlResource.js +51 -0
  27. package/dist/models/IncidentVideoSignedUrlResourceArrayResponse.d.ts +33 -0
  28. package/dist/models/IncidentVideoSignedUrlResourceArrayResponse.js +50 -0
  29. package/dist/models/IncidentVideoUploadTokenResource.d.ts +50 -0
  30. package/dist/models/IncidentVideoUploadTokenResource.js +63 -0
  31. package/dist/models/IncidentVideoUploadTokenResourceArrayResponse.d.ts +33 -0
  32. package/dist/models/IncidentVideoUploadTokenResourceArrayResponse.js +50 -0
  33. package/dist/models/IncidentsStoreRequest.d.ts +38 -0
  34. package/dist/models/IncidentsStoreRequest.js +55 -0
  35. package/dist/models/IncidentsUpdateRequest.d.ts +32 -0
  36. package/dist/models/IncidentsUpdateRequest.js +51 -0
  37. package/dist/models/IncidentsVideosStoreRequest.d.ts +44 -0
  38. package/dist/models/IncidentsVideosStoreRequest.js +59 -0
  39. package/dist/models/IncidentsVideosUploadTokenRequest.d.ts +44 -0
  40. package/dist/models/IncidentsVideosUploadTokenRequest.js +59 -0
  41. package/dist/models/LicencesVerifyRequest.d.ts +3 -21
  42. package/dist/models/LicencesVerifyRequest.js +6 -14
  43. package/dist/models/RegisterGroupedByRosterResource.d.ts +1 -1
  44. package/dist/models/RegisterGroupedByRosterResource.js +4 -3
  45. package/dist/models/RegisterListResource.d.ts +3 -3
  46. package/dist/models/RegisterListResource.js +3 -4
  47. package/dist/models/RegisterResource.d.ts +1 -1
  48. package/dist/models/RegisterResource.js +7 -5
  49. package/dist/models/RosterLiteResource.d.ts +1 -1
  50. package/dist/models/RosterLiteResource.js +3 -4
  51. package/dist/models/RosterResource.d.ts +1 -1
  52. package/dist/models/RosterResource.js +4 -3
  53. package/dist/models/SecurityCompanyResource.d.ts +1 -1
  54. package/dist/models/SecurityCompanyResource.js +3 -1
  55. package/dist/models/index.d.ts +17 -2
  56. package/dist/models/index.js +17 -2
  57. package/package.json +1 -1
  58. package/src/apis/GeneralApi.ts +664 -6
  59. package/src/models/AssetResource.ts +2 -3
  60. package/src/models/IncidentFieldAuditResource.ts +102 -0
  61. package/src/models/IncidentFieldAuditResourceArrayResponse.ts +73 -0
  62. package/src/models/IncidentFieldsResourceArrayResponse.ts +65 -0
  63. package/src/models/IncidentResource.ts +237 -0
  64. package/src/models/IncidentResourceArrayResponse.ts +73 -0
  65. package/src/models/IncidentVersionResource.ts +110 -0
  66. package/src/models/IncidentVersionResourceArrayResponse.ts +73 -0
  67. package/src/models/IncidentVideoResource.ts +125 -0
  68. package/src/models/IncidentVideoResourceArrayResponse.ts +73 -0
  69. package/src/models/IncidentVideoSignedUrlResource.ts +66 -0
  70. package/src/models/IncidentVideoSignedUrlResourceArrayResponse.ts +73 -0
  71. package/src/models/IncidentVideoUploadTokenResource.ts +93 -0
  72. package/src/models/IncidentVideoUploadTokenResourceArrayResponse.ts +73 -0
  73. package/src/models/IncidentsStoreRequest.ts +75 -0
  74. package/src/models/IncidentsUpdateRequest.ts +66 -0
  75. package/src/models/IncidentsVideosStoreRequest.ts +84 -0
  76. package/src/models/IncidentsVideosUploadTokenRequest.ts +84 -0
  77. package/src/models/LicencesVerifyRequest.ts +8 -33
  78. package/src/models/RegisterGroupedByRosterResource.ts +4 -3
  79. package/src/models/RegisterListResource.ts +5 -6
  80. package/src/models/RegisterResource.ts +4 -3
  81. package/src/models/RosterLiteResource.ts +3 -4
  82. package/src/models/RosterResource.ts +4 -3
  83. package/src/models/SecurityCompanyResource.ts +3 -2
  84. package/src/models/index.ts +17 -2
  85. package/dist/models/LicenceVerificationResultResource.d.ts +0 -44
  86. package/dist/models/LicenceVerificationResultResource.js +0 -59
  87. package/dist/models/LicenceVerificationResultResourceArrayResponse.d.ts +0 -33
  88. package/dist/models/LicenceVerificationResultResourceArrayResponse.js +0 -50
  89. package/src/models/LicenceVerificationResultResource.ts +0 -84
  90. package/src/models/LicenceVerificationResultResourceArrayResponse.ts +0 -73
@@ -48,7 +48,7 @@ export interface AssetResource {
48
48
  * @type {string}
49
49
  * @memberof AssetResource
50
50
  */
51
- altText: string;
51
+ altText?: string | null;
52
52
  /**
53
53
  *
54
54
  * @type {number}
@@ -71,7 +71,6 @@ 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;
75
74
  if (!('index' in value) || value['index'] === undefined) return false;
76
75
  if (!('fileId' in value) || value['fileId'] === undefined) return false;
77
76
  return true;
@@ -91,7 +90,7 @@ export function AssetResourceFromJSONTyped(json: any, ignoreDiscriminator: boole
91
90
  'filePath': json['filePath'],
92
91
  'fileName': json['fileName'],
93
92
  'mimeType': json['mimeType'],
94
- 'altText': json['altText'],
93
+ 'altText': json['altText'] == null ? undefined : json['altText'],
95
94
  'index': json['index'],
96
95
  'fileId': json['fileId'],
97
96
  };
@@ -0,0 +1,102 @@
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 IncidentFieldAuditResource
20
+ */
21
+ export interface IncidentFieldAuditResource {
22
+ /**
23
+ *
24
+ * @type {number}
25
+ * @memberof IncidentFieldAuditResource
26
+ */
27
+ id: number;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof IncidentFieldAuditResource
32
+ */
33
+ sectionKey: string;
34
+ /**
35
+ *
36
+ * @type {string}
37
+ * @memberof IncidentFieldAuditResource
38
+ */
39
+ fieldKey: string;
40
+ /**
41
+ *
42
+ * @type {string}
43
+ * @memberof IncidentFieldAuditResource
44
+ */
45
+ previousValue: string;
46
+ /**
47
+ *
48
+ * @type {object}
49
+ * @memberof IncidentFieldAuditResource
50
+ */
51
+ changedAt: object;
52
+ }
53
+
54
+ /**
55
+ * Check if a given object implements the IncidentFieldAuditResource interface.
56
+ */
57
+ export function instanceOfIncidentFieldAuditResource(value: object): value is IncidentFieldAuditResource {
58
+ if (!('id' in value) || value['id'] === undefined) return false;
59
+ if (!('sectionKey' in value) || value['sectionKey'] === undefined) return false;
60
+ if (!('fieldKey' in value) || value['fieldKey'] === undefined) return false;
61
+ if (!('previousValue' in value) || value['previousValue'] === undefined) return false;
62
+ if (!('changedAt' in value) || value['changedAt'] === undefined) return false;
63
+ return true;
64
+ }
65
+
66
+ export function IncidentFieldAuditResourceFromJSON(json: any): IncidentFieldAuditResource {
67
+ return IncidentFieldAuditResourceFromJSONTyped(json, false);
68
+ }
69
+
70
+ export function IncidentFieldAuditResourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): IncidentFieldAuditResource {
71
+ if (json == null) {
72
+ return json;
73
+ }
74
+ return {
75
+
76
+ 'id': json['id'],
77
+ 'sectionKey': json['sectionKey'],
78
+ 'fieldKey': json['fieldKey'],
79
+ 'previousValue': json['previousValue'],
80
+ 'changedAt': json['changedAt'],
81
+ };
82
+ }
83
+
84
+ export function IncidentFieldAuditResourceToJSON(json: any): IncidentFieldAuditResource {
85
+ return IncidentFieldAuditResourceToJSONTyped(json, false);
86
+ }
87
+
88
+ export function IncidentFieldAuditResourceToJSONTyped(value?: IncidentFieldAuditResource | null, ignoreDiscriminator: boolean = false): any {
89
+ if (value == null) {
90
+ return value;
91
+ }
92
+
93
+ return {
94
+
95
+ 'id': value['id'],
96
+ 'sectionKey': value['sectionKey'],
97
+ 'fieldKey': value['fieldKey'],
98
+ 'previousValue': value['previousValue'],
99
+ 'changedAt': value['changedAt'],
100
+ };
101
+ }
102
+
@@ -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 { IncidentFieldAuditResource } from './IncidentFieldAuditResource';
17
+ import {
18
+ IncidentFieldAuditResourceFromJSON,
19
+ IncidentFieldAuditResourceFromJSONTyped,
20
+ IncidentFieldAuditResourceToJSON,
21
+ IncidentFieldAuditResourceToJSONTyped,
22
+ } from './IncidentFieldAuditResource';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface IncidentFieldAuditResourceArrayResponse
28
+ */
29
+ export interface IncidentFieldAuditResourceArrayResponse {
30
+ /**
31
+ *
32
+ * @type {Array<IncidentFieldAuditResource>}
33
+ * @memberof IncidentFieldAuditResourceArrayResponse
34
+ */
35
+ data?: Array<IncidentFieldAuditResource>;
36
+ }
37
+
38
+ /**
39
+ * Check if a given object implements the IncidentFieldAuditResourceArrayResponse interface.
40
+ */
41
+ export function instanceOfIncidentFieldAuditResourceArrayResponse(value: object): value is IncidentFieldAuditResourceArrayResponse {
42
+ return true;
43
+ }
44
+
45
+ export function IncidentFieldAuditResourceArrayResponseFromJSON(json: any): IncidentFieldAuditResourceArrayResponse {
46
+ return IncidentFieldAuditResourceArrayResponseFromJSONTyped(json, false);
47
+ }
48
+
49
+ export function IncidentFieldAuditResourceArrayResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): IncidentFieldAuditResourceArrayResponse {
50
+ if (json == null) {
51
+ return json;
52
+ }
53
+ return {
54
+
55
+ 'data': json['data'] == null ? undefined : ((json['data'] as Array<any>).map(IncidentFieldAuditResourceFromJSON)),
56
+ };
57
+ }
58
+
59
+ export function IncidentFieldAuditResourceArrayResponseToJSON(json: any): IncidentFieldAuditResourceArrayResponse {
60
+ return IncidentFieldAuditResourceArrayResponseToJSONTyped(json, false);
61
+ }
62
+
63
+ export function IncidentFieldAuditResourceArrayResponseToJSONTyped(value?: IncidentFieldAuditResourceArrayResponse | 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(IncidentFieldAuditResourceToJSON)),
71
+ };
72
+ }
73
+
@@ -0,0 +1,65 @@
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 IncidentFieldsResourceArrayResponse
20
+ */
21
+ export interface IncidentFieldsResourceArrayResponse {
22
+ /**
23
+ *
24
+ * @type {Array<object>}
25
+ * @memberof IncidentFieldsResourceArrayResponse
26
+ */
27
+ data?: Array<object>;
28
+ }
29
+
30
+ /**
31
+ * Check if a given object implements the IncidentFieldsResourceArrayResponse interface.
32
+ */
33
+ export function instanceOfIncidentFieldsResourceArrayResponse(value: object): value is IncidentFieldsResourceArrayResponse {
34
+ return true;
35
+ }
36
+
37
+ export function IncidentFieldsResourceArrayResponseFromJSON(json: any): IncidentFieldsResourceArrayResponse {
38
+ return IncidentFieldsResourceArrayResponseFromJSONTyped(json, false);
39
+ }
40
+
41
+ export function IncidentFieldsResourceArrayResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): IncidentFieldsResourceArrayResponse {
42
+ if (json == null) {
43
+ return json;
44
+ }
45
+ return {
46
+
47
+ 'data': json['data'] == null ? undefined : json['data'],
48
+ };
49
+ }
50
+
51
+ export function IncidentFieldsResourceArrayResponseToJSON(json: any): IncidentFieldsResourceArrayResponse {
52
+ return IncidentFieldsResourceArrayResponseToJSONTyped(json, false);
53
+ }
54
+
55
+ export function IncidentFieldsResourceArrayResponseToJSONTyped(value?: IncidentFieldsResourceArrayResponse | null, ignoreDiscriminator: boolean = false): any {
56
+ if (value == null) {
57
+ return value;
58
+ }
59
+
60
+ return {
61
+
62
+ 'data': value['data'],
63
+ };
64
+ }
65
+
@@ -0,0 +1,237 @@
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 { IncidentFieldSchemaResource } from './IncidentFieldSchemaResource';
24
+ import {
25
+ IncidentFieldSchemaResourceFromJSON,
26
+ IncidentFieldSchemaResourceFromJSONTyped,
27
+ IncidentFieldSchemaResourceToJSON,
28
+ IncidentFieldSchemaResourceToJSONTyped,
29
+ } from './IncidentFieldSchemaResource';
30
+ import type { RosterLiteResource } from './RosterLiteResource';
31
+ import {
32
+ RosterLiteResourceFromJSON,
33
+ RosterLiteResourceFromJSONTyped,
34
+ RosterLiteResourceToJSON,
35
+ RosterLiteResourceToJSONTyped,
36
+ } from './RosterLiteResource';
37
+ import type { IncidentFieldAuditResource } from './IncidentFieldAuditResource';
38
+ import {
39
+ IncidentFieldAuditResourceFromJSON,
40
+ IncidentFieldAuditResourceFromJSONTyped,
41
+ IncidentFieldAuditResourceToJSON,
42
+ IncidentFieldAuditResourceToJSONTyped,
43
+ } from './IncidentFieldAuditResource';
44
+ import type { SecurityCompanyLiteResource } from './SecurityCompanyLiteResource';
45
+ import {
46
+ SecurityCompanyLiteResourceFromJSON,
47
+ SecurityCompanyLiteResourceFromJSONTyped,
48
+ SecurityCompanyLiteResourceToJSON,
49
+ SecurityCompanyLiteResourceToJSONTyped,
50
+ } from './SecurityCompanyLiteResource';
51
+ import type { IncidentVideoResource } from './IncidentVideoResource';
52
+ import {
53
+ IncidentVideoResourceFromJSON,
54
+ IncidentVideoResourceFromJSONTyped,
55
+ IncidentVideoResourceToJSON,
56
+ IncidentVideoResourceToJSONTyped,
57
+ } from './IncidentVideoResource';
58
+ import type { UserLiteResource } from './UserLiteResource';
59
+ import {
60
+ UserLiteResourceFromJSON,
61
+ UserLiteResourceFromJSONTyped,
62
+ UserLiteResourceToJSON,
63
+ UserLiteResourceToJSONTyped,
64
+ } from './UserLiteResource';
65
+ import type { RegisterLiteResource } from './RegisterLiteResource';
66
+ import {
67
+ RegisterLiteResourceFromJSON,
68
+ RegisterLiteResourceFromJSONTyped,
69
+ RegisterLiteResourceToJSON,
70
+ RegisterLiteResourceToJSONTyped,
71
+ } from './RegisterLiteResource';
72
+
73
+ /**
74
+ *
75
+ * @export
76
+ * @interface IncidentResource
77
+ */
78
+ export interface IncidentResource {
79
+ /**
80
+ *
81
+ * @type {number}
82
+ * @memberof IncidentResource
83
+ */
84
+ id: number;
85
+ /**
86
+ *
87
+ * @type {VenueLiteResource}
88
+ * @memberof IncidentResource
89
+ */
90
+ venue: VenueLiteResource | null;
91
+ /**
92
+ *
93
+ * @type {SecurityCompanyLiteResource}
94
+ * @memberof IncidentResource
95
+ */
96
+ securityCompany: SecurityCompanyLiteResource | null;
97
+ /**
98
+ *
99
+ * @type {RosterLiteResource}
100
+ * @memberof IncidentResource
101
+ */
102
+ roster: RosterLiteResource | null;
103
+ /**
104
+ *
105
+ * @type {RegisterLiteResource}
106
+ * @memberof IncidentResource
107
+ */
108
+ register: RegisterLiteResource | null;
109
+ /**
110
+ *
111
+ * @type {UserLiteResource}
112
+ * @memberof IncidentResource
113
+ */
114
+ user: UserLiteResource | null;
115
+ /**
116
+ *
117
+ * @type {UserLiteResource}
118
+ * @memberof IncidentResource
119
+ */
120
+ approvedByUser: UserLiteResource | null;
121
+ /**
122
+ *
123
+ * @type {IncidentFieldSchemaResource}
124
+ * @memberof IncidentResource
125
+ */
126
+ incidentFieldSchema: IncidentFieldSchemaResource | null;
127
+ /**
128
+ *
129
+ * @type {Date}
130
+ * @memberof IncidentResource
131
+ */
132
+ approvedAt?: Date | null;
133
+ /**
134
+ *
135
+ * @type {Date}
136
+ * @memberof IncidentResource
137
+ */
138
+ createdAt?: Date | null;
139
+ /**
140
+ *
141
+ * @type {Date}
142
+ * @memberof IncidentResource
143
+ */
144
+ updatedAt?: Date | null;
145
+ /**
146
+ * Incident field values grouped by section key. Each section is an object of field_key => value for non-repeatable sections, or an array of such objects for repeatable sections. Shape is driven by the venue state's IncidentFieldSchema. Datetime values are returned in the venue's timezone.
147
+ * @type {object}
148
+ * @memberof IncidentResource
149
+ */
150
+ fields: object;
151
+ /**
152
+ *
153
+ * @type {Array<IncidentFieldAuditResource>}
154
+ * @memberof IncidentResource
155
+ */
156
+ fieldAudits: Array<IncidentFieldAuditResource> | null;
157
+ /**
158
+ *
159
+ * @type {Array<IncidentVideoResource>}
160
+ * @memberof IncidentResource
161
+ */
162
+ videos: Array<IncidentVideoResource> | null;
163
+ }
164
+
165
+ /**
166
+ * Check if a given object implements the IncidentResource interface.
167
+ */
168
+ export function instanceOfIncidentResource(value: object): value is IncidentResource {
169
+ if (!('id' in value) || value['id'] === undefined) return false;
170
+ if (!('venue' in value) || value['venue'] === undefined) return false;
171
+ if (!('securityCompany' in value) || value['securityCompany'] === undefined) return false;
172
+ if (!('roster' in value) || value['roster'] === undefined) return false;
173
+ if (!('register' in value) || value['register'] === undefined) return false;
174
+ if (!('user' in value) || value['user'] === undefined) return false;
175
+ if (!('approvedByUser' in value) || value['approvedByUser'] === undefined) return false;
176
+ if (!('incidentFieldSchema' in value) || value['incidentFieldSchema'] === undefined) return false;
177
+ if (!('fields' in value) || value['fields'] === undefined) return false;
178
+ if (!('fieldAudits' in value) || value['fieldAudits'] === undefined) return false;
179
+ if (!('videos' in value) || value['videos'] === undefined) return false;
180
+ return true;
181
+ }
182
+
183
+ export function IncidentResourceFromJSON(json: any): IncidentResource {
184
+ return IncidentResourceFromJSONTyped(json, false);
185
+ }
186
+
187
+ export function IncidentResourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): IncidentResource {
188
+ if (json == null) {
189
+ return json;
190
+ }
191
+ return {
192
+
193
+ 'id': json['id'],
194
+ 'venue': VenueLiteResourceFromJSON(json['venue']),
195
+ 'securityCompany': SecurityCompanyLiteResourceFromJSON(json['securityCompany']),
196
+ 'roster': RosterLiteResourceFromJSON(json['roster']),
197
+ 'register': RegisterLiteResourceFromJSON(json['register']),
198
+ 'user': UserLiteResourceFromJSON(json['user']),
199
+ 'approvedByUser': UserLiteResourceFromJSON(json['approvedByUser']),
200
+ 'incidentFieldSchema': IncidentFieldSchemaResourceFromJSON(json['incidentFieldSchema']),
201
+ 'approvedAt': json['approvedAt'] == null ? undefined : (new Date(json['approvedAt'])),
202
+ 'createdAt': json['createdAt'] == null ? undefined : (new Date(json['createdAt'])),
203
+ 'updatedAt': json['updatedAt'] == null ? undefined : (new Date(json['updatedAt'])),
204
+ 'fields': json['fields'],
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)),
207
+ };
208
+ }
209
+
210
+ export function IncidentResourceToJSON(json: any): IncidentResource {
211
+ return IncidentResourceToJSONTyped(json, false);
212
+ }
213
+
214
+ export function IncidentResourceToJSONTyped(value?: IncidentResource | null, ignoreDiscriminator: boolean = false): any {
215
+ if (value == null) {
216
+ return value;
217
+ }
218
+
219
+ return {
220
+
221
+ 'id': value['id'],
222
+ 'venue': VenueLiteResourceToJSON(value['venue']),
223
+ 'securityCompany': SecurityCompanyLiteResourceToJSON(value['securityCompany']),
224
+ 'roster': RosterLiteResourceToJSON(value['roster']),
225
+ 'register': RegisterLiteResourceToJSON(value['register']),
226
+ 'user': UserLiteResourceToJSON(value['user']),
227
+ 'approvedByUser': UserLiteResourceToJSON(value['approvedByUser']),
228
+ 'incidentFieldSchema': IncidentFieldSchemaResourceToJSON(value['incidentFieldSchema']),
229
+ 'approvedAt': value['approvedAt'] === null ? null : ((value['approvedAt'] as any)?.toISOString()),
230
+ 'createdAt': value['createdAt'] === null ? null : ((value['createdAt'] as any)?.toISOString()),
231
+ 'updatedAt': value['updatedAt'] === null ? null : ((value['updatedAt'] as any)?.toISOString()),
232
+ 'fields': value['fields'],
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)),
235
+ };
236
+ }
237
+
@@ -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 { IncidentResource } from './IncidentResource';
17
+ import {
18
+ IncidentResourceFromJSON,
19
+ IncidentResourceFromJSONTyped,
20
+ IncidentResourceToJSON,
21
+ IncidentResourceToJSONTyped,
22
+ } from './IncidentResource';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface IncidentResourceArrayResponse
28
+ */
29
+ export interface IncidentResourceArrayResponse {
30
+ /**
31
+ *
32
+ * @type {Array<IncidentResource>}
33
+ * @memberof IncidentResourceArrayResponse
34
+ */
35
+ data?: Array<IncidentResource>;
36
+ }
37
+
38
+ /**
39
+ * Check if a given object implements the IncidentResourceArrayResponse interface.
40
+ */
41
+ export function instanceOfIncidentResourceArrayResponse(value: object): value is IncidentResourceArrayResponse {
42
+ return true;
43
+ }
44
+
45
+ export function IncidentResourceArrayResponseFromJSON(json: any): IncidentResourceArrayResponse {
46
+ return IncidentResourceArrayResponseFromJSONTyped(json, false);
47
+ }
48
+
49
+ export function IncidentResourceArrayResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): IncidentResourceArrayResponse {
50
+ if (json == null) {
51
+ return json;
52
+ }
53
+ return {
54
+
55
+ 'data': json['data'] == null ? undefined : ((json['data'] as Array<any>).map(IncidentResourceFromJSON)),
56
+ };
57
+ }
58
+
59
+ export function IncidentResourceArrayResponseToJSON(json: any): IncidentResourceArrayResponse {
60
+ return IncidentResourceArrayResponseToJSONTyped(json, false);
61
+ }
62
+
63
+ export function IncidentResourceArrayResponseToJSONTyped(value?: IncidentResourceArrayResponse | 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(IncidentResourceToJSON)),
71
+ };
72
+ }
73
+
@@ -0,0 +1,110 @@
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 { UserLiteResource } from './UserLiteResource';
17
+ import {
18
+ UserLiteResourceFromJSON,
19
+ UserLiteResourceFromJSONTyped,
20
+ UserLiteResourceToJSON,
21
+ UserLiteResourceToJSONTyped,
22
+ } from './UserLiteResource';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface IncidentVersionResource
28
+ */
29
+ export interface IncidentVersionResource {
30
+ /**
31
+ *
32
+ * @type {number}
33
+ * @memberof IncidentVersionResource
34
+ */
35
+ id: number;
36
+ /**
37
+ *
38
+ * @type {number}
39
+ * @memberof IncidentVersionResource
40
+ */
41
+ versionNumber: number;
42
+ /**
43
+ *
44
+ * @type {UserLiteResource}
45
+ * @memberof IncidentVersionResource
46
+ */
47
+ user: UserLiteResource | null;
48
+ /**
49
+ *
50
+ * @type {Array<boolean>}
51
+ * @memberof IncidentVersionResource
52
+ */
53
+ fieldData: Array<boolean>;
54
+ /**
55
+ *
56
+ * @type {Date}
57
+ * @memberof IncidentVersionResource
58
+ */
59
+ createdAt: Date;
60
+ }
61
+
62
+ /**
63
+ * Check if a given object implements the IncidentVersionResource interface.
64
+ */
65
+ export function instanceOfIncidentVersionResource(value: object): value is IncidentVersionResource {
66
+ if (!('id' in value) || value['id'] === undefined) return false;
67
+ if (!('versionNumber' in value) || value['versionNumber'] === undefined) return false;
68
+ if (!('user' in value) || value['user'] === undefined) return false;
69
+ if (!('fieldData' in value) || value['fieldData'] === undefined) return false;
70
+ if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
71
+ return true;
72
+ }
73
+
74
+ export function IncidentVersionResourceFromJSON(json: any): IncidentVersionResource {
75
+ return IncidentVersionResourceFromJSONTyped(json, false);
76
+ }
77
+
78
+ export function IncidentVersionResourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): IncidentVersionResource {
79
+ if (json == null) {
80
+ return json;
81
+ }
82
+ return {
83
+
84
+ 'id': json['id'],
85
+ 'versionNumber': json['versionNumber'],
86
+ 'user': UserLiteResourceFromJSON(json['user']),
87
+ 'fieldData': json['fieldData'],
88
+ 'createdAt': (new Date(json['createdAt'])),
89
+ };
90
+ }
91
+
92
+ export function IncidentVersionResourceToJSON(json: any): IncidentVersionResource {
93
+ return IncidentVersionResourceToJSONTyped(json, false);
94
+ }
95
+
96
+ export function IncidentVersionResourceToJSONTyped(value?: IncidentVersionResource | null, ignoreDiscriminator: boolean = false): any {
97
+ if (value == null) {
98
+ return value;
99
+ }
100
+
101
+ return {
102
+
103
+ 'id': value['id'],
104
+ 'versionNumber': value['versionNumber'],
105
+ 'user': UserLiteResourceToJSON(value['user']),
106
+ 'fieldData': value['fieldData'],
107
+ 'createdAt': ((value['createdAt']).toISOString()),
108
+ };
109
+ }
110
+