@zohoim/client-sdk 1.0.0-poc24 → 1.0.0-poc26

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.
@@ -21,13 +21,17 @@ export default class BaseAPI {
21
21
  query
22
22
  } = _ref2;
23
23
 
24
- let _url = this.replacePathParams(url, params);
24
+ const _params = params || {};
25
+
26
+ const _query = query || {};
27
+
28
+ let _url = this.replacePathParams(url, _params);
25
29
 
26
30
  if (this.baseURL) {
27
31
  _url = `${this.baseURL}${_url}`;
28
32
  }
29
33
 
30
- const queryString = this.buildQuery(query);
34
+ const queryString = this.buildQuery(_query);
31
35
 
32
36
  if (queryString) {
33
37
  return `${_url}?${queryString}`;
@@ -1,13 +1,17 @@
1
1
  import { RequestBuilder } from "../base";
2
2
 
3
- function getBotsRequest() {
3
+ function getBotsRequest(_ref) {
4
+ let {
5
+ query = {}
6
+ } = _ref;
4
7
  return new RequestBuilder().withQuery({
5
8
  from: 0,
6
9
  limit: 10,
7
10
  modifiedAfter: null,
8
11
  botServiceId: null,
9
12
  externalAccountId: null,
10
- searchStr: null
13
+ searchStr: null,
14
+ ...query
11
15
  }).build();
12
16
  }
13
17
 
@@ -1,12 +1,18 @@
1
1
  import { RequestBuilder } from "../../base";
2
2
 
3
- function getChannelAgentsRequest() {
3
+ function getChannelAgentsRequest(_ref) {
4
+ let {
5
+ query = {},
6
+ params = {}
7
+ } = _ref;
4
8
  return new RequestBuilder().withQuery({
5
9
  from: 0,
6
10
  limit: 10,
7
- searchStr: null
11
+ searchStr: null,
12
+ ...query
8
13
  }).withParams({
9
- channelId: null
14
+ channelId: null,
15
+ ...params
10
16
  }).build();
11
17
  }
12
18
 
@@ -1,11 +1,17 @@
1
1
  import { RequestBuilder } from "../base";
2
2
 
3
- function updateSessionAssigneeRequest() {
3
+ function updateSessionAssigneeRequest(_ref) {
4
+ let {
5
+ params = {},
6
+ body = {}
7
+ } = _ref;
4
8
  return new RequestBuilder().withParams({
5
- channelId: null
9
+ channelId: null,
10
+ ...params
6
11
  }).withBody({
7
12
  agentId: null,
8
- botId: null
13
+ botId: null,
14
+ ...body
9
15
  }).build();
10
16
  }
11
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zohoim/client-sdk",
3
- "version": "1.0.0-poc24",
3
+ "version": "1.0.0-poc26",
4
4
  "description": "To have the client sdk for the IM",
5
5
  "main": "es/index.js",
6
6
  "module": "es/index.js",