@appwrite.io/console 1.9.0 → 2.0.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 (746) hide show
  1. package/.github/workflows/publish.yml +9 -8
  2. package/CHANGELOG.md +51 -6
  3. package/LICENSE +1 -1
  4. package/README.md +84 -4
  5. package/dist/cjs/sdk.js +15258 -6036
  6. package/dist/cjs/sdk.js.map +1 -1
  7. package/dist/esm/sdk.js +15256 -6037
  8. package/dist/esm/sdk.js.map +1 -1
  9. package/dist/iife/sdk.js +15258 -6036
  10. package/docs/examples/account/create-billing-address.md +8 -8
  11. package/docs/examples/account/create-email-password-session.md +4 -4
  12. package/docs/examples/account/create-email-token.md +5 -5
  13. package/docs/examples/account/{update-magic-u-r-l-session.md → create-email-verification.md} +3 -4
  14. package/docs/examples/account/{update-m-f-a.md → create-jwt.md} +3 -3
  15. package/docs/examples/account/{create-magic-u-r-l-token.md → create-magic-url-token.md} +6 -6
  16. package/docs/examples/account/create-mfa-authenticator.md +3 -3
  17. package/docs/examples/account/create-mfa-challenge.md +3 -3
  18. package/docs/examples/account/create-mfa-recovery-codes.md +1 -1
  19. package/docs/examples/account/{create-o-auth2token.md → create-o-auth-2-session.md} +6 -6
  20. package/docs/examples/account/{create-o-auth2session.md → create-o-auth-2-token.md} +6 -6
  21. package/docs/examples/account/create-phone-token.md +4 -4
  22. package/docs/examples/account/create-push-target.md +5 -5
  23. package/docs/examples/account/create-recovery.md +4 -4
  24. package/docs/examples/account/create-session.md +4 -4
  25. package/docs/examples/account/create-verification.md +3 -3
  26. package/docs/examples/account/create.md +6 -6
  27. package/docs/examples/account/delete-billing-address.md +3 -3
  28. package/docs/examples/account/delete-identity.md +3 -3
  29. package/docs/examples/account/delete-mfa-authenticator.md +3 -3
  30. package/docs/examples/account/delete-payment-method.md +3 -3
  31. package/docs/examples/account/delete-push-target.md +3 -3
  32. package/docs/examples/account/delete-session.md +3 -3
  33. package/docs/examples/account/get-billing-address.md +3 -3
  34. package/docs/examples/account/get-coupon.md +3 -3
  35. package/docs/examples/account/get-mfa-recovery-codes.md +1 -1
  36. package/docs/examples/account/get-payment-method.md +3 -3
  37. package/docs/examples/account/get-session.md +3 -3
  38. package/docs/examples/account/list-billing-addresses.md +3 -3
  39. package/docs/examples/account/list-identities.md +4 -3
  40. package/docs/examples/account/list-invoices.md +3 -3
  41. package/docs/examples/account/list-logs.md +4 -3
  42. package/docs/examples/account/list-mfa-factors.md +1 -1
  43. package/docs/examples/account/list-payment-methods.md +3 -3
  44. package/docs/examples/account/update-billing-address.md +9 -9
  45. package/docs/examples/account/update-email-verification.md +14 -0
  46. package/docs/examples/account/update-email.md +4 -4
  47. package/docs/examples/account/update-magic-url-session.md +14 -0
  48. package/docs/examples/account/update-mfa-authenticator.md +4 -4
  49. package/docs/examples/account/update-mfa-challenge.md +4 -4
  50. package/docs/examples/account/update-mfa-recovery-codes.md +1 -1
  51. package/docs/examples/account/{create-j-w-t.md → update-mfa.md} +3 -1
  52. package/docs/examples/account/update-name.md +3 -3
  53. package/docs/examples/account/update-password.md +4 -4
  54. package/docs/examples/account/update-payment-method-mandate-options.md +3 -3
  55. package/docs/examples/account/update-payment-method-provider.md +6 -5
  56. package/docs/examples/account/update-payment-method.md +6 -5
  57. package/docs/examples/account/update-phone-session.md +4 -4
  58. package/docs/examples/account/update-phone-verification.md +4 -4
  59. package/docs/examples/account/update-phone.md +4 -4
  60. package/docs/examples/account/update-prefs.md +7 -3
  61. package/docs/examples/account/update-push-target.md +4 -4
  62. package/docs/examples/account/update-recovery.md +5 -5
  63. package/docs/examples/account/update-session.md +3 -3
  64. package/docs/examples/account/update-verification.md +4 -4
  65. package/docs/examples/assistant/chat.md +3 -3
  66. package/docs/examples/avatars/get-browser.md +6 -6
  67. package/docs/examples/avatars/get-credit-card.md +6 -6
  68. package/docs/examples/avatars/get-favicon.md +3 -3
  69. package/docs/examples/avatars/get-flag.md +6 -6
  70. package/docs/examples/avatars/get-image.md +5 -5
  71. package/docs/examples/avatars/get-initials.md +6 -6
  72. package/docs/examples/avatars/{get-q-r.md → get-qr.md} +6 -6
  73. package/docs/examples/avatars/get-screenshot.md +35 -0
  74. package/docs/examples/backups/create-archive.md +4 -4
  75. package/docs/examples/backups/create-policy.md +9 -9
  76. package/docs/examples/backups/create-restoration.md +6 -6
  77. package/docs/examples/backups/delete-archive.md +3 -3
  78. package/docs/examples/backups/delete-policy.md +3 -3
  79. package/docs/examples/backups/get-archive.md +3 -3
  80. package/docs/examples/backups/get-policy.md +3 -3
  81. package/docs/examples/backups/get-restoration.md +3 -3
  82. package/docs/examples/backups/list-archives.md +3 -3
  83. package/docs/examples/backups/list-policies.md +3 -3
  84. package/docs/examples/backups/list-restorations.md +3 -3
  85. package/docs/examples/backups/update-policy.md +7 -7
  86. package/docs/examples/console/create-program-membership.md +3 -3
  87. package/docs/examples/console/create-source.md +7 -7
  88. package/docs/examples/console/get-campaign.md +3 -3
  89. package/docs/examples/console/get-coupon.md +3 -3
  90. package/docs/examples/console/{plans.md → get-plan.md} +3 -1
  91. package/docs/examples/console/get-plans.md +13 -0
  92. package/docs/examples/console/{regions.md → get-program.md} +3 -1
  93. package/docs/examples/console/get-regions.md +13 -0
  94. package/docs/examples/console/get-resource.md +4 -4
  95. package/docs/examples/console/suggest-columns.md +17 -0
  96. package/docs/examples/console/suggest-indexes.md +16 -0
  97. package/docs/examples/databases/create-boolean-attribute.md +8 -8
  98. package/docs/examples/databases/create-collection.md +11 -9
  99. package/docs/examples/databases/create-datetime-attribute.md +8 -8
  100. package/docs/examples/databases/create-document.md +16 -11
  101. package/docs/examples/databases/create-documents.md +7 -6
  102. package/docs/examples/databases/create-email-attribute.md +8 -8
  103. package/docs/examples/databases/create-enum-attribute.md +9 -9
  104. package/docs/examples/databases/create-float-attribute.md +10 -10
  105. package/docs/examples/databases/create-index.md +9 -9
  106. package/docs/examples/databases/create-integer-attribute.md +10 -10
  107. package/docs/examples/databases/create-ip-attribute.md +8 -8
  108. package/docs/examples/databases/create-line-attribute.md +17 -0
  109. package/docs/examples/databases/create-operations.md +24 -0
  110. package/docs/examples/databases/create-point-attribute.md +17 -0
  111. package/docs/examples/databases/create-polygon-attribute.md +17 -0
  112. package/docs/examples/databases/create-relationship-attribute.md +10 -10
  113. package/docs/examples/databases/create-string-attribute.md +10 -10
  114. package/docs/examples/databases/create-transaction.md +13 -0
  115. package/docs/examples/databases/create-url-attribute.md +8 -8
  116. package/docs/examples/databases/create.md +5 -5
  117. package/docs/examples/databases/decrement-document-attribute.md +9 -8
  118. package/docs/examples/databases/delete-attribute.md +5 -5
  119. package/docs/examples/databases/delete-collection.md +4 -4
  120. package/docs/examples/databases/delete-document.md +6 -5
  121. package/docs/examples/databases/delete-documents.md +6 -5
  122. package/docs/examples/databases/delete-index.md +5 -5
  123. package/docs/examples/databases/{get-database-usage.md → delete-transaction.md} +4 -5
  124. package/docs/examples/databases/delete.md +3 -3
  125. package/docs/examples/databases/get-attribute.md +5 -5
  126. package/docs/examples/databases/get-collection-usage.md +6 -6
  127. package/docs/examples/databases/get-collection.md +4 -4
  128. package/docs/examples/databases/get-document.md +7 -6
  129. package/docs/examples/databases/get-index.md +5 -5
  130. package/docs/examples/databases/get-transaction.md +13 -0
  131. package/docs/examples/databases/get-usage.md +5 -4
  132. package/docs/examples/databases/get.md +3 -3
  133. package/docs/examples/databases/increment-document-attribute.md +9 -8
  134. package/docs/examples/databases/list-attributes.md +6 -5
  135. package/docs/examples/databases/list-collection-logs.md +5 -5
  136. package/docs/examples/databases/list-collections.md +6 -5
  137. package/docs/examples/databases/list-document-logs.md +6 -6
  138. package/docs/examples/databases/list-documents.md +7 -5
  139. package/docs/examples/databases/list-indexes.md +6 -5
  140. package/docs/examples/databases/list-logs.md +4 -4
  141. package/docs/examples/databases/list-transactions.md +13 -0
  142. package/docs/examples/databases/list-usage.md +13 -0
  143. package/docs/examples/databases/list.md +5 -4
  144. package/docs/examples/databases/update-boolean-attribute.md +8 -8
  145. package/docs/examples/databases/update-collection.md +9 -9
  146. package/docs/examples/databases/update-datetime-attribute.md +8 -8
  147. package/docs/examples/databases/update-document.md +15 -8
  148. package/docs/examples/databases/update-documents.md +13 -6
  149. package/docs/examples/databases/update-email-attribute.md +8 -8
  150. package/docs/examples/databases/update-enum-attribute.md +9 -9
  151. package/docs/examples/databases/update-float-attribute.md +10 -10
  152. package/docs/examples/databases/update-integer-attribute.md +10 -10
  153. package/docs/examples/databases/update-ip-attribute.md +8 -8
  154. package/docs/examples/databases/update-line-attribute.md +18 -0
  155. package/docs/examples/databases/update-point-attribute.md +18 -0
  156. package/docs/examples/databases/update-polygon-attribute.md +18 -0
  157. package/docs/examples/databases/update-relationship-attribute.md +7 -7
  158. package/docs/examples/databases/update-string-attribute.md +9 -9
  159. package/docs/examples/databases/update-transaction.md +15 -0
  160. package/docs/examples/databases/update-url-attribute.md +8 -8
  161. package/docs/examples/databases/update.md +5 -5
  162. package/docs/examples/databases/upsert-document.md +15 -8
  163. package/docs/examples/databases/upsert-documents.md +6 -5
  164. package/docs/examples/domains/create-preset-google-workspace.md +3 -3
  165. package/docs/examples/domains/create-preset-i-cloud.md +3 -3
  166. package/docs/examples/domains/create-preset-mailgun.md +3 -3
  167. package/docs/examples/domains/create-preset-outlook.md +3 -3
  168. package/docs/examples/domains/create-preset-proton-mail.md +3 -3
  169. package/docs/examples/domains/create-preset-zoho.md +3 -3
  170. package/docs/examples/domains/create-record-a.md +7 -7
  171. package/docs/examples/domains/{create-record-a-a-a-a.md → create-record-aaaa.md} +7 -7
  172. package/docs/examples/domains/create-record-alias.md +7 -7
  173. package/docs/examples/domains/{create-record-n-s.md → create-record-caa.md} +7 -7
  174. package/docs/examples/domains/{create-record-c-a-a.md → create-record-cname.md} +7 -7
  175. package/docs/examples/domains/{create-record-h-t-t-p-s.md → create-record-https.md} +7 -7
  176. package/docs/examples/domains/create-record-mx.md +18 -0
  177. package/docs/examples/domains/create-record-ns.md +17 -0
  178. package/docs/examples/domains/create-record-srv.md +20 -0
  179. package/docs/examples/domains/{create-record-c-n-a-m-e.md → create-record-txt.md} +7 -7
  180. package/docs/examples/domains/create.md +4 -4
  181. package/docs/examples/domains/delete-record.md +4 -4
  182. package/docs/examples/domains/delete.md +3 -3
  183. package/docs/examples/domains/get-preset-google-workspace.md +3 -3
  184. package/docs/examples/domains/get-preset-i-cloud.md +3 -3
  185. package/docs/examples/domains/get-preset-mailgun.md +3 -3
  186. package/docs/examples/domains/get-preset-outlook.md +3 -3
  187. package/docs/examples/domains/get-preset-proton-mail.md +3 -3
  188. package/docs/examples/domains/get-preset-zoho.md +3 -3
  189. package/docs/examples/domains/get-record.md +4 -4
  190. package/docs/examples/domains/get-zone.md +3 -3
  191. package/docs/examples/domains/get.md +3 -3
  192. package/docs/examples/domains/list-records.md +4 -4
  193. package/docs/examples/domains/list.md +4 -4
  194. package/docs/examples/domains/update-nameservers.md +3 -3
  195. package/docs/examples/domains/update-record-a.md +8 -8
  196. package/docs/examples/domains/update-record-aaaa.md +18 -0
  197. package/docs/examples/domains/update-record-alias.md +8 -8
  198. package/docs/examples/domains/update-record-caa.md +18 -0
  199. package/docs/examples/domains/update-record-cname.md +18 -0
  200. package/docs/examples/domains/update-record-https.md +18 -0
  201. package/docs/examples/domains/update-record-mx.md +19 -0
  202. package/docs/examples/domains/update-record-ns.md +18 -0
  203. package/docs/examples/domains/update-record-srv.md +21 -0
  204. package/docs/examples/domains/update-record-txt.md +18 -0
  205. package/docs/examples/domains/update-team.md +4 -4
  206. package/docs/examples/domains/update-zone.md +4 -4
  207. package/docs/examples/functions/create-deployment.md +7 -7
  208. package/docs/examples/functions/create-duplicate-deployment.md +5 -5
  209. package/docs/examples/functions/create-execution.md +9 -9
  210. package/docs/examples/functions/create-template-deployment.md +10 -9
  211. package/docs/examples/functions/create-variable.md +6 -6
  212. package/docs/examples/functions/create-vcs-deployment.md +7 -7
  213. package/docs/examples/functions/create.md +21 -21
  214. package/docs/examples/functions/delete-deployment.md +4 -4
  215. package/docs/examples/functions/delete-execution.md +4 -4
  216. package/docs/examples/functions/delete-variable.md +4 -4
  217. package/docs/examples/functions/delete.md +3 -3
  218. package/docs/examples/functions/get-deployment-download.md +5 -5
  219. package/docs/examples/functions/get-deployment.md +4 -4
  220. package/docs/examples/functions/get-execution.md +4 -4
  221. package/docs/examples/functions/get-template.md +3 -3
  222. package/docs/examples/functions/get-usage.md +5 -5
  223. package/docs/examples/functions/get-variable.md +4 -4
  224. package/docs/examples/functions/get.md +3 -3
  225. package/docs/examples/functions/list-deployments.md +6 -5
  226. package/docs/examples/functions/list-executions.md +5 -4
  227. package/docs/examples/functions/list-templates.md +7 -6
  228. package/docs/examples/functions/list-usage.md +4 -4
  229. package/docs/examples/functions/list-variables.md +3 -3
  230. package/docs/examples/functions/list.md +5 -4
  231. package/docs/examples/functions/update-deployment-status.md +4 -4
  232. package/docs/examples/functions/update-function-deployment.md +4 -4
  233. package/docs/examples/functions/update-variable.md +7 -7
  234. package/docs/examples/functions/update.md +21 -21
  235. package/docs/examples/graphql/mutation.md +3 -3
  236. package/docs/examples/graphql/query.md +3 -3
  237. package/docs/examples/health/get-certificate.md +3 -3
  238. package/docs/examples/health/get-failed-jobs.md +5 -5
  239. package/docs/examples/health/get-queue-billing-project-aggregation.md +3 -3
  240. package/docs/examples/health/get-queue-billing-team-aggregation.md +3 -3
  241. package/docs/examples/health/get-queue-builds.md +3 -3
  242. package/docs/examples/health/get-queue-certificates.md +3 -3
  243. package/docs/examples/health/get-queue-databases.md +4 -4
  244. package/docs/examples/health/get-queue-deletes.md +3 -3
  245. package/docs/examples/health/get-queue-functions.md +3 -3
  246. package/docs/examples/health/get-queue-logs.md +3 -3
  247. package/docs/examples/health/get-queue-mails.md +3 -3
  248. package/docs/examples/health/get-queue-messaging.md +3 -3
  249. package/docs/examples/health/get-queue-migrations.md +3 -3
  250. package/docs/examples/health/get-queue-priority-builds.md +3 -3
  251. package/docs/examples/health/get-queue-region-manager.md +3 -3
  252. package/docs/examples/health/get-queue-stats-resources.md +3 -3
  253. package/docs/examples/health/get-queue-threats.md +13 -0
  254. package/docs/examples/health/get-queue-usage.md +3 -3
  255. package/docs/examples/health/get-queue-webhooks.md +3 -3
  256. package/docs/examples/messaging/create-apns-provider.md +10 -10
  257. package/docs/examples/messaging/create-email.md +14 -14
  258. package/docs/examples/messaging/create-fcm-provider.md +6 -6
  259. package/docs/examples/messaging/create-mailgun-provider.md +12 -12
  260. package/docs/examples/messaging/{create-msg91provider.md → create-msg-91-provider.md} +8 -8
  261. package/docs/examples/messaging/create-push.md +21 -21
  262. package/docs/examples/messaging/create-resend-provider.md +20 -0
  263. package/docs/examples/messaging/create-sendgrid-provider.md +10 -10
  264. package/docs/examples/messaging/create-sms.md +9 -9
  265. package/docs/examples/messaging/create-smtp-provider.md +16 -16
  266. package/docs/examples/messaging/create-subscriber.md +5 -5
  267. package/docs/examples/messaging/create-telesign-provider.md +8 -8
  268. package/docs/examples/messaging/create-textmagic-provider.md +8 -8
  269. package/docs/examples/messaging/create-topic.md +5 -5
  270. package/docs/examples/messaging/create-twilio-provider.md +8 -8
  271. package/docs/examples/messaging/create-vonage-provider.md +8 -8
  272. package/docs/examples/messaging/delete-provider.md +3 -3
  273. package/docs/examples/messaging/delete-subscriber.md +4 -4
  274. package/docs/examples/messaging/delete-topic.md +3 -3
  275. package/docs/examples/messaging/delete.md +3 -3
  276. package/docs/examples/messaging/get-message.md +3 -3
  277. package/docs/examples/messaging/get-provider.md +3 -3
  278. package/docs/examples/messaging/get-subscriber.md +4 -4
  279. package/docs/examples/messaging/get-topic.md +3 -3
  280. package/docs/examples/messaging/list-message-logs.md +5 -4
  281. package/docs/examples/messaging/list-messages.md +5 -4
  282. package/docs/examples/messaging/list-provider-logs.md +5 -4
  283. package/docs/examples/messaging/list-providers.md +5 -4
  284. package/docs/examples/messaging/list-subscriber-logs.md +5 -4
  285. package/docs/examples/messaging/list-subscribers.md +6 -5
  286. package/docs/examples/messaging/list-targets.md +5 -4
  287. package/docs/examples/messaging/list-topic-logs.md +5 -4
  288. package/docs/examples/messaging/list-topics.md +5 -4
  289. package/docs/examples/messaging/update-apns-provider.md +10 -10
  290. package/docs/examples/messaging/update-email.md +14 -14
  291. package/docs/examples/messaging/update-fcm-provider.md +6 -6
  292. package/docs/examples/messaging/update-mailgun-provider.md +12 -12
  293. package/docs/examples/messaging/{update-msg91provider.md → update-msg-91-provider.md} +8 -8
  294. package/docs/examples/messaging/update-push.md +21 -21
  295. package/docs/examples/messaging/update-resend-provider.md +20 -0
  296. package/docs/examples/messaging/update-sendgrid-provider.md +10 -10
  297. package/docs/examples/messaging/update-sms.md +9 -9
  298. package/docs/examples/messaging/update-smtp-provider.md +16 -16
  299. package/docs/examples/messaging/update-telesign-provider.md +8 -8
  300. package/docs/examples/messaging/update-textmagic-provider.md +8 -8
  301. package/docs/examples/messaging/update-topic.md +5 -5
  302. package/docs/examples/messaging/update-twilio-provider.md +8 -8
  303. package/docs/examples/messaging/update-vonage-provider.md +8 -8
  304. package/docs/examples/migrations/create-appwrite-migration.md +6 -6
  305. package/docs/examples/migrations/create-csv-export.md +21 -0
  306. package/docs/examples/migrations/{create-csv-migration.md → create-csv-import.md} +6 -5
  307. package/docs/examples/migrations/create-firebase-migration.md +4 -4
  308. package/docs/examples/migrations/create-n-host-migration.md +10 -10
  309. package/docs/examples/migrations/create-supabase-migration.md +9 -9
  310. package/docs/examples/migrations/delete.md +3 -3
  311. package/docs/examples/migrations/get-appwrite-report.md +6 -6
  312. package/docs/examples/migrations/get-firebase-report.md +4 -4
  313. package/docs/examples/migrations/get-n-host-report.md +10 -10
  314. package/docs/examples/migrations/get-supabase-report.md +9 -9
  315. package/docs/examples/migrations/get.md +3 -3
  316. package/docs/examples/migrations/list.md +5 -4
  317. package/docs/examples/migrations/retry.md +3 -3
  318. package/docs/examples/organizations/add-credit.md +4 -4
  319. package/docs/examples/organizations/cancel-downgrade.md +3 -3
  320. package/docs/examples/organizations/create-downgrade-feedback.md +17 -0
  321. package/docs/examples/organizations/create-invoice-payment.md +5 -5
  322. package/docs/examples/organizations/create.md +13 -12
  323. package/docs/examples/organizations/delete-backup-payment-method.md +3 -3
  324. package/docs/examples/organizations/delete-billing-address.md +3 -3
  325. package/docs/examples/organizations/delete-default-payment-method.md +3 -3
  326. package/docs/examples/organizations/delete.md +3 -3
  327. package/docs/examples/organizations/estimation-create-organization.md +8 -7
  328. package/docs/examples/organizations/estimation-delete-organization.md +3 -3
  329. package/docs/examples/organizations/estimation-update-plan.md +7 -7
  330. package/docs/examples/organizations/get-aggregation.md +6 -4
  331. package/docs/examples/organizations/get-available-credits.md +13 -0
  332. package/docs/examples/organizations/get-billing-address.md +4 -4
  333. package/docs/examples/organizations/get-credit.md +4 -4
  334. package/docs/examples/organizations/get-invoice-download.md +4 -4
  335. package/docs/examples/organizations/get-invoice-view.md +4 -4
  336. package/docs/examples/organizations/get-invoice.md +4 -4
  337. package/docs/examples/organizations/get-payment-method.md +4 -4
  338. package/docs/examples/organizations/get-plan.md +3 -3
  339. package/docs/examples/organizations/get-scopes.md +3 -3
  340. package/docs/examples/organizations/get-usage.md +5 -5
  341. package/docs/examples/organizations/list-aggregations.md +4 -4
  342. package/docs/examples/organizations/list-credits.md +4 -4
  343. package/docs/examples/organizations/list-invoices.md +4 -4
  344. package/docs/examples/organizations/list.md +4 -4
  345. package/docs/examples/organizations/set-backup-payment-method.md +4 -4
  346. package/docs/examples/organizations/set-billing-address.md +4 -4
  347. package/docs/examples/organizations/set-billing-email.md +4 -4
  348. package/docs/examples/organizations/set-billing-tax-id.md +4 -4
  349. package/docs/examples/organizations/set-default-payment-method.md +4 -4
  350. package/docs/examples/organizations/update-budget.md +5 -5
  351. package/docs/examples/organizations/update-plan.md +11 -11
  352. package/docs/examples/organizations/update-projects.md +14 -0
  353. package/docs/examples/organizations/validate-invoice.md +4 -4
  354. package/docs/examples/organizations/validate-payment.md +4 -4
  355. package/docs/examples/project/create-variable.md +5 -5
  356. package/docs/examples/project/delete-variable.md +3 -3
  357. package/docs/examples/project/get-usage.md +5 -5
  358. package/docs/examples/project/get-variable.md +3 -3
  359. package/docs/examples/project/update-variable.md +6 -6
  360. package/docs/examples/projects/create-dev-key.md +5 -5
  361. package/docs/examples/projects/{create-j-w-t.md → create-jwt.md} +5 -5
  362. package/docs/examples/projects/create-key.md +6 -6
  363. package/docs/examples/projects/create-platform.md +8 -8
  364. package/docs/examples/projects/create-smtp-test.md +12 -12
  365. package/docs/examples/projects/create-webhook.md +10 -10
  366. package/docs/examples/projects/create.md +16 -16
  367. package/docs/examples/projects/delete-dev-key.md +4 -4
  368. package/docs/examples/projects/delete-email-template.md +5 -5
  369. package/docs/examples/projects/delete-key.md +4 -4
  370. package/docs/examples/projects/delete-platform.md +4 -4
  371. package/docs/examples/projects/delete-sms-template.md +5 -5
  372. package/docs/examples/projects/delete-webhook.md +4 -4
  373. package/docs/examples/projects/delete.md +3 -3
  374. package/docs/examples/projects/get-dev-key.md +4 -4
  375. package/docs/examples/projects/get-email-template.md +5 -5
  376. package/docs/examples/projects/get-key.md +4 -4
  377. package/docs/examples/projects/get-platform.md +4 -4
  378. package/docs/examples/projects/get-sms-template.md +5 -5
  379. package/docs/examples/projects/get-webhook.md +4 -4
  380. package/docs/examples/projects/get.md +3 -3
  381. package/docs/examples/projects/list-dev-keys.md +4 -4
  382. package/docs/examples/projects/list-keys.md +4 -3
  383. package/docs/examples/projects/list-platforms.md +4 -3
  384. package/docs/examples/projects/list-webhooks.md +4 -3
  385. package/docs/examples/projects/list.md +5 -4
  386. package/docs/examples/projects/update-api-status-all.md +4 -4
  387. package/docs/examples/projects/update-api-status.md +6 -6
  388. package/docs/examples/projects/update-auth-duration.md +4 -4
  389. package/docs/examples/projects/update-auth-limit.md +4 -4
  390. package/docs/examples/projects/update-auth-password-dictionary.md +4 -4
  391. package/docs/examples/projects/update-auth-password-history.md +4 -4
  392. package/docs/examples/projects/update-auth-sessions-limit.md +4 -4
  393. package/docs/examples/projects/update-auth-status.md +5 -5
  394. package/docs/examples/projects/update-dev-key.md +6 -6
  395. package/docs/examples/projects/update-email-template.md +10 -10
  396. package/docs/examples/projects/update-key.md +7 -7
  397. package/docs/examples/projects/update-memberships-privacy.md +6 -6
  398. package/docs/examples/projects/update-mock-numbers.md +4 -4
  399. package/docs/examples/projects/{update-o-auth2.md → update-o-auth-2.md} +7 -7
  400. package/docs/examples/projects/update-personal-data-check.md +4 -4
  401. package/docs/examples/projects/update-platform.md +8 -8
  402. package/docs/examples/projects/update-service-status-all.md +4 -4
  403. package/docs/examples/projects/update-service-status.md +5 -5
  404. package/docs/examples/projects/update-session-alerts.md +4 -4
  405. package/docs/examples/projects/update-session-invalidation.md +14 -0
  406. package/docs/examples/projects/update-sms-template.md +6 -6
  407. package/docs/examples/projects/update-smtp.md +12 -12
  408. package/docs/examples/projects/update-status.md +14 -0
  409. package/docs/examples/projects/update-team.md +4 -4
  410. package/docs/examples/projects/update-webhook-signature.md +4 -4
  411. package/docs/examples/projects/update-webhook.md +11 -11
  412. package/docs/examples/projects/update.md +13 -13
  413. package/docs/examples/proxy/{create-a-p-i-rule.md → create-api-rule.md} +3 -3
  414. package/docs/examples/proxy/create-function-rule.md +5 -5
  415. package/docs/examples/proxy/create-redirect-rule.md +8 -8
  416. package/docs/examples/proxy/create-site-rule.md +5 -5
  417. package/docs/examples/proxy/delete-rule.md +3 -3
  418. package/docs/examples/proxy/get-rule.md +3 -3
  419. package/docs/examples/proxy/list-rules.md +5 -4
  420. package/docs/examples/proxy/update-rule-verification.md +3 -3
  421. package/docs/examples/sites/create-deployment.md +8 -8
  422. package/docs/examples/sites/create-duplicate-deployment.md +4 -4
  423. package/docs/examples/sites/create-template-deployment.md +10 -9
  424. package/docs/examples/sites/create-variable.md +6 -6
  425. package/docs/examples/sites/create-vcs-deployment.md +7 -7
  426. package/docs/examples/sites/create.md +21 -21
  427. package/docs/examples/sites/delete-deployment.md +4 -4
  428. package/docs/examples/sites/delete-log.md +4 -4
  429. package/docs/examples/sites/delete-variable.md +4 -4
  430. package/docs/examples/sites/delete.md +3 -3
  431. package/docs/examples/sites/get-deployment-download.md +5 -5
  432. package/docs/examples/sites/get-deployment.md +4 -4
  433. package/docs/examples/sites/get-log.md +4 -4
  434. package/docs/examples/sites/get-template.md +3 -3
  435. package/docs/examples/sites/get-usage.md +5 -5
  436. package/docs/examples/sites/get-variable.md +4 -4
  437. package/docs/examples/sites/get.md +3 -3
  438. package/docs/examples/sites/list-deployments.md +6 -5
  439. package/docs/examples/sites/list-logs.md +5 -4
  440. package/docs/examples/sites/list-templates.md +6 -6
  441. package/docs/examples/sites/list-usage.md +4 -4
  442. package/docs/examples/sites/list-variables.md +3 -3
  443. package/docs/examples/sites/list.md +5 -4
  444. package/docs/examples/sites/update-deployment-status.md +4 -4
  445. package/docs/examples/sites/update-site-deployment.md +4 -4
  446. package/docs/examples/sites/update-variable.md +7 -7
  447. package/docs/examples/sites/update.md +21 -21
  448. package/docs/examples/storage/create-bucket.md +14 -13
  449. package/docs/examples/storage/create-file.md +7 -7
  450. package/docs/examples/storage/delete-bucket.md +3 -3
  451. package/docs/examples/storage/delete-file.md +4 -4
  452. package/docs/examples/storage/get-bucket-usage.md +5 -5
  453. package/docs/examples/storage/get-bucket.md +3 -3
  454. package/docs/examples/storage/get-file-download.md +5 -5
  455. package/docs/examples/storage/get-file-preview.md +16 -16
  456. package/docs/examples/storage/get-file-view.md +5 -5
  457. package/docs/examples/storage/get-file.md +4 -4
  458. package/docs/examples/storage/get-usage.md +4 -4
  459. package/docs/examples/storage/list-buckets.md +5 -4
  460. package/docs/examples/storage/list-files.md +6 -5
  461. package/docs/examples/storage/update-bucket.md +14 -13
  462. package/docs/examples/storage/update-file.md +7 -7
  463. package/docs/examples/tablesdb/create-boolean-column.md +18 -0
  464. package/docs/examples/tablesdb/create-datetime-column.md +18 -0
  465. package/docs/examples/tablesdb/create-email-column.md +18 -0
  466. package/docs/examples/tablesdb/create-enum-column.md +19 -0
  467. package/docs/examples/tablesdb/create-float-column.md +20 -0
  468. package/docs/examples/tablesdb/create-index.md +19 -0
  469. package/docs/examples/tablesdb/create-integer-column.md +20 -0
  470. package/docs/examples/tablesdb/create-ip-column.md +18 -0
  471. package/docs/examples/tablesdb/create-line-column.md +17 -0
  472. package/docs/examples/tablesdb/create-operations.md +24 -0
  473. package/docs/examples/tablesdb/create-point-column.md +17 -0
  474. package/docs/examples/tablesdb/create-polygon-column.md +17 -0
  475. package/docs/examples/tablesdb/create-relationship-column.md +20 -0
  476. package/docs/examples/tablesdb/create-row.md +24 -0
  477. package/docs/examples/tablesdb/create-rows.md +16 -0
  478. package/docs/examples/tablesdb/create-string-column.md +20 -0
  479. package/docs/examples/tablesdb/create-table.md +20 -0
  480. package/docs/examples/tablesdb/create-transaction.md +13 -0
  481. package/docs/examples/tablesdb/create-url-column.md +18 -0
  482. package/docs/examples/tablesdb/create.md +15 -0
  483. package/docs/examples/tablesdb/decrement-row-column.md +19 -0
  484. package/docs/examples/tablesdb/delete-column.md +15 -0
  485. package/docs/examples/tablesdb/delete-index.md +15 -0
  486. package/docs/examples/tablesdb/delete-row.md +16 -0
  487. package/docs/examples/tablesdb/delete-rows.md +16 -0
  488. package/docs/examples/tablesdb/delete-table.md +14 -0
  489. package/docs/examples/tablesdb/delete-transaction.md +13 -0
  490. package/docs/examples/tablesdb/delete.md +13 -0
  491. package/docs/examples/tablesdb/get-column.md +15 -0
  492. package/docs/examples/tablesdb/get-index.md +15 -0
  493. package/docs/examples/tablesdb/get-row.md +17 -0
  494. package/docs/examples/tablesdb/get-table-usage.md +15 -0
  495. package/docs/examples/tablesdb/get-table.md +14 -0
  496. package/docs/examples/tablesdb/get-transaction.md +13 -0
  497. package/docs/examples/tablesdb/get-usage.md +14 -0
  498. package/docs/examples/tablesdb/get.md +13 -0
  499. package/docs/examples/tablesdb/increment-row-column.md +19 -0
  500. package/docs/examples/tablesdb/list-columns.md +16 -0
  501. package/docs/examples/tablesdb/list-indexes.md +16 -0
  502. package/docs/examples/tablesdb/list-row-logs.md +16 -0
  503. package/docs/examples/tablesdb/list-rows.md +17 -0
  504. package/docs/examples/tablesdb/list-table-logs.md +15 -0
  505. package/docs/examples/tablesdb/list-tables.md +16 -0
  506. package/docs/examples/tablesdb/list-transactions.md +13 -0
  507. package/docs/examples/tablesdb/list-usage.md +13 -0
  508. package/docs/examples/tablesdb/list.md +15 -0
  509. package/docs/examples/tablesdb/update-boolean-column.md +18 -0
  510. package/docs/examples/tablesdb/update-datetime-column.md +18 -0
  511. package/docs/examples/tablesdb/update-email-column.md +18 -0
  512. package/docs/examples/tablesdb/update-enum-column.md +19 -0
  513. package/docs/examples/tablesdb/update-float-column.md +20 -0
  514. package/docs/examples/tablesdb/update-integer-column.md +20 -0
  515. package/docs/examples/tablesdb/update-ip-column.md +18 -0
  516. package/docs/examples/tablesdb/update-line-column.md +18 -0
  517. package/docs/examples/tablesdb/update-point-column.md +18 -0
  518. package/docs/examples/tablesdb/update-polygon-column.md +18 -0
  519. package/docs/examples/tablesdb/update-relationship-column.md +17 -0
  520. package/docs/examples/tablesdb/update-row.md +24 -0
  521. package/docs/examples/tablesdb/update-rows.md +23 -0
  522. package/docs/examples/tablesdb/update-string-column.md +19 -0
  523. package/docs/examples/tablesdb/update-table.md +18 -0
  524. package/docs/examples/tablesdb/update-transaction.md +15 -0
  525. package/docs/examples/tablesdb/update-url-column.md +18 -0
  526. package/docs/examples/tablesdb/update.md +15 -0
  527. package/docs/examples/tablesdb/upsert-row.md +24 -0
  528. package/docs/examples/tablesdb/upsert-rows.md +16 -0
  529. package/docs/examples/teams/create-membership.md +9 -9
  530. package/docs/examples/teams/create.md +5 -5
  531. package/docs/examples/teams/delete-membership.md +4 -4
  532. package/docs/examples/teams/delete.md +3 -3
  533. package/docs/examples/teams/get-membership.md +4 -4
  534. package/docs/examples/teams/get-prefs.md +3 -3
  535. package/docs/examples/teams/get.md +3 -3
  536. package/docs/examples/teams/list-logs.md +5 -4
  537. package/docs/examples/teams/list-memberships.md +6 -5
  538. package/docs/examples/teams/list.md +5 -4
  539. package/docs/examples/teams/update-membership-status.md +6 -6
  540. package/docs/examples/teams/update-membership.md +5 -5
  541. package/docs/examples/teams/update-name.md +4 -4
  542. package/docs/examples/teams/update-prefs.md +4 -4
  543. package/docs/examples/tokens/create-file-token.md +5 -5
  544. package/docs/examples/tokens/delete.md +3 -3
  545. package/docs/examples/tokens/get.md +3 -3
  546. package/docs/examples/tokens/list.md +6 -5
  547. package/docs/examples/tokens/update.md +4 -4
  548. package/docs/examples/users/{create-m-d5user.md → create-argon-2-user.md} +6 -6
  549. package/docs/examples/users/create-bcrypt-user.md +6 -6
  550. package/docs/examples/users/{create-j-w-t.md → create-jwt.md} +5 -5
  551. package/docs/examples/users/{create-argon2user.md → create-md-5-user.md} +6 -6
  552. package/docs/examples/users/create-mfa-recovery-codes.md +3 -3
  553. package/docs/examples/users/{create-p-h-pass-user.md → create-ph-pass-user.md} +6 -6
  554. package/docs/examples/users/create-scrypt-modified-user.md +9 -9
  555. package/docs/examples/users/create-scrypt-user.md +11 -11
  556. package/docs/examples/users/create-session.md +3 -3
  557. package/docs/examples/users/{create-s-h-a-user.md → create-sha-user.md} +7 -7
  558. package/docs/examples/users/create-target.md +8 -8
  559. package/docs/examples/users/create-token.md +5 -5
  560. package/docs/examples/users/create.md +7 -7
  561. package/docs/examples/users/delete-identity.md +3 -3
  562. package/docs/examples/users/delete-mfa-authenticator.md +4 -4
  563. package/docs/examples/users/delete-session.md +4 -4
  564. package/docs/examples/users/delete-sessions.md +3 -3
  565. package/docs/examples/users/delete-target.md +4 -4
  566. package/docs/examples/users/delete.md +3 -3
  567. package/docs/examples/users/get-mfa-recovery-codes.md +3 -3
  568. package/docs/examples/users/get-prefs.md +3 -3
  569. package/docs/examples/users/get-target.md +4 -4
  570. package/docs/examples/users/get-usage.md +4 -4
  571. package/docs/examples/users/get.md +3 -3
  572. package/docs/examples/users/list-identities.md +5 -4
  573. package/docs/examples/users/list-logs.md +5 -4
  574. package/docs/examples/users/list-memberships.md +6 -5
  575. package/docs/examples/users/list-mfa-factors.md +3 -3
  576. package/docs/examples/users/list-sessions.md +4 -3
  577. package/docs/examples/users/list-targets.md +5 -4
  578. package/docs/examples/users/list.md +5 -4
  579. package/docs/examples/users/update-email-verification.md +4 -4
  580. package/docs/examples/users/update-email.md +4 -4
  581. package/docs/examples/users/update-labels.md +4 -4
  582. package/docs/examples/users/update-mfa-recovery-codes.md +3 -3
  583. package/docs/examples/users/update-mfa.md +4 -4
  584. package/docs/examples/users/update-name.md +4 -4
  585. package/docs/examples/users/update-password.md +4 -4
  586. package/docs/examples/users/update-phone-verification.md +4 -4
  587. package/docs/examples/users/update-phone.md +4 -4
  588. package/docs/examples/users/update-prefs.md +4 -4
  589. package/docs/examples/users/update-status.md +4 -4
  590. package/docs/examples/users/update-target.md +7 -7
  591. package/docs/examples/vcs/create-repository-detection.md +6 -6
  592. package/docs/examples/vcs/create-repository.md +5 -5
  593. package/docs/examples/vcs/delete-installation.md +3 -3
  594. package/docs/examples/vcs/get-installation.md +3 -3
  595. package/docs/examples/vcs/get-repository-contents.md +6 -5
  596. package/docs/examples/vcs/get-repository.md +4 -4
  597. package/docs/examples/vcs/list-installations.md +5 -4
  598. package/docs/examples/vcs/list-repositories.md +6 -5
  599. package/docs/examples/vcs/list-repository-branches.md +4 -4
  600. package/docs/examples/vcs/update-external-deployments.md +5 -5
  601. package/package.json +4 -4
  602. package/src/client.ts +42 -7
  603. package/src/enums/api-service.ts +1 -0
  604. package/src/enums/attribute-status.ts +7 -0
  605. package/src/enums/billing-plan-group.ts +5 -0
  606. package/src/enums/build-runtime.ts +2 -0
  607. package/src/enums/column-status.ts +7 -0
  608. package/src/enums/credit-card.ts +1 -1
  609. package/src/enums/database-type.ts +4 -0
  610. package/src/enums/deployment-status.ts +7 -0
  611. package/src/enums/execution-method.ts +1 -0
  612. package/src/enums/execution-status.ts +7 -0
  613. package/src/enums/execution-trigger.ts +5 -0
  614. package/src/enums/framework.ts +1 -0
  615. package/src/enums/health-antivirus-status.ts +5 -0
  616. package/src/enums/health-check-status.ts +4 -0
  617. package/src/enums/index-status.ts +7 -0
  618. package/src/enums/index-type.ts +1 -0
  619. package/src/enums/message-status.ts +7 -0
  620. package/src/enums/o-auth-provider.ts +3 -0
  621. package/src/enums/platform.ts +4 -0
  622. package/src/enums/proxy-rule-deployment-resource-type.ts +4 -0
  623. package/src/enums/proxy-rule-status.ts +6 -0
  624. package/src/enums/region.ts +3 -0
  625. package/src/enums/runtime.ts +2 -0
  626. package/src/enums/status.ts +4 -0
  627. package/src/enums/template-reference-type.ts +5 -0
  628. package/src/enums/theme.ts +4 -0
  629. package/src/enums/timezone.ts +421 -0
  630. package/src/enums/{user-usage-range.ts → usage-range.ts} +1 -1
  631. package/src/enums/{v-c-s-deployment-type.ts → vcs-reference-type.ts} +1 -1
  632. package/src/index.ts +27 -11
  633. package/src/models.ts +1925 -239
  634. package/src/operator.ts +308 -0
  635. package/src/query.ts +246 -2
  636. package/src/services/account.ts +2278 -235
  637. package/src/services/assistant.ts +29 -3
  638. package/src/services/avatars.ts +511 -52
  639. package/src/services/backups.ts +400 -42
  640. package/src/services/console.ts +499 -19
  641. package/src/services/databases.ts +3584 -430
  642. package/src/services/domains.ts +1795 -266
  643. package/src/services/functions.ts +1197 -155
  644. package/src/services/graphql.ts +56 -4
  645. package/src/services/health.ts +586 -42
  646. package/src/services/locale.ts +18 -2
  647. package/src/services/messaging.ts +3418 -386
  648. package/src/services/migrations.ts +653 -65
  649. package/src/services/organizations.ts +1411 -126
  650. package/src/services/project.ts +173 -17
  651. package/src/services/projects.ts +2808 -282
  652. package/src/services/proxy.ts +272 -26
  653. package/src/services/realtime.ts +437 -0
  654. package/src/services/sites.ts +1129 -143
  655. package/src/services/storage.ts +672 -89
  656. package/src/services/tables-db.ts +5439 -0
  657. package/src/services/teams.ts +535 -65
  658. package/src/services/tokens.ts +171 -16
  659. package/src/services/users.ts +1916 -182
  660. package/src/services/vcs.ts +373 -41
  661. package/types/client.d.ts +14 -5
  662. package/types/enums/api-service.d.ts +1 -0
  663. package/types/enums/attribute-status.d.ts +7 -0
  664. package/types/enums/billing-plan-group.d.ts +5 -0
  665. package/types/enums/build-runtime.d.ts +3 -1
  666. package/types/enums/column-status.d.ts +7 -0
  667. package/types/enums/credit-card.d.ts +1 -1
  668. package/types/enums/database-type.d.ts +4 -0
  669. package/types/enums/deployment-status.d.ts +7 -0
  670. package/types/enums/execution-method.d.ts +2 -1
  671. package/types/enums/execution-status.d.ts +7 -0
  672. package/types/enums/execution-trigger.d.ts +5 -0
  673. package/types/enums/framework.d.ts +1 -0
  674. package/types/enums/health-antivirus-status.d.ts +5 -0
  675. package/types/enums/health-check-status.d.ts +4 -0
  676. package/types/enums/index-status.d.ts +7 -0
  677. package/types/enums/index-type.d.ts +2 -1
  678. package/types/enums/message-status.d.ts +7 -0
  679. package/types/enums/o-auth-provider.d.ts +4 -1
  680. package/types/enums/platform.d.ts +4 -0
  681. package/types/enums/proxy-rule-deployment-resource-type.d.ts +4 -0
  682. package/types/enums/proxy-rule-status.d.ts +6 -0
  683. package/types/enums/region.d.ts +4 -1
  684. package/types/enums/runtime.d.ts +3 -1
  685. package/types/enums/status.d.ts +4 -0
  686. package/types/enums/template-reference-type.d.ts +5 -0
  687. package/types/enums/theme.d.ts +4 -0
  688. package/types/enums/timezone.d.ts +421 -0
  689. package/types/enums/{site-usage-range.d.ts → usage-range.d.ts} +1 -1
  690. package/types/enums/{v-c-s-deployment-type.d.ts → vcs-reference-type.d.ts} +1 -1
  691. package/types/index.d.ts +27 -11
  692. package/types/models.d.ts +1877 -422
  693. package/types/operator.d.ts +180 -0
  694. package/types/query.d.ts +198 -2
  695. package/types/services/account.d.ts +1020 -158
  696. package/types/services/assistant.d.ts +13 -2
  697. package/types/services/avatars.d.ts +263 -45
  698. package/types/services/backups.d.ts +190 -30
  699. package/types/services/console.d.ts +202 -15
  700. package/types/services/databases.d.ts +1756 -299
  701. package/types/services/domains.d.ts +971 -219
  702. package/types/services/functions.d.ts +622 -131
  703. package/types/services/graphql.d.ts +24 -2
  704. package/types/services/health.d.ts +246 -24
  705. package/types/services/locale.d.ts +2 -2
  706. package/types/services/messaging.d.ts +1670 -281
  707. package/types/services/migrations.d.ts +319 -53
  708. package/types/services/organizations.d.ts +664 -109
  709. package/types/services/project.d.ts +81 -12
  710. package/types/services/projects.d.ts +1308 -202
  711. package/types/services/proxy.d.ts +128 -19
  712. package/types/services/realtime.d.ts +118 -0
  713. package/types/services/sites.d.ts +580 -119
  714. package/types/services/storage.d.ts +362 -81
  715. package/types/services/tables-db.d.ts +2040 -0
  716. package/types/services/teams.d.ts +277 -61
  717. package/types/services/tokens.d.ts +80 -12
  718. package/types/services/users.d.ts +906 -149
  719. package/types/services/vcs.d.ts +182 -34
  720. package/docs/examples/domains/create-record-m-x.md +0 -18
  721. package/docs/examples/domains/create-record-s-r-v.md +0 -20
  722. package/docs/examples/domains/create-record-t-x-t.md +0 -17
  723. package/docs/examples/domains/update-record-a-a-a-a.md +0 -18
  724. package/docs/examples/domains/update-record-c-a-a.md +0 -18
  725. package/docs/examples/domains/update-record-c-n-a-m-e.md +0 -18
  726. package/docs/examples/domains/update-record-h-t-t-p-s.md +0 -18
  727. package/docs/examples/domains/update-record-m-x.md +0 -19
  728. package/docs/examples/domains/update-record-n-s.md +0 -18
  729. package/docs/examples/domains/update-record-s-r-v.md +0 -21
  730. package/docs/examples/domains/update-record-t-x-t.md +0 -18
  731. package/src/enums/billing-plan.ts +0 -5
  732. package/src/enums/database-usage-range.ts +0 -5
  733. package/src/enums/function-usage-range.ts +0 -5
  734. package/src/enums/site-usage-range.ts +0 -5
  735. package/src/enums/storage-usage-range.ts +0 -5
  736. package/types/enums/billing-plan.d.ts +0 -5
  737. package/types/enums/database-usage-range.d.ts +0 -5
  738. package/types/enums/function-usage-range.d.ts +0 -5
  739. package/types/enums/storage-usage-range.d.ts +0 -5
  740. package/types/enums/user-usage-range.d.ts +0 -5
  741. /package/docs/examples/health/{get-d-b.md → get-db.md} +0 -0
  742. /package/docs/examples/locale/{list-countries-e-u.md → list-countries-eu.md} +0 -0
  743. /package/src/enums/{s-m-t-p-secure.ts → smtp-secure.ts} +0 -0
  744. /package/src/enums/{v-c-s-detection-type.ts → vcs-detection-type.ts} +0 -0
  745. /package/types/enums/{s-m-t-p-secure.d.ts → smtp-secure.d.ts} +0 -0
  746. /package/types/enums/{v-c-s-detection-type.d.ts → vcs-detection-type.d.ts} +0 -0
