@appwrite.io/console 0.6.0-rc.8 → 0.6.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 (480) hide show
  1. package/.travis.yml +32 -0
  2. package/README.md +6 -6
  3. package/dist/cjs/sdk.js +1839 -338
  4. package/dist/cjs/sdk.js.map +1 -1
  5. package/dist/esm/sdk.js +1840 -339
  6. package/dist/esm/sdk.js.map +1 -1
  7. package/dist/iife/sdk.js +1839 -338
  8. package/docs/examples/account/create-anonymous-session.md +5 -12
  9. package/docs/examples/account/create-email-password-session.md +8 -12
  10. package/docs/examples/account/create-email-token.md +9 -12
  11. package/docs/examples/account/create-j-w-t.md +5 -12
  12. package/docs/examples/account/create-magic-u-r-l-token.md +10 -12
  13. package/docs/examples/account/create-mfa-authenticator.md +13 -0
  14. package/docs/examples/account/create-mfa-challenge.md +13 -0
  15. package/docs/examples/account/create-mfa-recovery-codes.md +11 -0
  16. package/docs/examples/account/create-o-auth2session.md +10 -9
  17. package/docs/examples/account/create-o-auth2token.md +15 -0
  18. package/docs/examples/account/create-phone-token.md +8 -12
  19. package/docs/examples/account/create-phone-verification.md +5 -12
  20. package/docs/examples/account/create-push-target.md +9 -12
  21. package/docs/examples/account/create-recovery.md +8 -12
  22. package/docs/examples/account/create-session.md +8 -12
  23. package/docs/examples/account/create-verification.md +7 -12
  24. package/docs/examples/account/create.md +10 -12
  25. package/docs/examples/account/delete-identity.md +7 -12
  26. package/docs/examples/account/delete-mfa-authenticator.md +14 -0
  27. package/docs/examples/account/delete-push-target.md +13 -0
  28. package/docs/examples/account/delete-session.md +7 -12
  29. package/docs/examples/account/delete-sessions.md +5 -12
  30. package/docs/examples/account/delete.md +5 -12
  31. package/docs/examples/account/get-mfa-recovery-codes.md +11 -0
  32. package/docs/examples/account/get-prefs.md +5 -12
  33. package/docs/examples/account/get-session.md +7 -12
  34. package/docs/examples/account/get.md +5 -12
  35. package/docs/examples/account/list-identities.md +7 -12
  36. package/docs/examples/account/list-logs.md +7 -12
  37. package/docs/examples/account/list-mfa-factors.md +11 -0
  38. package/docs/examples/account/list-sessions.md +5 -12
  39. package/docs/examples/account/update-email.md +8 -12
  40. package/docs/examples/account/update-m-f-a.md +7 -12
  41. package/docs/examples/account/update-magic-u-r-l-session.md +8 -12
  42. package/docs/examples/account/update-mfa-authenticator.md +14 -0
  43. package/docs/examples/account/update-mfa-challenge.md +14 -0
  44. package/docs/examples/account/update-mfa-recovery-codes.md +11 -0
  45. package/docs/examples/account/update-name.md +7 -12
  46. package/docs/examples/account/update-password.md +8 -12
  47. package/docs/examples/account/update-phone-session.md +14 -0
  48. package/docs/examples/account/update-phone-verification.md +8 -12
  49. package/docs/examples/account/update-phone.md +8 -12
  50. package/docs/examples/account/update-prefs.md +7 -12
  51. package/docs/examples/account/update-push-target.md +8 -12
  52. package/docs/examples/account/update-recovery.md +9 -12
  53. package/docs/examples/account/update-session.md +7 -12
  54. package/docs/examples/account/update-status.md +5 -12
  55. package/docs/examples/account/update-verification.md +8 -12
  56. package/docs/examples/assistant/chat.md +7 -12
  57. package/docs/examples/avatars/get-browser.md +11 -9
  58. package/docs/examples/avatars/get-credit-card.md +11 -9
  59. package/docs/examples/avatars/get-favicon.md +7 -8
  60. package/docs/examples/avatars/get-flag.md +11 -9
  61. package/docs/examples/avatars/get-image.md +9 -8
  62. package/docs/examples/avatars/get-initials.md +10 -8
  63. package/docs/examples/avatars/get-q-r.md +10 -8
  64. package/docs/examples/console/variables.md +5 -12
  65. package/docs/examples/databases/create-boolean-attribute.md +12 -12
  66. package/docs/examples/databases/create-collection.md +12 -12
  67. package/docs/examples/databases/create-datetime-attribute.md +12 -12
  68. package/docs/examples/databases/create-document.md +11 -12
  69. package/docs/examples/databases/create-email-attribute.md +12 -12
  70. package/docs/examples/databases/create-enum-attribute.md +13 -12
  71. package/docs/examples/databases/create-float-attribute.md +14 -12
  72. package/docs/examples/databases/create-index.md +13 -13
  73. package/docs/examples/databases/create-integer-attribute.md +14 -12
  74. package/docs/examples/databases/create-ip-attribute.md +12 -12
  75. package/docs/examples/databases/create-relationship-attribute.md +15 -13
  76. package/docs/examples/databases/create-string-attribute.md +14 -12
  77. package/docs/examples/databases/create-url-attribute.md +12 -12
  78. package/docs/examples/databases/create.md +9 -12
  79. package/docs/examples/databases/delete-attribute.md +9 -12
  80. package/docs/examples/databases/delete-collection.md +8 -12
  81. package/docs/examples/databases/delete-document.md +9 -12
  82. package/docs/examples/databases/delete-index.md +9 -12
  83. package/docs/examples/databases/delete.md +7 -12
  84. package/docs/examples/databases/get-attribute.md +9 -12
  85. package/docs/examples/databases/get-collection-usage.md +10 -13
  86. package/docs/examples/databases/get-collection.md +8 -12
  87. package/docs/examples/databases/get-database-usage.md +9 -13
  88. package/docs/examples/databases/get-document.md +10 -12
  89. package/docs/examples/databases/get-index.md +9 -12
  90. package/docs/examples/databases/get-usage.md +8 -13
  91. package/docs/examples/databases/get.md +7 -12
  92. package/docs/examples/databases/list-attributes.md +9 -12
  93. package/docs/examples/databases/list-collection-logs.md +9 -12
  94. package/docs/examples/databases/list-collections.md +9 -12
  95. package/docs/examples/databases/list-document-logs.md +10 -12
  96. package/docs/examples/databases/list-documents.md +9 -12
  97. package/docs/examples/databases/list-indexes.md +9 -12
  98. package/docs/examples/databases/list-logs.md +8 -12
  99. package/docs/examples/databases/list.md +8 -12
  100. package/docs/examples/databases/update-boolean-attribute.md +11 -12
  101. package/docs/examples/databases/update-collection.md +12 -12
  102. package/docs/examples/databases/update-datetime-attribute.md +11 -12
  103. package/docs/examples/databases/update-document.md +11 -12
  104. package/docs/examples/databases/update-email-attribute.md +11 -12
  105. package/docs/examples/databases/update-enum-attribute.md +12 -12
  106. package/docs/examples/databases/update-float-attribute.md +13 -12
  107. package/docs/examples/databases/update-integer-attribute.md +13 -12
  108. package/docs/examples/databases/update-ip-attribute.md +11 -12
  109. package/docs/examples/databases/update-relationship-attribute.md +11 -13
  110. package/docs/examples/databases/update-string-attribute.md +11 -12
  111. package/docs/examples/databases/update-url-attribute.md +11 -12
  112. package/docs/examples/databases/update.md +9 -12
  113. package/docs/examples/functions/create-build.md +9 -12
  114. package/docs/examples/functions/create-deployment.md +11 -12
  115. package/docs/examples/functions/create-execution.md +13 -13
  116. package/docs/examples/functions/create-variable.md +9 -12
  117. package/docs/examples/functions/create.md +27 -13
  118. package/docs/examples/functions/delete-deployment.md +8 -12
  119. package/docs/examples/functions/delete-variable.md +8 -12
  120. package/docs/examples/functions/delete.md +7 -12
  121. package/docs/examples/functions/download-deployment.md +8 -8
  122. package/docs/examples/functions/get-deployment.md +8 -12
  123. package/docs/examples/functions/get-execution.md +8 -12
  124. package/docs/examples/functions/get-function-usage.md +9 -13
  125. package/docs/examples/functions/get-usage.md +8 -13
  126. package/docs/examples/functions/get-variable.md +8 -12
  127. package/docs/examples/functions/get.md +7 -12
  128. package/docs/examples/functions/list-deployments.md +9 -12
  129. package/docs/examples/functions/list-executions.md +9 -12
  130. package/docs/examples/functions/list-runtimes.md +5 -12
  131. package/docs/examples/functions/list-variables.md +7 -12
  132. package/docs/examples/functions/list.md +8 -12
  133. package/docs/examples/functions/update-deployment.md +8 -12
  134. package/docs/examples/functions/update-variable.md +10 -12
  135. package/docs/examples/functions/update.md +23 -13
  136. package/docs/examples/graphql/mutation.md +7 -12
  137. package/docs/examples/graphql/query.md +7 -12
  138. package/docs/examples/health/get-antivirus.md +5 -12
  139. package/docs/examples/health/get-cache.md +5 -12
  140. package/docs/examples/health/get-certificate.md +13 -0
  141. package/docs/examples/health/get-d-b.md +5 -12
  142. package/docs/examples/health/get-failed-jobs.md +14 -0
  143. package/docs/examples/health/get-pub-sub.md +5 -12
  144. package/docs/examples/health/get-queue-builds.md +7 -12
  145. package/docs/examples/health/get-queue-certificates.md +7 -12
  146. package/docs/examples/health/get-queue-databases.md +8 -12
  147. package/docs/examples/health/get-queue-deletes.md +7 -12
  148. package/docs/examples/health/get-queue-functions.md +7 -12
  149. package/docs/examples/health/get-queue-logs.md +7 -12
  150. package/docs/examples/health/get-queue-mails.md +7 -12
  151. package/docs/examples/health/get-queue-messaging.md +7 -12
  152. package/docs/examples/health/get-queue-migrations.md +7 -12
  153. package/docs/examples/health/get-queue-usage-dump.md +13 -0
  154. package/docs/examples/health/get-queue-usage.md +13 -0
  155. package/docs/examples/health/get-queue-webhooks.md +7 -12
  156. package/docs/examples/health/get-queue.md +5 -12
  157. package/docs/examples/health/get-storage-local.md +5 -12
  158. package/docs/examples/health/get-storage.md +11 -0
  159. package/docs/examples/health/get-time.md +5 -12
  160. package/docs/examples/health/get.md +5 -12
  161. package/docs/examples/locale/get.md +5 -12
  162. package/docs/examples/locale/list-codes.md +5 -12
  163. package/docs/examples/locale/list-continents.md +5 -12
  164. package/docs/examples/locale/list-countries-e-u.md +5 -12
  165. package/docs/examples/locale/list-countries-phones.md +5 -12
  166. package/docs/examples/locale/list-countries.md +5 -12
  167. package/docs/examples/locale/list-currencies.md +5 -12
  168. package/docs/examples/locale/list-languages.md +5 -12
  169. package/docs/examples/messaging/create-apns-provider.md +20 -0
  170. package/docs/examples/messaging/create-email.md +18 -12
  171. package/docs/examples/messaging/create-fcm-provider.md +16 -0
  172. package/docs/examples/messaging/create-mailgun-provider.md +16 -12
  173. package/docs/examples/messaging/create-msg91provider.md +12 -12
  174. package/docs/examples/messaging/create-push.md +22 -12
  175. package/docs/examples/messaging/create-sendgrid-provider.md +14 -12
  176. package/docs/examples/messaging/create-sms.md +19 -0
  177. package/docs/examples/messaging/create-smtp-provider.md +26 -0
  178. package/docs/examples/messaging/create-subscriber.md +9 -12
  179. package/docs/examples/messaging/create-telesign-provider.md +12 -12
  180. package/docs/examples/messaging/create-textmagic-provider.md +12 -12
  181. package/docs/examples/messaging/create-topic.md +9 -12
  182. package/docs/examples/messaging/create-twilio-provider.md +12 -12
  183. package/docs/examples/messaging/create-vonage-provider.md +12 -12
  184. package/docs/examples/messaging/delete-provider.md +7 -12
  185. package/docs/examples/messaging/delete-subscriber.md +8 -12
  186. package/docs/examples/messaging/delete-topic.md +7 -12
  187. package/docs/examples/messaging/delete.md +13 -0
  188. package/docs/examples/messaging/get-message.md +7 -12
  189. package/docs/examples/messaging/get-provider.md +7 -12
  190. package/docs/examples/messaging/get-subscriber.md +8 -12
  191. package/docs/examples/messaging/get-topic.md +7 -12
  192. package/docs/examples/messaging/list-message-logs.md +8 -12
  193. package/docs/examples/messaging/list-messages.md +8 -12
  194. package/docs/examples/messaging/list-provider-logs.md +8 -12
  195. package/docs/examples/messaging/list-providers.md +8 -12
  196. package/docs/examples/messaging/list-subscriber-logs.md +8 -12
  197. package/docs/examples/messaging/list-subscribers.md +9 -12
  198. package/docs/examples/messaging/list-targets.md +8 -12
  199. package/docs/examples/messaging/list-topic-logs.md +8 -12
  200. package/docs/examples/messaging/list-topics.md +8 -12
  201. package/docs/examples/messaging/update-apns-provider.md +20 -0
  202. package/docs/examples/messaging/update-email.md +17 -12
  203. package/docs/examples/messaging/update-fcm-provider.md +16 -0
  204. package/docs/examples/messaging/update-mailgun-provider.md +16 -12
  205. package/docs/examples/messaging/update-msg91provider.md +12 -12
  206. package/docs/examples/messaging/update-push.md +28 -0
  207. package/docs/examples/messaging/update-sendgrid-provider.md +14 -12
  208. package/docs/examples/messaging/update-sms.md +19 -0
  209. package/docs/examples/messaging/update-smtp-provider.md +26 -0
  210. package/docs/examples/messaging/update-telesign-provider.md +12 -12
  211. package/docs/examples/messaging/update-textmagic-provider.md +12 -12
  212. package/docs/examples/messaging/update-topic.md +9 -12
  213. package/docs/examples/messaging/update-twilio-provider.md +12 -12
  214. package/docs/examples/messaging/update-vonage-provider.md +12 -12
  215. package/docs/examples/migrations/create-appwrite-migration.md +10 -12
  216. package/docs/examples/migrations/create-firebase-migration.md +8 -12
  217. package/docs/examples/migrations/create-firebase-o-auth-migration.md +8 -12
  218. package/docs/examples/migrations/create-n-host-migration.md +14 -12
  219. package/docs/examples/migrations/create-supabase-migration.md +13 -12
  220. package/docs/examples/migrations/delete-firebase-auth.md +5 -12
  221. package/docs/examples/migrations/delete.md +7 -12
  222. package/docs/examples/migrations/get-appwrite-report.md +10 -12
  223. package/docs/examples/migrations/get-firebase-report-o-auth.md +8 -12
  224. package/docs/examples/migrations/get-firebase-report.md +8 -12
  225. package/docs/examples/migrations/get-n-host-report.md +14 -12
  226. package/docs/examples/migrations/get-supabase-report.md +13 -12
  227. package/docs/examples/migrations/get.md +7 -12
  228. package/docs/examples/migrations/list-firebase-projects.md +5 -12
  229. package/docs/examples/migrations/list.md +8 -12
  230. package/docs/examples/migrations/retry.md +7 -12
  231. package/docs/examples/project/create-variable.md +8 -12
  232. package/docs/examples/project/delete-variable.md +7 -12
  233. package/docs/examples/project/get-usage.md +10 -13
  234. package/docs/examples/project/get-variable.md +7 -12
  235. package/docs/examples/project/list-variables.md +5 -12
  236. package/docs/examples/project/update-variable.md +9 -12
  237. package/docs/examples/projects/create-key.md +10 -12
  238. package/docs/examples/projects/create-platform.md +13 -13
  239. package/docs/examples/projects/create-smtp-test.md +17 -13
  240. package/docs/examples/projects/create-webhook.md +14 -12
  241. package/docs/examples/projects/create.md +20 -13
  242. package/docs/examples/projects/delete-email-template.md +10 -13
  243. package/docs/examples/projects/delete-key.md +8 -12
  244. package/docs/examples/projects/delete-platform.md +8 -12
  245. package/docs/examples/projects/delete-sms-template.md +10 -13
  246. package/docs/examples/projects/delete-webhook.md +8 -12
  247. package/docs/examples/projects/delete.md +7 -12
  248. package/docs/examples/projects/get-email-template.md +10 -13
  249. package/docs/examples/projects/get-key.md +8 -12
  250. package/docs/examples/projects/get-platform.md +8 -12
  251. package/docs/examples/projects/get-sms-template.md +10 -13
  252. package/docs/examples/projects/get-webhook.md +8 -12
  253. package/docs/examples/projects/get.md +7 -12
  254. package/docs/examples/projects/list-keys.md +7 -12
  255. package/docs/examples/projects/list-platforms.md +7 -12
  256. package/docs/examples/projects/list-webhooks.md +7 -12
  257. package/docs/examples/projects/list.md +8 -12
  258. package/docs/examples/projects/update-api-status-all.md +14 -0
  259. package/docs/examples/projects/update-api-status.md +15 -0
  260. package/docs/examples/projects/update-auth-duration.md +8 -12
  261. package/docs/examples/projects/update-auth-limit.md +8 -12
  262. package/docs/examples/projects/update-auth-password-dictionary.md +8 -12
  263. package/docs/examples/projects/update-auth-password-history.md +8 -12
  264. package/docs/examples/projects/update-auth-sessions-limit.md +8 -12
  265. package/docs/examples/projects/update-auth-status.md +10 -13
  266. package/docs/examples/projects/update-email-template.md +15 -13
  267. package/docs/examples/projects/update-key.md +11 -12
  268. package/docs/examples/projects/update-o-auth2.md +12 -13
  269. package/docs/examples/projects/update-personal-data-check.md +8 -12
  270. package/docs/examples/projects/update-platform.md +12 -12
  271. package/docs/examples/projects/update-service-status-all.md +8 -12
  272. package/docs/examples/projects/update-service-status.md +10 -13
  273. package/docs/examples/projects/update-sms-template.md +11 -13
  274. package/docs/examples/projects/update-smtp.md +17 -13
  275. package/docs/examples/projects/update-team.md +8 -12
  276. package/docs/examples/projects/update-webhook-signature.md +8 -12
  277. package/docs/examples/projects/update-webhook.md +15 -12
  278. package/docs/examples/projects/update.md +17 -12
  279. package/docs/examples/proxy/create-rule.md +10 -13
  280. package/docs/examples/proxy/delete-rule.md +7 -12
  281. package/docs/examples/proxy/get-rule.md +7 -12
  282. package/docs/examples/proxy/list-rules.md +8 -12
  283. package/docs/examples/proxy/update-rule-verification.md +7 -12
  284. package/docs/examples/storage/create-bucket.md +17 -13
  285. package/docs/examples/storage/create-file.md +10 -12
  286. package/docs/examples/storage/delete-bucket.md +7 -12
  287. package/docs/examples/storage/delete-file.md +8 -12
  288. package/docs/examples/storage/get-bucket-usage.md +9 -13
  289. package/docs/examples/storage/get-bucket.md +7 -12
  290. package/docs/examples/storage/get-file-download.md +8 -8
  291. package/docs/examples/storage/get-file-preview.md +20 -9
  292. package/docs/examples/storage/get-file-view.md +8 -8
  293. package/docs/examples/storage/get-file.md +8 -12
  294. package/docs/examples/storage/get-usage.md +8 -13
  295. package/docs/examples/storage/list-buckets.md +8 -12
  296. package/docs/examples/storage/list-files.md +9 -12
  297. package/docs/examples/storage/update-bucket.md +17 -13
  298. package/docs/examples/storage/update-file.md +10 -12
  299. package/docs/examples/teams/create-membership.md +13 -12
  300. package/docs/examples/teams/create.md +9 -12
  301. package/docs/examples/teams/delete-membership.md +8 -12
  302. package/docs/examples/teams/delete.md +7 -12
  303. package/docs/examples/teams/get-membership.md +8 -12
  304. package/docs/examples/teams/get-prefs.md +7 -12
  305. package/docs/examples/teams/get.md +7 -12
  306. package/docs/examples/teams/list-logs.md +8 -12
  307. package/docs/examples/teams/list-memberships.md +9 -12
  308. package/docs/examples/teams/list.md +8 -12
  309. package/docs/examples/teams/update-membership-status.md +10 -12
  310. package/docs/examples/teams/update-membership.md +9 -12
  311. package/docs/examples/teams/update-name.md +8 -12
  312. package/docs/examples/teams/update-prefs.md +8 -12
  313. package/docs/examples/users/create-argon2user.md +10 -12
  314. package/docs/examples/users/create-bcrypt-user.md +10 -12
  315. package/docs/examples/users/create-m-d5user.md +10 -12
  316. package/docs/examples/users/create-mfa-recovery-codes.md +13 -0
  317. package/docs/examples/users/create-p-h-pass-user.md +10 -12
  318. package/docs/examples/users/create-s-h-a-user.md +12 -13
  319. package/docs/examples/users/create-scrypt-modified-user.md +13 -12
  320. package/docs/examples/users/create-scrypt-user.md +15 -12
  321. package/docs/examples/users/create-session.md +7 -12
  322. package/docs/examples/users/create-target.md +13 -13
  323. package/docs/examples/users/create-token.md +9 -12
  324. package/docs/examples/users/create.md +11 -12
  325. package/docs/examples/users/delete-identity.md +7 -12
  326. package/docs/examples/users/delete-mfa-authenticator.md +14 -0
  327. package/docs/examples/users/delete-session.md +8 -12
  328. package/docs/examples/users/delete-sessions.md +7 -12
  329. package/docs/examples/users/delete-target.md +8 -12
  330. package/docs/examples/users/delete.md +7 -12
  331. package/docs/examples/users/get-mfa-recovery-codes.md +13 -0
  332. package/docs/examples/users/get-prefs.md +7 -12
  333. package/docs/examples/users/get-target.md +8 -12
  334. package/docs/examples/users/get-usage.md +8 -13
  335. package/docs/examples/users/get.md +7 -12
  336. package/docs/examples/users/list-identities.md +8 -12
  337. package/docs/examples/users/list-logs.md +8 -12
  338. package/docs/examples/users/list-memberships.md +7 -12
  339. package/docs/examples/users/list-mfa-factors.md +13 -0
  340. package/docs/examples/users/list-sessions.md +7 -12
  341. package/docs/examples/users/list-targets.md +8 -12
  342. package/docs/examples/users/list.md +8 -12
  343. package/docs/examples/users/update-email-verification.md +8 -12
  344. package/docs/examples/users/update-email.md +8 -12
  345. package/docs/examples/users/update-labels.md +8 -12
  346. package/docs/examples/users/update-mfa-recovery-codes.md +13 -0
  347. package/docs/examples/users/update-mfa.md +8 -12
  348. package/docs/examples/users/update-name.md +8 -12
  349. package/docs/examples/users/update-password.md +8 -12
  350. package/docs/examples/users/update-phone-verification.md +8 -12
  351. package/docs/examples/users/update-phone.md +8 -12
  352. package/docs/examples/users/update-prefs.md +8 -12
  353. package/docs/examples/users/update-status.md +8 -12
  354. package/docs/examples/users/update-target.md +11 -12
  355. package/docs/examples/vcs/create-repository-detection.md +9 -12
  356. package/docs/examples/vcs/create-repository.md +9 -12
  357. package/docs/examples/vcs/delete-installation.md +7 -12
  358. package/docs/examples/vcs/get-installation.md +7 -12
  359. package/docs/examples/vcs/get-repository.md +8 -12
  360. package/docs/examples/vcs/list-installations.md +8 -12
  361. package/docs/examples/vcs/list-repositories.md +8 -12
  362. package/docs/examples/vcs/list-repository-branches.md +8 -12
  363. package/docs/examples/vcs/update-external-deployments.md +9 -12
  364. package/package.json +1 -1
  365. package/src/client.ts +3 -3
  366. package/src/enums/api-service.ts +13 -0
  367. package/src/enums/api.ts +5 -0
  368. package/src/enums/auth-method.ts +9 -0
  369. package/src/enums/authentication-factor.ts +6 -0
  370. package/src/enums/authenticator-type.ts +3 -0
  371. package/src/enums/browser.ts +16 -0
  372. package/src/enums/compression.ts +5 -0
  373. package/src/enums/credit-card.ts +18 -0
  374. package/src/enums/database-usage-range.ts +5 -0
  375. package/src/enums/email-template-locale.ts +133 -0
  376. package/src/enums/email-template-type.ts +7 -0
  377. package/src/enums/execution-method.ts +8 -0
  378. package/src/enums/flag.ts +196 -0
  379. package/src/enums/function-usage-range.ts +5 -0
  380. package/src/enums/image-format.ts +7 -0
  381. package/src/enums/image-gravity.ts +11 -0
  382. package/src/enums/index-type.ts +5 -0
  383. package/src/enums/messaging-provider-type.ts +5 -0
  384. package/src/enums/name.ts +15 -0
  385. package/src/enums/o-auth-provider.ts +41 -0
  386. package/src/enums/password-hash.ts +13 -0
  387. package/src/enums/platform-type.ts +15 -0
  388. package/src/enums/project-usage-range.ts +4 -0
  389. package/src/enums/region.ts +4 -0
  390. package/src/enums/relation-mutate.ts +5 -0
  391. package/src/enums/relationship-type.ts +6 -0
  392. package/src/enums/resource-type.ts +4 -0
  393. package/src/enums/runtime.ts +46 -0
  394. package/src/enums/s-m-t-p-secure.ts +3 -0
  395. package/src/enums/sms-template-locale.ts +133 -0
  396. package/src/enums/sms-template-type.ts +6 -0
  397. package/src/enums/smtp-encryption.ts +5 -0
  398. package/src/enums/storage-usage-range.ts +5 -0
  399. package/src/enums/user-usage-range.ts +5 -0
  400. package/src/index.ts +35 -1
  401. package/src/models.ts +61 -23
  402. package/src/query.ts +61 -34
  403. package/src/service.ts +4 -7
  404. package/src/services/account.ts +274 -75
  405. package/src/services/avatars.ts +9 -6
  406. package/src/services/databases.ts +37 -16
  407. package/src/services/functions.ts +13 -10
  408. package/src/services/health.ts +121 -0
  409. package/src/services/messaging.ts +374 -117
  410. package/src/services/migrations.ts +2 -2
  411. package/src/services/project.ts +4 -3
  412. package/src/services/projects.ts +110 -59
  413. package/src/services/proxy.ts +3 -2
  414. package/src/services/storage.ts +17 -13
  415. package/src/services/users.ts +125 -44
  416. package/types/enums/api-service.d.ts +13 -0
  417. package/types/enums/api.d.ts +5 -0
  418. package/types/enums/auth-method.d.ts +9 -0
  419. package/types/enums/authentication-factor.d.ts +6 -0
  420. package/types/enums/authenticator-type.d.ts +3 -0
  421. package/types/enums/browser.d.ts +16 -0
  422. package/types/enums/compression.d.ts +5 -0
  423. package/types/enums/credit-card.d.ts +18 -0
  424. package/types/enums/database-usage-range.d.ts +5 -0
  425. package/types/enums/email-template-locale.d.ts +133 -0
  426. package/types/enums/email-template-type.d.ts +7 -0
  427. package/types/enums/execution-method.d.ts +8 -0
  428. package/types/enums/flag.d.ts +196 -0
  429. package/types/enums/function-usage-range.d.ts +5 -0
  430. package/types/enums/image-format.d.ts +7 -0
  431. package/types/enums/image-gravity.d.ts +11 -0
  432. package/types/enums/index-type.d.ts +5 -0
  433. package/types/enums/messaging-provider-type.d.ts +5 -0
  434. package/types/enums/name.d.ts +15 -0
  435. package/types/enums/o-auth-provider.d.ts +41 -0
  436. package/types/enums/password-hash.d.ts +13 -0
  437. package/types/enums/platform-type.d.ts +15 -0
  438. package/types/enums/project-usage-range.d.ts +4 -0
  439. package/types/enums/region.d.ts +4 -0
  440. package/types/enums/relation-mutate.d.ts +5 -0
  441. package/types/enums/relationship-type.d.ts +6 -0
  442. package/types/enums/resource-type.d.ts +4 -0
  443. package/types/enums/runtime.d.ts +46 -0
  444. package/types/enums/s-m-t-p-secure.d.ts +3 -0
  445. package/types/enums/sms-template-locale.d.ts +133 -0
  446. package/types/enums/sms-template-type.d.ts +6 -0
  447. package/types/enums/smtp-encryption.d.ts +5 -0
  448. package/types/enums/storage-usage-range.d.ts +5 -0
  449. package/types/enums/user-usage-range.d.ts +5 -0
  450. package/types/index.d.ts +34 -0
  451. package/types/models.d.ts +61 -23
  452. package/types/query.d.ts +10 -3
  453. package/types/services/account.d.ts +138 -33
  454. package/types/services/avatars.d.ts +9 -6
  455. package/types/services/databases.d.ts +37 -16
  456. package/types/services/functions.d.ts +13 -10
  457. package/types/services/health.d.ts +56 -0
  458. package/types/services/messaging.d.ts +170 -64
  459. package/types/services/migrations.d.ts +2 -2
  460. package/types/services/project.d.ts +4 -3
  461. package/types/services/projects.d.ts +64 -42
  462. package/types/services/proxy.d.ts +3 -2
  463. package/types/services/storage.d.ts +17 -13
  464. package/types/services/users.d.ts +73 -23
  465. package/docs/examples/account/add-authenticator.md +0 -18
  466. package/docs/examples/account/create-challenge.md +0 -18
  467. package/docs/examples/account/delete-authenticator.md +0 -18
  468. package/docs/examples/account/list-providers.md +0 -18
  469. package/docs/examples/account/update-challenge.md +0 -18
  470. package/docs/examples/account/verify-authenticator.md +0 -18
  471. package/docs/examples/messaging/create-a-p-n-s-provider.md +0 -18
  472. package/docs/examples/messaging/create-f-c-m-provider.md +0 -18
  473. package/docs/examples/messaging/create-s-m-s.md +0 -18
  474. package/docs/examples/messaging/update-a-p-n-s-provider.md +0 -18
  475. package/docs/examples/messaging/update-f-c-m-provider.md +0 -18
  476. package/docs/examples/messaging/update-push-notification.md +0 -18
  477. package/docs/examples/messaging/update-s-m-s.md +0 -18
  478. package/docs/examples/projects/update-auth-mfa-factors.md +0 -18
  479. package/docs/examples/users/delete-authenticator.md +0 -18
  480. package/docs/examples/users/list-providers.md +0 -18
