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

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 +5 -3
  2. package/README.md +2 -2
  3. package/dist/apis/GeneralApi.d.ts +39 -12
  4. package/dist/apis/GeneralApi.js +215 -55
  5. package/dist/models/AddressResource.d.ts +1 -1
  6. package/dist/models/AddressResource.js +3 -1
  7. package/dist/models/NotificationPreferenceResource.d.ts +63 -0
  8. package/dist/models/NotificationPreferenceResource.js +67 -0
  9. package/dist/models/NotificationPreferenceResourceArrayResponse.d.ts +33 -0
  10. package/dist/models/NotificationPreferenceResourceArrayResponse.js +50 -0
  11. package/dist/models/NotificationPreferencesStoreRequest.d.ts +55 -0
  12. package/dist/models/NotificationPreferencesStoreRequest.js +68 -0
  13. package/dist/models/NotificationTypeResource.d.ts +38 -0
  14. package/dist/models/NotificationTypeResource.js +55 -0
  15. package/dist/models/NotificationTypeResourceArrayResponse.d.ts +33 -0
  16. package/dist/models/NotificationTypeResourceArrayResponse.js +50 -0
  17. package/dist/models/RegisterGroupedByRosterResource.d.ts +1 -1
  18. package/dist/models/RegisterGroupedByRosterResource.js +3 -4
  19. package/dist/models/RegisterListResource.d.ts +3 -3
  20. package/dist/models/RegisterListResource.js +4 -6
  21. package/dist/models/RegisterResource.d.ts +2 -2
  22. package/dist/models/RegisterResource.js +8 -8
  23. package/dist/models/RosterListResource.d.ts +1 -1
  24. package/dist/models/RosterListResource.js +4 -3
  25. package/dist/models/SecurityCompanyResource.d.ts +1 -1
  26. package/dist/models/SecurityCompanyResource.js +1 -3
  27. package/dist/models/index.d.ts +5 -3
  28. package/dist/models/index.js +5 -3
  29. package/package.json +1 -1
  30. package/src/apis/GeneralApi.ts +179 -50
  31. package/src/models/AddressResource.ts +3 -2
  32. package/src/models/NotificationPreferenceResource.ts +116 -0
  33. package/src/models/NotificationPreferenceResourceArrayResponse.ts +73 -0
  34. package/src/models/NotificationPreferencesStoreRequest.ts +97 -0
  35. package/src/models/NotificationTypeResource.ts +75 -0
  36. package/src/models/NotificationTypeResourceArrayResponse.ts +73 -0
  37. package/src/models/RegisterGroupedByRosterResource.ts +3 -4
  38. package/src/models/RegisterListResource.ts +7 -8
  39. package/src/models/RegisterResource.ts +6 -6
  40. package/src/models/RosterListResource.ts +4 -3
  41. package/src/models/SecurityCompanyResource.ts +2 -3
  42. package/src/models/index.ts +5 -3
  43. package/dist/models/IncidentResource.d.ts +0 -119
  44. package/dist/models/IncidentResource.js +0 -91
  45. package/dist/models/IncidentResourceArrayResponse.d.ts +0 -33
  46. package/dist/models/IncidentResourceArrayResponse.js +0 -50
  47. package/dist/models/IncidentsStoreRequest.d.ts +0 -38
  48. package/dist/models/IncidentsStoreRequest.js +0 -55
  49. package/src/models/IncidentResource.ts +0 -204
  50. package/src/models/IncidentResourceArrayResponse.ts +0 -73
  51. package/src/models/IncidentsStoreRequest.ts +0 -75
