parse 6.1.0-alpha.1 → 6.1.0-alpha.2

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.
Files changed (58) hide show
  1. package/dist/parse.js +68 -60
  2. package/dist/parse.min.js +2 -2
  3. package/dist/parse.weapp.js +68 -60
  4. package/dist/parse.weapp.min.js +2 -2
  5. package/lib/browser/Cloud.js +1 -0
  6. package/lib/browser/CoreManager.js +2 -1
  7. package/lib/browser/EventuallyQueue.js +6 -9
  8. package/lib/browser/LiveQuerySubscription.js +4 -4
  9. package/lib/browser/Parse.js +12 -1
  10. package/lib/browser/ParseACL.js +1 -1
  11. package/lib/browser/ParseConfig.js +2 -4
  12. package/lib/browser/ParseLiveQuery.js +2 -2
  13. package/lib/browser/ParseObject.js +10 -10
  14. package/lib/browser/ParseQuery.js +7 -8
  15. package/lib/browser/ParseRole.js +1 -1
  16. package/lib/browser/ParseSchema.js +6 -6
  17. package/lib/browser/ParseUser.js +10 -12
  18. package/lib/browser/RESTController.js +3 -0
  19. package/lib/node/Cloud.js +1 -0
  20. package/lib/node/CoreManager.js +2 -1
  21. package/lib/node/EventuallyQueue.js +6 -6
  22. package/lib/node/LiveQuerySubscription.js +4 -4
  23. package/lib/node/Parse.js +12 -1
  24. package/lib/node/ParseACL.js +1 -1
  25. package/lib/node/ParseConfig.js +2 -2
  26. package/lib/node/ParseLiveQuery.js +2 -2
  27. package/lib/node/ParseObject.js +10 -7
  28. package/lib/node/ParseQuery.js +7 -7
  29. package/lib/node/ParseRole.js +1 -1
  30. package/lib/node/ParseSchema.js +6 -4
  31. package/lib/node/ParseUser.js +10 -10
  32. package/lib/node/RESTController.js +3 -0
  33. package/lib/react-native/CoreManager.js +2 -1
  34. package/lib/react-native/EventuallyQueue.js +5 -8
  35. package/lib/react-native/LiveQuerySubscription.js +7 -7
  36. package/lib/react-native/Parse.js +8 -1
  37. package/lib/react-native/ParseConfig.js +2 -4
  38. package/lib/react-native/ParseLiveQuery.js +2 -2
  39. package/lib/react-native/ParseObject.js +16 -18
  40. package/lib/react-native/ParseQuery.js +5 -6
  41. package/lib/react-native/ParseSchema.js +5 -6
  42. package/lib/react-native/ParseUser.js +3 -5
  43. package/lib/react-native/RESTController.js +3 -0
  44. package/lib/weapp/Cloud.js +1 -0
  45. package/lib/weapp/CoreManager.js +2 -1
  46. package/lib/weapp/EventuallyQueue.js +6 -9
  47. package/lib/weapp/LiveQuerySubscription.js +4 -4
  48. package/lib/weapp/Parse.js +12 -1
  49. package/lib/weapp/ParseACL.js +1 -1
  50. package/lib/weapp/ParseConfig.js +2 -4
  51. package/lib/weapp/ParseLiveQuery.js +2 -2
  52. package/lib/weapp/ParseObject.js +10 -10
  53. package/lib/weapp/ParseQuery.js +7 -8
  54. package/lib/weapp/ParseRole.js +1 -1
  55. package/lib/weapp/ParseSchema.js +6 -6
  56. package/lib/weapp/ParseUser.js +10 -12
  57. package/lib/weapp/RESTController.js +3 -0
  58. package/package.json +6 -5
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Parse JavaScript SDK v6.1.0-alpha.1
2
+ * Parse JavaScript SDK v6.1.0-alpha.2
3
3
  *
4
4
  * The source tree of this library can be found at
5
5
  * https://github.com/ParsePlatform/Parse-SDK-JS
@@ -247,6 +247,7 @@ var _ParseObject = _interopRequireDefault(_dereq_("./ParseObject"));
247
247
  * @returns {Promise} A promise that will be resolved with the result
