parse 4.2.0-alpha.5 → 4.2.0-alpha.6

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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Parse JavaScript SDK v4.2.0-alpha.5
2
+ * Parse JavaScript SDK v4.2.0-alpha.6
3
3
  *
4
4
  * The source tree of this library can be found at
5
5
  * https://github.com/ParsePlatform/Parse-SDK-JS
@@ -538,7 +538,7 @@ var config /*: Config & { [key: string]: mixed }*/ = {
538
538
  SERVER_AUTH_TOKEN: null,
539
539
  LIVEQUERY_SERVER_URL: null,
540
540
  ENCRYPTED_KEY: null,
541
- VERSION: 'js' + "4.2.0-alpha.5",
541
+ VERSION: 'js' + "4.2.0-alpha.6",
542
542
  APPLICATION_ID: null,
543
543
  JAVASCRIPT_KEY: null,
544
544
  MASTER_KEY: null,
@@ -14291,7 +14291,7 @@ var _ParseCLP = _interopRequireDefault(_dereq_("./ParseCLP"));
14291
14291
  * @flow
14292
14292
  */
14293
14293
  /*:: import type { PermissionsMap } from './ParseCLP';*/
14294
- var FIELD_TYPES = ['String', 'Number', 'Boolean', 'Date', 'File', 'GeoPoint', 'Polygon', 'Array', 'Object', 'Pointer', 'Relation'];
14294
+ var FIELD_TYPES = ['String', 'Number', 'Boolean', 'Bytes', 'Date', 'File', 'GeoPoint', 'Polygon', 'Array', 'Object', 'Pointer', 'Relation'];
14295
14295
  /*:: type FieldOptions = {
14296
14296
  required: boolean,
14297
14297
  defaultValue: mixed,
@@ -14510,6 +14510,14 @@ var ParseSchema = /*#__PURE__*/function () {
14510
14510
  };
14511
14511
  }
14512
14512
  }
14513
+ if (type === 'Bytes') {
14514
+ if (options && options.defaultValue) {
14515
+ fieldOptions.defaultValue = {
14516
+ __type: 'Bytes',
14517
+ base64: options.defaultValue
14518
+ };
14519
+ }
14520
+ }
14513
14521
  this._fields[name] = fieldOptions;
14514
14522
  return this;
14515
14523
  }
@@ -14577,6 +14585,19 @@ var ParseSchema = /*#__PURE__*/function () {
14577
14585
  return this.addField(name, 'Boolean', options);
14578
14586
  }
14579
14587
 
14588
+ /**
14589
+ * Adding Bytes Field
14590
+ *
14591
+ * @param {string} name Name of the field that will be created on Parse
14592
+ * @param {object} options See {@link https://parseplatform.org/Parse-SDK-JS/api/master/Parse.Schema.html#addField addField}
14593
+ * @returns {Parse.Schema} Returns the schema, so you can chain this call.
14594
+ */
14595
+ }, {
14596
+ key: "addBytes",
14597
+ value: function (name /*: string*/, options /*: FieldOptions*/) {
14598
+ return this.addField(name, 'Bytes', options);
14599
+ }
14600
+
14580
14601
  /**
14581
14602
  * Adding Date Field
14582
14603
  *