@@ -12,18 +12,35 @@ export declare class Account {
12
12
  * @throws {AppwriteException}
13
13
  * @returns {Promise<Models.User<Preferences>>}
14
14
  */
15
- get<Preferences extends Models.Preferences>(): Promise<Models.User<Preferences>>;
15
+ get<Preferences extends Models.Preferences = Models.DefaultPreferences>(): Promise<Models.User<Preferences>>;
16
16
  /**
17
17
  * Use this endpoint to allow a new user to register a new account in your project. After the user registration completes successfully, you can use the [/account/verfication](https://appwrite.io/docs/references/cloud/client-web/account#createVerification) route to start verifying the user email address. To allow the new user to login to their new account, you need to create a new [account session](https://appwrite.io/docs/references/cloud/client-web/account#createEmailSession).
18
18
  *
19
- * @param {string} userId
20
- * @param {string} email
21
- * @param {string} password
22
- * @param {string} name
19
+ * @param {string} params.userId - User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
20
+ * @param {string} params.email - User email.
21
+ * @param {string} params.password - New user password. Must be between 8 and 256 chars.
22
+ * @param {string} params.name - User name. Max length: 128 chars.
23
23
  * @throws {AppwriteException}
24
24
  * @returns {Promise<Models.User<Preferences>>}
25
25
  */
26
- create<Preferences extends Models.Preferences>(userId: string, email: string, password: string, name?: string): Promise<Models.User<Preferences>>;
26
+ create<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: {
27
+ userId: string;
28
+ email: string;
29
+ password: string;
30
+ name?: string;
31
+ }): Promise<Models.User<Preferences>>;
32
+ /**
33
+ * Use this endpoint to allow a new user to register a new account in your project. After the user registration completes successfully, you can use the [/account/verfication](https://appwrite.io/docs/references/cloud/client-web/account#createVerification) route to start verifying the user email address. To allow the new user to login to their new account, you need to create a new [account session](https://appwrite.io/docs/references/cloud/client-web/account#createEmailSession).
34
+ *
35
+ * @param {string} userId - User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
36
+ * @param {string} email - User email.
37
+ * @param {string} password - New user password. Must be between 8 and 256 chars.
38
+ * @param {string} name - User name. Max length: 128 chars.
39
+ * @throws {AppwriteException}
40
+ * @returns {Promise<Models.User<Preferences>>}
41
+ * @deprecated Use the object parameter style method for a better developer experience.
42
+ */
43
+ create<Preferences extends Models.Preferences = Models.DefaultPreferences>(userId: string, email: string, password: string, name?: string): Promise<Models.User<Preferences>>;
27
44
  /**
28
45
  * Delete the currently logged in user.
29
46
  *
@@ -34,214 +51,622 @@ export declare class Account {
34
51
  /**
35
52
  * List all billing addresses for a user.
36
53
  *
37
- * @param {string[]} queries
54
+ * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, expired, failed
38
55
  * @throws {AppwriteException}
39
56
  * @returns {Promise<Models.BillingAddressList>}
40
57
  */
