@zohoim/client-sdk 1.0.0-poc40 → 1.0.0-poc42

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.
@@ -1,10 +1,10 @@
1
1
  import { getRegistryConfig } from "../../config/registry";
2
2
  import { configRegistry } from "../../infrastructure/sdk/config";
3
3
  export default class BaseAPI {
4
- constructor(_ref) {
4
+ constructor() {
5
5
  let {
6
6
  module
7
- } = _ref;
7
+ } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
8
8
  this.httpClient = configRegistry.getHttpClient();
9
9
  this.baseURL = configRegistry.getBaseURL();
10
10
  this.module = module;
@@ -12,19 +12,19 @@ export default class BaseAPI {
12
12
 
13
13
  replacePathParams(url, params) {
14
14
  let _url = url;
15
- Object.entries(params).forEach(_ref2 => {
16
- let [key, value] = _ref2;
15
+ Object.entries(params).forEach(_ref => {
16
+ let [key, value] = _ref;
17
17
  _url = url.replace(`:${key}`, value);
18
18
  });
19
19
  return _url;
20
20
  }
21
21
 
22
- buildUrl(_ref3) {
22
+ buildUrl(_ref2) {
23
23
  let {
24
24
  url,
25
25
  params,
26
26
  query
27
- } = _ref3;
27
+ } = _ref2;
28
28
 
29
29
  const _params = params || {};
30
30
 
@@ -46,23 +46,23 @@ export default class BaseAPI {
46
46
  }
47
47
 
48
48
  buildQuery(query) {
49
- const filteredQuery = Object.entries(query).filter(_ref4 => {
50
- let [, value] = _ref4;
49
+ const filteredQuery = Object.entries(query).filter(_ref3 => {
50
+ let [, value] = _ref3;
51
51
  return value !== undefined && value !== null && value !== '';
52
- }).reduce((acc, _ref5) => {
53
- let [key, value] = _ref5;
52
+ }).reduce((acc, _ref4) => {
53
+ let [key, value] = _ref4;
54
54
  acc[key] = value;
55
55
  return acc;
56
56
  }, {});
57
57
  return new URLSearchParams(filteredQuery).toString();
58
58
  }
59
59
 
60
- async request(_ref6) {
60
+ async request(_ref5) {
61
61
  let {
62
62
  request,
63
63
  operation,
64
64
  header
65
- } = _ref6;
65
+ } = _ref5;
66
66
  const config = getRegistryConfig(this.module, operation);
67
67
 
68
68
  if (!config) {
package/es/index.js CHANGED
@@ -6,5 +6,4 @@ export * from "./infrastructure/sdk";
6
6
  export * from "./infrastructure/adapters";
7
7
  export * from "./infrastructure/api";
8
8
  export * from "./infrastructure/interfaces/api";
9
- export * from "./core/constants";
10
- export * from "./config/urls/base";
9
+ export * from "./core/constants";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zohoim/client-sdk",
3
- "version": "1.0.0-poc40",
3
+ "version": "1.0.0-poc42",
4
4
  "description": "To have the client sdk for the IM",
5
5
  "main": "es/index.js",
6
6
  "module": "es/index.js",