@@ -1,18 +1,20 @@
1
- import { Client, Projects } from "@appwrite.io/console";
1
+ import { Client, Projects, EmailTemplateType, EmailTemplateLocale } from "@appwrite.io/console";
2
2
 
3
- const client = new Client();
3
+ const client = new Client()
4
+ .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
5
+ .setProject('5df5acd0d48c2'); // Your project ID
4
6
 
5
7
  const projects = new Projects(client);
6
8
 
7
- client
8
- .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
9
- .setProject('5df5acd0d48c2') // Your project ID
10
- ;
11
-
12
- const promise = projects.updateEmailTemplate('[PROJECT_ID]', 'verification', 'af', '[SUBJECT]', '[MESSAGE]');
9
+ const result = await projects.updateEmailTemplate(
10
+ '<PROJECT_ID>', // projectId
11
+ EmailTemplateType.Verification, // type
12
+ EmailTemplateLocale.Af, // locale
13
+ '<SUBJECT>', // subject
14
+ '<MESSAGE>', // message
15
+ '<SENDER_NAME>', // senderName (optional)
16
+ 'email@example.com', // senderEmail (optional)
17
+ 'email@example.com' // replyTo (optional)
18
+ );
13
19
 
14
- promise.then(function (response) {
15
- console.log(response); // Success
16
- }, function (error) {
17
- console.log(error); // Failure
18
- });
20
+ console.log(response);
@@ -1,18 +1,17 @@
1
1
  import { Client, Projects } from "@appwrite.io/console";