58
+ listBillingAddresses(params?: {
59
+ queries?: string[];
60
+ }): Promise<Models.BillingAddressList>;
61
+ /**
62
+ * List all billing addresses for a user.
63
+ *
64
+ * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, expired, failed
65
+ * @throws {AppwriteException}
66
+ * @returns {Promise<Models.BillingAddressList>}
67
+ * @deprecated Use the object parameter style method for a better developer experience.
68
+ */
41
69
  listBillingAddresses(queries?: string[]): Promise<Models.BillingAddressList>;
42
70
  /**
43
- * Add a new billing address to a user&#039;s account.
71
+ * Add a new billing address to a user's account.
72
+ *
73
+ * @param {string} params.country - Country
74
+ * @param {string} params.city - City
75
+ * @param {string} params.streetAddress - Street address
76
+ * @param {string} params.addressLine2 - Address line 2
77
+ * @param {string} params.state - State or province
78
+ * @param {string} params.postalCode - Postal code
79
+ * @throws {AppwriteException}
80
+ * @returns {Promise<Models.BillingAddress>}
81
+ */
82
+ createBillingAddress(params: {
83
+ country: string;
84
+ city: string;
85
+ streetAddress: string;
86
+ addressLine2?: string;
87
+ state?: string;
88
+ postalCode?: string;
89
+ }): Promise<Models.BillingAddress>;
90
+ /**
91
+ * Add a new billing address to a user's account.
44
92
  *
45
- * @param {string} country
46
- * @param {string} streetAddress
47
- * @param {string} city
48
- * @param {string} state
49
- * @param {string} postalCode
50
- * @param {string} addressLine2
93
+ * @param {string} country - Country
94
+ * @param {string} city - City
95
+ * @param {string} streetAddress - Street address
96
+ * @param {string} addressLine2 - Address line 2
97
+ * @param {string} state - State or province
98
+ * @param {string} postalCode - Postal code
51
99
  * @throws {AppwriteException}
52
100
  * @returns {Promise<Models.BillingAddress>}
101
+ * @deprecated Use the object parameter style method for a better developer experience.
53
102
  */
