seatable-html-page-sdk 0.0.5 → 0.0.6

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/README.md CHANGED
@@ -3,8 +3,8 @@
3
3
  <div>
4
4
 
5
5
  [![npm package](https://img.shields.io/npm/v/seatable-html-page-sdk/latest.svg)](https://www.npmjs.org/package/seatable-html-page-sdk)
6
- [![minified size](https://img.shields.io/bundlephobia/min/seatable-html-page-sdk/latest)](https://unpkg.com/seatable-html-page-sdk@latest/dist/index.min.js)
7
6
  [![npm downloads](https://img.shields.io/npm/dm/seatable-html-page-sdk.svg?style=flat-square)](https://npm-stat.com/charts.html?package=seatable-html-page-sdk)
7
+ [![minified size](https://img.badgesize.io/https://unpkg.com/seatable-html-page-sdk@latest/dist/index.min.js?label=minzipped%20size)](https://unpkg.com/seatable-html-page-sdk@latest/dist/index.min.js)
8
8
 
9
9
  </div>
10
10
 
package/dist/index.js CHANGED
@@ -3890,6 +3890,22 @@
3890
3890
  }
3891
3891
  });
3892
3892
  }
3893
+ _sendDelete(url, data) {
3894
+ return this.req.delete(url, {
3895
+ headers: {
3896
+ 'Content-Type': 'application/json'
3897
+ },
3898
+ data
3899
+ });
3900
+ }
3901
+ _sendPut(url, data) {
3902
+ return this.req.put(url, {
3903
+ headers: {
3904
+ 'Content-Type': 'application/json'
3905
+ },
3906
+ data
3907
+ });
3908
+ }
3893
3909
  listRows(page_id, table_name, start, limit) {
3894
3910
  const url = `${this.server}api/v2.1/universal-apps/${this.appUuid}/html-page-rows/`;
3895
3911
  const params = {
@@ -3929,11 +3945,7 @@
3929
3945
  table_name,
3930
3946
  rows_data
3931
3947
  };
3932
- return this.req.put(url, data, {
3933
- headers: {
3934
- 'Content-Type': 'application/json'
3935
- }
3936
- });
3948
+ return this.req._sendPut(url, data);
3937
3949
  }
3938
3950
  deleteRows(page_id, table_name, rows_ids) {
3939
3951
  const url = `${this.server}api/v2.1/universal-apps/${this.appUuid}/html-page-rows/`;
@@ -3942,11 +3954,7 @@
3942
3954
  table_name,
3943
3955
  rows_ids
3944
3956
  };
3945
- return this.req.delete(url, data, {
3946
- headers: {
3947
- 'Content-Type': 'application/json'
3948
- }
3949
- });
3957
+ return this._sendDelete(url, data);
3950
3958
  }
3951
3959
  }
3952
3960