2
2
 
3
- const client = new Client();
3
+ const client = new Client()
4
+ .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
5
+ .setProject('5df5acd0d48c2'); // Your project ID
4
6
 
5
7
  const projects = new Projects(client);
6
8
 
7
- client
8
- .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
9
- .setProject('5df5acd0d48c2') // Your project ID
10
- ;
11
-
12
- const promise = projects.updateKey('[PROJECT_ID]', '[KEY_ID]', '[NAME]', []);
9
+ const result = await projects.updateKey(
10
+ '<PROJECT_ID>', // projectId
11
+ '<KEY_ID>', // keyId
12
+ '<NAME>', // name
13
+ [], // scopes
14
+ '' // expire (optional)
15
+ );
13
16
 
14
- promise.then(function (response) {
15
- console.log(response); // Success
16
- }, function (error) {
17
- console.log(error); // Failure
18
- });
17
+ console.log(response);
@@ -1,18 +1,17 @@
1
- import { Client, Projects } from "@appwrite.io/console";
1
+ import { Client, Projects, OAuthProvider } from "@appwrite.io/console";
2
2
 
3
- const client = new Client();
3
+ const client = new Client()
4
+ .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
5
+ .setProject('5df5acd0d48c2'); // Your project ID
4
6
 
5
7
  const projects = new Projects(client);
