react-native-appwrite 0.21.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.21.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
  }
@@ -5405,18 +5415,24 @@ class Channel {
5405
5415
  return "account";
5406
5416
  }
5407
5417
  // Global events
5408
- static get documents() {
5418
+ static documents() {
5409
5419
  return "documents";
5410
5420
  }
5411
- static get rows() {
5421
+ static rows() {
5412
5422
  return "rows";
5413
5423
  }
5414
- static get files() {
5424
+ static files() {
5415
5425
  return "files";
5416
5426
  }
5417
- static get executions() {
5427
+ static executions() {
5418
5428
  return "executions";
5419
5429
  }
5430
+ static teams() {
5431
+ return "teams";
5432
+ }
5433
+ static memberships() {
5434
+ return "memberships";
5435
+ }
5420
5436
  }
5421
5437
 
5422
5438
  var Condition;
@@ -5738,8 +5754,6 @@ var OAuthProvider;
5738
5754
  OAuthProvider["Yandex"] = "yandex";
5739
5755
  OAuthProvider["Zoho"] = "zoho";
5740
5756
  OAuthProvider["Zoom"] = "zoom";
5741
- OAuthProvider["GithubImagine"] = "githubImagine";
5742
- OAuthProvider["GoogleImagine"] = "googleImagine";
5743
5757
  })(OAuthProvider || (OAuthProvider = {}));
5744
5758
 
5745
5759
  var Browser;