react-native-appwrite 0.7.2 → 0.7.4

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.
Files changed (112) hide show
  1. package/CHANGELOG.md +6 -1
  2. package/README.md +1 -1
  3. package/dist/cjs/sdk.js +36 -84
  4. package/dist/cjs/sdk.js.map +1 -1
  5. package/dist/esm/sdk.js +36 -84
  6. package/dist/esm/sdk.js.map +1 -1
  7. package/docs/examples/account/create-anonymous-session.md +1 -1
  8. package/docs/examples/account/create-email-password-session.md +1 -1
  9. package/docs/examples/account/create-email-token.md +1 -1
  10. package/docs/examples/account/create-j-w-t.md +1 -1
  11. package/docs/examples/account/create-magic-u-r-l-token.md +1 -1
  12. package/docs/examples/account/create-mfa-authenticator.md +1 -1
  13. package/docs/examples/account/create-mfa-challenge.md +1 -1
  14. package/docs/examples/account/create-mfa-recovery-codes.md +1 -1
  15. package/docs/examples/account/create-o-auth2session.md +1 -1
  16. package/docs/examples/account/create-o-auth2token.md +1 -1
  17. package/docs/examples/account/create-phone-token.md +1 -1
  18. package/docs/examples/account/create-phone-verification.md +1 -1
  19. package/docs/examples/account/create-push-target.md +1 -1
  20. package/docs/examples/account/create-recovery.md +1 -1
  21. package/docs/examples/account/create-session.md +1 -1
  22. package/docs/examples/account/create-verification.md +1 -1
  23. package/docs/examples/account/create.md +1 -1
  24. package/docs/examples/account/delete-identity.md +1 -1
  25. package/docs/examples/account/delete-mfa-authenticator.md +1 -1
  26. package/docs/examples/account/delete-push-target.md +1 -1
  27. package/docs/examples/account/delete-session.md +1 -1
  28. package/docs/examples/account/delete-sessions.md +1 -1
  29. package/docs/examples/account/get-mfa-recovery-codes.md +1 -1
  30. package/docs/examples/account/get-prefs.md +1 -1
  31. package/docs/examples/account/get-session.md +1 -1
  32. package/docs/examples/account/get.md +1 -1
  33. package/docs/examples/account/list-identities.md +1 -1
  34. package/docs/examples/account/list-logs.md +1 -1
  35. package/docs/examples/account/list-mfa-factors.md +1 -1
  36. package/docs/examples/account/list-sessions.md +1 -1
  37. package/docs/examples/account/update-email.md +1 -1
  38. package/docs/examples/account/update-m-f-a.md +1 -1
  39. package/docs/examples/account/update-magic-u-r-l-session.md +1 -1
  40. package/docs/examples/account/update-mfa-authenticator.md +1 -1
  41. package/docs/examples/account/update-mfa-challenge.md +1 -1
  42. package/docs/examples/account/update-mfa-recovery-codes.md +1 -1
  43. package/docs/examples/account/update-name.md +1 -1
  44. package/docs/examples/account/update-password.md +1 -1
  45. package/docs/examples/account/update-phone-session.md +1 -1
  46. package/docs/examples/account/update-phone-verification.md +1 -1
  47. package/docs/examples/account/update-phone.md +1 -1
  48. package/docs/examples/account/update-prefs.md +1 -1
  49. package/docs/examples/account/update-push-target.md +1 -1
  50. package/docs/examples/account/update-recovery.md +1 -1
  51. package/docs/examples/account/update-session.md +1 -1
  52. package/docs/examples/account/update-status.md +1 -1
  53. package/docs/examples/account/update-verification.md +1 -1
  54. package/docs/examples/avatars/get-browser.md +1 -1
  55. package/docs/examples/avatars/get-credit-card.md +1 -1
  56. package/docs/examples/avatars/get-favicon.md +1 -1
  57. package/docs/examples/avatars/get-flag.md +1 -1
  58. package/docs/examples/avatars/get-image.md +1 -1
  59. package/docs/examples/avatars/get-initials.md +1 -1
  60. package/docs/examples/avatars/get-q-r.md +1 -1
  61. package/docs/examples/databases/create-document.md +1 -1
  62. package/docs/examples/databases/delete-document.md +1 -1
  63. package/docs/examples/databases/get-document.md +1 -1
  64. package/docs/examples/databases/list-documents.md +1 -1
  65. package/docs/examples/databases/update-document.md +1 -1
  66. package/docs/examples/functions/create-execution.md +1 -1
  67. package/docs/examples/functions/get-execution.md +1 -1
  68. package/docs/examples/functions/list-executions.md +1 -1
  69. package/docs/examples/graphql/mutation.md +1 -1
  70. package/docs/examples/graphql/query.md +1 -1
  71. package/docs/examples/locale/get.md +1 -1
  72. package/docs/examples/locale/list-codes.md +1 -1
  73. package/docs/examples/locale/list-continents.md +1 -1
  74. package/docs/examples/locale/list-countries-e-u.md +1 -1
  75. package/docs/examples/locale/list-countries-phones.md +1 -1
  76. package/docs/examples/locale/list-countries.md +1 -1
  77. package/docs/examples/locale/list-currencies.md +1 -1
  78. package/docs/examples/locale/list-languages.md +1 -1
  79. package/docs/examples/messaging/create-subscriber.md +1 -1
  80. package/docs/examples/messaging/delete-subscriber.md +1 -1
  81. package/docs/examples/storage/create-file.md +1 -1
  82. package/docs/examples/storage/delete-file.md +1 -1
  83. package/docs/examples/storage/get-file-download.md +1 -1
  84. package/docs/examples/storage/get-file-preview.md +1 -1
  85. package/docs/examples/storage/get-file-view.md +1 -1
  86. package/docs/examples/storage/get-file.md +1 -1
  87. package/docs/examples/storage/list-files.md +1 -1
  88. package/docs/examples/storage/update-file.md +1 -1
  89. package/docs/examples/teams/create-membership.md +1 -1
  90. package/docs/examples/teams/create.md +1 -1
  91. package/docs/examples/teams/delete-membership.md +1 -1
  92. package/docs/examples/teams/delete.md +1 -1
  93. package/docs/examples/teams/get-membership.md +1 -1
  94. package/docs/examples/teams/get-prefs.md +1 -1
  95. package/docs/examples/teams/get.md +1 -1
  96. package/docs/examples/teams/list-memberships.md +1 -1
  97. package/docs/examples/teams/list.md +1 -1
  98. package/docs/examples/teams/update-membership-status.md +1 -1
  99. package/docs/examples/teams/update-membership.md +1 -1
  100. package/docs/examples/teams/update-name.md +1 -1
  101. package/docs/examples/teams/update-prefs.md +1 -1
  102. package/package.json +3 -3
  103. package/src/client.ts +10 -3
  104. package/src/enums/o-auth-provider.ts +1 -0
  105. package/src/services/account.ts +0 -8
  106. package/src/services/databases.ts +0 -3
  107. package/src/services/functions.ts +0 -2
  108. package/src/services/locale.ts +0 -8
  109. package/src/services/storage.ts +0 -2
  110. package/src/services/teams.ts +0 -5
  111. package/types/enums/o-auth-provider.d.ts +1 -0
  112. package/types/services/databases.d.ts +0 -1
