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/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.14.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') {
@@ -4260,6 +4251,7 @@ Query.select = (attributes) => new Query("select", undefined, attributes).toStri
4260
4251
  Query.search = (attribute, value) => new Query("search", attribute, value).toString();
4261
4252
  Query.orderDesc = (attribute) => new Query("orderDesc", attribute).toString();
4262
4253
  Query.orderAsc = (attribute) => new Query("orderAsc", attribute).toString();
4254
+ Query.orderRandom = () => new Query("orderRandom").toString();
4263
4255
  Query.cursorAfter = (documentId) => new Query("cursorAfter", undefined, documentId).toString();
4264
4256
  Query.cursorBefore = (documentId) => new Query("cursorBefore", undefined, documentId).toString();
4265
4257
  Query.limit = (limit) => new Query("limit", undefined, limit).toString();
@@ -4328,6 +4320,14 @@ Query.createdBefore = (value) => new Query("createdBefore", undefined, value).to
4328
4320
  * @returns {string}
4329
4321
  */
4330
4322
  Query.createdAfter = (value) => new Query("createdAfter", undefined, value).toString();
4323
+ /**
4324
+ * Filter resources where document was created between dates.
4325
+ *
4326
+ * @param {string} start
4327
+ * @param {string} end
4328
+ * @returns {string}
4329
+ */
4330
+ Query.createdBetween = (start, end) => new Query("createdBetween", undefined, [start, end]).toString();
4331
4331
  /**
4332
4332
  * Filter resources where document was updated before date.
4333
4333
  *
@@ -4342,8 +4342,120 @@ Query.updatedBefore = (value) => new Query("updatedBefore", undefined, value).to
4342
4342
  * @returns {string}
4343
4343
  */
4344
4344
  Query.updatedAfter = (value) => new Query("updatedAfter", undefined, value).toString();
4345
+ /**
4346
+ * Filter resources where document was updated between dates.
4347
+ *
4348
+ * @param {string} start
4349
+ * @param {string} end
4350
+ * @returns {string}
4351
+ */
4352
+ Query.updatedBetween = (start, end) => new Query("updatedBetween", undefined, [start, end]).toString();
4345
4353
  Query.or = (queries) => new Query("or", undefined, queries.map((query) => JSON.parse(query))).toString();
4346
4354
  Query.and = (queries) => new Query("and", undefined, queries.map((query) => JSON.parse(query))).toString();
