kuzzle-sdk
Advanced tools
Comparing version 7.11.0 to 7.11.1-beta.1
@@ -1,1 +0,1 @@ | ||
/*! Kuzzle Javascript SDK version 7.11.0 */ | ||
/*! Kuzzle Javascript SDK version 7.11.1-beta.1 */ |
{ | ||
"name": "kuzzle-sdk", | ||
"version": "7.11.0", | ||
"version": "7.11.1-beta.1", | ||
"description": "Official Javascript SDK for Kuzzle", | ||
@@ -5,0 +5,0 @@ "author": "The Kuzzle Team <support@kuzzle.io>", |
@@ -1,4 +0,4 @@ | ||
import { KuzzleAbstractProtocol } from "./abstract/Base"; | ||
import { HttpRoutes, JSONObject } from "../types"; | ||
import { RequestPayload } from "../types/RequestPayload"; | ||
import { KuzzleAbstractProtocol } from "./abstract/Base"; | ||
/** | ||
@@ -5,0 +5,0 @@ * Http protocol used to connect to a Kuzzle server. |
@@ -6,4 +6,4 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const Base_1 = require("./abstract/Base"); | ||
const routes_json_1 = __importDefault(require("./routes.json")); | ||
const Base_1 = require("./abstract/Base"); | ||
/** | ||
@@ -299,2 +299,6 @@ * Http protocol used to connect to a Kuzzle server. | ||
} | ||
const contentType = response.headers["content-type"]; | ||
if (!contentType || !contentType.includes("application/json")) { | ||
return response.body; | ||
} | ||
return JSON.parse(response.body); | ||
@@ -320,2 +324,7 @@ }); | ||
try { | ||
const contentType = xhr.getResponseHeader("Content-Type"); | ||
if (!contentType || !contentType.includes("application/json")) { | ||
resolve(xhr.responseText); | ||
return; | ||
} | ||
const json = JSON.parse(xhr.responseText); | ||
@@ -322,0 +331,0 @@ resolve(json); |
@@ -26,14 +26,16 @@ /** | ||
*/ | ||
restrictedTo?: { | ||
/** | ||
* Index name. | ||
* Rights will only be applied on this index. | ||
*/ | ||
index: string; | ||
/** | ||
* Collection names. | ||
* Rights will only be applied on those collections. | ||
*/ | ||
collections?: Array<string>; | ||
}; | ||
restrictedTo?: [ | ||
{ | ||
/** | ||
* Index name. | ||
* Rights will only be applied on this index. | ||
*/ | ||
index: string; | ||
/** | ||
* Collection names. | ||
* Rights will only be applied on those collections. | ||
*/ | ||
collections?: Array<string>; | ||
} | ||
]; | ||
}; |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
556956
12454
2