backendless 6.5.6 → 6.5.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.
@@ -74,35 +74,6 @@ var ListStore = /*#__PURE__*/function (_HiveStore) {
74
74
  url: this.getBaseURL()
75
75
  });
76
76
  }
77
- }, {
78
- key: "set",
79
- value: function set(value, index) {
80
- if (typeof index === 'undefined') {
81
- if (!value || !Array.isArray(value) || !value.length || !(0, _utils.isHiveValueValid)(value)) {
82
- throw new Error('Value must be provided and must be a list of valid JSON items.');
83
- }
84
-
85
- return this.app.request.put({
86
- url: this.getBaseURL(),
87
- data: value
88
- });
89
- }
90
-
91
- if (!(0, _utils.isHiveValueValid)(value)) {
92
- throw new Error('Value must be provided and must be one of types: string, number, boolean, object, array.');
93
- }
94
-
95
- if (typeof index !== 'number' || isNaN(index)) {
96
- throw new Error('Index must be a number.');
97
- }
98
-
99
- return this.app.request.put({
100
- url: "".concat(this.getBaseURL(), "/").concat(index),
101
- data: {
102
- value: value
103
- }
104
- });
105
- }
106
77
  }, {
107
78
  key: "length",
108
79
  value: function length() {
@@ -152,22 +152,6 @@ var MapStore = /*#__PURE__*/function (_HiveStore) {
152
152
  }
153
153
  });
154
154
  }
155
- }, {
156
- key: "add",
157
- value: function add(data) {
158
- if (!_utils["default"].isObject(data)) {
159
- throw new Error('Payload must be an object.');
160
- }
161
-
162
- if (!Object.keys(data).length) {
163
- throw new Error('Provided object must have at least 1 key.');
164
- }
165
-
166
- return this.app.request.put({
167
- url: "".concat(this.getBaseURL(), "/add"),
168
- data: data
169
- });
170
- }
171
155
  }, {
172
156
  key: "increment",
173
157
  value: function increment(key, count) {
@@ -76,30 +76,6 @@ var SetStore = /*#__PURE__*/function (_HiveStore) {
76
76
  }
77
77
  });
78
78
  }
79
- }, {
80
- key: "setValue",
81
- value: function setValue(value) {
82
- if (!(0, _utils.isHiveValueValid)(value)) {
83
- throw new Error('Value must be provided and must be one of types: string, number, boolean, object, array.');
84
- }
85
-
86
- return this.app.request.put({
87
- url: this.getBaseURL(),
88
- data: [value]
89
- });
90
- }
91
- }, {
92
- key: "setValues",
93
- value: function setValues(values) {
94
- if (!values || !Array.isArray(values) || !values.length || !(0, _utils.isHiveValueValid)(values)) {
95
- throw new Error('Value must be provided and must be a list of valid JSON items.');
96
- }
97
-
98
- return this.app.request.put({
99
- url: this.getBaseURL(),
100
- data: values
101
- });
102
- }
103
79
  }, {
104
80
  key: "addValue",
105
81
  value: function addValue(value) {
@@ -85,43 +85,6 @@ var SortedSetStore = /*#__PURE__*/function (_HiveStore) {
85
85
  }, options)
86
86
  });
87
87
  }
88
- }, {
89
- key: "set",
90
- value: function set(items, options) {
91
- if (!items || !Array.isArray(items)) {
92
- throw new Error('Items must be provided and must be an array.');
93
- }
94
-
95
- if (options !== undefined) {
96
- if (!_utils["default"].isObject(options)) {
97
- throw new Error('Options must be an object.');
98
- }
99
-
100
- var duplicateBehaviour = options.duplicateBehaviour,
101
- scoreUpdateMode = options.scoreUpdateMode,
102
- resultType = options.resultType;
103
-
104
- if (duplicateBehaviour !== undefined && !['OnlyUpdate', 'AlwaysAdd'].includes(duplicateBehaviour)) {
105
- throw new Error('Duplicate Behaviour argument must be one of this values: OnlyUpdate, AlwaysAdd.');
106
- }
107
-
108
- if (scoreUpdateMode !== undefined && !['Greater', 'Less'].includes(scoreUpdateMode)) {
109
- throw new Error('Score Update Mode argument must be one of this values: Greater, Less.');
110
- }
111
-
112
- if (resultType !== undefined && !['NewAdded', 'TotalChanged'].includes(resultType)) {
113
- throw new Error('Result Type must be one of this values: NewAdded, TotalChanged.');
114
- }
115
- } //TODO: Waining for BKNDLSS-28543
116
-
117
-
118
- return this.app.request.put({
119
- url: this.getBaseURL(),
120
- data: _objectSpread({
121
- items: items
122
- }, options)
123
- });
124
- }
125
88
  }, {
126
89
  key: "incrementScore",
127
90
  value: function incrementScore(value, scoreValue) {
@@ -74,35 +74,6 @@ var ListStore = /*#__PURE__*/function (_HiveStore) {
74
74
  url: this.getBaseURL()
75
75
  });
76
76
  }
