totalum-api-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.
Files changed (3) hide show
  1. package/index.js +1 -26
  2. package/index.ts +1 -2
  3. package/package.json +1 -1
package/index.js CHANGED
@@ -1,27 +1,4 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
2
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
26
3
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
27
4
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -37,7 +14,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
37
14
  Object.defineProperty(exports, "__esModule", { value: true });
38
15
  exports.TotalumApiSdk = void 0;
39
16
  const axios_1 = __importDefault(require("axios"));
40
- const qs = __importStar(require("qs"));
41
17
  // ENDPOINTS
42
18
  const endpoints = {
43
19
  crud: {
@@ -95,9 +71,8 @@ class TotalumApiSdk {
95
71
  }
96
72
  getItems(itemType, query) {
97
73
  return __awaiter(this, void 0, void 0, function* () {
98
- const queryString = qs.stringify(query);
99
74
  const url = this.getUrl(endpoints.crud.getObjects, { typeId: itemType });
100
- return axios_1.default.get(url, { params: queryString, headers: this.headers });
75
+ return axios_1.default.get(url, { params: query, headers: this.headers });
101
76
  });
102
77
  }
103
78
  deleteItemById(itemType, id) {
package/index.ts CHANGED
@@ -151,9 +151,8 @@ export class TotalumApiSdk {
151
151
  }
152
152
 
153
153
  public async getItems(itemType: string, query?: FilterSearchQueryI) {
154
- const queryString = qs.stringify(query);
155
154
  const url = this.getUrl(endpoints.crud.getObjects, { typeId: itemType });
156
- return axios.get(url, { params: queryString, headers: this.headers });
155
+ return axios.get(url, { params: query, headers: this.headers });
157
156
  }
158
157
 
159
158
  public async deleteItemById(itemType: string, id: string) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "totalum-api-sdk",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "description": "Totalum sdk wraper of totalum api",
5
5
  "main": "index.js",
6
6
  "scripts": {