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 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
- private getBaseUrl;
10
- private getHeaders;
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;
@@ -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 = encodeURIComponent(query.field);
153
- var value = encodeURIComponent(query.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());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "drapcode-developer-sdk",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "main": "build/index.js",
5
5
  "types": "build/index.d.ts",
6
6
  "files": [