54
- createBillingAddress(country: string, streetAddress: string, city: string, state: string, postalCode?: string, addressLine2?: string): Promise<Models.BillingAddress>;
103
+ createBillingAddress(country: string, city: string, streetAddress: string, addressLine2?: string, state?: string, postalCode?: string): Promise<Models.BillingAddress>;
55
104
  /**
56
- * Get a specific billing address for a user using it&#039;s ID.
105
+ * Get a specific billing address for a user using it's ID.
57
106
  *
58
- * @param {string} billingAddressId
107
+ * @param {string} params.billingAddressId - Unique ID of billing address
59
108
  * @throws {AppwriteException}
60
109
  * @returns {Promise<Models.BillingAddress>}
61
110
  */
111
+ getBillingAddress(params: {
112
+ billingAddressId: string;
113
+ }): Promise<Models.BillingAddress>;
114
+ /**
115
+ * Get a specific billing address for a user using it's ID.
116
+ *
117
+ * @param {string} billingAddressId - Unique ID of billing address
118
+ * @throws {AppwriteException}
119
+ * @returns {Promise<Models.BillingAddress>}
120
+ * @deprecated Use the object parameter style method for a better developer experience.
121
+ */
62
122
  getBillingAddress(billingAddressId: string): Promise<Models.BillingAddress>;
63
123
  /**
64
- * Update a specific billing address using it&#039;s ID.
124
+ * Update a specific billing address using it's ID.
125
+ *
126
+ * @param {string} params.billingAddressId - Unique ID of billing address
127
+ * @param {string} params.country - Country
128
+ * @param {string} params.city - City
129
+ * @param {string} params.streetAddress - Street address
130
+ * @param {string} params.addressLine2 - Address line 2
131
+ * @param {string} params.state - State or province
132
+ * @param {string} params.postalCode - Postal code
133
+ * @throws {AppwriteException}
134
+ * @returns {Promise<Models.BillingAddress>}
135
+ */
136
+ updateBillingAddress(params: {
137
+ billingAddressId: string;
138
+ country: string;
139
+ city: string;
140
+ streetAddress: string;
141
+ addressLine2?: string;
142
+ state?: string;
143
+ postalCode?: string;
144
+ }): Promise<Models.BillingAddress>;
145
+ /**
146
+ * Update a specific billing address using it's ID.
65
147
  *
66
- * @param {string} billingAddressId
67
- * @param {string} country
68
- * @param {string} streetAddress
69
- * @param {string} city
70
- * @param {string} state
71
- * @param {string} postalCode
72
- * @param {string} addressLine2
148
+ * @param {string} billingAddressId - Unique ID of billing address
149
+ * @param {string} country - Country
150
+ * @param {string} city - City
151
+ * @param {string} streetAddress - Street address
152
+ * @param {string} addressLine2 - Address line 2
153
+ * @param {string} state - State or province
154
+ * @param {string} postalCode - Postal code
73
155
  * @throws {AppwriteException}
74
156
  * @returns {Promise<Models.BillingAddress>}
157
+ * @deprecated Use the object parameter style method for a better developer experience.
75
158
  */
76
- updateBillingAddress(billingAddressId: string, country: string, streetAddress: string, city: string, state: string, postalCode?: string, addressLine2?: string): Promise<Models.BillingAddress>;
159
+ updateBillingAddress(billingAddressId: string, country: string, city: string, streetAddress: string, addressLine2?: string, state?: string, postalCode?: string): Promise<Models.BillingAddress>;
77
160
  /**
78
- * Delete a specific billing address using it&#039;s ID.
161
+ * Delete a specific billing address using it's ID.
79
162
  *
80
- * @param {string} billingAddressId
163
+ * @param {string} params.billingAddressId - Billing address unique ID
81
164
  * @throws {AppwriteException}
82
165
  * @returns {Promise<{}>}
83
166
  */
167
+ deleteBillingAddress(params: {
168
+ billingAddressId: string;
169
+ }): Promise<{}>;
170
+ /**
171
+ * Delete a specific billing address using it's ID.
172
+ *
173
+ * @param {string} billingAddressId - Billing address unique ID
174
+ * @throws {AppwriteException}
175
+ * @returns {Promise<{}>}
176
+ * @deprecated Use the object parameter style method for a better developer experience.
177
+ */
84
178
  deleteBillingAddress(billingAddressId: string): Promise<{}>;
85
179
  /**
86
180
  * Get coupon details for an account.
87
181
  *
88
- * @param {string} couponId
182
+ * @param {string} params.couponId - ID of the coupon
89
183
  * @throws {AppwriteException}
90
184
  * @returns {Promise<Models.Coupon>}
91
185
  */
186
+ getCoupon(params: {
187
+ couponId: string;
188
+ }): Promise<Models.Coupon>;
189
+ /**
190
+ * Get coupon details for an account.
191
+ *
192
+ * @param {string} couponId - ID of the coupon
193
+ * @throws {AppwriteException}
194
+ * @returns {Promise<Models.Coupon>}
195
+ * @deprecated Use the object parameter style method for a better developer experience.
196
+ */
92
197
  getCoupon(couponId: string): Promise<Models.Coupon>;
93
198
  /**
94
199
  * Update currently logged in user account email address. After changing user address, the user confirmation status will get reset. A new confirmation email is not sent automatically however you can use the send confirmation email endpoint again to send the confirmation email. For security measures, user password is required to complete this request.
95
- This endpoint can also be used to convert an anonymous account to a normal one, by passing an email address and a new password.
96
-
200
+ * This endpoint can also be used to convert an anonymous account to a normal one, by passing an email address and a new password.
201
+ *
202
+ *
203
+ * @param {string} params.email - User email.
204
+ * @param {string} params.password - User password. Must be at least 8 chars.
205
+ * @throws {AppwriteException}
206
+ * @returns {Promise<Models.User<Preferences>>}
207
+ */
208
+ updateEmail<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: {
209
+ email: string;
210
+ password: string;
211
+ }): Promise<Models.User<Preferences>>;
212
+ /**
213
+ * Update currently logged in user account email address. After changing user address, the user confirmation status will get reset. A new confirmation email is not sent automatically however you can use the send confirmation email endpoint again to send the confirmation email. For security measures, user password is required to complete this request.
214
+ * This endpoint can also be used to convert an anonymous account to a normal one, by passing an email address and a new password.
215
+ *
97
216
  *
98
- * @param {string} email
99
- * @param {string} password
217
+ * @param {string} email - User email.
218
+ * @param {string} password - User password. Must be at least 8 chars.
100
219
  * @throws {AppwriteException}
101
220
  * @returns {Promise<Models.User<Preferences>>}
221
+ * @deprecated Use the object parameter style method for a better developer experience.
222
+ */
223
+ updateEmail<Preferences extends Models.Preferences = Models.DefaultPreferences>(email: string, password: string): Promise<Models.User<Preferences>>;
224
+ /**
225
+ * Get the list of identities for the currently logged in user.
226
+ *
227
+ * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, provider, providerUid, providerEmail, providerAccessTokenExpiry
228
+ * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
229
+ * @throws {AppwriteException}
230
+ * @returns {Promise<Models.IdentityList>}
102
231
  */
103
- updateEmail<Preferences extends Models.Preferences>(email: string, password: string): Promise<Models.User<Preferences>>;
232
+ listIdentities(params?: {
233
+ queries?: string[];
234
+ total?: boolean;
235
+ }): Promise<Models.IdentityList>;
104
236
  /**
105
237
  * Get the list of identities for the currently logged in user.
106
238
  *
107
- * @param {string[]} queries
239
+ * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, provider, providerUid, providerEmail, providerAccessTokenExpiry
240
+ * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
108
241
  * @throws {AppwriteException}
109
242
  * @returns {Promise<Models.IdentityList>}
243
+ * @deprecated Use the object parameter style method for a better developer experience.
110
244
  */
111
- listIdentities(queries?: string[]): Promise<Models.IdentityList>;
245
+ listIdentities(queries?: string[], total?: boolean): Promise<Models.IdentityList>;
112
246
  /**
113
247
  * Delete an identity by its unique ID.
114
248
  *
115
- * @param {string} identityId
249
+ * @param {string} params.identityId - Identity ID.
116
250
  * @throws {AppwriteException}
117
251
  * @returns {Promise<{}>}
118
252
  */
253
+ deleteIdentity(params: {
254
+ identityId: string;
255
+ }): Promise<{}>;
256
+ /**
257
+ * Delete an identity by its unique ID.
258
+ *
259
+ * @param {string} identityId - Identity ID.
260
+ * @throws {AppwriteException}
261
+ * @returns {Promise<{}>}
262
+ * @deprecated Use the object parameter style method for a better developer experience.
263
+ */
119
264
  deleteIdentity(identityId: string): Promise<{}>;
120
265
  /**
121
266
  * List all invoices tied to an account.
122
267
  *
123
- * @param {string[]} queries
268
+ * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: teamId, aggregationId, amount, currency, from, to, dueAt, attempts, status, grossAmount
124
269
  * @throws {AppwriteException}
125
270
  * @returns {Promise<Models.InvoiceList>}
126
271
  */
