@digital8/security-registers-backend-ts-sdk 0.0.282 → 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.
Files changed (48) hide show
  1. package/.openapi-generator/FILES +4 -3
  2. package/README.md +2 -2
  3. package/dist/apis/GeneralApi.d.ts +7 -40
  4. package/dist/apis/GeneralApi.js +8 -176
  5. package/dist/models/AddressResource.d.ts +1 -1
  6. package/dist/models/AddressResource.js +1 -3
  7. package/dist/models/AssetResource.d.ts +1 -1
  8. package/dist/models/AssetResource.js +1 -3
  9. package/dist/models/IncidentListResource.d.ts +101 -0
  10. package/dist/models/IncidentListResource.js +79 -0
  11. package/dist/models/IncidentListResourceArrayResponse.d.ts +33 -0
  12. package/dist/models/IncidentListResourceArrayResponse.js +50 -0
  13. package/dist/models/IncidentsListRequest.d.ts +151 -0
  14. package/dist/models/IncidentsListRequest.js +99 -0
  15. package/dist/models/PaginatedIncidentListResourceResponse.d.ts +40 -0
  16. package/dist/models/PaginatedIncidentListResourceResponse.js +57 -0
  17. package/dist/models/RegisterListResource.d.ts +1 -1
  18. package/dist/models/RegisterListResource.js +3 -1
  19. package/dist/models/RegisterResource.d.ts +1 -1
  20. package/dist/models/RegisterResource.js +7 -5
  21. package/dist/models/RosterWithRegistersResource.d.ts +1 -1
  22. package/dist/models/RosterWithRegistersResource.js +4 -3
  23. package/dist/models/VenueLiteResource.d.ts +6 -0
  24. package/dist/models/VenueLiteResource.js +4 -0
  25. package/dist/models/index.d.ts +4 -3
  26. package/dist/models/index.js +4 -3
  27. package/package.json +1 -1
  28. package/src/apis/GeneralApi.ts +16 -163
  29. package/src/models/AddressResource.ts +2 -3
  30. package/src/models/AssetResource.ts +2 -3
  31. package/src/models/IncidentListResource.ts +177 -0
  32. package/src/models/IncidentListResourceArrayResponse.ts +73 -0
  33. package/src/models/IncidentsListRequest.ts +222 -0
  34. package/src/models/PaginatedIncidentListResourceResponse.ts +90 -0
  35. package/src/models/RegisterListResource.ts +3 -2
  36. package/src/models/RegisterResource.ts +4 -3
  37. package/src/models/RosterWithRegistersResource.ts +4 -3
  38. package/src/models/VenueLiteResource.ts +9 -0
  39. package/src/models/index.ts +4 -3
  40. package/dist/models/IncidentsExportPdfBulkRequest.d.ts +0 -56
  41. package/dist/models/IncidentsExportPdfBulkRequest.js +0 -63
  42. package/dist/models/PdfExportQueuedResource.d.ts +0 -44
  43. package/dist/models/PdfExportQueuedResource.js +0 -59
  44. package/dist/models/PdfExportQueuedResourceArrayResponse.d.ts +0 -33
  45. package/dist/models/PdfExportQueuedResourceArrayResponse.js +0 -50
  46. package/src/models/IncidentsExportPdfBulkRequest.ts +0 -100
  47. package/src/models/PdfExportQueuedResource.ts +0 -84
  48. package/src/models/PdfExportQueuedResourceArrayResponse.ts +0 -73
