react-native-appwrite 0.12.0 → 0.14.0

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/esm/sdk.js CHANGED
@@ -78,7 +78,7 @@ class Client {
78
78
  'x-sdk-name': 'React Native',
79
79
  'x-sdk-platform': 'client',
80
80
  'x-sdk-language': 'reactnative',
81
- 'x-sdk-version': '0.12.0',
81
+ 'x-sdk-version': '0.14.0',
82
82
  'X-Appwrite-Response-Format': '1.8.0',
83
83
  };
84
84
  this.realtime = {
@@ -2400,9 +2400,6 @@ class Databases extends Service {
2400
2400
  if (typeof data === 'undefined') {
2401
2401
  throw new AppwriteException('Missing required parameter: "data"');
2402
2402
  }
2403
- data === null || data === void 0 ? true : delete data.$sequence;
2404
- data === null || data === void 0 ? true : delete data.$collectionId;
2405
- data === null || data === void 0 ? true : delete data.$databaseId;
2406
2403
  const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
2407
2404
  const payload = {};
2408
2405
  if (typeof documentId !== 'undefined') {
@@ -2484,9 +2481,6 @@ class Databases extends Service {
2484
2481
  if (typeof data === 'undefined') {
2485
2482
  throw new AppwriteException('Missing required parameter: "data"');
2486
2483
  }
2487
- data === null || data === void 0 ? true : delete data.$sequence;
2488
- data === null || data === void 0 ? true : delete data.$collectionId;
2489
- data === null || data === void 0 ? true : delete data.$databaseId;
2490
2484
  const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents/{documentId}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{documentId}', documentId);
2491
2485
  const payload = {};
2492
2486
  if (typeof data !== 'undefined') {
@@ -2528,9 +2522,6 @@ class Databases extends Service {
2528
2522
  if (typeof documentId === 'undefined') {
2529
2523
  throw new AppwriteException('Missing required parameter: "documentId"');
2530
2524
  }
2531
- data === null || data === void 0 ? true : delete data.$sequence;
2532
- data === null || data === void 0 ? true : delete data.$collectionId;
2533
- data === null || data === void 0 ? true : delete data.$databaseId;
2534
2525
  const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents/{documentId}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{documentId}', documentId);
2535
2526
  const payload = {};
2536
2527
  if (typeof data !== 'undefined') {
@@ -4238,6 +4229,7 @@ Query.select = (attributes) => new Query("select", undefined, attributes).toStri
4238
4229
  Query.search = (attribute, value) => new Query("search", attribute, value).toString();
4239
4230
  Query.orderDesc = (attribute) => new Query("orderDesc", attribute).toString();
4240
4231
  Query.orderAsc = (attribute) => new Query("orderAsc", attribute).toString();
4232
+ Query.orderRandom = () => new Query("orderRandom").toString();
4241
4233
  Query.cursorAfter = (documentId) => new Query("cursorAfter", undefined, documentId).toString();
4242
4234
  Query.cursorBefore = (documentId) => new Query("cursorBefore", undefined, documentId).toString();
4243
4235
  Query.limit = (limit) => new Query("limit", undefined, limit).toString();
@@ -4306,6 +4298,14 @@ Query.createdBefore = (value) => new Query("createdBefore", undefined, value).to
4306
4298
  * @returns {string}
4307
4299
  */
4308
4300
  Query.createdAfter = (value) => new Query("createdAfter", undefined, value).toString();
4301
+ /**
4302
+ * Filter resources where document was created between dates.
4303
+ *
4304
+ * @param {string} start
4305
+ * @param {string} end
4306
+ * @returns {string}
4307
+ */
4308
+ Query.createdBetween = (start, end) => new Query("createdBetween", undefined, [start, end]).toString();
4309
4309
  /**
4310
4310
  * Filter resources where document was updated before date.
4311
4311
  *
@@ -4320,8 +4320,120 @@ Query.updatedBefore = (value) => new Query("updatedBefore", undefined, value).to
4320
4320
  * @returns {string}
4321
4321
  */
4322
4322
  Query.updatedAfter = (value) => new Query("updatedAfter", undefined, value).toString();
4323
+ /**
4324
+ * Filter resources where document was updated between dates.
4325
+ *
4326
+ * @param {string} start
4327
+ * @param {string} end
4328
+ * @returns {string}
4329
+ */
4330
+ Query.updatedBetween = (start, end) => new Query("updatedBetween", undefined, [start, end]).toString();
4323
4331
  Query.or = (queries) => new Query("or", undefined, queries.map((query) => JSON.parse(query))).toString();
4324
4332
  Query.and = (queries) => new Query("and", undefined, queries.map((query) => JSON.parse(query))).toString();
4333
+ /**
4334
+ * Filter resources where attribute is at a specific distance from the given coordinates.
4335
+ *
4336
+ * @param {string} attribute
4337
+ * @param {any[]} values
4338
+ * @param {number} distance
4339
+ * @param {boolean} meters
4340
+ * @returns {string}
4341
+ */
4342
+ Query.distanceEqual = (attribute, values, distance, meters = true) => new Query("distanceEqual", attribute, [[values, distance, meters]]).toString();
4343
+ /**
4344
+ * Filter resources where attribute is not at a specific distance from the given coordinates.
4345
+ *
4346
+ * @param {string} attribute
4347
+ * @param {any[]} values
4348
+ * @param {number} distance
4349
+ * @param {boolean} meters
4350
+ * @returns {string}
4351
+ */
4352
+ Query.distanceNotEqual = (attribute, values, distance, meters = true) => new Query("distanceNotEqual", attribute, [[values, distance, meters]]).toString();
4353
+ /**
4354
+ * Filter resources where attribute is at a distance greater than the specified value from the given coordinates.
4355
+ *
4356
+ * @param {string} attribute
4357
+ * @param {any[]} values
4358
+ * @param {number} distance
4359
+ * @param {boolean} meters
4360
+ * @returns {string}
4361
+ */
4362
+ Query.distanceGreaterThan = (attribute, values, distance, meters = true) => new Query("distanceGreaterThan", attribute, [[values, distance, meters]]).toString();
4363
+ /**
4364
+ * Filter resources where attribute is at a distance less than the specified value from the given coordinates.
4365
+ *
4366
+ * @param {string} attribute
4367
+ * @param {any[]} values
4368
+ * @param {number} distance
4369
+ * @param {boolean} meters
4370
+ * @returns {string}
4371
+ */
4372
+ Query.distanceLessThan = (attribute, values, distance, meters = true) => new Query("distanceLessThan", attribute, [[values, distance, meters]]).toString();
4373
+ /**
4374
+ * Filter resources where attribute intersects with the given geometry.
4375
+ *
4376
+ * @param {string} attribute
4377
+ * @param {any[]} values
4378
+ * @returns {string}
4379
+ */
4380
+ Query.intersects = (attribute, values) => new Query("intersects", attribute, [values]).toString();
4381
+ /**
4382
+ * Filter resources where attribute does not intersect with the given geometry.
4383
+ *
4384
+ * @param {string} attribute
4385
+ * @param {any[]} values
4386
+ * @returns {string}
4387
+ */
4388
+ Query.notIntersects = (attribute, values) => new Query("notIntersects", attribute, [values]).toString();
4389
+ /**
4390
+ * Filter resources where attribute crosses the given geometry.
4391
+ *
4392
+ * @param {string} attribute
4393
+ * @param {any[]} values
4394
+ * @returns {string}
4395
+ */
4396
+ Query.crosses = (attribute, values) => new Query("crosses", attribute, [values]).toString();
4397
+ /**
4398
+ * Filter resources where attribute does not cross the given geometry.
4399
+ *
4400
+ * @param {string} attribute
4401
+ * @param {any[]} values
4402
+ * @returns {string}
4403
+ */
4404
+ Query.notCrosses = (attribute, values) => new Query("notCrosses", attribute, [values]).toString();
4405
+ /**
4406
+ * Filter resources where attribute overlaps with the given geometry.
4407
+ *
4408
+ * @param {string} attribute
4409
+ * @param {any[]} values
4410
+ * @returns {string}
4411
+ */
4412
+ Query.overlaps = (attribute, values) => new Query("overlaps", attribute, [values]).toString();
4413
+ /**
4414
+ * Filter resources where attribute does not overlap with the given geometry.
4415
+ *
4416
+ * @param {string} attribute
4417
+ * @param {any[]} values
4418
+ * @returns {string}
4419
+ */
4420
+ Query.notOverlaps = (attribute, values) => new Query("notOverlaps", attribute, [values]).toString();
4421
+ /**
4422
+ * Filter resources where attribute touches the given geometry.
4423
+ *
4424
+ * @param {string} attribute
4425
+ * @param {any[]} values
4426
+ * @returns {string}
4427
+ */
4428
+ Query.touches = (attribute, values) => new Query("touches", attribute, [values]).toString();
4429
+ /**
4430
+ * Filter resources where attribute does not touch the given geometry.
4431
+ *
4432
+ * @param {string} attribute
4433
+ * @param {any[]} values
4434
+ * @returns {string}
4435
+ */
4436
+ Query.notTouches = (attribute, values) => new Query("notTouches", attribute, [values]).toString();
4325
4437
 
4326
4438
  class Permission {
4327
4439
  }
@@ -4549,7 +4661,7 @@ var CreditCard;
4549
4661
  CreditCard["Mastercard"] = "mastercard";
4550
4662
  CreditCard["Naranja"] = "naranja";
4551
4663
  CreditCard["TarjetaShopping"] = "targeta-shopping";
4552
- CreditCard["UnionChinaPay"] = "union-china-pay";
4664
+ CreditCard["UnionPay"] = "unionpay";
4553
4665
  CreditCard["Visa"] = "visa";
4554
4666
  CreditCard["MIR"] = "mir";
4555
4667
  CreditCard["Maestro"] = "maestro";
@@ -4763,6 +4875,7 @@ var ExecutionMethod;
4763
4875
  ExecutionMethod["PATCH"] = "PATCH";
4764
4876
  ExecutionMethod["DELETE"] = "DELETE";
4765
4877
  ExecutionMethod["OPTIONS"] = "OPTIONS";
4878
+ ExecutionMethod["HEAD"] = "HEAD";
4766
4879
  })(ExecutionMethod || (ExecutionMethod = {}));
4767
4880
 
4768
4881
  var ImageGravity;