272
+ listInvoices(params?: {
273
+ queries?: string[];
274
+ }): Promise<Models.InvoiceList>;
275
+ /**
276
+ * List all invoices tied to an account.
277
+ *
278
+ * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: teamId, aggregationId, amount, currency, from, to, dueAt, attempts, status, grossAmount
279
+ * @throws {AppwriteException}
280
+ * @returns {Promise<Models.InvoiceList>}
281
+ * @deprecated Use the object parameter style method for a better developer experience.
282
+ */
127
283
  listInvoices(queries?: string[]): Promise<Models.InvoiceList>;
128
284
  /**
129
285
  * Use this endpoint to create a JSON Web Token. You can use the resulting JWT to authenticate on behalf of the current user when working with the Appwrite server-side API and SDKs. The JWT secret is valid for 15 minutes from its creation and will be invalid if the user will logout in that time frame.
130
286
  *
287
+ * @param {number} params.duration - Time in seconds before JWT expires. Default duration is 900 seconds, and maximum is 3600 seconds.
288
+ * @throws {AppwriteException}
289
+ * @returns {Promise<Models.Jwt>}
290
+ */
291
+ createJWT(params?: {
292
+ duration?: number;
293
+ }): Promise<Models.Jwt>;
294
+ /**
295
+ * Use this endpoint to create a JSON Web Token. You can use the resulting JWT to authenticate on behalf of the current user when working with the Appwrite server-side API and SDKs. The JWT secret is valid for 15 minutes from its creation and will be invalid if the user will logout in that time frame.
296
+ *
297
+ * @param {number} duration - Time in seconds before JWT expires. Default duration is 900 seconds, and maximum is 3600 seconds.
131
298
  * @throws {AppwriteException}
132
299
  * @returns {Promise<Models.Jwt>}
300
+ * @deprecated Use the object parameter style method for a better developer experience.
133
301
  */
134
- createJWT(): Promise<Models.Jwt>;
302
+ createJWT(duration?: number): Promise<Models.Jwt>;
135
303
  /**
136
304
  * Get the list of latest security activity logs for the currently logged in user. Each log returns user IP address, location and date and time of log.
137
305
  *
138
- * @param {string[]} queries
306
+ * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit and offset
307
+ * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
139
308
  * @throws {AppwriteException}
140
309
  * @returns {Promise<Models.LogList>}
141
310
  */
142
- listLogs(queries?: string[]): Promise<Models.LogList>;
311
+ listLogs(params?: {
312
+ queries?: string[];
313
+ total?: boolean;
314
+ }): Promise<Models.LogList>;
315
+ /**
316
+ * Get the list of latest security activity logs for the currently logged in user. Each log returns user IP address, location and date and time of log.
317
+ *
318
+ * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit and offset
319
+ * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
320
+ * @throws {AppwriteException}
321
+ * @returns {Promise<Models.LogList>}
322
+ * @deprecated Use the object parameter style method for a better developer experience.
323
+ */
324
+ listLogs(queries?: string[], total?: boolean): Promise<Models.LogList>;
325
+ /**
326
+ * Enable or disable MFA on an account.
327
+ *
328
+ * @param {boolean} params.mfa - Enable or disable MFA.
329
+ * @throws {AppwriteException}
330
+ * @returns {Promise<Models.User<Preferences>>}
331
+ */
332
+ updateMFA<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: {
333
+ mfa: boolean;
334
+ }): Promise<Models.User<Preferences>>;
143
335
  /**
144
336
  * Enable or disable MFA on an account.
145
337
  *
146
- * @param {boolean} mfa
338
+ * @param {boolean} mfa - Enable or disable MFA.
147
339
  * @throws {AppwriteException}
148
340
  * @returns {Promise<Models.User<Preferences>>}
341
+ * @deprecated Use the object parameter style method for a better developer experience.
149
342
  */
150
- updateMFA<Preferences extends Models.Preferences>(mfa: boolean): Promise<Models.User<Preferences>>;
343
+ updateMFA<Preferences extends Models.Preferences = Models.DefaultPreferences>(mfa: boolean): Promise<Models.User<Preferences>>;
151
344
  /**
152
345
  * Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](/docs/references/cloud/client-web/account#updateMfaAuthenticator) method.
153
346
  *
154
- * @param {AuthenticatorType} type
347
+ * @param {AuthenticatorType} params.type - Type of authenticator. Must be `totp`
155
348
  * @throws {AppwriteException}
156
349
  * @returns {Promise<Models.MfaType>}
350
+ * @deprecated This API has been deprecated since 1.8.0. Please use `Account.createMFAAuthenticator` instead.
351
+ */
352
+ createMfaAuthenticator(params: {
353
+ type: AuthenticatorType;
354
+ }): Promise<Models.MfaType>;
355
+ /**
356
+ * Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](/docs/references/cloud/client-web/account#updateMfaAuthenticator) method.
357
+ *
358
+ * @param {AuthenticatorType} type - Type of authenticator. Must be `totp`
359
+ * @throws {AppwriteException}
360
+ * @returns {Promise<Models.MfaType>}
361
+ * @deprecated Use the object parameter style method for a better developer experience.
157
362
  */
158
363
  createMfaAuthenticator(type: AuthenticatorType): Promise<Models.MfaType>;
364
+ /**
365
+ * Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](/docs/references/cloud/client-web/account#updateMfaAuthenticator) method.
366
+ *
367
+ * @param {AuthenticatorType} params.type - Type of authenticator. Must be `totp`
368
+ * @throws {AppwriteException}
369
+ * @returns {Promise<Models.MfaType>}
370
+ */
371
+ createMFAAuthenticator(params: {
372
+ type: AuthenticatorType;
373
+ }): Promise<Models.MfaType>;
374
+ /**
375
+ * Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](/docs/references/cloud/client-web/account#updateMfaAuthenticator) method.
376
+ *
377
+ * @param {AuthenticatorType} type - Type of authenticator. Must be `totp`
378
+ * @throws {AppwriteException}
379
+ * @returns {Promise<Models.MfaType>}
380
+ * @deprecated Use the object parameter style method for a better developer experience.
381
+ */
382
+ createMFAAuthenticator(type: AuthenticatorType): Promise<Models.MfaType>;
383
+ /**
384
+ * Verify an authenticator app after adding it using the [add authenticator](/docs/references/cloud/client-web/account#createMfaAuthenticator) method.
385
+ *
386
+ * @param {AuthenticatorType} params.type - Type of authenticator.
387
+ * @param {string} params.otp - Valid verification token.
388
+ * @throws {AppwriteException}
389
+ * @returns {Promise<Models.User<Preferences>>}
390
+ * @deprecated This API has been deprecated since 1.8.0. Please use `Account.updateMFAAuthenticator` instead.
391
+ */
392
+ updateMfaAuthenticator<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: {
393
+ type: AuthenticatorType;
394
+ otp: string;
395
+ }): Promise<Models.User<Preferences>>;
396
+ /**
397
+ * Verify an authenticator app after adding it using the [add authenticator](/docs/references/cloud/client-web/account#createMfaAuthenticator) method.
398
+ *
399
+ * @param {AuthenticatorType} type - Type of authenticator.
400
+ * @param {string} otp - Valid verification token.
401
+ * @throws {AppwriteException}
402
+ * @returns {Promise<Models.User<Preferences>>}
403
+ * @deprecated Use the object parameter style method for a better developer experience.
404
+ */
405
+ updateMfaAuthenticator<Preferences extends Models.Preferences = Models.DefaultPreferences>(type: AuthenticatorType, otp: string): Promise<Models.User<Preferences>>;
406
+ /**
407
+ * Verify an authenticator app after adding it using the [add authenticator](/docs/references/cloud/client-web/account#createMfaAuthenticator) method.
408
+ *
409
+ * @param {AuthenticatorType} params.type - Type of authenticator.
410
+ * @param {string} params.otp - Valid verification token.
411
+ * @throws {AppwriteException}
412
+ * @returns {Promise<Models.User<Preferences>>}
413
+ */
414
+ updateMFAAuthenticator<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: {
415
+ type: AuthenticatorType;
416
+ otp: string;
417
+ }): Promise<Models.User<Preferences>>;
159
418
  /**
160
419
  * Verify an authenticator app after adding it using the [add authenticator](/docs/references/cloud/client-web/account#createMfaAuthenticator) method.
161
420
  *
162
- * @param {AuthenticatorType} type
163
- * @param {string} otp
421
+ * @param {AuthenticatorType} type - Type of authenticator.
422
+ * @param {string} otp - Valid verification token.
164
423
  * @throws {AppwriteException}
165
424
  * @returns {Promise<Models.User<Preferences>>}
425
+ * @deprecated Use the object parameter style method for a better developer experience.
426
+ */
427
+ updateMFAAuthenticator<Preferences extends Models.Preferences = Models.DefaultPreferences>(type: AuthenticatorType, otp: string): Promise<Models.User<Preferences>>;
428
+ /**
429
+ * Delete an authenticator for a user by ID.
430
+ *
431
+ * @param {AuthenticatorType} params.type - Type of authenticator.
432
+ * @throws {AppwriteException}
433
+ * @returns {Promise<{}>}
434
+ * @deprecated This API has been deprecated since 1.8.0. Please use `Account.deleteMFAAuthenticator` instead.
166
435
  */
167
- updateMfaAuthenticator<Preferences extends Models.Preferences>(type: AuthenticatorType, otp: string): Promise<Models.User<Preferences>>;
436
+ deleteMfaAuthenticator(params: {
437
+ type: AuthenticatorType;
438
+ }): Promise<{}>;
168
439
  /**
169
440
  * Delete an authenticator for a user by ID.
170
441
  *
171
- * @param {AuthenticatorType} type
442
+ * @param {AuthenticatorType} type - Type of authenticator.
172
443
  * @throws {AppwriteException}
173
444
  * @returns {Promise<{}>}
445
+ * @deprecated Use the object parameter style method for a better developer experience.
174
446
  */
175
447
  deleteMfaAuthenticator(type: AuthenticatorType): Promise<{}>;
448
+ /**
449
+ * Delete an authenticator for a user by ID.
450
+ *
451
+ * @param {AuthenticatorType} params.type - Type of authenticator.
452
+ * @throws {AppwriteException}
453
+ * @returns {Promise<{}>}
454
+ */
455
+ deleteMFAAuthenticator(params: {
456
+ type: AuthenticatorType;
457
+ }): Promise<{}>;
458
+ /**
459
+ * Delete an authenticator for a user by ID.
460
+ *
461
+ * @param {AuthenticatorType} type - Type of authenticator.
462
+ * @throws {AppwriteException}
463
+ * @returns {Promise<{}>}
464
+ * @deprecated Use the object parameter style method for a better developer experience.
465
+ */
466
+ deleteMFAAuthenticator(type: AuthenticatorType): Promise<{}>;
176
467
  /**
177
468
  * Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](/docs/references/cloud/client-web/account#updateMfaChallenge) method.
178
469
  *
179
- * @param {AuthenticationFactor} factor
470
+ * @param {AuthenticationFactor} params.factor - Factor used for verification. Must be one of following: `email`, `phone`, `totp`, `recoveryCode`.
180
471
  * @throws {AppwriteException}
181
472
  * @returns {Promise<Models.MfaChallenge>}
473
+ * @deprecated This API has been deprecated since 1.8.0. Please use `Account.createMFAChallenge` instead.
474
+ */
475
+ createMfaChallenge(params: {
476
+ factor: AuthenticationFactor;
477
+ }): Promise<Models.MfaChallenge>;
478
+ /**
479
+ * Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](/docs/references/cloud/client-web/account#updateMfaChallenge) method.
480
+ *
481
+ * @param {AuthenticationFactor} factor - Factor used for verification. Must be one of following: `email`, `phone`, `totp`, `recoveryCode`.
482
+ * @throws {AppwriteException}
483
+ * @returns {Promise<Models.MfaChallenge>}
484
+ * @deprecated Use the object parameter style method for a better developer experience.
182
485
  */
183
486
  createMfaChallenge(factor: AuthenticationFactor): Promise<Models.MfaChallenge>;
487
+ /**
488
+ * Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](/docs/references/cloud/client-web/account#updateMfaChallenge) method.
489
+ *
490
+ * @param {AuthenticationFactor} params.factor - Factor used for verification. Must be one of following: `email`, `phone`, `totp`, `recoveryCode`.
491
+ * @throws {AppwriteException}
492
+ * @returns {Promise<Models.MfaChallenge>}
493
+ */
494
+ createMFAChallenge(params: {
495
+ factor: AuthenticationFactor;
496
+ }): Promise<Models.MfaChallenge>;
497
+ /**
498
+ * Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](/docs/references/cloud/client-web/account#updateMfaChallenge) method.
499
+ *
500
+ * @param {AuthenticationFactor} factor - Factor used for verification. Must be one of following: `email`, `phone`, `totp`, `recoveryCode`.
501
+ * @throws {AppwriteException}
502
+ * @returns {Promise<Models.MfaChallenge>}
503
+ * @deprecated Use the object parameter style method for a better developer experience.
504
+ */
505
+ createMFAChallenge(factor: AuthenticationFactor): Promise<Models.MfaChallenge>;
506
+ /**
507
+ * Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge) method.
508
+ *
509
+ * @param {string} params.challengeId - ID of the challenge.
510
+ * @param {string} params.otp - Valid verification token.
511
+ * @throws {AppwriteException}
512
+ * @returns {Promise<Models.Session>}
513
+ * @deprecated This API has been deprecated since 1.8.0. Please use `Account.updateMFAChallenge` instead.
514
+ */
515
+ updateMfaChallenge(params: {
516
+ challengeId: string;
517
+ otp: string;
518
+ }): Promise<Models.Session>;
184
519
  /**
185
520
  * Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge) method.
186
521
  *
187
- * @param {string} challengeId
188
- * @param {string} otp
522
+ * @param {string} challengeId - ID of the challenge.
523
+ * @param {string} otp - Valid verification token.
189
524
  * @throws {AppwriteException}
190
525
  * @returns {Promise<Models.Session>}
526
+ * @deprecated Use the object parameter style method for a better developer experience.
191
527
  */
192
528
  updateMfaChallenge(challengeId: string, otp: string): Promise<Models.Session>;
529
+ /**
530
+ * Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge) method.
531
+ *
532
+ * @param {string} params.challengeId - ID of the challenge.
533
+ * @param {string} params.otp - Valid verification token.
534
+ * @throws {AppwriteException}
535
+ * @returns {Promise<Models.Session>}
536
+ */
537
+ updateMFAChallenge(params: {
538
+ challengeId: string;
539
+ otp: string;
540
+ }): Promise<Models.Session>;
541
+ /**
542
+ * Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge) method.
543
+ *
544
+ * @param {string} challengeId - ID of the challenge.
545
+ * @param {string} otp - Valid verification token.
546
+ * @throws {AppwriteException}
547
+ * @returns {Promise<Models.Session>}
548
+ * @deprecated Use the object parameter style method for a better developer experience.
549
+ */
550
+ updateMFAChallenge(challengeId: string, otp: string): Promise<Models.Session>;
193
551
  /**
194
552
  * List the factors available on the account to be used as a MFA challange.
195
553
  *
196
554
  * @throws {AppwriteException}
197
555
  * @returns {Promise<Models.MfaFactors>}
556
+ * @deprecated This API has been deprecated since 1.8.0. Please use `Account.listMFAFactors` instead.
198
557
  */
199
558
  listMfaFactors(): Promise<Models.MfaFactors>;
559
+ /**
560
+ * List the factors available on the account to be used as a MFA challange.
561
+ *
562
+ * @throws {AppwriteException}
563
+ * @returns {Promise<Models.MfaFactors>}
564
+ */
565
+ listMFAFactors(): Promise<Models.MfaFactors>;
200
566
  /**
201
567
  * Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes.
202
568
  *
203
569
  * @throws {AppwriteException}
204
570
  * @returns {Promise<Models.MfaRecoveryCodes>}
571
+ * @deprecated This API has been deprecated since 1.8.0. Please use `Account.getMFARecoveryCodes` instead.
205
572
  */
206
573
  getMfaRecoveryCodes(): Promise<Models.MfaRecoveryCodes>;