6
8
 
7
- client
8
- .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
9
- .setProject('5df5acd0d48c2') // Your project ID
10
- ;
11
-
12
- const promise = projects.updateOAuth2('[PROJECT_ID]', 'amazon');
9
+ const result = await projects.updateOAuth2(
10
+ '<PROJECT_ID>', // projectId
11
+ OAuthProvider.Amazon, // provider
12
+ '<APP_ID>', // appId (optional)
13
+ '<SECRET>', // secret (optional)
14
+ false // enabled (optional)
15
+ );
13
16
 
14
- promise.then(function (response) {
15
- console.log(response); // Success
16
- }, function (error) {
17
- console.log(error); // Failure
18
- });
17
+ console.log(response);
@@ -1,18 +1,14 @@
1
1
  import { Client, Projects } from "@appwrite.io/console";
2
2
 
3
- const client = new Client();
3
+ const client = new Client()
4
+ .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
5
+ .setProject('5df5acd0d48c2'); // Your project ID
4
6
 
5
7
  const projects = new Projects(client);
6
8
 
7
- client
8
- .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
9
- .setProject('5df5acd0d48c2') // Your project ID
10
- ;
11
-
12
- const promise = projects.updatePersonalDataCheck('[PROJECT_ID]', false);
9
+ const result = await projects.updatePersonalDataCheck(
10
+ '<PROJECT_ID>', // projectId
11
+ false // enabled
12
+ );
13
13
 
