react-native-appwrite 0.23.0 → 0.23.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/dist/esm/sdk.js CHANGED
@@ -1,6 +1,5 @@
1
1
  import { Platform } from 'react-native';
2
2
  import JSONbigModule from 'json-bigint';
3
- import BigNumber from 'bignumber.js';
4
3
  import * as FileSystem from 'expo-file-system';
5
4
 
6
5
  /******************************************************************************
@@ -58,8 +57,16 @@ const JSONbigParser = JSONbigModule({ storeAsString: false });
58
57
  const JSONbigSerializer = JSONbigModule({ useNativeBigInt: true });
59
58
  const MAX_SAFE = BigInt(Number.MAX_SAFE_INTEGER);
60
59
  const MIN_SAFE = BigInt(Number.MIN_SAFE_INTEGER);
60
+ function isBigNumber(value) {
61
+ return value !== null
62
+ && typeof value === 'object'
63
+ && value._isBigNumber === true
64
+ && typeof value.isInteger === 'function'
65
+ && typeof value.toFixed === 'function'
66
+ && typeof value.toNumber === 'function';
67
+ }
61
68
  function reviver(_key, value) {
62
- if (BigNumber.isBigNumber(value)) {
69
+ if (isBigNumber(value)) {
63
70
  if (value.isInteger()) {
64
71
  const str = value.toFixed();
65
72
  const bi = BigInt(str);
@@ -102,7 +109,7 @@ class Client {
102
109
  'x-sdk-name': 'React Native',
103
110
  'x-sdk-platform': 'client',
104
111
  'x-sdk-language': 'reactnative',
105
- 'x-sdk-version': '0.23.0',
112
+ 'x-sdk-version': '0.23.1',
106
113
  'X-Appwrite-Response-Format': '1.8.0',
107
114
  };
108
115
  this.realtime = {
@@ -5373,6 +5380,9 @@ class Channel {
5373
5380
  create() {
5374
5381
  return this.resolve("create");
5375
5382
  }
5383
+ upsert() {
5384
+ return this.resolve("upsert");
5385
+ }
5376
5386
  update() {
5377
5387
  return this.resolve("update");
5378
5388
  }
@@ -5744,8 +5754,6 @@ var OAuthProvider;
5744
5754
  OAuthProvider["Yandex"] = "yandex";
5745
5755
  OAuthProvider["Zoho"] = "zoho";
5746
5756
  OAuthProvider["Zoom"] = "zoom";
5747
- OAuthProvider["GithubImagine"] = "githubImagine";
5748
- OAuthProvider["GoogleImagine"] = "googleImagine";
5749
5757
  })(OAuthProvider || (OAuthProvider = {}));
5750
5758
 
5751
5759
  var Browser;