drapcode-developer-sdk 1.0.7 → 1.0.8
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/build/index.d.ts +2 -2
- package/build/methods/methods.js +5 -2
- package/package.json +1 -1
package/build/index.d.ts
CHANGED
|
@@ -6,8 +6,8 @@ export declare class DrapcodeApis {
|
|
|
6
6
|
private environment;
|
|
7
7
|
private API_PATH;
|
|
8
8
|
constructor(project_seo_name: string, xApiKey?: string, authorization?: string, environment?: string);
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
getBaseUrl(): string;
|
|
10
|
+
getHeaders(): Record<string, string>;
|
|
11
11
|
getAllItems(collectionName: string, reqQuery?: SearchPaginate | any, query?: Query[] | []): Promise<{
|
|
12
12
|
code: any;
|
|
13
13
|
success: boolean;
|
package/build/methods/methods.js
CHANGED
|
@@ -149,8 +149,11 @@ var getAllItems = function (baseurl, headers, collectionName, reqQuery, query) {
|
|
|
149
149
|
}
|
|
150
150
|
query.map(function (query) {
|
|
151
151
|
var conditionString = constants_1.QueryOperation[query.condition];
|
|
152
|
-
var field =
|
|
153
|
-
var value =
|
|
152
|
+
var field = "".concat(query.field);
|
|
153
|
+
var value = "".concat(query.value);
|
|
154
|
+
// double encoding the query params(remove after testing)
|
|
155
|
+
// const field = encodeURIComponent(query.field);
|
|
156
|
+
// const value = encodeURIComponent(query.value);
|
|
154
157
|
queryParams_1.append("".concat(field, ":").concat(conditionString), "".concat(value));
|
|
155
158
|
});
|
|
156
159
|
url = "".concat(baseurl, "/collection/").concat(collectionName, "/items?").concat(queryParams_1.toString());
|