14
- promise.then(function (response) {
15
- console.log(response); // Success
16
- }, function (error) {
17
- console.log(error); // Failure
18
- });
14
+ console.log(response);
@@ -1,18 +1,18 @@
1
1
  import { Client, Projects } from "@appwrite.io/console";
2
2
 
3
- const client = new Client();
3
+ const client = new Client()
4
+ .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
5
+ .setProject('5df5acd0d48c2'); // Your project ID
4
6
 
5
7
  const projects = new Projects(client);
6
8
 
7
- client
8
- .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
9
- .setProject('5df5acd0d48c2') // Your project ID
10
- ;
11
-
12
- const promise = projects.updatePlatform('[PROJECT_ID]', '[PLATFORM_ID]', '[NAME]');
9
+ const result = await projects.updatePlatform(
10
+ '<PROJECT_ID>', // projectId
11
+ '<PLATFORM_ID>', // platformId
12
+ '<NAME>', // name
13
+ '<KEY>', // key (optional)
14
+ '<STORE>', // store (optional)
15
+ '' // hostname (optional)
16
+ );
13
17
 
14
- promise.then(function (response) {
15
- console.log(response); // Success
16
- }, function (error) {
17
- console.log(error); // Failure
18
- });
18
+ console.log(response);
@@ -1,18 +1,14 @@
1
1
  import { Client, Projects } from "@appwrite.io/console";
