react-native-appwrite 0.19.0 → 0.20.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.
Files changed (158) hide show
  1. package/.github/workflows/publish.yml +9 -8
  2. package/CHANGELOG.md +6 -0
  3. package/LICENSE +1 -1
  4. package/README.md +2 -2
  5. package/dist/cjs/sdk.js +223 -44
  6. package/dist/cjs/sdk.js.map +1 -1
  7. package/dist/esm/sdk.js +219 -45
  8. package/dist/esm/sdk.js.map +1 -1
  9. package/docs/examples/account/create-anonymous-session.md +2 -0
  10. package/docs/examples/account/create-email-password-session.md +2 -0
  11. package/docs/examples/account/create-email-token.md +2 -0
  12. package/docs/examples/account/create-email-verification.md +2 -0
  13. package/docs/examples/account/create-jwt.md +5 -1
  14. package/docs/examples/account/create-magic-url-token.md +2 -0
  15. package/docs/examples/account/create-mfa-authenticator.md +2 -0
  16. package/docs/examples/account/create-mfa-challenge.md +2 -0
  17. package/docs/examples/account/create-mfa-recovery-codes.md +2 -0
  18. package/docs/examples/account/create-o-auth-2-session.md +2 -0
  19. package/docs/examples/account/create-o-auth-2-token.md +2 -0
  20. package/docs/examples/account/create-phone-token.md +2 -0
  21. package/docs/examples/account/create-phone-verification.md +2 -0
  22. package/docs/examples/account/create-push-target.md +2 -0
  23. package/docs/examples/account/create-recovery.md +2 -0
  24. package/docs/examples/account/create-session.md +2 -0
  25. package/docs/examples/account/create-verification.md +2 -0
  26. package/docs/examples/account/create.md +2 -0
  27. package/docs/examples/account/delete-identity.md +2 -0
  28. package/docs/examples/account/delete-mfa-authenticator.md +2 -0
  29. package/docs/examples/account/delete-push-target.md +2 -0
  30. package/docs/examples/account/delete-session.md +2 -0
  31. package/docs/examples/account/delete-sessions.md +2 -0
  32. package/docs/examples/account/get-mfa-recovery-codes.md +2 -0
  33. package/docs/examples/account/get-prefs.md +2 -0
  34. package/docs/examples/account/get-session.md +2 -0
  35. package/docs/examples/account/get.md +2 -0
  36. package/docs/examples/account/list-identities.md +2 -0
  37. package/docs/examples/account/list-logs.md +2 -0
  38. package/docs/examples/account/list-mfa-factors.md +2 -0
  39. package/docs/examples/account/list-sessions.md +2 -0
  40. package/docs/examples/account/update-email-verification.md +2 -0
  41. package/docs/examples/account/update-email.md +2 -0
  42. package/docs/examples/account/update-magic-url-session.md +2 -0
  43. package/docs/examples/account/update-mfa-authenticator.md +2 -0
  44. package/docs/examples/account/update-mfa-challenge.md +2 -0
  45. package/docs/examples/account/update-mfa-recovery-codes.md +2 -0
  46. package/docs/examples/account/update-mfa.md +2 -0
  47. package/docs/examples/account/update-name.md +2 -0
  48. package/docs/examples/account/update-password.md +2 -0
  49. package/docs/examples/account/update-phone-session.md +2 -0
  50. package/docs/examples/account/update-phone-verification.md +2 -0
  51. package/docs/examples/account/update-phone.md +2 -0
  52. package/docs/examples/account/update-prefs.md +2 -0
  53. package/docs/examples/account/update-push-target.md +2 -0
  54. package/docs/examples/account/update-recovery.md +2 -0
  55. package/docs/examples/account/update-session.md +2 -0
  56. package/docs/examples/account/update-status.md +2 -0
  57. package/docs/examples/account/update-verification.md +2 -0
  58. package/docs/examples/avatars/get-browser.md +2 -0
  59. package/docs/examples/avatars/get-credit-card.md +2 -0
  60. package/docs/examples/avatars/get-favicon.md +2 -0
  61. package/docs/examples/avatars/get-flag.md +2 -0
  62. package/docs/examples/avatars/get-image.md +2 -0
  63. package/docs/examples/avatars/get-initials.md +2 -0
  64. package/docs/examples/avatars/get-qr.md +2 -0
  65. package/docs/examples/avatars/get-screenshot.md +7 -5
  66. package/docs/examples/databases/create-document.md +2 -0
  67. package/docs/examples/databases/create-operations.md +2 -0
  68. package/docs/examples/databases/create-transaction.md +2 -0
  69. package/docs/examples/databases/decrement-document-attribute.md +2 -0
  70. package/docs/examples/databases/delete-document.md +2 -0
  71. package/docs/examples/databases/delete-transaction.md +2 -0
  72. package/docs/examples/databases/get-document.md +2 -0
  73. package/docs/examples/databases/get-transaction.md +2 -0
  74. package/docs/examples/databases/increment-document-attribute.md +2 -0
  75. package/docs/examples/databases/list-documents.md +2 -0
  76. package/docs/examples/databases/list-transactions.md +2 -0
  77. package/docs/examples/databases/update-document.md +9 -1
  78. package/docs/examples/databases/update-transaction.md +2 -0
  79. package/docs/examples/databases/upsert-document.md +9 -1
  80. package/docs/examples/functions/create-execution.md +2 -0
  81. package/docs/examples/functions/get-execution.md +2 -0
  82. package/docs/examples/functions/list-executions.md +2 -0
  83. package/docs/examples/graphql/mutation.md +2 -0
  84. package/docs/examples/graphql/query.md +2 -0
  85. package/docs/examples/locale/get.md +2 -0
  86. package/docs/examples/locale/list-codes.md +2 -0
  87. package/docs/examples/locale/list-continents.md +2 -0
  88. package/docs/examples/locale/list-countries-eu.md +2 -0
  89. package/docs/examples/locale/list-countries-phones.md +2 -0
  90. package/docs/examples/locale/list-countries.md +2 -0
  91. package/docs/examples/locale/list-currencies.md +2 -0
  92. package/docs/examples/locale/list-languages.md +2 -0
  93. package/docs/examples/messaging/create-subscriber.md +2 -0
  94. package/docs/examples/messaging/delete-subscriber.md +2 -0
  95. package/docs/examples/storage/create-file.md +2 -0
  96. package/docs/examples/storage/delete-file.md +2 -0
  97. package/docs/examples/storage/get-file-download.md +2 -0
  98. package/docs/examples/storage/get-file-preview.md +2 -0
  99. package/docs/examples/storage/get-file-view.md +2 -0
  100. package/docs/examples/storage/get-file.md +2 -0
  101. package/docs/examples/storage/list-files.md +2 -0
  102. package/docs/examples/storage/update-file.md +2 -0
  103. package/docs/examples/tablesdb/create-operations.md +2 -0
  104. package/docs/examples/tablesdb/create-row.md +2 -0
  105. package/docs/examples/tablesdb/create-transaction.md +2 -0
  106. package/docs/examples/tablesdb/decrement-row-column.md +2 -0
  107. package/docs/examples/tablesdb/delete-row.md +2 -0
  108. package/docs/examples/tablesdb/delete-transaction.md +2 -0
  109. package/docs/examples/tablesdb/get-row.md +2 -0
  110. package/docs/examples/tablesdb/get-transaction.md +2 -0
  111. package/docs/examples/tablesdb/increment-row-column.md +2 -0
  112. package/docs/examples/tablesdb/list-rows.md +2 -0
  113. package/docs/examples/tablesdb/list-transactions.md +2 -0
  114. package/docs/examples/tablesdb/update-row.md +9 -1
  115. package/docs/examples/tablesdb/update-transaction.md +2 -0
  116. package/docs/examples/tablesdb/upsert-row.md +9 -1
  117. package/docs/examples/teams/create-membership.md +4 -2
  118. package/docs/examples/teams/create.md +2 -0
  119. package/docs/examples/teams/delete-membership.md +2 -0
  120. package/docs/examples/teams/delete.md +2 -0
  121. package/docs/examples/teams/get-membership.md +2 -0
  122. package/docs/examples/teams/get-prefs.md +2 -0
  123. package/docs/examples/teams/get.md +2 -0
  124. package/docs/examples/teams/list-memberships.md +2 -0
  125. package/docs/examples/teams/list.md +2 -0
  126. package/docs/examples/teams/update-membership-status.md +2 -0
  127. package/docs/examples/teams/update-membership.md +4 -2
  128. package/docs/examples/teams/update-name.md +2 -0
  129. package/docs/examples/teams/update-prefs.md +2 -0
  130. package/package.json +6 -3
  131. package/rollup.config.js +3 -1
  132. package/src/channel.ts +134 -0
  133. package/src/client.ts +41 -6
  134. package/src/enums/browser-permission.ts +22 -0
  135. package/src/enums/o-auth-provider.ts +0 -1
  136. package/src/enums/roles.ts +5 -0
  137. package/src/index.ts +4 -2
  138. package/src/models.ts +8 -0
  139. package/src/query.ts +54 -9
  140. package/src/services/account.ts +30 -1
  141. package/src/services/avatars.ts +17 -16
  142. package/src/services/databases.ts +5 -9
  143. package/src/services/storage.ts +8 -8
  144. package/src/services/teams.ts +19 -18
  145. package/types/channel.d.ts +71 -0
  146. package/types/enums/browser-permission.d.ts +22 -0
  147. package/types/enums/o-auth-provider.d.ts +1 -2
  148. package/types/enums/roles.d.ts +5 -0
  149. package/types/index.d.ts +4 -2
  150. package/types/models.d.ts +8 -0
  151. package/types/query.d.ts +36 -6
  152. package/types/services/account.d.ts +13 -1
  153. package/types/services/avatars.d.ts +12 -11
  154. package/types/services/databases.d.ts +2 -2
  155. package/types/services/storage.d.ts +8 -8
  156. package/types/services/teams.d.ts +9 -8
  157. package/src/enums/output.ts +0 -9
  158. package/types/enums/output.d.ts +0 -9
