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 +123 -11
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +123 -11
- package/dist/esm/sdk.js.map +1 -1
- package/docs/examples/account/update-prefs.md +5 -1
- package/docs/examples/databases/create-document.md +7 -1
- package/docs/examples/databases/decrement-document-attribute.md +2 -2
- package/docs/examples/databases/increment-document-attribute.md +2 -2
- package/docs/examples/storage/create-file.md +1 -1
- package/docs/examples/tablesdb/create-row.md +7 -1
- package/docs/examples/tablesdb/decrement-row-column.md +2 -2
- package/docs/examples/tablesdb/increment-row-column.md +2 -2
- package/package.json +1 -1
- package/src/client.ts +1 -1
- package/src/enums/credit-card.ts +1 -1
- package/src/enums/execution-method.ts +1 -0
- package/src/query.ts +153 -5
- package/src/services/account.ts +2 -2
- package/src/services/avatars.ts +2 -2
- package/src/services/databases.ts +0 -9
- package/src/services/functions.ts +2 -2
- package/types/enums/credit-card.d.ts +1 -1
- package/types/enums/execution-method.d.ts +2 -1
- package/types/query.d.ts +125 -5
- package/types/services/account.d.ts +2 -2
- package/types/services/avatars.d.ts +2 -2
- package/types/services/functions.d.ts +2 -2
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.
|
|
81
|
+
'x-sdk-version': '0.13.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') {
|
|
@@ -4306,6 +4297,14 @@ Query.createdBefore = (value) => new Query("createdBefore", undefined, value).to
|
|
|
4306
4297
|
* @returns {string}
|
|
4307
4298
|
*/
|
|
4308
4299
|
Query.createdAfter = (value) => new Query("createdAfter", undefined, value).toString();
|
|
4300
|
+
/**
|
|
4301
|
+
* Filter resources where document was created between dates.
|
|
4302
|
+
*
|
|
4303
|
+
* @param {string} start
|
|
4304
|
+
* @param {string} end
|
|
4305
|
+
* @returns {string}
|
|
4306
|
+
*/
|
|
4307
|
+
Query.createdBetween = (start, end) => new Query("createdBetween", undefined, [start, end]).toString();
|
|
4309
4308
|
/**
|
|
4310
4309
|
* Filter resources where document was updated before date.
|
|
4311
4310
|
*
|
|
@@ -4320,8 +4319,120 @@ Query.updatedBefore = (value) => new Query("updatedBefore", undefined, value).to
|
|
|
4320
4319
|
* @returns {string}
|
|
4321
4320
|
*/
|
|
4322
4321
|
Query.updatedAfter = (value) => new Query("updatedAfter", undefined, value).toString();
|
|
4322
|
+
/**
|
|
4323
|
+
* Filter resources where document was updated between dates.
|
|
4324
|
+
*
|
|
4325
|
+
* @param {string} start
|
|
4326
|
+
* @param {string} end
|
|
4327
|
+
* @returns {string}
|
|
4328
|
+
*/
|
|
4329
|
+
Query.updatedBetween = (start, end) => new Query("updatedBetween", undefined, [start, end]).toString();
|
|
4323
4330
|
Query.or = (queries) => new Query("or", undefined, queries.map((query) => JSON.parse(query))).toString();
|
|
4324
4331
|
Query.and = (queries) => new Query("and", undefined, queries.map((query) => JSON.parse(query))).toString();
|
|
4332
|
+
/**
|
|
4333
|
+
* Filter resources where attribute is at a specific distance from the given coordinates.
|
|
4334
|
+
*
|
|
4335
|
+
* @param {string} attribute
|
|
4336
|
+
* @param {any[]} values
|
|
4337
|
+
* @param {number} distance
|
|
4338
|
+
* @param {boolean} meters
|
|
4339
|
+
* @returns {string}
|
|
4340
|
+
*/
|
|
4341
|
+
Query.distanceEqual = (attribute, values, distance, meters = true) => new Query("distanceEqual", attribute, [[values, distance, meters]]).toString();
|
|
4342
|
+
/**
|
|
4343
|
+
* Filter resources where attribute is not at a specific distance from the given coordinates.
|
|
4344
|
+
*
|
|
4345
|
+
* @param {string} attribute
|
|
4346
|
+
* @param {any[]} values
|
|
4347
|
+
* @param {number} distance
|
|
4348
|
+
* @param {boolean} meters
|
|
4349
|
+
* @returns {string}
|
|
4350
|
+
*/
|
|
4351
|
+
Query.distanceNotEqual = (attribute, values, distance, meters = true) => new Query("distanceNotEqual", attribute, [[values, distance, meters]]).toString();
|
|
4352
|
+
/**
|
|
4353
|
+
* Filter resources where attribute is at a distance greater than the specified value from the given coordinates.
|
|
4354
|
+
*
|
|
4355
|
+
* @param {string} attribute
|
|
4356
|
+
* @param {any[]} values
|
|
4357
|
+
* @param {number} distance
|
|
4358
|
+
* @param {boolean} meters
|
|
4359
|
+
* @returns {string}
|
|
4360
|
+
*/
|
|
4361
|
+
Query.distanceGreaterThan = (attribute, values, distance, meters = true) => new Query("distanceGreaterThan", attribute, [[values, distance, meters]]).toString();
|
|
4362
|
+
/**
|
|
4363
|
+
* Filter resources where attribute is at a distance less than the specified value from the given coordinates.
|
|
4364
|
+
*
|
|
4365
|
+
* @param {string} attribute
|
|
4366
|
+
* @param {any[]} values
|
|
4367
|
+
* @param {number} distance
|
|
4368
|
+
* @param {boolean} meters
|
|
4369
|
+
* @returns {string}
|
|
4370
|
+
*/
|
|
4371
|
+
Query.distanceLessThan = (attribute, values, distance, meters = true) => new Query("distanceLessThan", attribute, [[values, distance, meters]]).toString();
|
|
4372
|
+
/**
|
|
4373
|
+
* Filter resources where attribute intersects with the given geometry.
|
|
4374
|
+
*
|
|
4375
|
+
* @param {string} attribute
|
|
4376
|
+
* @param {any[]} values
|
|
4377
|
+
* @returns {string}
|
|
4378
|
+
*/
|
|
4379
|
+
Query.intersects = (attribute, values) => new Query("intersects", attribute, [values]).toString();
|
|
4380
|
+
/**
|
|
4381
|
+
* Filter resources where attribute does not intersect with the given geometry.
|
|
4382
|
+
*
|
|
4383
|
+
* @param {string} attribute
|
|
4384
|
+
* @param {any[]} values
|
|
4385
|
+
* @returns {string}
|
|
4386
|
+
*/
|
|
4387
|
+
Query.notIntersects = (attribute, values) => new Query("notIntersects", attribute, [values]).toString();
|
|
4388
|
+
/**
|
|
4389
|
+
* Filter resources where attribute crosses the given geometry.
|
|
4390
|
+
*
|
|
4391
|
+
* @param {string} attribute
|
|
4392
|
+
* @param {any[]} values
|
|
4393
|
+
* @returns {string}
|
|
4394
|
+
*/
|
|
4395
|
+
Query.crosses = (attribute, values) => new Query("crosses", attribute, [values]).toString();
|
|
4396
|
+
/**
|
|
4397
|
+
* Filter resources where attribute does not cross the given geometry.
|
|
4398
|
+
*
|
|
4399
|
+
* @param {string} attribute
|
|
4400
|
+
* @param {any[]} values
|
|
4401
|
+
* @returns {string}
|
|
4402
|
+
*/
|
|
4403
|
+
Query.notCrosses = (attribute, values) => new Query("notCrosses", attribute, [values]).toString();
|
|
4404
|
+
/**
|
|
4405
|
+
* Filter resources where attribute overlaps with the given geometry.
|
|
4406
|
+
*
|
|
4407
|
+
* @param {string} attribute
|
|
4408
|
+
* @param {any[]} values
|
|
4409
|
+
* @returns {string}
|
|
4410
|
+
*/
|
|
4411
|
+
Query.overlaps = (attribute, values) => new Query("overlaps", attribute, [values]).toString();
|
|
4412
|
+
/**
|
|
4413
|
+
* Filter resources where attribute does not overlap with the given geometry.
|
|
4414
|
+
*
|
|
4415
|
+
* @param {string} attribute
|
|
4416
|
+
* @param {any[]} values
|
|
4417
|
+
* @returns {string}
|
|
4418
|
+
*/
|
|
4419
|
+
Query.notOverlaps = (attribute, values) => new Query("notOverlaps", attribute, [values]).toString();
|
|
4420
|
+
/**
|
|
4421
|
+
* Filter resources where attribute touches the given geometry.
|
|
4422
|
+
*
|
|
4423
|
+
* @param {string} attribute
|
|
4424
|
+
* @param {any[]} values
|
|
4425
|
+
* @returns {string}
|
|
4426
|
+
*/
|
|
4427
|
+
Query.touches = (attribute, values) => new Query("touches", attribute, [values]).toString();
|
|
4428
|
+
/**
|
|
4429
|
+
* Filter resources where attribute does not touch the given geometry.
|
|
4430
|
+
*
|
|
4431
|
+
* @param {string} attribute
|
|
4432
|
+
* @param {any[]} values
|
|
4433
|
+
* @returns {string}
|
|
4434
|
+
*/
|
|
4435
|
+
Query.notTouches = (attribute, values) => new Query("notTouches", attribute, [values]).toString();
|
|
4325
4436
|
|
|
4326
4437
|
class Permission {
|
|
4327
4438
|
}
|
|
@@ -4549,7 +4660,7 @@ var CreditCard;
|
|
|
4549
4660
|
CreditCard["Mastercard"] = "mastercard";
|
|
4550
4661
|
CreditCard["Naranja"] = "naranja";
|
|
4551
4662
|
CreditCard["TarjetaShopping"] = "targeta-shopping";
|
|
4552
|
-
CreditCard["
|
|
4663
|
+
CreditCard["UnionPay"] = "unionpay";
|
|
4553
4664
|
CreditCard["Visa"] = "visa";
|
|
4554
4665
|
CreditCard["MIR"] = "mir";
|
|
4555
4666
|
CreditCard["Maestro"] = "maestro";
|
|
@@ -4763,6 +4874,7 @@ var ExecutionMethod;
|
|
|
4763
4874
|
ExecutionMethod["PATCH"] = "PATCH";
|
|
4764
4875
|
ExecutionMethod["DELETE"] = "DELETE";
|
|
4765
4876
|
ExecutionMethod["OPTIONS"] = "OPTIONS";
|
|
4877
|
+
ExecutionMethod["HEAD"] = "HEAD";
|
|
4766
4878
|
})(ExecutionMethod || (ExecutionMethod = {}));
|
|
4767
4879
|
|
|
4768
4880
|
var ImageGravity;
|