seatable-html-page-sdk 0.0.5 → 0.0.7

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,21 @@
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, data, {
3903
+ headers: {
3904
+ 'Content-Type': 'application/json'
3905
+ }
3906
+ });
3907
+ }
3893
3908
  listRows(page_id, table_name, start, limit) {
3894
3909
  const url = `${this.server}api/v2.1/universal-apps/${this.appUuid}/html-page-rows/`;
3895
3910
  const params = {
@@ -3929,11 +3944,7 @@
3929
3944
  table_name,
3930
3945
  rows_data
3931
3946
  };
3932
- return this.req.put(url, data, {
3933
- headers: {
3934
- 'Content-Type': 'application/json'
3935
- }
3936
- });
3947
+ return this._sendPut(url, data);
3937
3948
  }
3938
3949
  deleteRows(page_id, table_name, rows_ids) {
3939
3950
  const url = `${this.server}api/v2.1/universal-apps/${this.appUuid}/html-page-rows/`;
@@ -3942,11 +3953,7 @@
3942
3953
  table_name,
3943
3954
  rows_ids
3944
3955
  };
3945
- return this.req.delete(url, data, {
3946
- headers: {
3947
- 'Content-Type': 'application/json'
3948
- }
3949
- });
3956
+ return this._sendDelete(url, data);
3950
3957
  }
3951
3958
  }
3952
3959