@@ -1,7 +1,7 @@
1
1
  import { Client, Functions } from "react-native-appwrite";
2
2
 
3
3
  const client = new Client()
4
- .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
4
+ .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
5
5
  .setProject('<YOUR_PROJECT_ID>'); // Your project ID
6
6
 
7
7
  const functions = new Functions(client);
@@ -1,7 +1,7 @@
1
1
  import { Client, Functions } from "react-native-appwrite";
2
2
 
3
3
  const client = new Client()
4
- .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
4
+ .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
5
5
  .setProject('<YOUR_PROJECT_ID>'); // Your project ID
6
6
 
7
7
  const functions = new Functions(client);
@@ -1,7 +1,7 @@
1
1
  import { Client, Graphql } from "react-native-appwrite";
2
2
 
3
3
  const client = new Client()
4
- .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
4
+ .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
5
5
  .setProject('<YOUR_PROJECT_ID>'); // Your project ID
6
6
 
7
7
  const graphql = new Graphql(client);
@@ -1,7 +1,7 @@
1
1
  import { Client, Graphql } from "react-native-appwrite";
2
2
 
3
3
  const client = new Client()
4
- .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
4
+ .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
5
5
  .setProject('<YOUR_PROJECT_ID>'); // Your project ID
6
6
 
7
7
  const graphql = new Graphql(client);
