biz9-logic 3.0.16 → 3.0.17

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/biz9_config CHANGED
@@ -1,4 +1,4 @@
1
- VERSION='3.1.6'
1
+ VERSION='3.1.7'
2
2
  TITLE='BiZ9-Logic';
3
3
  REPO='git@github.com:biz9framework/biz9-logic.git';
4
4
  BRANCH='main';
package/index.js CHANGED
@@ -84,12 +84,28 @@ class Url {
84
84
  let action_url= "main/crud/get_list/"+data_type;
85
85
  return get_cloud_url_main(biz9_config.APP_TITLE_ID,biz9_config.URL,action_url,null);
86
86
  };
87
+ static update_list = (biz9_config,data_type) => {
88
+ let action_url= "main/crud/update_list/"+data_type;
89
+ return get_cloud_url_main(biz9_config.APP_TITLE_ID,biz9_config.URL,action_url,null);
90
+ };
87
91
  static delete_list = (biz9_config,data_type) => {
88
92
  let action_url= "main/crud/delete_list/"+data_type;
89
93
  return get_cloud_url_main(biz9_config.APP_TITLE_ID,biz9_config.URL,action_url,null);
90
94
  };
91
- static update_list = (biz9_config,data_type) => {
92
- let action_url= "main/crud/update_list/"+data_type;
95
+ static get_biz_item = (biz9_config,data_type,id) => {
96
+ let action_url= "main/biz_item/get/"+data_type + "/" + id;
97
+ return get_cloud_url_main(biz9_config.APP_TITLE_ID,biz9_config.URL,action_url,null);
98
+ };
99
+ static delete_biz_item = (biz9_config,data_type,id) => {
100
+ let action_url= "main/biz_item/delete/"+data_type + "/" + id;
101
+ return get_cloud_url_main(biz9_config.APP_TITLE_ID,biz9_config.URL,action_url,null);
102
+ };
103
+ static get_biz_list = (biz9_config,data_type) => {
104
+ let action_url= "main/biz_item/get_list/"+data_type;
105
+ return get_cloud_url_main(biz9_config.APP_TITLE_ID,biz9_config.URL,action_url,null);
106
+ };
107
+ static delete_biz_list = (biz9_config,data_type) => {
108
+ let action_url= "main/biz_item/delete_list/"+data_type;
93
109
  return get_cloud_url_main(biz9_config.APP_TITLE_ID,biz9_config.URL,action_url,null);
94
110
  };
95
111
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "biz9-logic",
3
- "version": "3.0.16",
3
+ "version": "3.0.17",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
package/test.js CHANGED
@@ -1,8 +1,8 @@
1
1
  const path = require('path');
2
2
  const series = require('async-series');
3
- const {Item,DataType,Url,Obj} = require('./');
3
+ const { Item,DataType,Url,Obj } = require('./');
4
4
  const {Log,Test} = require('biz9-utility');
5
- const { Scriptz }= require('biz9-scriptz');
5
+ const { Scriptz }= require('biz9-scriptz');
6
6
 
7
7
  /* --- TEST CONFIG START --- */
8
8
  //const ID='0';
@@ -28,6 +28,7 @@ const biz9_config ={
28
28
  describe("connect", () => {
29
29
  it("_connect", () => {
30
30
  series([
31
+ /*
31
32
  function(call) {
32
33
  console.log('GET-BIZ9-GET-DATA-TYPE-START');
33
34
  console.log(DataType.get_data_type_title(DataType.DT_CART_ITEM));
@@ -159,6 +160,17 @@ describe("connect", () => {
159
160
  console.log('SET-ITEM-BIZ-SUCCESS');
160
161
  call();
161
162
  },
163
+ */
164
+ function(call) {
165
+ console.log('GET_URL-BIZ-ITEM-START');
166
+ let biz9_config = Scriptz.get_biz9_config({biz9_config_file:path.resolve('../../biz9_config')});
167
+ let data_type = 'dt_blank';
168
+ //let cloud_url = Url.get_biz_item(biz9_config,data_type,ID);
169
+ let cloud_url = Url.delete_biz_item(biz9_config,data_type,ID);
170
+ Log.w('get_url_biz_item',cloud_url);
171
+ console.log('GET_URL-BIZ-ITEM-SUCCESS');
172
+ call()
173
+ },
162
174
  function(call) {
163
175
  // never happens, because "second thing"
164
176
  // passed an error to the done() callback