react-native-appwrite 0.12.0 → 0.13.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/cjs/sdk.js CHANGED
@@ -100,7 +100,7 @@ class Client {
100
100
  'x-sdk-name': 'React Native',
101
101
  'x-sdk-platform': 'client',
102
102
  'x-sdk-language': 'reactnative',
103
- 'x-sdk-version': '0.12.0',
103
+ 'x-sdk-version': '0.13.0',
104
104
  'X-Appwrite-Response-Format': '1.8.0',
105
105
  };
106
106
  this.realtime = {
@@ -2422,9 +2422,6 @@ class Databases extends Service {
2422
2422
  if (typeof data === 'undefined') {
2423
2423
  throw new AppwriteException('Missing required parameter: "data"');
2424
2424
  }
2425
- data === null || data === void 0 ? true : delete data.$sequence;
2426
- data === null || data === void 0 ? true : delete data.$collectionId;
2427
- data === null || data === void 0 ? true : delete data.$databaseId;
2428
2425
  const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
2429
2426
  const payload = {};
2430
2427
  if (typeof documentId !== 'undefined') {
@@ -2506,9 +2503,6 @@ class Databases extends Service {
2506
2503
  if (typeof data === 'undefined') {
2507
2504
  throw new AppwriteException('Missing required parameter: "data"');
2508
2505
  }
2509
- data === null || data === void 0 ? true : delete data.$sequence;
2510
- data === null || data === void 0 ? true : delete data.$collectionId;
2511
- data === null || data === void 0 ? true : delete data.$databaseId;
2512
2506
  const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents/{documentId}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{documentId}', documentId);
2513
2507
  const payload = {};
2514
2508
  if (typeof data !== 'undefined') {
@@ -2550,9 +2544,6 @@ class Databases extends Service {
2550
2544
  if (typeof documentId === 'undefined') {
2551
2545
  throw new AppwriteException('Missing required parameter: "documentId"');
2552
2546
  }
2553
- data === null || data === void 0 ? true : delete data.$sequence;
2554
- data === null || data === void 0 ? true : delete data.$collectionId;
2555
- data === null || data === void 0 ? true : delete data.$databaseId;
2556
2547
  const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents/{documentId}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{documentId}', documentId);
2557
2548
  const payload = {};
2558
2549
  if (typeof data !== 'undefined') {
@@ -4328,6 +4319,14 @@ Query.createdBefore = (value) => new Query("createdBefore", undefined, value).to
4328
4319
  * @returns {string}
4329
4320
  */
4330
4321
  Query.createdAfter = (value) => new Query("createdAfter", undefined, value).toString();
4322
+ /**
4323
+ * Filter resources where document was created between dates.
4324
+ *
4325
+ * @param {string} start
4326
+ * @param {string} end
4327
+ * @returns {string}
4328
+ */
4329
+ Query.createdBetween = (start, end) => new Query("createdBetween", undefined, [start, end]).toString();
4331
4330
  /**
4332
4331
  * Filter resources where document was updated before date.
4333
4332
  *
@@ -4342,8 +4341,120 @@ Query.updatedBefore = (value) => new Query("updatedBefore", undefined, value).to
4342
4341
  * @returns {string}
4343
4342
  */
4344
4343
  Query.updatedAfter = (value) => new Query("updatedAfter", undefined, value).toString();
4344
+ /**
4345
+ * Filter resources where document was updated between dates.
4346
+ *
4347
+ * @param {string} start
4348
+ * @param {string} end
4349
+ * @returns {string}
4350
+ */
4351
+ Query.updatedBetween = (start, end) => new Query("updatedBetween", undefined, [start, end]).toString();
4345
4352
  Query.or = (queries) => new Query("or", undefined, queries.map((query) => JSON.parse(query))).toString();
4346
4353
  Query.and = (queries) => new Query("and", undefined, queries.map((query) => JSON.parse(query))).toString();
4354
+ /**
4355
+ * Filter resources where attribute is at a specific distance from the given coordinates.
4356
+ *
4357
+ * @param {string} attribute
4358
+ * @param {any[]} values
4359
+ * @param {number} distance
4360
+ * @param {boolean} meters
4361
+ * @returns {string}
4362
+ */
4363
+ Query.distanceEqual = (attribute, values, distance, meters = true) => new Query("distanceEqual", attribute, [[values, distance, meters]]).toString();
4364
+ /**
4365
+ * Filter resources where attribute is not at a specific distance from the given coordinates.
4366
+ *
4367
+ * @param {string} attribute
4368
+ * @param {any[]} values
4369
+ * @param {number} distance
4370
+ * @param {boolean} meters
4371
+ * @returns {string}
4372
+ */
4373
+ Query.distanceNotEqual = (attribute, values, distance, meters = true) => new Query("distanceNotEqual", attribute, [[values, distance, meters]]).toString();
4374
+ /**
4375
+ * Filter resources where attribute is at a distance greater than the specified value from the given coordinates.
4376
+ *
4377
+ * @param {string} attribute
4378
+ * @param {any[]} values
4379
+ * @param {number} distance
4380
+ * @param {boolean} meters
4381
+ * @returns {string}
4382
+ */
4383
+ Query.distanceGreaterThan = (attribute, values, distance, meters = true) => new Query("distanceGreaterThan", attribute, [[values, distance, meters]]).toString();
4384
+ /**
4385
+ * Filter resources where attribute is at a distance less than the specified value from the given coordinates.
4386
+ *
4387
+ * @param {string} attribute
4388
+ * @param {any[]} values
4389
+ * @param {number} distance
4390
+ * @param {boolean} meters
4391
+ * @returns {string}
4392
+ */
4393
+ Query.distanceLessThan = (attribute, values, distance, meters = true) => new Query("distanceLessThan", attribute, [[values, distance, meters]]).toString();
4394
+ /**
4395
+ * Filter resources where attribute intersects with the given geometry.
4396
+ *
4397
+ * @param {string} attribute
4398
+ * @param {any[]} values
4399
+ * @returns {string}
4400
+ */
4401
+ Query.intersects = (attribute, values) => new Query("intersects", attribute, [values]).toString();
4402
+ /**
4403
+ * Filter resources where attribute does not intersect with the given geometry.
4404
+ *
4405
+ * @param {string} attribute
4406
+ * @param {any[]} values
4407
+ * @returns {string}
4408
+ */
4409
+ Query.notIntersects = (attribute, values) => new Query("notIntersects", attribute, [values]).toString();
4410
+ /**
4411
+ * Filter resources where attribute crosses the given geometry.
4412
+ *
4413
+ * @param {string} attribute
4414
+ * @param {any[]} values
4415
+ * @returns {string}
4416
+ */
4417
+ Query.crosses = (attribute, values) => new Query("crosses", attribute, [values]).toString();
4418
+ /**
4419
+ * Filter resources where attribute does not cross the given geometry.
4420
+ *
4421
+ * @param {string} attribute
4422
+ * @param {any[]} values
4423
+ * @returns {string}
4424
+ */
4425
+ Query.notCrosses = (attribute, values) => new Query("notCrosses", attribute, [values]).toString();
4426
+ /**
4427
+ * Filter resources where attribute overlaps with the given geometry.
4428
+ *
4429
+ * @param {string} attribute
4430
+ * @param {any[]} values
4431
+ * @returns {string}
4432
+ */
4433
+ Query.overlaps = (attribute, values) => new Query("overlaps", attribute, [values]).toString();
4434
+ /**
4435
+ * Filter resources where attribute does not overlap with the given geometry.
4436
+ *
4437
+ * @param {string} attribute
4438
+ * @param {any[]} values
4439
+ * @returns {string}
4440
+ */
4441
+ Query.notOverlaps = (attribute, values) => new Query("notOverlaps", attribute, [values]).toString();
4442
+ /**
4443
+ * Filter resources where attribute touches the given geometry.
4444
+ *
4445
+ * @param {string} attribute
4446
+ * @param {any[]} values
4447
+ * @returns {string}
4448
+ */
4449
+ Query.touches = (attribute, values) => new Query("touches", attribute, [values]).toString();
4450
+ /**
4451
+ * Filter resources where attribute does not touch the given geometry.
4452
+ *
4453
+ * @param {string} attribute
4454
+ * @param {any[]} values
4455
+ * @returns {string}
4456
+ */
4457
+ Query.notTouches = (attribute, values) => new Query("notTouches", attribute, [values]).toString();
4347
4458
 
4348
4459
  class Permission {
4349
4460
  }
@@ -4571,7 +4682,7 @@ exports.CreditCard = void 0;
4571
4682
  CreditCard["Mastercard"] = "mastercard";
4572
4683
  CreditCard["Naranja"] = "naranja";
4573
4684
  CreditCard["TarjetaShopping"] = "targeta-shopping";
4574
- CreditCard["UnionChinaPay"] = "union-china-pay";
4685
+ CreditCard["UnionPay"] = "unionpay";
4575
4686
  CreditCard["Visa"] = "visa";
4576
4687
  CreditCard["MIR"] = "mir";
4577
4688
  CreditCard["Maestro"] = "maestro";
@@ -4785,6 +4896,7 @@ exports.ExecutionMethod = void 0;
4785
4896
  ExecutionMethod["PATCH"] = "PATCH";
4786
4897
  ExecutionMethod["DELETE"] = "DELETE";
4787
4898
  ExecutionMethod["OPTIONS"] = "OPTIONS";
4899
+ ExecutionMethod["HEAD"] = "HEAD";
4788
4900
  })(exports.ExecutionMethod || (exports.ExecutionMethod = {}));
4789
4901
 
4790
4902
  exports.ImageGravity = void 0;