@@ -18,8 +18,6 @@ import type {
18
18
  AssetFileForUploadResource,
19
19
  GenericResponse,
20
20
  IncidentFieldSchemaResource,
21
- IncidentResource,
22
- IncidentsStoreRequest,
23
21
  IndexMinimalUserRequest,
24
22
  IndexUserRequest,
25
23
  LicenceLiteResourceArrayResponse,
@@ -30,6 +28,10 @@ import type {
30
28
  LicencesUpdateRequest,
31
29
  LicencesVerifyRequest,
32
30
  LoginAuthRequest,
31
+ NotificationPreferenceResource,
32
+ NotificationPreferenceResourceArrayResponse,
33
+ NotificationPreferencesStoreRequest,
34
+ NotificationTypeResourceArrayResponse,
33
35
  PaginatedLicenceListResourceResponse,
34
36
  PaginatedRegisterGroupedByRosterResourceResponse,
35
37
  PaginatedRosterListResourceResponse,
@@ -89,10 +91,6 @@ import {
89
91
  GenericResponseToJSON,
90
92
  IncidentFieldSchemaResourceFromJSON,
91
93
  IncidentFieldSchemaResourceToJSON,
92
- IncidentResourceFromJSON,
93
- IncidentResourceToJSON,
94
- IncidentsStoreRequestFromJSON,
95
- IncidentsStoreRequestToJSON,
96
94
  IndexMinimalUserRequestFromJSON,
97
95
  IndexMinimalUserRequestToJSON,
98
96
  IndexUserRequestFromJSON,
@@ -113,6 +111,14 @@ import {
113
111
  LicencesVerifyRequestToJSON,
114
112
  LoginAuthRequestFromJSON,
115
113
  LoginAuthRequestToJSON,
114
+ NotificationPreferenceResourceFromJSON,
115
+ NotificationPreferenceResourceToJSON,
116
+ NotificationPreferenceResourceArrayResponseFromJSON,
117
+ NotificationPreferenceResourceArrayResponseToJSON,
118
+ NotificationPreferencesStoreRequestFromJSON,
119
+ NotificationPreferencesStoreRequestToJSON,
120
+ NotificationTypeResourceArrayResponseFromJSON,
121
+ NotificationTypeResourceArrayResponseToJSON,
116
122
  PaginatedLicenceListResourceResponseFromJSON,
117
123
  PaginatedLicenceListResourceResponseToJSON,
118
124
  PaginatedRegisterGroupedByRosterResourceResponseFromJSON,
@@ -225,10 +231,6 @@ export interface IncidentFieldSchemasShowRequest {
225
231
  state: number;
226
232
  }
227
233
 
228
- export interface IncidentsStoreOperationRequest {
229
- incidentsStoreRequest?: IncidentsStoreRequest;
230
- }
231
-
232
234
  export interface IndexMinimalUserOperationRequest {
233
235
  indexMinimalUserRequest?: IndexMinimalUserRequest;
234
236
  }
@@ -270,6 +272,14 @@ export interface LoginAuthOperationRequest {
270
272
  loginAuthRequest?: LoginAuthRequest;
271
273
  }
272
274
 
275
+ export interface NotificationPreferencesDeleteRequest {
276
+ notificationPreference: number;
277
+ }
278
+
279
+ export interface NotificationPreferencesStoreOperationRequest {
280
+ notificationPreferencesStoreRequest?: NotificationPreferencesStoreRequest;
281
+ }
282
+
273
283
  export interface RegistersCreateOperationRequest {
274
284
  registersCreateRequest?: RegistersCreateRequest;
275
285
  }
@@ -599,46 +609,6 @@ export class GeneralApi extends runtime.BaseAPI {
599
609
  return await response.value();
600
610
  }
601
611
 
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
-
642
612
  /**
643
613
  * Auto-generated: indexMinimalUser
644
614
  */
@@ -1094,6 +1064,165 @@ export class GeneralApi extends runtime.BaseAPI {
1094
1064
  return await response.value();
1095
1065
  }
1096
1066
 
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
+
1097
1226
  /**
1098
1227
  * Auto-generated: registers.create
1099
1228
  */
@@ -36,7 +36,7 @@ export interface AddressResource {
36
36
  * @type {string}
37
37
  * @memberof AddressResource
38
38
  */
39
- addressLine2?: string | null;
39
+ addressLine2: string;
40
40
  /**
41
41
  *
42
42
  * @type {string}
@@ -80,6 +80,7 @@ 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;
83
84
  if (!('suburb' in value) || value['suburb'] === undefined) return false;
84
85
  if (!('city' in value) || value['city'] === undefined) return false;
85
86
  if (!('state' in value) || value['state'] === undefined) return false;
@@ -101,7 +102,7 @@ export function AddressResourceFromJSONTyped(json: any, ignoreDiscriminator: boo
101
102
 
102
103
  'id': json['id'] == null ? undefined : json['id'],
103
104
  'addressLine1': json['addressLine1'],
104
- 'addressLine2': json['addressLine2'] == null ? undefined : json['addressLine2'],
105
+ 'addressLine2': json['addressLine2'],
105
106
  'suburb': json['suburb'],
106
107
  'city': json['city'],
107
108
  'state': json['state'],
@@ -0,0 +1,116 @@
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
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface NotificationPreferenceResource
28
+ */
29
+ export interface NotificationPreferenceResource {
30
+ /**
31
+ *
32
+ * @type {number}
33
+ * @memberof NotificationPreferenceResource
34
+ */
35
+ id?: number | null;
36
+ /**
37
+ *
38
+ * @type {string}
39
+ * @memberof NotificationPreferenceResource
40
+ */
41
+ notificationType: string;
42
+ /**
43
+ *
44
+ * @type {VenueLiteResource}
45
+ * @memberof NotificationPreferenceResource
46
+ */
47
+ venue: VenueLiteResource | null;
48
+ /**
49
+ *
50
+ * @type {boolean}
51
+ * @memberof NotificationPreferenceResource
52
+ */
53
+ enabled: boolean;
54
+ /**
55
+ *
56
+ * @type {Date}
57
+ * @memberof NotificationPreferenceResource
58
+ */
59
+ createdAt?: Date | null;
60
+ /**
61
+ *
62
+ * @type {Date}
63
+ * @memberof NotificationPreferenceResource
64
+ */
65
+ updatedAt?: Date | null;
66
+ }
67
+
68
+ /**
69
+ * Check if a given object implements the NotificationPreferenceResource interface.
70
+ */
71
+ export function instanceOfNotificationPreferenceResource(value: object): value is NotificationPreferenceResource {
72
+ if (!('notificationType' in value) || value['notificationType'] === undefined) return false;
73
+ if (!('venue' in value) || value['venue'] === undefined) return false;
74
+ if (!('enabled' in value) || value['enabled'] === undefined) return false;
75
+ return true;
76
+ }
77
+
78
+ export function NotificationPreferenceResourceFromJSON(json: any): NotificationPreferenceResource {
79
+ return NotificationPreferenceResourceFromJSONTyped(json, false);
80
+ }
81
+
82
+ export function NotificationPreferenceResourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): NotificationPreferenceResource {
83
+ if (json == null) {
84
+ return json;
85
+ }
86
+ return {
87
+
88
+ 'id': json['id'] == null ? undefined : json['id'],
89
+ 'notificationType': json['notificationType'],
90
+ 'venue': VenueLiteResourceFromJSON(json['venue']),
91
+ 'enabled': json['enabled'],
92
+ 'createdAt': json['createdAt'] == null ? undefined : (new Date(json['createdAt'])),
93
+ 'updatedAt': json['updatedAt'] == null ? undefined : (new Date(json['updatedAt'])),
94
+ };
95
+ }
96
+
97
+ export function NotificationPreferenceResourceToJSON(json: any): NotificationPreferenceResource {
98
+ return NotificationPreferenceResourceToJSONTyped(json, false);
99
+ }
100
+
101
+ export function NotificationPreferenceResourceToJSONTyped(value?: NotificationPreferenceResource | null, ignoreDiscriminator: boolean = false): any {
102
+ if (value == null) {
103
+ return value;
104
+ }
105
+
106
+ return {
107
+
108
+ 'id': value['id'],
109
+ 'notificationType': value['notificationType'],
110
+ 'venue': VenueLiteResourceToJSON(value['venue']),
111
+ 'enabled': value['enabled'],
112
+ 'createdAt': value['createdAt'] === null ? null : ((value['createdAt'] as any)?.toISOString()),
113
+ 'updatedAt': value['updatedAt'] === null ? null : ((value['updatedAt'] as any)?.toISOString()),
114
+ };
115
+ }
116
+
@@ -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 { NotificationPreferenceResource } from './NotificationPreferenceResource';
17
+ import {
18
+ NotificationPreferenceResourceFromJSON,
19
+ NotificationPreferenceResourceFromJSONTyped,
20
+ NotificationPreferenceResourceToJSON,
21
+ NotificationPreferenceResourceToJSONTyped,
22
+ } from './NotificationPreferenceResource';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface NotificationPreferenceResourceArrayResponse
28
+ */
29
+ export interface NotificationPreferenceResourceArrayResponse {
30
+ /**
31
+ *
32
+ * @type {Array<NotificationPreferenceResource>}
33
+ * @memberof NotificationPreferenceResourceArrayResponse
34
+ */
35
+ data?: Array<NotificationPreferenceResource>;
36
+ }
37
+
38
+ /**
39
+ * Check if a given object implements the NotificationPreferenceResourceArrayResponse interface.
40
+ */
41
+ export function instanceOfNotificationPreferenceResourceArrayResponse(value: object): value is NotificationPreferenceResourceArrayResponse {
42
+ return true;
43
+ }
44
+
45
+ export function NotificationPreferenceResourceArrayResponseFromJSON(json: any): NotificationPreferenceResourceArrayResponse {
46
+ return NotificationPreferenceResourceArrayResponseFromJSONTyped(json, false);
47
+ }
48
+
49
+ export function NotificationPreferenceResourceArrayResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): NotificationPreferenceResourceArrayResponse {
50
+ if (json == null) {
51
+ return json;
52
+ }
53
+ return {
54
+
55
+ 'data': json['data'] == null ? undefined : ((json['data'] as Array<any>).map(NotificationPreferenceResourceFromJSON)),
56
+ };
57
+ }
58
+
59
+ export function NotificationPreferenceResourceArrayResponseToJSON(json: any): NotificationPreferenceResourceArrayResponse {
60
+ return NotificationPreferenceResourceArrayResponseToJSONTyped(json, false);
61
+ }
62
+
63
+ export function NotificationPreferenceResourceArrayResponseToJSONTyped(value?: NotificationPreferenceResourceArrayResponse | 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(NotificationPreferenceResourceToJSON)),
71
+ };
72
+ }
73
+
@@ -0,0 +1,97 @@
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 NotificationPreferencesStoreRequest
20
+ */
21
+ export interface NotificationPreferencesStoreRequest {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof NotificationPreferencesStoreRequest
26
+ */
27
+ notificationType: NotificationPreferencesStoreRequestNotificationTypeEnum;
28
+ /**
29
+ *
30
+ * @type {number}
31
+ * @memberof NotificationPreferencesStoreRequest
32
+ */
33
+ venueId?: number;
34
+ /**
35
+ *
36
+ * @type {boolean}
37
+ * @memberof NotificationPreferencesStoreRequest
38
+ */
39
+ enabled: boolean;
40
+ }
41
+
42
+
43
+ /**
44
+ * @export
45
+ */
46
+ export const NotificationPreferencesStoreRequestNotificationTypeEnum = {
47
+ IncidentAdded: 'incident_added',
48
+ NonSignOff: 'non_sign_off',
49
+ NonSignOn: 'non_sign_on',
50
+ SignOnRejected: 'sign_on_rejected',
51
+ LicenceUpdated: 'licence_updated'
52
+ } as const;
53
+ export type NotificationPreferencesStoreRequestNotificationTypeEnum = typeof NotificationPreferencesStoreRequestNotificationTypeEnum[keyof typeof NotificationPreferencesStoreRequestNotificationTypeEnum];
54
+
55
+
56
+ /**
57
+ * Check if a given object implements the NotificationPreferencesStoreRequest interface.
58
+ */
59
+ export function instanceOfNotificationPreferencesStoreRequest(value: object): value is NotificationPreferencesStoreRequest {
60
+ if (!('notificationType' in value) || value['notificationType'] === undefined) return false;
61
+ if (!('enabled' in value) || value['enabled'] === undefined) return false;
62
+ return true;
63
+ }
64
+
65
+ export function NotificationPreferencesStoreRequestFromJSON(json: any): NotificationPreferencesStoreRequest {
66
+ return NotificationPreferencesStoreRequestFromJSONTyped(json, false);
67
+ }
68
+
69
+ export function NotificationPreferencesStoreRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): NotificationPreferencesStoreRequest {
70
+ if (json == null) {
71
+ return json;
72
+ }
73
+ return {
74
+
75
+ 'notificationType': json['notification_type'],
76
+ 'venueId': json['venue_id'] == null ? undefined : json['venue_id'],
77
+ 'enabled': json['enabled'],
78
+ };
79
+ }
80
+
81
+ export function NotificationPreferencesStoreRequestToJSON(json: any): NotificationPreferencesStoreRequest {
82
+ return NotificationPreferencesStoreRequestToJSONTyped(json, false);
83
+ }
84
+
85
+ export function NotificationPreferencesStoreRequestToJSONTyped(value?: NotificationPreferencesStoreRequest | null, ignoreDiscriminator: boolean = false): any {
86
+ if (value == null) {
87
+ return value;
88
+ }
89
+
90
+ return {
91
+
92
+ 'notification_type': value['notificationType'],
93
+ 'venue_id': value['venueId'],
94
+ 'enabled': value['enabled'],
95
+ };
96
+ }
97
+
@@ -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 NotificationTypeResource
20
+ */
21
+ export interface NotificationTypeResource {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof NotificationTypeResource
26
+ */
27
+ value: string;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof NotificationTypeResource
32
+ */
33
+ label: string;
34
+ }
35
+
36
+ /**
37
+ * Check if a given object implements the NotificationTypeResource interface.
38
+ */
39
+ export function instanceOfNotificationTypeResource(value: object): value is NotificationTypeResource {
40
+ if (!('value' in value) || value['value'] === undefined) return false;
41
+ if (!('label' in value) || value['label'] === undefined) return false;
42
+ return true;
43
+ }
44
+
45
+ export function NotificationTypeResourceFromJSON(json: any): NotificationTypeResource {
46
+ return NotificationTypeResourceFromJSONTyped(json, false);
47
+ }
48
+
49
+ export function NotificationTypeResourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): NotificationTypeResource {
50
+ if (json == null) {
51
+ return json;
52
+ }
53
+ return {
54
+
55
+ 'value': json['value'],
56
+ 'label': json['label'],
57
+ };
58
+ }
59
+
60
+ export function NotificationTypeResourceToJSON(json: any): NotificationTypeResource {
61
+ return NotificationTypeResourceToJSONTyped(json, false);
62
+ }
63
+
64
+ export function NotificationTypeResourceToJSONTyped(value?: NotificationTypeResource | null, ignoreDiscriminator: boolean = false): any {
65
+ if (value == null) {
66
+ return value;
67
+ }
68
+
69
+ return {
70
+
71
+ 'value': value['value'],
72
+ 'label': value['label'],
73
+ };
74
+ }
75
+