@digital8/security-registers-backend-ts-sdk 0.0.202 → 0.0.203
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 -3
- package/README.md +2 -2
- package/dist/apis/GeneralApi.d.ts +43 -16
- package/dist/apis/GeneralApi.js +221 -62
- package/dist/models/AddressResource.d.ts +1 -1
- package/dist/models/AddressResource.js +3 -1
- package/dist/models/IncidentFieldSchemasShowRequest.d.ts +46 -0
- package/dist/models/IncidentFieldSchemasShowRequest.js +65 -0
- package/dist/models/NotificationPreferenceResource.d.ts +63 -0
- package/dist/models/NotificationPreferenceResource.js +67 -0
- package/dist/models/NotificationPreferenceResourceArrayResponse.d.ts +33 -0
- package/dist/models/NotificationPreferenceResourceArrayResponse.js +50 -0
- package/dist/models/NotificationPreferencesStoreRequest.d.ts +55 -0
- package/dist/models/NotificationPreferencesStoreRequest.js +68 -0
- package/dist/models/NotificationTypeResource.d.ts +38 -0
- package/dist/models/NotificationTypeResource.js +55 -0
- package/dist/models/NotificationTypeResourceArrayResponse.d.ts +33 -0
- package/dist/models/NotificationTypeResourceArrayResponse.js +50 -0
- package/dist/models/RegisterListResource.d.ts +3 -3
- package/dist/models/RegisterListResource.js +9 -3
- package/dist/models/RegisterResource.d.ts +2 -2
- package/dist/models/RegisterResource.js +4 -4
- package/dist/models/RosterListResource.d.ts +1 -1
- package/dist/models/RosterListResource.js +3 -4
- 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 -3
- package/dist/models/index.js +6 -3
- package/package.json +1 -1
- package/src/apis/GeneralApi.ts +191 -64
- package/src/models/AddressResource.ts +3 -2
- package/src/models/IncidentFieldSchemasShowRequest.ts +83 -0
- package/src/models/NotificationPreferenceResource.ts +116 -0
- package/src/models/NotificationPreferenceResourceArrayResponse.ts +73 -0
- package/src/models/NotificationPreferencesStoreRequest.ts +97 -0
- package/src/models/NotificationTypeResource.ts +75 -0
- package/src/models/NotificationTypeResourceArrayResponse.ts +73 -0
- package/src/models/RegisterListResource.ts +9 -6
- package/src/models/RegisterResource.ts +5 -5
- package/src/models/RosterListResource.ts +3 -4
- package/src/models/RosterResource.ts +4 -3
- package/src/models/SecurityCompanyResource.ts +2 -3
- package/src/models/index.ts +6 -3
- package/dist/models/IncidentResource.d.ts +0 -119
- package/dist/models/IncidentResource.js +0 -91
- package/dist/models/IncidentResourceArrayResponse.d.ts +0 -33
- package/dist/models/IncidentResourceArrayResponse.js +0 -50
- package/dist/models/IncidentsStoreRequest.d.ts +0 -38
- package/dist/models/IncidentsStoreRequest.js +0 -55
- package/src/models/IncidentResource.ts +0 -204
- package/src/models/IncidentResourceArrayResponse.ts +0 -73
- package/src/models/IncidentsStoreRequest.ts +0 -75
|
@@ -25,8 +25,6 @@ var AddressResource_1 = require("./AddressResource");
|
|
|
25
25
|
function instanceOfSecurityCompanyResource(value) {
|
|
26
26
|
if (!('name' in value) || value['name'] === undefined)
|
|
27
27
|
return false;
|
|
28
|
-
if (!('email' in value) || value['email'] === undefined)
|
|
29
|
-
return false;
|
|
30
28
|
if (!('isEnabled' in value) || value['isEnabled'] === undefined)
|
|
31
29
|
return false;
|
|
32
30
|
if (!('address' in value) || value['address'] === undefined)
|
|
@@ -45,7 +43,7 @@ function SecurityCompanyResourceFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
45
43
|
return {
|
|
46
44
|
'id': json['id'] == null ? undefined : json['id'],
|
|
47
45
|
'name': json['name'],
|
|
48
|
-
'email': json['email'],
|
|
46
|
+
'email': json['email'] == null ? undefined : json['email'],
|
|
49
47
|
'isEnabled': json['isEnabled'],
|
|
50
48
|
'address': (0, AddressResource_1.AddressResourceFromJSON)(json['address']),
|
|
51
49
|
'licenceNumber': json['licenceNumber'],
|
package/dist/models/index.d.ts
CHANGED
|
@@ -11,9 +11,7 @@ export * from './CurrentRegisterResourceArrayResponse';
|
|
|
11
11
|
export * from './GenericResponse';
|
|
12
12
|
export * from './IncidentFieldSchemaResource';
|
|
13
13
|
export * from './IncidentFieldSchemaResourceArrayResponse';
|
|
14
|
-
export * from './
|
|
15
|
-
export * from './IncidentResourceArrayResponse';
|
|
16
|
-
export * from './IncidentsStoreRequest';
|
|
14
|
+
export * from './IncidentFieldSchemasShowRequest';
|
|
17
15
|
export * from './IndexMinimalUserRequest';
|
|
18
16
|
export * from './IndexUserRequest';
|
|
19
17
|
export * from './LicenceListResource';
|
|
@@ -28,6 +26,11 @@ export * from './LicencesStoreRequest';
|
|
|
28
26
|
export * from './LicencesUpdateRequest';
|
|
29
27
|
export * from './LicencesVerifyRequest';
|
|
30
28
|
export * from './LoginAuthRequest';
|
|
29
|
+
export * from './NotificationPreferenceResource';
|
|
30
|
+
export * from './NotificationPreferenceResourceArrayResponse';
|
|
31
|
+
export * from './NotificationPreferencesStoreRequest';
|
|
32
|
+
export * from './NotificationTypeResource';
|
|
33
|
+
export * from './NotificationTypeResourceArrayResponse';
|
|
31
34
|
export * from './PaginatedLicenceListResourceResponse';
|
|
32
35
|
export * from './PaginatedLicenceResourceResponse';
|
|
33
36
|
export * from './PaginatedRegisterGroupedByRosterResourceResponse';
|
package/dist/models/index.js
CHANGED
|
@@ -29,9 +29,7 @@ __exportStar(require("./CurrentRegisterResourceArrayResponse"), exports);
|
|
|
29
29
|
__exportStar(require("./GenericResponse"), exports);
|
|
30
30
|
__exportStar(require("./IncidentFieldSchemaResource"), exports);
|
|
31
31
|
__exportStar(require("./IncidentFieldSchemaResourceArrayResponse"), exports);
|
|
32
|
-
__exportStar(require("./
|
|
33
|
-
__exportStar(require("./IncidentResourceArrayResponse"), exports);
|
|
34
|
-
__exportStar(require("./IncidentsStoreRequest"), exports);
|
|
32
|
+
__exportStar(require("./IncidentFieldSchemasShowRequest"), exports);
|
|
35
33
|
__exportStar(require("./IndexMinimalUserRequest"), exports);
|
|
36
34
|
__exportStar(require("./IndexUserRequest"), exports);
|
|
37
35
|
__exportStar(require("./LicenceListResource"), exports);
|
|
@@ -46,6 +44,11 @@ __exportStar(require("./LicencesStoreRequest"), exports);
|
|
|
46
44
|
__exportStar(require("./LicencesUpdateRequest"), exports);
|
|
47
45
|
__exportStar(require("./LicencesVerifyRequest"), exports);
|
|
48
46
|
__exportStar(require("./LoginAuthRequest"), exports);
|
|
47
|
+
__exportStar(require("./NotificationPreferenceResource"), exports);
|
|
48
|
+
__exportStar(require("./NotificationPreferenceResourceArrayResponse"), exports);
|
|
49
|
+
__exportStar(require("./NotificationPreferencesStoreRequest"), exports);
|
|
50
|
+
__exportStar(require("./NotificationTypeResource"), exports);
|
|
51
|
+
__exportStar(require("./NotificationTypeResourceArrayResponse"), exports);
|
|
49
52
|
__exportStar(require("./PaginatedLicenceListResourceResponse"), exports);
|
|
50
53
|
__exportStar(require("./PaginatedLicenceResourceResponse"), exports);
|
|
51
54
|
__exportStar(require("./PaginatedRegisterGroupedByRosterResourceResponse"), exports);
|
package/package.json
CHANGED
package/src/apis/GeneralApi.ts
CHANGED
|
@@ -18,8 +18,7 @@ import type {
|
|
|
18
18
|
AssetFileForUploadResource,
|
|
19
19
|
GenericResponse,
|
|
20
20
|
IncidentFieldSchemaResource,
|
|
21
|
-
|
|
22
|
-
IncidentsStoreRequest,
|
|
21
|
+
IncidentFieldSchemasShowRequest,
|
|
23
22
|
IndexMinimalUserRequest,
|
|
24
23
|
IndexUserRequest,
|
|
25
24
|
LicenceLiteResourceArrayResponse,
|
|
@@ -30,6 +29,10 @@ import type {
|
|
|
30
29
|
LicencesUpdateRequest,
|
|
31
30
|
LicencesVerifyRequest,
|
|
32
31
|
LoginAuthRequest,
|
|
32
|
+
NotificationPreferenceResource,
|
|
33
|
+
NotificationPreferenceResourceArrayResponse,
|
|
34
|
+
NotificationPreferencesStoreRequest,
|
|
35
|
+
NotificationTypeResourceArrayResponse,
|
|
33
36
|
PaginatedLicenceListResourceResponse,
|
|
34
37
|
PaginatedRegisterGroupedByRosterResourceResponse,
|
|
35
38
|
PaginatedRosterListResourceResponse,
|
|
@@ -89,10 +92,8 @@ import {
|
|
|
89
92
|
GenericResponseToJSON,
|
|
90
93
|
IncidentFieldSchemaResourceFromJSON,
|
|
91
94
|
IncidentFieldSchemaResourceToJSON,
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
IncidentsStoreRequestFromJSON,
|
|
95
|
-
IncidentsStoreRequestToJSON,
|
|
95
|
+
IncidentFieldSchemasShowRequestFromJSON,
|
|
96
|
+
IncidentFieldSchemasShowRequestToJSON,
|
|
96
97
|
IndexMinimalUserRequestFromJSON,
|
|
97
98
|
IndexMinimalUserRequestToJSON,
|
|
98
99
|
IndexUserRequestFromJSON,
|
|
@@ -113,6 +114,14 @@ import {
|
|
|
113
114
|
LicencesVerifyRequestToJSON,
|
|
114
115
|
LoginAuthRequestFromJSON,
|
|
115
116
|
LoginAuthRequestToJSON,
|
|
117
|
+
NotificationPreferenceResourceFromJSON,
|
|
118
|
+
NotificationPreferenceResourceToJSON,
|
|
119
|
+
NotificationPreferenceResourceArrayResponseFromJSON,
|
|
120
|
+
NotificationPreferenceResourceArrayResponseToJSON,
|
|
121
|
+
NotificationPreferencesStoreRequestFromJSON,
|
|
122
|
+
NotificationPreferencesStoreRequestToJSON,
|
|
123
|
+
NotificationTypeResourceArrayResponseFromJSON,
|
|
124
|
+
NotificationTypeResourceArrayResponseToJSON,
|
|
116
125
|
PaginatedLicenceListResourceResponseFromJSON,
|
|
117
126
|
PaginatedLicenceListResourceResponseToJSON,
|
|
118
127
|
PaginatedRegisterGroupedByRosterResourceResponseFromJSON,
|
|
@@ -221,12 +230,8 @@ export interface DestroyUserRequest {
|
|
|
221
230
|
user: number;
|
|
222
231
|
}
|
|
223
232
|
|
|
224
|
-
export interface
|
|
225
|
-
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
export interface IncidentsStoreOperationRequest {
|
|
229
|
-
incidentsStoreRequest?: IncidentsStoreRequest;
|
|
233
|
+
export interface IncidentFieldSchemasShowOperationRequest {
|
|
234
|
+
incidentFieldSchemasShowRequest?: IncidentFieldSchemasShowRequest;
|
|
230
235
|
}
|
|
231
236
|
|
|
232
237
|
export interface IndexMinimalUserOperationRequest {
|
|
@@ -270,6 +275,14 @@ export interface LoginAuthOperationRequest {
|
|
|
270
275
|
loginAuthRequest?: LoginAuthRequest;
|
|
271
276
|
}
|
|
272
277
|
|
|
278
|
+
export interface NotificationPreferencesDeleteRequest {
|
|
279
|
+
notificationPreference: number;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
export interface NotificationPreferencesStoreOperationRequest {
|
|
283
|
+
notificationPreferencesStoreRequest?: NotificationPreferencesStoreRequest;
|
|
284
|
+
}
|
|
285
|
+
|
|
273
286
|
export interface RegistersCreateOperationRequest {
|
|
274
287
|
registersCreateRequest?: RegistersCreateRequest;
|
|
275
288
|
}
|
|
@@ -557,52 +570,7 @@ export class GeneralApi extends runtime.BaseAPI {
|
|
|
557
570
|
/**
|
|
558
571
|
* Auto-generated: incidentFieldSchemas.show
|
|
559
572
|
*/
|
|
560
|
-
async incidentFieldSchemasShowRaw(requestParameters:
|
|
561
|
-
if (requestParameters['state'] == null) {
|
|
562
|
-
throw new runtime.RequiredError(
|
|
563
|
-
'state',
|
|
564
|
-
'Required parameter "state" was null or undefined when calling incidentFieldSchemasShow().'
|
|
565
|
-
);
|
|
566
|
-
}
|
|
567
|
-
|
|
568
|
-
const queryParameters: any = {};
|
|
569
|
-
|
|
570
|
-
const headerParameters: runtime.HTTPHeaders = {};
|
|
571
|
-
|
|
572
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
573
|
-
const token = this.configuration.accessToken;
|
|
574
|
-
const tokenString = await token("bearerAuth", []);
|
|
575
|
-
|
|
576
|
-
if (tokenString) {
|
|
577
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
578
|
-
}
|
|
579
|
-
}
|
|
580
|
-
|
|
581
|
-
let urlPath = `/api/incident-field-schemas/{state}`;
|
|
582
|
-
urlPath = urlPath.replace(`{${"state"}}`, encodeURIComponent(String(requestParameters['state'])));
|
|
583
|
-
|
|
584
|
-
const response = await this.request({
|
|
585
|
-
path: urlPath,
|
|
586
|
-
method: 'GET',
|
|
587
|
-
headers: headerParameters,
|
|
588
|
-
query: queryParameters,
|
|
589
|
-
}, initOverrides);
|
|
590
|
-
|
|
591
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => IncidentFieldSchemaResourceFromJSON(jsonValue));
|
|
592
|
-
}
|
|
593
|
-
|
|
594
|
-
/**
|
|
595
|
-
* Auto-generated: incidentFieldSchemas.show
|
|
596
|
-
*/
|
|
597
|
-
async incidentFieldSchemasShow(requestParameters: IncidentFieldSchemasShowRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IncidentFieldSchemaResource> {
|
|
598
|
-
const response = await this.incidentFieldSchemasShowRaw(requestParameters, initOverrides);
|
|
599
|
-
return await response.value();
|
|
600
|
-
}
|
|
601
|
-
|
|
602
|
-
/**
|
|
603
|
-
* Auto-generated: incidents.store
|
|
604
|
-
*/
|
|
605
|
-
async incidentsStoreRaw(requestParameters: IncidentsStoreOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<IncidentResource>> {
|
|
573
|
+
async incidentFieldSchemasShowRaw(requestParameters: IncidentFieldSchemasShowOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<IncidentFieldSchemaResource>> {
|
|
606
574
|
const queryParameters: any = {};
|
|
607
575
|
|
|
608
576
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
@@ -618,24 +586,24 @@ export class GeneralApi extends runtime.BaseAPI {
|
|
|
618
586
|
}
|
|
619
587
|
}
|
|
620
588
|
|
|
621
|
-
let urlPath = `/api/
|
|
589
|
+
let urlPath = `/api/incident-field-schemas`;
|
|
622
590
|
|
|
623
591
|
const response = await this.request({
|
|
624
592
|
path: urlPath,
|
|
625
593
|
method: 'POST',
|
|
626
594
|
headers: headerParameters,
|
|
627
595
|
query: queryParameters,
|
|
628
|
-
body:
|
|
596
|
+
body: IncidentFieldSchemasShowRequestToJSON(requestParameters['incidentFieldSchemasShowRequest']),
|
|
629
597
|
}, initOverrides);
|
|
630
598
|
|
|
631
|
-
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
|
599
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => IncidentFieldSchemaResourceFromJSON(jsonValue));
|
|
632
600
|
}
|
|
633
601
|
|
|
634
602
|
/**
|
|
635
|
-
* Auto-generated:
|
|
603
|
+
* Auto-generated: incidentFieldSchemas.show
|
|
636
604
|
*/
|
|
637
|
-
async
|
|
638
|
-
const response = await this.
|
|
605
|
+
async incidentFieldSchemasShow(requestParameters: IncidentFieldSchemasShowOperationRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IncidentFieldSchemaResource> {
|
|
606
|
+
const response = await this.incidentFieldSchemasShowRaw(requestParameters, initOverrides);
|
|
639
607
|
return await response.value();
|
|
640
608
|
}
|
|
641
609
|
|
|
@@ -1094,6 +1062,165 @@ export class GeneralApi extends runtime.BaseAPI {
|
|
|
1094
1062
|
return await response.value();
|
|
1095
1063
|
}
|
|
1096
1064
|
|
|
1065
|
+
/**
|
|
1066
|
+
* Auto-generated: notificationPreferences.delete
|
|
1067
|
+
*/
|
|
1068
|
+
async notificationPreferencesDeleteRaw(requestParameters: NotificationPreferencesDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GenericResponse>> {
|
|
1069
|
+
if (requestParameters['notificationPreference'] == null) {
|
|
1070
|
+
throw new runtime.RequiredError(
|
|
1071
|
+
'notificationPreference',
|
|
1072
|
+
'Required parameter "notificationPreference" was null or undefined when calling notificationPreferencesDelete().'
|
|
1073
|
+
);
|
|
1074
|
+
}
|
|
1075
|
+
|
|
1076
|
+
const queryParameters: any = {};
|
|
1077
|
+
|
|
1078
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
1079
|
+
|
|
1080
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
1081
|
+
const token = this.configuration.accessToken;
|
|
1082
|
+
const tokenString = await token("bearerAuth", []);
|
|
1083
|
+
|
|
1084
|
+
if (tokenString) {
|
|
1085
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
1086
|
+
}
|
|
1087
|
+
}
|
|
1088
|
+
|
|
1089
|
+
let urlPath = `/api/notification-preferences/{notificationPreference}/delete`;
|
|
1090
|
+
urlPath = urlPath.replace(`{${"notificationPreference"}}`, encodeURIComponent(String(requestParameters['notificationPreference'])));
|
|
1091
|
+
|
|
1092
|
+
const response = await this.request({
|
|
1093
|
+
path: urlPath,
|
|
1094
|
+
method: 'POST',
|
|
1095
|
+
headers: headerParameters,
|
|
1096
|
+
query: queryParameters,
|
|
1097
|
+
}, initOverrides);
|
|
1098
|
+
|
|
1099
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GenericResponseFromJSON(jsonValue));
|
|
1100
|
+
}
|
|
1101
|
+
|
|
1102
|
+
/**
|
|
1103
|
+
* Auto-generated: notificationPreferences.delete
|
|
1104
|
+
*/
|
|
1105
|
+
async notificationPreferencesDelete(requestParameters: NotificationPreferencesDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GenericResponse> {
|
|
1106
|
+
const response = await this.notificationPreferencesDeleteRaw(requestParameters, initOverrides);
|
|
1107
|
+
return await response.value();
|
|
1108
|
+
}
|
|
1109
|
+
|
|
1110
|
+
/**
|
|
1111
|
+
* Auto-generated: notificationPreferences.list
|
|
1112
|
+
*/
|
|
1113
|
+
async notificationPreferencesListRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<NotificationPreferenceResourceArrayResponse>> {
|
|
1114
|
+
const queryParameters: any = {};
|
|
1115
|
+
|
|
1116
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
1117
|
+
|
|
1118
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
1119
|
+
const token = this.configuration.accessToken;
|
|
1120
|
+
const tokenString = await token("bearerAuth", []);
|
|
1121
|
+
|
|
1122
|
+
if (tokenString) {
|
|
1123
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
1124
|
+
}
|
|
1125
|
+
}
|
|
1126
|
+
|
|
1127
|
+
let urlPath = `/api/notification-preferences/list`;
|
|
1128
|
+
|
|
1129
|
+
const response = await this.request({
|
|
1130
|
+
path: urlPath,
|
|
1131
|
+
method: 'POST',
|
|
1132
|
+
headers: headerParameters,
|
|
1133
|
+
query: queryParameters,
|
|
1134
|
+
}, initOverrides);
|
|
1135
|
+
|
|
1136
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => NotificationPreferenceResourceArrayResponseFromJSON(jsonValue));
|
|
1137
|
+
}
|
|
1138
|
+
|
|
1139
|
+
/**
|
|
1140
|
+
* Auto-generated: notificationPreferences.list
|
|
1141
|
+
*/
|
|
1142
|
+
async notificationPreferencesList(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<NotificationPreferenceResourceArrayResponse> {
|
|
1143
|
+
const response = await this.notificationPreferencesListRaw(initOverrides);
|
|
1144
|
+
return await response.value();
|
|
1145
|
+
}
|
|
1146
|
+
|
|
1147
|
+
/**
|
|
1148
|
+
* Auto-generated: notificationPreferences.store
|
|
1149
|
+
*/
|
|
1150
|
+
async notificationPreferencesStoreRaw(requestParameters: NotificationPreferencesStoreOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<NotificationPreferenceResource>> {
|
|
1151
|
+
const queryParameters: any = {};
|
|
1152
|
+
|
|
1153
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
1154
|
+
|
|
1155
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
1156
|
+
|
|
1157
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
1158
|
+
const token = this.configuration.accessToken;
|
|
1159
|
+
const tokenString = await token("bearerAuth", []);
|
|
1160
|
+
|
|
1161
|
+
if (tokenString) {
|
|
1162
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
1163
|
+
}
|
|
1164
|
+
}
|
|
1165
|
+
|
|
1166
|
+
let urlPath = `/api/notification-preferences`;
|
|
1167
|
+
|
|
1168
|
+
const response = await this.request({
|
|
1169
|
+
path: urlPath,
|
|
1170
|
+
method: 'POST',
|
|
1171
|
+
headers: headerParameters,
|
|
1172
|
+
query: queryParameters,
|
|
1173
|
+
body: NotificationPreferencesStoreRequestToJSON(requestParameters['notificationPreferencesStoreRequest']),
|
|
1174
|
+
}, initOverrides);
|
|
1175
|
+
|
|
1176
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => NotificationPreferenceResourceFromJSON(jsonValue));
|
|
1177
|
+
}
|
|
1178
|
+
|
|
1179
|
+
/**
|
|
1180
|
+
* Auto-generated: notificationPreferences.store
|
|
1181
|
+
*/
|
|
1182
|
+
async notificationPreferencesStore(requestParameters: NotificationPreferencesStoreOperationRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<NotificationPreferenceResource> {
|
|
1183
|
+
const response = await this.notificationPreferencesStoreRaw(requestParameters, initOverrides);
|
|
1184
|
+
return await response.value();
|
|
1185
|
+
}
|
|
1186
|
+
|
|
1187
|
+
/**
|
|
1188
|
+
* Auto-generated: notificationTypes.list
|
|
1189
|
+
*/
|
|
1190
|
+
async notificationTypesListRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<NotificationTypeResourceArrayResponse>> {
|
|
1191
|
+
const queryParameters: any = {};
|
|
1192
|
+
|
|
1193
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
1194
|
+
|
|
1195
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
1196
|
+
const token = this.configuration.accessToken;
|
|
1197
|
+
const tokenString = await token("bearerAuth", []);
|
|
1198
|
+
|
|
1199
|
+
if (tokenString) {
|
|
1200
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
1201
|
+
}
|
|
1202
|
+
}
|
|
1203
|
+
|
|
1204
|
+
let urlPath = `/api/notification-types/list`;
|
|
1205
|
+
|
|
1206
|
+
const response = await this.request({
|
|
1207
|
+
path: urlPath,
|
|
1208
|
+
method: 'POST',
|
|
1209
|
+
headers: headerParameters,
|
|
1210
|
+
query: queryParameters,
|
|
1211
|
+
}, initOverrides);
|
|
1212
|
+
|
|
1213
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => NotificationTypeResourceArrayResponseFromJSON(jsonValue));
|
|
1214
|
+
}
|
|
1215
|
+
|
|
1216
|
+
/**
|
|
1217
|
+
* Auto-generated: notificationTypes.list
|
|
1218
|
+
*/
|
|
1219
|
+
async notificationTypesList(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<NotificationTypeResourceArrayResponse> {
|
|
1220
|
+
const response = await this.notificationTypesListRaw(initOverrides);
|
|
1221
|
+
return await response.value();
|
|
1222
|
+
}
|
|
1223
|
+
|
|
1097
1224
|
/**
|
|
1098
1225
|
* Auto-generated: registers.create
|
|
1099
1226
|
*/
|
|
@@ -36,7 +36,7 @@ export interface AddressResource {
|
|
|
36
36
|
* @type {string}
|
|
37
37
|
* @memberof AddressResource
|
|
38
38
|
*/
|
|
39
|
-
addressLine2
|
|
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']
|
|
105
|
+
'addressLine2': json['addressLine2'],
|
|
105
106
|
'suburb': json['suburb'],
|
|
106
107
|
'city': json['city'],
|
|
107
108
|
'state': json['state'],
|
|
@@ -0,0 +1,83 @@
|
|
|
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 IncidentFieldSchemasShowRequest
|
|
20
|
+
*/
|
|
21
|
+
export interface IncidentFieldSchemasShowRequest {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof IncidentFieldSchemasShowRequest
|
|
26
|
+
*/
|
|
27
|
+
state: IncidentFieldSchemasShowRequestStateEnum;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* @export
|
|
33
|
+
*/
|
|
34
|
+
export const IncidentFieldSchemasShowRequestStateEnum = {
|
|
35
|
+
Qld: 'QLD',
|
|
36
|
+
Nsw: 'NSW',
|
|
37
|
+
Act: 'ACT',
|
|
38
|
+
Vic: 'VIC',
|
|
39
|
+
Tas: 'TAS',
|
|
40
|
+
Sa: 'SA',
|
|
41
|
+
Wa: 'WA',
|
|
42
|
+
Nt: 'NT'
|
|
43
|
+
} as const;
|
|
44
|
+
export type IncidentFieldSchemasShowRequestStateEnum = typeof IncidentFieldSchemasShowRequestStateEnum[keyof typeof IncidentFieldSchemasShowRequestStateEnum];
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Check if a given object implements the IncidentFieldSchemasShowRequest interface.
|
|
49
|
+
*/
|
|
50
|
+
export function instanceOfIncidentFieldSchemasShowRequest(value: object): value is IncidentFieldSchemasShowRequest {
|
|
51
|
+
if (!('state' in value) || value['state'] === undefined) return false;
|
|
52
|
+
return true;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export function IncidentFieldSchemasShowRequestFromJSON(json: any): IncidentFieldSchemasShowRequest {
|
|
56
|
+
return IncidentFieldSchemasShowRequestFromJSONTyped(json, false);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function IncidentFieldSchemasShowRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): IncidentFieldSchemasShowRequest {
|
|
60
|
+
if (json == null) {
|
|
61
|
+
return json;
|
|
62
|
+
}
|
|
63
|
+
return {
|
|
64
|
+
|
|
65
|
+
'state': json['state'],
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function IncidentFieldSchemasShowRequestToJSON(json: any): IncidentFieldSchemasShowRequest {
|
|
70
|
+
return IncidentFieldSchemasShowRequestToJSONTyped(json, false);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function IncidentFieldSchemasShowRequestToJSONTyped(value?: IncidentFieldSchemasShowRequest | null, ignoreDiscriminator: boolean = false): any {
|
|
74
|
+
if (value == null) {
|
|
75
|
+
return value;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
return {
|
|
79
|
+
|
|
80
|
+
'state': value['state'],
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
|
|
@@ -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
|
+
|