@appwrite.io/console 0.0.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.
Files changed (228) hide show
  1. package/.github/workflows/publish.yml +18 -0
  2. package/CHANGELOG.md +1 -0
  3. package/LICENSE +12 -0
  4. package/README.md +111 -0
  5. package/dist/cjs/package.json +3 -0
  6. package/dist/esm/package.json +3 -0
  7. package/docs/examples/account/create-anonymous-session.md +18 -0
  8. package/docs/examples/account/create-email-session.md +18 -0
  9. package/docs/examples/account/create-j-w-t.md +18 -0
  10. package/docs/examples/account/create-magic-u-r-l-session.md +18 -0
  11. package/docs/examples/account/create-o-auth2session.md +14 -0
  12. package/docs/examples/account/create-phone-session.md +18 -0
  13. package/docs/examples/account/create-phone-verification.md +18 -0
  14. package/docs/examples/account/create-recovery.md +18 -0
  15. package/docs/examples/account/create-verification.md +18 -0
  16. package/docs/examples/account/create.md +18 -0
  17. package/docs/examples/account/delete-session.md +18 -0
  18. package/docs/examples/account/delete-sessions.md +18 -0
  19. package/docs/examples/account/get-prefs.md +18 -0
  20. package/docs/examples/account/get-session.md +18 -0
  21. package/docs/examples/account/get.md +18 -0
  22. package/docs/examples/account/list-logs.md +18 -0
  23. package/docs/examples/account/list-sessions.md +18 -0
  24. package/docs/examples/account/update-email.md +18 -0
  25. package/docs/examples/account/update-magic-u-r-l-session.md +18 -0
  26. package/docs/examples/account/update-name.md +18 -0
  27. package/docs/examples/account/update-password.md +18 -0
  28. package/docs/examples/account/update-phone-session.md +18 -0
  29. package/docs/examples/account/update-phone-verification.md +18 -0
  30. package/docs/examples/account/update-phone.md +18 -0
  31. package/docs/examples/account/update-prefs.md +18 -0
  32. package/docs/examples/account/update-recovery.md +18 -0
  33. package/docs/examples/account/update-session.md +18 -0
  34. package/docs/examples/account/update-status.md +18 -0
  35. package/docs/examples/account/update-verification.md +18 -0
  36. package/docs/examples/avatars/get-browser.md +14 -0
  37. package/docs/examples/avatars/get-credit-card.md +14 -0
  38. package/docs/examples/avatars/get-favicon.md +14 -0
  39. package/docs/examples/avatars/get-flag.md +14 -0
  40. package/docs/examples/avatars/get-image.md +14 -0
  41. package/docs/examples/avatars/get-initials.md +14 -0
  42. package/docs/examples/avatars/get-q-r.md +14 -0
  43. package/docs/examples/databases/create-boolean-attribute.md +18 -0
  44. package/docs/examples/databases/create-collection.md +18 -0
  45. package/docs/examples/databases/create-datetime-attribute.md +18 -0
  46. package/docs/examples/databases/create-document.md +18 -0
  47. package/docs/examples/databases/create-email-attribute.md +18 -0
  48. package/docs/examples/databases/create-enum-attribute.md +18 -0
  49. package/docs/examples/databases/create-float-attribute.md +18 -0
  50. package/docs/examples/databases/create-index.md +18 -0
  51. package/docs/examples/databases/create-integer-attribute.md +18 -0
  52. package/docs/examples/databases/create-ip-attribute.md +18 -0
  53. package/docs/examples/databases/create-string-attribute.md +18 -0
  54. package/docs/examples/databases/create-url-attribute.md +18 -0
  55. package/docs/examples/databases/create.md +18 -0
  56. package/docs/examples/databases/delete-attribute.md +18 -0
  57. package/docs/examples/databases/delete-collection.md +18 -0
  58. package/docs/examples/databases/delete-document.md +18 -0
  59. package/docs/examples/databases/delete-index.md +18 -0
  60. package/docs/examples/databases/delete.md +18 -0
  61. package/docs/examples/databases/get-attribute.md +18 -0
  62. package/docs/examples/databases/get-collection-usage.md +18 -0
  63. package/docs/examples/databases/get-collection.md +18 -0
  64. package/docs/examples/databases/get-database-usage.md +18 -0
  65. package/docs/examples/databases/get-document.md +18 -0
  66. package/docs/examples/databases/get-index.md +18 -0
  67. package/docs/examples/databases/get-usage.md +18 -0
  68. package/docs/examples/databases/get.md +18 -0
  69. package/docs/examples/databases/list-attributes.md +18 -0
  70. package/docs/examples/databases/list-collection-logs.md +18 -0
  71. package/docs/examples/databases/list-collections.md +18 -0
  72. package/docs/examples/databases/list-document-logs.md +18 -0
  73. package/docs/examples/databases/list-documents.md +18 -0
  74. package/docs/examples/databases/list-indexes.md +18 -0
  75. package/docs/examples/databases/list-logs.md +18 -0
  76. package/docs/examples/databases/list.md +18 -0
  77. package/docs/examples/databases/update-collection.md +18 -0
  78. package/docs/examples/databases/update-document.md +18 -0
  79. package/docs/examples/databases/update.md +18 -0
  80. package/docs/examples/functions/create-build.md +18 -0
  81. package/docs/examples/functions/create-deployment.md +18 -0
  82. package/docs/examples/functions/create-execution.md +18 -0
  83. package/docs/examples/functions/create-variable.md +18 -0
  84. package/docs/examples/functions/create.md +18 -0
  85. package/docs/examples/functions/delete-deployment.md +18 -0
  86. package/docs/examples/functions/delete-variable.md +18 -0
  87. package/docs/examples/functions/delete.md +18 -0
  88. package/docs/examples/functions/get-deployment.md +18 -0
  89. package/docs/examples/functions/get-execution.md +18 -0
  90. package/docs/examples/functions/get-function-usage.md +18 -0
  91. package/docs/examples/functions/get-usage.md +18 -0
  92. package/docs/examples/functions/get-variable.md +18 -0
  93. package/docs/examples/functions/get.md +18 -0
  94. package/docs/examples/functions/list-deployments.md +18 -0
  95. package/docs/examples/functions/list-executions.md +18 -0
  96. package/docs/examples/functions/list-runtimes.md +18 -0
  97. package/docs/examples/functions/list-variables.md +18 -0
  98. package/docs/examples/functions/list.md +18 -0
  99. package/docs/examples/functions/update-deployment.md +18 -0
  100. package/docs/examples/functions/update-variable.md +18 -0
  101. package/docs/examples/functions/update.md +18 -0
  102. package/docs/examples/graphql/mutation.md +18 -0
  103. package/docs/examples/graphql/query.md +18 -0
  104. package/docs/examples/health/get-antivirus.md +18 -0
  105. package/docs/examples/health/get-cache.md +18 -0
  106. package/docs/examples/health/get-d-b.md +18 -0
  107. package/docs/examples/health/get-queue-certificates.md +18 -0
  108. package/docs/examples/health/get-queue-functions.md +18 -0
  109. package/docs/examples/health/get-queue-logs.md +18 -0
  110. package/docs/examples/health/get-queue-webhooks.md +18 -0
  111. package/docs/examples/health/get-storage-local.md +18 -0
  112. package/docs/examples/health/get-time.md +18 -0
  113. package/docs/examples/health/get.md +18 -0
  114. package/docs/examples/locale/get.md +18 -0
  115. package/docs/examples/locale/list-continents.md +18 -0
  116. package/docs/examples/locale/list-countries-e-u.md +18 -0
  117. package/docs/examples/locale/list-countries-phones.md +18 -0
  118. package/docs/examples/locale/list-countries.md +18 -0
  119. package/docs/examples/locale/list-currencies.md +18 -0
  120. package/docs/examples/locale/list-languages.md +18 -0
  121. package/docs/examples/projects/create-domain.md +18 -0
  122. package/docs/examples/projects/create-key.md +18 -0
  123. package/docs/examples/projects/create-platform.md +18 -0
  124. package/docs/examples/projects/create-webhook.md +18 -0
  125. package/docs/examples/projects/create.md +18 -0
  126. package/docs/examples/projects/delete-domain.md +18 -0
  127. package/docs/examples/projects/delete-key.md +18 -0
  128. package/docs/examples/projects/delete-platform.md +18 -0
  129. package/docs/examples/projects/delete-webhook.md +18 -0
  130. package/docs/examples/projects/delete.md +18 -0
  131. package/docs/examples/projects/get-domain.md +18 -0
  132. package/docs/examples/projects/get-key.md +18 -0
  133. package/docs/examples/projects/get-platform.md +18 -0
  134. package/docs/examples/projects/get-usage.md +18 -0
  135. package/docs/examples/projects/get-webhook.md +18 -0
  136. package/docs/examples/projects/get.md +18 -0
  137. package/docs/examples/projects/list-domains.md +18 -0
  138. package/docs/examples/projects/list-keys.md +18 -0
  139. package/docs/examples/projects/list-platforms.md +18 -0
  140. package/docs/examples/projects/list-webhooks.md +18 -0
  141. package/docs/examples/projects/list.md +18 -0
  142. package/docs/examples/projects/update-auth-duration.md +18 -0
  143. package/docs/examples/projects/update-auth-limit.md +18 -0
  144. package/docs/examples/projects/update-auth-sessions-limit.md +18 -0
  145. package/docs/examples/projects/update-auth-status.md +18 -0
  146. package/docs/examples/projects/update-domain-verification.md +18 -0
  147. package/docs/examples/projects/update-key.md +18 -0
  148. package/docs/examples/projects/update-o-auth2.md +18 -0
  149. package/docs/examples/projects/update-platform.md +18 -0
  150. package/docs/examples/projects/update-service-status.md +18 -0
  151. package/docs/examples/projects/update-webhook-signature.md +18 -0
  152. package/docs/examples/projects/update-webhook.md +18 -0
  153. package/docs/examples/projects/update.md +18 -0
  154. package/docs/examples/storage/create-bucket.md +18 -0
  155. package/docs/examples/storage/create-file.md +18 -0
  156. package/docs/examples/storage/delete-bucket.md +18 -0
  157. package/docs/examples/storage/delete-file.md +18 -0
  158. package/docs/examples/storage/get-bucket-usage.md +18 -0
  159. package/docs/examples/storage/get-bucket.md +18 -0
  160. package/docs/examples/storage/get-file-download.md +14 -0
  161. package/docs/examples/storage/get-file-preview.md +14 -0
  162. package/docs/examples/storage/get-file-view.md +14 -0
  163. package/docs/examples/storage/get-file.md +18 -0
  164. package/docs/examples/storage/get-usage.md +18 -0
  165. package/docs/examples/storage/list-buckets.md +18 -0
  166. package/docs/examples/storage/list-files.md +18 -0
  167. package/docs/examples/storage/update-bucket.md +18 -0
  168. package/docs/examples/storage/update-file.md +18 -0
  169. package/docs/examples/teams/create-membership.md +18 -0
  170. package/docs/examples/teams/create.md +18 -0
  171. package/docs/examples/teams/delete-membership.md +18 -0
  172. package/docs/examples/teams/delete.md +18 -0
  173. package/docs/examples/teams/get-membership.md +18 -0
  174. package/docs/examples/teams/get.md +18 -0
  175. package/docs/examples/teams/list-logs.md +18 -0
  176. package/docs/examples/teams/list-memberships.md +18 -0
  177. package/docs/examples/teams/list.md +18 -0
  178. package/docs/examples/teams/update-membership-roles.md +18 -0
  179. package/docs/examples/teams/update-membership-status.md +18 -0
  180. package/docs/examples/teams/update.md +18 -0
  181. package/docs/examples/users/create-argon2user.md +18 -0
  182. package/docs/examples/users/create-bcrypt-user.md +18 -0
  183. package/docs/examples/users/create-m-d5user.md +18 -0
  184. package/docs/examples/users/create-p-h-pass-user.md +18 -0
  185. package/docs/examples/users/create-s-h-a-user.md +18 -0
  186. package/docs/examples/users/create-scrypt-modified-user.md +18 -0
  187. package/docs/examples/users/create-scrypt-user.md +18 -0
  188. package/docs/examples/users/create.md +18 -0
  189. package/docs/examples/users/delete-session.md +18 -0
  190. package/docs/examples/users/delete-sessions.md +18 -0
  191. package/docs/examples/users/delete.md +18 -0
  192. package/docs/examples/users/get-prefs.md +18 -0
  193. package/docs/examples/users/get-usage.md +18 -0
  194. package/docs/examples/users/get.md +18 -0
  195. package/docs/examples/users/list-logs.md +18 -0
  196. package/docs/examples/users/list-memberships.md +18 -0
  197. package/docs/examples/users/list-sessions.md +18 -0
  198. package/docs/examples/users/list.md +18 -0
  199. package/docs/examples/users/update-email-verification.md +18 -0
  200. package/docs/examples/users/update-email.md +18 -0
  201. package/docs/examples/users/update-name.md +18 -0
  202. package/docs/examples/users/update-password.md +18 -0
  203. package/docs/examples/users/update-phone-verification.md +18 -0
  204. package/docs/examples/users/update-phone.md +18 -0
  205. package/docs/examples/users/update-prefs.md +18 -0
  206. package/docs/examples/users/update-status.md +18 -0
  207. package/package.json +40 -0
  208. package/rollup.config.js +31 -0
  209. package/src/client.ts +472 -0
  210. package/src/id.ts +9 -0
  211. package/src/index.ts +17 -0
  212. package/src/models.ts +2540 -0
  213. package/src/permission.ts +22 -0
  214. package/src/query.ts +56 -0
  215. package/src/role.ts +34 -0
  216. package/src/service.ts +30 -0
  217. package/src/services/account.ts +1009 -0
  218. package/src/services/avatars.ts +351 -0
  219. package/src/services/databases.ts +1525 -0
  220. package/src/services/functions.ts +814 -0
  221. package/src/services/graphql.ts +68 -0
  222. package/src/services/health.ts +202 -0
  223. package/src/services/locale.ts +150 -0
  224. package/src/services/projects.ts +1235 -0
  225. package/src/services/storage.ts +691 -0
  226. package/src/services/teams.ts +445 -0
  227. package/src/services/users.ts +1020 -0
  228. package/tsconfig.json +24 -0