2
2
 
3
- const client = new Client();
3
+ const client = new Client()
4
+ .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
5
+ .setProject('5df5acd0d48c2'); // Your project ID
4
6
 
5
7
  const projects = new Projects(client);
6
8
 
7
- client
8
- .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
9
- .setProject('5df5acd0d48c2') // Your project ID
10
- ;
11
-
12
- const promise = projects.updateServiceStatusAll('[PROJECT_ID]', false);
9
+ const result = await projects.updateServiceStatusAll(
10
+ '<PROJECT_ID>', // projectId
11
+ false // status
12
+ );
13
13
 
14
- promise.then(function (response) {
15
- console.log(response); // Success
16
- }, function (error) {
17
- console.log(error); // Failure
18
- });
14
+ console.log(response);
@@ -1,18 +1,15 @@
1
- import { Client, Projects } from "@appwrite.io/console";
1
+ import { Client, Projects, ApiService } from "@appwrite.io/console";
2
2
 
3
- const client = new Client();
3
+ const client = new Client()
4
+ .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
5
+ .setProject('5df5acd0d48c2'); // Your project ID
4
6
 
5
7
  const projects = new Projects(client);
6
8
 
7
- client
8
- .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
9
- .setProject('5df5acd0d48c2') // Your project ID
10
- ;
11
-
12
- const promise = projects.updateServiceStatus('[PROJECT_ID]', 'account', false);
9
+ const result = await projects.updateServiceStatus(
10
+ '<PROJECT_ID>', // projectId
11
+ ApiService.Account, // service
12
+ false // status
13
+ );
13
14
 
14
- promise.then(function (response) {
15
- console.log(response); // Success
16
- }, function (error) {
17
- console.log(error); // Failure
18
- });
15
+ console.log(response);
@@ -1,18 +1,16 @@
1
- import { Client, Projects } from "@appwrite.io/console";
1
+ import { Client, Projects, SmsTemplateType, SmsTemplateLocale } from "@appwrite.io/console";
2
2
 
3
- const client = new Client();
3
+ const client = new Client()
4
+ .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
5
+ .setProject('5df5acd0d48c2'); // Your project ID
4
6
 
5
7
  const projects = new Projects(client);
6
8
 
7
- client
8
- .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
9
- .setProject('5df5acd0d48c2') // Your project ID
10
- ;
11
-
12
- const promise = projects.updateSmsTemplate('[PROJECT_ID]', 'verification', 'af', '[MESSAGE]');
9
+ const result = await projects.updateSmsTemplate(
10
+ '<PROJECT_ID>', // projectId
11
+ SmsTemplateType.Verification, // type
12
+ SmsTemplateLocale.Af, // locale
13
+ '<MESSAGE>' // message
14
+ );
13
15
 
