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.
package/dist/parse.js CHANGED
@@ -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,
@@ -14333,7 +14333,7 @@ var _ParseCLP = _interopRequireDefault(_dereq_("./ParseCLP"));
14333
14333
  * @flow
14334
14334
  */
14335
14335
  /*:: import type { PermissionsMap } from './ParseCLP';*/
14336
- var FIELD_TYPES = ['String', 'Number', 'Boolean', 'Date', 'File', 'GeoPoint', 'Polygon', 'Array', 'Object', 'Pointer', 'Relation'];
14336
+ var FIELD_TYPES = ['String', 'Number', 'Boolean', 'Bytes', 'Date', 'File', 'GeoPoint', 'Polygon', 'Array', 'Object', 'Pointer', 'Relation'];
14337
14337
  /*:: type FieldOptions = {
14338
14338
  required: boolean,
14339
14339
  defaultValue: mixed,
@@ -14552,6 +14552,14 @@ var ParseSchema = /*#__PURE__*/function () {
14552
14552
  };
14553
14553
  }
14554
14554
  }
14555
+ if (type === 'Bytes') {
14556
+ if (options && options.defaultValue) {
14557
+ fieldOptions.defaultValue = {
14558
+ __type: 'Bytes',
14559
+ base64: options.defaultValue
14560
+ };
14561
+ }
14562
+ }
14555
14563
  this._fields[name] = fieldOptions;
14556
14564
  return this;
14557
14565
  }
@@ -14619,6 +14627,19 @@ var ParseSchema = /*#__PURE__*/function () {
14619
14627
  return this.addField(name, 'Boolean', options);
14620
14628
  }
14621
14629
 
14630
+ /**
14631
+ * Adding Bytes Field
14632
+ *
14633
+ * @param {string} name Name of the field that will be created on Parse
14634
+ * @param {object} options See {@link https://parseplatform.org/Parse-SDK-JS/api/master/Parse.Schema.html#addField addField}
14635
+ * @returns {Parse.Schema} Returns the schema, so you can chain this call.
14636
+ */
14637
+ }, {
14638
+ key: "addBytes",
14639
+ value: function (name /*: string*/, options /*: FieldOptions*/) {
14640
+ return this.addField(name, 'Bytes', options);
14641
+ }
14642
+
14622
14643
  /**
14623
14644
  * Adding Date Field
14624
14645
  *