backendless 7.2.6 → 7.3.1

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/es/index.js CHANGED
@@ -21,6 +21,7 @@ var DEFAULT_PROPS = {
21
21
  appId: null,
22
22
  apiKey: null,
23
23
  serverURL: 'https://api.backendless.com',
24
+ automationServerURL: null,
24
25
  domain: null,
25
26
  apiURI: '/api',
26
27
  debugMode: false,
@@ -235,8 +236,18 @@ var Backendless = /*#__PURE__*/function () {
235
236
  get: function get() {
236
237
  return this.__serverURL;
237
238
  },
238
- set: function set(serverURL) {
239
- this.__serverURL = serverURL;
239
+ set: function set(url) {
240
+ this.__serverURL = url;
241
+ }
242
+
243
+ ///--------automationServerURL-------///
244
+ }, {
245
+ key: "automationServerURL",
246
+ get: function get() {
247
+ return this.__automationServerURL;
248
+ },
249
+ set: function set(url) {
250
+ this.__automationServerURL = url;
240
251
  }
241
252
 
242
253
  ///--------domain-------///
@@ -271,6 +282,17 @@ var Backendless = /*#__PURE__*/function () {
271
282
  set: function set(appPath) {
272
283
  throw new Error("Setting '".concat(appPath, "' value to Backendless.appPath directly is not possible, ") + 'instead you must use Backendless.initApp(APP_ID, API_KEY) for setup the value');
273
284
  }
285
+ }, {
286
+ key: "automationPath",
287
+ get: function get() {
288
+ if (!this.automationServerURL) {
289
+ return this.appPath;
290
+ }
291
+ return [this.automationServerURL, this.appId, this.apiKey].join('/');
292
+ },
293
+ set: function set(automationPath) {
294
+ throw new Error("Setting '".concat(automationPath, "' value to Backendless.automationPath directly is not possible"));
295
+ }
274
296
 
275
297
  ///--------debugMode-------///
276
298
  }, {
package/es/urls.js CHANGED
@@ -22,7 +22,7 @@ var Urls = /*#__PURE__*/function () {
22
22
  }, {
23
23
  key: "automation",
24
24
  value: function automation() {
25
- return "".concat(this.root(), "/automation");
25
+ return "".concat(this.app.automationPath, "/automation");
26
26
  }
27
27
  }, {
28
28
  key: "automationFlow",
package/lib/index.js CHANGED
@@ -21,6 +21,7 @@ var DEFAULT_PROPS = {
21
21
  appId: null,
22
22
  apiKey: null,
23
23
  serverURL: 'https://api.backendless.com',
24
+ automationServerURL: null,
24
25
  domain: null,
25
26
  apiURI: '/api',
26
27
  debugMode: false,
@@ -235,8 +236,18 @@ var Backendless = /*#__PURE__*/function () {
235
236
  get: function get() {
236
237
  return this.__serverURL;
237
238
  },
238
- set: function set(serverURL) {
239
- this.__serverURL = serverURL;
239
+ set: function set(url) {
240
+ this.__serverURL = url;
241
+ }
242
+
243
+ ///--------automationServerURL-------///
244
+ }, {
245
+ key: "automationServerURL",
246
+ get: function get() {
247
+ return this.__automationServerURL;
248
+ },
249
+ set: function set(url) {
250
+ this.__automationServerURL = url;
240
251
  }
241
252
 
242
253
  ///--------domain-------///
@@ -271,6 +282,17 @@ var Backendless = /*#__PURE__*/function () {
271
282
  set: function set(appPath) {
272
283
  throw new Error("Setting '".concat(appPath, "' value to Backendless.appPath directly is not possible, ") + 'instead you must use Backendless.initApp(APP_ID, API_KEY) for setup the value');
273
284
  }
285
+ }, {
286
+ key: "automationPath",
287
+ get: function get() {
288
+ if (!this.automationServerURL) {
289
+ return this.appPath;
290
+ }
291
+ return [this.automationServerURL, this.appId, this.apiKey].join('/');
292
+ },
293
+ set: function set(automationPath) {
294
+ throw new Error("Setting '".concat(automationPath, "' value to Backendless.automationPath directly is not possible"));
295
+ }
274
296
 
275
297
  ///--------debugMode-------///
276
298
  }, {
package/lib/urls.js CHANGED
@@ -22,7 +22,7 @@ var Urls = /*#__PURE__*/function () {
22
22
  }, {
23
23
  key: "automation",
24
24
  value: function automation() {
25
- return "".concat(this.root(), "/automation");
25
+ return "".concat(this.app.automationPath, "/automation");
26
26
  }
27
27
  }, {
28
28
  key: "automationFlow",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "backendless",
3
- "version": "7.2.6",
3
+ "version": "7.3.1",
4
4
  "description": "Backendless JavaScript SDK for Node.js and the browser",
5
5
  "browser": "dist/backendless.js",
6
6
  "main": "lib/index.js",
@@ -92,6 +92,6 @@
92
92
  "dependencies": {
93
93
  "@babel/runtime": "^7.21.5",
94
94
  "backendless-request": "^0.7.1",
95
- "backendless-rt-client": "0.2.0"
95
+ "backendless-rt-client": "0.3.0"
96
96
  }
97
97
  }
package/src/index.js CHANGED
@@ -6,14 +6,15 @@ import Utils from './utils'
6
6
  import Expression from './expression'
7
7
 
8
8
  const DEFAULT_PROPS = {
9
- appId : null,
10
- apiKey : null,
11
- serverURL : 'https://api.backendless.com',
12
- domain : null,
13
- apiURI : '/api',
14
- debugMode : false,
15
- standalone : false,
16
- XMLHttpRequest: typeof XMLHttpRequest !== 'undefined'
9
+ appId : null,
10
+ apiKey : null,
11
+ serverURL : 'https://api.backendless.com',
12
+ automationServerURL: null,
13
+ domain : null,
14
+ apiURI : '/api',
15
+ debugMode : false,
16
+ standalone : false,
17
+ XMLHttpRequest : typeof XMLHttpRequest !== 'undefined'
17
18
  ? XMLHttpRequest
18
19
  : undefined,
19
20
  }
@@ -226,8 +227,17 @@ class Backendless {
226
227
  return this.__serverURL
227
228
  }
228
229
 
229
- set serverURL(serverURL) {
230
- this.__serverURL = serverURL
230
+ set serverURL(url) {
231
+ this.__serverURL = url
232
+ }
233
+
234
+ ///--------automationServerURL-------///
235
+ get automationServerURL() {
236
+ return this.__automationServerURL
237
+ }
238
+
239
+ set automationServerURL(url) {
240
+ this.__automationServerURL = url
231
241
  }
232
242
 
233
243
  ///--------domain-------///
@@ -264,6 +274,20 @@ class Backendless {
264
274
  )
265
275
  }
266
276
 
277
+ get automationPath() {
278
+ if (!this.automationServerURL) {
279
+ return this.appPath
280
+ }
281
+
282
+ return [this.automationServerURL, this.appId, this.apiKey].join('/')
283
+ }
284
+
285
+ set automationPath(automationPath) {
286
+ throw new Error(
287
+ `Setting '${automationPath}' value to Backendless.automationPath directly is not possible`
288
+ )
289
+ }
290
+
267
291
  ///--------debugMode-------///
268
292
  get debugMode() {
269
293
  return this.__debugMode
package/src/urls.js CHANGED
@@ -10,7 +10,7 @@ export default class Urls {
10
10
  //automations
11
11
 
12
12
  automation() {
13
- return `${this.root()}/automation`
13
+ return `${this.app.automationPath}/automation`
14
14
  }
15
15
 
16
16
  automationFlow() {