@lcdp/api-react-rest-client 2.5.12-develop.7445308864 → 2.5.13-LDS-3342-raven.7554197700
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.
|
@@ -47,6 +47,16 @@ export declare class SearchApiKeyApi extends BaseAPI {
|
|
|
47
47
|
* Search for API keys Restrictions : - Getting API keys of other users is forbidden (except role \'ADMINISTRATOR\')
|
|
48
48
|
*/
|
|
49
49
|
getApiKeys(requestParameters: GetApiKeysRequest): Promise<PaginatedApiKeys | BlobWithMeta>;
|
|
50
|
+
/**
|
|
51
|
+
* Get raven hash according to being connected or not
|
|
52
|
+
* Get raven hash to receive/send notification
|
|
53
|
+
*/
|
|
54
|
+
getRavenHashRaw(): Promise<ApiResponse<string | BlobWithMeta>>;
|
|
55
|
+
/**
|
|
56
|
+
* Get raven hash according to being connected or not
|
|
57
|
+
* Get raven hash to receive/send notification
|
|
58
|
+
*/
|
|
59
|
+
getRavenHash(): Promise<string | BlobWithMeta>;
|
|
50
60
|
}
|
|
51
61
|
/**
|
|
52
62
|
* @export
|
|
@@ -267,6 +267,68 @@ var SearchApiKeyApi = /** @class */ (function (_super) {
|
|
|
267
267
|
});
|
|
268
268
|
});
|
|
269
269
|
};
|
|
270
|
+
/**
|
|
271
|
+
* Get raven hash according to being connected or not
|
|
272
|
+
* Get raven hash to receive/send notification
|
|
273
|
+
*/
|
|
274
|
+
SearchApiKeyApi.prototype.getRavenHashRaw = function () {
|
|
275
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
276
|
+
var queryParameters, headerParameters, response, contentType, response_3;
|
|
277
|
+
return __generator(this, function (_a) {
|
|
278
|
+
switch (_a.label) {
|
|
279
|
+
case 0:
|
|
280
|
+
queryParameters = {};
|
|
281
|
+
headerParameters = {};
|
|
282
|
+
_a.label = 1;
|
|
283
|
+
case 1:
|
|
284
|
+
_a.trys.push([1, 3, , 4]);
|
|
285
|
+
return [4 /*yield*/, this.request({
|
|
286
|
+
path: "/raven-hash",
|
|
287
|
+
method: 'GET',
|
|
288
|
+
headers: headerParameters,
|
|
289
|
+
query: queryParameters,
|
|
290
|
+
})];
|
|
291
|
+
case 2:
|
|
292
|
+
response = _a.sent();
|
|
293
|
+
contentType = response.headers.get("content-type");
|
|
294
|
+
if (contentType && contentType.indexOf("application/json") !== -1) {
|
|
295
|
+
return [2 /*return*/, new runtime_1.TextApiResponse(response)];
|
|
296
|
+
}
|
|
297
|
+
else if (contentType && contentType.indexOf("text/plain") !== -1) {
|
|
298
|
+
return [2 /*return*/, new runtime_1.TextApiResponse(response)];
|
|
299
|
+
}
|
|
300
|
+
else {
|
|
301
|
+
// TODO : Better handling of others application types
|
|
302
|
+
return [2 /*return*/, new runtime_1.BlobWithMetaApiResponse(response)];
|
|
303
|
+
}
|
|
304
|
+
return [3 /*break*/, 4];
|
|
305
|
+
case 3:
|
|
306
|
+
response_3 = _a.sent();
|
|
307
|
+
console.debug(response_3);
|
|
308
|
+
throw response_3;
|
|
309
|
+
case 4: return [2 /*return*/];
|
|
310
|
+
}
|
|
311
|
+
});
|
|
312
|
+
});
|
|
313
|
+
};
|
|
314
|
+
/**
|
|
315
|
+
* Get raven hash according to being connected or not
|
|
316
|
+
* Get raven hash to receive/send notification
|
|
317
|
+
*/
|
|
318
|
+
SearchApiKeyApi.prototype.getRavenHash = function () {
|
|
319
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
320
|
+
var response;
|
|
321
|
+
return __generator(this, function (_a) {
|
|
322
|
+
switch (_a.label) {
|
|
323
|
+
case 0: return [4 /*yield*/, this.getRavenHashRaw()];
|
|
324
|
+
case 1:
|
|
325
|
+
response = _a.sent();
|
|
326
|
+
return [4 /*yield*/, response.value()];
|
|
327
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
328
|
+
}
|
|
329
|
+
});
|
|
330
|
+
});
|
|
331
|
+
};
|
|
270
332
|
return SearchApiKeyApi;
|
|
271
333
|
}(runtime_1.BaseAPI));
|
|
272
334
|
exports.SearchApiKeyApi = SearchApiKeyApi;
|