207
574
  /**
208
- * Generate recovery codes as backup for MFA flow. It&#039;s recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge) method.
575
+ * Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes.
576
+ *
577
+ * @throws {AppwriteException}
578
+ * @returns {Promise<Models.MfaRecoveryCodes>}
579
+ */
580
+ getMFARecoveryCodes(): Promise<Models.MfaRecoveryCodes>;
581
+ /**
582
+ * Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge) method.
209
583
  *
210
584
  * @throws {AppwriteException}
211
585
  * @returns {Promise<Models.MfaRecoveryCodes>}
586
+ * @deprecated This API has been deprecated since 1.8.0. Please use `Account.createMFARecoveryCodes` instead.
212
587
  */
213
588
  createMfaRecoveryCodes(): Promise<Models.MfaRecoveryCodes>;
589
+ /**
590
+ * Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge) method.
591
+ *
592
+ * @throws {AppwriteException}
593
+ * @returns {Promise<Models.MfaRecoveryCodes>}
594
+ */
595
+ createMFARecoveryCodes(): Promise<Models.MfaRecoveryCodes>;
214
596
  /**
215
597
  * Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes.
216
598
  *
217
599
  * @throws {AppwriteException}
218
600
  * @returns {Promise<Models.MfaRecoveryCodes>}
601
+ * @deprecated This API has been deprecated since 1.8.0. Please use `Account.updateMFARecoveryCodes` instead.
219
602
  */
220
603
  updateMfaRecoveryCodes(): Promise<Models.MfaRecoveryCodes>;
604
+ /**
605
+ * Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes.
606
+ *
607
+ * @throws {AppwriteException}
608
+ * @returns {Promise<Models.MfaRecoveryCodes>}
609
+ */
610
+ updateMFARecoveryCodes(): Promise<Models.MfaRecoveryCodes>;
221
611
  /**
222
612
  * Update currently logged in user account name.
223
613
  *
224
- * @param {string} name
614
+ * @param {string} params.name - User name. Max length: 128 chars.
225
615
  * @throws {AppwriteException}
226
616
  * @returns {Promise<Models.User<Preferences>>}
227
617
  */
228
- updateName<Preferences extends Models.Preferences>(name: string): Promise<Models.User<Preferences>>;
618
+ updateName<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: {
619
+ name: string;
620
+ }): Promise<Models.User<Preferences>>;
621
+ /**
622
+ * Update currently logged in user account name.
623
+ *
624
+ * @param {string} name - User name. Max length: 128 chars.
625
+ * @throws {AppwriteException}
626
+ * @returns {Promise<Models.User<Preferences>>}
627
+ * @deprecated Use the object parameter style method for a better developer experience.
628
+ */
629
+ updateName<Preferences extends Models.Preferences = Models.DefaultPreferences>(name: string): Promise<Models.User<Preferences>>;
229
630
  /**
230
631
  * Update currently logged in user password. For validation, user is required to pass in the new password, and the old password. For users created with OAuth, Team Invites and Magic URL, oldPassword is optional.
231
632
  *
232
- * @param {string} password
233
- * @param {string} oldPassword
633
+ * @param {string} params.password - New user password. Must be at least 8 chars.
634
+ * @param {string} params.oldPassword - Current user password. Must be at least 8 chars.
234
635
  * @throws {AppwriteException}
235
636
  * @returns {Promise<Models.User<Preferences>>}
236
637
  */
237
- updatePassword<Preferences extends Models.Preferences>(password: string, oldPassword?: string): Promise<Models.User<Preferences>>;
638
+ updatePassword<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: {
639
+ password: string;
640
+ oldPassword?: string;
641
+ }): Promise<Models.User<Preferences>>;
642
+ /**
643
+ * Update currently logged in user password. For validation, user is required to pass in the new password, and the old password. For users created with OAuth, Team Invites and Magic URL, oldPassword is optional.
644
+ *
645
+ * @param {string} password - New user password. Must be at least 8 chars.
646
+ * @param {string} oldPassword - Current user password. Must be at least 8 chars.
647
+ * @throws {AppwriteException}
648
+ * @returns {Promise<Models.User<Preferences>>}
649
+ * @deprecated Use the object parameter style method for a better developer experience.
650
+ */
651
+ updatePassword<Preferences extends Models.Preferences = Models.DefaultPreferences>(password: string, oldPassword?: string): Promise<Models.User<Preferences>>;
238
652
  /**
239
653
  * List payment methods for this account.
240
654
  *
241
- * @param {string[]} queries
655
+ * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, expired, failed
242
656
  * @throws {AppwriteException}
243
657
  * @returns {Promise<Models.PaymentMethodList>}
244
658
  */
659
+ listPaymentMethods(params?: {
660
+ queries?: string[];
661
+ }): Promise<Models.PaymentMethodList>;
662
+ /**
663
+ * List payment methods for this account.
664
+ *
665
+ * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, expired, failed
666
+ * @throws {AppwriteException}
667
+ * @returns {Promise<Models.PaymentMethodList>}
668
+ * @deprecated Use the object parameter style method for a better developer experience.
669
+ */
245
670
  listPaymentMethods(queries?: string[]): Promise<Models.PaymentMethodList>;
246
671
  /**
247
672
  * Create a new payment method for the current user account.
@@ -253,90 +678,213 @@ This endpoint can also be used to convert an anonymous account to a normal one,
253
678
  /**
254
679
  * Get a specific payment method for the user.
255
680
  *
256
- * @param {string} paymentMethodId
681
+ * @param {string} params.paymentMethodId - Unique ID of payment method
257
682
  * @throws {AppwriteException}
258
683
  * @returns {Promise<Models.PaymentMethod>}
259
684
  */
685
+ getPaymentMethod(params: {
686
+ paymentMethodId: string;
687
+ }): Promise<Models.PaymentMethod>;
688
+ /**
689
+ * Get a specific payment method for the user.
690
+ *
691
+ * @param {string} paymentMethodId - Unique ID of payment method
692
+ * @throws {AppwriteException}
693
+ * @returns {Promise<Models.PaymentMethod>}
694
+ * @deprecated Use the object parameter style method for a better developer experience.
695
+ */
260
696
  getPaymentMethod(paymentMethodId: string): Promise<Models.PaymentMethod>;
261
697
  /**
262
698
  * Update a new payment method for the current user account.
263
699
  *
264
- * @param {string} paymentMethodId
265
- * @param {number} expiryMonth
266
- * @param {number} expiryYear
700
+ * @param {string} params.paymentMethodId - Unique ID of payment method
701
+ * @param {number} params.expiryMonth - Payment expiry month
702
+ * @param {number} params.expiryYear - Expiry year
703
+ * @param {string} params.state - State of the payment method country
704
+ * @throws {AppwriteException}
705
+ * @returns {Promise<Models.PaymentMethod>}
706
+ */
707
+ updatePaymentMethod(params: {
708
+ paymentMethodId: string;
709
+ expiryMonth: number;
710
+ expiryYear: number;
711
+ state?: string;
712
+ }): Promise<Models.PaymentMethod>;
713
+ /**
714
+ * Update a new payment method for the current user account.
715
+ *
716
+ * @param {string} paymentMethodId - Unique ID of payment method
717
+ * @param {number} expiryMonth - Payment expiry month
718
+ * @param {number} expiryYear - Expiry year
719
+ * @param {string} state - State of the payment method country
267
720
  * @throws {AppwriteException}
268
721
  * @returns {Promise<Models.PaymentMethod>}
722
+ * @deprecated Use the object parameter style method for a better developer experience.
269
723
  */
270
- updatePaymentMethod(paymentMethodId: string, expiryMonth: number, expiryYear: number): Promise<Models.PaymentMethod>;
724
+ updatePaymentMethod(paymentMethodId: string, expiryMonth: number, expiryYear: number, state?: string): Promise<Models.PaymentMethod>;
271
725
  /**
272
- * Delete a specific payment method from a user&#039;s account.
726
+ * Delete a specific payment method from a user's account.
273
727
  *
274
- * @param {string} paymentMethodId
728
+ * @param {string} params.paymentMethodId - Unique ID of payment method
275
729
  * @throws {AppwriteException}
276
730
  * @returns {Promise<{}>}
277
731
  */
732
+ deletePaymentMethod(params: {
733
+ paymentMethodId: string;
734
+ }): Promise<{}>;
735
+ /**
736
+ * Delete a specific payment method from a user's account.
737
+ *
738
+ * @param {string} paymentMethodId - Unique ID of payment method
739
+ * @throws {AppwriteException}
740
+ * @returns {Promise<{}>}
741
+ * @deprecated Use the object parameter style method for a better developer experience.
742
+ */
278
743
  deletePaymentMethod(paymentMethodId: string): Promise<{}>;
279
744
  /**
280
745
  * Update payment method provider.
281
746
  *
282
- * @param {string} paymentMethodId
283
- * @param {string} providerMethodId
284
- * @param {string} name
747
+ * @param {string} params.paymentMethodId - Unique ID of payment method
748
+ * @param {string} params.providerMethodId - Payment method ID from the payment provider
749
+ * @param {string} params.name - Name in the payment method
750
+ * @param {string} params.state - State of the payment method country
751
+ * @throws {AppwriteException}
752
+ * @returns {Promise<Models.PaymentMethod>}
753
+ */
754
+ updatePaymentMethodProvider(params: {
755
+ paymentMethodId: string;
756
+ providerMethodId: string;
757
+ name: string;
758
+ state?: string;
759
+ }): Promise<Models.PaymentMethod>;
760
+ /**
761
+ * Update payment method provider.
762
+ *
763
+ * @param {string} paymentMethodId - Unique ID of payment method
764
+ * @param {string} providerMethodId - Payment method ID from the payment provider
765
+ * @param {string} name - Name in the payment method
766
+ * @param {string} state - State of the payment method country
285
767
  * @throws {AppwriteException}
286
768
  * @returns {Promise<Models.PaymentMethod>}
769
+ * @deprecated Use the object parameter style method for a better developer experience.
287
770
  */
288
- updatePaymentMethodProvider(paymentMethodId: string, providerMethodId: string, name: string): Promise<Models.PaymentMethod>;
771
+ updatePaymentMethodProvider(paymentMethodId: string, providerMethodId: string, name: string, state?: string): Promise<Models.PaymentMethod>;
289
772
  /**
290
773
  * Update payment method mandate options.
291
774
  *
292
- * @param {string} paymentMethodId
775
+ * @param {string} params.paymentMethodId - Unique ID of payment method
293
776
  * @throws {AppwriteException}
294
777
  * @returns {Promise<Models.PaymentMethod>}
295
778
  */
779
+ updatePaymentMethodMandateOptions(params: {
780
+ paymentMethodId: string;
781
+ }): Promise<Models.PaymentMethod>;
782
+ /**
783
+ * Update payment method mandate options.
784
+ *
785
+ * @param {string} paymentMethodId - Unique ID of payment method
786
+ * @throws {AppwriteException}
787
+ * @returns {Promise<Models.PaymentMethod>}
788
+ * @deprecated Use the object parameter style method for a better developer experience.
789
+ */
296
790
  updatePaymentMethodMandateOptions(paymentMethodId: string): Promise<Models.PaymentMethod>;
297
791
  /**
298
- * Update the currently logged in user&#039;s phone number. After updating the phone number, the phone verification status will be reset. A confirmation SMS is not sent automatically, however you can use the [POST /account/verification/phone](https://appwrite.io/docs/references/cloud/client-web/account#createPhoneVerification) endpoint to send a confirmation SMS.
792
+ * Update the currently logged in user's phone number. After updating the phone number, the phone verification status will be reset. A confirmation SMS is not sent automatically, however you can use the [POST /account/verification/phone](https://appwrite.io/docs/references/cloud/client-web/account#createPhoneVerification) endpoint to send a confirmation SMS.
793
+ *
794
+ * @param {string} params.phone - Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.
795
+ * @param {string} params.password - User password. Must be at least 8 chars.
796
+ * @throws {AppwriteException}
797
+ * @returns {Promise<Models.User<Preferences>>}
798
+ */
799
+ updatePhone<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: {
800
+ phone: string;
801
+ password: string;
802
+ }): Promise<Models.User<Preferences>>;
803
+ /**
804
+ * Update the currently logged in user's phone number. After updating the phone number, the phone verification status will be reset. A confirmation SMS is not sent automatically, however you can use the [POST /account/verification/phone](https://appwrite.io/docs/references/cloud/client-web/account#createPhoneVerification) endpoint to send a confirmation SMS.
299
805
  *
300
- * @param {string} phone
301
- * @param {string} password
806
+ * @param {string} phone - Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.
807
+ * @param {string} password - User password. Must be at least 8 chars.
302
808
  * @throws {AppwriteException}
303
809
  * @returns {Promise<Models.User<Preferences>>}
810
+ * @deprecated Use the object parameter style method for a better developer experience.
304
811
  */
305
- updatePhone<Preferences extends Models.Preferences>(phone: string, password: string): Promise<Models.User<Preferences>>;
812
+ updatePhone<Preferences extends Models.Preferences = Models.DefaultPreferences>(phone: string, password: string): Promise<Models.User<Preferences>>;
306
813
  /**
307
814
  * Get the preferences as a key-value object for the currently logged in user.
308
815
  *
309
816
  * @throws {AppwriteException}
310
817
  * @returns {Promise<Preferences>}
311
818
  */
312
- getPrefs<Preferences extends Models.Preferences>(): Promise<Preferences>;
819
+ getPrefs<Preferences extends Models.Preferences = Models.DefaultPreferences>(): Promise<Preferences>;
313
820
  /**
314
821
  * Update currently logged in user account preferences. The object you pass is stored as is, and replaces any previous value. The maximum allowed prefs size is 64kB and throws error if exceeded.
315
822
  *
316
- * @param {Partial<Preferences>} prefs
823
+ * @param {Partial<Preferences>} params.prefs - Prefs key-value JSON object.
317
824
  * @throws {AppwriteException}
318
825
  * @returns {Promise<Models.User<Preferences>>}
319
826
  */
320
- updatePrefs<Preferences extends Models.Preferences>(prefs: Partial<Preferences>): Promise<Models.User<Preferences>>;
827
+ updatePrefs<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: {
828
+ prefs: Partial<Preferences>;
829
+ }): Promise<Models.User<Preferences>>;
321
830
  /**
322
- * Sends the user an email with a temporary secret key for password reset. When the user clicks the confirmation link he is redirected back to your app password reset URL with the secret key and email address values attached to the URL query string. Use the query string params to submit a request to the [PUT /account/recovery](https://appwrite.io/docs/references/cloud/client-web/account#updateRecovery) endpoint to complete the process. The verification link sent to the user&#039;s email address is valid for 1 hour.
831
+ * Update currently logged in user account preferences. The object you pass is stored as is, and replaces any previous value. The maximum allowed prefs size is 64kB and throws error if exceeded.
323
832
  *
324
- * @param {string} email
325
- * @param {string} url
833
+ * @param {Partial<Preferences>} prefs - Prefs key-value JSON object.
834
+ * @throws {AppwriteException}
835
+ * @returns {Promise<Models.User<Preferences>>}
836
+ * @deprecated Use the object parameter style method for a better developer experience.
837
+ */
838
+ updatePrefs<Preferences extends Models.Preferences = Models.DefaultPreferences>(prefs: Partial<Preferences>): Promise<Models.User<Preferences>>;
839
+ /**
840
+ * Sends the user an email with a temporary secret key for password reset. When the user clicks the confirmation link he is redirected back to your app password reset URL with the secret key and email address values attached to the URL query string. Use the query string params to submit a request to the [PUT /account/recovery](https://appwrite.io/docs/references/cloud/client-web/account#updateRecovery) endpoint to complete the process. The verification link sent to the user's email address is valid for 1 hour.
841
+ *
842
+ * @param {string} params.email - User email.
843
+ * @param {string} params.url - URL to redirect the user back to your app from the recovery email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.
326
844
  * @throws {AppwriteException}
327
845
  * @returns {Promise<Models.Token>}
328
846
  */