@@ -1,7 +1,7 @@
1
1
  import { Client, Locale } from "react-native-appwrite";
2
2
 
3
3
  const client = new Client()
4
- .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
4
+ .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
5
5
  .setProject('<YOUR_PROJECT_ID>'); // Your project ID
6
6
 
7
7
  const locale = new Locale(client);
@@ -1,7 +1,7 @@
1
1
  import { Client, Locale } from "react-native-appwrite";
2
2
 
3
3
  const client = new Client()
4
- .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
4
+ .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
5
5
  .setProject('<YOUR_PROJECT_ID>'); // Your project ID
6
6
 
7
7
  const locale = new Locale(client);
@@ -1,7 +1,7 @@
1
1
  import { Client, Locale } from "react-native-appwrite";
2
2
 
3
3
  const client = new Client()
4
- .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
4
+ .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
5
5
  .setProject('<YOUR_PROJECT_ID>'); // Your project ID
6
6
 
7
7
  const locale = new Locale(client);
@@ -1,7 +1,7 @@
1
1
  import { Client, Locale } from "react-native-appwrite";
2
2
 
3
3
  const client = new Client()
4
- .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
4
+ .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
5
5
  .setProject('<YOUR_PROJECT_ID>'); // Your project ID
6
6
 
7
7
  const locale = new Locale(client);
@@ -1,7 +1,7 @@
1
1
  import { Client, Locale } from "react-native-appwrite";
2
2
 
3
3
  const client = new Client()
4
- .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
4
+ .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
5
5
  .setProject('<YOUR_PROJECT_ID>'); // Your project ID
6
6
 
7
7
  const locale = new Locale(client);
@@ -1,7 +1,7 @@
1
1
  import { Client, Locale } from "react-native-appwrite";
2
2
 
3
3
  const client = new Client()
4
- .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
4
+ .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
5
5
  .setProject('<YOUR_PROJECT_ID>'); // Your project ID
6
6
 
7
7
  const locale = new Locale(client);
@@ -1,7 +1,7 @@
1
1
  import { Client, Locale } from "react-native-appwrite";
2
2
 
3
3
  const client = new Client()
4
- .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
4
+ .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
5
5
  .setProject('<YOUR_PROJECT_ID>'); // Your project ID
6
6
 
7
7
  const locale = new Locale(client);
@@ -1,7 +1,7 @@
1
1
  import { Client, Locale } from "react-native-appwrite";
2
2
 
3
3
  const client = new Client()
4
- .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
4
+ .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
5
5
  .setProject('<YOUR_PROJECT_ID>'); // Your project ID
6
6
 
7
7
  const locale = new Locale(client);
@@ -1,7 +1,7 @@
1
1
  import { Client, Messaging } from "react-native-appwrite";
2
2
 
3
3
  const client = new Client()
4
- .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
4
+ .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
5
5
  .setProject('<YOUR_PROJECT_ID>'); // Your project ID
6
6
 
7
7
  const messaging = new Messaging(client);
@@ -1,7 +1,7 @@
1
1
  import { Client, Messaging } from "react-native-appwrite";
2
2
 
3
3
  const client = new Client()
4
- .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
4
+ .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
5
5
  .setProject('<YOUR_PROJECT_ID>'); // Your project ID
6
6
 
7
7
  const messaging = new Messaging(client);
@@ -1,7 +1,7 @@
1
1
  import { Client, Storage } from "react-native-appwrite";
2
2
 
3
3
  const client = new Client()
4
- .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
4
+ .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
5
5
  .setProject('<YOUR_PROJECT_ID>'); // Your project ID
6
6
 
7
7
  const storage = new Storage(client);
@@ -1,7 +1,7 @@
1
1
  import { Client, Storage } from "react-native-appwrite";
2
2
 
3
3
  const client = new Client()
4
- .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
4
+ .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
5
5
  .setProject('<YOUR_PROJECT_ID>'); // Your project ID
6
6
 
7
7
  const storage = new Storage(client);
@@ -1,7 +1,7 @@
1
1
  import { Client, Storage } from "react-native-appwrite";
2
2
 
3
3
  const client = new Client()
4
- .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
4
+ .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
5
5
  .setProject('<YOUR_PROJECT_ID>'); // Your project ID
6
6
 
7
7
  const storage = new Storage(client);
@@ -1,7 +1,7 @@
1
1
  import { Client, Storage, ImageGravity, ImageFormat } from "react-native-appwrite";
