@digital8/security-registers-backend-ts-sdk 0.0.200 → 0.0.202

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 (51) hide show
  1. package/.openapi-generator/FILES +3 -5
  2. package/README.md +2 -2
  3. package/dist/apis/GeneralApi.d.ts +12 -39
  4. package/dist/apis/GeneralApi.js +55 -215
  5. package/dist/models/AddressResource.d.ts +1 -1
  6. package/dist/models/AddressResource.js +1 -3
  7. package/dist/models/IncidentResource.d.ts +119 -0
  8. package/dist/models/IncidentResource.js +91 -0
  9. package/dist/models/IncidentResourceArrayResponse.d.ts +33 -0
  10. package/dist/models/IncidentResourceArrayResponse.js +50 -0
  11. package/dist/models/IncidentsStoreRequest.d.ts +38 -0
  12. package/dist/models/IncidentsStoreRequest.js +55 -0
  13. package/dist/models/RegisterListResource.d.ts +1 -1
  14. package/dist/models/RegisterListResource.js +1 -3
  15. package/dist/models/RegisterResource.d.ts +3 -3
  16. package/dist/models/RegisterResource.js +9 -11
  17. package/dist/models/RosterLiteResource.d.ts +1 -1
  18. package/dist/models/RosterLiteResource.js +3 -4
  19. package/dist/models/RosterWithRegistersResource.d.ts +1 -1
  20. package/dist/models/RosterWithRegistersResource.js +4 -3
  21. package/dist/models/SecurityCompanyResource.d.ts +1 -1
  22. package/dist/models/SecurityCompanyResource.js +3 -1
  23. package/dist/models/index.d.ts +3 -5
  24. package/dist/models/index.js +3 -5
  25. package/package.json +1 -1
  26. package/src/apis/GeneralApi.ts +50 -179
  27. package/src/models/AddressResource.ts +2 -3
  28. package/src/models/IncidentResource.ts +204 -0
  29. package/src/models/IncidentResourceArrayResponse.ts +73 -0
  30. package/src/models/IncidentsStoreRequest.ts +75 -0
  31. package/src/models/RegisterListResource.ts +2 -3
  32. package/src/models/RegisterResource.ts +8 -9
  33. package/src/models/RosterLiteResource.ts +3 -4
  34. package/src/models/RosterWithRegistersResource.ts +4 -3
  35. package/src/models/SecurityCompanyResource.ts +3 -2
  36. package/src/models/index.ts +3 -5
  37. package/dist/models/NotificationPreferenceResource.d.ts +0 -63
  38. package/dist/models/NotificationPreferenceResource.js +0 -67
  39. package/dist/models/NotificationPreferenceResourceArrayResponse.d.ts +0 -33
  40. package/dist/models/NotificationPreferenceResourceArrayResponse.js +0 -50
  41. package/dist/models/NotificationPreferencesStoreRequest.d.ts +0 -55
  42. package/dist/models/NotificationPreferencesStoreRequest.js +0 -68
  43. package/dist/models/NotificationTypeResource.d.ts +0 -38
  44. package/dist/models/NotificationTypeResource.js +0 -55
  45. package/dist/models/NotificationTypeResourceArrayResponse.d.ts +0 -33
  46. package/dist/models/NotificationTypeResourceArrayResponse.js +0 -50
  47. package/src/models/NotificationPreferenceResource.ts +0 -116
  48. package/src/models/NotificationPreferenceResourceArrayResponse.ts +0 -73
  49. package/src/models/NotificationPreferencesStoreRequest.ts +0 -97
  50. package/src/models/NotificationTypeResource.ts +0 -75
  51. package/src/models/NotificationTypeResourceArrayResponse.ts +0 -73
