@digital8/security-registers-backend-ts-sdk 0.0.155 → 0.0.156

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 (39) hide show
  1. package/.openapi-generator/FILES +5 -0
  2. package/README.md +2 -2
  3. package/dist/apis/GeneralApi.d.ts +39 -1
  4. package/dist/apis/GeneralApi.js +215 -0
  5. package/dist/models/AssetResource.d.ts +1 -1
  6. package/dist/models/AssetResource.js +1 -3
  7. package/dist/models/LicencesVerifyRequest.d.ts +3 -9
  8. package/dist/models/LicencesVerifyRequest.js +6 -10
  9. package/dist/models/NotificationPreferenceResource.d.ts +63 -0
  10. package/dist/models/NotificationPreferenceResource.js +67 -0
  11. package/dist/models/NotificationPreferenceResourceArrayResponse.d.ts +33 -0
  12. package/dist/models/NotificationPreferenceResourceArrayResponse.js +50 -0
  13. package/dist/models/NotificationPreferencesUpsertRequest.d.ts +55 -0
  14. package/dist/models/NotificationPreferencesUpsertRequest.js +68 -0
  15. package/dist/models/NotificationTypeResource.d.ts +38 -0
  16. package/dist/models/NotificationTypeResource.js +55 -0
  17. package/dist/models/NotificationTypeResourceArrayResponse.d.ts +33 -0
  18. package/dist/models/NotificationTypeResourceArrayResponse.js +50 -0
  19. package/dist/models/RegisterListResource.d.ts +2 -2
  20. package/dist/models/RegisterListResource.js +4 -4
  21. package/dist/models/RosterListResource.d.ts +1 -1
  22. package/dist/models/RosterListResource.js +4 -3
  23. package/dist/models/SecurityCompanyResource.d.ts +1 -1
  24. package/dist/models/SecurityCompanyResource.js +3 -1
  25. package/dist/models/index.d.ts +5 -0
  26. package/dist/models/index.js +5 -0
  27. package/package.json +1 -1
  28. package/src/apis/GeneralApi.ts +179 -0
  29. package/src/models/AssetResource.ts +2 -3
  30. package/src/models/LicencesVerifyRequest.ts +8 -17
  31. package/src/models/NotificationPreferenceResource.ts +116 -0
  32. package/src/models/NotificationPreferenceResourceArrayResponse.ts +73 -0
  33. package/src/models/NotificationPreferencesUpsertRequest.ts +97 -0
  34. package/src/models/NotificationTypeResource.ts +75 -0
  35. package/src/models/NotificationTypeResourceArrayResponse.ts +73 -0
  36. package/src/models/RegisterListResource.ts +5 -5
  37. package/src/models/RosterListResource.ts +4 -3
  38. package/src/models/SecurityCompanyResource.ts +3 -2
  39. package/src/models/index.ts +5 -0
