@appwrite.io/console 0.6.0-rc.9 → 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 (449) hide show
  1. package/.travis.yml +32 -0
  2. package/README.md +5 -5
  3. package/dist/cjs/sdk.js +1140 -418
  4. package/dist/cjs/sdk.js.map +1 -1
  5. package/dist/esm/sdk.js +1141 -419
  6. package/dist/esm/sdk.js.map +1 -1
  7. package/dist/iife/sdk.js +1140 -418
  8. package/docs/examples/account/create-anonymous-session.md +6 -13
  9. package/docs/examples/account/create-email-password-session.md +9 -13
  10. package/docs/examples/account/create-email-token.md +10 -13
  11. package/docs/examples/account/create-j-w-t.md +6 -13
  12. package/docs/examples/account/create-magic-u-r-l-token.md +11 -13
  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 +9 -13
  19. package/docs/examples/account/create-phone-verification.md +6 -13
  20. package/docs/examples/account/create-push-target.md +10 -13
  21. package/docs/examples/account/create-recovery.md +9 -13
  22. package/docs/examples/account/create-session.md +9 -13
  23. package/docs/examples/account/create-verification.md +8 -13
  24. package/docs/examples/account/create.md +11 -13
  25. package/docs/examples/account/delete-identity.md +8 -13
  26. package/docs/examples/account/delete-mfa-authenticator.md +14 -0
  27. package/docs/examples/account/delete-push-target.md +8 -13
  28. package/docs/examples/account/delete-session.md +8 -13
  29. package/docs/examples/account/delete-sessions.md +6 -13
  30. package/docs/examples/account/delete.md +6 -13
  31. package/docs/examples/account/get-mfa-recovery-codes.md +11 -0
  32. package/docs/examples/account/get-prefs.md +6 -13
  33. package/docs/examples/account/get-session.md +8 -13
  34. package/docs/examples/account/get.md +6 -13
  35. package/docs/examples/account/list-identities.md +8 -13
  36. package/docs/examples/account/list-logs.md +8 -13
  37. package/docs/examples/account/list-mfa-factors.md +11 -0
  38. package/docs/examples/account/list-sessions.md +6 -13
  39. package/docs/examples/account/update-email.md +9 -13
  40. package/docs/examples/account/update-m-f-a.md +8 -13
  41. package/docs/examples/account/update-magic-u-r-l-session.md +9 -13
  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 +8 -13
  46. package/docs/examples/account/update-password.md +9 -13
  47. package/docs/examples/account/update-phone-session.md +14 -0
  48. package/docs/examples/account/update-phone-verification.md +9 -13
  49. package/docs/examples/account/update-phone.md +9 -13
  50. package/docs/examples/account/update-prefs.md +8 -13
  51. package/docs/examples/account/update-push-target.md +9 -13
  52. package/docs/examples/account/update-recovery.md +10 -13
  53. package/docs/examples/account/update-session.md +8 -13
  54. package/docs/examples/account/update-status.md +6 -13
  55. package/docs/examples/account/update-verification.md +9 -13
  56. package/docs/examples/assistant/chat.md +8 -13
  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 +8 -9
  60. package/docs/examples/avatars/get-flag.md +11 -9
  61. package/docs/examples/avatars/get-image.md +10 -9
  62. package/docs/examples/avatars/get-initials.md +11 -9
  63. package/docs/examples/avatars/get-q-r.md +11 -9
  64. package/docs/examples/console/variables.md +6 -13
  65. package/docs/examples/databases/create-boolean-attribute.md +13 -13
  66. package/docs/examples/databases/create-collection.md +13 -13
  67. package/docs/examples/databases/create-datetime-attribute.md +13 -13
  68. package/docs/examples/databases/create-document.md +12 -13
  69. package/docs/examples/databases/create-email-attribute.md +13 -13
  70. package/docs/examples/databases/create-enum-attribute.md +14 -13
  71. package/docs/examples/databases/create-float-attribute.md +15 -13
  72. package/docs/examples/databases/create-index.md +13 -13
  73. package/docs/examples/databases/create-integer-attribute.md +15 -13
  74. package/docs/examples/databases/create-ip-attribute.md +13 -13
  75. package/docs/examples/databases/create-relationship-attribute.md +15 -13
  76. package/docs/examples/databases/create-string-attribute.md +15 -13
  77. package/docs/examples/databases/create-url-attribute.md +13 -13
  78. package/docs/examples/databases/create.md +10 -13
  79. package/docs/examples/databases/delete-attribute.md +10 -13
  80. package/docs/examples/databases/delete-collection.md +9 -13
  81. package/docs/examples/databases/delete-document.md +10 -13
  82. package/docs/examples/databases/delete-index.md +10 -13
  83. package/docs/examples/databases/delete.md +8 -13
  84. package/docs/examples/databases/get-attribute.md +10 -13
  85. package/docs/examples/databases/get-collection-usage.md +10 -13
  86. package/docs/examples/databases/get-collection.md +9 -13
  87. package/docs/examples/databases/get-database-usage.md +9 -13
  88. package/docs/examples/databases/get-document.md +11 -13
  89. package/docs/examples/databases/get-index.md +10 -13
  90. package/docs/examples/databases/get-usage.md +8 -13
  91. package/docs/examples/databases/get.md +8 -13
  92. package/docs/examples/databases/list-attributes.md +10 -13
  93. package/docs/examples/databases/list-collection-logs.md +10 -13
  94. package/docs/examples/databases/list-collections.md +10 -13
  95. package/docs/examples/databases/list-document-logs.md +11 -13
  96. package/docs/examples/databases/list-documents.md +10 -13
  97. package/docs/examples/databases/list-indexes.md +10 -13
  98. package/docs/examples/databases/list-logs.md +9 -13
  99. package/docs/examples/databases/list.md +9 -13
  100. package/docs/examples/databases/update-boolean-attribute.md +12 -13
  101. package/docs/examples/databases/update-collection.md +13 -13
  102. package/docs/examples/databases/update-datetime-attribute.md +12 -13
  103. package/docs/examples/databases/update-document.md +12 -13
  104. package/docs/examples/databases/update-email-attribute.md +12 -13
  105. package/docs/examples/databases/update-enum-attribute.md +13 -13
  106. package/docs/examples/databases/update-float-attribute.md +14 -13
  107. package/docs/examples/databases/update-integer-attribute.md +14 -13
  108. package/docs/examples/databases/update-ip-attribute.md +12 -13
  109. package/docs/examples/databases/update-relationship-attribute.md +11 -13
  110. package/docs/examples/databases/update-string-attribute.md +12 -13
  111. package/docs/examples/databases/update-url-attribute.md +12 -13
  112. package/docs/examples/databases/update.md +10 -13
  113. package/docs/examples/functions/create-build.md +10 -13
  114. package/docs/examples/functions/create-deployment.md +12 -13
  115. package/docs/examples/functions/create-execution.md +13 -13
  116. package/docs/examples/functions/create-variable.md +10 -13
  117. package/docs/examples/functions/create.md +27 -13
  118. package/docs/examples/functions/delete-deployment.md +9 -13
  119. package/docs/examples/functions/delete-variable.md +9 -13
  120. package/docs/examples/functions/delete.md +8 -13
  121. package/docs/examples/functions/download-deployment.md +9 -9
  122. package/docs/examples/functions/get-deployment.md +9 -13
  123. package/docs/examples/functions/get-execution.md +9 -13
  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 +9 -13
  127. package/docs/examples/functions/get.md +8 -13
  128. package/docs/examples/functions/list-deployments.md +10 -13
  129. package/docs/examples/functions/list-executions.md +10 -13
  130. package/docs/examples/functions/list-runtimes.md +6 -13
  131. package/docs/examples/functions/list-variables.md +8 -13
  132. package/docs/examples/functions/list.md +9 -13
  133. package/docs/examples/functions/update-deployment.md +9 -13
  134. package/docs/examples/functions/update-variable.md +11 -13
  135. package/docs/examples/functions/update.md +23 -13
  136. package/docs/examples/graphql/mutation.md +8 -13
  137. package/docs/examples/graphql/query.md +8 -13
  138. package/docs/examples/health/get-antivirus.md +6 -13
  139. package/docs/examples/health/get-cache.md +6 -13
  140. package/docs/examples/health/get-certificate.md +13 -0
  141. package/docs/examples/health/get-d-b.md +6 -13
  142. package/docs/examples/health/get-failed-jobs.md +14 -0
  143. package/docs/examples/health/get-pub-sub.md +6 -13
  144. package/docs/examples/health/get-queue-builds.md +8 -13
  145. package/docs/examples/health/get-queue-certificates.md +8 -13
  146. package/docs/examples/health/get-queue-databases.md +9 -13
  147. package/docs/examples/health/get-queue-deletes.md +8 -13
  148. package/docs/examples/health/get-queue-functions.md +8 -13
  149. package/docs/examples/health/get-queue-logs.md +8 -13
  150. package/docs/examples/health/get-queue-mails.md +8 -13
  151. package/docs/examples/health/get-queue-messaging.md +8 -13
  152. package/docs/examples/health/get-queue-migrations.md +8 -13
  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 +8 -13
  156. package/docs/examples/health/get-queue.md +6 -13
  157. package/docs/examples/health/get-storage-local.md +6 -13
  158. package/docs/examples/health/get-storage.md +11 -0
  159. package/docs/examples/health/get-time.md +6 -13
  160. package/docs/examples/health/get.md +6 -13
  161. package/docs/examples/locale/get.md +6 -13
  162. package/docs/examples/locale/list-codes.md +6 -13
  163. package/docs/examples/locale/list-continents.md +6 -13
  164. package/docs/examples/locale/list-countries-e-u.md +6 -13
  165. package/docs/examples/locale/list-countries-phones.md +6 -13
  166. package/docs/examples/locale/list-countries.md +6 -13
  167. package/docs/examples/locale/list-currencies.md +6 -13
  168. package/docs/examples/locale/list-languages.md +6 -13
  169. package/docs/examples/messaging/create-apns-provider.md +20 -0
  170. package/docs/examples/messaging/create-email.md +19 -13
  171. package/docs/examples/messaging/create-fcm-provider.md +16 -0
  172. package/docs/examples/messaging/create-mailgun-provider.md +17 -13
  173. package/docs/examples/messaging/create-msg91provider.md +13 -13
  174. package/docs/examples/messaging/create-push.md +23 -13
  175. package/docs/examples/messaging/create-sendgrid-provider.md +15 -13
  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 +10 -13
  179. package/docs/examples/messaging/create-telesign-provider.md +13 -13
  180. package/docs/examples/messaging/create-textmagic-provider.md +13 -13
  181. package/docs/examples/messaging/create-topic.md +10 -13
  182. package/docs/examples/messaging/create-twilio-provider.md +13 -13
  183. package/docs/examples/messaging/create-vonage-provider.md +13 -13
  184. package/docs/examples/messaging/delete-provider.md +8 -13
  185. package/docs/examples/messaging/delete-subscriber.md +9 -13
  186. package/docs/examples/messaging/delete-topic.md +8 -13
  187. package/docs/examples/messaging/delete.md +8 -13
  188. package/docs/examples/messaging/get-message.md +8 -13
  189. package/docs/examples/messaging/get-provider.md +8 -13
  190. package/docs/examples/messaging/get-subscriber.md +9 -13
  191. package/docs/examples/messaging/get-topic.md +8 -13
  192. package/docs/examples/messaging/list-message-logs.md +9 -13
  193. package/docs/examples/messaging/list-messages.md +9 -13
  194. package/docs/examples/messaging/list-provider-logs.md +9 -13
  195. package/docs/examples/messaging/list-providers.md +9 -13
  196. package/docs/examples/messaging/list-subscriber-logs.md +9 -13
  197. package/docs/examples/messaging/list-subscribers.md +10 -13
  198. package/docs/examples/messaging/list-targets.md +9 -13
  199. package/docs/examples/messaging/list-topic-logs.md +9 -13
  200. package/docs/examples/messaging/list-topics.md +9 -13
  201. package/docs/examples/messaging/update-apns-provider.md +20 -0
  202. package/docs/examples/messaging/update-email.md +18 -13
  203. package/docs/examples/messaging/update-fcm-provider.md +16 -0
  204. package/docs/examples/messaging/update-mailgun-provider.md +17 -13
  205. package/docs/examples/messaging/update-msg91provider.md +13 -13
  206. package/docs/examples/messaging/update-push.md +23 -13
  207. package/docs/examples/messaging/update-sendgrid-provider.md +15 -13
  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 +13 -13
  211. package/docs/examples/messaging/update-textmagic-provider.md +13 -13
  212. package/docs/examples/messaging/update-topic.md +10 -13
  213. package/docs/examples/messaging/update-twilio-provider.md +13 -13
  214. package/docs/examples/messaging/update-vonage-provider.md +13 -13
  215. package/docs/examples/migrations/create-appwrite-migration.md +11 -13
  216. package/docs/examples/migrations/create-firebase-migration.md +9 -13
  217. package/docs/examples/migrations/create-firebase-o-auth-migration.md +9 -13
  218. package/docs/examples/migrations/create-n-host-migration.md +15 -13
  219. package/docs/examples/migrations/create-supabase-migration.md +14 -13
  220. package/docs/examples/migrations/delete-firebase-auth.md +6 -13
  221. package/docs/examples/migrations/delete.md +8 -13
  222. package/docs/examples/migrations/get-appwrite-report.md +11 -13
  223. package/docs/examples/migrations/get-firebase-report-o-auth.md +9 -13
  224. package/docs/examples/migrations/get-firebase-report.md +9 -13
  225. package/docs/examples/migrations/get-n-host-report.md +15 -13
  226. package/docs/examples/migrations/get-supabase-report.md +14 -13
  227. package/docs/examples/migrations/get.md +8 -13
  228. package/docs/examples/migrations/list-firebase-projects.md +6 -13
  229. package/docs/examples/migrations/list.md +9 -13
  230. package/docs/examples/migrations/retry.md +8 -13
  231. package/docs/examples/project/create-variable.md +9 -13
  232. package/docs/examples/project/delete-variable.md +8 -13
  233. package/docs/examples/project/get-usage.md +10 -13
  234. package/docs/examples/project/get-variable.md +8 -13
  235. package/docs/examples/project/list-variables.md +6 -13
  236. package/docs/examples/project/update-variable.md +10 -13
  237. package/docs/examples/projects/create-key.md +11 -13
  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 +15 -13
  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 +9 -13
  244. package/docs/examples/projects/delete-platform.md +9 -13
  245. package/docs/examples/projects/delete-sms-template.md +10 -13
  246. package/docs/examples/projects/delete-webhook.md +9 -13
  247. package/docs/examples/projects/delete.md +8 -13
  248. package/docs/examples/projects/get-email-template.md +10 -13
  249. package/docs/examples/projects/get-key.md +9 -13
  250. package/docs/examples/projects/get-platform.md +9 -13
  251. package/docs/examples/projects/get-sms-template.md +10 -13
  252. package/docs/examples/projects/get-webhook.md +9 -13
  253. package/docs/examples/projects/get.md +8 -13
  254. package/docs/examples/projects/list-keys.md +8 -13
  255. package/docs/examples/projects/list-platforms.md +8 -13
  256. package/docs/examples/projects/list-webhooks.md +8 -13
  257. package/docs/examples/projects/list.md +9 -13
  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 +9 -13
  261. package/docs/examples/projects/update-auth-limit.md +9 -13
  262. package/docs/examples/projects/update-auth-password-dictionary.md +9 -13
  263. package/docs/examples/projects/update-auth-password-history.md +9 -13
  264. package/docs/examples/projects/update-auth-sessions-limit.md +9 -13
  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 +12 -13
  268. package/docs/examples/projects/update-o-auth2.md +12 -13
  269. package/docs/examples/projects/update-personal-data-check.md +9 -13
  270. package/docs/examples/projects/update-platform.md +13 -13
  271. package/docs/examples/projects/update-service-status-all.md +9 -13
  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 +9 -13
  276. package/docs/examples/projects/update-webhook-signature.md +9 -13
  277. package/docs/examples/projects/update-webhook.md +16 -13
  278. package/docs/examples/projects/update.md +18 -13
  279. package/docs/examples/proxy/create-rule.md +10 -13
  280. package/docs/examples/proxy/delete-rule.md +8 -13
  281. package/docs/examples/proxy/get-rule.md +8 -13
  282. package/docs/examples/proxy/list-rules.md +9 -13
  283. package/docs/examples/proxy/update-rule-verification.md +8 -13
  284. package/docs/examples/storage/create-bucket.md +17 -13
  285. package/docs/examples/storage/create-file.md +11 -13
  286. package/docs/examples/storage/delete-bucket.md +8 -13
  287. package/docs/examples/storage/delete-file.md +9 -13
  288. package/docs/examples/storage/get-bucket-usage.md +9 -13
  289. package/docs/examples/storage/get-bucket.md +8 -13
  290. package/docs/examples/storage/get-file-download.md +9 -9
  291. package/docs/examples/storage/get-file-preview.md +20 -9
  292. package/docs/examples/storage/get-file-view.md +9 -9
  293. package/docs/examples/storage/get-file.md +9 -13
  294. package/docs/examples/storage/get-usage.md +8 -13
  295. package/docs/examples/storage/list-buckets.md +9 -13
  296. package/docs/examples/storage/list-files.md +10 -13
  297. package/docs/examples/storage/update-bucket.md +17 -13
  298. package/docs/examples/storage/update-file.md +11 -13
  299. package/docs/examples/teams/create-membership.md +14 -13
  300. package/docs/examples/teams/create.md +10 -13
  301. package/docs/examples/teams/delete-membership.md +9 -13
  302. package/docs/examples/teams/delete.md +8 -13
  303. package/docs/examples/teams/get-membership.md +9 -13
  304. package/docs/examples/teams/get-prefs.md +8 -13
  305. package/docs/examples/teams/get.md +8 -13
  306. package/docs/examples/teams/list-logs.md +9 -13
  307. package/docs/examples/teams/list-memberships.md +10 -13
  308. package/docs/examples/teams/list.md +9 -13
  309. package/docs/examples/teams/update-membership-status.md +11 -13
  310. package/docs/examples/teams/update-membership.md +10 -13
  311. package/docs/examples/teams/update-name.md +9 -13
  312. package/docs/examples/teams/update-prefs.md +9 -13
  313. package/docs/examples/users/create-argon2user.md +11 -13
  314. package/docs/examples/users/create-bcrypt-user.md +11 -13
  315. package/docs/examples/users/create-m-d5user.md +11 -13
  316. package/docs/examples/users/create-mfa-recovery-codes.md +13 -0
  317. package/docs/examples/users/create-p-h-pass-user.md +11 -13
  318. package/docs/examples/users/create-s-h-a-user.md +12 -13
  319. package/docs/examples/users/create-scrypt-modified-user.md +14 -13
  320. package/docs/examples/users/create-scrypt-user.md +16 -13
  321. package/docs/examples/users/create-session.md +8 -13
  322. package/docs/examples/users/create-target.md +13 -13
  323. package/docs/examples/users/create-token.md +10 -13
  324. package/docs/examples/users/create.md +12 -13
  325. package/docs/examples/users/delete-identity.md +8 -13
  326. package/docs/examples/users/delete-mfa-authenticator.md +14 -0
  327. package/docs/examples/users/delete-session.md +9 -13
  328. package/docs/examples/users/delete-sessions.md +8 -13
  329. package/docs/examples/users/delete-target.md +9 -13
  330. package/docs/examples/users/delete.md +8 -13
  331. package/docs/examples/users/get-mfa-recovery-codes.md +13 -0
  332. package/docs/examples/users/get-prefs.md +8 -13
  333. package/docs/examples/users/get-target.md +9 -13
  334. package/docs/examples/users/get-usage.md +8 -13
  335. package/docs/examples/users/get.md +8 -13
  336. package/docs/examples/users/list-identities.md +9 -13
  337. package/docs/examples/users/list-logs.md +9 -13
  338. package/docs/examples/users/list-memberships.md +8 -13
  339. package/docs/examples/users/list-mfa-factors.md +13 -0
  340. package/docs/examples/users/list-sessions.md +8 -13
  341. package/docs/examples/users/list-targets.md +9 -13
  342. package/docs/examples/users/list.md +9 -13
  343. package/docs/examples/users/update-email-verification.md +9 -13
  344. package/docs/examples/users/update-email.md +9 -13
  345. package/docs/examples/users/update-labels.md +9 -13
  346. package/docs/examples/users/update-mfa-recovery-codes.md +13 -0
  347. package/docs/examples/users/update-mfa.md +9 -13
  348. package/docs/examples/users/update-name.md +9 -13
  349. package/docs/examples/users/update-password.md +9 -13
  350. package/docs/examples/users/update-phone-verification.md +9 -13
  351. package/docs/examples/users/update-phone.md +9 -13
  352. package/docs/examples/users/update-prefs.md +9 -13
  353. package/docs/examples/users/update-status.md +9 -13
  354. package/docs/examples/users/update-target.md +12 -13
  355. package/docs/examples/vcs/create-repository-detection.md +10 -13
  356. package/docs/examples/vcs/create-repository.md +10 -13
  357. package/docs/examples/vcs/delete-installation.md +8 -13
  358. package/docs/examples/vcs/get-installation.md +8 -13
  359. package/docs/examples/vcs/get-repository.md +9 -13
  360. package/docs/examples/vcs/list-installations.md +9 -13
  361. package/docs/examples/vcs/list-repositories.md +9 -13
  362. package/docs/examples/vcs/list-repository-branches.md +9 -13
  363. package/docs/examples/vcs/update-external-deployments.md +10 -13
  364. package/package.json +1 -1
  365. package/src/client.ts +3 -3
  366. package/src/enums/{a-p-i-service.ts → api-service.ts} +1 -1
  367. package/src/enums/api.ts +5 -0
  368. package/src/enums/authentication-factor.ts +6 -0
  369. package/src/enums/authenticator-type.ts +3 -0
  370. package/src/enums/email-template-locale.ts +133 -0
  371. package/src/enums/email-template-type.ts +7 -0
  372. package/src/enums/index-type.ts +0 -1
  373. package/src/enums/name.ts +15 -0
  374. package/src/enums/{password-version.ts → password-hash.ts} +1 -1
  375. package/src/enums/region.ts +1 -0
  376. package/src/enums/runtime.ts +40 -0
  377. package/src/enums/{template-locale.ts → sms-template-locale.ts} +1 -1
  378. package/src/enums/{template-type.ts → sms-template-type.ts} +2 -1
  379. package/src/enums/{s-m-t-p-encryption.ts → smtp-encryption.ts} +1 -1
  380. package/src/index.ts +11 -8
  381. package/src/models.ts +57 -19
  382. package/src/query.ts +2 -2
  383. package/src/service.ts +0 -3
  384. package/src/services/account.ts +239 -66
  385. package/src/services/assistant.ts +0 -1
  386. package/src/services/avatars.ts +0 -1
  387. package/src/services/console.ts +0 -1
  388. package/src/services/databases.ts +20 -4
  389. package/src/services/functions.ts +0 -1
  390. package/src/services/graphql.ts +0 -1
  391. package/src/services/health.ts +121 -1
  392. package/src/services/locale.ts +0 -1
  393. package/src/services/messaging.ts +161 -70
  394. package/src/services/migrations.ts +0 -1
  395. package/src/services/project.ts +1 -2
  396. package/src/services/projects.ts +97 -24
  397. package/src/services/proxy.ts +0 -1
  398. package/src/services/storage.ts +2 -3
  399. package/src/services/teams.ts +0 -1
  400. package/src/services/users.ts +115 -39
  401. package/src/services/vcs.ts +0 -1
  402. package/types/enums/{a-p-i-service.d.ts → api-service.d.ts} +1 -1
  403. package/types/enums/api.d.ts +5 -0
  404. package/types/enums/authentication-factor.d.ts +6 -0
  405. package/types/enums/authenticator-type.d.ts +3 -0
  406. package/types/enums/email-template-locale.d.ts +133 -0
  407. package/types/enums/email-template-type.d.ts +7 -0
  408. package/types/enums/index-type.d.ts +1 -2
  409. package/types/enums/name.d.ts +15 -0
  410. package/types/enums/{password-version.d.ts → password-hash.d.ts} +1 -1
  411. package/types/enums/region.d.ts +2 -1
  412. package/types/enums/runtime.d.ts +41 -1
  413. package/types/enums/{template-locale.d.ts → sms-template-locale.d.ts} +1 -1
  414. package/types/enums/sms-template-type.d.ts +6 -0
  415. package/types/enums/{s-m-t-p-encryption.d.ts → smtp-encryption.d.ts} +1 -1
  416. package/types/index.d.ts +11 -8
  417. package/types/models.d.ts +57 -19
  418. package/types/query.d.ts +2 -2
  419. package/types/services/account.d.ts +121 -28
  420. package/types/services/databases.d.ts +20 -3
  421. package/types/services/health.d.ts +56 -0
  422. package/types/services/messaging.d.ts +109 -49
  423. package/types/services/project.d.ts +1 -1
  424. package/types/services/projects.d.ts +47 -23
  425. package/types/services/storage.d.ts +2 -2
  426. package/types/services/users.d.ts +63 -17
  427. package/docs/examples/account/add-authenticator.md +0 -18
  428. package/docs/examples/account/create-challenge.md +0 -18
  429. package/docs/examples/account/delete-authenticator.md +0 -18
  430. package/docs/examples/account/list-factors.md +0 -18
  431. package/docs/examples/account/update-challenge.md +0 -18
  432. package/docs/examples/account/verify-authenticator.md +0 -18
  433. package/docs/examples/messaging/create-a-p-n-s-provider.md +0 -18
  434. package/docs/examples/messaging/create-f-c-m-provider.md +0 -18
  435. package/docs/examples/messaging/create-s-m-s.md +0 -18
  436. package/docs/examples/messaging/create-s-m-t-p-provider.md +0 -18
  437. package/docs/examples/messaging/update-a-p-n-s-provider.md +0 -18
  438. package/docs/examples/messaging/update-f-c-m-provider.md +0 -18
  439. package/docs/examples/messaging/update-s-m-s.md +0 -18
  440. package/docs/examples/messaging/update-s-m-t-p-provider.md +0 -18
  441. package/docs/examples/users/delete-authenticator.md +0 -18
  442. package/docs/examples/users/list-providers.md +0 -18
  443. package/src/enums/authenticator-factor.ts +0 -3
  444. package/src/enums/authenticator-provider.ts +0 -3
  445. package/src/enums/message-type.ts +0 -5
  446. package/types/enums/authenticator-factor.d.ts +0 -3
  447. package/types/enums/authenticator-provider.d.ts +0 -3
  448. package/types/enums/message-type.d.ts +0 -5
  449. package/types/enums/template-type.d.ts +0 -5