248
248
  * of the function.
249
249
  */
250
+
250
251
  function run(name, data, options) {
251
252
  if (typeof name !== 'string' || name.length === 0) {
252
253
  throw new TypeError('Cloud function name must be a string.');
@@ -354,9 +355,10 @@ const config = {
354
355
  SERVER_AUTH_TOKEN: null,
355
356
  LIVEQUERY_SERVER_URL: null,
356
357
  ENCRYPTED_KEY: null,
357
- VERSION: 'js' + "6.1.0-alpha.1",
358
+ VERSION: 'js' + "6.1.0-alpha.2",
358
359
  APPLICATION_ID: null,
359
360
  JAVASCRIPT_KEY: null,
361
+ MAINTENANCE_KEY: null,
360
362
  MASTER_KEY: null,
361
363
  USE_MASTER_KEY: false,
362
364
  PERFORM_USER_REWRITE: true,
@@ -681,8 +683,7 @@ const EventuallyQueue = {
681
683
  * @static
682
684
  * @see Parse.Object#saveEventually
683
685
  */
684
- save(object) {
685
- let serverOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
686
+ save(object, serverOptions) {
686
687
  return this.enqueue('save', object, serverOptions);
687
688
  },
688
689
  /**
@@ -696,8 +697,7 @@ const EventuallyQueue = {
696
697
  * @static
697
698
  * @see Parse.Object#destroyEventually
698
699
  */
699
- destroy(object) {
700
- let serverOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
700
+ destroy(object, serverOptions) {
701
701
  return this.enqueue('destroy', object, serverOptions);
702
702
  },
703
703
  /**
@@ -747,7 +747,7 @@ const EventuallyQueue = {
747
747
  queueId,
748
748
  action,
749
749
  object: object.toJSON(),
750
- serverOptions,
750
+ serverOptions: serverOptions || {},
751
751
  id: object.id,
752
752
  className: object.className,
753
753
  hash: object.get('hash'),
@@ -766,7 +766,7 @@ const EventuallyQueue = {
766
766
  *
767
767
  * @function getQueue
768
768
  * @name Parse.EventuallyQueue.getQueue
769
- * @returns {Promise<QueueObject[]>}
769
+ * @returns {Promise<Queue>}
770
770
  * @static
771
771
  */
772
772
  async getQueue() {
@@ -921,8 +921,7 @@ const EventuallyQueue = {
921
921
  * @param [ms] Milliseconds to ping the server. Default 2000ms
922
922
  * @static
923
923
  */
924
- poll() {
925
- let ms = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 2000;
924
+ poll(ms) {
926
925
  if (polling) {
927
926
  return;
928
927
  }
@@ -937,7 +936,7 @@ const EventuallyQueue = {
937
936
  return this.sendQueue();
938
937
  }
939
938
  }).catch(e => e);
940
- }, ms);
939
+ }, ms || 2000);
941
940
  },
942
941
  /**
943
942
  * Turns off polling.
@@ -1951,7 +1950,7 @@ var _promiseUtils = _dereq_("./promiseUtils");
1951
1950
  *
1952
1951
  * });</pre></p>
1953
1952
  */
1954
- class Subscription {
1953
+ class LiveQuerySubscription {
1955
1954
  /*
1956
1955
  * @param {string | number} id - subscription id
1957
1956
  * @param {string} query - query to subscribe to
@@ -1974,8 +1973,8 @@ class Subscription {
1974
1973
  this.subscribePromise = (0, _promiseUtils.resolvingPromise)();
1975
1974
  this.unsubscribePromise = (0, _promiseUtils.resolvingPromise)();
1976
1975
  this.subscribed = false;
1977
- const EventEmitter = _CoreManager.default.getEventEmitter();
1978
- this.emitter = new EventEmitter();
1976
+ const Emitter = _CoreManager.default.getEventEmitter();
1977
+ this.emitter = new Emitter();
1979
1978
  this.on = (eventName, listener) => this.emitter.on(eventName, listener);
1980
1979
  this.emit = function (eventName) {
1981
1980
  for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
@@ -2000,7 +1999,7 @@ class Subscription {
2000
1999
  });
2001
2000
  }
2002
2001
  }
2003
- var _default = exports.default = Subscription;
2002
+ var _default = exports.default = LiveQuerySubscription;
2004
2003
  },{"./CoreManager":4,"./promiseUtils":61,"@babel/runtime-corejs3/core-js-stable/object/define-property":91,"@babel/runtime-corejs3/helpers/defineProperty":103,"@babel/runtime-corejs3/helpers/interopRequireDefault":104}],13:[function(_dereq_,module,exports){
2005
2004
  "use strict";
2006
2005
 
@@ -3442,9 +3441,10 @@ const Parse = {
3442
3441
  initialize(applicationId, javaScriptKey) {
3443
3442
  Parse._initialize(applicationId, javaScriptKey);
3444
3443
  },
3445
- _initialize(applicationId, javaScriptKey, masterKey) {
3444
+ _initialize(applicationId, javaScriptKey, masterKey, maintenanceKey) {
3446
3445
  _CoreManager.default.set('APPLICATION_ID', applicationId);
3447
3446
  _CoreManager.default.set('JAVASCRIPT_KEY', javaScriptKey);
3447
+ _CoreManager.default.set('MAINTENANCE_KEY', maintenanceKey);
3448
3448
  _CoreManager.default.set('MASTER_KEY', masterKey);
3449
3449
  _CoreManager.default.set('USE_MASTER_KEY', false);
3450
3450
  _CoreManager.default.setIfNeeded('EventEmitter', _EventEmitter.default);
@@ -3516,6 +3516,16 @@ const Parse = {
3516
3516
  get masterKey() {
3517
3517
  return _CoreManager.default.get('MASTER_KEY');
3518
3518
  },
3519
+ /**
3520
+ * @member {string} Parse.maintenanceKey
3521
+ * @static
3522
+ */
3523
+ set maintenanceKey(value) {
3524
+ _CoreManager.default.set('MAINTENANCE_KEY', value);
3525
+ },
3526
+ get maintenanceKey() {
3527
+ return _CoreManager.default.get('MAINTENANCE_KEY');
3528
+ },
3519
3529
  /**
3520
3530
  * @member {string} Parse.serverURL
3521
3531
  * @static
@@ -3729,7 +3739,7 @@ const PUBLIC_KEY = '*';
3729
3739
  */
3730
3740
  class ParseACL {
3731
3741
  /**
3732
- * @param {(Parse.User | object)} arg1 The user to initialize the ACL for
3742
+ * @param {(Parse.User | object | null)} arg1 The user to initialize the ACL for
3733
3743
  */
3734
3744
  constructor(arg1) {
3735
3745
  (0, _defineProperty2.default)(this, "permissionsById", void 0);
@@ -4689,8 +4699,7 @@ class ParseConfig {
4689
4699
  * @returns {Promise} A promise that is resolved with a newly-created
4690
4700
  * configuration object when the get completes.
4691
4701
  */
4692
- static get() {
4693
- let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
4702
+ static get(options) {
4694
4703
  const controller = _CoreManager.default.getConfigController();
4695
4704
  return controller.get(options);
4696
4705
  }
@@ -4771,8 +4780,7 @@ const DefaultController = {
4771
4780
  return config;
4772
4781
  });
4773
4782
  },
4774
- get() {
4775
- let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
4783
+ get(options) {
4776
4784
  const RESTController = _CoreManager.default.getRESTController();
4777
4785
  return RESTController.request('GET', 'config', {}, options).then(response => {
4778
4786
  if (!response || !response.params) {
@@ -6524,8 +6532,8 @@ class LiveQuery {
6524
6532
  (0, _defineProperty2.default)(this, "emitter", void 0);
6525
6533
  (0, _defineProperty2.default)(this, "on", void 0);
6526
6534
  (0, _defineProperty2.default)(this, "emit", void 0);
6527
- const EventEmitter = _CoreManager.default.getEventEmitter();
6528
- this.emitter = new EventEmitter();
6535
+ const Emitter = _CoreManager.default.getEventEmitter();
6536
+ this.emitter = new Emitter();
6529
6537
  this.on = (eventName, listener) => this.emitter.on(eventName, listener);
6530
6538
  this.emit = function (eventName) {
6531
6539
  for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
@@ -6829,7 +6837,7 @@ class ParseObject {
6829
6837
  id = this._getId();
6830
6838
  }
6831
6839
  return {
6832
- id: id,
6840
+ id,
6833
6841
  className: this.className
6834
6842
  };
6835
6843
  } else {
@@ -7055,6 +7063,9 @@ class ParseObject {
7055
7063
  if (hasOwn(options, 'useMasterKey')) {
7056
7064
  requestOptions.useMasterKey = !!options.useMasterKey;
7057
7065
  }
7066
+ if (hasOwn(options, 'useMaintenanceKey')) {
7067
+ requestOptions.useMaintenanceKey = !!options.useMaintenanceKey;
7068
+ }
7058
7069
  if (hasOwn(options, 'sessionToken') && typeof options.sessionToken === 'string') {
7059
7070
  requestOptions.sessionToken = options.sessionToken;
7060
7071
  }
@@ -7889,6 +7900,7 @@ class ParseObject {
7889
7900
  * @returns {Promise} A promise that is fulfilled when the save
7890
7901
  * completes.
7891
7902
  */
7903
+
7892
7904
  async save(arg1, arg2, arg3) {
7893
7905
  let attrs;
7894
7906
  let options;
@@ -7919,9 +7931,8 @@ class ParseObject {
7919
7931
  const filePromise = unsavedFiles.length ? controller.save(unsavedFiles, saveOptions) : _promise.default.resolve();
7920
7932
  return filePromise.then(() => controller.save(unsavedObjects, saveOptions)).then(savedOjbects => savedOjbects.pop());
7921
7933
  }
7922
- return controller.save(unsaved, saveOptions).then(() => {
7923
- return controller.save(this, saveOptions);
7924
- });
7934
+ await controller.save(unsaved, saveOptions);
7935
+ return controller.save(this, saveOptions);
7925
7936
  }
7926
7937
 
7927
7938
  /**
@@ -8127,8 +8138,7 @@ class ParseObject {
8127
8138
  * @static
8128
8139
  * @returns {Parse.Object[]}
8129
8140
  */
8130
- static fetchAll(list) {
8131
- let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
8141
+ static fetchAll(list, options) {
8132
8142
  const fetchOptions = ParseObject._getRequestOptions(options);
8133
8143
  return _CoreManager.default.getObjectController().fetch(list, true, fetchOptions);
8134
8144
  }
@@ -8307,8 +8317,7 @@ class ParseObject {
8307
8317
  * @returns {Promise} A promise that is fulfilled when the destroyAll
8308
8318
  * completes.
8309
8319
  */
8310
- static destroyAll(list) {
8311
- let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
8320
+ static destroyAll(list, options) {
8312
8321
  const destroyOptions = ParseObject._getRequestOptions(options);
8313
8322
  return _CoreManager.default.getObjectController().destroy(list, destroyOptions);
8314
8323
  }
@@ -8342,8 +8351,7 @@ class ParseObject {
8342
8351
  * @static
8343
8352
  * @returns {Parse.Object[]}
8344
8353
  */
8345
- static saveAll(list) {
8346
- let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
8354
+ static saveAll(list, options) {
8347
8355
  const saveOptions = ParseObject._getRequestOptions(options);
8348
8356
  return _CoreManager.default.getObjectController().save(list, saveOptions);
8349
8357
  }
@@ -10803,11 +10811,11 @@ class ParseQuery {
10803
10811
  * be contained in the provided list of values.
10804
10812
  *
10805
10813
  * @param {string} key The key to check.
10806
- * @param {Array<*>} value The values that will match.
10814
+ * @param {Array<*>} values The values that will match.
10807
10815
  * @returns {Parse.Query} Returns the query, so you can chain this call.
10808
10816
  */
10809
- containedIn(key, value) {
10810
- return this._addCondition(key, '$in', value);
10817
+ containedIn(key, values) {
10818
+ return this._addCondition(key, '$in', values);
10811
10819
  }
10812
10820
 
10813
10821
  /**
@@ -10815,11 +10823,11 @@ class ParseQuery {
10815
10823
  * not be contained in the provided list of values.
10816
10824
  *
10817
10825
  * @param {string} key The key to check.
10818
- * @param {Array<*>} value The values that will not match.
10826
+ * @param {Array<*>} values The values that will not match.
10819
10827
  * @returns {Parse.Query} Returns the query, so you can chain this call.
10820
10828
  */
10821
- notContainedIn(key, value) {
10822
- return this._addCondition(key, '$nin', value);
10829
+ notContainedIn(key, values) {
10830
+ return this._addCondition(key, '$nin', values);
10823
10831
  }
10824
10832
 
10825
10833
  /**
@@ -11029,8 +11037,7 @@ class ParseQuery {
11029
11037
  * @param {boolean} options.diacriticSensitive A boolean flag to enable or disable diacritic sensitive search.
11030
11038
  * @returns {Parse.Query} Returns the query, so you can chain this call.
11031
11039
  */
11032
- fullText(key, value) {
11033
- let options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
11040
+ fullText(key, value, options) {
11034
11041
  options = options || {};
11035
11042
  if (!key) {
11036
11043
  throw new Error('A key is required.');
@@ -11903,7 +11910,7 @@ class ParseRole extends _ParseObject.default {
11903
11910
  * @param {string} name The name of the role.
11904
11911
  * @param {object} options Standard options object with success and error
11905
11912
  * callbacks.
11906
- * @returns {(ParseObject|boolean)} true if the set succeeded.
11913
+ * @returns {Parse.Object} Returns the object, so you can chain this call.
11907
11914
  */
11908
11915
  setName(name, options) {
11909
11916
  this._validateName(name);
@@ -11987,6 +11994,7 @@ var _CoreManager = _interopRequireDefault(_dereq_("./CoreManager"));
11987
11994
  var _ParseObject = _interopRequireDefault(_dereq_("./ParseObject"));
11988
11995
  var _ParseCLP = _interopRequireDefault(_dereq_("./ParseCLP"));
11989
11996
  const FIELD_TYPES = ['String', 'Number', 'Boolean', 'Bytes', 'Date', 'File', 'GeoPoint', 'Polygon', 'Array', 'Object', 'Pointer', 'Relation'];
11997
+
11990
11998
  /**
11991
11999
  * A Parse.Schema object is for handling schema data from Parse.
11992
12000
  * <p>All the schemas methods require MasterKey.
@@ -12161,9 +12169,9 @@ class ParseSchema {
12161
12169
  * </ul>
12162
12170
  * @returns {Parse.Schema} Returns the schema, so you can chain this call.
12163
12171
  */
12164
- addField(name, type) {
12165
- let options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
12172
+ addField(name, type, options) {
12166
12173
  type = type || 'String';
12174
+ options = options || {};
12167
12175
  if (!name) {
12168
12176
  throw new Error('field name may not be null.');
12169
12177
  }
@@ -12345,8 +12353,7 @@ class ParseSchema {
12345
12353
  * @param {object} options See {@link https://parseplatform.org/Parse-SDK-JS/api/master/Parse.Schema.html#addField addField}
12346
12354
  * @returns {Parse.Schema} Returns the schema, so you can chain this call.
12347
12355
  */
12348
- addPointer(name, targetClass) {
12349
- let options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
12356
+ addPointer(name, targetClass, options) {
12350
12357
  if (!name) {
12351
12358
  throw new Error('field name may not be null.');
12352
12359
  }
@@ -12357,10 +12364,10 @@ class ParseSchema {
12357
12364
  type: 'Pointer',
12358
12365
  targetClass
12359
12366
  };
12360
- if (typeof options.required === 'boolean') {
12367
+ if (typeof options?.required === 'boolean') {
12361
12368
  fieldOptions.required = options.required;
12362
12369
  }
12363
- if (options.defaultValue !== undefined) {
12370
+ if (options?.defaultValue !== undefined) {
12364
12371
  fieldOptions.defaultValue = options.defaultValue;
12365
12372
  if (options.defaultValue instanceof _ParseObject.default) {
12366
12373
  fieldOptions.defaultValue = options.defaultValue.toPointer();
@@ -13141,7 +13148,7 @@ class ParseUser extends _ParseObject.default {
13141
13148
  * either from memory or localStorage, if necessary.
13142
13149
  *
13143
13150
  * @static
13144
- * @returns {Parse.Object} The currently logged in Parse.User.
13151
+ * @returns {Parse.User} The currently logged in Parse.User.
13145
13152
  */
13146
13153
  static current() {
13147
13154
  if (!canUseCurrentUser) {
@@ -13208,8 +13215,8 @@ class ParseUser extends _ParseObject.default {
13208
13215
  }
13209
13216
  const user = new this();
13210
13217
  user._finishFetch({
13211
- username: username,
13212
- password: password
13218
+ username,
13219
+ password
13213
13220
  });
13214
13221
  return user.logIn(options);
13215
13222
  }
@@ -13239,8 +13246,8 @@ class ParseUser extends _ParseObject.default {
13239
13246
  }
13240
13247
  const user = new this();
13241
13248
  user._finishFetch({
13242
- username: username,
13243
- password: password,
13249
+ username,
13250
+ password,
13244
13251
  authData
13245
13252
  });
13246
13253
  return user.logIn(options);
@@ -13297,8 +13304,7 @@ class ParseUser extends _ParseObject.default {
13297
13304
  * @static
13298
13305
  * @returns {Promise} A promise that is fulfilled with the user is fetched.
13299
13306
  */
13300
- static me(sessionToken) {
13301
- let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
13307
+ static me(sessionToken, options) {
13302
13308
  const controller = _CoreManager.default.getUserController();
13303
13309
  const meOptions = _ParseObject.default._getRequestOptions(options);
13304
13310
  meOptions.sessionToken = sessionToken;
@@ -13347,8 +13353,7 @@ class ParseUser extends _ParseObject.default {
13347
13353
  * @returns {Promise} A promise that is resolved when the session is
13348
13354
  * destroyed on the server.
13349
13355
  */
13350
- static logOut() {
13351
- let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
13356
+ static logOut(options) {
13352
13357
  const controller = _CoreManager.default.getUserController();
13353
13358
  return controller.logOut(options);
13354
13359
  }
@@ -13709,7 +13714,7 @@ const DefaultController = {
13709
13714
  },
13710
13715
  logOut(options) {
13711
13716
  const RESTController = _CoreManager.default.getRESTController();
13712
- if (options.sessionToken) {
13717
+ if (options?.sessionToken) {
13713
13718
  return RESTController.request('POST', 'logout', {}, options);
13714
13719
  }
13715
13720
  return DefaultController.currentUserAsync().then(currentUser => {
@@ -13737,7 +13742,7 @@ const DefaultController = {
13737
13742
  requestPasswordReset(email, options) {
13738
13743
  const RESTController = _CoreManager.default.getRESTController();
13739
13744
  return RESTController.request('POST', 'requestPasswordReset', {
13740
- email: email
13745
+ email
13741
13746
  }, options);
13742
13747
  },
13743
13748
  async upgradeToRevocableSession(user, options) {
@@ -13781,7 +13786,7 @@ const DefaultController = {
13781
13786
  requestEmailVerification(email, options) {
13782
13787
  const RESTController = _CoreManager.default.getRESTController();
13783
13788
  return RESTController.request('POST', 'verificationEmailRequest', {
13784
- email: email
13789
+ email
13785
13790
  }, options);
13786
13791
  }
13787
13792
  };
@@ -14129,6 +14134,9 @@ const RESTController = {
14129
14134
  throw new Error('Cannot use the Master Key, it has not been provided.');
14130
14135
  }
14131
14136
  }
14137
+ if (options.useMaintenanceKey) {
14138
+ payload._MaintenanceKey = _CoreManager.default.get('MAINTENANCE_KEY');
14139
+ }
14132
14140
  if (_CoreManager.default.get('FORCE_REVOCABLE_SESSION')) {
14133
14141
  payload._RevocableSession = '1';
14134
14142
  }