@digital-realty/ix-notifications 1.0.2 → 1.0.4
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/dist/IxNotifications.d.ts +37 -37
- package/dist/IxNotifications.js +163 -163
- package/dist/api/notifications-api/apis/NotificationsApi.d.ts +83 -83
- package/dist/api/notifications-api/apis/NotificationsApi.js +203 -203
- package/dist/api/notifications-api/apis/index.d.ts +1 -1
- package/dist/api/notifications-api/apis/index.js +3 -3
- package/dist/api/notifications-api/index.d.ts +3 -3
- package/dist/api/notifications-api/index.js +5 -5
- package/dist/api/notifications-api/models/ErrorResponse.d.ts +55 -55
- package/dist/api/notifications-api/models/ErrorResponse.js +51 -51
- package/dist/api/notifications-api/models/GetNotifications200Response.d.ts +62 -62
- package/dist/api/notifications-api/models/GetNotifications200Response.js +55 -55
- package/dist/api/notifications-api/models/Notification.d.ts +86 -86
- package/dist/api/notifications-api/models/Notification.js +62 -62
- package/dist/api/notifications-api/models/NotificationDelete.d.ts +31 -31
- package/dist/api/notifications-api/models/NotificationDelete.js +43 -43
- package/dist/api/notifications-api/models/NotificationPatch.d.ts +32 -32
- package/dist/api/notifications-api/models/NotificationPatch.js +44 -44
- package/dist/api/notifications-api/models/NotificationRequest.d.ts +73 -73
- package/dist/api/notifications-api/models/NotificationRequest.js +61 -61
- package/dist/api/notifications-api/models/PaginatedResponse.d.ts +61 -61
- package/dist/api/notifications-api/models/PaginatedResponse.js +54 -54
- package/dist/api/notifications-api/models/Status.d.ts +23 -23
- package/dist/api/notifications-api/models/Status.js +30 -30
- package/dist/api/notifications-api/models/index.d.ts +8 -8
- package/dist/api/notifications-api/models/index.js +10 -10
- package/dist/api/notifications-api/runtime.d.ts +182 -182
- package/dist/api/notifications-api/runtime.js +318 -318
- package/dist/components/notifications/confirmation-dialog.d.ts +10 -10
- package/dist/components/notifications/confirmation-dialog.js +42 -42
- package/dist/components/notifications/date-filters.d.ts +19 -19
- package/dist/components/notifications/date-filters.js +90 -90
- package/dist/components/notifications/group-filters.d.ts +8 -8
- package/dist/components/notifications/group-filters.js +35 -35
- package/dist/components/notifications/grouped-item.d.ts +13 -13
- package/dist/components/notifications/grouped-item.js +56 -56
- package/dist/components/notifications/notification-item.d.ts +18 -18
- package/dist/components/notifications/notification-item.js +95 -95
- package/dist/components/notifications/view-item-dialog.d.ts +12 -12
- package/dist/components/notifications/view-item-dialog.js +61 -61
- package/dist/constants/api-constants.d.ts +3 -3
- package/dist/constants/api-constants.js +3 -3
- package/dist/constants/notification-types.d.ts +15 -15
- package/dist/constants/notification-types.js +1 -1
- package/dist/constants/notifications.d.ts +15 -15
- package/dist/constants/notifications.js +18 -18
- package/dist/helper/errors.d.ts +1 -1
- package/dist/helper/errors.js +19 -19
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/ix-notifications.d.ts +1 -1
- package/dist/ix-notifications.js +2 -2
- package/dist/models/notification.d.ts +13 -13
- package/dist/models/notification.js +1 -1
- package/dist/services/api-client.d.ts +13 -13
- package/dist/services/api-client.js +23 -23
- package/dist/services/app-service.d.ts +1 -1
- package/dist/services/app-service.js +6 -6
- package/dist/services/notifications-service.d.ts +10 -10
- package/dist/services/notifications-service.js +55 -55
- package/dist/state/NotificationState.d.ts +28 -28
- package/dist/state/NotificationState.js +153 -153
- package/dist/styles/notifications-style.d.ts +1 -1
- package/dist/styles/notifications-style.js +2 -2
- package/dist/tw.d.ts +1 -1
- package/dist/tw.js +2 -2
- package/package.json +3 -2
|
@@ -1,204 +1,204 @@
|
|
|
1
|
-
/* tslint:disable */
|
|
2
|
-
/* eslint-disable */
|
|
3
|
-
/**
|
|
4
|
-
* Notifications API
|
|
5
|
-
* An API to create and read notifications
|
|
6
|
-
*
|
|
7
|
-
* The version of the OpenAPI document: 1.0.0
|
|
8
|
-
* Contact: DevTeamProduct@digitalrealty.com
|
|
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
|
-
import * as runtime from '../runtime';
|
|
15
|
-
import { GetNotifications200ResponseFromJSON, NotificationFromJSON, NotificationDeleteFromJSON, NotificationPatchFromJSON, NotificationPatchToJSON, NotificationRequestToJSON, } from '../models/index';
|
|
16
|
-
/**
|
|
17
|
-
*
|
|
18
|
-
*/
|
|
19
|
-
export class NotificationsApi extends runtime.BaseAPI {
|
|
20
|
-
/**
|
|
21
|
-
* Submit notification to be sent to user
|
|
22
|
-
*/
|
|
23
|
-
async createNotificationRaw(requestParameters, initOverrides) {
|
|
24
|
-
const queryParameters = {};
|
|
25
|
-
const headerParameters = {};
|
|
26
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
27
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
28
|
-
const token = this.configuration.accessToken;
|
|
29
|
-
const tokenString = await token("bearerToken", []);
|
|
30
|
-
if (tokenString) {
|
|
31
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
const response = await this.request({
|
|
35
|
-
path: `/notifications`,
|
|
36
|
-
method: 'POST',
|
|
37
|
-
headers: headerParameters,
|
|
38
|
-
query: queryParameters,
|
|
39
|
-
body: NotificationRequestToJSON(requestParameters.notificationRequest),
|
|
40
|
-
}, initOverrides);
|
|
41
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => NotificationFromJSON(jsonValue));
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Submit notification to be sent to user
|
|
45
|
-
*/
|
|
46
|
-
async createNotification(requestParameters = {}, initOverrides) {
|
|
47
|
-
const response = await this.createNotificationRaw(requestParameters, initOverrides);
|
|
48
|
-
return await response.value();
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* Delete a notification by id
|
|
52
|
-
*/
|
|
53
|
-
async deleteNotificationsByIdRaw(requestParameters, initOverrides) {
|
|
54
|
-
if (requestParameters.id === null || requestParameters.id === undefined) {
|
|
55
|
-
throw new runtime.RequiredError('id', 'Required parameter requestParameters.id was null or undefined when calling deleteNotificationsById.');
|
|
56
|
-
}
|
|
57
|
-
const queryParameters = {};
|
|
58
|
-
const headerParameters = {};
|
|
59
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
60
|
-
const token = this.configuration.accessToken;
|
|
61
|
-
const tokenString = await token("bearerToken", []);
|
|
62
|
-
if (tokenString) {
|
|
63
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
const response = await this.request({
|
|
67
|
-
path: `/notifications/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
68
|
-
method: 'DELETE',
|
|
69
|
-
headers: headerParameters,
|
|
70
|
-
query: queryParameters,
|
|
71
|
-
}, initOverrides);
|
|
72
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => NotificationDeleteFromJSON(jsonValue));
|
|
73
|
-
}
|
|
74
|
-
/**
|
|
75
|
-
* Delete a notification by id
|
|
76
|
-
*/
|
|
77
|
-
async deleteNotificationsById(requestParameters, initOverrides) {
|
|
78
|
-
const response = await this.deleteNotificationsByIdRaw(requestParameters, initOverrides);
|
|
79
|
-
return await response.value();
|
|
80
|
-
}
|
|
81
|
-
/**
|
|
82
|
-
* Get all notifications
|
|
83
|
-
*/
|
|
84
|
-
async getNotificationsRaw(requestParameters, initOverrides) {
|
|
85
|
-
const queryParameters = {};
|
|
86
|
-
if (requestParameters.sort !== undefined) {
|
|
87
|
-
queryParameters['sort'] = requestParameters.sort;
|
|
88
|
-
}
|
|
89
|
-
if (requestParameters.cursor !== undefined) {
|
|
90
|
-
queryParameters['cursor'] = requestParameters.cursor;
|
|
91
|
-
}
|
|
92
|
-
if (requestParameters.resourceType !== undefined) {
|
|
93
|
-
queryParameters['resource_type'] = requestParameters.resourceType;
|
|
94
|
-
}
|
|
95
|
-
if (requestParameters.accountNumber !== undefined) {
|
|
96
|
-
queryParameters['account_number'] = requestParameters.accountNumber;
|
|
97
|
-
}
|
|
98
|
-
if (requestParameters.createdAfter !== undefined) {
|
|
99
|
-
queryParameters['created_after'] = requestParameters.createdAfter.toISOString();
|
|
100
|
-
}
|
|
101
|
-
if (requestParameters.createdBefore !== undefined) {
|
|
102
|
-
queryParameters['created_before'] = requestParameters.createdBefore.toISOString();
|
|
103
|
-
}
|
|
104
|
-
if (requestParameters.locationId !== undefined) {
|
|
105
|
-
queryParameters['location_id'] = requestParameters.locationId;
|
|
106
|
-
}
|
|
107
|
-
if (requestParameters.subGroup !== undefined) {
|
|
108
|
-
queryParameters['sub_group'] = requestParameters.subGroup;
|
|
109
|
-
}
|
|
110
|
-
if (requestParameters.status !== undefined) {
|
|
111
|
-
queryParameters['status'] = requestParameters.status;
|
|
112
|
-
}
|
|
113
|
-
const headerParameters = {};
|
|
114
|
-
if (requestParameters.prefer) {
|
|
115
|
-
headerParameters['Prefer'] = requestParameters.prefer.join(runtime.COLLECTION_FORMATS["csv"]);
|
|
116
|
-
}
|
|
117
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
118
|
-
const token = this.configuration.accessToken;
|
|
119
|
-
const tokenString = await token("bearerToken", []);
|
|
120
|
-
if (tokenString) {
|
|
121
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
const response = await this.request({
|
|
125
|
-
path: `/notifications`,
|
|
126
|
-
method: 'GET',
|
|
127
|
-
headers: headerParameters,
|
|
128
|
-
query: queryParameters,
|
|
129
|
-
}, initOverrides);
|
|
130
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => GetNotifications200ResponseFromJSON(jsonValue));
|
|
131
|
-
}
|
|
132
|
-
/**
|
|
133
|
-
* Get all notifications
|
|
134
|
-
*/
|
|
135
|
-
async getNotifications(requestParameters = {}, initOverrides) {
|
|
136
|
-
const response = await this.getNotificationsRaw(requestParameters, initOverrides);
|
|
137
|
-
return await response.value();
|
|
138
|
-
}
|
|
139
|
-
/**
|
|
140
|
-
* Get an notification by id
|
|
141
|
-
*/
|
|
142
|
-
async getNotificationsByIdRaw(requestParameters, initOverrides) {
|
|
143
|
-
if (requestParameters.id === null || requestParameters.id === undefined) {
|
|
144
|
-
throw new runtime.RequiredError('id', 'Required parameter requestParameters.id was null or undefined when calling getNotificationsById.');
|
|
145
|
-
}
|
|
146
|
-
const queryParameters = {};
|
|
147
|
-
const headerParameters = {};
|
|
148
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
149
|
-
const token = this.configuration.accessToken;
|
|
150
|
-
const tokenString = await token("bearerToken", []);
|
|
151
|
-
if (tokenString) {
|
|
152
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
const response = await this.request({
|
|
156
|
-
path: `/notifications/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
157
|
-
method: 'GET',
|
|
158
|
-
headers: headerParameters,
|
|
159
|
-
query: queryParameters,
|
|
160
|
-
}, initOverrides);
|
|
161
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => NotificationFromJSON(jsonValue));
|
|
162
|
-
}
|
|
163
|
-
/**
|
|
164
|
-
* Get an notification by id
|
|
165
|
-
*/
|
|
166
|
-
async getNotificationsById(requestParameters, initOverrides) {
|
|
167
|
-
const response = await this.getNotificationsByIdRaw(requestParameters, initOverrides);
|
|
168
|
-
return await response.value();
|
|
169
|
-
}
|
|
170
|
-
/**
|
|
171
|
-
* Update specific fields on a notification by id
|
|
172
|
-
*/
|
|
173
|
-
async patchNotificationsByIdRaw(requestParameters, initOverrides) {
|
|
174
|
-
if (requestParameters.id === null || requestParameters.id === undefined) {
|
|
175
|
-
throw new runtime.RequiredError('id', 'Required parameter requestParameters.id was null or undefined when calling patchNotificationsById.');
|
|
176
|
-
}
|
|
177
|
-
const queryParameters = {};
|
|
178
|
-
const headerParameters = {};
|
|
179
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
180
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
181
|
-
const token = this.configuration.accessToken;
|
|
182
|
-
const tokenString = await token("bearerToken", []);
|
|
183
|
-
if (tokenString) {
|
|
184
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
const response = await this.request({
|
|
188
|
-
path: `/notifications/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
189
|
-
method: 'PATCH',
|
|
190
|
-
headers: headerParameters,
|
|
191
|
-
query: queryParameters,
|
|
192
|
-
body: NotificationPatchToJSON(requestParameters.notificationPatch),
|
|
193
|
-
}, initOverrides);
|
|
194
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => NotificationPatchFromJSON(jsonValue));
|
|
195
|
-
}
|
|
196
|
-
/**
|
|
197
|
-
* Update specific fields on a notification by id
|
|
198
|
-
*/
|
|
199
|
-
async patchNotificationsById(requestParameters, initOverrides) {
|
|
200
|
-
const response = await this.patchNotificationsByIdRaw(requestParameters, initOverrides);
|
|
201
|
-
return await response.value();
|
|
202
|
-
}
|
|
203
|
-
}
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Notifications API
|
|
5
|
+
* An API to create and read notifications
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
* Contact: DevTeamProduct@digitalrealty.com
|
|
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
|
+
import * as runtime from '../runtime';
|
|
15
|
+
import { GetNotifications200ResponseFromJSON, NotificationFromJSON, NotificationDeleteFromJSON, NotificationPatchFromJSON, NotificationPatchToJSON, NotificationRequestToJSON, } from '../models/index';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
*/
|
|
19
|
+
export class NotificationsApi extends runtime.BaseAPI {
|
|
20
|
+
/**
|
|
21
|
+
* Submit notification to be sent to user
|
|
22
|
+
*/
|
|
23
|
+
async createNotificationRaw(requestParameters, initOverrides) {
|
|
24
|
+
const queryParameters = {};
|
|
25
|
+
const headerParameters = {};
|
|
26
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
27
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
28
|
+
const token = this.configuration.accessToken;
|
|
29
|
+
const tokenString = await token("bearerToken", []);
|
|
30
|
+
if (tokenString) {
|
|
31
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
const response = await this.request({
|
|
35
|
+
path: `/notifications`,
|
|
36
|
+
method: 'POST',
|
|
37
|
+
headers: headerParameters,
|
|
38
|
+
query: queryParameters,
|
|
39
|
+
body: NotificationRequestToJSON(requestParameters.notificationRequest),
|
|
40
|
+
}, initOverrides);
|
|
41
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => NotificationFromJSON(jsonValue));
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Submit notification to be sent to user
|
|
45
|
+
*/
|
|
46
|
+
async createNotification(requestParameters = {}, initOverrides) {
|
|
47
|
+
const response = await this.createNotificationRaw(requestParameters, initOverrides);
|
|
48
|
+
return await response.value();
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Delete a notification by id
|
|
52
|
+
*/
|
|
53
|
+
async deleteNotificationsByIdRaw(requestParameters, initOverrides) {
|
|
54
|
+
if (requestParameters.id === null || requestParameters.id === undefined) {
|
|
55
|
+
throw new runtime.RequiredError('id', 'Required parameter requestParameters.id was null or undefined when calling deleteNotificationsById.');
|
|
56
|
+
}
|
|
57
|
+
const queryParameters = {};
|
|
58
|
+
const headerParameters = {};
|
|
59
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
60
|
+
const token = this.configuration.accessToken;
|
|
61
|
+
const tokenString = await token("bearerToken", []);
|
|
62
|
+
if (tokenString) {
|
|
63
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
const response = await this.request({
|
|
67
|
+
path: `/notifications/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
68
|
+
method: 'DELETE',
|
|
69
|
+
headers: headerParameters,
|
|
70
|
+
query: queryParameters,
|
|
71
|
+
}, initOverrides);
|
|
72
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => NotificationDeleteFromJSON(jsonValue));
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Delete a notification by id
|
|
76
|
+
*/
|
|
77
|
+
async deleteNotificationsById(requestParameters, initOverrides) {
|
|
78
|
+
const response = await this.deleteNotificationsByIdRaw(requestParameters, initOverrides);
|
|
79
|
+
return await response.value();
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Get all notifications
|
|
83
|
+
*/
|
|
84
|
+
async getNotificationsRaw(requestParameters, initOverrides) {
|
|
85
|
+
const queryParameters = {};
|
|
86
|
+
if (requestParameters.sort !== undefined) {
|
|
87
|
+
queryParameters['sort'] = requestParameters.sort;
|
|
88
|
+
}
|
|
89
|
+
if (requestParameters.cursor !== undefined) {
|
|
90
|
+
queryParameters['cursor'] = requestParameters.cursor;
|
|
91
|
+
}
|
|
92
|
+
if (requestParameters.resourceType !== undefined) {
|
|
93
|
+
queryParameters['resource_type'] = requestParameters.resourceType;
|
|
94
|
+
}
|
|
95
|
+
if (requestParameters.accountNumber !== undefined) {
|
|
96
|
+
queryParameters['account_number'] = requestParameters.accountNumber;
|
|
97
|
+
}
|
|
98
|
+
if (requestParameters.createdAfter !== undefined) {
|
|
99
|
+
queryParameters['created_after'] = requestParameters.createdAfter.toISOString();
|
|
100
|
+
}
|
|
101
|
+
if (requestParameters.createdBefore !== undefined) {
|
|
102
|
+
queryParameters['created_before'] = requestParameters.createdBefore.toISOString();
|
|
103
|
+
}
|
|
104
|
+
if (requestParameters.locationId !== undefined) {
|
|
105
|
+
queryParameters['location_id'] = requestParameters.locationId;
|
|
106
|
+
}
|
|
107
|
+
if (requestParameters.subGroup !== undefined) {
|
|
108
|
+
queryParameters['sub_group'] = requestParameters.subGroup;
|
|
109
|
+
}
|
|
110
|
+
if (requestParameters.status !== undefined) {
|
|
111
|
+
queryParameters['status'] = requestParameters.status;
|
|
112
|
+
}
|
|
113
|
+
const headerParameters = {};
|
|
114
|
+
if (requestParameters.prefer) {
|
|
115
|
+
headerParameters['Prefer'] = requestParameters.prefer.join(runtime.COLLECTION_FORMATS["csv"]);
|
|
116
|
+
}
|
|
117
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
118
|
+
const token = this.configuration.accessToken;
|
|
119
|
+
const tokenString = await token("bearerToken", []);
|
|
120
|
+
if (tokenString) {
|
|
121
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
const response = await this.request({
|
|
125
|
+
path: `/notifications`,
|
|
126
|
+
method: 'GET',
|
|
127
|
+
headers: headerParameters,
|
|
128
|
+
query: queryParameters,
|
|
129
|
+
}, initOverrides);
|
|
130
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetNotifications200ResponseFromJSON(jsonValue));
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Get all notifications
|
|
134
|
+
*/
|
|
135
|
+
async getNotifications(requestParameters = {}, initOverrides) {
|
|
136
|
+
const response = await this.getNotificationsRaw(requestParameters, initOverrides);
|
|
137
|
+
return await response.value();
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Get an notification by id
|
|
141
|
+
*/
|
|
142
|
+
async getNotificationsByIdRaw(requestParameters, initOverrides) {
|
|
143
|
+
if (requestParameters.id === null || requestParameters.id === undefined) {
|
|
144
|
+
throw new runtime.RequiredError('id', 'Required parameter requestParameters.id was null or undefined when calling getNotificationsById.');
|
|
145
|
+
}
|
|
146
|
+
const queryParameters = {};
|
|
147
|
+
const headerParameters = {};
|
|
148
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
149
|
+
const token = this.configuration.accessToken;
|
|
150
|
+
const tokenString = await token("bearerToken", []);
|
|
151
|
+
if (tokenString) {
|
|
152
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
const response = await this.request({
|
|
156
|
+
path: `/notifications/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
157
|
+
method: 'GET',
|
|
158
|
+
headers: headerParameters,
|
|
159
|
+
query: queryParameters,
|
|
160
|
+
}, initOverrides);
|
|
161
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => NotificationFromJSON(jsonValue));
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Get an notification by id
|
|
165
|
+
*/
|
|
166
|
+
async getNotificationsById(requestParameters, initOverrides) {
|
|
167
|
+
const response = await this.getNotificationsByIdRaw(requestParameters, initOverrides);
|
|
168
|
+
return await response.value();
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Update specific fields on a notification by id
|
|
172
|
+
*/
|
|
173
|
+
async patchNotificationsByIdRaw(requestParameters, initOverrides) {
|
|
174
|
+
if (requestParameters.id === null || requestParameters.id === undefined) {
|
|
175
|
+
throw new runtime.RequiredError('id', 'Required parameter requestParameters.id was null or undefined when calling patchNotificationsById.');
|
|
176
|
+
}
|
|
177
|
+
const queryParameters = {};
|
|
178
|
+
const headerParameters = {};
|
|
179
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
180
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
181
|
+
const token = this.configuration.accessToken;
|
|
182
|
+
const tokenString = await token("bearerToken", []);
|
|
183
|
+
if (tokenString) {
|
|
184
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
const response = await this.request({
|
|
188
|
+
path: `/notifications/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
189
|
+
method: 'PATCH',
|
|
190
|
+
headers: headerParameters,
|
|
191
|
+
query: queryParameters,
|
|
192
|
+
body: NotificationPatchToJSON(requestParameters.notificationPatch),
|
|
193
|
+
}, initOverrides);
|
|
194
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => NotificationPatchFromJSON(jsonValue));
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* Update specific fields on a notification by id
|
|
198
|
+
*/
|
|
199
|
+
async patchNotificationsById(requestParameters, initOverrides) {
|
|
200
|
+
const response = await this.patchNotificationsByIdRaw(requestParameters, initOverrides);
|
|
201
|
+
return await response.value();
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
204
|
//# sourceMappingURL=NotificationsApi.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './NotificationsApi';
|
|
1
|
+
export * from './NotificationsApi';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* tslint:disable */
|
|
2
|
-
/* eslint-disable */
|
|
3
|
-
export * from './NotificationsApi';
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
export * from './NotificationsApi';
|
|
4
4
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './runtime';
|
|
2
|
-
export * from './apis/index';
|
|
3
|
-
export * from './models/index';
|
|
1
|
+
export * from './runtime';
|
|
2
|
+
export * from './apis/index';
|
|
3
|
+
export * from './models/index';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/* tslint:disable */
|
|
2
|
-
/* eslint-disable */
|
|
3
|
-
export * from './runtime';
|
|
4
|
-
export * from './apis/index';
|
|
5
|
-
export * from './models/index';
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
export * from './runtime';
|
|
4
|
+
export * from './apis/index';
|
|
5
|
+
export * from './models/index';
|
|
6
6
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Notifications API
|
|
3
|
-
* An API to create and read notifications
|
|
4
|
-
*
|
|
5
|
-
* The version of the OpenAPI document: 1.0.0
|
|
6
|
-
* Contact: DevTeamProduct@digitalrealty.com
|
|
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
|
-
* Error Response.
|
|
14
|
-
* @export
|
|
15
|
-
* @interface ErrorResponse
|
|
16
|
-
*/
|
|
17
|
-
export interface ErrorResponse {
|
|
18
|
-
/**
|
|
19
|
-
* A human-readable explanation specific to this occurrence of the problem.
|
|
20
|
-
* @type {string}
|
|
21
|
-
* @memberof ErrorResponse
|
|
22
|
-
*/
|
|
23
|
-
detail?: string;
|
|
24
|
-
/**
|
|
25
|
-
* A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.
|
|
26
|
-
* @type {string}
|
|
27
|
-
* @memberof ErrorResponse
|
|
28
|
-
*/
|
|
29
|
-
instance?: string;
|
|
30
|
-
/**
|
|
31
|
-
* The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.
|
|
32
|
-
* @type {number}
|
|
33
|
-
* @memberof ErrorResponse
|
|
34
|
-
*/
|
|
35
|
-
status?: number;
|
|
36
|
-
/**
|
|
37
|
-
* A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).
|
|
38
|
-
* @type {string}
|
|
39
|
-
* @memberof ErrorResponse
|
|
40
|
-
*/
|
|
41
|
-
title?: string;
|
|
42
|
-
/**
|
|
43
|
-
* A URI reference (see RFC3986) that identifies the problem type. This specification encourages that, when dereferenced, it provide human-readable documentation for the problem type (e.g., using HTML [W3C.REC-html5-20141028]). When this member is not present, its value is assumed to be "about:blank".
|
|
44
|
-
* @type {string}
|
|
45
|
-
* @memberof ErrorResponse
|
|
46
|
-
*/
|
|
47
|
-
type?: string;
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* Check if a given object implements the ErrorResponse interface.
|
|
51
|
-
*/
|
|
52
|
-
export declare function instanceOfErrorResponse(value: object): boolean;
|
|
53
|
-
export declare function ErrorResponseFromJSON(json: any): ErrorResponse;
|
|
54
|
-
export declare function ErrorResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ErrorResponse;
|
|
55
|
-
export declare function ErrorResponseToJSON(value?: ErrorResponse | null): any;
|
|
1
|
+
/**
|
|
2
|
+
* Notifications API
|
|
3
|
+
* An API to create and read notifications
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
* Contact: DevTeamProduct@digitalrealty.com
|
|
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
|
+
* Error Response.
|
|
14
|
+
* @export
|
|
15
|
+
* @interface ErrorResponse
|
|
16
|
+
*/
|
|
17
|
+
export interface ErrorResponse {
|
|
18
|
+
/**
|
|
19
|
+
* A human-readable explanation specific to this occurrence of the problem.
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof ErrorResponse
|
|
22
|
+
*/
|
|
23
|
+
detail?: string;
|
|
24
|
+
/**
|
|
25
|
+
* A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof ErrorResponse
|
|
28
|
+
*/
|
|
29
|
+
instance?: string;
|
|
30
|
+
/**
|
|
31
|
+
* The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.
|
|
32
|
+
* @type {number}
|
|
33
|
+
* @memberof ErrorResponse
|
|
34
|
+
*/
|
|
35
|
+
status?: number;
|
|
36
|
+
/**
|
|
37
|
+
* A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof ErrorResponse
|
|
40
|
+
*/
|
|
41
|
+
title?: string;
|
|
42
|
+
/**
|
|
43
|
+
* A URI reference (see RFC3986) that identifies the problem type. This specification encourages that, when dereferenced, it provide human-readable documentation for the problem type (e.g., using HTML [W3C.REC-html5-20141028]). When this member is not present, its value is assumed to be "about:blank".
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof ErrorResponse
|
|
46
|
+
*/
|
|
47
|
+
type?: string;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Check if a given object implements the ErrorResponse interface.
|
|
51
|
+
*/
|
|
52
|
+
export declare function instanceOfErrorResponse(value: object): boolean;
|
|
53
|
+
export declare function ErrorResponseFromJSON(json: any): ErrorResponse;
|
|
54
|
+
export declare function ErrorResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ErrorResponse;
|
|
55
|
+
export declare function ErrorResponseToJSON(value?: ErrorResponse | null): any;
|
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
/* tslint:disable */
|
|
2
|
-
/* eslint-disable */
|
|
3
|
-
/**
|
|
4
|
-
* Notifications API
|
|
5
|
-
* An API to create and read notifications
|
|
6
|
-
*
|
|
7
|
-
* The version of the OpenAPI document: 1.0.0
|
|
8
|
-
* Contact: DevTeamProduct@digitalrealty.com
|
|
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
|
-
import { exists } from '../runtime';
|
|
15
|
-
/**
|
|
16
|
-
* Check if a given object implements the ErrorResponse interface.
|
|
17
|
-
*/
|
|
18
|
-
export function instanceOfErrorResponse(value) {
|
|
19
|
-
let isInstance = true;
|
|
20
|
-
return isInstance;
|
|
21
|
-
}
|
|
22
|
-
export function ErrorResponseFromJSON(json) {
|
|
23
|
-
return ErrorResponseFromJSONTyped(json, false);
|
|
24
|
-
}
|
|
25
|
-
export function ErrorResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
26
|
-
if ((json === undefined) || (json === null)) {
|
|
27
|
-
return json;
|
|
28
|
-
}
|
|
29
|
-
return {
|
|
30
|
-
'detail': !exists(json, 'detail') ? undefined : json['detail'],
|
|
31
|
-
'instance': !exists(json, 'instance') ? undefined : json['instance'],
|
|
32
|
-
'status': !exists(json, 'status') ? undefined : json['status'],
|
|
33
|
-
'title': !exists(json, 'title') ? undefined : json['title'],
|
|
34
|
-
'type': !exists(json, 'type') ? undefined : json['type'],
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
export function ErrorResponseToJSON(value) {
|
|
38
|
-
if (value === undefined) {
|
|
39
|
-
return undefined;
|
|
40
|
-
}
|
|
41
|
-
if (value === null) {
|
|
42
|
-
return null;
|
|
43
|
-
}
|
|
44
|
-
return {
|
|
45
|
-
'detail': value.detail,
|
|
46
|
-
'instance': value.instance,
|
|
47
|
-
'status': value.status,
|
|
48
|
-
'title': value.title,
|
|
49
|
-
'type': value.type,
|
|
50
|
-
};
|
|
51
|
-
}
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Notifications API
|
|
5
|
+
* An API to create and read notifications
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
* Contact: DevTeamProduct@digitalrealty.com
|
|
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
|
+
import { exists } from '../runtime';
|
|
15
|
+
/**
|
|
16
|
+
* Check if a given object implements the ErrorResponse interface.
|
|
17
|
+
*/
|
|
18
|
+
export function instanceOfErrorResponse(value) {
|
|
19
|
+
let isInstance = true;
|
|
20
|
+
return isInstance;
|
|
21
|
+
}
|
|
22
|
+
export function ErrorResponseFromJSON(json) {
|
|
23
|
+
return ErrorResponseFromJSONTyped(json, false);
|
|
24
|
+
}
|
|
25
|
+
export function ErrorResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
26
|
+
if ((json === undefined) || (json === null)) {
|
|
27
|
+
return json;
|
|
28
|
+
}
|
|
29
|
+
return {
|
|
30
|
+
'detail': !exists(json, 'detail') ? undefined : json['detail'],
|
|
31
|
+
'instance': !exists(json, 'instance') ? undefined : json['instance'],
|
|
32
|
+
'status': !exists(json, 'status') ? undefined : json['status'],
|
|
33
|
+
'title': !exists(json, 'title') ? undefined : json['title'],
|
|
34
|
+
'type': !exists(json, 'type') ? undefined : json['type'],
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
export function ErrorResponseToJSON(value) {
|
|
38
|
+
if (value === undefined) {
|
|
39
|
+
return undefined;
|
|
40
|
+
}
|
|
41
|
+
if (value === null) {
|
|
42
|
+
return null;
|
|
43
|
+
}
|
|
44
|
+
return {
|
|
45
|
+
'detail': value.detail,
|
|
46
|
+
'instance': value.instance,
|
|
47
|
+
'status': value.status,
|
|
48
|
+
'title': value.title,
|
|
49
|
+
'type': value.type,
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
52
|
//# sourceMappingURL=ErrorResponse.js.map
|