@@ -1,18 +1,18 @@
1
- import { Client, Messaging } from "@appwrite.io/console";
1
+ import { Client, Messaging } 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 messaging = new Messaging(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 = messaging.updateTextmagicProvider('[PROVIDER_ID]');
9
+ const result = await messaging.updateTextmagicProvider(
10
+ '<PROVIDER_ID>', // providerId
11
+ '<NAME>', // name (optional)
12
+ false, // enabled (optional)
13
+ '<USERNAME>', // username (optional)
14
+ '<API_KEY>', // apiKey (optional)
15
+ '<FROM>' // from (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,15 @@
1
- import { Client, Messaging } from "@appwrite.io/console";
1
+ import { Client, Messaging } 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 messaging = new Messaging(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 = messaging.updateTopic('[TOPIC_ID]');
9
+ const result = await messaging.updateTopic(
10
+ '<TOPIC_ID>', // topicId
11
+ '<NAME>', // name (optional)
12
+ ["any"] // subscribe (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,18 @@
1
- import { Client, Messaging } from "@appwrite.io/console";
1
+ import { Client, Messaging } 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 messaging = new Messaging(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 = messaging.updateTwilioProvider('[PROVIDER_ID]');
9
+ const result = await messaging.updateTwilioProvider(
10
+ '<PROVIDER_ID>', // providerId
11
+ '<NAME>', // name (optional)
12
+ false, // enabled (optional)
13
+ '<ACCOUNT_SID>', // accountSid (optional)
14
+ '<AUTH_TOKEN>', // authToken (optional)
15
+ '<FROM>' // from (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,18 @@
1
- import { Client, Messaging } from "@appwrite.io/console";
1
+ import { Client, Messaging } 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 messaging = new Messaging(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 = messaging.updateVonageProvider('[PROVIDER_ID]');
9
+ const result = await messaging.updateVonageProvider(
10
+ '<PROVIDER_ID>', // providerId
11
+ '<NAME>', // name (optional)
12
+ false, // enabled (optional)
13
+ '<API_KEY>', // apiKey (optional)
14
+ '<API_SECRET>', // apiSecret (optional)
15
+ '<FROM>' // from (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,16 @@
1
- import { Client, Migrations } from "@appwrite.io/console";
1
+ import { Client, Migrations } 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 migrations = new Migrations(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 = migrations.createAppwriteMigration([], 'https://example.com', '[PROJECT_ID]', '[API_KEY]');
9
+ const result = await migrations.createAppwriteMigration(
10
+ [], // resources
11
+ 'https://example.com', // endpoint
12
+ '<PROJECT_ID>', // projectId
13
+ '<API_KEY>' // apiKey
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,14 @@
1
- import { Client, Migrations } from "@appwrite.io/console";
1
+ import { Client, Migrations } 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 migrations = new Migrations(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 = migrations.createFirebaseMigration([], '[SERVICE_ACCOUNT]');
9
+ const result = await migrations.createFirebaseMigration(
10
+ [], // resources
11
+ '<SERVICE_ACCOUNT>' // serviceAccount
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
- import { Client, Migrations } from "@appwrite.io/console";
1
+ import { Client, Migrations } 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 migrations = new Migrations(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 = migrations.createFirebaseOAuthMigration([], '[PROJECT_ID]');
9
+ const result = await migrations.createFirebaseOAuthMigration(
10
+ [], // resources
11
+ '<PROJECT_ID>' // projectId
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,20 @@
1
- import { Client, Migrations } from "@appwrite.io/console";
1
+ import { Client, Migrations } 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 migrations = new Migrations(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 = migrations.createNHostMigration([], '[SUBDOMAIN]', '[REGION]', '[ADMIN_SECRET]', '[DATABASE]', '[USERNAME]', '[PASSWORD]');
9
+ const result = await migrations.createNHostMigration(
10
+ [], // resources
11
+ '<SUBDOMAIN>', // subdomain
12
+ '<REGION>', // region
13
+ '<ADMIN_SECRET>', // adminSecret
14
+ '<DATABASE>', // database
15
+ '<USERNAME>', // username
16
+ '<PASSWORD>', // password
17
+ null // port (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,19 @@
1
- import { Client, Migrations } from "@appwrite.io/console";
1
+ import { Client, Migrations } 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 migrations = new Migrations(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 = migrations.createSupabaseMigration([], 'https://example.com', '[API_KEY]', '[DATABASE_HOST]', '[USERNAME]', '[PASSWORD]');
9
+ const result = await migrations.createSupabaseMigration(
10
+ [], // resources
11
+ 'https://example.com', // endpoint
12
+ '<API_KEY>', // apiKey
13
+ '<DATABASE_HOST>', // databaseHost
14
+ '<USERNAME>', // username
15
+ '<PASSWORD>', // password
16
+ null // port (optional)
17
+ );
13
18
 
14
- promise.then(function (response) {
15
- console.log(response); // Success
16
- }, function (error) {
17
- console.log(error); // Failure
18
- });
19
+ console.log(response);
@@ -1,18 +1,11 @@
1
- import { Client, Migrations } from "@appwrite.io/console";
1
+ import { Client, Migrations } 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 migrations = new Migrations(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 = migrations.deleteFirebaseAuth();
9
+ const result = await migrations.deleteFirebaseAuth();
13
10
 
14
- promise.then(function (response) {
15
- console.log(response); // Success
16
- }, function (error) {
17
- console.log(error); // Failure
18
- });
11
+ console.log(response);
@@ -1,18 +1,13 @@
1
- import { Client, Migrations } from "@appwrite.io/console";
1
+ import { Client, Migrations } 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 migrations = new Migrations(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 = migrations.delete('[MIGRATION_ID]');
9
+ const result = await migrations.delete(
10
+ '<MIGRATION_ID>' // migrationId
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,16 @@
1
- import { Client, Migrations } from "@appwrite.io/console";
1
+ import { Client, Migrations } 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 migrations = new Migrations(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 = migrations.getAppwriteReport([], 'https://example.com', '[PROJECT_ID]', '[KEY]');
9
+ const result = await migrations.getAppwriteReport(
10
+ [], // resources
11
+ 'https://example.com', // endpoint
12
+ '<PROJECT_ID>', // projectID
13
+ '<KEY>' // key
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,14 @@
1
- import { Client, Migrations } from "@appwrite.io/console";
1
+ import { Client, Migrations } 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 migrations = new Migrations(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 = migrations.getFirebaseReportOAuth([], '[PROJECT_ID]');
9
+ const result = await migrations.getFirebaseReportOAuth(
10
+ [], // resources
11
+ '<PROJECT_ID>' // projectId
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
- import { Client, Migrations } from "@appwrite.io/console";
1
+ import { Client, Migrations } 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 migrations = new Migrations(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 = migrations.getFirebaseReport([], '[SERVICE_ACCOUNT]');
9
+ const result = await migrations.getFirebaseReport(
10
+ [], // resources
11
+ '<SERVICE_ACCOUNT>' // serviceAccount
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,20 @@
1
- import { Client, Migrations } from "@appwrite.io/console";
1
+ import { Client, Migrations } 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 migrations = new Migrations(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 = migrations.getNHostReport([], '[SUBDOMAIN]', '[REGION]', '[ADMIN_SECRET]', '[DATABASE]', '[USERNAME]', '[PASSWORD]');
9
+ const result = await migrations.getNHostReport(
10
+ [], // resources
11
+ '<SUBDOMAIN>', // subdomain
12
+ '<REGION>', // region
13
+ '<ADMIN_SECRET>', // adminSecret
14
+ '<DATABASE>', // database
15
+ '<USERNAME>', // username
16
+ '<PASSWORD>', // password
17
+ null // port (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,19 @@
1
- import { Client, Migrations } from "@appwrite.io/console";
1
+ import { Client, Migrations } 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 migrations = new Migrations(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 = migrations.getSupabaseReport([], 'https://example.com', '[API_KEY]', '[DATABASE_HOST]', '[USERNAME]', '[PASSWORD]');
9
+ const result = await migrations.getSupabaseReport(
10
+ [], // resources
11
+ 'https://example.com', // endpoint
12
+ '<API_KEY>', // apiKey
13
+ '<DATABASE_HOST>', // databaseHost
14
+ '<USERNAME>', // username
15
+ '<PASSWORD>', // password
16
+ null // port (optional)
17
+ );
13
18
 
14
- promise.then(function (response) {
15
- console.log(response); // Success
16
- }, function (error) {
17
- console.log(error); // Failure
18
- });
19
+ console.log(response);
@@ -1,18 +1,13 @@
1
- import { Client, Migrations } from "@appwrite.io/console";
1
+ import { Client, Migrations } 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 migrations = new Migrations(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 = migrations.get('[MIGRATION_ID]');
9
+ const result = await migrations.get(
10
+ '<MIGRATION_ID>' // migrationId
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,11 @@
1
- import { Client, Migrations } from "@appwrite.io/console";
1
+ import { Client, Migrations } 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 migrations = new Migrations(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 = migrations.listFirebaseProjects();
9
+ const result = await migrations.listFirebaseProjects();
13
10
 
14
- promise.then(function (response) {
15
- console.log(response); // Success
16
- }, function (error) {
17
- console.log(error); // Failure
18
- });
11
+ console.log(response);
@@ -1,18 +1,14 @@
1
- import { Client, Migrations } from "@appwrite.io/console";
1
+ import { Client, Migrations } 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 migrations = new Migrations(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 = migrations.list();
9
+ const result = await migrations.list(
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
- import { Client, Migrations } from "@appwrite.io/console";
1
+ import { Client, Migrations } 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 migrations = new Migrations(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 = migrations.retry('[MIGRATION_ID]');
9
+ const result = await migrations.retry(
10
+ '<MIGRATION_ID>' // migrationId
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
- import { Client, Project } from "@appwrite.io/console";
1
+ import { Client, Project } 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 project = new Project(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 = project.createVariable('[KEY]', '[VALUE]');
9
+ const result = await project.createVariable(
10
+ '<KEY>', // key
11
+ '<VALUE>' // value
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);