@@ -0,0 +1,18 @@
1
+ import { Client, Projects } from "@appwrite.io/console";
2
+
3
+ const client = new Client();
4
+
5
+ const projects = new Projects(client);
6
+
7
+ client
8
+ .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
9
+ .setProject('5df5acd0d48c2') // Your project ID
10
+ ;
11
+
12
+ const promise = projects.get('[PROJECT_ID]');
13
+
14
+ promise.then(function (response) {
15
+ console.log(response); // Success
16
+ }, function (error) {
17
+ console.log(error); // Failure
18
+ });
@@ -0,0 +1,18 @@
1
+ import { Client, Projects } from "@appwrite.io/console";
2
+
3
+ const client = new Client();
4
+
5
+ const projects = new Projects(client);
6
+
7
+ client
8
+ .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
9
+ .setProject('5df5acd0d48c2') // Your project ID
10
+ ;
11
+
12
+ const promise = projects.listDomains('[PROJECT_ID]');
13
+
14
+ promise.then(function (response) {
15
+ console.log(response); // Success
16
+ }, function (error) {
17
+ console.log(error); // Failure
18
+ });
@@ -0,0 +1,18 @@
1
+ import { Client, Projects } from "@appwrite.io/console";
2
+
3
+ const client = new Client();
4
+
5
+ const projects = new Projects(client);
6
+
7
+ client
8
+ .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
9
+ .setProject('5df5acd0d48c2') // Your project ID
10
+ ;
11
+
12
+ const promise = projects.listKeys('[PROJECT_ID]');
13
+
14
+ promise.then(function (response) {
15
+ console.log(response); // Success
16
+ }, function (error) {
17
+ console.log(error); // Failure
18
+ });
@@ -0,0 +1,18 @@
1
+ import { Client, Projects } from "@appwrite.io/console";
2
+
3
+ const client = new Client();
4
+
5
+ const projects = new Projects(client);
6
+
7
+ client
8
+ .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
9
+ .setProject('5df5acd0d48c2') // Your project ID
10
+ ;
11
+
12
+ const promise = projects.listPlatforms('[PROJECT_ID]');
13
+
14
+ promise.then(function (response) {
15
+ console.log(response); // Success
16
+ }, function (error) {
17
+ console.log(error); // Failure
18
+ });
@@ -0,0 +1,18 @@
1
+ import { Client, Projects } from "@appwrite.io/console";
2
+
3
+ const client = new Client();
4
+
5
+ const projects = new Projects(client);
6
+
7
+ client
8
+ .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
9
+ .setProject('5df5acd0d48c2') // Your project ID
10
+ ;
11
+
12
+ const promise = projects.listWebhooks('[PROJECT_ID]');
13
+
14
+ promise.then(function (response) {
15
+ console.log(response); // Success
16
+ }, function (error) {
17
+ console.log(error); // Failure
18
+ });
@@ -0,0 +1,18 @@
1
+ import { Client, Projects } from "@appwrite.io/console";
2
+
3
+ const client = new Client();
4
+
5
+ const projects = new Projects(client);
6
+
7
+ client
8
+ .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
9
+ .setProject('5df5acd0d48c2') // Your project ID
10
+ ;
11
+
12
+ const promise = projects.list();
13
+
14
+ promise.then(function (response) {
15
+ console.log(response); // Success
16
+ }, function (error) {
17
+ console.log(error); // Failure
18
+ });
@@ -0,0 +1,18 @@
1
+ import { Client, Projects } from "@appwrite.io/console";
2
+
3
+ const client = new Client();
4
+
5
+ const projects = new Projects(client);
6
+
7
+ client
8
+ .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
9
+ .setProject('5df5acd0d48c2') // Your project ID
10
+ ;
11
+
12
+ const promise = projects.updateAuthDuration('[PROJECT_ID]', 0);
13
+
14
+ promise.then(function (response) {
15
+ console.log(response); // Success
16
+ }, function (error) {
17
+ console.log(error); // Failure
18
+ });
@@ -0,0 +1,18 @@
1
+ import { Client, Projects } from "@appwrite.io/console";
2
+
3
+ const client = new Client();
4
+
5
+ const projects = new Projects(client);
6
+
7
+ client
8
+ .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
9
+ .setProject('5df5acd0d48c2') // Your project ID
10
+ ;
11
+
12
+ const promise = projects.updateAuthLimit('[PROJECT_ID]', 0);
13
+
14
+ promise.then(function (response) {
15
+ console.log(response); // Success
16
+ }, function (error) {
17
+ console.log(error); // Failure
18
+ });
@@ -0,0 +1,18 @@
1
+ import { Client, Projects } from "@appwrite.io/console";
2
+
3
+ const client = new Client();
4
+
5
+ const projects = new Projects(client);
6
+
7
+ client
8
+ .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
9
+ .setProject('5df5acd0d48c2') // Your project ID
10
+ ;
11
+
12
+ const promise = projects.updateAuthSessionsLimit('[PROJECT_ID]', 1);
13
+
14
+ promise.then(function (response) {
15
+ console.log(response); // Success
16
+ }, function (error) {
17
+ console.log(error); // Failure
18
+ });
@@ -0,0 +1,18 @@
1
+ import { Client, Projects } from "@appwrite.io/console";
2
+
3
+ const client = new Client();
4
+
5
+ const projects = new Projects(client);
6
+
7
+ client
8
+ .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
9
+ .setProject('5df5acd0d48c2') // Your project ID
10
+ ;
11
+
12
+ const promise = projects.updateAuthStatus('[PROJECT_ID]', 'email-password', false);
13
+
14
+ promise.then(function (response) {
15
+ console.log(response); // Success
16
+ }, function (error) {
17
+ console.log(error); // Failure
18
+ });
@@ -0,0 +1,18 @@
1
+ import { Client, Projects } from "@appwrite.io/console";
2
+
3
+ const client = new Client();
4
+
5
+ const projects = new Projects(client);
6
+
7
+ client
8
+ .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
9
+ .setProject('5df5acd0d48c2') // Your project ID
10
+ ;
11
+
12
+ const promise = projects.updateDomainVerification('[PROJECT_ID]', '[DOMAIN_ID]');
13
+
14
+ promise.then(function (response) {
15
+ console.log(response); // Success
16
+ }, function (error) {
17
+ console.log(error); // Failure
18
+ });
@@ -0,0 +1,18 @@
1
+ import { Client, Projects } from "@appwrite.io/console";
2
+
3
+ const client = new Client();
4
+
5
+ const projects = new Projects(client);
6
+
7
+ client
8
+ .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
9
+ .setProject('5df5acd0d48c2') // Your project ID
10
+ ;
11
+
12
+ const promise = projects.updateKey('[PROJECT_ID]', '[KEY_ID]', '[NAME]', []);
13
+
14
+ promise.then(function (response) {
15
+ console.log(response); // Success
16
+ }, function (error) {
17
+ console.log(error); // Failure
18
+ });
@@ -0,0 +1,18 @@
1
+ import { Client, Projects } from "@appwrite.io/console";
2
+
3
+ const client = new Client();
4
+
5
+ const projects = new Projects(client);
6
+
7
+ client
8
+ .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
9
+ .setProject('5df5acd0d48c2') // Your project ID
10
+ ;
11
+
12
+ const promise = projects.updateOAuth2('[PROJECT_ID]', 'amazon');
13
+
14
+ promise.then(function (response) {
15
+ console.log(response); // Success
16
+ }, function (error) {
17
+ console.log(error); // Failure
18
+ });
@@ -0,0 +1,18 @@
1
+ import { Client, Projects } from "@appwrite.io/console";
2
+
3
+ const client = new Client();
4
+
5
+ const projects = new Projects(client);
6
+
7
+ client
8
+ .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
9
+ .setProject('5df5acd0d48c2') // Your project ID
10
+ ;
11
+
12
+ const promise = projects.updatePlatform('[PROJECT_ID]', '[PLATFORM_ID]', '[NAME]');
13
+
14
+ promise.then(function (response) {
15
+ console.log(response); // Success
16
+ }, function (error) {
17
+ console.log(error); // Failure
18
+ });
@@ -0,0 +1,18 @@
1
+ import { Client, Projects } from "@appwrite.io/console";
2
+
3
+ const client = new Client();
4
+
5
+ const projects = new Projects(client);
6
+
7
+ client
8
+ .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
9
+ .setProject('5df5acd0d48c2') // Your project ID
10
+ ;
11
+
12
+ const promise = projects.updateServiceStatus('[PROJECT_ID]', 'account', false);
13
+
14
+ promise.then(function (response) {
15
+ console.log(response); // Success
16
+ }, function (error) {
17
+ console.log(error); // Failure
18
+ });
@@ -0,0 +1,18 @@
1
+ import { Client, Projects } from "@appwrite.io/console";
2
+
3
+ const client = new Client();
4
+
5
+ const projects = new Projects(client);
6
+
7
+ client
8
+ .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
9
+ .setProject('5df5acd0d48c2') // Your project ID
10
+ ;
11
+
12
+ const promise = projects.updateWebhookSignature('[PROJECT_ID]', '[WEBHOOK_ID]');
13
+
14
+ promise.then(function (response) {
15
+ console.log(response); // Success
16
+ }, function (error) {
17
+ console.log(error); // Failure
18
+ });
@@ -0,0 +1,18 @@
1
+ import { Client, Projects } from "@appwrite.io/console";
2
+
3
+ const client = new Client();
4
+
5
+ const projects = new Projects(client);
6
+
7
+ client
8
+ .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
9
+ .setProject('5df5acd0d48c2') // Your project ID
10
+ ;
11
+
12
+ const promise = projects.updateWebhook('[PROJECT_ID]', '[WEBHOOK_ID]', '[NAME]', [], 'https://example.com', false);
13
+
14
+ promise.then(function (response) {
15
+ console.log(response); // Success
16
+ }, function (error) {
17
+ console.log(error); // Failure
18
+ });
@@ -0,0 +1,18 @@
1
+ import { Client, Projects } from "@appwrite.io/console";
2
+
3
+ const client = new Client();
4
+
5
+ const projects = new Projects(client);
6
+
7
+ client
8
+ .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
9
+ .setProject('5df5acd0d48c2') // Your project ID
10
+ ;
11
+
12
+ const promise = projects.update('[PROJECT_ID]', '[NAME]');
13
+
14
+ promise.then(function (response) {
15
+ console.log(response); // Success
16
+ }, function (error) {
17
+ console.log(error); // Failure
18
+ });
@@ -0,0 +1,18 @@
1
+ import { Client, Storage } from "@appwrite.io/console";
2
+
3
+ const client = new Client();
4
+
5
+ const storage = new Storage(client);
6
+
7
+ client
8
+ .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
9
+ .setProject('5df5acd0d48c2') // Your project ID
10
+ ;
11
+
12
+ const promise = storage.createBucket('[BUCKET_ID]', '[NAME]');
13
+
14
+ promise.then(function (response) {
15
+ console.log(response); // Success
16
+ }, function (error) {
17
+ console.log(error); // Failure
18
+ });
@@ -0,0 +1,18 @@
1
+ import { Client, Storage } from "@appwrite.io/console";
2
+
3
+ const client = new Client();
4
+
5
+ const storage = new Storage(client);
6
+
7
+ client
8
+ .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
9
+ .setProject('5df5acd0d48c2') // Your project ID
10
+ ;
11
+
12
+ const promise = storage.createFile('[BUCKET_ID]', '[FILE_ID]', document.getElementById('uploader').files[0]);
13
+
14
+ promise.then(function (response) {
15
+ console.log(response); // Success
16
+ }, function (error) {
17
+ console.log(error); // Failure
18
+ });
@@ -0,0 +1,18 @@
1
+ import { Client, Storage } from "@appwrite.io/console";
2
+
3
+ const client = new Client();
4
+
5
+ const storage = new Storage(client);
6
+
7
+ client
8
+ .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
9
+ .setProject('5df5acd0d48c2') // Your project ID
10
+ ;
11
+
12
+ const promise = storage.deleteBucket('[BUCKET_ID]');
13
+
14
+ promise.then(function (response) {
15
+ console.log(response); // Success
16
+ }, function (error) {
17
+ console.log(error); // Failure
18
+ });
@@ -0,0 +1,18 @@
1
+ import { Client, Storage } from "@appwrite.io/console";
2
+
3
+ const client = new Client();
4
+
5
+ const storage = new Storage(client);
6
+
7
+ client
8
+ .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
9
+ .setProject('5df5acd0d48c2') // Your project ID
10
+ ;
11
+
12
+ const promise = storage.deleteFile('[BUCKET_ID]', '[FILE_ID]');
13
+
14
+ promise.then(function (response) {
15
+ console.log(response); // Success
16
+ }, function (error) {
17
+ console.log(error); // Failure
18
+ });
@@ -0,0 +1,18 @@
1
+ import { Client, Storage } from "@appwrite.io/console";
2
+
3
+ const client = new Client();
4
+
5
+ const storage = new Storage(client);
6
+
7
+ client
8
+ .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
9
+ .setProject('5df5acd0d48c2') // Your project ID
10
+ ;
11
+
12
+ const promise = storage.getBucketUsage('[BUCKET_ID]');
13
+
14
+ promise.then(function (response) {
15
+ console.log(response); // Success
16
+ }, function (error) {
17
+ console.log(error); // Failure
18
+ });
@@ -0,0 +1,18 @@
1
+ import { Client, Storage } from "@appwrite.io/console";
2
+
3
+ const client = new Client();
4
+
5
+ const storage = new Storage(client);
6
+
7
+ client
8
+ .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
9
+ .setProject('5df5acd0d48c2') // Your project ID
10
+ ;
11
+
12
+ const promise = storage.getBucket('[BUCKET_ID]');
13
+
14
+ promise.then(function (response) {
15
+ console.log(response); // Success
16
+ }, function (error) {
17
+ console.log(error); // Failure
18
+ });
@@ -0,0 +1,14 @@
1
+ import { Client, Storage } from "@appwrite.io/console";
2
+
3
+ const client = new Client();
4
+
5
+ const storage = new Storage(client);
6
+
7
+ client
8
+ .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
9
+ .setProject('5df5acd0d48c2') // Your project ID
10
+ ;
11
+
12
+ const result = storage.getFileDownload('[BUCKET_ID]', '[FILE_ID]');
13
+
14
+ console.log(result); // Resource URL
@@ -0,0 +1,14 @@
1
+ import { Client, Storage } from "@appwrite.io/console";
2
+
3
+ const client = new Client();
4
+
5
+ const storage = new Storage(client);
6
+
7
+ client
8
+ .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
9
+ .setProject('5df5acd0d48c2') // Your project ID
10
+ ;
11
+
12
+ const result = storage.getFilePreview('[BUCKET_ID]', '[FILE_ID]');
13
+
14
+ console.log(result); // Resource URL
@@ -0,0 +1,14 @@
1
+ import { Client, Storage } from "@appwrite.io/console";
2
+
3
+ const client = new Client();
4
+
5
+ const storage = new Storage(client);
6
+
7
+ client
8
+ .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
9
+ .setProject('5df5acd0d48c2') // Your project ID
10
+ ;
11
+
12
+ const result = storage.getFileView('[BUCKET_ID]', '[FILE_ID]');
13
+
14
+ console.log(result); // Resource URL
@@ -0,0 +1,18 @@
1
+ import { Client, Storage } from "@appwrite.io/console";
2
+
3
+ const client = new Client();
4
+
5
+ const storage = new Storage(client);
6
+
7
+ client
8
+ .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
9
+ .setProject('5df5acd0d48c2') // Your project ID
10
+ ;
11
+
12
+ const promise = storage.getFile('[BUCKET_ID]', '[FILE_ID]');
13
+
14
+ promise.then(function (response) {
15
+ console.log(response); // Success
16
+ }, function (error) {
17
+ console.log(error); // Failure
18
+ });
@@ -0,0 +1,18 @@
1
+ import { Client, Storage } from "@appwrite.io/console";
2
+
3
+ const client = new Client();
4
+
5
+ const storage = new Storage(client);
6
+
7
+ client
8
+ .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
9
+ .setProject('5df5acd0d48c2') // Your project ID
10
+ ;
11
+
12
+ const promise = storage.getUsage();
13
+
14
+ promise.then(function (response) {
15
+ console.log(response); // Success
16
+ }, function (error) {
17
+ console.log(error); // Failure
18
+ });
@@ -0,0 +1,18 @@
1
+ import { Client, Storage } from "@appwrite.io/console";
2
+
3
+ const client = new Client();
4
+
5
+ const storage = new Storage(client);
6
+
7
+ client
8
+ .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
9
+ .setProject('5df5acd0d48c2') // Your project ID
10
+ ;
11
+
12
+ const promise = storage.listBuckets();
13
+
14
+ promise.then(function (response) {
15
+ console.log(response); // Success
16
+ }, function (error) {
17
+ console.log(error); // Failure
18
+ });
@@ -0,0 +1,18 @@
1
+ import { Client, Storage } from "@appwrite.io/console";
2
+
3
+ const client = new Client();
4
+
5
+ const storage = new Storage(client);
6
+
7
+ client
8
+ .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
9
+ .setProject('5df5acd0d48c2') // Your project ID
10
+ ;
11
+
12
+ const promise = storage.listFiles('[BUCKET_ID]');
13
+
14
+ promise.then(function (response) {
15
+ console.log(response); // Success
16
+ }, function (error) {
17
+ console.log(error); // Failure
18
+ });
@@ -0,0 +1,18 @@
1
+ import { Client, Storage } from "@appwrite.io/console";
2
+
3
+ const client = new Client();
4
+
5
+ const storage = new Storage(client);
6
+
7
+ client
8
+ .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
9
+ .setProject('5df5acd0d48c2') // Your project ID
10
+ ;
11
+
12
+ const promise = storage.updateBucket('[BUCKET_ID]', '[NAME]');
13
+
14
+ promise.then(function (response) {
15
+ console.log(response); // Success
16
+ }, function (error) {
17
+ console.log(error); // Failure
18
+ });
@@ -0,0 +1,18 @@
1
+ import { Client, Storage } from "@appwrite.io/console";
2
+
3
+ const client = new Client();
4
+
5
+ const storage = new Storage(client);
6
+
7
+ client
8
+ .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
9
+ .setProject('5df5acd0d48c2') // Your project ID
10
+ ;
11
+
12
+ const promise = storage.updateFile('[BUCKET_ID]', '[FILE_ID]');
13
+
14
+ promise.then(function (response) {
15
+ console.log(response); // Success
16
+ }, function (error) {
17
+ console.log(error); // Failure
18
+ });
@@ -0,0 +1,18 @@
1
+ import { Client, Teams } from "@appwrite.io/console";
2
+
3
+ const client = new Client();
4
+
5
+ const teams = new Teams(client);
6
+
7
+ client
8
+ .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
9
+ .setProject('5df5acd0d48c2') // Your project ID
10
+ ;
11
+
12
+ const promise = teams.createMembership('[TEAM_ID]', 'email@example.com', [], 'https://example.com');
13
+
14
+ promise.then(function (response) {
15
+ console.log(response); // Success
16
+ }, function (error) {
17
+ console.log(error); // Failure
18
+ });
@@ -0,0 +1,18 @@
1
+ import { Client, Teams } from "@appwrite.io/console";
2
+
3
+ const client = new Client();
4
+
5
+ const teams = new Teams(client);
6
+
7
+ client
8
+ .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
9
+ .setProject('5df5acd0d48c2') // Your project ID
10
+ ;
11
+
12
+ const promise = teams.create('[TEAM_ID]', '[NAME]');
13
+
14
+ promise.then(function (response) {
15
+ console.log(response); // Success
16
+ }, function (error) {
17
+ console.log(error); // Failure
18
+ });