4355
+ /**
4356
+ * Filter resources where attribute is at a specific distance from the given coordinates.
4357
+ *
4358
+ * @param {string} attribute
4359
+ * @param {any[]} values
4360
+ * @param {number} distance
4361
+ * @param {boolean} meters
4362
+ * @returns {string}
4363
+ */
4364
+ Query.distanceEqual = (attribute, values, distance, meters = true) => new Query("distanceEqual", attribute, [[values, distance, meters]]).toString();
4365
+ /**
4366
+ * Filter resources where attribute is not at a specific distance from the given coordinates.
4367
+ *
4368
+ * @param {string} attribute
4369
+ * @param {any[]} values
4370
+ * @param {number} distance
4371
+ * @param {boolean} meters
4372
+ * @returns {string}
4373
+ */
4374
+ Query.distanceNotEqual = (attribute, values, distance, meters = true) => new Query("distanceNotEqual", attribute, [[values, distance, meters]]).toString();
4375
+ /**
4376
+ * Filter resources where attribute is at a distance greater than the specified value from the given coordinates.
4377
+ *
4378
+ * @param {string} attribute
4379
+ * @param {any[]} values
4380
+ * @param {number} distance
4381
+ * @param {boolean} meters
4382
+ * @returns {string}
4383
+ */
4384
+ Query.distanceGreaterThan = (attribute, values, distance, meters = true) => new Query("distanceGreaterThan", attribute, [[values, distance, meters]]).toString();
4385
+ /**
4386
+ * Filter resources where attribute is at a distance less than the specified value from the given coordinates.
4387
+ *
4388
+ * @param {string} attribute
4389
+ * @param {any[]} values
4390
+ * @param {number} distance
4391
+ * @param {boolean} meters
4392
+ * @returns {string}
4393
+ */
4394
+ Query.distanceLessThan = (attribute, values, distance, meters = true) => new Query("distanceLessThan", attribute, [[values, distance, meters]]).toString();
4395
+ /**
4396
+ * Filter resources where attribute intersects with the given geometry.
4397
+ *
4398
+ * @param {string} attribute
4399
+ * @param {any[]} values
4400
+ * @returns {string}
4401
+ */
4402
+ Query.intersects = (attribute, values) => new Query("intersects", attribute, [values]).toString();
4403
+ /**
4404
+ * Filter resources where attribute does not intersect with the given geometry.
4405
+ *
4406
+ * @param {string} attribute
4407
+ * @param {any[]} values
4408
+ * @returns {string}
4409
+ */
4410
+ Query.notIntersects = (attribute, values) => new Query("notIntersects", attribute, [values]).toString();
4411
+ /**
4412
+ * Filter resources where attribute crosses the given geometry.
4413
+ *
4414
+ * @param {string} attribute
4415
+ * @param {any[]} values
4416
+ * @returns {string}
4417
+ */
4418
+ Query.crosses = (attribute, values) => new Query("crosses", attribute, [values]).toString();
4419
+ /**
4420
+ * Filter resources where attribute does not cross the given geometry.
4421
+ *
4422
+ * @param {string} attribute
4423
+ * @param {any[]} values
4424
+ * @returns {string}
4425
+ */
4426
+ Query.notCrosses = (attribute, values) => new Query("notCrosses", attribute, [values]).toString();
4427
+ /**
4428
+ * Filter resources where attribute overlaps with the given geometry.
4429
+ *
4430
+ * @param {string} attribute
4431
+ * @param {any[]} values
4432
+ * @returns {string}
4433
+ */
4434
+ Query.overlaps = (attribute, values) => new Query("overlaps", attribute, [values]).toString();
4435
+ /**
4436
+ * Filter resources where attribute does not overlap with the given geometry.
4437
+ *
4438
+ * @param {string} attribute
4439
+ * @param {any[]} values
4440
+ * @returns {string}
4441
+ */
4442
+ Query.notOverlaps = (attribute, values) => new Query("notOverlaps", attribute, [values]).toString();
4443
+ /**
4444
+ * Filter resources where attribute touches the given geometry.
4445
+ *
4446
+ * @param {string} attribute
4447
+ * @param {any[]} values
4448
+ * @returns {string}
4449
+ */
4450
+ Query.touches = (attribute, values) => new Query("touches", attribute, [values]).toString();
4451
+ /**
4452
+ * Filter resources where attribute does not touch the given geometry.
4453
+ *
4454
+ * @param {string} attribute
4455
+ * @param {any[]} values
4456
+ * @returns {string}
4457
+ */
4458
+ Query.notTouches = (attribute, values) => new Query("notTouches", attribute, [values]).toString();
4347
4459
 
4348
4460
  class Permission {
4349
4461
  }
@@ -4571,7 +4683,7 @@ exports.CreditCard = void 0;
4571
4683
  CreditCard["Mastercard"] = "mastercard";
4572
4684
  CreditCard["Naranja"] = "naranja";
4573
4685
  CreditCard["TarjetaShopping"] = "targeta-shopping";
4574
- CreditCard["UnionChinaPay"] = "union-china-pay";
4686
+ CreditCard["UnionPay"] = "unionpay";
4575
4687
  CreditCard["Visa"] = "visa";
4576
4688
  CreditCard["MIR"] = "mir";
4577
4689
  CreditCard["Maestro"] = "maestro";
@@ -4785,6 +4897,7 @@ exports.ExecutionMethod = void 0;
4785
4897
  ExecutionMethod["PATCH"] = "PATCH";
4786
4898
  ExecutionMethod["DELETE"] = "DELETE";
4787
4899
  ExecutionMethod["OPTIONS"] = "OPTIONS";
4900
+ ExecutionMethod["HEAD"] = "HEAD";
4788
4901
  })(exports.ExecutionMethod || (exports.ExecutionMethod = {}));
4789
4902
 
4790
4903
  exports.ImageGravity = void 0;