14
- promise.then(function (response) {
15
- console.log(response); // Success
16
- }, function (error) {
17
- console.log(error); // Failure
18
- });
16
+ console.log(response);
@@ -1,18 +1,22 @@
1
- import { Client, Projects } from "@appwrite.io/console";
1
+ import { Client, Projects, SMTPSecure } from "@appwrite.io/console";
2
2
 
3
- const client = new Client();
3
+ const client = new Client()
4
+ .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
5
+ .setProject('5df5acd0d48c2'); // Your project ID
4
6
 
5
7
  const projects = new Projects(client);
6
8
 
7
- client
8
- .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
9
- .setProject('5df5acd0d48c2') // Your project ID
10
- ;
11
-
12
- const promise = projects.updateSmtp('[PROJECT_ID]', false);
9
+ const result = await projects.updateSmtp(
10
+ '<PROJECT_ID>', // projectId
11
+ false, // enabled
12
+ '<SENDER_NAME>', // senderName (optional)
13
+ 'email@example.com', // senderEmail (optional)
14
+ 'email@example.com', // replyTo (optional)
15
+ '', // host (optional)
16
+ null, // port (optional)
17
+ '<USERNAME>', // username (optional)
18
+ '<PASSWORD>', // password (optional)
19
+ SMTPSecure.Tls // secure (optional)
20
+ );
13
21
 
14
- promise.then(function (response) {
15
- console.log(response); // Success
16
- }, function (error) {
17
- console.log(error); // Failure
18
- });
22
+ console.log(response);
@@ -1,18 +1,14 @@
1
1
  import { Client, Projects } from "@appwrite.io/console";
2
2
 
3
- const client = new Client();
3
+ const client = new Client()
4
+ .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
5
+ .setProject('5df5acd0d48c2'); // Your project ID
4
6
 
5
7
  const projects = new Projects(client);
6
8
 
7
- client
8
- .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
9
- .setProject('5df5acd0d48c2') // Your project ID
10
- ;
11
-
12
- const promise = projects.updateTeam('[PROJECT_ID]', '[TEAM_ID]');
9
+ const result = await projects.updateTeam(
10
+ '<PROJECT_ID>', // projectId
11
+ '<TEAM_ID>' // teamId
12
+ );
13
13
 
14
- promise.then(function (response) {
15
- console.log(response); // Success
16
- }, function (error) {
17
- console.log(error); // Failure
18
- });
14
+ console.log(response);
@@ -1,18 +1,14 @@
1
1
  import { Client, Projects } from "@appwrite.io/console";
2
2
 
3
- const client = new Client();
3
+ const client = new Client()
4
+ .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
5
+ .setProject('5df5acd0d48c2'); // Your project ID
4
6
 
5
7
  const projects = new Projects(client);
6
8
 
7
- client
8
- .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
9
- .setProject('5df5acd0d48c2') // Your project ID
10
- ;
11
-
12
- const promise = projects.updateWebhookSignature('[PROJECT_ID]', '[WEBHOOK_ID]');
9
+ const result = await projects.updateWebhookSignature(
10
+ '<PROJECT_ID>', // projectId
11
+ '<WEBHOOK_ID>' // webhookId
12
+ );
13
13
 
14
- promise.then(function (response) {
15
- console.log(response); // Success
16
- }, function (error) {
17
- console.log(error); // Failure
18
- });
14
+ console.log(response);
@@ -1,18 +1,21 @@
1
1
  import { Client, Projects } from "@appwrite.io/console";
2
2
 
3
- const client = new Client();
3
+ const client = new Client()
4
+ .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
5
+ .setProject('5df5acd0d48c2'); // Your project ID
4
6
 
5
7
  const projects = new Projects(client);
6
8
 
7
- client
8
- .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
9
- .setProject('5df5acd0d48c2') // Your project ID
10
- ;
11
-
12
- const promise = projects.updateWebhook('[PROJECT_ID]', '[WEBHOOK_ID]', '[NAME]', [], '', false);
9
+ const result = await projects.updateWebhook(
10
+ '<PROJECT_ID>', // projectId
11
+ '<WEBHOOK_ID>', // webhookId
12
+ '<NAME>', // name
13
+ [], // events
14
+ '', // url
15
+ false, // security
16
+ false, // enabled (optional)
17
+ '<HTTP_USER>', // httpUser (optional)
18
+ '<HTTP_PASS>' // httpPass (optional)
19
+ );
13
20
 
14
- promise.then(function (response) {
15
- console.log(response); // Success
16
- }, function (error) {
17
- console.log(error); // Failure
18
- });
21
+ console.log(response);
@@ -1,18 +1,23 @@
1
1
  import { Client, Projects } from "@appwrite.io/console";
2
2
 
3
- const client = new Client();
3
+ const client = new Client()
4
+ .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
5
+ .setProject('5df5acd0d48c2'); // Your project ID
4
6
 
5
7
  const projects = new Projects(client);
6
8
 
7
- client
8
- .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
9
- .setProject('5df5acd0d48c2') // Your project ID
10
- ;
11
-
12
- const promise = projects.update('[PROJECT_ID]', '[NAME]');
9
+ const result = await projects.update(
10
+ '<PROJECT_ID>', // projectId
11
+ '<NAME>', // name
12
+ '<DESCRIPTION>', // description (optional)
13
+ '<LOGO>', // logo (optional)
14
+ 'https://example.com', // url (optional)
15
+ '<LEGAL_NAME>', // legalName (optional)
16
+ '<LEGAL_COUNTRY>', // legalCountry (optional)
17
+ '<LEGAL_STATE>', // legalState (optional)
18
+ '<LEGAL_CITY>', // legalCity (optional)
19
+ '<LEGAL_ADDRESS>', // legalAddress (optional)
20
+ '<LEGAL_TAX_ID>' // legalTaxId (optional)
21
+ );
13
22
 
14
- promise.then(function (response) {
15
- console.log(response); // Success
16
- }, function (error) {
17
- console.log(error); // Failure
18
- });
23
+ console.log(response);
@@ -1,18 +1,15 @@
1
- import { Client, Proxy } from "@appwrite.io/console";
1
+ import { Client, Proxy, } from "@appwrite.io/console";
2
2
 
3
- const client = new Client();
3
+ const client = new Client()
4
+ .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
5
+ .setProject('5df5acd0d48c2'); // Your project ID
4
6
 
5
7
  const proxy = new Proxy(client);
6
8
 