77
- }, {
78
- key: "set",
79
- value: function set(value, index) {
80
- if (typeof index === 'undefined') {
81
- if (!value || !Array.isArray(value) || !value.length || !(0, _utils.isHiveValueValid)(value)) {
82
- throw new Error('Value must be provided and must be a list of valid JSON items.');
83
- }
84
-
85
- return this.app.request.put({
86
- url: this.getBaseURL(),
87
- data: value
88
- });
89
- }
90
-
91
- if (!(0, _utils.isHiveValueValid)(value)) {
92
- throw new Error('Value must be provided and must be one of types: string, number, boolean, object, array.');
93
- }
94
-
95
- if (typeof index !== 'number' || isNaN(index)) {
96
- throw new Error('Index must be a number.');
97
- }
98
-
99
- return this.app.request.put({
100
- url: "".concat(this.getBaseURL(), "/").concat(index),
101
- data: {
102
- value: value
103
- }
104
- });
105
- }
106
77
  }, {
107
78
  key: "length",
108
79
  value: function length() {
@@ -152,22 +152,6 @@ var MapStore = /*#__PURE__*/function (_HiveStore) {
152
152
  }
153
153
  });
154
154
  }
155
- }, {
156
- key: "add",
157
- value: function add(data) {
158
- if (!_utils["default"].isObject(data)) {
159
- throw new Error('Payload must be an object.');
160
- }
161
-
162
- if (!Object.keys(data).length) {
163
- throw new Error('Provided object must have at least 1 key.');
164
- }
165
-
166
- return this.app.request.put({
167
- url: "".concat(this.getBaseURL(), "/add"),
168
- data: data
169
- });
170
- }
171
155
  }, {
172
156
  key: "increment",
173
157
  value: function increment(key, count) {
@@ -76,30 +76,6 @@ var SetStore = /*#__PURE__*/function (_HiveStore) {
76
76
  }
77
77
  });
78
78
  }
79
- }, {
80
- key: "setValue",
81
- value: function setValue(value) {
82
- if (!(0, _utils.isHiveValueValid)(value)) {
83
- throw new Error('Value must be provided and must be one of types: string, number, boolean, object, array.');
84
- }
85
-
86
- return this.app.request.put({
87
- url: this.getBaseURL(),
88
- data: [value]
89
- });
90
- }
91
- }, {
92
- key: "setValues",
93
- value: function setValues(values) {
94
- if (!values || !Array.isArray(values) || !values.length || !(0, _utils.isHiveValueValid)(values)) {
95
- throw new Error('Value must be provided and must be a list of valid JSON items.');
96
- }
97
-
98
- return this.app.request.put({
99
- url: this.getBaseURL(),
100
- data: values
101
- });
102
- }
103
79
  }, {
104
80
  key: "addValue",
105
81
  value: function addValue(value) {
@@ -85,43 +85,6 @@ var SortedSetStore = /*#__PURE__*/function (_HiveStore) {
85
85
  }, options)
86
86
  });
87
87
  }
88
- }, {
89
- key: "set",
90
- value: function set(items, options) {
91
- if (!items || !Array.isArray(items)) {
92
- throw new Error('Items must be provided and must be an array.');
93
- }
94
-
95
- if (options !== undefined) {
96
- if (!_utils["default"].isObject(options)) {
97
- throw new Error('Options must be an object.');
98
- }
99
-
100
- var duplicateBehaviour = options.duplicateBehaviour,
101
- scoreUpdateMode = options.scoreUpdateMode,
102
- resultType = options.resultType;
103
-
104
- if (duplicateBehaviour !== undefined && !['OnlyUpdate', 'AlwaysAdd'].includes(duplicateBehaviour)) {
105
- throw new Error('Duplicate Behaviour argument must be one of this values: OnlyUpdate, AlwaysAdd.');
106
- }
107
-
108
- if (scoreUpdateMode !== undefined && !['Greater', 'Less'].includes(scoreUpdateMode)) {
109
- throw new Error('Score Update Mode argument must be one of this values: Greater, Less.');
110
- }
111
-
112
- if (resultType !== undefined && !['NewAdded', 'TotalChanged'].includes(resultType)) {
113
- throw new Error('Result Type must be one of this values: NewAdded, TotalChanged.');
114
- }
115
- } //TODO: Waining for BKNDLSS-28543
116
-
117
-
118
- return this.app.request.put({
119
- url: this.getBaseURL(),
120
- data: _objectSpread({
121
- items: items
122
- }, options)
123
- });
124
- }
125
88
  }, {
126
89
  key: "incrementScore",
127
90
  value: function incrementScore(value, scoreValue) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "backendless",
3
- "version": "6.5.6",
3
+ "version": "6.5.8",
4
4
  "description": "Backendless JavaScript SDK for Node.js and the browser",
5
5
  "browser": "dist/backendless.js",
6
6
  "main": "lib/index.js",
@@ -40,36 +40,6 @@ export class ListStore extends HiveStore {
40
40
  })