@@ -0,0 +1,55 @@
1
+ /**
2
+ * My API
3
+ * API documentation for my Laravel app
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface NotificationPreferencesUpsertRequest
16
+ */
17
+ export interface NotificationPreferencesUpsertRequest {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof NotificationPreferencesUpsertRequest
22
+ */
23
+ notificationType: NotificationPreferencesUpsertRequestNotificationTypeEnum;
24
+ /**
25
+ *
26
+ * @type {number}
27
+ * @memberof NotificationPreferencesUpsertRequest
28
+ */
29
+ venueId?: number;
30
+ /**
31
+ *
32
+ * @type {boolean}
33
+ * @memberof NotificationPreferencesUpsertRequest
34
+ */
35
+ enabled: boolean;
36
+ }
37
+ /**
38
+ * @export
39
+ */
40
+ export declare const NotificationPreferencesUpsertRequestNotificationTypeEnum: {
41
+ readonly IncidentAdded: "incident_added";
42
+ readonly NonSignOff: "non_sign_off";
43
+ readonly NonSignOn: "non_sign_on";
44
+ readonly SignOnRejected: "sign_on_rejected";
45
+ readonly LicenceUpdated: "licence_updated";
46
+ };
47
+ export type NotificationPreferencesUpsertRequestNotificationTypeEnum = typeof NotificationPreferencesUpsertRequestNotificationTypeEnum[keyof typeof NotificationPreferencesUpsertRequestNotificationTypeEnum];
48
+ /**
49
+ * Check if a given object implements the NotificationPreferencesUpsertRequest interface.
50
+ */
51
+ export declare function instanceOfNotificationPreferencesUpsertRequest(value: object): value is NotificationPreferencesUpsertRequest;
52
+ export declare function NotificationPreferencesUpsertRequestFromJSON(json: any): NotificationPreferencesUpsertRequest;
53
+ export declare function NotificationPreferencesUpsertRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): NotificationPreferencesUpsertRequest;
54
+ export declare function NotificationPreferencesUpsertRequestToJSON(json: any): NotificationPreferencesUpsertRequest;
55
+ export declare function NotificationPreferencesUpsertRequestToJSONTyped(value?: NotificationPreferencesUpsertRequest | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * My API
6
+ * API documentation for my Laravel app
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.NotificationPreferencesUpsertRequestNotificationTypeEnum = void 0;
17
+ exports.instanceOfNotificationPreferencesUpsertRequest = instanceOfNotificationPreferencesUpsertRequest;
18
+ exports.NotificationPreferencesUpsertRequestFromJSON = NotificationPreferencesUpsertRequestFromJSON;
19
+ exports.NotificationPreferencesUpsertRequestFromJSONTyped = NotificationPreferencesUpsertRequestFromJSONTyped;
20
+ exports.NotificationPreferencesUpsertRequestToJSON = NotificationPreferencesUpsertRequestToJSON;
21
+ exports.NotificationPreferencesUpsertRequestToJSONTyped = NotificationPreferencesUpsertRequestToJSONTyped;
22
+ /**
23
+ * @export
24
+ */
25
+ exports.NotificationPreferencesUpsertRequestNotificationTypeEnum = {
26
+ IncidentAdded: 'incident_added',
27
+ NonSignOff: 'non_sign_off',
28
+ NonSignOn: 'non_sign_on',
29
+ SignOnRejected: 'sign_on_rejected',
30
+ LicenceUpdated: 'licence_updated'
31
+ };
32
+ /**
33
+ * Check if a given object implements the NotificationPreferencesUpsertRequest interface.
34
+ */
35
+ function instanceOfNotificationPreferencesUpsertRequest(value) {
36
+ if (!('notificationType' in value) || value['notificationType'] === undefined)
37
+ return false;
38
+ if (!('enabled' in value) || value['enabled'] === undefined)
39
+ return false;
40
+ return true;
41
+ }
42
+ function NotificationPreferencesUpsertRequestFromJSON(json) {
43
+ return NotificationPreferencesUpsertRequestFromJSONTyped(json, false);
44
+ }
45
+ function NotificationPreferencesUpsertRequestFromJSONTyped(json, ignoreDiscriminator) {
46
+ if (json == null) {
47
+ return json;
48
+ }
49
+ return {
50
+ 'notificationType': json['notification_type'],
51
+ 'venueId': json['venue_id'] == null ? undefined : json['venue_id'],
52
+ 'enabled': json['enabled'],
53
+ };
54
+ }
55
+ function NotificationPreferencesUpsertRequestToJSON(json) {
56
+ return NotificationPreferencesUpsertRequestToJSONTyped(json, false);
57
+ }
58
+ function NotificationPreferencesUpsertRequestToJSONTyped(value, ignoreDiscriminator) {
59
+ if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; }
60
+ if (value == null) {
61
+ return value;
62
+ }
63
+ return {
64
+ 'notification_type': value['notificationType'],
65
+ 'venue_id': value['venueId'],
66
+ 'enabled': value['enabled'],
67
+ };
68
+ }
@@ -0,0 +1,38 @@
1
+ /**
2
+ * My API
3
+ * API documentation for my Laravel app
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface NotificationTypeResource
16
+ */
17
+ export interface NotificationTypeResource {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof NotificationTypeResource
22
+ */
23
+ value: string;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof NotificationTypeResource
28
+ */
29
+ label: string;
30
+ }
31
+ /**
32
+ * Check if a given object implements the NotificationTypeResource interface.
33
+ */
34
+ export declare function instanceOfNotificationTypeResource(value: object): value is NotificationTypeResource;
35
+ export declare function NotificationTypeResourceFromJSON(json: any): NotificationTypeResource;
36
+ export declare function NotificationTypeResourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): NotificationTypeResource;
37
+ export declare function NotificationTypeResourceToJSON(json: any): NotificationTypeResource;
38
+ export declare function NotificationTypeResourceToJSONTyped(value?: NotificationTypeResource | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * My API
6
+ * API documentation for my Laravel app
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.instanceOfNotificationTypeResource = instanceOfNotificationTypeResource;
17
+ exports.NotificationTypeResourceFromJSON = NotificationTypeResourceFromJSON;
18
+ exports.NotificationTypeResourceFromJSONTyped = NotificationTypeResourceFromJSONTyped;
19
+ exports.NotificationTypeResourceToJSON = NotificationTypeResourceToJSON;
20
+ exports.NotificationTypeResourceToJSONTyped = NotificationTypeResourceToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the NotificationTypeResource interface.
23
+ */
24
+ function instanceOfNotificationTypeResource(value) {
25
+ if (!('value' in value) || value['value'] === undefined)
26
+ return false;
27
+ if (!('label' in value) || value['label'] === undefined)
28
+ return false;
29
+ return true;
30
+ }
31
+ function NotificationTypeResourceFromJSON(json) {
32
+ return NotificationTypeResourceFromJSONTyped(json, false);
33
+ }
34
+ function NotificationTypeResourceFromJSONTyped(json, ignoreDiscriminator) {
35
+ if (json == null) {
36
+ return json;
37
+ }
38
+ return {
39
+ 'value': json['value'],
40
+ 'label': json['label'],
41
+ };
42
+ }
43
+ function NotificationTypeResourceToJSON(json) {
44
+ return NotificationTypeResourceToJSONTyped(json, false);
45
+ }
46
+ function NotificationTypeResourceToJSONTyped(value, ignoreDiscriminator) {
47
+ if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; }
48
+ if (value == null) {
49
+ return value;
50
+ }
51
+ return {
52
+ 'value': value['value'],
53
+ 'label': value['label'],
54
+ };
55
+ }
@@ -0,0 +1,33 @@
1
+ /**
2
+ * My API
3
+ * API documentation for my Laravel app
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { NotificationTypeResource } from './NotificationTypeResource';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface NotificationTypeResourceArrayResponse
17
+ */
18
+ export interface NotificationTypeResourceArrayResponse {
19
+ /**
20
+ *
21
+ * @type {Array<NotificationTypeResource>}
22
+ * @memberof NotificationTypeResourceArrayResponse
23
+ */
24
+ data?: Array<NotificationTypeResource>;
25
+ }
26
+ /**
27
+ * Check if a given object implements the NotificationTypeResourceArrayResponse interface.
28
+ */
29
+ export declare function instanceOfNotificationTypeResourceArrayResponse(value: object): value is NotificationTypeResourceArrayResponse;
30
+ export declare function NotificationTypeResourceArrayResponseFromJSON(json: any): NotificationTypeResourceArrayResponse;
31
+ export declare function NotificationTypeResourceArrayResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): NotificationTypeResourceArrayResponse;
32
+ export declare function NotificationTypeResourceArrayResponseToJSON(json: any): NotificationTypeResourceArrayResponse;
33
+ export declare function NotificationTypeResourceArrayResponseToJSONTyped(value?: NotificationTypeResourceArrayResponse | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * My API
6
+ * API documentation for my Laravel app
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.instanceOfNotificationTypeResourceArrayResponse = instanceOfNotificationTypeResourceArrayResponse;
17
+ exports.NotificationTypeResourceArrayResponseFromJSON = NotificationTypeResourceArrayResponseFromJSON;
18
+ exports.NotificationTypeResourceArrayResponseFromJSONTyped = NotificationTypeResourceArrayResponseFromJSONTyped;
19
+ exports.NotificationTypeResourceArrayResponseToJSON = NotificationTypeResourceArrayResponseToJSON;
20
+ exports.NotificationTypeResourceArrayResponseToJSONTyped = NotificationTypeResourceArrayResponseToJSONTyped;
21
+ var NotificationTypeResource_1 = require("./NotificationTypeResource");
22
+ /**
23
+ * Check if a given object implements the NotificationTypeResourceArrayResponse interface.
24
+ */
25
+ function instanceOfNotificationTypeResourceArrayResponse(value) {
26
+ return true;
27
+ }
28
+ function NotificationTypeResourceArrayResponseFromJSON(json) {
29
+ return NotificationTypeResourceArrayResponseFromJSONTyped(json, false);
30
+ }
31
+ function NotificationTypeResourceArrayResponseFromJSONTyped(json, ignoreDiscriminator) {
32
+ if (json == null) {
33
+ return json;
34
+ }
35
+ return {
36
+ 'data': json['data'] == null ? undefined : (json['data'].map(NotificationTypeResource_1.NotificationTypeResourceFromJSON)),
37
+ };
38
+ }
39
+ function NotificationTypeResourceArrayResponseToJSON(json) {
40
+ return NotificationTypeResourceArrayResponseToJSONTyped(json, false);
41
+ }
42
+ function NotificationTypeResourceArrayResponseToJSONTyped(value, ignoreDiscriminator) {
43
+ if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; }
44
+ if (value == null) {
45
+ return value;
46
+ }
47
+ return {
48
+ 'data': value['data'] == null ? undefined : (value['data'].map(NotificationTypeResource_1.NotificationTypeResourceToJSON)),
49
+ };
50
+ }
@@ -64,7 +64,7 @@ export interface RegisterListResource {
64
64
  * @type {string}
65
65
  * @memberof RegisterListResource
66
66
  */
67
- badgeNumber?: string | null;
67
+ badgeNumber: string;
68
68
  /**
69
69
  *
70
70
  * @type {string}
@@ -142,7 +142,7 @@ export interface RegisterListResource {
142
142
  * @type {number}
143
143
  * @memberof RegisterListResource
144
144
  */
145
- signOffLat: number;
145
+ signOffLat?: number | null;
146
146
  /**
147
147
  *
148
148
  * @type {number}
@@ -34,6 +34,8 @@ function instanceOfRegisterListResource(value) {
34
34
  return false;
35
35
  if (!('signOffStatus' in value) || value['signOffStatus'] === undefined)
36
36
  return false;
37
+ if (!('badgeNumber' in value) || value['badgeNumber'] === undefined)
38
+ return false;
37
39
  if (!('licenceNumber' in value) || value['licenceNumber'] === undefined)
38
40
  return false;
39
41
  if (!('licenceFirstName' in value) || value['licenceFirstName'] === undefined)
@@ -58,8 +60,6 @@ function instanceOfRegisterListResource(value) {
58
60
  return false;
59
61
  if (!('signOnLong' in value) || value['signOnLong'] === undefined)
60
62
  return false;
61
- if (!('signOffLat' in value) || value['signOffLat'] === undefined)
62
- return false;
63
63
  if (!('incidents' in value) || value['incidents'] === undefined)
64
64
  return false;
65
65
  return true;
@@ -79,7 +79,7 @@ function RegisterListResourceFromJSONTyped(json, ignoreDiscriminator) {
79
79
  'finishDateTime': json['finishDateTime'] == null ? undefined : (new Date(json['finishDateTime'])),
80
80
  'shiftLength': json['shiftLength'],
81
81
  'signOffStatus': json['signOffStatus'],
82
- 'badgeNumber': json['badgeNumber'] == null ? undefined : json['badgeNumber'],
82
+ 'badgeNumber': json['badgeNumber'],
83
83
  'licenceNumber': json['licenceNumber'],
84
84
  'licenceFirstName': json['licenceFirstName'],
85
85
  'licenceLastName': json['licenceLastName'],
@@ -92,7 +92,7 @@ function RegisterListResourceFromJSONTyped(json, ignoreDiscriminator) {
92
92
  'firstAid': json['firstAid'],
93
93
  'signOnLat': json['signOnLat'],
94
94
  'signOnLong': json['signOnLong'],
95
- 'signOffLat': json['signOffLat'],
95
+ 'signOffLat': json['signOffLat'] == null ? undefined : json['signOffLat'],
96
96
  'signOffLong': json['signOffLong'] == null ? undefined : json['signOffLong'],
97
97
  'incidents': json['incidents'],
98
98
  };
@@ -46,7 +46,7 @@ export interface RosterListResource {
46
46
  * @type {Date}
47
47
  * @memberof RosterListResource
48
48
  */
49
- finishDateTime?: Date | null;
49
+ finishDateTime: Date;
50
50
  /**
51
51
  *
52
52
  * @type {boolean}
@@ -30,6 +30,8 @@ function instanceOfRosterListResource(value) {
30
30
  return false;
31
31
  if (!('startDateTime' in value) || value['startDateTime'] === undefined)
32
32
  return false;
33
+ if (!('finishDateTime' in value) || value['finishDateTime'] === undefined)
34
+ return false;
33
35
  if (!('isCompliant' in value) || value['isCompliant'] === undefined)
34
36
  return false;
35
37
  if (!('isComplete' in value) || value['isComplete'] === undefined)
@@ -52,7 +54,7 @@ function RosterListResourceFromJSONTyped(json, ignoreDiscriminator) {
52
54
  'venue': (0, VenueLiteResource_1.VenueLiteResourceFromJSON)(json['venue']),
53
55
  'securityCompany': (0, SecurityCompanyLiteResource_1.SecurityCompanyLiteResourceFromJSON)(json['securityCompany']),
54
56
  'startDateTime': (new Date(json['startDateTime'])),
55
- 'finishDateTime': json['finishDateTime'] == null ? undefined : (new Date(json['finishDateTime'])),
57
+ 'finishDateTime': (new Date(json['finishDateTime'])),
56
58
  'isCompliant': json['isCompliant'],
57
59
  'isComplete': json['isComplete'],
58
60
  'signOffStatus': json['signOffStatus'],
@@ -63,7 +65,6 @@ function RosterListResourceToJSON(json) {
63
65
  return RosterListResourceToJSONTyped(json, false);
64
66
  }
65
67
  function RosterListResourceToJSONTyped(value, ignoreDiscriminator) {
66
- var _a;
67
68
  if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; }
68
69
  if (value == null) {
69
70
  return value;
@@ -73,7 +74,7 @@ function RosterListResourceToJSONTyped(value, ignoreDiscriminator) {
73
74
  'venue': (0, VenueLiteResource_1.VenueLiteResourceToJSON)(value['venue']),
74
75
  'securityCompany': (0, SecurityCompanyLiteResource_1.SecurityCompanyLiteResourceToJSON)(value['securityCompany']),
75
76
  'startDateTime': ((value['startDateTime']).toISOString()),
76
- 'finishDateTime': value['finishDateTime'] === null ? null : ((_a = value['finishDateTime']) === null || _a === void 0 ? void 0 : _a.toISOString()),
77
+ 'finishDateTime': ((value['finishDateTime']).toISOString()),
77
78
  'isCompliant': value['isCompliant'],
78
79
  'isComplete': value['isComplete'],
79
80
  'signOffStatus': value['signOffStatus'],
@@ -33,7 +33,7 @@ export interface SecurityCompanyResource {
33
33
  * @type {string}
34
34
  * @memberof SecurityCompanyResource
35
35
  */
36
- email?: string | null;
36
+ email: string;
37
37
  /**
38
38
  *
39
39
  * @type {boolean}
@@ -25,6 +25,8 @@ 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;
28
30
  if (!('isEnabled' in value) || value['isEnabled'] === undefined)
29
31
  return false;
30
32
  if (!('address' in value) || value['address'] === undefined)
@@ -43,7 +45,7 @@ function SecurityCompanyResourceFromJSONTyped(json, ignoreDiscriminator) {
43
45
  return {
44
46
  'id': json['id'] == null ? undefined : json['id'],
45
47
  'name': json['name'],
46
- 'email': json['email'] == null ? undefined : json['email'],
48
+ 'email': json['email'],
47
49
  'isEnabled': json['isEnabled'],
48
50
  'address': (0, AddressResource_1.AddressResourceFromJSON)(json['address']),
49
51
  'licenceNumber': json['licenceNumber'],
@@ -23,6 +23,11 @@ export * from './LicencesStoreRequest';
23
23
  export * from './LicencesUpdateRequest';
24
24
  export * from './LicencesVerifyRequest';
25
25
  export * from './LoginAuthRequest';
26
+ export * from './NotificationPreferenceResource';
27
+ export * from './NotificationPreferenceResourceArrayResponse';
28
+ export * from './NotificationPreferencesUpsertRequest';
29
+ export * from './NotificationTypeResource';
30
+ export * from './NotificationTypeResourceArrayResponse';
26
31
  export * from './PaginatedLicenceListResourceResponse';
27
32
  export * from './PaginatedLicenceResourceResponse';
28
33
  export * from './PaginatedRegisterListResourceResponse';
@@ -41,6 +41,11 @@ __exportStar(require("./LicencesStoreRequest"), exports);
41
41
  __exportStar(require("./LicencesUpdateRequest"), exports);
42
42
  __exportStar(require("./LicencesVerifyRequest"), exports);
43
43
  __exportStar(require("./LoginAuthRequest"), exports);
44
+ __exportStar(require("./NotificationPreferenceResource"), exports);
45
+ __exportStar(require("./NotificationPreferenceResourceArrayResponse"), exports);
46
+ __exportStar(require("./NotificationPreferencesUpsertRequest"), exports);
47
+ __exportStar(require("./NotificationTypeResource"), exports);
48
+ __exportStar(require("./NotificationTypeResourceArrayResponse"), exports);
44
49
  __exportStar(require("./PaginatedLicenceListResourceResponse"), exports);
45
50
  __exportStar(require("./PaginatedLicenceResourceResponse"), exports);
46
51
  __exportStar(require("./PaginatedRegisterListResourceResponse"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digital8/security-registers-backend-ts-sdk",
3
- "version": "0.0.155",
3
+ "version": "0.0.156",
4
4
  "description": "OpenAPI client for @digital8/security-registers-backend-ts-sdk",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -27,6 +27,10 @@ import type {
27
27
  LicencesUpdateRequest,
28
28
  LicencesVerifyRequest,
29
29
  LoginAuthRequest,
30
+ NotificationPreferenceResource,
31
+ NotificationPreferenceResourceArrayResponse,
32
+ NotificationPreferencesUpsertRequest,
33
+ NotificationTypeResourceArrayResponse,
30
34
  PaginatedLicenceListResourceResponse,
31
35
  PaginatedRegisterListResourceResponse,
32
36
  PaginatedRosterListResourceResponse,
@@ -100,6 +104,14 @@ import {
100
104
  LicencesVerifyRequestToJSON,
101
105
  LoginAuthRequestFromJSON,
102
106
  LoginAuthRequestToJSON,
107
+ NotificationPreferenceResourceFromJSON,
108
+ NotificationPreferenceResourceToJSON,
109
+ NotificationPreferenceResourceArrayResponseFromJSON,
110
+ NotificationPreferenceResourceArrayResponseToJSON,
111
+ NotificationPreferencesUpsertRequestFromJSON,
112
+ NotificationPreferencesUpsertRequestToJSON,
113
+ NotificationTypeResourceArrayResponseFromJSON,
114
+ NotificationTypeResourceArrayResponseToJSON,
103
115
  PaginatedLicenceListResourceResponseFromJSON,
104
116
  PaginatedLicenceListResourceResponseToJSON,
105
117
  PaginatedRegisterListResourceResponseFromJSON,
@@ -241,6 +253,14 @@ export interface LoginAuthOperationRequest {
241
253
  loginAuthRequest?: LoginAuthRequest;
242
254
  }
243
255
 
256
+ export interface NotificationPreferencesDeleteRequest {
257
+ notificationPreference: number;
258
+ }
259
+
260
+ export interface NotificationPreferencesUpsertOperationRequest {
261
+ notificationPreferencesUpsertRequest?: NotificationPreferencesUpsertRequest;
262
+ }
263
+
244
264
  export interface RegistersListOperationRequest {
245
265
  registersListRequest?: RegistersListRequest;
246
266
  }
@@ -954,6 +974,165 @@ export class GeneralApi extends runtime.BaseAPI {
954
974
  return await response.value();
955
975
  }
956
976
 
977
+ /**
978
+ * Auto-generated: notificationPreferences.delete
979
+ */
980
+ async notificationPreferencesDeleteRaw(requestParameters: NotificationPreferencesDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GenericResponse>> {
981
+ if (requestParameters['notificationPreference'] == null) {
982
+ throw new runtime.RequiredError(
983
+ 'notificationPreference',
984
+ 'Required parameter "notificationPreference" was null or undefined when calling notificationPreferencesDelete().'
985
+ );
986
+ }
987
+
988
+ const queryParameters: any = {};
989
+
990
+ const headerParameters: runtime.HTTPHeaders = {};
991
+
992
+ if (this.configuration && this.configuration.accessToken) {
993
+ const token = this.configuration.accessToken;
994
+ const tokenString = await token("bearerAuth", []);
995
+
996
+ if (tokenString) {
997
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
998
+ }
999
+ }
1000
+
1001
+ let urlPath = `/api/notification-preferences/{notificationPreference}/delete`;
1002
+ urlPath = urlPath.replace(`{${"notificationPreference"}}`, encodeURIComponent(String(requestParameters['notificationPreference'])));
1003
+
1004
+ const response = await this.request({
1005
+ path: urlPath,
1006
+ method: 'POST',
1007
+ headers: headerParameters,
1008
+ query: queryParameters,
1009
+ }, initOverrides);
1010
+
1011
+ return new runtime.JSONApiResponse(response, (jsonValue) => GenericResponseFromJSON(jsonValue));
1012
+ }
1013
+
1014
+ /**
1015
+ * Auto-generated: notificationPreferences.delete
1016
+ */
1017
+ async notificationPreferencesDelete(requestParameters: NotificationPreferencesDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GenericResponse> {
1018
+ const response = await this.notificationPreferencesDeleteRaw(requestParameters, initOverrides);
1019
+ return await response.value();
1020
+ }
1021
+
1022
+ /**
1023
+ * Auto-generated: notificationPreferences.list
1024
+ */
1025
+ async notificationPreferencesListRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<NotificationPreferenceResourceArrayResponse>> {
1026
+ const queryParameters: any = {};
1027
+
1028
+ const headerParameters: runtime.HTTPHeaders = {};
1029
+
1030
+ if (this.configuration && this.configuration.accessToken) {
1031
+ const token = this.configuration.accessToken;
1032
+ const tokenString = await token("bearerAuth", []);
1033
+
1034
+ if (tokenString) {
1035
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1036
+ }
1037
+ }
1038
+
1039
+ let urlPath = `/api/notification-preferences/list`;
1040
+
1041
+ const response = await this.request({
1042
+ path: urlPath,
1043
+ method: 'POST',
1044
+ headers: headerParameters,
1045
+ query: queryParameters,
1046
+ }, initOverrides);
1047
+
1048
+ return new runtime.JSONApiResponse(response, (jsonValue) => NotificationPreferenceResourceArrayResponseFromJSON(jsonValue));
1049
+ }
1050
+
1051
+ /**
1052
+ * Auto-generated: notificationPreferences.list
1053
+ */
1054
+ async notificationPreferencesList(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<NotificationPreferenceResourceArrayResponse> {
1055
+ const response = await this.notificationPreferencesListRaw(initOverrides);
1056
+ return await response.value();
1057
+ }
1058
+
1059
+ /**
1060
+ * Auto-generated: notificationPreferences.upsert
1061
+ */
1062
+ async notificationPreferencesUpsertRaw(requestParameters: NotificationPreferencesUpsertOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<NotificationPreferenceResource>> {
1063
+ const queryParameters: any = {};
1064
+
1065
+ const headerParameters: runtime.HTTPHeaders = {};
1066
+
1067
+ headerParameters['Content-Type'] = 'application/json';
1068
+
1069
+ if (this.configuration && this.configuration.accessToken) {
1070
+ const token = this.configuration.accessToken;
1071
+ const tokenString = await token("bearerAuth", []);
1072
+
1073
+ if (tokenString) {
1074
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1075
+ }
1076
+ }
1077
+
1078
+ let urlPath = `/api/notification-preferences`;
1079
+
1080
+ const response = await this.request({
1081
+ path: urlPath,
1082
+ method: 'POST',
1083
+ headers: headerParameters,
1084
+ query: queryParameters,
1085
+ body: NotificationPreferencesUpsertRequestToJSON(requestParameters['notificationPreferencesUpsertRequest']),
1086
+ }, initOverrides);
1087
+
1088
+ return new runtime.JSONApiResponse(response, (jsonValue) => NotificationPreferenceResourceFromJSON(jsonValue));
1089
+ }
1090
+
1091
+ /**
1092
+ * Auto-generated: notificationPreferences.upsert
1093
+ */
1094
+ async notificationPreferencesUpsert(requestParameters: NotificationPreferencesUpsertOperationRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<NotificationPreferenceResource> {
1095
+ const response = await this.notificationPreferencesUpsertRaw(requestParameters, initOverrides);
1096
+ return await response.value();
1097
+ }
1098
+
1099
+ /**
1100
+ * Auto-generated: notificationTypes.list
1101
+ */
1102
+ async notificationTypesListRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<NotificationTypeResourceArrayResponse>> {
1103
+ const queryParameters: any = {};
1104
+
1105
+ const headerParameters: runtime.HTTPHeaders = {};
1106
+
1107
+ if (this.configuration && this.configuration.accessToken) {
1108
+ const token = this.configuration.accessToken;
1109
+ const tokenString = await token("bearerAuth", []);
1110
+
1111
+ if (tokenString) {
1112
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1113
+ }
1114
+ }
1115
+
1116
+ let urlPath = `/api/notification-types/list`;
1117
+
1118
+ const response = await this.request({
1119
+ path: urlPath,
1120
+ method: 'POST',
1121
+ headers: headerParameters,
1122
+ query: queryParameters,
1123
+ }, initOverrides);
1124
+
1125
+ return new runtime.JSONApiResponse(response, (jsonValue) => NotificationTypeResourceArrayResponseFromJSON(jsonValue));
1126
+ }
1127
+
1128
+ /**
1129
+ * Auto-generated: notificationTypes.list
1130
+ */
1131
+ async notificationTypesList(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<NotificationTypeResourceArrayResponse> {
1132
+ const response = await this.notificationTypesListRaw(initOverrides);
1133
+ return await response.value();
1134
+ }
1135
+
957
1136
  /**
958
1137
  * Auto-generated: registers.list
959
1138
  */