847
+ createRecovery(params: {
848
+ email: string;
849
+ url: string;
850
+ }): Promise<Models.Token>;
851
+ /**
852
+ * Sends the user an email with a temporary secret key for password reset. When the user clicks the confirmation link he is redirected back to your app password reset URL with the secret key and email address values attached to the URL query string. Use the query string params to submit a request to the [PUT /account/recovery](https://appwrite.io/docs/references/cloud/client-web/account#updateRecovery) endpoint to complete the process. The verification link sent to the user's email address is valid for 1 hour.
853
+ *
854
+ * @param {string} email - User email.
855
+ * @param {string} url - URL to redirect the user back to your app from the recovery email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.
856
+ * @throws {AppwriteException}
857
+ * @returns {Promise<Models.Token>}
858
+ * @deprecated Use the object parameter style method for a better developer experience.
859
+ */
329
860
  createRecovery(email: string, url: string): Promise<Models.Token>;
330
861
  /**
331
862
  * Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST /account/recovery](https://appwrite.io/docs/references/cloud/client-web/account#createRecovery) endpoint.
332
-
333
- Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.
334
863
  *
335
- * @param {string} userId
336
- * @param {string} secret
337
- * @param {string} password
864
+ * Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.
865
+ *
866
+ * @param {string} params.userId - User ID.
867
+ * @param {string} params.secret - Valid reset token.
868
+ * @param {string} params.password - New user password. Must be between 8 and 256 chars.
869
+ * @throws {AppwriteException}
870
+ * @returns {Promise<Models.Token>}
871
+ */
872
+ updateRecovery(params: {
873
+ userId: string;
874
+ secret: string;
875
+ password: string;
876
+ }): Promise<Models.Token>;
877
+ /**
878
+ * Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST /account/recovery](https://appwrite.io/docs/references/cloud/client-web/account#createRecovery) endpoint.
879
+ *
880
+ * Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.
881
+ *
882
+ * @param {string} userId - User ID.
883
+ * @param {string} secret - Valid reset token.
884
+ * @param {string} password - New user password. Must be between 8 and 256 chars.
338
885
  * @throws {AppwriteException}
339
886
  * @returns {Promise<Models.Token>}
887
+ * @deprecated Use the object parameter style method for a better developer experience.
340
888
  */
341
889
  updateRecovery(userId: string, secret: string, password: string): Promise<Models.Token>;
342
890
  /**
@@ -362,81 +910,192 @@ Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/
362
910
  createAnonymousSession(): Promise<Models.Session>;
363
911
  /**
364
912
  * Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user.
365
-
366
- A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).
367
913
  *
368
- * @param {string} email
369
- * @param {string} password
914
+ * A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).
915
+ *
916
+ * @param {string} params.email - User email.
917
+ * @param {string} params.password - User password. Must be at least 8 chars.
918
+ * @throws {AppwriteException}
919
+ * @returns {Promise<Models.Session>}
920
+ */
921
+ createEmailPasswordSession(params: {
922
+ email: string;
923
+ password: string;
924
+ }): Promise<Models.Session>;
925
+ /**
926
+ * Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user.
927
+ *
928
+ * A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).
929
+ *
930
+ * @param {string} email - User email.
931
+ * @param {string} password - User password. Must be at least 8 chars.
370
932
  * @throws {AppwriteException}
371
933
  * @returns {Promise<Models.Session>}
934
+ * @deprecated Use the object parameter style method for a better developer experience.
372
935
  */
373
936
  createEmailPasswordSession(email: string, password: string): Promise<Models.Session>;
374
937
  /**
375
938
  * Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.
376
939
  *
377
- * @param {string} userId
378
- * @param {string} secret
940
+ * @param {string} params.userId - User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
941
+ * @param {string} params.secret - Valid verification token.
942
+ * @throws {AppwriteException}
943
+ * @returns {Promise<Models.Session>}
944
+ * @deprecated This API has been deprecated since 1.6.0. Please use `Account.createSession` instead.
945
+ */
946
+ updateMagicURLSession(params: {
947
+ userId: string;
948
+ secret: string;
949
+ }): Promise<Models.Session>;
950
+ /**
951
+ * Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.
952
+ *
953
+ * @param {string} userId - User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
954
+ * @param {string} secret - Valid verification token.
379
955
  * @throws {AppwriteException}
380
956
  * @returns {Promise<Models.Session>}
957
+ * @deprecated Use the object parameter style method for a better developer experience.
381
958
  */
382
959
  updateMagicURLSession(userId: string, secret: string): Promise<Models.Session>;
383
960
  /**
384
- * Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL&#039;s back to your app when login is completed.
385
-
386
- If there is already an active session, the new session will be attached to the logged-in account. If there are no active sessions, the server will attempt to look for a user with the same email address as the email received from the OAuth2 provider and attach the new session to the existing user. If no matching user is found - the server will create a new user.
387
-
388
- A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).
389
-
961
+ * Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed.
962
+ *
963
+ * If there is already an active session, the new session will be attached to the logged-in account. If there are no active sessions, the server will attempt to look for a user with the same email address as the email received from the OAuth2 provider and attach the new session to the existing user. If no matching user is found - the server will create a new user.
964
+ *
965
+ * A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).
966
+ *
967
+ *
968
+ * @param {OAuthProvider} params.provider - OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, github, gitlab, google, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoho, zoom, githubImagine, googleImagine.
969
+ * @param {string} params.success - URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.
970
+ * @param {string} params.failure - URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.
971
+ * @param {string[]} params.scopes - A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long.
972
+ * @throws {AppwriteException}
973
+ * @returns {void | string}
974
+ */
975
+ createOAuth2Session(params: {
976
+ provider: OAuthProvider;
977
+ success?: string;
978
+ failure?: string;
979
+ scopes?: string[];
980
+ }): void | string;
981
+ /**
982
+ * Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed.
983
+ *
984
+ * If there is already an active session, the new session will be attached to the logged-in account. If there are no active sessions, the server will attempt to look for a user with the same email address as the email received from the OAuth2 provider and attach the new session to the existing user. If no matching user is found - the server will create a new user.
985
+ *
986
+ * A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).
390
987
  *
391
- * @param {OAuthProvider} provider
392
- * @param {string} success
393
- * @param {string} failure
394
- * @param {string[]} scopes
988
+ *
989
+ * @param {OAuthProvider} provider - OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, github, gitlab, google, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoho, zoom, githubImagine, googleImagine.
990
+ * @param {string} success - URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.
991
+ * @param {string} failure - URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.
992
+ * @param {string[]} scopes - A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long.
395
993
  * @throws {AppwriteException}
396
994
  * @returns {void | string}
995
+ * @deprecated Use the object parameter style method for a better developer experience.
397
996
  */
398
997
  createOAuth2Session(provider: OAuthProvider, success?: string, failure?: string, scopes?: string[]): void | string;
399
998
  /**
400
999
  * Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.
401
1000
  *
402
- * @param {string} userId
403
- * @param {string} secret
1001
+ * @param {string} params.userId - User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
1002
+ * @param {string} params.secret - Valid verification token.
404
1003
  * @throws {AppwriteException}
405
1004
  * @returns {Promise<Models.Session>}
1005
+ * @deprecated This API has been deprecated since 1.6.0. Please use `Account.createSession` instead.
1006
+ */
1007
+ updatePhoneSession(params: {
1008
+ userId: string;
1009
+ secret: string;
1010
+ }): Promise<Models.Session>;
1011
+ /**
1012
+ * Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.
1013
+ *
1014
+ * @param {string} userId - User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
1015
+ * @param {string} secret - Valid verification token.
1016
+ * @throws {AppwriteException}
1017
+ * @returns {Promise<Models.Session>}
1018
+ * @deprecated Use the object parameter style method for a better developer experience.
406
1019
  */
407
1020
  updatePhoneSession(userId: string, secret: string): Promise<Models.Session>;
408
1021
  /**
409
1022
  * Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.
410
1023
  *
411
- * @param {string} userId
412
- * @param {string} secret
1024
+ * @param {string} params.userId - User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
1025
+ * @param {string} params.secret - Secret of a token generated by login methods. For example, the `createMagicURLToken` or `createPhoneToken` methods.
1026
+ * @throws {AppwriteException}
1027
+ * @returns {Promise<Models.Session>}
1028
+ */
1029
+ createSession(params: {
1030
+ userId: string;
1031
+ secret: string;
1032
+ }): Promise<Models.Session>;
1033
+ /**
1034
+ * Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.
1035
+ *
1036
+ * @param {string} userId - User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
1037
+ * @param {string} secret - Secret of a token generated by login methods. For example, the `createMagicURLToken` or `createPhoneToken` methods.
413
1038
  * @throws {AppwriteException}
414
1039
  * @returns {Promise<Models.Session>}
1040
+ * @deprecated Use the object parameter style method for a better developer experience.
415
1041
  */
416
1042
  createSession(userId: string, secret: string): Promise<Models.Session>;
417
1043
  /**
418
- * Use this endpoint to get a logged in user&#039;s session using a Session ID. Inputting &#039;current&#039; will return the current session being used.
1044
+ * Use this endpoint to get a logged in user's session using a Session ID. Inputting 'current' will return the current session being used.
419
1045
  *
420
- * @param {string} sessionId
1046
+ * @param {string} params.sessionId - Session ID. Use the string 'current' to get the current device session.
421
1047
  * @throws {AppwriteException}
422
1048
  * @returns {Promise<Models.Session>}
423
1049
  */
1050
+ getSession(params: {
1051
+ sessionId: string;
1052
+ }): Promise<Models.Session>;
1053
+ /**
1054
+ * Use this endpoint to get a logged in user's session using a Session ID. Inputting 'current' will return the current session being used.
1055
+ *
1056
+ * @param {string} sessionId - Session ID. Use the string 'current' to get the current device session.
1057
+ * @throws {AppwriteException}
1058
+ * @returns {Promise<Models.Session>}
1059
+ * @deprecated Use the object parameter style method for a better developer experience.
1060
+ */
424
1061
  getSession(sessionId: string): Promise<Models.Session>;
425
1062
  /**
426
- * Use this endpoint to extend a session&#039;s length. Extending a session is useful when session expiry is short. If the session was created using an OAuth provider, this endpoint refreshes the access token from the provider.
1063
+ * Use this endpoint to extend a session's length. Extending a session is useful when session expiry is short. If the session was created using an OAuth provider, this endpoint refreshes the access token from the provider.
427
1064
  *
428
- * @param {string} sessionId
1065
+ * @param {string} params.sessionId - Session ID. Use the string 'current' to update the current device session.
429
1066
  * @throws {AppwriteException}
430
1067
  * @returns {Promise<Models.Session>}
431
1068
  */
1069
+ updateSession(params: {
1070
+ sessionId: string;
1071
+ }): Promise<Models.Session>;
1072
+ /**
1073
+ * Use this endpoint to extend a session's length. Extending a session is useful when session expiry is short. If the session was created using an OAuth provider, this endpoint refreshes the access token from the provider.
1074
+ *
1075
+ * @param {string} sessionId - Session ID. Use the string 'current' to update the current device session.
1076
+ * @throws {AppwriteException}
1077
+ * @returns {Promise<Models.Session>}
1078
+ * @deprecated Use the object parameter style method for a better developer experience.
1079
+ */
432
1080
  updateSession(sessionId: string): Promise<Models.Session>;
433
1081
  /**
434
- * Logout the user. Use &#039;current&#039; as the session ID to logout on this device, use a session ID to logout on another device. If you&#039;re looking to logout the user on all devices, use [Delete Sessions](https://appwrite.io/docs/references/cloud/client-web/account#deleteSessions) instead.
1082
+ * Logout the user. Use 'current' as the session ID to logout on this device, use a session ID to logout on another device. If you're looking to logout the user on all devices, use [Delete Sessions](https://appwrite.io/docs/references/cloud/client-web/account#deleteSessions) instead.
435
1083
  *
436
- * @param {string} sessionId
1084
+ * @param {string} params.sessionId - Session ID. Use the string 'current' to delete the current device session.
437
1085
  * @throws {AppwriteException}
438
1086
  * @returns {Promise<{}>}
439
1087
  */
1088
+ deleteSession(params: {
1089
+ sessionId: string;
1090
+ }): Promise<{}>;
1091
+ /**
1092
+ * Logout the user. Use 'current' as the session ID to logout on this device, use a session ID to logout on another device. If you're looking to logout the user on all devices, use [Delete Sessions](https://appwrite.io/docs/references/cloud/client-web/account#deleteSessions) instead.
1093
+ *
1094
+ * @param {string} sessionId - Session ID. Use the string 'current' to delete the current device session.
1095
+ * @throws {AppwriteException}
1096
+ * @returns {Promise<{}>}
1097
+ * @deprecated Use the object parameter style method for a better developer experience.
1098
+ */
440
1099
  deleteSession(sessionId: string): Promise<{}>;
441
1100
  /**
442
1101
  * Block the currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. To completely delete a user, use the Users API instead.
@@ -444,120 +1103,323 @@ A user is limited to 10 active sessions at a time by default. [Learn more about
444
1103
  * @throws {AppwriteException}
445
1104
  * @returns {Promise<Models.User<Preferences>>}
446
1105
  */
447
- updateStatus<Preferences extends Models.Preferences>(): Promise<Models.User<Preferences>>;
1106
+ updateStatus<Preferences extends Models.Preferences = Models.DefaultPreferences>(): Promise<Models.User<Preferences>>;
448
1107
  /**
449
1108
  * Use this endpoint to register a device for push notifications. Provide a target ID (custom or generated using ID.unique()), a device identifier (usually a device token), and optionally specify which provider should send notifications to this target. The target is automatically linked to the current session and includes device information like brand and model.
450
1109
  *
451
- * @param {string} targetId
452
- * @param {string} identifier
453
- * @param {string} providerId
1110
+ * @param {string} params.targetId - Target ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
1111
+ * @param {string} params.identifier - The target identifier (token, email, phone etc.)
1112
+ * @param {string} params.providerId - Provider ID. Message will be sent to this target from the specified provider ID. If no provider ID is set the first setup provider will be used.
454
1113
  * @throws {AppwriteException}
455
1114
  * @returns {Promise<Models.Target>}
456
1115
  */
1116
+ createPushTarget(params: {
1117
+ targetId: string;
1118
+ identifier: string;
1119
+ providerId?: string;
1120
+ }): Promise<Models.Target>;
1121
+ /**
1122
+ * Use this endpoint to register a device for push notifications. Provide a target ID (custom or generated using ID.unique()), a device identifier (usually a device token), and optionally specify which provider should send notifications to this target. The target is automatically linked to the current session and includes device information like brand and model.
1123
+ *
1124
+ * @param {string} targetId - Target ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
1125
+ * @param {string} identifier - The target identifier (token, email, phone etc.)
1126
+ * @param {string} providerId - Provider ID. Message will be sent to this target from the specified provider ID. If no provider ID is set the first setup provider will be used.
1127
+ * @throws {AppwriteException}
1128
+ * @returns {Promise<Models.Target>}
1129
+ * @deprecated Use the object parameter style method for a better developer experience.
1130
+ */
457
1131
  createPushTarget(targetId: string, identifier: string, providerId?: string): Promise<Models.Target>;
458
1132
  /**
459
- * Update the currently logged in user&#039;s push notification target. You can modify the target&#039;s identifier (device token) and provider ID (token, email, phone etc.). The target must exist and belong to the current user. If you change the provider ID, notifications will be sent through the new messaging provider instead.
1133
+ * Update the currently logged in user's push notification target. You can modify the target's identifier (device token) and provider ID (token, email, phone etc.). The target must exist and belong to the current user. If you change the provider ID, notifications will be sent through the new messaging provider instead.
1134
+ *
1135
+ * @param {string} params.targetId - Target ID.
1136
+ * @param {string} params.identifier - The target identifier (token, email, phone etc.)
1137
+ * @throws {AppwriteException}
1138
+ * @returns {Promise<Models.Target>}
1139
+ */
1140
+ updatePushTarget(params: {
1141
+ targetId: string;
1142
+ identifier: string;
1143
+ }): Promise<Models.Target>;
1144
+ /**
1145
+ * Update the currently logged in user's push notification target. You can modify the target's identifier (device token) and provider ID (token, email, phone etc.). The target must exist and belong to the current user. If you change the provider ID, notifications will be sent through the new messaging provider instead.
460
1146
  *
461
- * @param {string} targetId
462
- * @param {string} identifier
1147
+ * @param {string} targetId - Target ID.
1148
+ * @param {string} identifier - The target identifier (token, email, phone etc.)
463
1149
  * @throws {AppwriteException}
464
1150
  * @returns {Promise<Models.Target>}
1151
+ * @deprecated Use the object parameter style method for a better developer experience.
465
1152
  */