41
41
  }
42
42
 
43
- set(value, index) {
44
- if (typeof index === 'undefined') {
45
- if (!value || !Array.isArray(value) || !value.length || !isHiveValueValid(value)) {
46
- throw new Error('Value must be provided and must be a list of valid JSON items.')
47
- }
48
-
49
- return this.app.request
50
- .put({
51
- url : this.getBaseURL(),
52
- data: value
53
- })
54
- }
55
-
56
- if (!isHiveValueValid(value)) {
57
- throw new Error('Value must be provided and must be one of types: string, number, boolean, object, array.')
58
- }
59
-
60
- if (typeof index !== 'number' || isNaN(index)) {
61
- throw new Error('Index must be a number.')
62
- }
63
-
64
- return this.app.request
65
- .put({
66
- url : `${this.getBaseURL()}/${index}`,
67
- data: {
68
- value
69
- }
70
- })
71
- }
72
-
73
43
  length() {
74
44
  return this.app.request
75
45
  .get({
@@ -119,22 +119,6 @@ export class MapStore extends HiveStore {
119
119
  })
120
120
  }
121
121
 
122
- add(data) {
123
- if (!Utils.isObject(data)) {
124
- throw new Error('Payload must be an object.')
125
- }
126
-
127
- if (!Object.keys(data).length) {
128
- throw new Error('Provided object must have at least 1 key.')
129
- }
130
-
131
- return this.app.request
132
- .put({
133
- url: `${this.getBaseURL()}/add`,
134
- data,
135
- })
136
- }
137
-
138
122
  increment(key, count) {
139
123
  if (!key || typeof key !== 'string') {
140
124
  throw new Error('Key must be provided and must be a string.')
@@ -75,30 +75,6 @@ export class SetStore extends HiveStore {
75
75
  })
76
76
  }
77
77
 
78
- setValue(value) {
79
- if (!isHiveValueValid(value)) {
80
- throw new Error('Value must be provided and must be one of types: string, number, boolean, object, array.')
81
- }
82
-
83
- return this.app.request
84
- .put({
85
- url : this.getBaseURL(),
86
- data: [value]
87
- })
88
- }
89
-
90
- setValues(values) {
91
- if (!values || !Array.isArray(values) || !values.length || !isHiveValueValid(values)) {
92
- throw new Error('Value must be provided and must be a list of valid JSON items.')
93
- }
94
-
95
- return this.app.request
96
- .put({
97
- url : this.getBaseURL(),
98
- data: values
99
- })
100
- }
101
-
102
78
  addValue(value) {
103
79
  if (!isHiveValueValid(value)) {
104
80
  throw new Error('Value must be provided and must be one of types: string, number, boolean, object, array.')
@@ -71,42 +71,6 @@ export class SortedSetStore extends HiveStore {
71
71
  })
72
72
  }
73
73
 
74
- set(items, options) {
75
- if (!items || !Array.isArray(items)) {
76
- throw new Error('Items must be provided and must be an array.')
77
- }
78
-
79
- if (options !== undefined) {
80
- if (!Utils.isObject(options)) {
81
- throw new Error('Options must be an object.')
82
- }
83
-
84
- const { duplicateBehaviour, scoreUpdateMode, resultType } = options
85
-
86
- if (duplicateBehaviour !== undefined && !['OnlyUpdate', 'AlwaysAdd'].includes(duplicateBehaviour)) {
87
- throw new Error('Duplicate Behaviour argument must be one of this values: OnlyUpdate, AlwaysAdd.')
88
- }
89
-
90
- if (scoreUpdateMode !== undefined && !['Greater', 'Less'].includes(scoreUpdateMode)) {
91
- throw new Error('Score Update Mode argument must be one of this values: Greater, Less.')
92
- }
93
-
94
- if (resultType !== undefined && !['NewAdded', 'TotalChanged'].includes(resultType)) {
95
- throw new Error('Result Type must be one of this values: NewAdded, TotalChanged.')
96
- }
97
- }
98
-
99
- //TODO: Waining for BKNDLSS-28543
100
- return this.app.request
101
- .put({
102
- url : this.getBaseURL(),
103
- data: {
104
- items,
105
- ...options
106
- }
107
- })
108
- }
109
-
110
74
  incrementScore(value, scoreValue) {
111
75
  if (!isHiveValueValid(value)) {
112
76
  throw new Error('Value must be provided and must be one of types: string, number, boolean, object, array.')