2
2
 
3
3
  const client = new Client()
4
- .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
4
+ .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
5
5
  .setProject('<YOUR_PROJECT_ID>'); // Your project ID
6
6
 
7
7
  const storage = new Storage(client);
@@ -1,7 +1,7 @@
1
1
  import { Client, Storage } from "react-native-appwrite";
2
2
 
3
3
  const client = new Client()
4
- .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
4
+ .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
5
5
  .setProject('<YOUR_PROJECT_ID>'); // Your project ID
6
6
 
7
7
  const storage = new Storage(client);
@@ -1,7 +1,7 @@
1
1
  import { Client, Storage } from "react-native-appwrite";
2
2
 
3
3
  const client = new Client()
4
- .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
4
+ .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
5
5
  .setProject('<YOUR_PROJECT_ID>'); // Your project ID
6
6
 
7
7
  const storage = new Storage(client);
@@ -1,7 +1,7 @@
1
1
  import { Client, Storage } from "react-native-appwrite";
2
2
 
3
3
  const client = new Client()
4
- .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
4
+ .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
5
5
  .setProject('<YOUR_PROJECT_ID>'); // Your project ID
6
6
 
7
7
  const storage = new Storage(client);
@@ -1,7 +1,7 @@
1
1
  import { Client, Storage } from "react-native-appwrite";
2
2
 
3
3
  const client = new Client()
4
- .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
4
+ .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
5
5
  .setProject('<YOUR_PROJECT_ID>'); // Your project ID
6
6
 
7
7
  const storage = new Storage(client);
@@ -1,7 +1,7 @@
1
1
  import { Client, Teams } from "react-native-appwrite";
2
2
 
3
3
  const client = new Client()
4
- .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
4
+ .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
5
5
  .setProject('<YOUR_PROJECT_ID>'); // Your project ID
6
6
 
7
7
  const teams = new Teams(client);
@@ -1,7 +1,7 @@
1
1
  import { Client, Teams } from "react-native-appwrite";
2
2
 
3
3
  const client = new Client()
4
- .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
4
+ .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
5
5
  .setProject('<YOUR_PROJECT_ID>'); // Your project ID
6
6
 
7
7
  const teams = new Teams(client);
@@ -1,7 +1,7 @@
1
1
  import { Client, Teams } from "react-native-appwrite";
2
2
 
3
3
  const client = new Client()
4
- .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
4
+ .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
5
5
  .setProject('<YOUR_PROJECT_ID>'); // Your project ID
6
6
 
7
7
  const teams = new Teams(client);
@@ -1,7 +1,7 @@
1
1
  import { Client, Teams } from "react-native-appwrite";
2
2
 
3
3
  const client = new Client()
4
- .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
4
+ .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
5
5
  .setProject('<YOUR_PROJECT_ID>'); // Your project ID
6
6
 
7
7
  const teams = new Teams(client);
@@ -1,7 +1,7 @@
1
1
  import { Client, Teams } from "react-native-appwrite";
2
2
 
3
3
  const client = new Client()
4
- .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
4
+ .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
5
5
  .setProject('<YOUR_PROJECT_ID>'); // Your project ID
6
6
 
7
7
  const teams = new Teams(client);
@@ -1,7 +1,7 @@
1
1
  import { Client, Teams } from "react-native-appwrite";
2
2
 
3
3
  const client = new Client()
4
- .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
4
+ .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
5
5
  .setProject('<YOUR_PROJECT_ID>'); // Your project ID
6
6
 
7
7
  const teams = new Teams(client);
@@ -1,7 +1,7 @@
1
1
  import { Client, Teams } from "react-native-appwrite";
2
2
 
3
3
  const client = new Client()
4
- .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
4
+ .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
5
5
  .setProject('<YOUR_PROJECT_ID>'); // Your project ID
6
6
 
7
7
  const teams = new Teams(client);
@@ -1,7 +1,7 @@
1
1
  import { Client, Teams } from "react-native-appwrite";
2
2
 
3
3
  const client = new Client()
4
- .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
4
+ .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
5
5
  .setProject('<YOUR_PROJECT_ID>'); // Your project ID
6
6
 
7
7
  const teams = new Teams(client);
@@ -1,7 +1,7 @@
1
1
  import { Client, Teams } from "react-native-appwrite";
2
2
 
3
3
  const client = new Client()
