@lcdp/api-react-rest-client 2.4.0-develop.5398062197 → 2.4.0-develop.5421336326
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.
|
@@ -10,7 +10,10 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import { BaseAPI, ApiResponse, BlobWithMeta } from '../runtime';
|
|
13
|
-
import { NotificationTypeAttachment, NotificationTypeId, PaginatedNotificationTypes } from '../models';
|
|
13
|
+
import { NotificationType, NotificationTypeAttachment, NotificationTypeId, PaginatedNotificationTypes } from '../models';
|
|
14
|
+
export interface GetNotificationTypeRequest {
|
|
15
|
+
notificationTypeId: NotificationTypeId;
|
|
16
|
+
}
|
|
14
17
|
export interface GetNotificationTypeAttachmentRequest {
|
|
15
18
|
notificationTypeId: NotificationTypeId;
|
|
16
19
|
attachmentId: number;
|
|
@@ -18,7 +21,7 @@ export interface GetNotificationTypeAttachmentRequest {
|
|
|
18
21
|
export interface GetNotificationTypesRequest {
|
|
19
22
|
idEq?: Array<NotificationTypeId>;
|
|
20
23
|
eEq?: boolean;
|
|
21
|
-
orderBy?: GetNotificationTypesOrderByEnum
|
|
24
|
+
orderBy?: Array<GetNotificationTypesOrderByEnum>;
|
|
22
25
|
p?: number;
|
|
23
26
|
pp?: number;
|
|
24
27
|
}
|
|
@@ -26,6 +29,14 @@ export interface GetNotificationTypesRequest {
|
|
|
26
29
|
* no description
|
|
27
30
|
*/
|
|
28
31
|
export declare class SearchNotificationTypeApi extends BaseAPI {
|
|
32
|
+
/**
|
|
33
|
+
* Get one notification type
|
|
34
|
+
*/
|
|
35
|
+
getNotificationTypeRaw(requestParameters: GetNotificationTypeRequest): Promise<ApiResponse<NotificationType | BlobWithMeta>>;
|
|
36
|
+
/**
|
|
37
|
+
* Get one notification type
|
|
38
|
+
*/
|
|
39
|
+
getNotificationType(requestParameters: GetNotificationTypeRequest): Promise<NotificationType | BlobWithMeta>;
|
|
29
40
|
/**
|
|
30
41
|
* Get an attachment
|
|
31
42
|
*/
|
|
@@ -75,12 +75,85 @@ var SearchNotificationTypeApi = /** @class */ (function (_super) {
|
|
|
75
75
|
function SearchNotificationTypeApi() {
|
|
76
76
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
77
77
|
}
|
|
78
|
+
/**
|
|
79
|
+
* Get one notification type
|
|
80
|
+
*/
|
|
81
|
+
SearchNotificationTypeApi.prototype.getNotificationTypeRaw = function (requestParameters) {
|
|
82
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
83
|
+
var queryParameters, headerParameters, token, tokenString, response, contentType, response_1;
|
|
84
|
+
return __generator(this, function (_a) {
|
|
85
|
+
switch (_a.label) {
|
|
86
|
+
case 0:
|
|
87
|
+
if (requestParameters.notificationTypeId === null || requestParameters.notificationTypeId === undefined) {
|
|
88
|
+
throw new runtime_1.RequiredError('notificationTypeId', 'Required parameter requestParameters.notificationTypeId was null or undefined when calling getNotificationType.');
|
|
89
|
+
}
|
|
90
|
+
queryParameters = {};
|
|
91
|
+
headerParameters = {};
|
|
92
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
93
|
+
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // apiKeyAuth authentication
|
|
94
|
+
}
|
|
95
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
96
|
+
token = this.configuration.accessToken;
|
|
97
|
+
tokenString = typeof token === 'function' ? token("bearerAuth", []) : token;
|
|
98
|
+
if (tokenString) {
|
|
99
|
+
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
_a.label = 1;
|
|
103
|
+
case 1:
|
|
104
|
+
_a.trys.push([1, 3, , 4]);
|
|
105
|
+
return [4 /*yield*/, this.request({
|
|
106
|
+
path: "/notifications/types/{notificationTypeId}".replace("{".concat("notificationTypeId", "}"), encodeURIComponent(String(requestParameters.notificationTypeId))),
|
|
107
|
+
method: 'GET',
|
|
108
|
+
headers: headerParameters,
|
|
109
|
+
query: queryParameters,
|
|
110
|
+
})];
|
|
111
|
+
case 2:
|
|
112
|
+
response = _a.sent();
|
|
113
|
+
contentType = response.headers.get("content-type");
|
|
114
|
+
if (contentType && contentType.indexOf("application/json") !== -1) {
|
|
115
|
+
return [2 /*return*/, new runtime_1.JSONApiResponse(response, function (jsonValue) { return (0, models_1.NotificationTypeFromJSON)(jsonValue); })];
|
|
116
|
+
}
|
|
117
|
+
else if (contentType && contentType.indexOf("text/plain") !== -1) {
|
|
118
|
+
return [2 /*return*/, new runtime_1.TextApiResponse(response)];
|
|
119
|
+
}
|
|
120
|
+
else {
|
|
121
|
+
// TODO : Better handling of others application types
|
|
122
|
+
return [2 /*return*/, new runtime_1.BlobWithMetaApiResponse(response)];
|
|
123
|
+
}
|
|
124
|
+
return [3 /*break*/, 4];
|
|
125
|
+
case 3:
|
|
126
|
+
response_1 = _a.sent();
|
|
127
|
+
console.debug(response_1);
|
|
128
|
+
throw response_1;
|
|
129
|
+
case 4: return [2 /*return*/];
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
});
|
|
133
|
+
};
|
|
134
|
+
/**
|
|
135
|
+
* Get one notification type
|
|
136
|
+
*/
|
|
137
|
+
SearchNotificationTypeApi.prototype.getNotificationType = function (requestParameters) {
|
|
138
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
139
|
+
var response;
|
|
140
|
+
return __generator(this, function (_a) {
|
|
141
|
+
switch (_a.label) {
|
|
142
|
+
case 0: return [4 /*yield*/, this.getNotificationTypeRaw(requestParameters)];
|
|
143
|
+
case 1:
|
|
144
|
+
response = _a.sent();
|
|
145
|
+
return [4 /*yield*/, response.value()];
|
|
146
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
147
|
+
}
|
|
148
|
+
});
|
|
149
|
+
});
|
|
150
|
+
};
|
|
78
151
|
/**
|
|
79
152
|
* Get an attachment
|
|
80
153
|
*/
|
|
81
154
|
SearchNotificationTypeApi.prototype.getNotificationTypeAttachmentRaw = function (requestParameters) {
|
|
82
155
|
return __awaiter(this, void 0, void 0, function () {
|
|
83
|
-
var queryParameters, headerParameters, token, tokenString, response, contentType,
|
|
156
|
+
var queryParameters, headerParameters, token, tokenString, response, contentType, response_2;
|
|
84
157
|
return __generator(this, function (_a) {
|
|
85
158
|
switch (_a.label) {
|
|
86
159
|
case 0:
|
|
@@ -126,9 +199,9 @@ var SearchNotificationTypeApi = /** @class */ (function (_super) {
|
|
|
126
199
|
}
|
|
127
200
|
return [3 /*break*/, 4];
|
|
128
201
|
case 3:
|
|
129
|
-
|
|
130
|
-
console.debug(
|
|
131
|
-
throw
|
|
202
|
+
response_2 = _a.sent();
|
|
203
|
+
console.debug(response_2);
|
|
204
|
+
throw response_2;
|
|
132
205
|
case 4: return [2 /*return*/];
|
|
133
206
|
}
|
|
134
207
|
});
|
|
@@ -156,7 +229,7 @@ var SearchNotificationTypeApi = /** @class */ (function (_super) {
|
|
|
156
229
|
*/
|
|
157
230
|
SearchNotificationTypeApi.prototype.getNotificationTypesRaw = function (requestParameters) {
|
|
158
231
|
return __awaiter(this, void 0, void 0, function () {
|
|
159
|
-
var queryParameters, headerParameters, token, tokenString, response, contentType,
|
|
232
|
+
var queryParameters, headerParameters, token, tokenString, response, contentType, response_3;
|
|
160
233
|
return __generator(this, function (_a) {
|
|
161
234
|
switch (_a.label) {
|
|
162
235
|
case 0:
|
|
@@ -167,7 +240,7 @@ var SearchNotificationTypeApi = /** @class */ (function (_super) {
|
|
|
167
240
|
if (requestParameters.eEq !== undefined) {
|
|
168
241
|
queryParameters['e[eq]'] = requestParameters.eEq;
|
|
169
242
|
}
|
|
170
|
-
if (requestParameters.orderBy
|
|
243
|
+
if (requestParameters.orderBy) {
|
|
171
244
|
queryParameters['orderBy'] = requestParameters.orderBy;
|
|
172
245
|
}
|
|
173
246
|
if (requestParameters.p !== undefined) {
|
|
@@ -211,9 +284,9 @@ var SearchNotificationTypeApi = /** @class */ (function (_super) {
|
|
|
211
284
|
}
|
|
212
285
|
return [3 /*break*/, 4];
|
|
213
286
|
case 3:
|
|
214
|
-
|
|
215
|
-
console.debug(
|
|
216
|
-
throw
|
|
287
|
+
response_3 = _a.sent();
|
|
288
|
+
console.debug(response_3);
|
|
289
|
+
throw response_3;
|
|
217
290
|
case 4: return [2 /*return*/];
|
|
218
291
|
}
|
|
219
292
|
});
|