biz9-logic 3.0.4 → 3.0.8

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.0.4'
1
+ VERSION='3.0.8'
2
2
  TITLE='BiZ9-Logic';
3
3
  REPO='git@github.com:biz9framework/biz9-logic.git';
4
4
  BRANCH='main';
package/index.js CHANGED
@@ -5,6 +5,27 @@ License GNU General Public License v3.0
5
5
  Description: BiZ9 Framework: Logic-JS
6
6
  */
7
7
  const { get_new_item_main,get_data_config_main,get_cloud_url_main,get_biz_item_main,get_cloud_filter_obj_main,get_title_url_main } = require('./main');
8
+
9
+ class DataType {
10
+ static DT_ADMIN='admin_biz';
11
+ static DT_BLANK='blank_biz';
12
+ static DT_BLOG_POST='blog_post_biz';
13
+ static DT_CART_ITEM="cart_item_biz";
14
+ static DT_CATEGORY='category_biz';
15
+ static DT_EVENT='event_biz';
16
+ static DT_GALLERY='gallery_biz';
17
+ static DT_ITEM_MAP='item_map_biz';
18
+ static DT_ITEM='item_biz';
19
+ static DT_PHOTO='photo_biz';
20
+ static DT_REVIEW='review_biz';
21
+ static DT_SERVICE='service_biz';
22
+ static DT_USER='user_biz';
23
+ static DT_PROJECT='project_biz';
24
+ static DT_PRODUCT='product_biz';
25
+ static DT_ORDER="order_biz";
26
+ static DT_ORDER_ITEM="order_item_biz";
27
+ static DT_VIDEO='video_biz';
28
+ }
8
29
  class Logic {
9
30
  static get_new_item = (data_type,id) => {
10
31
  return get_new_item_main(data_type,id);
@@ -48,5 +69,6 @@ class Logic {
48
69
  }
49
70
  };
50
71
  module.exports = {
51
- Logic
72
+ Logic,
73
+ DataType
52
74
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "biz9-logic",
3
- "version": "3.0.4",
3
+ "version": "3.0.8",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
package/test.js CHANGED
@@ -1,6 +1,6 @@
1
1
  const path = require('path');
2
2
  const series = require('async-series');
3
- const {Logic} = require('./');
3
+ const {Logic,DataType} = require('./');
4
4
  const {Log,Test} = require('biz9-utility');
5
5
  const { Scriptz }= require('biz9-scriptz');
6
6
 
@@ -34,6 +34,11 @@ describe("connect", () => {
34
34
  Log.w('APP_TITLE_ID',biz9_config.APP_TITLE_ID);
35
35
  Log.w('APP_TITLE',biz9_config.TITLE);
36
36
  Log.w('URL',biz9_config.URL);
37
+ console.log('----------------------');
38
+ Log.w('DATA_TYPE',DataType.DT_BLANK);
39
+ Log.w('BLOG_POST',DataType.DT_BLOG_POST);
40
+ Log.w('SERVICE',DataType.DT_SERVICE);
41
+ console.log('----------------------');
37
42
  console.log('GET-BIZ9-CONFIG-FILE-SUCCESS');
38
43
  call()
39
44
  },
@@ -107,8 +112,8 @@ describe("connect", () => {
107
112
  console.log('GET_URL-ACTION-UPDATE-LIST-ITEM-START');
108
113
  let biz9_config = Scriptz.get_biz9_config({biz9_config_file:path.resolve('../../biz9_config')});
109
114
  let data_type = 'dt_blank';
110
- let cloud_url = Logic.get_url_action_delete_list(biz9_config,data_type);
111
- Log.w('get_url_action_delete_list_item',cloud_url);
115
+ let cloud_url = Logic.get_url_action_update_list(biz9_config,data_type);
116
+ Log.w('get_url_action_update_list_item',cloud_url);
112
117
  console.log('GET_URL-ACTION-UPDATE-LIST-ITEM-SUCCESS');
113
118
  call()
114
119
  },
@@ -146,7 +151,6 @@ describe("connect", () => {
146
151
  console.log('SET-ITEM-BIZ-SUCCESS');
147
152
  call();
148
153
  },
149
-
150
154
  function(call) {
151
155
  // never happens, because "second thing"
152
156
  // passed an error to the done() callback