@@ -26,7 +26,7 @@ import type {
26
26
  IncidentVideoSignedUrlResource,
27
27
  IncidentVideoUploadTokenResource,
28
28
  IncidentsApproveRequest,
29
- IncidentsExportPdfBulkRequest,
29
+ IncidentsListRequest,
30
30
  IncidentsStoreRequest,
31
31
  IncidentsUpdateRequest,
32
32
  IncidentsVideosStoreRequest,
@@ -45,6 +45,7 @@ import type {
45
45
  NotificationPreferenceResourceArrayResponse,
46
46
  NotificationPreferencesStoreRequest,
47
47
  NotificationTypeResourceArrayResponse,
48
+ PaginatedIncidentListResourceResponse,
48
49
  PaginatedLicenceListResourceResponse,
49
50
  PaginatedRegisterGroupedByRosterResourceResponse,
50
51
  PaginatedRosterListResourceResponse,
@@ -52,7 +53,6 @@ import type {
52
53
  PaginatedSecurityCompanyResourceResponse,
53
54
  PaginatedUserResourceResponse,
54
55
  PaginatedVenueResourceResponse,
55
- PdfExportQueuedResource,
56
56
  PdfExportResource,
57
57
  RegisterLiteResourceArrayResponse,
58
58
  RegisterResource,
@@ -122,8 +122,8 @@ import {
122
122
  IncidentVideoUploadTokenResourceToJSON,
123
123
  IncidentsApproveRequestFromJSON,
124
124
  IncidentsApproveRequestToJSON,
125
- IncidentsExportPdfBulkRequestFromJSON,
126
- IncidentsExportPdfBulkRequestToJSON,
125
+ IncidentsListRequestFromJSON,
126
+ IncidentsListRequestToJSON,
127
127
  IncidentsStoreRequestFromJSON,
128
128
  IncidentsStoreRequestToJSON,
129
129
  IncidentsUpdateRequestFromJSON,
@@ -160,6 +160,8 @@ import {
160
160
  NotificationPreferencesStoreRequestToJSON,
161
161
  NotificationTypeResourceArrayResponseFromJSON,
162
162
  NotificationTypeResourceArrayResponseToJSON,
163
+ PaginatedIncidentListResourceResponseFromJSON,
164
+ PaginatedIncidentListResourceResponseToJSON,
163
165
  PaginatedLicenceListResourceResponseFromJSON,
164
166
  PaginatedLicenceListResourceResponseToJSON,
165
167
  PaginatedRegisterGroupedByRosterResourceResponseFromJSON,
@@ -174,8 +176,6 @@ import {
174
176
  PaginatedUserResourceResponseToJSON,
175
177
  PaginatedVenueResourceResponseFromJSON,
176
178
  PaginatedVenueResourceResponseToJSON,
177
- PdfExportQueuedResourceFromJSON,
178
- PdfExportQueuedResourceToJSON,
179
179
  PdfExportResourceFromJSON,
180
180
  PdfExportResourceToJSON,
181
181
  RegisterLiteResourceArrayResponseFromJSON,
@@ -281,20 +281,8 @@ export interface IncidentsApproveOperationRequest {
281
281
  incidentsApproveRequest?: IncidentsApproveRequest;
282
282
  }
283
283
 
284
- export interface IncidentsExportPdfRequest {
285
- incident: number;
286
- }
287
-
288
- export interface IncidentsExportPdfBulkOperationRequest {
289
- incidentsExportPdfBulkRequest?: IncidentsExportPdfBulkRequest;
290
- }
291
-
292
- export interface IncidentsExportPdfDownloadRequest {
293
- pdfExport: number;
294
- }
295
-
296
- export interface IncidentsExportPdfStatusRequest {
297
- pdfExport: number;
284
+ export interface IncidentsListOperationRequest {
285
+ incidentsListRequest?: IncidentsListRequest;
298
286
  }
299
287
 
300
288
  export interface IncidentsShowRequest {
@@ -774,54 +762,9 @@ export class GeneralApi extends runtime.BaseAPI {
774
762
  }
775
763
 
776
764
  /**
777
- * Auto-generated: incidents.exportPdf
765
+ * Auto-generated: incidents.list
778
766
  */
779
- async incidentsExportPdfRaw(requestParameters: IncidentsExportPdfRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PdfExportQueuedResource>> {
780
- if (requestParameters['incident'] == null) {
781
- throw new runtime.RequiredError(
782
- 'incident',
783
- 'Required parameter "incident" was null or undefined when calling incidentsExportPdf().'
784
- );
785
- }
786
-
787
- const queryParameters: any = {};
788
-
789
- const headerParameters: runtime.HTTPHeaders = {};
790
-
791
- if (this.configuration && this.configuration.accessToken) {
792
- const token = this.configuration.accessToken;
793
- const tokenString = await token("bearerAuth", []);
794
-
795
- if (tokenString) {
796
- headerParameters["Authorization"] = `Bearer ${tokenString}`;
797
- }
798
- }
799
-
800
- let urlPath = `/api/incidents/{incident}/export-pdf`;
801
- urlPath = urlPath.replace(`{${"incident"}}`, encodeURIComponent(String(requestParameters['incident'])));
802
-
803
- const response = await this.request({
804
- path: urlPath,
805
- method: 'POST',
806
- headers: headerParameters,
807
- query: queryParameters,
808
- }, initOverrides);
809
-
810
- return new runtime.JSONApiResponse(response, (jsonValue) => PdfExportQueuedResourceFromJSON(jsonValue));
811
- }
812
-
813
- /**
814
- * Auto-generated: incidents.exportPdf
815
- */
816
- async incidentsExportPdf(requestParameters: IncidentsExportPdfRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PdfExportQueuedResource> {
817
- const response = await this.incidentsExportPdfRaw(requestParameters, initOverrides);
818
- return await response.value();
819
- }
820
-
821
- /**
822
- * Auto-generated: incidents.exportPdf.bulk
823
- */
824
- async incidentsExportPdfBulkRaw(requestParameters: IncidentsExportPdfBulkOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PdfExportQueuedResource>> {
767
+ async incidentsListRaw(requestParameters: IncidentsListOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedIncidentListResourceResponse>> {
825
768
  const queryParameters: any = {};
826
769
 
827
770
  const headerParameters: runtime.HTTPHeaders = {};
@@ -837,114 +780,24 @@ export class GeneralApi extends runtime.BaseAPI {
837
780
  }
838
781
  }
839
782
 
840
- let urlPath = `/api/incidents/export-pdf/bulk`;
841
-
842
- const response = await this.request({
843
- path: urlPath,
844
- method: 'POST',
845
- headers: headerParameters,
846
- query: queryParameters,
847
- body: IncidentsExportPdfBulkRequestToJSON(requestParameters['incidentsExportPdfBulkRequest']),
848
- }, initOverrides);
849
-
850
- return new runtime.JSONApiResponse(response, (jsonValue) => PdfExportQueuedResourceFromJSON(jsonValue));
851
- }
852
-
853
- /**
854
- * Auto-generated: incidents.exportPdf.bulk
855
- */
856
- async incidentsExportPdfBulk(requestParameters: IncidentsExportPdfBulkOperationRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PdfExportQueuedResource> {
857
- const response = await this.incidentsExportPdfBulkRaw(requestParameters, initOverrides);
858
- return await response.value();
859
- }
860
-
861
- /**
862
- * Auto-generated: incidents.exportPdf.download
863
- */
864
- async incidentsExportPdfDownloadRaw(requestParameters: IncidentsExportPdfDownloadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Blob>> {
865
- if (requestParameters['pdfExport'] == null) {
866
- throw new runtime.RequiredError(
867
- 'pdfExport',
868
- 'Required parameter "pdfExport" was null or undefined when calling incidentsExportPdfDownload().'
869
- );
870
- }
871
-
872
- const queryParameters: any = {};
873
-
874
- const headerParameters: runtime.HTTPHeaders = {};
875
-
876
- if (this.configuration && this.configuration.accessToken) {
877
- const token = this.configuration.accessToken;
878
- const tokenString = await token("bearerAuth", []);
879
-
880
- if (tokenString) {
881
- headerParameters["Authorization"] = `Bearer ${tokenString}`;
882
- }
883
- }
884
-
885
- let urlPath = `/api/incidents/export-pdf/{pdfExport}/download`;
886
- urlPath = urlPath.replace(`{${"pdfExport"}}`, encodeURIComponent(String(requestParameters['pdfExport'])));
887
-
888
- const response = await this.request({
889
- path: urlPath,
890
- method: 'GET',
891
- headers: headerParameters,
892
- query: queryParameters,
893
- }, initOverrides);
894
-
895
- return new runtime.BlobApiResponse(response);
896
- }
897
-
898
- /**
899
- * Auto-generated: incidents.exportPdf.download
900
- */
901
- async incidentsExportPdfDownload(requestParameters: IncidentsExportPdfDownloadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Blob> {
902
- const response = await this.incidentsExportPdfDownloadRaw(requestParameters, initOverrides);
903
- return await response.value();
904
- }
905
-
906
- /**
907
- * Auto-generated: incidents.exportPdf.status
908
- */
909
- async incidentsExportPdfStatusRaw(requestParameters: IncidentsExportPdfStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PdfExportResource>> {
910
- if (requestParameters['pdfExport'] == null) {
911
- throw new runtime.RequiredError(
912
- 'pdfExport',
913
- 'Required parameter "pdfExport" was null or undefined when calling incidentsExportPdfStatus().'
914
- );
915
- }
916
-
917
- const queryParameters: any = {};
918
-
919
- const headerParameters: runtime.HTTPHeaders = {};
920
-
921
- if (this.configuration && this.configuration.accessToken) {
922
- const token = this.configuration.accessToken;
923
- const tokenString = await token("bearerAuth", []);
924
-
925
- if (tokenString) {
926
- headerParameters["Authorization"] = `Bearer ${tokenString}`;
927
- }
928
- }
929
-
930
- let urlPath = `/api/incidents/export-pdf/{pdfExport}/status`;
931
- urlPath = urlPath.replace(`{${"pdfExport"}}`, encodeURIComponent(String(requestParameters['pdfExport'])));
783
+ let urlPath = `/api/incidents/list`;
932
784
 
933
785
  const response = await this.request({
934
786
  path: urlPath,
935
787
  method: 'POST',
936
788
  headers: headerParameters,
937
789
  query: queryParameters,
790
+ body: IncidentsListRequestToJSON(requestParameters['incidentsListRequest']),
938
791
  }, initOverrides);
939
792
 
940
- return new runtime.JSONApiResponse(response, (jsonValue) => PdfExportResourceFromJSON(jsonValue));
793
+ return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedIncidentListResourceResponseFromJSON(jsonValue));
941
794
  }
942
795
 
943
796
  /**
944
- * Auto-generated: incidents.exportPdf.status
797
+ * Auto-generated: incidents.list
945
798
  */
946
- async incidentsExportPdfStatus(requestParameters: IncidentsExportPdfStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PdfExportResource> {
947
- const response = await this.incidentsExportPdfStatusRaw(requestParameters, initOverrides);
799
+ async incidentsList(requestParameters: IncidentsListOperationRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedIncidentListResourceResponse> {
800
+ const response = await this.incidentsListRaw(requestParameters, initOverrides);
948
801
  return await response.value();
949
802
  }
950
803
 
@@ -36,7 +36,7 @@ export interface AddressResource {
36
36
  * @type {string}
37
37
  * @memberof AddressResource
38
38
  */
39
- addressLine2: string;
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'],
@@ -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,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
+