backendless 6.6.3 → 6.6.4

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/backendless.d.ts CHANGED
@@ -680,9 +680,9 @@ declare module Backendless {
680
680
 
681
681
  function createEmailConfirmationURL(identity: string | number): Promise<object>;
682
682
 
683
- function enableUser(userId: string): Promise<void>;
683
+ function enableUser(userId: string | number): Promise<void>;
684
684
 
685
- function disableUser(userId: string): Promise<void>;
685
+ function disableUser(userId: string | number): Promise<void>;
686
686
 
687
687
  function getAuthorizationUrlLink(providerCode: string, fieldsMapping?: object, scope?: string, redirect?: boolean, redirectAfterLoginUrl?: string, callbackUrlDomain?: string): Promise<string>;
688
688
  }
@@ -1433,7 +1433,7 @@ declare module Backendless {
1433
1433
 
1434
1434
  deepSave<T = object>(obj: T | object): Promise<T>;
1435
1435
 
1436
- remove(id: object | string): Promise<object>;
1436
+ remove(id: object | string | number): Promise<object>;
1437
1437
 
1438
1438
  find<T = object>(obj?: Backendless.DataQueryBuilder | DataQueryI): Promise<Array<T>>;
1439
1439
 
@@ -1441,25 +1441,25 @@ declare module Backendless {
1441
1441
 
1442
1442
  countInGroup(obj?: Backendless.GroupQueryBuilder | GroupQueryI): Promise<number>;
1443
1443
 
1444
- findById<T = object>(objectId: string, query?: Backendless.DataQueryBuilder | DataQueryI): Promise<T>;
1444
+ findById<T = object>(objectId: string | number, query?: Backendless.DataQueryBuilder | DataQueryI): Promise<T>;
1445
1445
  findById<T = object>(primaryKeys: object, query?: Backendless.DataQueryBuilder | DataQueryI): Promise<T>;
1446
1446
 
1447
1447
  findFirst<T = object>(query?: Backendless.DataQueryBuilder | DataQueryI): Promise<T>;
1448
1448
 
1449
1449
  findLast<T = object>(query?: Backendless.DataQueryBuilder | DataQueryI): Promise<T>;
1450
1450
 
1451
- loadRelations<T = object>(parent: string | object, query: Backendless.LoadRelationsQueryBuilder | RelationsQueryI): Promise<Array<T>>;
1451
+ loadRelations<T = object>(parent: string | number | object, query: Backendless.LoadRelationsQueryBuilder | RelationsQueryI): Promise<Array<T>>;
1452
1452
 
1453
1453
  getObjectCount(query?: Backendless.DataQueryBuilder | string): Promise<number>
1454
1454
 
1455
- setRelation(parent: object, columnName: string, children: Array<object | string>): Promise<string>;
1456
- setRelation(parent: object, columnName: string, whereClause: string): Promise<string>;
1455
+ setRelation(parent: object | string | number, columnName: string, children: Array<object | string | number>): Promise<string>;
1456
+ setRelation(parent: object | string | number, columnName: string, whereClause: string): Promise<string>;
1457
1457
 
1458
- addRelation(parent: object, columnName: string, children: Array<object | string>): Promise<string>;
1459
- addRelation(parent: object, columnName: string, whereClause: string): Promise<string>;
1458
+ addRelation(parent: object | string | number, columnName: string, children: Array<object | string | number>): Promise<string>;
1459
+ addRelation(parent: object | string | number, columnName: string, whereClause: string): Promise<string>;
1460
1460
 
1461
- deleteRelation(parent: object, columnName: string, children: Array<object | string>): Promise<string>;
1462
- deleteRelation(parent: object, columnName: string, whereClause: string): Promise<string>;
1461
+ deleteRelation(parent: object | string | number, columnName: string, children: Array<object | string | number>): Promise<string>;
1462
+ deleteRelation(parent: object | string | number, columnName: string, whereClause: string): Promise<string>;
1463
1463
 
1464
1464
  bulkCreate(objects: Array<object>): Promise<Array<string>>;
1465
1465
 
@@ -1467,7 +1467,7 @@ declare module Backendless {
1467
1467
 
1468
1468
  bulkUpdate(whereClause: string, changes: object): Promise<string>;
1469
1469
 
1470
- bulkDelete(where: string | Array<string> | Array<{ objectId: string, [key: string]: any }>): Promise<string>;
1470
+ bulkDelete(where: string | Array<string | number | { objectId: string | number, [key: string]: any }>): Promise<string>;
1471
1471
 
1472
1472
  rt(): EventHandler;
1473
1473
  }
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * ********************************************************************************************************************
3
- * Backendless SDK for JavaScript. Version: 6.6.3
3
+ * Backendless SDK for JavaScript. Version: 6.6.4
4
4
  *
5
5
  * Copyright 2012-2023 BACKENDLESS.COM. All Rights Reserved.
6
6
  *
@@ -16669,12 +16669,12 @@ var DataStore = /*#__PURE__*/function () {
16669
16669
  case 0:
16670
16670
  objectId = object && object.objectId || object;
16671
16671
 
16672
- if (!(!objectId || typeof objectId !== 'string')) {
16672
+ if (!(!objectId || typeof objectId !== 'string' && typeof objectId !== 'number')) {
16673
16673
  _context3.next = 3;
16674
16674
  break;
16675
16675
  }
16676
16676
 
16677
- throw new Error('Object Id must be provided and must be a string.');
16677
+ throw new Error('Object Id must be provided and must be a string or number.');
16678
16678
 
16679
16679
  case 3:
16680
16680
  return _context3.abrupt("return", this.app.request["delete"]({
@@ -16822,12 +16822,12 @@ var DataStore = /*#__PURE__*/function () {
16822
16822
  break;
16823
16823
 
16824
16824
  case 8:
16825
- if (!(!objectId || typeof objectId !== 'string')) {
16825
+ if (!(!objectId || typeof objectId !== 'string' && typeof objectId !== 'number')) {
16826
16826
  _context7.next = 10;
16827
16827
  break;
16828
16828
  }
16829
16829
 
16830
- throw new Error('Object Id must be provided and must be a string or an object of primary keys.');
16830
+ throw new Error('Object Id must be provided and must be a string or number or an object of primary keys.');
16831
16831
 
16832
16832
  case 10:
16833
16833
  if (query) {
@@ -16997,12 +16997,12 @@ var DataStore = /*#__PURE__*/function () {
16997
16997
  case 0:
16998
16998
  parentObjectId = parent && parent.objectId || parent;
16999
16999
 
17000
- if (!(!parentObjectId || typeof parentObjectId !== 'string')) {
17000
+ if (!(!parentObjectId || typeof parentObjectId !== 'string' && typeof parentObjectId !== 'number')) {
17001
17001
  _context11.next = 3;
17002
17002
  break;
17003
17003
  }
17004
17004
 
17005
- throw new Error('Parent Object Id must be provided and must be a string.');
17005
+ throw new Error('Parent Object Id must be provided and must be a string or number.');
17006
17006
 
17007
17007
  case 3:
17008
17008
  _ref = queryBuilder instanceof _loadRelationsQueryBuilder["default"] ? queryBuilder.toJSON() : queryBuilder, relationName = _ref.relationName, relationModel = _ref.relationModel, query = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
@@ -17269,8 +17269,8 @@ var DataStore = /*#__PURE__*/function () {
17269
17269
  objectIds = condition.map(function (object) {
17270
17270
  var objectId = object && object.objectId || object;
17271
17271
 
17272
- if (!objectId || typeof objectId !== 'string') {
17273
- throw new Error('Can not transform "objects" to "whereClause". ' + 'Item must be a string or an object with property "objectId" as string.');
17272
+ if (!objectId || typeof objectId !== 'string' && typeof objectId !== 'number') {
17273
+ throw new Error('Can not transform "objects" to "whereClause". ' + 'Item must be a string or number or an object with property "objectId" as string.');
17274
17274
  }
17275
17275
 
17276
17276
  return "'".concat(objectId, "'");
@@ -17324,8 +17324,8 @@ var DataStore = /*#__PURE__*/function () {
17324
17324
  value: function changeRelation(method, parent, columnName, children) {
17325
17325
  var parentId = parent && parent.objectId || parent;
17326
17326
 
17327
- if (!parentId || typeof parentId !== 'string') {
17328
- throw new Error('Relation Parent must be provided and must be a string or an object with objectId property.');
17327
+ if (!parentId || typeof parentId !== 'string' && typeof parentId !== 'number') {
17328
+ throw new Error('Relation Parent must be provided and must be a string or number or an object with objectId property.');
17329
17329
  }
17330
17330
 
17331
17331
  if (!columnName || typeof columnName !== 'string') {
@@ -17344,8 +17344,8 @@ var DataStore = /*#__PURE__*/function () {
17344
17344
  condition.childrenIds = children.map(function (child) {
17345
17345
  var childId = child && child.objectId || child;
17346
17346
 
17347
- if (!childId || typeof childId !== 'string') {
17348
- throw new Error('Child Id must be provided and must be a string.');
17347
+ if (!childId || typeof childId !== 'string' && typeof childId !== 'number') {
17348
+ throw new Error('Child Id must be provided and must be a string or number.');
17349
17349
  }
17350
17350
 
17351
17351
  return childId;
@@ -25763,12 +25763,12 @@ var Users = /*#__PURE__*/function () {
25763
25763
  while (1) {
25764
25764
  switch (_context26.prev = _context26.next) {
25765
25765
  case 0:
25766
- if (!(!userId || typeof userId !== 'string')) {
25766
+ if (!(!userId || typeof userId !== 'string' && typeof userId !== 'number')) {
25767
25767
  _context26.next = 2;
25768
25768
  break;
25769
25769
  }
25770
25770
 
25771
- throw new Error('User objectId must be non empty string');
25771
+ throw new Error('User objectId must be non empty string/number');
25772
25772
 
25773
25773
  case 2:
25774
25774
  if (!(!userStatus || typeof userStatus !== 'string')) {