4
- .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
4
+ .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
5
5
  .setProject('<YOUR_PROJECT_ID>'); // Your project ID
6
6
 
7
7
  const teams = new Teams(client);
@@ -1,7 +1,7 @@
1
1
  import { Client, Teams } from "react-native-appwrite";
2
2
 
3
3
  const client = new Client()
4
- .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
4
+ .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
5
5
  .setProject('<YOUR_PROJECT_ID>'); // Your project ID
6
6
 
7
7
  const teams = new Teams(client);
@@ -1,7 +1,7 @@
1
1
  import { Client, Teams } from "react-native-appwrite";
2
2
 
3
3
  const client = new Client()
4
- .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
4
+ .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
5
5
  .setProject('<YOUR_PROJECT_ID>'); // Your project ID
6
6
 
7
7
  const teams = new Teams(client);
@@ -1,7 +1,7 @@
1
1
  import { Client, Teams } from "react-native-appwrite";
2
2
 
3
3
  const client = new Client()
4
- .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
4
+ .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
5
5
  .setProject('<YOUR_PROJECT_ID>'); // Your project ID
6
6
 
7
7
  const teams = new Teams(client);
@@ -1,7 +1,7 @@
1
1
  import { Client, Teams } from "react-native-appwrite";
2
2
 
3
3
  const client = new Client()
4
- .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
4
+ .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
5
5
  .setProject('<YOUR_PROJECT_ID>'); // Your project ID
6
6
 
7
7
  const teams = new Teams(client);
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "react-native-appwrite",
3
3
  "homepage": "https://appwrite.io/support",
4
4
  "description": "Appwrite is an open-source self-hosted backend server that abstract and simplify complex and repetitive development tasks behind a very simple REST API",
5
- "version": "0.7.2",
5
+ "version": "0.7.4",
6
6
  "license": "BSD-3-Clause",
7
7
  "main": "dist/cjs/sdk.js",
8
8
  "exports": {
@@ -33,8 +33,8 @@
33
33
  "typescript": "^5.3.3"
34
34
  },
35
35
  "dependencies": {
36
- "expo-file-system": "~18.0.11",
37
- "react-native": "0.76.7"
36
+ "expo-file-system": "18.*.*",
37
+ "react-native": ">=0.76.7 <1.0.0"
38
38
  },