7
- client
8
- .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
9
- .setProject('5df5acd0d48c2') // Your project ID
10
- ;
11
-
12
- const promise = proxy.createRule('', 'api');
9
+ const result = await proxy.createRule(
10
+ '', // domain
11
+ .Api, // resourceType
12
+ '<RESOURCE_ID>' // resourceId (optional)
13
+ );
13
14
 
14
- promise.then(function (response) {
15
- console.log(response); // Success
16
- }, function (error) {
17
- console.log(error); // Failure
18
- });
15
+ console.log(response);
@@ -1,18 +1,13 @@
1
1
  import { Client, Proxy } from "@appwrite.io/console";
2
2
 
3
- const client = new Client();
3
+ const client = new Client()
4
+ .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
5
+ .setProject('5df5acd0d48c2'); // Your project ID
4
6
 
5
7
  const proxy = new Proxy(client);
6
8
 
7
- client
8
- .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
9
- .setProject('5df5acd0d48c2') // Your project ID
10
- ;
11
-
12
- const promise = proxy.deleteRule('[RULE_ID]');
9
+ const result = await proxy.deleteRule(
10
+ '<RULE_ID>' // ruleId
11
+ );
13
12
 
14
- promise.then(function (response) {
15
- console.log(response); // Success
16
- }, function (error) {
17
- console.log(error); // Failure
18
- });
13
+ console.log(response);
@@ -1,18 +1,13 @@
1
1
  import { Client, Proxy } from "@appwrite.io/console";
2
2
 
3
- const client = new Client();
3
+ const client = new Client()
4
+ .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
5
+ .setProject('5df5acd0d48c2'); // Your project ID
4
6
 
5
7
  const proxy = new Proxy(client);
6
8
 
7
- client
8
- .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
9
- .setProject('5df5acd0d48c2') // Your project ID
10
- ;
11
-
12
- const promise = proxy.getRule('[RULE_ID]');
9
+ const result = await proxy.getRule(
10
+ '<RULE_ID>' // ruleId
11
+ );
13
12
 
14
- promise.then(function (response) {
15
- console.log(response); // Success
16
- }, function (error) {
17
- console.log(error); // Failure
18
- });
13
+ console.log(response);
@@ -1,18 +1,14 @@
1
1
  import { Client, Proxy } from "@appwrite.io/console";
2
2
 
3
- const client = new Client();
3
+ const client = new Client()
4
+ .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
5
+ .setProject('5df5acd0d48c2'); // Your project ID
4
6
 
5
7
  const proxy = new Proxy(client);
6
8
 
7
- client
8
- .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
9
- .setProject('5df5acd0d48c2') // Your project ID
10
- ;
11
-
12
- const promise = proxy.listRules();
9
+ const result = await proxy.listRules(
10
+ [], // queries (optional)
11
+ '<SEARCH>' // search (optional)
12
+ );
13
13
 
14
- promise.then(function (response) {
15
- console.log(response); // Success
16
- }, function (error) {
17
- console.log(error); // Failure
18
- });
14
+ console.log(response);
@@ -1,18 +1,13 @@
1
1
  import { Client, Proxy } from "@appwrite.io/console";
2
2
 
3
- const client = new Client();
3
+ const client = new Client()
4
+ .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
5
+ .setProject('5df5acd0d48c2'); // Your project ID
4
6
 
5
7
  const proxy = new Proxy(client);
6
8
 
7
- client
8
- .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
9
- .setProject('5df5acd0d48c2') // Your project ID
10
- ;
11
-
12
- const promise = proxy.updateRuleVerification('[RULE_ID]');
9
+ const result = await proxy.updateRuleVerification(
10
+ '<RULE_ID>' // ruleId
11
+ );
13
12
 
14
- promise.then(function (response) {
15
- console.log(response); // Success
16
- }, function (error) {
17
- console.log(error); // Failure
18
- });
13
+ console.log(response);
@@ -1,18 +1,22 @@
1
- import { Client, Storage } from "@appwrite.io/console";
1
+ import { Client, Storage, } from "@appwrite.io/console";
2
2
 
3
- const client = new Client();
3
+ const client = new Client()
4
+ .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
5
+ .setProject('5df5acd0d48c2'); // Your project ID
4
6
 
5
7
  const storage = new Storage(client);
6
8
 
7
- client
8
- .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
9
- .setProject('5df5acd0d48c2') // Your project ID
10
- ;
11
-
12
- const promise = storage.createBucket('[BUCKET_ID]', '[NAME]');
9
+ const result = await storage.createBucket(
10
+ '<BUCKET_ID>', // bucketId
11
+ '<NAME>', // name
12
+ ["read("any")"], // permissions (optional)
13
+ false, // fileSecurity (optional)
14
+ false, // enabled (optional)
15
+ 1, // maximumFileSize (optional)
16
+ [], // allowedFileExtensions (optional)
17
+ .None, // compression (optional)
18
+ false, // encryption (optional)
19
+ false // antivirus (optional)
20
+ );
13
21
 
14
- promise.then(function (response) {
15
- console.log(response); // Success
16
- }, function (error) {
17
- console.log(error); // Failure
18
- });
22
+ console.log(response);
@@ -1,18 +1,16 @@
1
1
  import { Client, Storage } from "@appwrite.io/console";
2
2
 
3
- const client = new Client();
3
+ const client = new Client()
4
+ .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
5
+ .setProject('5df5acd0d48c2'); // Your project ID
4
6
 
5
7
  const storage = new Storage(client);
6
8
 
7
- client
8
- .setEndpoint('https://cloud.appwrite.io/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]);
9
+ const result = await storage.createFile(
10
+ '<BUCKET_ID>', // bucketId
11
+ '<FILE_ID>', // fileId
12
+ document.getElementById('uploader').files[0], // file
13
+ ["read("any")"] // permissions (optional)
14
+ );
13
15
 
14
- promise.then(function (response) {
15
- console.log(response); // Success
16
- }, function (error) {
17
- console.log(error); // Failure
18
- });
16
+ console.log(response);
@@ -1,18 +1,13 @@
1
1
  import { Client, Storage } from "@appwrite.io/console";
2
2
 
3
- const client = new Client();
3
+ const client = new Client()
4
+ .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
5
+ .setProject('5df5acd0d48c2'); // Your project ID
4
6
 
5
7
  const storage = new Storage(client);
6
8
 
7
- client
8
- .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
9
- .setProject('5df5acd0d48c2') // Your project ID
10
- ;
11
-
12
- const promise = storage.deleteBucket('[BUCKET_ID]');
9
+ const result = await storage.deleteBucket(
10
+ '<BUCKET_ID>' // bucketId
11
+ );
13
12
 
14
- promise.then(function (response) {
15
- console.log(response); // Success
16
- }, function (error) {
17
- console.log(error); // Failure
18
- });
13
+ console.log(response);