@@ -1,3 +1,4 @@
1
+ ```javascript
1
2
  import { Client, Account } from "react-native-appwrite";
2
3
 
3
4
  const client = new Client()
@@ -9,3 +10,4 @@ const account = new Account(client);
9
10
  const result = await account.createAnonymousSession();
10
11
 
11
12
  console.log(result);
13
+ ```
@@ -1,3 +1,4 @@
1
+ ```javascript
1
2
  import { Client, Account } from "react-native-appwrite";
2
3
 
3
4
  const client = new Client()
@@ -12,3 +13,4 @@ const result = await account.createEmailPasswordSession({
12
13
  });
13
14
 
14
15
  console.log(result);
16
+ ```
@@ -1,3 +1,4 @@
1
+ ```javascript
1
2
  import { Client, Account } from "react-native-appwrite";
2
3
 
3
4
  const client = new Client()
@@ -13,3 +14,4 @@ const result = await account.createEmailToken({
13
14
  });
14
15
 
15
16
  console.log(result);
17
+ ```
@@ -1,3 +1,4 @@
1
+ ```javascript
1
2
  import { Client, Account } from "react-native-appwrite";
2
3
 
3
4
  const client = new Client()
@@ -11,3 +12,4 @@ const result = await account.createEmailVerification({
11
12
  });
12
13
 
13
14
  console.log(result);
15
+ ```
@@ -1,3 +1,4 @@
1
+ ```javascript
1
2
  import { Client, Account } from "react-native-appwrite";
2
3
 
3
4
  const client = new Client()
@@ -6,6 +7,9 @@ const client = new Client()
6
7
 
7
8
  const account = new Account(client);
8
9
 
9
- const result = await account.createJWT();
10
+ const result = await account.createJWT({
11
+ duration: 0 // optional
12
+ });
10
13
 
11
14
  console.log(result);
15
+ ```
@@ -1,3 +1,4 @@
1
+ ```javascript
1
2
  import { Client, Account } from "react-native-appwrite";
2
3
 
3
4
  const client = new Client()
@@ -14,3 +15,4 @@ const result = await account.createMagicURLToken({
14
15
  });
15
16
 
16
17
  console.log(result);
18
+ ```
@@ -1,3 +1,4 @@
1
+ ```javascript
1
2
  import { Client, Account, AuthenticatorType } from "react-native-appwrite";
2
3
 
3
4
  const client = new Client()
@@ -11,3 +12,4 @@ const result = await account.createMFAAuthenticator({
11
12
  });
12
13
 
13
14
  console.log(result);
15
+ ```
@@ -1,3 +1,4 @@
1
+ ```javascript
1
2
  import { Client, Account, AuthenticationFactor } from "react-native-appwrite";
2
3
 
3
4
  const client = new Client()
@@ -11,3 +12,4 @@ const result = await account.createMFAChallenge({
11
12
  });
12
13
 
13
14
  console.log(result);
15
+ ```
@@ -1,3 +1,4 @@
1
+ ```javascript
1
2
  import { Client, Account } from "react-native-appwrite";
2
3
 
3
4
  const client = new Client()
@@ -9,3 +10,4 @@ const account = new Account(client);
9
10
  const result = await account.createMFARecoveryCodes();
10
11
 
11
12
  console.log(result);
13
+ ```
@@ -1,3 +1,4 @@
1
+ ```javascript
1
2
  import { Client, Account, OAuthProvider } from "react-native-appwrite";
2
3
 
3
4
  const client = new Client()
@@ -13,3 +14,4 @@ account.createOAuth2Session({
13
14
  scopes: [] // optional
14
15
  });
15
16
 
17
+ ```
@@ -1,3 +1,4 @@
1
+ ```javascript
1
2
  import { Client, Account, OAuthProvider } from "react-native-appwrite";
2
3
 
3
4
  const client = new Client()
@@ -13,3 +14,4 @@ account.createOAuth2Token({
13
14
  scopes: [] // optional
14
15
  });
15
16
 
17
+ ```
@@ -1,3 +1,4 @@
1
+ ```javascript
1
2
  import { Client, Account } from "react-native-appwrite";
2
3
 
3
4
  const client = new Client()
@@ -12,3 +13,4 @@ const result = await account.createPhoneToken({
12
13
  });
13
14
 
14
15
  console.log(result);
16
+ ```
@@ -1,3 +1,4 @@
1
+ ```javascript
1
2
  import { Client, Account } from "react-native-appwrite";
2
3
 
3
4
  const client = new Client()
@@ -9,3 +10,4 @@ const account = new Account(client);
9
10
  const result = await account.createPhoneVerification();
10
11
 
11
12
  console.log(result);
13
+ ```
@@ -1,3 +1,4 @@
1
+ ```javascript
1
2
  import { Client, Account } from "react-native-appwrite";
2
3
 
3
4
  const client = new Client()
@@ -13,3 +14,4 @@ const result = await account.createPushTarget({
13
14
  });
14
15
 
15
16
  console.log(result);
17
+ ```
@@ -1,3 +1,4 @@
1
+ ```javascript
1
2
  import { Client, Account } from "react-native-appwrite";
2
3
 
3
4
  const client = new Client()
@@ -12,3 +13,4 @@ const result = await account.createRecovery({
12
13
  });
13
14
 
14
15
  console.log(result);
16
+ ```
@@ -1,3 +1,4 @@
1
+ ```javascript
1
2
  import { Client, Account } from "react-native-appwrite";
2
3
 
3
4
  const client = new Client()
@@ -12,3 +13,4 @@ const result = await account.createSession({
12
13
  });
13
14
 
14
15
  console.log(result);
16
+ ```
@@ -1,3 +1,4 @@
1
+ ```javascript
1
2
  import { Client, Account } from "react-native-appwrite";
2
3
 
3
4
  const client = new Client()
@@ -11,3 +12,4 @@ const result = await account.createVerification({
11
12
  });
12
13
 
13
14
  console.log(result);
15
+ ```
@@ -1,3 +1,4 @@
1
+ ```javascript
1
2
  import { Client, Account } from "react-native-appwrite";
2
3
 
3
4
  const client = new Client()
@@ -14,3 +15,4 @@ const result = await account.create({
14
15
  });
15
16
 
16
17
  console.log(result);
18
+ ```
@@ -1,3 +1,4 @@
1
+ ```javascript
1
2
  import { Client, Account } from "react-native-appwrite";
2
3
 
3
4
  const client = new Client()
@@ -11,3 +12,4 @@ const result = await account.deleteIdentity({
11
12
  });
12
13
 
13
14
  console.log(result);
15
+ ```
@@ -1,3 +1,4 @@
1
+ ```javascript
1
2
  import { Client, Account, AuthenticatorType } from "react-native-appwrite";
2
3
 
3
4
  const client = new Client()
@@ -11,3 +12,4 @@ const result = await account.deleteMFAAuthenticator({
11
12
  });
12
13
 
13
14
  console.log(result);
15
+ ```
@@ -1,3 +1,4 @@
1
+ ```javascript
1
2
  import { Client, Account } from "react-native-appwrite";
2
3
 
3
4
  const client = new Client()
@@ -11,3 +12,4 @@ const result = await account.deletePushTarget({
11
12
  });
12
13
 
13
14
  console.log(result);
15
+ ```
@@ -1,3 +1,4 @@
1
+ ```javascript
1
2
  import { Client, Account } from "react-native-appwrite";
2
3
 
3
4
  const client = new Client()
@@ -11,3 +12,4 @@ const result = await account.deleteSession({
11
12
  });
12
13
 
13
14
  console.log(result);
15
+ ```
@@ -1,3 +1,4 @@
1
+ ```javascript
1
2
  import { Client, Account } from "react-native-appwrite";
2
3
 
3
4
  const client = new Client()
@@ -9,3 +10,4 @@ const account = new Account(client);
9
10
  const result = await account.deleteSessions();
10
11
 
11
12
  console.log(result);
13
+ ```
@@ -1,3 +1,4 @@
1
+ ```javascript
1
2
  import { Client, Account } from "react-native-appwrite";
2
3
 
3
4
  const client = new Client()
@@ -9,3 +10,4 @@ const account = new Account(client);
9
10
  const result = await account.getMFARecoveryCodes();
10
11
 
11
12
  console.log(result);
13
+ ```
@@ -1,3 +1,4 @@
1
+ ```javascript
1
2
  import { Client, Account } from "react-native-appwrite";
2
3
 
3
4
  const client = new Client()
@@ -9,3 +10,4 @@ const account = new Account(client);
9
10
  const result = await account.getPrefs();
10
11
 
11
12
  console.log(result);
13
+ ```
@@ -1,3 +1,4 @@
1
+ ```javascript
1
2
  import { Client, Account } from "react-native-appwrite";
2
3
 
3
4
  const client = new Client()
@@ -11,3 +12,4 @@ const result = await account.getSession({
11
12
  });
12
13
 
13
14
  console.log(result);
15
+ ```
@@ -1,3 +1,4 @@
1
+ ```javascript
1
2
  import { Client, Account } from "react-native-appwrite";
2
3
 
3
4
  const client = new Client()
@@ -9,3 +10,4 @@ const account = new Account(client);
9
10
  const result = await account.get();
10
11
 
11
12
  console.log(result);
13
+ ```
@@ -1,3 +1,4 @@
1
+ ```javascript
1
2
  import { Client, Account } from "react-native-appwrite";
2
3
 
3
4
  const client = new Client()
@@ -12,3 +13,4 @@ const result = await account.listIdentities({
12
13
  });
13
14
 
14
15
  console.log(result);
16
+ ```
@@ -1,3 +1,4 @@
1
+ ```javascript
1
2
  import { Client, Account } from "react-native-appwrite";
2
3
 
3
4
  const client = new Client()
@@ -12,3 +13,4 @@ const result = await account.listLogs({
12
13
  });
13
14
 
14
15
  console.log(result);
16
+ ```
@@ -1,3 +1,4 @@
1
+ ```javascript
1
2
  import { Client, Account } from "react-native-appwrite";
2
3
 
3
4
  const client = new Client()
@@ -9,3 +10,4 @@ const account = new Account(client);
9
10
  const result = await account.listMFAFactors();
10
11
 
11
12
  console.log(result);
13
+ ```
@@ -1,3 +1,4 @@
1
+ ```javascript
1
2
  import { Client, Account } from "react-native-appwrite";
2
3
 
3
4
  const client = new Client()
@@ -9,3 +10,4 @@ const account = new Account(client);
9
10
  const result = await account.listSessions();
10
11
 
11
12
  console.log(result);
13
+ ```
@@ -1,3 +1,4 @@
1
+ ```javascript
1
2
  import { Client, Account } from "react-native-appwrite";
2
3
 
3
4
  const client = new Client()
@@ -12,3 +13,4 @@ const result = await account.updateEmailVerification({
12
13
  });
13
14
 
14
15
  console.log(result);
16
+ ```
@@ -1,3 +1,4 @@
1
+ ```javascript
1
2
  import { Client, Account } from "react-native-appwrite";
2
3
 
3
4
  const client = new Client()
@@ -12,3 +13,4 @@ const result = await account.updateEmail({
12
13
  });
13
14
 
14
15
  console.log(result);
16
+ ```
@@ -1,3 +1,4 @@
1
+ ```javascript
1
2
  import { Client, Account } from "react-native-appwrite";
2
3
 
3
4
  const client = new Client()
@@ -12,3 +13,4 @@ const result = await account.updateMagicURLSession({
12
13
  });
13
14
 
14
15
  console.log(result);
16
+ ```
@@ -1,3 +1,4 @@
1
+ ```javascript
1
2
  import { Client, Account, AuthenticatorType } from "react-native-appwrite";
2
3
 
3
4
  const client = new Client()
@@ -12,3 +13,4 @@ const result = await account.updateMFAAuthenticator({
12
13
  });
13
14
 
14
15
  console.log(result);
16
+ ```
@@ -1,3 +1,4 @@
1
+ ```javascript
1
2
  import { Client, Account } from "react-native-appwrite";
2
3
 
3
4
  const client = new Client()
@@ -12,3 +13,4 @@ const result = await account.updateMFAChallenge({
12
13
  });
13
14
 
14
15
  console.log(result);
16
+ ```
@@ -1,3 +1,4 @@
1
+ ```javascript
1
2
  import { Client, Account } from "react-native-appwrite";
2
3
 
3
4
  const client = new Client()
@@ -9,3 +10,4 @@ const account = new Account(client);
9
10
  const result = await account.updateMFARecoveryCodes();
10
11
 
11
12
  console.log(result);
13
+ ```
@@ -1,3 +1,4 @@
1
+ ```javascript
1
2
  import { Client, Account } from "react-native-appwrite";
2
3
 
3
4
  const client = new Client()
@@ -11,3 +12,4 @@ const result = await account.updateMFA({
11
12
  });
12
13
 
13
14
  console.log(result);
15
+ ```
@@ -1,3 +1,4 @@
1
+ ```javascript
1
2
  import { Client, Account } from "react-native-appwrite";
2
3
 
3
4
  const client = new Client()
@@ -11,3 +12,4 @@ const result = await account.updateName({
11
12
  });
12
13
 
13
14
  console.log(result);
15
+ ```
@@ -1,3 +1,4 @@
1
+ ```javascript
1
2
  import { Client, Account } from "react-native-appwrite";
2
3
 
3
4
  const client = new Client()
@@ -12,3 +13,4 @@ const result = await account.updatePassword({
12
13
  });
13
14
 
14
15
  console.log(result);
16
+ ```
@@ -1,3 +1,4 @@
1
+ ```javascript
1
2
  import { Client, Account } from "react-native-appwrite";
2
3
 
3
4
  const client = new Client()
@@ -12,3 +13,4 @@ const result = await account.updatePhoneSession({
12
13
  });
13
14
 
14
15
  console.log(result);
16
+ ```
@@ -1,3 +1,4 @@
1
+ ```javascript
1
2
  import { Client, Account } from "react-native-appwrite";
2
3
 
3
4
  const client = new Client()
@@ -12,3 +13,4 @@ const result = await account.updatePhoneVerification({
12
13
  });
13
14
 
14
15
  console.log(result);
16
+ ```
@@ -1,3 +1,4 @@
1
+ ```javascript
1
2
  import { Client, Account } from "react-native-appwrite";
2
3
 
3
4
  const client = new Client()
@@ -12,3 +13,4 @@ const result = await account.updatePhone({
12
13
  });
13
14
 
14
15
  console.log(result);
16
+ ```
@@ -1,3 +1,4 @@
1
+ ```javascript
1
2
  import { Client, Account } from "react-native-appwrite";
2
3
 
3
4
  const client = new Client()
@@ -15,3 +16,4 @@ const result = await account.updatePrefs({
15
16
  });
16
17
 
17
18
  console.log(result);
19
+ ```
@@ -1,3 +1,4 @@
1
+ ```javascript
1
2
  import { Client, Account } from "react-native-appwrite";
2
3
 
3
4
  const client = new Client()
@@ -12,3 +13,4 @@ const result = await account.updatePushTarget({
12
13
  });
13
14
 
14
15
  console.log(result);
16
+ ```
@@ -1,3 +1,4 @@
1
+ ```javascript
1
2
  import { Client, Account } from "react-native-appwrite";
2
3
 
3
4
  const client = new Client()
@@ -13,3 +14,4 @@ const result = await account.updateRecovery({
13
14
  });
14
15
 
15
16
  console.log(result);
17
+ ```
@@ -1,3 +1,4 @@
1
+ ```javascript
1
2
  import { Client, Account } from "react-native-appwrite";
2
3
 
3
4
  const client = new Client()
@@ -11,3 +12,4 @@ const result = await account.updateSession({
11
12
  });
12
13
 
13
14
  console.log(result);
15
+ ```
@@ -1,3 +1,4 @@
1
+ ```javascript
1
2
  import { Client, Account } from "react-native-appwrite";
2
3
 
3
4
  const client = new Client()
@@ -9,3 +10,4 @@ const account = new Account(client);
9
10
  const result = await account.updateStatus();
10
11
 
11
12
  console.log(result);
13
+ ```
@@ -1,3 +1,4 @@
1
+ ```javascript
1
2
  import { Client, Account } from "react-native-appwrite";
2
3
 
3
4
  const client = new Client()
@@ -12,3 +13,4 @@ const result = await account.updateVerification({
12
13
  });
13
14
 
14
15
  console.log(result);
16
+ ```
@@ -1,3 +1,4 @@
1
+ ```javascript
1
2
  import { Client, Avatars, Browser } from "react-native-appwrite";
2
3
 
3
4
  const client = new Client()
@@ -14,3 +15,4 @@ const result = avatars.getBrowser({
14
15
  });
15
16
 
16
17
  console.log(result);
18
+ ```
@@ -1,3 +1,4 @@
1
+ ```javascript
1
2
  import { Client, Avatars, CreditCard } from "react-native-appwrite";
2
3
 
3
4
  const client = new Client()
@@ -14,3 +15,4 @@ const result = avatars.getCreditCard({
14
15
  });
15
16
 
16
17
  console.log(result);
18
+ ```
@@ -1,3 +1,4 @@
1
+ ```javascript
1
2
  import { Client, Avatars } from "react-native-appwrite";
2
3
 
3
4
  const client = new Client()
@@ -11,3 +12,4 @@ const result = avatars.getFavicon({
11
12
  });
12
13
 
13
14
  console.log(result);
15
+ ```
@@ -1,3 +1,4 @@
1
+ ```javascript
1
2
  import { Client, Avatars, Flag } from "react-native-appwrite";
2
3
 
3
4
  const client = new Client()
@@ -14,3 +15,4 @@ const result = avatars.getFlag({
14
15
  });
15
16
 
16
17
  console.log(result);
18
+ ```
@@ -1,3 +1,4 @@
1
+ ```javascript
1
2
  import { Client, Avatars } from "react-native-appwrite";
2
3
 
3
4
  const client = new Client()
@@ -13,3 +14,4 @@ const result = avatars.getImage({
13
14
  });
14
15
 
15
16
  console.log(result);
17
+ ```
@@ -1,3 +1,4 @@
1
+ ```javascript
1
2
  import { Client, Avatars } from "react-native-appwrite";
2
3
 
3
4
  const client = new Client()
@@ -14,3 +15,4 @@ const result = avatars.getInitials({
14
15
  });
15
16
 
16
17
  console.log(result);
18
+ ```
@@ -1,3 +1,4 @@
1
+ ```javascript
1
2
  import { Client, Avatars } from "react-native-appwrite";
2
3
 
3
4
  const client = new Client()
@@ -14,3 +15,4 @@ const result = avatars.getQR({
14
15
  });
15
16
 
16
17
  console.log(result);
18
+ ```
@@ -1,4 +1,5 @@
1
- import { Client, Avatars, Theme, Timezone, Output } from "react-native-appwrite";
1
+ ```javascript
2
+ import { Client, Avatars, Theme, Timezone, BrowserPermission, ImageFormat } from "react-native-appwrite";
2
3
 
3
4
  const client = new Client()
4
5
  .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
@@ -15,21 +16,22 @@ const result = avatars.getScreenshot({
15
16
  viewportWidth: 1920, // optional
16
17
  viewportHeight: 1080, // optional
17
18
  scale: 2, // optional
18
- theme: Theme.Light, // optional
19
+ theme: Theme.Dark, // optional
19
20
  userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit/605.1.15', // optional
20
21
  fullpage: true, // optional
21
22
  locale: 'en-US', // optional
22
- timezone: Timezone.AfricaAbidjan, // optional
23
+ timezone: Timezone.AmericaNewYork, // optional
23
24
  latitude: 37.7749, // optional
24
25
  longitude: -122.4194, // optional
25
26
  accuracy: 100, // optional
26
27
  touch: true, // optional
27
- permissions: ["geolocation","notifications"], // optional
28
+ permissions: [BrowserPermission.Geolocation, BrowserPermission.Notifications], // optional
28
29
  sleep: 3, // optional
29
30
  width: 800, // optional
30
31
  height: 600, // optional
31
32
  quality: 85, // optional
32
- output: Output.Jpg // optional
33
+ output: ImageFormat.Jpeg // optional
33
34
  });
34
35
 
35
36
  console.log(result);
37
+ ```
@@ -1,3 +1,4 @@
1
+ ```javascript
1
2
  import { Client, Databases, Permission, Role } from "react-native-appwrite";
2
3
 
3
4
  const client = new Client()
@@ -22,3 +23,4 @@ const result = await databases.createDocument({
22
23
  });
23
24
 
24
25
  console.log(result);
26
+ ```
@@ -1,3 +1,4 @@
1
+ ```javascript
1
2
  import { Client, Databases } from "react-native-appwrite";
2
3
 
3
4
  const client = new Client()
@@ -22,3 +23,4 @@ const result = await databases.createOperations({
22
23
  });
23
24
 
24
25
  console.log(result);
26
+ ```