@digital8/security-registers-backend-ts-sdk 0.0.207 → 0.0.209
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 +5 -0
- package/README.md +2 -2
- package/dist/apis/GeneralApi.d.ts +58 -1
- package/dist/apis/GeneralApi.js +286 -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 +69 -0
- package/dist/models/IncidentVersionResource.js +72 -0
- package/dist/models/IncidentVersionResourceArrayResponse.d.ts +33 -0
- package/dist/models/IncidentVersionResourceArrayResponse.js +50 -0
- package/dist/models/IncidentsUpdateRequest.d.ts +32 -0
- package/dist/models/IncidentsUpdateRequest.js +51 -0
- package/dist/models/RegisterListResource.d.ts +3 -3
- package/dist/models/RegisterListResource.js +4 -3
- package/dist/models/RegisterResource.d.ts +2 -2
- package/dist/models/RegisterResource.js +6 -10
- package/dist/models/RosterListResource.d.ts +1 -1
- package/dist/models/RosterListResource.js +3 -4
- package/dist/models/RosterLiteResource.d.ts +1 -1
- package/dist/models/RosterLiteResource.js +3 -4
- package/dist/models/RosterWithRegistersResource.d.ts +1 -1
- package/dist/models/RosterWithRegistersResource.js +4 -3
- package/dist/models/index.d.ts +5 -0
- package/dist/models/index.js +5 -0
- package/package.json +1 -1
- package/src/apis/GeneralApi.ts +261 -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 +126 -0
- package/src/models/IncidentVersionResourceArrayResponse.ts +73 -0
- package/src/models/IncidentsUpdateRequest.ts +66 -0
- package/src/models/RegisterListResource.ts +6 -5
- package/src/models/RegisterResource.ts +5 -7
- package/src/models/RosterListResource.ts +3 -4
- package/src/models/RosterLiteResource.ts +3 -4
- package/src/models/RosterWithRegistersResource.ts +4 -3
- package/src/models/index.ts +5 -0
package/package.json
CHANGED
package/src/apis/GeneralApi.ts
CHANGED
|
@@ -21,6 +21,7 @@ import type {
|
|
|
21
21
|
IncidentFieldSchemasShowRequest,
|
|
22
22
|
IncidentResource,
|
|
23
23
|
IncidentsStoreRequest,
|
|
24
|
+
IncidentsUpdateRequest,
|
|
24
25
|
IndexMinimalUserRequest,
|
|
25
26
|
IndexUserRequest,
|
|
26
27
|
LicenceLiteResourceArrayResponse,
|
|
@@ -100,6 +101,8 @@ import {
|
|
|
100
101
|
IncidentResourceToJSON,
|
|
101
102
|
IncidentsStoreRequestFromJSON,
|
|
102
103
|
IncidentsStoreRequestToJSON,
|
|
104
|
+
IncidentsUpdateRequestFromJSON,
|
|
105
|
+
IncidentsUpdateRequestToJSON,
|
|
103
106
|
IndexMinimalUserRequestFromJSON,
|
|
104
107
|
IndexMinimalUserRequestToJSON,
|
|
105
108
|
IndexUserRequestFromJSON,
|
|
@@ -240,10 +243,32 @@ export interface IncidentFieldSchemasShowOperationRequest {
|
|
|
240
243
|
incidentFieldSchemasShowRequest?: IncidentFieldSchemasShowRequest;
|
|
241
244
|
}
|
|
242
245
|
|
|
246
|
+
export interface IncidentsApproveRequest {
|
|
247
|
+
incident: number;
|
|
248
|
+
}
|
|
249
|
+
|
|
243
250
|
export interface IncidentsStoreOperationRequest {
|
|
244
251
|
incidentsStoreRequest?: IncidentsStoreRequest;
|
|
245
252
|
}
|
|
246
253
|
|
|
254
|
+
export interface IncidentsUnapproveRequest {
|
|
255
|
+
incident: number;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
export interface IncidentsUpdateOperationRequest {
|
|
259
|
+
incident: number;
|
|
260
|
+
incidentsUpdateRequest?: IncidentsUpdateRequest;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
export interface IncidentsVersionsRequest {
|
|
264
|
+
incident: number;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
export interface IncidentsVersionsShowRequest {
|
|
268
|
+
incident: number;
|
|
269
|
+
version: number;
|
|
270
|
+
}
|
|
271
|
+
|
|
247
272
|
export interface IndexMinimalUserOperationRequest {
|
|
248
273
|
indexMinimalUserRequest?: IndexMinimalUserRequest;
|
|
249
274
|
}
|
|
@@ -617,6 +642,51 @@ export class GeneralApi extends runtime.BaseAPI {
|
|
|
617
642
|
return await response.value();
|
|
618
643
|
}
|
|
619
644
|
|
|
645
|
+
/**
|
|
646
|
+
* Auto-generated: incidents.approve
|
|
647
|
+
*/
|
|
648
|
+
async incidentsApproveRaw(requestParameters: IncidentsApproveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<IncidentResource>> {
|
|
649
|
+
if (requestParameters['incident'] == null) {
|
|
650
|
+
throw new runtime.RequiredError(
|
|
651
|
+
'incident',
|
|
652
|
+
'Required parameter "incident" was null or undefined when calling incidentsApprove().'
|
|
653
|
+
);
|
|
654
|
+
}
|
|
655
|
+
|
|
656
|
+
const queryParameters: any = {};
|
|
657
|
+
|
|
658
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
659
|
+
|
|
660
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
661
|
+
const token = this.configuration.accessToken;
|
|
662
|
+
const tokenString = await token("bearerAuth", []);
|
|
663
|
+
|
|
664
|
+
if (tokenString) {
|
|
665
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
666
|
+
}
|
|
667
|
+
}
|
|
668
|
+
|
|
669
|
+
let urlPath = `/api/incidents/{incident}/approve`;
|
|
670
|
+
urlPath = urlPath.replace(`{${"incident"}}`, encodeURIComponent(String(requestParameters['incident'])));
|
|
671
|
+
|
|
672
|
+
const response = await this.request({
|
|
673
|
+
path: urlPath,
|
|
674
|
+
method: 'POST',
|
|
675
|
+
headers: headerParameters,
|
|
676
|
+
query: queryParameters,
|
|
677
|
+
}, initOverrides);
|
|
678
|
+
|
|
679
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => IncidentResourceFromJSON(jsonValue));
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
/**
|
|
683
|
+
* Auto-generated: incidents.approve
|
|
684
|
+
*/
|
|
685
|
+
async incidentsApprove(requestParameters: IncidentsApproveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IncidentResource> {
|
|
686
|
+
const response = await this.incidentsApproveRaw(requestParameters, initOverrides);
|
|
687
|
+
return await response.value();
|
|
688
|
+
}
|
|
689
|
+
|
|
620
690
|
/**
|
|
621
691
|
* Auto-generated: incidents.store
|
|
622
692
|
*/
|
|
@@ -657,6 +727,197 @@ export class GeneralApi extends runtime.BaseAPI {
|
|
|
657
727
|
return await response.value();
|
|
658
728
|
}
|
|
659
729
|
|
|
730
|
+
/**
|
|
731
|
+
* Auto-generated: incidents.unapprove
|
|
732
|
+
*/
|
|
733
|
+
async incidentsUnapproveRaw(requestParameters: IncidentsUnapproveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<IncidentResource>> {
|
|
734
|
+
if (requestParameters['incident'] == null) {
|
|
735
|
+
throw new runtime.RequiredError(
|
|
736
|
+
'incident',
|
|
737
|
+
'Required parameter "incident" was null or undefined when calling incidentsUnapprove().'
|
|
738
|
+
);
|
|
739
|
+
}
|
|
740
|
+
|
|
741
|
+
const queryParameters: any = {};
|
|
742
|
+
|
|
743
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
744
|
+
|
|
745
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
746
|
+
const token = this.configuration.accessToken;
|
|
747
|
+
const tokenString = await token("bearerAuth", []);
|
|
748
|
+
|
|
749
|
+
if (tokenString) {
|
|
750
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
751
|
+
}
|
|
752
|
+
}
|
|
753
|
+
|
|
754
|
+
let urlPath = `/api/incidents/{incident}/unapprove`;
|
|
755
|
+
urlPath = urlPath.replace(`{${"incident"}}`, encodeURIComponent(String(requestParameters['incident'])));
|
|
756
|
+
|
|
757
|
+
const response = await this.request({
|
|
758
|
+
path: urlPath,
|
|
759
|
+
method: 'POST',
|
|
760
|
+
headers: headerParameters,
|
|
761
|
+
query: queryParameters,
|
|
762
|
+
}, initOverrides);
|
|
763
|
+
|
|
764
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => IncidentResourceFromJSON(jsonValue));
|
|
765
|
+
}
|
|
766
|
+
|
|
767
|
+
/**
|
|
768
|
+
* Auto-generated: incidents.unapprove
|
|
769
|
+
*/
|
|
770
|
+
async incidentsUnapprove(requestParameters: IncidentsUnapproveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IncidentResource> {
|
|
771
|
+
const response = await this.incidentsUnapproveRaw(requestParameters, initOverrides);
|
|
772
|
+
return await response.value();
|
|
773
|
+
}
|
|
774
|
+
|
|
775
|
+
/**
|
|
776
|
+
* Auto-generated: incidents.update
|
|
777
|
+
*/
|
|
778
|
+
async incidentsUpdateRaw(requestParameters: IncidentsUpdateOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<IncidentResource>> {
|
|
779
|
+
if (requestParameters['incident'] == null) {
|
|
780
|
+
throw new runtime.RequiredError(
|
|
781
|
+
'incident',
|
|
782
|
+
'Required parameter "incident" was null or undefined when calling incidentsUpdate().'
|
|
783
|
+
);
|
|
784
|
+
}
|
|
785
|
+
|
|
786
|
+
const queryParameters: any = {};
|
|
787
|
+
|
|
788
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
789
|
+
|
|
790
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
791
|
+
|
|
792
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
793
|
+
const token = this.configuration.accessToken;
|
|
794
|
+
const tokenString = await token("bearerAuth", []);
|
|
795
|
+
|
|
796
|
+
if (tokenString) {
|
|
797
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
798
|
+
}
|
|
799
|
+
}
|
|
800
|
+
|
|
801
|
+
let urlPath = `/api/incidents/{incident}/update`;
|
|
802
|
+
urlPath = urlPath.replace(`{${"incident"}}`, encodeURIComponent(String(requestParameters['incident'])));
|
|
803
|
+
|
|
804
|
+
const response = await this.request({
|
|
805
|
+
path: urlPath,
|
|
806
|
+
method: 'PUT',
|
|
807
|
+
headers: headerParameters,
|
|
808
|
+
query: queryParameters,
|
|
809
|
+
body: IncidentsUpdateRequestToJSON(requestParameters['incidentsUpdateRequest']),
|
|
810
|
+
}, initOverrides);
|
|
811
|
+
|
|
812
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => IncidentResourceFromJSON(jsonValue));
|
|
813
|
+
}
|
|
814
|
+
|
|
815
|
+
/**
|
|
816
|
+
* Auto-generated: incidents.update
|
|
817
|
+
*/
|
|
818
|
+
async incidentsUpdate(requestParameters: IncidentsUpdateOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IncidentResource> {
|
|
819
|
+
const response = await this.incidentsUpdateRaw(requestParameters, initOverrides);
|
|
820
|
+
return await response.value();
|
|
821
|
+
}
|
|
822
|
+
|
|
823
|
+
/**
|
|
824
|
+
* Auto-generated: incidents.versions
|
|
825
|
+
*/
|
|
826
|
+
async incidentsVersionsRaw(requestParameters: IncidentsVersionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GenericResponse>> {
|
|
827
|
+
if (requestParameters['incident'] == null) {
|
|
828
|
+
throw new runtime.RequiredError(
|
|
829
|
+
'incident',
|
|
830
|
+
'Required parameter "incident" was null or undefined when calling incidentsVersions().'
|
|
831
|
+
);
|
|
832
|
+
}
|
|
833
|
+
|
|
834
|
+
const queryParameters: any = {};
|
|
835
|
+
|
|
836
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
837
|
+
|
|
838
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
839
|
+
const token = this.configuration.accessToken;
|
|
840
|
+
const tokenString = await token("bearerAuth", []);
|
|
841
|
+
|
|
842
|
+
if (tokenString) {
|
|
843
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
844
|
+
}
|
|
845
|
+
}
|
|
846
|
+
|
|
847
|
+
let urlPath = `/api/incidents/{incident}/versions`;
|
|
848
|
+
urlPath = urlPath.replace(`{${"incident"}}`, encodeURIComponent(String(requestParameters['incident'])));
|
|
849
|
+
|
|
850
|
+
const response = await this.request({
|
|
851
|
+
path: urlPath,
|
|
852
|
+
method: 'GET',
|
|
853
|
+
headers: headerParameters,
|
|
854
|
+
query: queryParameters,
|
|
855
|
+
}, initOverrides);
|
|
856
|
+
|
|
857
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GenericResponseFromJSON(jsonValue));
|
|
858
|
+
}
|
|
859
|
+
|
|
860
|
+
/**
|
|
861
|
+
* Auto-generated: incidents.versions
|
|
862
|
+
*/
|
|
863
|
+
async incidentsVersions(requestParameters: IncidentsVersionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GenericResponse> {
|
|
864
|
+
const response = await this.incidentsVersionsRaw(requestParameters, initOverrides);
|
|
865
|
+
return await response.value();
|
|
866
|
+
}
|
|
867
|
+
|
|
868
|
+
/**
|
|
869
|
+
* Auto-generated: incidents.versions.show
|
|
870
|
+
*/
|
|
871
|
+
async incidentsVersionsShowRaw(requestParameters: IncidentsVersionsShowRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GenericResponse>> {
|
|
872
|
+
if (requestParameters['incident'] == null) {
|
|
873
|
+
throw new runtime.RequiredError(
|
|
874
|
+
'incident',
|
|
875
|
+
'Required parameter "incident" was null or undefined when calling incidentsVersionsShow().'
|
|
876
|
+
);
|
|
877
|
+
}
|
|
878
|
+
|
|
879
|
+
if (requestParameters['version'] == null) {
|
|
880
|
+
throw new runtime.RequiredError(
|
|
881
|
+
'version',
|
|
882
|
+
'Required parameter "version" was null or undefined when calling incidentsVersionsShow().'
|
|
883
|
+
);
|
|
884
|
+
}
|
|
885
|
+
|
|
886
|
+
const queryParameters: any = {};
|
|
887
|
+
|
|
888
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
889
|
+
|
|
890
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
891
|
+
const token = this.configuration.accessToken;
|
|
892
|
+
const tokenString = await token("bearerAuth", []);
|
|
893
|
+
|
|
894
|
+
if (tokenString) {
|
|
895
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
896
|
+
}
|
|
897
|
+
}
|
|
898
|
+
|
|
899
|
+
let urlPath = `/api/incidents/{incident}/versions/{version}`;
|
|
900
|
+
urlPath = urlPath.replace(`{${"incident"}}`, encodeURIComponent(String(requestParameters['incident'])));
|
|
901
|
+
urlPath = urlPath.replace(`{${"version"}}`, encodeURIComponent(String(requestParameters['version'])));
|
|
902
|
+
|
|
903
|
+
const response = await this.request({
|
|
904
|
+
path: urlPath,
|
|
905
|
+
method: 'GET',
|
|
906
|
+
headers: headerParameters,
|
|
907
|
+
query: queryParameters,
|
|
908
|
+
}, initOverrides);
|
|
909
|
+
|
|
910
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GenericResponseFromJSON(jsonValue));
|
|
911
|
+
}
|
|
912
|
+
|
|
913
|
+
/**
|
|
914
|
+
* Auto-generated: incidents.versions.show
|
|
915
|
+
*/
|
|
916
|
+
async incidentsVersionsShow(requestParameters: IncidentsVersionsShowRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GenericResponse> {
|
|
917
|
+
const response = await this.incidentsVersionsShowRaw(requestParameters, initOverrides);
|
|
918
|
+
return await response.value();
|
|
919
|
+
}
|
|
920
|
+
|
|
660
921
|
/**
|
|
661
922
|
* Auto-generated: indexMinimalUser
|
|
662
923
|
*/
|
|
@@ -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,126 @@
|
|
|
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
|
+
incidentId?: number | null;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {number}
|
|
45
|
+
* @memberof IncidentVersionResource
|
|
46
|
+
*/
|
|
47
|
+
versionNumber: number;
|
|
48
|
+
/**
|
|
49
|
+
*
|
|
50
|
+
* @type {number}
|
|
51
|
+
* @memberof IncidentVersionResource
|
|
52
|
+
*/
|
|
53
|
+
userId?: number | null;
|
|
54
|
+
/**
|
|
55
|
+
*
|
|
56
|
+
* @type {UserLiteResource}
|
|
57
|
+
* @memberof IncidentVersionResource
|
|
58
|
+
*/
|
|
59
|
+
user: UserLiteResource | null;
|
|
60
|
+
/**
|
|
61
|
+
*
|
|
62
|
+
* @type {Array<boolean>}
|
|
63
|
+
* @memberof IncidentVersionResource
|
|
64
|
+
*/
|
|
65
|
+
fieldData: Array<boolean>;
|
|
66
|
+
/**
|
|
67
|
+
*
|
|
68
|
+
* @type {Date}
|
|
69
|
+
* @memberof IncidentVersionResource
|
|
70
|
+
*/
|
|
71
|
+
createdAt: Date;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Check if a given object implements the IncidentVersionResource interface.
|
|
76
|
+
*/
|
|
77
|
+
export function instanceOfIncidentVersionResource(value: object): value is IncidentVersionResource {
|
|
78
|
+
if (!('id' in value) || value['id'] === undefined) return false;
|
|
79
|
+
if (!('versionNumber' in value) || value['versionNumber'] === undefined) return false;
|
|
80
|
+
if (!('user' in value) || value['user'] === undefined) return false;
|
|
81
|
+
if (!('fieldData' in value) || value['fieldData'] === undefined) return false;
|
|
82
|
+
if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
|
|
83
|
+
return true;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export function IncidentVersionResourceFromJSON(json: any): IncidentVersionResource {
|
|
87
|
+
return IncidentVersionResourceFromJSONTyped(json, false);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export function IncidentVersionResourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): IncidentVersionResource {
|
|
91
|
+
if (json == null) {
|
|
92
|
+
return json;
|
|
93
|
+
}
|
|
94
|
+
return {
|
|
95
|
+
|
|
96
|
+
'id': json['id'],
|
|
97
|
+
'incidentId': json['incidentId'] == null ? undefined : json['incidentId'],
|
|
98
|
+
'versionNumber': json['versionNumber'],
|
|
99
|
+
'userId': json['userId'] == null ? undefined : json['userId'],
|
|
100
|
+
'user': UserLiteResourceFromJSON(json['user']),
|
|
101
|
+
'fieldData': json['fieldData'],
|
|
102
|
+
'createdAt': (new Date(json['createdAt'])),
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export function IncidentVersionResourceToJSON(json: any): IncidentVersionResource {
|
|
107
|
+
return IncidentVersionResourceToJSONTyped(json, false);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export function IncidentVersionResourceToJSONTyped(value?: IncidentVersionResource | null, ignoreDiscriminator: boolean = false): any {
|
|
111
|
+
if (value == null) {
|
|
112
|
+
return value;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
return {
|
|
116
|
+
|
|
117
|
+
'id': value['id'],
|
|
118
|
+
'incidentId': value['incidentId'],
|
|
119
|
+
'versionNumber': value['versionNumber'],
|
|
120
|
+
'userId': value['userId'],
|
|
121
|
+
'user': UserLiteResourceToJSON(value['user']),
|
|
122
|
+
'fieldData': value['fieldData'],
|
|
123
|
+
'createdAt': ((value['createdAt']).toISOString()),
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
|