react-native-appwrite 0.23.1 → 0.24.1
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/CHANGELOG.md +8 -0
- package/dist/cjs/sdk.js +29 -2
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +29 -2
- package/dist/esm/sdk.js.map +1 -1
- package/package.json +1 -1
- package/src/client.ts +7 -2
- package/src/query.ts +26 -0
- package/types/query.d.ts +22 -0
package/dist/esm/sdk.js
CHANGED
|
@@ -57,6 +57,8 @@ const JSONbigParser = JSONbigModule({ storeAsString: false });
|
|
|
57
57
|
const JSONbigSerializer = JSONbigModule({ useNativeBigInt: true });
|
|
58
58
|
const MAX_SAFE = BigInt(Number.MAX_SAFE_INTEGER);
|
|
59
59
|
const MIN_SAFE = BigInt(Number.MIN_SAFE_INTEGER);
|
|
60
|
+
const MAX_INT64 = BigInt('9223372036854775807');
|
|
61
|
+
const MIN_INT64 = BigInt('-9223372036854775808');
|
|
60
62
|
function isBigNumber(value) {
|
|
61
63
|
return value !== null
|
|
62
64
|
&& typeof value === 'object'
|
|
@@ -73,7 +75,10 @@ function reviver(_key, value) {
|
|
|
73
75
|
if (bi >= MIN_SAFE && bi <= MAX_SAFE) {
|
|
74
76
|
return Number(str);
|
|
75
77
|
}
|
|
76
|
-
|
|
78
|
+
if (bi >= MIN_INT64 && bi <= MAX_INT64) {
|
|
79
|
+
return bi;
|
|
80
|
+
}
|
|
81
|
+
return value.toNumber();
|
|
77
82
|
}
|
|
78
83
|
return value.toNumber();
|
|
79
84
|
}
|
|
@@ -109,7 +114,7 @@ class Client {
|
|
|
109
114
|
'x-sdk-name': 'React Native',
|
|
110
115
|
'x-sdk-platform': 'client',
|
|
111
116
|
'x-sdk-language': 'reactnative',
|
|
112
|
-
'x-sdk-version': '0.
|
|
117
|
+
'x-sdk-version': '0.24.1',
|
|
113
118
|
'X-Appwrite-Response-Format': '1.8.0',
|
|
114
119
|
};
|
|
115
120
|
this.realtime = {
|
|
@@ -4994,12 +4999,34 @@ Query.limit = (limit) => new Query("limit", undefined, limit).toString();
|
|
|
4994
4999
|
Query.offset = (offset) => new Query("offset", undefined, offset).toString();
|
|
4995
5000
|
/**
|
|
4996
5001
|
* Filter resources where attribute contains the specified value.
|
|
5002
|
+
* For string attributes, checks if the string contains the substring.
|
|
4997
5003
|
*
|
|
5004
|
+
* Note: For array attributes, use {@link containsAny} or {@link containsAll} instead.
|
|
4998
5005
|
* @param {string} attribute
|
|
4999
5006
|
* @param {string | string[]} value
|
|
5000
5007
|
* @returns {string}
|
|
5001
5008
|
*/
|
|
5002
5009
|
Query.contains = (attribute, value) => new Query("contains", attribute, value).toString();
|
|
5010
|
+
/**
|
|
5011
|
+
* Filter resources where attribute contains ANY of the specified values.
|
|
5012
|
+
* For array and relationship attributes, matches documents where the attribute
|
|
5013
|
+
* contains at least one of the given values.
|
|
5014
|
+
*
|
|
5015
|
+
* @param {string} attribute
|
|
5016
|
+
* @param {any[]} value
|
|
5017
|
+
* @returns {string}
|
|
5018
|
+
*/
|
|
5019
|
+
Query.containsAny = (attribute, value) => new Query("containsAny", attribute, value).toString();
|
|
5020
|
+
/**
|
|
5021
|
+
* Filter resources where attribute contains ALL of the specified values.
|
|
5022
|
+
* For array and relationship attributes, matches documents where the attribute
|
|
5023
|
+
* contains every one of the given values.
|
|
5024
|
+
*
|
|
5025
|
+
* @param {string} attribute
|
|
5026
|
+
* @param {any[]} value
|
|
5027
|
+
* @returns {string}
|
|
5028
|
+
*/
|
|
5029
|
+
Query.containsAll = (attribute, value) => new Query("containsAll", attribute, value).toString();
|
|
5003
5030
|
/**
|
|
5004
5031
|
* Filter resources where attribute does not contain the specified value.
|
|
5005
5032
|
*
|