39
39
  "peerDependencies": {
40
40
  "expo": "*",
package/src/client.ts CHANGED
@@ -114,7 +114,7 @@ class Client {
114
114
  'x-sdk-name': 'React Native',
115
115
  'x-sdk-platform': 'client',
116
116
  'x-sdk-language': 'reactnative',
117
- 'x-sdk-version': '0.7.2',
117
+ 'x-sdk-version': '0.7.4',
118
118
  'X-Appwrite-Response-Format': '1.6.0',
119
119
  };
120
120
 
@@ -128,8 +128,12 @@ class Client {
128
128
  * @returns {this}
129
129
  */
130
130
  setEndpoint(endpoint: string): this {
131
+ if (!endpoint.startsWith('http://') && !endpoint.startsWith('https://')) {
132
+ throw new AppwriteException('Invalid endpoint URL: ' + endpoint);
133
+ }
134
+
131
135
  this.config.endpoint = endpoint;
132
- this.config.endpointRealtime = this.config.endpointRealtime || this.config.endpoint.replace('https://', 'wss://').replace('http://', 'ws://');
136
+ this.config.endpointRealtime = endpoint.replace('https://', 'wss://').replace('http://', 'ws://');
133
137
 
134
138
  return this;
135
139
  }
@@ -142,8 +146,11 @@ class Client {
142
146
  * @returns {this}
143
147
  */
144
148
  setEndpointRealtime(endpointRealtime: string): this {
145
- this.config.endpointRealtime = endpointRealtime;
149
+ if (!endpointRealtime.startsWith('ws://') && !endpointRealtime.startsWith('wss://')) {
150
+ throw new AppwriteException('Invalid realtime endpoint URL: ' + endpointRealtime);
151
+ }
146
152
 
153
+ this.config.endpointRealtime = endpointRealtime;
147
154
  return this;
148
155
  }
149
156
 
@@ -13,6 +13,7 @@ export enum OAuthProvider {
13
13
  Dropbox = 'dropbox',
14
14
  Etsy = 'etsy',
15
15
  Facebook = 'facebook',
16
+ Figma = 'figma',
16
17
  Github = 'github',
17
18
  Gitlab = 'gitlab',
18
19
  Google = 'google',
@@ -28,7 +28,6 @@ export class Account extends Service {
28
28
 
29
29
  const uri = new URL(this.client.config.endpoint + apiPath);
30
30
  return this.client.call('get', uri, {
31
- 'content-type': 'application/json',
32
31
  }, payload);
33
32
  }
34
33
 
@@ -144,7 +143,6 @@ export class Account extends Service {
144
143
 
145
144
  const uri = new URL(this.client.config.endpoint + apiPath);
146
145
  return this.client.call('get', uri, {
147
- 'content-type': 'application/json',
148
146
  }, payload);
149
147
  }
150
148
 
@@ -207,7 +205,6 @@ export class Account extends Service {
207
205
 
208
206
  const uri = new URL(this.client.config.endpoint + apiPath);
209
207
  return this.client.call('get', uri, {
210
- 'content-type': 'application/json',
211
208
  }, payload);
212
209
  }
213
210
 
@@ -390,7 +387,6 @@ export class Account extends Service {
390
387
 
391
388
  const uri = new URL(this.client.config.endpoint + apiPath);
392
389
  return this.client.call('get', uri, {
393
- 'content-type': 'application/json',
394
390
  }, payload);
395
391
  }
396
392
 
@@ -409,7 +405,6 @@ export class Account extends Service {
409
405
 
410
406
  const uri = new URL(this.client.config.endpoint + apiPath);
411
407
  return this.client.call('get', uri, {
412
- 'content-type': 'application/json',
413
408
  }, payload);
414
409
  }
415
410
 
@@ -559,7 +554,6 @@ export class Account extends Service {
559
554
 
560
555
  const uri = new URL(this.client.config.endpoint + apiPath);
561
556
  return this.client.call('get', uri, {
562
- 'content-type': 'application/json',
563
557
  }, payload);
564
558
  }
565
559
 
@@ -696,7 +690,6 @@ export class Account extends Service {
696
690
 
697
691
  const uri = new URL(this.client.config.endpoint + apiPath);
698
692
  return this.client.call('get', uri, {
699
- 'content-type': 'application/json',
700
693
  }, payload);
701
694
  }
702
695
 
@@ -959,7 +952,6 @@ export class Account extends Service {
959
952
 
960
953
  const uri = new URL(this.client.config.endpoint + apiPath);
961
954
  return this.client.call('get', uri, {
962
- 'content-type': 'application/json',
963
955
  }, payload);
964
956
  }
965
957
 
@@ -41,7 +41,6 @@ export class Databases extends Service {
41
41
 
42
42
  const uri = new URL(this.client.config.endpoint + apiPath);
43
43
  return this.client.call('get', uri, {
44
- 'content-type': 'application/json',
45
44
  }, payload);
46
45
  }
47
46
 
@@ -50,7 +49,6 @@ export class Databases extends Service {
50
49
  * collection resource using either a [server
51
50
  * integration](https://appwrite.io/docs/server/databases#databasesCreateCollection)
52
51
  * API or directly from your database console.
53
- *
54
52
  *
55
53
  * @param {string} databaseId
56
54
  * @param {string} collectionId
@@ -131,7 +129,6 @@ export class Databases extends Service {
131
129
 
132
130
  const uri = new URL(this.client.config.endpoint + apiPath);
133
131
  return this.client.call('get', uri, {
134
- 'content-type': 'application/json',
135
132
  }, payload);
136
133
  }
137
134
 
@@ -42,7 +42,6 @@ export class Functions extends Service {
42
42
 
43
43
  const uri = new URL(this.client.config.endpoint + apiPath);
44
44
  return this.client.call('get', uri, {
45
- 'content-type': 'application/json',
46
45
  }, payload);
47
46
  }
48
47
 
@@ -122,7 +121,6 @@ export class Functions extends Service {
122
121
 
123
122
  const uri = new URL(this.client.config.endpoint + apiPath);
124
123
  return this.client.call('get', uri, {
125
- 'content-type': 'application/json',
126
124
  }, payload);
127
125
  }
128
126
  };
@@ -30,7 +30,6 @@ export class Locale extends Service {
30
30
 
31
31
  const uri = new URL(this.client.config.endpoint + apiPath);
32
32
  return this.client.call('get', uri, {
33
- 'content-type': 'application/json',
34
33
  }, payload);
35
34
  }
36
35
 
@@ -47,7 +46,6 @@ export class Locale extends Service {
47
46
 
48
47
  const uri = new URL(this.client.config.endpoint + apiPath);
49
48
  return this.client.call('get', uri, {
50
- 'content-type': 'application/json',
51
49
  }, payload);
52
50
  }
53
51
 
@@ -64,7 +62,6 @@ export class Locale extends Service {
64
62
 
65
63
  const uri = new URL(this.client.config.endpoint + apiPath);
66
64
  return this.client.call('get', uri, {
67
- 'content-type': 'application/json',
68
65
  }, payload);
69
66
  }
70
67
 
@@ -81,7 +78,6 @@ export class Locale extends Service {
81
78
 
82
79
  const uri = new URL(this.client.config.endpoint + apiPath);
83
80
  return this.client.call('get', uri, {
84
- 'content-type': 'application/json',
85
81
  }, payload);
86
82
  }
87
83
 
@@ -98,7 +94,6 @@ export class Locale extends Service {
98
94
 
99
95
  const uri = new URL(this.client.config.endpoint + apiPath);
100
96
  return this.client.call('get', uri, {
101
- 'content-type': 'application/json',
102
97
  }, payload);
103
98
  }
104
99
 
@@ -115,7 +110,6 @@ export class Locale extends Service {
115
110
 
116
111
  const uri = new URL(this.client.config.endpoint + apiPath);
117
112
  return this.client.call('get', uri, {
118
- 'content-type': 'application/json',
119
113
  }, payload);
120
114
  }
121
115
 
@@ -133,7 +127,6 @@ export class Locale extends Service {
133
127
 
134
128
  const uri = new URL(this.client.config.endpoint + apiPath);
135
129
  return this.client.call('get', uri, {
136
- 'content-type': 'application/json',
137
130
  }, payload);
138
131
  }
139
132
 
@@ -150,7 +143,6 @@ export class Locale extends Service {
150
143
 
151
144
  const uri = new URL(this.client.config.endpoint + apiPath);
152
145
  return this.client.call('get', uri, {
153
- 'content-type': 'application/json',
154
146
  }, payload);
155
147
  }
156
148
  };
@@ -43,7 +43,6 @@ export class Storage extends Service {
43
43
 
44
44
  const uri = new URL(this.client.config.endpoint + apiPath);
45
45
  return this.client.call('get', uri, {
46
- 'content-type': 'application/json',
47
46
  }, payload);
48
47
  }
49
48
 
@@ -185,7 +184,6 @@ export class Storage extends Service {
185
184
 
186
185
  const uri = new URL(this.client.config.endpoint + apiPath);
187
186
  return this.client.call('get', uri, {
188
- 'content-type': 'application/json',
189
187
  }, payload);
190
188
  }
191
189
 
@@ -36,7 +36,6 @@ export class Teams extends Service {
36
36
 
37
37
  const uri = new URL(this.client.config.endpoint + apiPath);
38
38
  return this.client.call('get', uri, {
39
- 'content-type': 'application/json',
40
39
  }, payload);
41
40
  }
42
41
 
@@ -98,7 +97,6 @@ export class Teams extends Service {
98
97
 
99
98
  const uri = new URL(this.client.config.endpoint + apiPath);
100
99
  return this.client.call('get', uri, {
101
- 'content-type': 'application/json',
102
100
  }, payload);
103
101
  }
104
102
 
@@ -183,7 +181,6 @@ export class Teams extends Service {
183
181
 
184
182
  const uri = new URL(this.client.config.endpoint + apiPath);
185
183
  return this.client.call('get', uri, {
186
- 'content-type': 'application/json',
187
184
  }, payload);
188
185
  }
189
186
 
@@ -286,7 +283,6 @@ export class Teams extends Service {
286
283
 
287
284
  const uri = new URL(this.client.config.endpoint + apiPath);
288
285
  return this.client.call('get', uri, {
289
- 'content-type': 'application/json',
290
286
  }, payload);
291
287
  }
292
288
 
@@ -425,7 +421,6 @@ export class Teams extends Service {
425
421
 
426
422
  const uri = new URL(this.client.config.endpoint + apiPath);
427
423
  return this.client.call('get', uri, {
428
- 'content-type': 'application/json',
429
424
  }, payload);
430
425
  }
431
426