@digital8/security-registers-backend-ts-sdk 0.0.221 → 0.0.222
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +6 -2
- package/README.md +2 -2
- package/dist/apis/GeneralApi.d.ts +59 -1
- package/dist/apis/GeneralApi.js +288 -0
- package/dist/models/IncidentFieldAuditResource.d.ts +56 -0
- package/dist/models/IncidentFieldAuditResource.js +67 -0
- package/dist/models/IncidentFieldAuditResourceArrayResponse.d.ts +33 -0
- package/dist/models/IncidentFieldAuditResourceArrayResponse.js +50 -0
- package/dist/models/IncidentResource.d.ts +7 -0
- package/dist/models/IncidentResource.js +5 -0
- package/dist/models/IncidentVersionResource.d.ts +57 -0
- package/dist/models/IncidentVersionResource.js +68 -0
- package/dist/models/IncidentVersionResourceArrayResponse.d.ts +33 -0
- package/dist/models/IncidentVersionResourceArrayResponse.js +50 -0
- package/dist/models/IncidentsApproveRequest.d.ts +32 -0
- package/dist/models/IncidentsApproveRequest.js +51 -0
- package/dist/models/IncidentsUpdateRequest.d.ts +32 -0
- package/dist/models/IncidentsUpdateRequest.js +51 -0
- package/dist/models/RegisterListResource.d.ts +2 -2
- package/dist/models/RegisterListResource.js +6 -2
- package/dist/models/RegisterResource.d.ts +2 -2
- package/dist/models/RegisterResource.js +2 -6
- package/dist/models/RosterResource.d.ts +1 -1
- package/dist/models/RosterResource.js +4 -3
- package/dist/models/SecurityCompanyResource.d.ts +1 -1
- package/dist/models/SecurityCompanyResource.js +1 -3
- package/dist/models/index.d.ts +6 -2
- package/dist/models/index.js +6 -2
- package/package.json +1 -1
- package/src/apis/GeneralApi.ts +274 -0
- package/src/models/IncidentFieldAuditResource.ts +102 -0
- package/src/models/IncidentFieldAuditResourceArrayResponse.ts +73 -0
- package/src/models/IncidentResource.ts +16 -0
- package/src/models/IncidentVersionResource.ts +110 -0
- package/src/models/IncidentVersionResourceArrayResponse.ts +73 -0
- package/src/models/IncidentsApproveRequest.ts +66 -0
- package/src/models/IncidentsUpdateRequest.ts +66 -0
- package/src/models/RegisterListResource.ts +6 -4
- package/src/models/RegisterResource.ts +4 -6
- package/src/models/RosterResource.ts +4 -3
- package/src/models/SecurityCompanyResource.ts +2 -3
- package/src/models/index.ts +6 -2
- package/dist/models/IncidentImageResource.d.ts +0 -56
- package/dist/models/IncidentImageResource.js +0 -65
- package/dist/models/IncidentImageResourceArrayResponse.d.ts +0 -33
- package/dist/models/IncidentImageResourceArrayResponse.js +0 -50
- package/src/models/IncidentImageResource.ts +0 -101
- package/src/models/IncidentImageResourceArrayResponse.ts +0 -73
package/src/apis/GeneralApi.ts
CHANGED
|
@@ -20,7 +20,11 @@ import type {
|
|
|
20
20
|
IncidentFieldSchemaResource,
|
|
21
21
|
IncidentFieldSchemasShowRequest,
|
|
22
22
|
IncidentResource,
|
|
23
|
+
IncidentVersionResource,
|
|
24
|
+
IncidentVersionResourceArrayResponse,
|
|
25
|
+
IncidentsApproveRequest,
|
|
23
26
|
IncidentsStoreRequest,
|
|
27
|
+
IncidentsUpdateRequest,
|
|
24
28
|
IndexMinimalUserRequest,
|
|
25
29
|
IndexUserRequest,
|
|
26
30
|
LicenceLiteResourceArrayResponse,
|
|
@@ -98,8 +102,16 @@ import {
|
|
|
98
102
|
IncidentFieldSchemasShowRequestToJSON,
|
|
99
103
|
IncidentResourceFromJSON,
|
|
100
104
|
IncidentResourceToJSON,
|
|
105
|
+
IncidentVersionResourceFromJSON,
|
|
106
|
+
IncidentVersionResourceToJSON,
|
|
107
|
+
IncidentVersionResourceArrayResponseFromJSON,
|
|
108
|
+
IncidentVersionResourceArrayResponseToJSON,
|
|
109
|
+
IncidentsApproveRequestFromJSON,
|
|
110
|
+
IncidentsApproveRequestToJSON,
|
|
101
111
|
IncidentsStoreRequestFromJSON,
|
|
102
112
|
IncidentsStoreRequestToJSON,
|
|
113
|
+
IncidentsUpdateRequestFromJSON,
|
|
114
|
+
IncidentsUpdateRequestToJSON,
|
|
103
115
|
IndexMinimalUserRequestFromJSON,
|
|
104
116
|
IndexMinimalUserRequestToJSON,
|
|
105
117
|
IndexUserRequestFromJSON,
|
|
@@ -240,10 +252,33 @@ export interface IncidentFieldSchemasShowOperationRequest {
|
|
|
240
252
|
incidentFieldSchemasShowRequest?: IncidentFieldSchemasShowRequest;
|
|
241
253
|
}
|
|
242
254
|
|
|
255
|
+
export interface IncidentsApproveOperationRequest {
|
|
256
|
+
incident: number;
|
|
257
|
+
incidentsApproveRequest?: IncidentsApproveRequest;
|
|
258
|
+
}
|
|
259
|
+
|
|
243
260
|
export interface IncidentsStoreOperationRequest {
|
|
244
261
|
incidentsStoreRequest?: IncidentsStoreRequest;
|
|
245
262
|
}
|
|
246
263
|
|
|
264
|
+
export interface IncidentsUnapproveRequest {
|
|
265
|
+
incident: number;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
export interface IncidentsUpdateOperationRequest {
|
|
269
|
+
incident: number;
|
|
270
|
+
incidentsUpdateRequest?: IncidentsUpdateRequest;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
export interface IncidentsVersionsRequest {
|
|
274
|
+
incident: number;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
export interface IncidentsVersionsShowRequest {
|
|
278
|
+
incident: number;
|
|
279
|
+
version: number;
|
|
280
|
+
}
|
|
281
|
+
|
|
247
282
|
export interface IndexMinimalUserOperationRequest {
|
|
248
283
|
indexMinimalUserRequest?: IndexMinimalUserRequest;
|
|
249
284
|
}
|
|
@@ -617,6 +652,54 @@ export class GeneralApi extends runtime.BaseAPI {
|
|
|
617
652
|
return await response.value();
|
|
618
653
|
}
|
|
619
654
|
|
|
655
|
+
/**
|
|
656
|
+
* Auto-generated: incidents.approve
|
|
657
|
+
*/
|
|
658
|
+
async incidentsApproveRaw(requestParameters: IncidentsApproveOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<IncidentResource>> {
|
|
659
|
+
if (requestParameters['incident'] == null) {
|
|
660
|
+
throw new runtime.RequiredError(
|
|
661
|
+
'incident',
|
|
662
|
+
'Required parameter "incident" was null or undefined when calling incidentsApprove().'
|
|
663
|
+
);
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
const queryParameters: any = {};
|
|
667
|
+
|
|
668
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
669
|
+
|
|
670
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
671
|
+
|
|
672
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
673
|
+
const token = this.configuration.accessToken;
|
|
674
|
+
const tokenString = await token("bearerAuth", []);
|
|
675
|
+
|
|
676
|
+
if (tokenString) {
|
|
677
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
678
|
+
}
|
|
679
|
+
}
|
|
680
|
+
|
|
681
|
+
let urlPath = `/api/incidents/{incident}/approve`;
|
|
682
|
+
urlPath = urlPath.replace(`{${"incident"}}`, encodeURIComponent(String(requestParameters['incident'])));
|
|
683
|
+
|
|
684
|
+
const response = await this.request({
|
|
685
|
+
path: urlPath,
|
|
686
|
+
method: 'POST',
|
|
687
|
+
headers: headerParameters,
|
|
688
|
+
query: queryParameters,
|
|
689
|
+
body: IncidentsApproveRequestToJSON(requestParameters['incidentsApproveRequest']),
|
|
690
|
+
}, initOverrides);
|
|
691
|
+
|
|
692
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => IncidentResourceFromJSON(jsonValue));
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
/**
|
|
696
|
+
* Auto-generated: incidents.approve
|
|
697
|
+
*/
|
|
698
|
+
async incidentsApprove(requestParameters: IncidentsApproveOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IncidentResource> {
|
|
699
|
+
const response = await this.incidentsApproveRaw(requestParameters, initOverrides);
|
|
700
|
+
return await response.value();
|
|
701
|
+
}
|
|
702
|
+
|
|
620
703
|
/**
|
|
621
704
|
* Auto-generated: incidents.store
|
|
622
705
|
*/
|
|
@@ -657,6 +740,197 @@ export class GeneralApi extends runtime.BaseAPI {
|
|
|
657
740
|
return await response.value();
|
|
658
741
|
}
|
|
659
742
|
|
|
743
|
+
/**
|
|
744
|
+
* Auto-generated: incidents.unapprove
|
|
745
|
+
*/
|
|
746
|
+
async incidentsUnapproveRaw(requestParameters: IncidentsUnapproveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<IncidentResource>> {
|
|
747
|
+
if (requestParameters['incident'] == null) {
|
|
748
|
+
throw new runtime.RequiredError(
|
|
749
|
+
'incident',
|
|
750
|
+
'Required parameter "incident" was null or undefined when calling incidentsUnapprove().'
|
|
751
|
+
);
|
|
752
|
+
}
|
|
753
|
+
|
|
754
|
+
const queryParameters: any = {};
|
|
755
|
+
|
|
756
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
757
|
+
|
|
758
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
759
|
+
const token = this.configuration.accessToken;
|
|
760
|
+
const tokenString = await token("bearerAuth", []);
|
|
761
|
+
|
|
762
|
+
if (tokenString) {
|
|
763
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
764
|
+
}
|
|
765
|
+
}
|
|
766
|
+
|
|
767
|
+
let urlPath = `/api/incidents/{incident}/unapprove`;
|
|
768
|
+
urlPath = urlPath.replace(`{${"incident"}}`, encodeURIComponent(String(requestParameters['incident'])));
|
|
769
|
+
|
|
770
|
+
const response = await this.request({
|
|
771
|
+
path: urlPath,
|
|
772
|
+
method: 'POST',
|
|
773
|
+
headers: headerParameters,
|
|
774
|
+
query: queryParameters,
|
|
775
|
+
}, initOverrides);
|
|
776
|
+
|
|
777
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => IncidentResourceFromJSON(jsonValue));
|
|
778
|
+
}
|
|
779
|
+
|
|
780
|
+
/**
|
|
781
|
+
* Auto-generated: incidents.unapprove
|
|
782
|
+
*/
|
|
783
|
+
async incidentsUnapprove(requestParameters: IncidentsUnapproveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IncidentResource> {
|
|
784
|
+
const response = await this.incidentsUnapproveRaw(requestParameters, initOverrides);
|
|
785
|
+
return await response.value();
|
|
786
|
+
}
|
|
787
|
+
|
|
788
|
+
/**
|
|
789
|
+
* Auto-generated: incidents.update
|
|
790
|
+
*/
|
|
791
|
+
async incidentsUpdateRaw(requestParameters: IncidentsUpdateOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<IncidentResource>> {
|
|
792
|
+
if (requestParameters['incident'] == null) {
|
|
793
|
+
throw new runtime.RequiredError(
|
|
794
|
+
'incident',
|
|
795
|
+
'Required parameter "incident" was null or undefined when calling incidentsUpdate().'
|
|
796
|
+
);
|
|
797
|
+
}
|
|
798
|
+
|
|
799
|
+
const queryParameters: any = {};
|
|
800
|
+
|
|
801
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
802
|
+
|
|
803
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
804
|
+
|
|
805
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
806
|
+
const token = this.configuration.accessToken;
|
|
807
|
+
const tokenString = await token("bearerAuth", []);
|
|
808
|
+
|
|
809
|
+
if (tokenString) {
|
|
810
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
811
|
+
}
|
|
812
|
+
}
|
|
813
|
+
|
|
814
|
+
let urlPath = `/api/incidents/{incident}/update`;
|
|
815
|
+
urlPath = urlPath.replace(`{${"incident"}}`, encodeURIComponent(String(requestParameters['incident'])));
|
|
816
|
+
|
|
817
|
+
const response = await this.request({
|
|
818
|
+
path: urlPath,
|
|
819
|
+
method: 'PUT',
|
|
820
|
+
headers: headerParameters,
|
|
821
|
+
query: queryParameters,
|
|
822
|
+
body: IncidentsUpdateRequestToJSON(requestParameters['incidentsUpdateRequest']),
|
|
823
|
+
}, initOverrides);
|
|
824
|
+
|
|
825
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => IncidentResourceFromJSON(jsonValue));
|
|
826
|
+
}
|
|
827
|
+
|
|
828
|
+
/**
|
|
829
|
+
* Auto-generated: incidents.update
|
|
830
|
+
*/
|
|
831
|
+
async incidentsUpdate(requestParameters: IncidentsUpdateOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IncidentResource> {
|
|
832
|
+
const response = await this.incidentsUpdateRaw(requestParameters, initOverrides);
|
|
833
|
+
return await response.value();
|
|
834
|
+
}
|
|
835
|
+
|
|
836
|
+
/**
|
|
837
|
+
* Auto-generated: incidents.versions
|
|
838
|
+
*/
|
|
839
|
+
async incidentsVersionsRaw(requestParameters: IncidentsVersionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<IncidentVersionResourceArrayResponse>> {
|
|
840
|
+
if (requestParameters['incident'] == null) {
|
|
841
|
+
throw new runtime.RequiredError(
|
|
842
|
+
'incident',
|
|
843
|
+
'Required parameter "incident" was null or undefined when calling incidentsVersions().'
|
|
844
|
+
);
|
|
845
|
+
}
|
|
846
|
+
|
|
847
|
+
const queryParameters: any = {};
|
|
848
|
+
|
|
849
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
850
|
+
|
|
851
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
852
|
+
const token = this.configuration.accessToken;
|
|
853
|
+
const tokenString = await token("bearerAuth", []);
|
|
854
|
+
|
|
855
|
+
if (tokenString) {
|
|
856
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
857
|
+
}
|
|
858
|
+
}
|
|
859
|
+
|
|
860
|
+
let urlPath = `/api/incidents/{incident}/versions`;
|
|
861
|
+
urlPath = urlPath.replace(`{${"incident"}}`, encodeURIComponent(String(requestParameters['incident'])));
|
|
862
|
+
|
|
863
|
+
const response = await this.request({
|
|
864
|
+
path: urlPath,
|
|
865
|
+
method: 'GET',
|
|
866
|
+
headers: headerParameters,
|
|
867
|
+
query: queryParameters,
|
|
868
|
+
}, initOverrides);
|
|
869
|
+
|
|
870
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => IncidentVersionResourceArrayResponseFromJSON(jsonValue));
|
|
871
|
+
}
|
|
872
|
+
|
|
873
|
+
/**
|
|
874
|
+
* Auto-generated: incidents.versions
|
|
875
|
+
*/
|
|
876
|
+
async incidentsVersions(requestParameters: IncidentsVersionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IncidentVersionResourceArrayResponse> {
|
|
877
|
+
const response = await this.incidentsVersionsRaw(requestParameters, initOverrides);
|
|
878
|
+
return await response.value();
|
|
879
|
+
}
|
|
880
|
+
|
|
881
|
+
/**
|
|
882
|
+
* Auto-generated: incidents.versions.show
|
|
883
|
+
*/
|
|
884
|
+
async incidentsVersionsShowRaw(requestParameters: IncidentsVersionsShowRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<IncidentVersionResource>> {
|
|
885
|
+
if (requestParameters['incident'] == null) {
|
|
886
|
+
throw new runtime.RequiredError(
|
|
887
|
+
'incident',
|
|
888
|
+
'Required parameter "incident" was null or undefined when calling incidentsVersionsShow().'
|
|
889
|
+
);
|
|
890
|
+
}
|
|
891
|
+
|
|
892
|
+
if (requestParameters['version'] == null) {
|
|
893
|
+
throw new runtime.RequiredError(
|
|
894
|
+
'version',
|
|
895
|
+
'Required parameter "version" was null or undefined when calling incidentsVersionsShow().'
|
|
896
|
+
);
|
|
897
|
+
}
|
|
898
|
+
|
|
899
|
+
const queryParameters: any = {};
|
|
900
|
+
|
|
901
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
902
|
+
|
|
903
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
904
|
+
const token = this.configuration.accessToken;
|
|
905
|
+
const tokenString = await token("bearerAuth", []);
|
|
906
|
+
|
|
907
|
+
if (tokenString) {
|
|
908
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
909
|
+
}
|
|
910
|
+
}
|
|
911
|
+
|
|
912
|
+
let urlPath = `/api/incidents/{incident}/versions/{version}`;
|
|
913
|
+
urlPath = urlPath.replace(`{${"incident"}}`, encodeURIComponent(String(requestParameters['incident'])));
|
|
914
|
+
urlPath = urlPath.replace(`{${"version"}}`, encodeURIComponent(String(requestParameters['version'])));
|
|
915
|
+
|
|
916
|
+
const response = await this.request({
|
|
917
|
+
path: urlPath,
|
|
918
|
+
method: 'GET',
|
|
919
|
+
headers: headerParameters,
|
|
920
|
+
query: queryParameters,
|
|
921
|
+
}, initOverrides);
|
|
922
|
+
|
|
923
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => IncidentVersionResourceFromJSON(jsonValue));
|
|
924
|
+
}
|
|
925
|
+
|
|
926
|
+
/**
|
|
927
|
+
* Auto-generated: incidents.versions.show
|
|
928
|
+
*/
|
|
929
|
+
async incidentsVersionsShow(requestParameters: IncidentsVersionsShowRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IncidentVersionResource> {
|
|
930
|
+
const response = await this.incidentsVersionsShowRaw(requestParameters, initOverrides);
|
|
931
|
+
return await response.value();
|
|
932
|
+
}
|
|
933
|
+
|
|
660
934
|
/**
|
|
661
935
|
* Auto-generated: indexMinimalUser
|
|
662
936
|
*/
|
|
@@ -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
|
+
|
|
@@ -34,6 +34,13 @@ import {
|
|
|
34
34
|
RosterLiteResourceToJSON,
|
|
35
35
|
RosterLiteResourceToJSONTyped,
|
|
36
36
|
} from './RosterLiteResource';
|
|
37
|
+
import type { IncidentFieldAuditResource } from './IncidentFieldAuditResource';
|
|
38
|
+
import {
|
|
39
|
+
IncidentFieldAuditResourceFromJSON,
|
|
40
|
+
IncidentFieldAuditResourceFromJSONTyped,
|
|
41
|
+
IncidentFieldAuditResourceToJSON,
|
|
42
|
+
IncidentFieldAuditResourceToJSONTyped,
|
|
43
|
+
} from './IncidentFieldAuditResource';
|
|
37
44
|
import type { SecurityCompanyLiteResource } from './SecurityCompanyLiteResource';
|
|
38
45
|
import {
|
|
39
46
|
SecurityCompanyLiteResourceFromJSON,
|
|
@@ -134,6 +141,12 @@ export interface IncidentResource {
|
|
|
134
141
|
* @memberof IncidentResource
|
|
135
142
|
*/
|
|
136
143
|
fields: object;
|
|
144
|
+
/**
|
|
145
|
+
*
|
|
146
|
+
* @type {Array<IncidentFieldAuditResource>}
|
|
147
|
+
* @memberof IncidentResource
|
|
148
|
+
*/
|
|
149
|
+
fieldAudits: Array<IncidentFieldAuditResource> | null;
|
|
137
150
|
}
|
|
138
151
|
|
|
139
152
|
/**
|
|
@@ -149,6 +162,7 @@ export function instanceOfIncidentResource(value: object): value is IncidentReso
|
|
|
149
162
|
if (!('approvedByUser' in value) || value['approvedByUser'] === undefined) return false;
|
|
150
163
|
if (!('incidentFieldSchema' in value) || value['incidentFieldSchema'] === undefined) return false;
|
|
151
164
|
if (!('fields' in value) || value['fields'] === undefined) return false;
|
|
165
|
+
if (!('fieldAudits' in value) || value['fieldAudits'] === undefined) return false;
|
|
152
166
|
return true;
|
|
153
167
|
}
|
|
154
168
|
|
|
@@ -174,6 +188,7 @@ export function IncidentResourceFromJSONTyped(json: any, ignoreDiscriminator: bo
|
|
|
174
188
|
'createdAt': json['createdAt'] == null ? undefined : (new Date(json['createdAt'])),
|
|
175
189
|
'updatedAt': json['updatedAt'] == null ? undefined : (new Date(json['updatedAt'])),
|
|
176
190
|
'fields': json['fields'],
|
|
191
|
+
'fieldAudits': (json['fieldAudits'] == null ? null : (json['fieldAudits'] as Array<any>).map(IncidentFieldAuditResourceFromJSON)),
|
|
177
192
|
};
|
|
178
193
|
}
|
|
179
194
|
|
|
@@ -200,6 +215,7 @@ export function IncidentResourceToJSONTyped(value?: IncidentResource | null, ign
|
|
|
200
215
|
'createdAt': value['createdAt'] === null ? null : ((value['createdAt'] as any)?.toISOString()),
|
|
201
216
|
'updatedAt': value['updatedAt'] === null ? null : ((value['updatedAt'] as any)?.toISOString()),
|
|
202
217
|
'fields': value['fields'],
|
|
218
|
+
'fieldAudits': (value['fieldAudits'] == null ? null : (value['fieldAudits'] as Array<any>).map(IncidentFieldAuditResourceToJSON)),
|
|
203
219
|
};
|
|
204
220
|
}
|
|
205
221
|
|
|
@@ -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
|
+
|