466
1153
  updatePushTarget(targetId: string, identifier: string): Promise<Models.Target>;
467
1154
  /**
468
1155
  * Delete a push notification target for the currently logged in user. After deletion, the device will no longer receive push notifications. The target must exist and belong to the current user.
469
1156
  *
470
- * @param {string} targetId
1157
+ * @param {string} params.targetId - Target ID.
471
1158
  * @throws {AppwriteException}
472
1159
  * @returns {Promise<{}>}
473
1160
  */
1161
+ deletePushTarget(params: {
1162
+ targetId: string;
1163
+ }): Promise<{}>;
1164
+ /**
1165
+ * Delete a push notification target for the currently logged in user. After deletion, the device will no longer receive push notifications. The target must exist and belong to the current user.
1166
+ *
1167
+ * @param {string} targetId - Target ID.
1168
+ * @throws {AppwriteException}
1169
+ * @returns {Promise<{}>}
1170
+ * @deprecated Use the object parameter style method for a better developer experience.
1171
+ */
474
1172
  deletePushTarget(targetId: string): Promise<{}>;
475
1173
  /**
476
- * Sends the user an email with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. The secret sent to the user&#039;s email is valid for 15 minutes.
477
-
478
- A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).
1174
+ * Sends the user an email with a secret key for creating a session. If the email address has never been used, a **new account is created** using the provided `userId`. Otherwise, if the email address is already attached to an account, the **user ID is ignored**. Then, the user will receive an email with the one-time password. Use the returned user ID and secret and submit a request to the [POST /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.
1175
+ *
1176
+ * A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).
1177
+ *
1178
+ *
1179
+ * @param {string} params.userId - User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.
1180
+ * @param {string} params.email - User email.
1181
+ * @param {boolean} params.phrase - Toggle for security phrase. If enabled, email will be send with a randomly generated phrase and the phrase will also be included in the response. Confirming phrases match increases the security of your authentication flow.
1182
+ * @throws {AppwriteException}
1183
+ * @returns {Promise<Models.Token>}
1184
+ */
1185
+ createEmailToken(params: {
1186
+ userId: string;
1187
+ email: string;
1188
+ phrase?: boolean;
1189
+ }): Promise<Models.Token>;
1190
+ /**
1191
+ * Sends the user an email with a secret key for creating a session. If the email address has never been used, a **new account is created** using the provided `userId`. Otherwise, if the email address is already attached to an account, the **user ID is ignored**. Then, the user will receive an email with the one-time password. Use the returned user ID and secret and submit a request to the [POST /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.
479
1192
  *
480
- * @param {string} userId
481
- * @param {string} email
482
- * @param {boolean} phrase
1193
+ * A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).
1194
+ *
1195
+ *
1196
+ * @param {string} userId - User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.
1197
+ * @param {string} email - User email.
1198
+ * @param {boolean} phrase - Toggle for security phrase. If enabled, email will be send with a randomly generated phrase and the phrase will also be included in the response. Confirming phrases match increases the security of your authentication flow.
483
1199
  * @throws {AppwriteException}
484
1200
  * @returns {Promise<Models.Token>}
1201
+ * @deprecated Use the object parameter style method for a better developer experience.
485
1202
  */
486
1203
  createEmailToken(userId: string, email: string, phrase?: boolean): Promise<Models.Token>;
487
1204
  /**
488
- * Sends the user an email with a secret key for creating a session. If the provided user ID has not been registered, a new user will be created. When the user clicks the link in the email, the user is redirected back to the URL you provided with the secret key and userId values attached to the URL query string. Use the query string parameters to submit a request to the [POST /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. The link sent to the user&#039;s email address is valid for 1 hour.
489
-
490
- A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).
491
-
1205
+ * Sends the user an email with a secret key for creating a session. If the provided user ID has not been registered, a new user will be created. When the user clicks the link in the email, the user is redirected back to the URL you provided with the secret key and userId values attached to the URL query string. Use the query string parameters to submit a request to the [POST /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour.
1206
+ *
1207
+ * A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).
1208
+ *
1209
+ *
1210
+ * @param {string} params.userId - Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.
1211
+ * @param {string} params.email - User email.
1212
+ * @param {string} params.url - URL to redirect the user back to your app from the magic URL login. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.
1213
+ * @param {boolean} params.phrase - Toggle for security phrase. If enabled, email will be send with a randomly generated phrase and the phrase will also be included in the response. Confirming phrases match increases the security of your authentication flow.
1214
+ * @throws {AppwriteException}
1215
+ * @returns {Promise<Models.Token>}
1216
+ */
1217
+ createMagicURLToken(params: {
1218
+ userId: string;
1219
+ email: string;
1220
+ url?: string;
1221
+ phrase?: boolean;
1222
+ }): Promise<Models.Token>;
1223
+ /**
1224
+ * Sends the user an email with a secret key for creating a session. If the provided user ID has not been registered, a new user will be created. When the user clicks the link in the email, the user is redirected back to the URL you provided with the secret key and userId values attached to the URL query string. Use the query string parameters to submit a request to the [POST /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour.
492
1225
  *
493
- * @param {string} userId
494
- * @param {string} email
495
- * @param {string} url
496
- * @param {boolean} phrase
1226
+ * A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).
1227
+ *
1228
+ *
1229
+ * @param {string} userId - Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.
1230
+ * @param {string} email - User email.
1231
+ * @param {string} url - URL to redirect the user back to your app from the magic URL login. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.
1232
+ * @param {boolean} phrase - Toggle for security phrase. If enabled, email will be send with a randomly generated phrase and the phrase will also be included in the response. Confirming phrases match increases the security of your authentication flow.
497
1233
  * @throws {AppwriteException}
498
1234
  * @returns {Promise<Models.Token>}
1235
+ * @deprecated Use the object parameter style method for a better developer experience.
499
1236
  */
500
1237
  createMagicURLToken(userId: string, email: string, url?: string, phrase?: boolean): Promise<Models.Token>;
501
1238
  /**
502
- * Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL&#039;s back to your app when login is completed.
503
-
504
- If authentication succeeds, `userId` and `secret` of a token will be appended to the success URL as query parameters. These can be used to create a new session using the [Create session](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint.
505
-
506
- A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).
1239
+ * Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed.
1240
+ *
1241
+ * If authentication succeeds, `userId` and `secret` of a token will be appended to the success URL as query parameters. These can be used to create a new session using the [Create session](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint.
1242
+ *
1243
+ * A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).
507
1244
  *
508
- * @param {OAuthProvider} provider
509
- * @param {string} success
510
- * @param {string} failure
511
- * @param {string[]} scopes
1245
+ * @param {OAuthProvider} params.provider - OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, github, gitlab, google, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoho, zoom, githubImagine, googleImagine.
1246
+ * @param {string} params.success - URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.
1247
+ * @param {string} params.failure - URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.
1248
+ * @param {string[]} params.scopes - A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long.
512
1249
  * @throws {AppwriteException}
513
1250
  * @returns {void | string}
514
1251
  */
1252
+ createOAuth2Token(params: {
1253
+ provider: OAuthProvider;
1254
+ success?: string;
1255
+ failure?: string;
1256
+ scopes?: string[];
1257
+ }): void | string;
1258
+ /**
1259
+ * Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed.
1260
+ *
1261
+ * If authentication succeeds, `userId` and `secret` of a token will be appended to the success URL as query parameters. These can be used to create a new session using the [Create session](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint.
1262
+ *
1263
+ * A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).
1264
+ *
1265
+ * @param {OAuthProvider} provider - OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, github, gitlab, google, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoho, zoom, githubImagine, googleImagine.
1266
+ * @param {string} success - URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.
1267
+ * @param {string} failure - URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.
1268
+ * @param {string[]} scopes - A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long.
1269
+ * @throws {AppwriteException}
1270
+ * @returns {void | string}
1271
+ * @deprecated Use the object parameter style method for a better developer experience.
1272
+ */
515
1273
  createOAuth2Token(provider: OAuthProvider, success?: string, failure?: string, scopes?: string[]): void | string;
516
1274
  /**
517
- * Sends the user an SMS with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. The secret sent to the user&#039;s phone is valid for 15 minutes.
518
-
519
- A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).
1275
+ * Sends the user an SMS with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes.
1276
+ *
1277
+ * A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).
520
1278
  *
521
- * @param {string} userId
522
- * @param {string} phone
1279
+ * @param {string} params.userId - Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the phone number has never been used, a new account is created using the provided userId. Otherwise, if the phone number is already attached to an account, the user ID is ignored.
1280
+ * @param {string} params.phone - Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.
523
1281
  * @throws {AppwriteException}
524
1282
  * @returns {Promise<Models.Token>}
525
1283
  */
1284
+ createPhoneToken(params: {
1285
+ userId: string;
1286
+ phone: string;
1287
+ }): Promise<Models.Token>;
1288
+ /**
1289
+ * Sends the user an SMS with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes.
1290
+ *
1291
+ * A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).
1292
+ *
1293
+ * @param {string} userId - Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the phone number has never been used, a new account is created using the provided userId. Otherwise, if the phone number is already attached to an account, the user ID is ignored.
1294
+ * @param {string} phone - Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.
1295
+ * @throws {AppwriteException}
1296
+ * @returns {Promise<Models.Token>}
1297
+ * @deprecated Use the object parameter style method for a better developer experience.
1298
+ */
526
1299
  createPhoneToken(userId: string, phone: string): Promise<Models.Token>;
527
1300
  /**
528
- * Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](https://appwrite.io/docs/references/cloud/client-web/account#updateVerification). The verification link sent to the user&#039;s email address is valid for 7 days.
529
-
530
- Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.
531
-
1301
+ * Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](https://appwrite.io/docs/references/cloud/client-web/account#updateVerification). The verification link sent to the user's email address is valid for 7 days.
1302
+ *
1303
+ * Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.
1304
+ *
1305
+ *
1306
+ * @param {string} params.url - URL to redirect the user back to your app from the verification email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.
1307
+ * @throws {AppwriteException}
1308
+ * @returns {Promise<Models.Token>}
1309
+ */
1310
+ createEmailVerification(params: {
1311
+ url: string;
1312
+ }): Promise<Models.Token>;
1313
+ /**
1314
+ * Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](https://appwrite.io/docs/references/cloud/client-web/account#updateVerification). The verification link sent to the user's email address is valid for 7 days.
1315
+ *
1316
+ * Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.
1317
+ *
1318
+ *
1319
+ * @param {string} url - URL to redirect the user back to your app from the verification email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.
1320
+ * @throws {AppwriteException}
1321
+ * @returns {Promise<Models.Token>}
1322
+ * @deprecated Use the object parameter style method for a better developer experience.
1323
+ */
1324
+ createEmailVerification(url: string): Promise<Models.Token>;
1325
+ /**
1326
+ * Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](https://appwrite.io/docs/references/cloud/client-web/account#updateVerification). The verification link sent to the user's email address is valid for 7 days.
1327
+ *
1328
+ * Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.
532
1329
  *
533
- * @param {string} url
1330
+ *
1331
+ * @param {string} params.url - URL to redirect the user back to your app from the verification email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.
534
1332
  * @throws {AppwriteException}
535
1333
  * @returns {Promise<Models.Token>}
1334
+ * @deprecated This API has been deprecated since 1.8.0. Please use `Account.createEmailVerification` instead.
1335
+ */
1336
+ createVerification(params: {
1337
+ url: string;
1338
+ }): Promise<Models.Token>;
1339
+ /**
1340
+ * Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](https://appwrite.io/docs/references/cloud/client-web/account#updateVerification). The verification link sent to the user's email address is valid for 7 days.
1341
+ *
1342
+ * Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.
1343
+ *
1344
+ *
1345
+ * @param {string} url - URL to redirect the user back to your app from the verification email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.
1346
+ * @throws {AppwriteException}
1347
+ * @returns {Promise<Models.Token>}
1348
+ * @deprecated Use the object parameter style method for a better developer experience.
536
1349
  */
537
1350
  createVerification(url: string): Promise<Models.Token>;
538
1351
  /**
539
1352
  * Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.
540
1353
  *
541
- * @param {string} userId
542
- * @param {string} secret
1354
+ * @param {string} params.userId - User ID.
1355
+ * @param {string} params.secret - Valid verification token.
543
1356
  * @throws {AppwriteException}
544
1357
  * @returns {Promise<Models.Token>}
545
1358
  */
1359
+ updateEmailVerification(params: {
1360
+ userId: string;
1361
+ secret: string;
1362
+ }): Promise<Models.Token>;
1363
+ /**
1364
+ * Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.
1365
+ *
1366
+ * @param {string} userId - User ID.
1367
+ * @param {string} secret - Valid verification token.
1368
+ * @throws {AppwriteException}
1369
+ * @returns {Promise<Models.Token>}
1370
+ * @deprecated Use the object parameter style method for a better developer experience.
1371
+ */
1372
+ updateEmailVerification(userId: string, secret: string): Promise<Models.Token>;
1373
+ /**
1374
+ * Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.
1375
+ *
1376
+ * @param {string} params.userId - User ID.
1377
+ * @param {string} params.secret - Valid verification token.
1378
+ * @throws {AppwriteException}
1379
+ * @returns {Promise<Models.Token>}
1380
+ * @deprecated This API has been deprecated since 1.8.0. Please use `Account.updateEmailVerification` instead.
1381
+ */
1382
+ updateVerification(params: {
1383
+ userId: string;
1384
+ secret: string;
1385
+ }): Promise<Models.Token>;
1386
+ /**
1387
+ * Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.
1388
+ *
1389
+ * @param {string} userId - User ID.
1390
+ * @param {string} secret - Valid verification token.
1391
+ * @throws {AppwriteException}
1392
+ * @returns {Promise<Models.Token>}
1393
+ * @deprecated Use the object parameter style method for a better developer experience.
1394
+ */
546
1395
  updateVerification(userId: string, secret: string): Promise<Models.Token>;
547
1396
  /**
548
- * Use this endpoint to send a verification SMS to the currently logged in user. This endpoint is meant for use after updating a user&#039;s phone number using the [accountUpdatePhone](https://appwrite.io/docs/references/cloud/client-web/account#updatePhone) endpoint. Learn more about how to [complete the verification process](https://appwrite.io/docs/references/cloud/client-web/account#updatePhoneVerification). The verification code sent to the user&#039;s phone number is valid for 15 minutes.
1397
+ * Use this endpoint to send a verification SMS to the currently logged in user. This endpoint is meant for use after updating a user's phone number using the [accountUpdatePhone](https://appwrite.io/docs/references/cloud/client-web/account#updatePhone) endpoint. Learn more about how to [complete the verification process](https://appwrite.io/docs/references/cloud/client-web/account#updatePhoneVerification). The verification code sent to the user's phone number is valid for 15 minutes.
549
1398
  *
550
1399
  * @throws {AppwriteException}
551
1400
  * @returns {Promise<Models.Token>}
552
1401
  */
553
1402
  createPhoneVerification(): Promise<Models.Token>;
554
1403
  /**
555
- * Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user&#039;s phone number to verify the user email ownership. If confirmed this route will return a 200 status code.
1404
+ * Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number to verify the user email ownership. If confirmed this route will return a 200 status code.
1405
+ *
1406
+ * @param {string} params.userId - User ID.
1407
+ * @param {string} params.secret - Valid verification token.
1408
+ * @throws {AppwriteException}
1409
+ * @returns {Promise<Models.Token>}
1410
+ */
1411
+ updatePhoneVerification(params: {
1412
+ userId: string;
1413
+ secret: string;
1414
+ }): Promise<Models.Token>;
1415
+ /**
1416
+ * Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number to verify the user email ownership. If confirmed this route will return a 200 status code.
556
1417
  *
557
- * @param {string} userId
558
- * @param {string} secret
1418
+ * @param {string} userId - User ID.
1419
+ * @param {string} secret - Valid verification token.
559
1420
  * @throws {AppwriteException}
560
1421
  * @returns {Promise<Models.Token>}
1422
+ * @deprecated Use the object parameter style method for a better developer experience.
561
1423
  */
562
1424
  updatePhoneVerification(userId: string, secret: string): Promise<Models.Token>;
563
1425
  }