@@ -18,6 +18,8 @@ import type {
18
18
  AssetFileForUploadResource,
19
19
  GenericResponse,
20
20
  IncidentFieldSchemaResource,
21
+ IncidentResource,
22
+ IncidentsStoreRequest,
21
23
  IndexMinimalUserRequest,
22
24
  IndexUserRequest,
23
25
  LicenceLiteResourceArrayResponse,
@@ -28,10 +30,6 @@ import type {
28
30
  LicencesUpdateRequest,
29
31
  LicencesVerifyRequest,
30
32
  LoginAuthRequest,
31
- NotificationPreferenceResource,
32
- NotificationPreferenceResourceArrayResponse,
33
- NotificationPreferencesStoreRequest,
34
- NotificationTypeResourceArrayResponse,
35
33
  PaginatedLicenceListResourceResponse,
36
34
  PaginatedRegisterGroupedByRosterResourceResponse,
37
35
  PaginatedRosterListResourceResponse,
@@ -91,6 +89,10 @@ import {
91
89
  GenericResponseToJSON,
92
90
  IncidentFieldSchemaResourceFromJSON,
93
91
  IncidentFieldSchemaResourceToJSON,
92
+ IncidentResourceFromJSON,
93
+ IncidentResourceToJSON,
94
+ IncidentsStoreRequestFromJSON,
95
+ IncidentsStoreRequestToJSON,
94
96
  IndexMinimalUserRequestFromJSON,
95
97
  IndexMinimalUserRequestToJSON,
96
98
  IndexUserRequestFromJSON,
@@ -111,14 +113,6 @@ import {
111
113
  LicencesVerifyRequestToJSON,
112
114
  LoginAuthRequestFromJSON,
113
115
  LoginAuthRequestToJSON,
114
- NotificationPreferenceResourceFromJSON,
115
- NotificationPreferenceResourceToJSON,
116
- NotificationPreferenceResourceArrayResponseFromJSON,
117
- NotificationPreferenceResourceArrayResponseToJSON,
118
- NotificationPreferencesStoreRequestFromJSON,
119
- NotificationPreferencesStoreRequestToJSON,
120
- NotificationTypeResourceArrayResponseFromJSON,
121
- NotificationTypeResourceArrayResponseToJSON,
122
116
  PaginatedLicenceListResourceResponseFromJSON,
123
117
  PaginatedLicenceListResourceResponseToJSON,
124
118
  PaginatedRegisterGroupedByRosterResourceResponseFromJSON,
@@ -231,6 +225,10 @@ export interface IncidentFieldSchemasShowRequest {
231
225
  state: number;
232
226
  }
233
227
 
228
+ export interface IncidentsStoreOperationRequest {
229
+ incidentsStoreRequest?: IncidentsStoreRequest;
230
+ }
231
+
234
232
  export interface IndexMinimalUserOperationRequest {
235
233
  indexMinimalUserRequest?: IndexMinimalUserRequest;
236
234
  }
@@ -272,14 +270,6 @@ export interface LoginAuthOperationRequest {
272
270
  loginAuthRequest?: LoginAuthRequest;
273
271
  }
274
272
 
275
- export interface NotificationPreferencesDeleteRequest {
276
- notificationPreference: number;
277
- }
278
-
279
- export interface NotificationPreferencesStoreOperationRequest {
280
- notificationPreferencesStoreRequest?: NotificationPreferencesStoreRequest;
281
- }
282
-
283
273
  export interface RegistersCreateOperationRequest {
284
274
  registersCreateRequest?: RegistersCreateRequest;
285
275
  }
@@ -609,6 +599,46 @@ export class GeneralApi extends runtime.BaseAPI {
609
599
  return await response.value();
610
600
  }
611
601
 
602
+ /**
603
+ * Auto-generated: incidents.store
604
+ */
605
+ async incidentsStoreRaw(requestParameters: IncidentsStoreOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<IncidentResource>> {
606
+ const queryParameters: any = {};
607
+
608
+ const headerParameters: runtime.HTTPHeaders = {};
609
+
610
+ headerParameters['Content-Type'] = 'application/json';
611
+
612
+ if (this.configuration && this.configuration.accessToken) {
613
+ const token = this.configuration.accessToken;
614
+ const tokenString = await token("bearerAuth", []);
615
+
616
+ if (tokenString) {
617
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
618
+ }
619
+ }
620
+
621
+ let urlPath = `/api/incidents/create`;
622
+
623
+ const response = await this.request({
624
+ path: urlPath,
625
+ method: 'POST',
626
+ headers: headerParameters,
627
+ query: queryParameters,
628
+ body: IncidentsStoreRequestToJSON(requestParameters['incidentsStoreRequest']),
629
+ }, initOverrides);
630
+
631
+ return new runtime.JSONApiResponse(response, (jsonValue) => IncidentResourceFromJSON(jsonValue));
632
+ }
633
+
634
+ /**
635
+ * Auto-generated: incidents.store
636
+ */
637
+ async incidentsStore(requestParameters: IncidentsStoreOperationRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IncidentResource> {
638
+ const response = await this.incidentsStoreRaw(requestParameters, initOverrides);
639
+ return await response.value();
640
+ }
641
+
612
642
  /**
613
643
  * Auto-generated: indexMinimalUser
614
644
  */
@@ -1064,165 +1094,6 @@ export class GeneralApi extends runtime.BaseAPI {
1064
1094
  return await response.value();
1065
1095
  }
1066
1096
 
1067
- /**
1068
- * Auto-generated: notificationPreferences.delete
1069
- */
1070
- async notificationPreferencesDeleteRaw(requestParameters: NotificationPreferencesDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GenericResponse>> {
1071
- if (requestParameters['notificationPreference'] == null) {
1072
- throw new runtime.RequiredError(
1073
- 'notificationPreference',
1074
- 'Required parameter "notificationPreference" was null or undefined when calling notificationPreferencesDelete().'
1075
- );
1076
- }
1077
-
1078
- const queryParameters: any = {};
1079
-
1080
- const headerParameters: runtime.HTTPHeaders = {};
1081
-
1082
- if (this.configuration && this.configuration.accessToken) {
1083
- const token = this.configuration.accessToken;
1084
- const tokenString = await token("bearerAuth", []);
1085
-
1086
- if (tokenString) {
1087
- headerParameters["Authorization"] = `Bearer ${tokenString}`;
1088
- }
1089
- }
1090
-
1091
- let urlPath = `/api/notification-preferences/{notificationPreference}/delete`;
1092
- urlPath = urlPath.replace(`{${"notificationPreference"}}`, encodeURIComponent(String(requestParameters['notificationPreference'])));
1093
-
1094
- const response = await this.request({
1095
- path: urlPath,
1096
- method: 'POST',
1097
- headers: headerParameters,
1098
- query: queryParameters,
1099
- }, initOverrides);
1100
-
1101
- return new runtime.JSONApiResponse(response, (jsonValue) => GenericResponseFromJSON(jsonValue));
1102
- }
1103
-
1104
- /**
1105
- * Auto-generated: notificationPreferences.delete
1106
- */
1107
- async notificationPreferencesDelete(requestParameters: NotificationPreferencesDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GenericResponse> {
1108
- const response = await this.notificationPreferencesDeleteRaw(requestParameters, initOverrides);
1109
- return await response.value();
1110
- }
1111
-
1112
- /**
1113
- * Auto-generated: notificationPreferences.list
1114
- */
1115
- async notificationPreferencesListRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<NotificationPreferenceResourceArrayResponse>> {
1116
- const queryParameters: any = {};
1117
-
1118
- const headerParameters: runtime.HTTPHeaders = {};
1119
-
1120
- if (this.configuration && this.configuration.accessToken) {
1121
- const token = this.configuration.accessToken;
1122
- const tokenString = await token("bearerAuth", []);
1123
-
1124
- if (tokenString) {
1125
- headerParameters["Authorization"] = `Bearer ${tokenString}`;
1126
- }
1127
- }
1128
-
1129
- let urlPath = `/api/notification-preferences/list`;
1130
-
1131
- const response = await this.request({
1132
- path: urlPath,
1133
- method: 'POST',
1134
- headers: headerParameters,
1135
- query: queryParameters,
1136
- }, initOverrides);
1137
-
1138
- return new runtime.JSONApiResponse(response, (jsonValue) => NotificationPreferenceResourceArrayResponseFromJSON(jsonValue));
1139
- }
1140
-
1141
- /**
1142
- * Auto-generated: notificationPreferences.list
1143
- */
1144
- async notificationPreferencesList(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<NotificationPreferenceResourceArrayResponse> {
1145
- const response = await this.notificationPreferencesListRaw(initOverrides);
1146
- return await response.value();
1147
- }
1148
-
1149
- /**
1150
- * Auto-generated: notificationPreferences.store
1151
- */
1152
- async notificationPreferencesStoreRaw(requestParameters: NotificationPreferencesStoreOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<NotificationPreferenceResource>> {
1153
- const queryParameters: any = {};
1154
-
1155
- const headerParameters: runtime.HTTPHeaders = {};
1156
-
1157
- headerParameters['Content-Type'] = 'application/json';
1158
-
1159
- if (this.configuration && this.configuration.accessToken) {
1160
- const token = this.configuration.accessToken;
1161
- const tokenString = await token("bearerAuth", []);
1162
-
1163
- if (tokenString) {
1164
- headerParameters["Authorization"] = `Bearer ${tokenString}`;
1165
- }
1166
- }
1167
-
1168
- let urlPath = `/api/notification-preferences`;
1169
-
1170
- const response = await this.request({
1171
- path: urlPath,
1172
- method: 'POST',
1173
- headers: headerParameters,
1174
- query: queryParameters,
1175
- body: NotificationPreferencesStoreRequestToJSON(requestParameters['notificationPreferencesStoreRequest']),
1176
- }, initOverrides);
1177
-
1178
- return new runtime.JSONApiResponse(response, (jsonValue) => NotificationPreferenceResourceFromJSON(jsonValue));
1179
- }
1180
-
1181
- /**
1182
- * Auto-generated: notificationPreferences.store
1183
- */
1184
- async notificationPreferencesStore(requestParameters: NotificationPreferencesStoreOperationRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<NotificationPreferenceResource> {
1185
- const response = await this.notificationPreferencesStoreRaw(requestParameters, initOverrides);
1186
- return await response.value();
1187
- }
1188
-
1189
- /**
1190
- * Auto-generated: notificationTypes.list
1191
- */
1192
- async notificationTypesListRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<NotificationTypeResourceArrayResponse>> {
1193
- const queryParameters: any = {};
1194
-
1195
- const headerParameters: runtime.HTTPHeaders = {};
1196
-
1197
- if (this.configuration && this.configuration.accessToken) {
1198
- const token = this.configuration.accessToken;
1199
- const tokenString = await token("bearerAuth", []);
1200
-
1201
- if (tokenString) {
1202
- headerParameters["Authorization"] = `Bearer ${tokenString}`;
1203
- }
1204
- }
1205
-
1206
- let urlPath = `/api/notification-types/list`;
1207
-
1208
- const response = await this.request({
1209
- path: urlPath,
1210
- method: 'POST',
1211
- headers: headerParameters,
1212
- query: queryParameters,
1213
- }, initOverrides);
1214
-
1215
- return new runtime.JSONApiResponse(response, (jsonValue) => NotificationTypeResourceArrayResponseFromJSON(jsonValue));
1216
- }
1217
-
1218
- /**
1219
- * Auto-generated: notificationTypes.list
1220
- */
1221
- async notificationTypesList(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<NotificationTypeResourceArrayResponse> {
1222
- const response = await this.notificationTypesListRaw(initOverrides);
1223
- return await response.value();
1224
- }
1225
-
1226
1097
  /**
1227
1098
  * Auto-generated: registers.create
1228
1099
  */
@@ -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'],
@@ -0,0 +1,204 @@
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 IncidentResource
42
+ */
43
+ export interface IncidentResource {
44
+ /**
45
+ *
46
+ * @type {number}
47
+ * @memberof IncidentResource
48
+ */
49
+ id: number;
50
+ /**
51
+ *
52
+ * @type {number}
53
+ * @memberof IncidentResource
54
+ */
55
+ venueId?: number | null;
56
+ /**
57
+ *
58
+ * @type {VenueLiteResource}
59
+ * @memberof IncidentResource
60
+ */
61
+ venue: VenueLiteResource | null;
62
+ /**
63
+ *
64
+ * @type {number}
65
+ * @memberof IncidentResource
66
+ */
67
+ securityCompanyId?: number | null;
68
+ /**
69
+ *
70
+ * @type {SecurityCompanyLiteResource}
71
+ * @memberof IncidentResource
72
+ */
73
+ securityCompany: SecurityCompanyLiteResource | null;
74
+ /**
75
+ *
76
+ * @type {number}
77
+ * @memberof IncidentResource
78
+ */
79
+ rosterId?: number | null;
80
+ /**
81
+ *
82
+ * @type {number}
83
+ * @memberof IncidentResource
84
+ */
85
+ registerId?: number | null;
86
+ /**
87
+ *
88
+ * @type {number}
89
+ * @memberof IncidentResource
90
+ */
91
+ userId?: number | null;
92
+ /**
93
+ *
94
+ * @type {UserLiteResource}
95
+ * @memberof IncidentResource
96
+ */
97
+ user: UserLiteResource | null;
98
+ /**
99
+ *
100
+ * @type {number}
101
+ * @memberof IncidentResource
102
+ */
103
+ incidentFieldSchemaId?: number | null;
104
+ /**
105
+ *
106
+ * @type {Date}
107
+ * @memberof IncidentResource
108
+ */
109
+ approvedAt?: Date | null;
110
+ /**
111
+ *
112
+ * @type {number}
113
+ * @memberof IncidentResource
114
+ */
115
+ approvedByUserId?: number | null;
116
+ /**
117
+ *
118
+ * @type {Date}
119
+ * @memberof IncidentResource
120
+ */
121
+ createdAt?: Date | null;
122
+ /**
123
+ *
124
+ * @type {Date}
125
+ * @memberof IncidentResource
126
+ */
127
+ updatedAt?: Date | null;
128
+ /**
129
+ *
130
+ * @type {Array<object>}
131
+ * @memberof IncidentResource
132
+ */
133
+ fields: Array<object>;
134
+ }
135
+
136
+ /**
137
+ * Check if a given object implements the IncidentResource interface.
138
+ */
139
+ export function instanceOfIncidentResource(value: object): value is IncidentResource {
140
+ if (!('id' in value) || value['id'] === undefined) return false;
141
+ if (!('venue' in value) || value['venue'] === undefined) return false;
142
+ if (!('securityCompany' in value) || value['securityCompany'] === undefined) return false;
143
+ if (!('user' in value) || value['user'] === undefined) return false;
144
+ if (!('fields' in value) || value['fields'] === undefined) return false;
145
+ return true;
146
+ }
147
+
148
+ export function IncidentResourceFromJSON(json: any): IncidentResource {
149
+ return IncidentResourceFromJSONTyped(json, false);
150
+ }
151
+
152
+ export function IncidentResourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): IncidentResource {
153
+ if (json == null) {
154
+ return json;
155
+ }
156
+ return {
157
+
158
+ 'id': json['id'],
159
+ 'venueId': json['venueId'] == null ? undefined : json['venueId'],
160
+ 'venue': VenueLiteResourceFromJSON(json['venue']),
161
+ 'securityCompanyId': json['securityCompanyId'] == null ? undefined : json['securityCompanyId'],
162
+ 'securityCompany': SecurityCompanyLiteResourceFromJSON(json['securityCompany']),
163
+ 'rosterId': json['rosterId'] == null ? undefined : json['rosterId'],
164
+ 'registerId': json['registerId'] == null ? undefined : json['registerId'],
165
+ 'userId': json['userId'] == null ? undefined : json['userId'],
166
+ 'user': UserLiteResourceFromJSON(json['user']),
167
+ 'incidentFieldSchemaId': json['incidentFieldSchemaId'] == null ? undefined : json['incidentFieldSchemaId'],
168
+ 'approvedAt': json['approvedAt'] == null ? undefined : (new Date(json['approvedAt'])),
169
+ 'approvedByUserId': json['approvedByUserId'] == null ? undefined : json['approvedByUserId'],
170
+ 'createdAt': json['createdAt'] == null ? undefined : (new Date(json['createdAt'])),
171
+ 'updatedAt': json['updatedAt'] == null ? undefined : (new Date(json['updatedAt'])),
172
+ 'fields': json['fields'],
173
+ };
174
+ }
175
+
176
+ export function IncidentResourceToJSON(json: any): IncidentResource {
177
+ return IncidentResourceToJSONTyped(json, false);
178
+ }
179
+
180
+ export function IncidentResourceToJSONTyped(value?: IncidentResource | null, ignoreDiscriminator: boolean = false): any {
181
+ if (value == null) {
182
+ return value;
183
+ }
184
+
185
+ return {
186
+
187
+ 'id': value['id'],
188
+ 'venueId': value['venueId'],
189
+ 'venue': VenueLiteResourceToJSON(value['venue']),
190
+ 'securityCompanyId': value['securityCompanyId'],
191
+ 'securityCompany': SecurityCompanyLiteResourceToJSON(value['securityCompany']),
192
+ 'rosterId': value['rosterId'],
193
+ 'registerId': value['registerId'],
194
+ 'userId': value['userId'],
195
+ 'user': UserLiteResourceToJSON(value['user']),
196
+ 'incidentFieldSchemaId': value['incidentFieldSchemaId'],
197
+ 'approvedAt': value['approvedAt'] === null ? null : ((value['approvedAt'] as any)?.toISOString()),
198
+ 'approvedByUserId': value['approvedByUserId'],
199
+ 'createdAt': value['createdAt'] === null ? null : ((value['createdAt'] as any)?.toISOString()),
200
+ 'updatedAt': value['updatedAt'] === null ? null : ((value['updatedAt'] as any)?.toISOString()),
201
+ 'fields': value['fields'],
202
+ };
203
+ }
204
+
@@ -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,75 @@
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 IncidentsStoreRequest
20
+ */
21
+ export interface IncidentsStoreRequest {
22
+ /**
23
+ *
24
+ * @type {number}
25
+ * @memberof IncidentsStoreRequest
26
+ */
27
+ venueId: number;
28
+ /**
29
+ * Dynamic fields keyed by section key. Non-repeatable sections are objects of field_key => value; repeatable sections are arrays of such objects. Shape is driven by the venue state's IncidentFieldSchema.
30
+ * @type {object}
31
+ * @memberof IncidentsStoreRequest
32
+ */
33
+ fields: object;
34
+ }
35
+
36
+ /**
37
+ * Check if a given object implements the IncidentsStoreRequest interface.
38
+ */
39
+ export function instanceOfIncidentsStoreRequest(value: object): value is IncidentsStoreRequest {
40
+ if (!('venueId' in value) || value['venueId'] === undefined) return false;
41
+ if (!('fields' in value) || value['fields'] === undefined) return false;
42
+ return true;
43
+ }
44
+
45
+ export function IncidentsStoreRequestFromJSON(json: any): IncidentsStoreRequest {
46
+ return IncidentsStoreRequestFromJSONTyped(json, false);
47
+ }
48
+
49
+ export function IncidentsStoreRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): IncidentsStoreRequest {
50
+ if (json == null) {
51
+ return json;
52
+ }
53
+ return {
54
+
55
+ 'venueId': json['venue_id'],
56
+ 'fields': json['fields'],
57
+ };
58
+ }
59
+
60
+ export function IncidentsStoreRequestToJSON(json: any): IncidentsStoreRequest {
61
+ return IncidentsStoreRequestToJSONTyped(json, false);
62
+ }
63
+
64
+ export function IncidentsStoreRequestToJSONTyped(value?: IncidentsStoreRequest | null, ignoreDiscriminator: boolean = false): any {
65
+ if (value == null) {
66
+ return value;
67
+ }
68
+
69
+ return {
70
+
71
+ 'venue_id': value['venueId'],
72
+ 'fields': value['fields'],
73
+ };
74
+ }
75
+
@@ -159,7 +159,7 @@ export interface RegisterListResource {
159
159
  * @type {number}
160
160
  * @memberof RegisterListResource
161
161
  */
162
- signOffLat: number;
162
+ signOffLat?: number | null;
163
163
  /**
164
164
  *
165
165
  * @type {number}
@@ -196,7 +196,6 @@ export function instanceOfRegisterListResource(value: object): value is Register
196
196
  if (!('firstAid' in value) || value['firstAid'] === undefined) return false;
197
197
  if (!('signOnLat' in value) || value['signOnLat'] === undefined) return false;
198
198
  if (!('signOnLong' in value) || value['signOnLong'] === undefined) return false;
199
- if (!('signOffLat' in value) || value['signOffLat'] === undefined) return false;
200
199
  if (!('incidents' in value) || value['incidents'] === undefined) return false;
201
200
  return true;
202
201
  }
@@ -231,7 +230,7 @@ export function RegisterListResourceFromJSONTyped(json: any, ignoreDiscriminator
231
230
  'firstAid': json['firstAid'],
232
231
  'signOnLat': json['signOnLat'],
233
232
  'signOnLong': json['signOnLong'],
234
- 'signOffLat': json['signOffLat'],
233
+ 'signOffLat': json['signOffLat'] == null ? undefined : json['signOffLat'],
235
234
  'signOffLong': json['signOffLong'] == null ? undefined : json['signOffLong'],
236
235
  'incidents': json['incidents'],
237
236
  };