@appwrite.io/console 1.5.2 → 1.7.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 (607) hide show
  1. package/CHANGELOG.md +9 -1
  2. package/README.md +3 -3
  3. package/dist/cjs/sdk.js +11874 -11100
  4. package/dist/cjs/sdk.js.map +1 -1
  5. package/dist/esm/sdk.js +11872 -11101
  6. package/dist/esm/sdk.js.map +1 -1
  7. package/dist/iife/sdk.js +11874 -11100
  8. package/docs/examples/account/create-anonymous-session.md +1 -1
  9. package/docs/examples/account/create-billing-address.md +1 -1
  10. package/docs/examples/account/create-email-password-session.md +1 -1
  11. package/docs/examples/account/create-email-token.md +1 -1
  12. package/docs/examples/account/create-j-w-t.md +1 -1
  13. package/docs/examples/account/create-magic-u-r-l-token.md +1 -1
  14. package/docs/examples/account/create-mfa-authenticator.md +1 -1
  15. package/docs/examples/account/create-mfa-challenge.md +1 -1
  16. package/docs/examples/account/create-mfa-recovery-codes.md +1 -1
  17. package/docs/examples/account/create-o-auth2session.md +1 -1
  18. package/docs/examples/account/create-o-auth2token.md +1 -1
  19. package/docs/examples/account/create-payment-method.md +1 -1
  20. package/docs/examples/account/create-phone-token.md +1 -1
  21. package/docs/examples/account/create-phone-verification.md +1 -1
  22. package/docs/examples/account/create-push-target.md +1 -1
  23. package/docs/examples/account/create-recovery.md +1 -1
  24. package/docs/examples/account/create-session.md +1 -1
  25. package/docs/examples/account/create-verification.md +1 -1
  26. package/docs/examples/account/create.md +1 -1
  27. package/docs/examples/account/delete-billing-address.md +1 -1
  28. package/docs/examples/account/delete-identity.md +1 -1
  29. package/docs/examples/account/delete-mfa-authenticator.md +1 -1
  30. package/docs/examples/account/delete-payment-method.md +1 -1
  31. package/docs/examples/account/delete-push-target.md +1 -1
  32. package/docs/examples/account/delete-session.md +1 -1
  33. package/docs/examples/account/delete-sessions.md +1 -1
  34. package/docs/examples/account/delete.md +1 -1
  35. package/docs/examples/account/get-billing-address.md +1 -1
  36. package/docs/examples/account/get-coupon.md +1 -1
  37. package/docs/examples/account/get-mfa-recovery-codes.md +1 -1
  38. package/docs/examples/account/get-payment-method.md +1 -1
  39. package/docs/examples/account/get-prefs.md +1 -1
  40. package/docs/examples/account/get-session.md +1 -1
  41. package/docs/examples/account/get.md +1 -1
  42. package/docs/examples/account/list-billing-addresses.md +1 -1
  43. package/docs/examples/account/list-identities.md +1 -1
  44. package/docs/examples/account/list-invoices.md +1 -1
  45. package/docs/examples/account/list-logs.md +1 -1
  46. package/docs/examples/account/list-mfa-factors.md +1 -1
  47. package/docs/examples/account/list-payment-methods.md +1 -1
  48. package/docs/examples/account/list-sessions.md +1 -1
  49. package/docs/examples/account/update-billing-address.md +1 -1
  50. package/docs/examples/account/update-email.md +1 -1
  51. package/docs/examples/account/update-m-f-a.md +1 -1
  52. package/docs/examples/account/update-magic-u-r-l-session.md +1 -1
  53. package/docs/examples/account/update-mfa-authenticator.md +1 -1
  54. package/docs/examples/account/update-mfa-challenge.md +1 -1
  55. package/docs/examples/account/update-mfa-recovery-codes.md +1 -1
  56. package/docs/examples/account/update-name.md +1 -1
  57. package/docs/examples/account/update-password.md +1 -1
  58. package/docs/examples/account/update-payment-method-mandate-options.md +1 -1
  59. package/docs/examples/account/update-payment-method-provider.md +1 -1
  60. package/docs/examples/account/update-payment-method.md +1 -1
  61. package/docs/examples/account/update-phone-session.md +1 -1
  62. package/docs/examples/account/update-phone-verification.md +1 -1
  63. package/docs/examples/account/update-phone.md +1 -1
  64. package/docs/examples/account/update-prefs.md +1 -1
  65. package/docs/examples/account/update-push-target.md +1 -1
  66. package/docs/examples/account/update-recovery.md +1 -1
  67. package/docs/examples/account/update-session.md +1 -1
  68. package/docs/examples/account/update-status.md +1 -1
  69. package/docs/examples/account/update-verification.md +1 -1
  70. package/docs/examples/assistant/chat.md +1 -1
  71. package/docs/examples/avatars/get-browser.md +2 -2
  72. package/docs/examples/avatars/get-credit-card.md +2 -2
  73. package/docs/examples/avatars/get-favicon.md +1 -1
  74. package/docs/examples/avatars/get-flag.md +2 -2
  75. package/docs/examples/avatars/get-image.md +1 -1
  76. package/docs/examples/avatars/get-initials.md +1 -1
  77. package/docs/examples/avatars/get-q-r.md +1 -1
  78. package/docs/examples/backups/create-archive.md +1 -1
  79. package/docs/examples/backups/create-policy.md +1 -1
  80. package/docs/examples/backups/create-restoration.md +1 -1
  81. package/docs/examples/backups/delete-archive.md +1 -1
  82. package/docs/examples/backups/delete-policy.md +1 -1
  83. package/docs/examples/backups/get-archive.md +1 -1
  84. package/docs/examples/backups/get-policy.md +1 -1
  85. package/docs/examples/backups/get-restoration.md +1 -1
  86. package/docs/examples/backups/list-archives.md +1 -1
  87. package/docs/examples/backups/list-policies.md +1 -1
  88. package/docs/examples/backups/list-restorations.md +1 -1
  89. package/docs/examples/backups/update-policy.md +1 -1
  90. package/docs/examples/console/create-program-membership.md +1 -1
  91. package/docs/examples/console/create-source.md +1 -1
  92. package/docs/examples/console/get-campaign.md +1 -1
  93. package/docs/examples/console/get-coupon.md +1 -1
  94. package/docs/examples/console/get-resource.md +14 -0
  95. package/docs/examples/console/plans.md +1 -1
  96. package/docs/examples/console/regions.md +1 -1
  97. package/docs/examples/console/variables.md +1 -1
  98. package/docs/examples/databases/create-boolean-attribute.md +1 -1
  99. package/docs/examples/databases/create-collection.md +1 -1
  100. package/docs/examples/databases/create-datetime-attribute.md +1 -1
  101. package/docs/examples/databases/create-document.md +4 -2
  102. package/docs/examples/databases/create-documents.md +15 -0
  103. package/docs/examples/databases/create-email-attribute.md +1 -1
  104. package/docs/examples/databases/create-enum-attribute.md +1 -1
  105. package/docs/examples/databases/create-float-attribute.md +1 -1
  106. package/docs/examples/databases/create-index.md +3 -2
  107. package/docs/examples/databases/create-integer-attribute.md +1 -1
  108. package/docs/examples/databases/create-ip-attribute.md +1 -1
  109. package/docs/examples/databases/create-relationship-attribute.md +1 -1
  110. package/docs/examples/databases/create-string-attribute.md +1 -1
  111. package/docs/examples/databases/create-url-attribute.md +1 -1
  112. package/docs/examples/databases/create.md +1 -1
  113. package/docs/examples/databases/delete-attribute.md +1 -1
  114. package/docs/examples/databases/delete-collection.md +1 -1
  115. package/docs/examples/databases/delete-document.md +1 -1
  116. package/docs/examples/databases/delete-documents.md +15 -0
  117. package/docs/examples/databases/delete-index.md +1 -1
  118. package/docs/examples/databases/delete.md +1 -1
  119. package/docs/examples/databases/get-attribute.md +1 -1
  120. package/docs/examples/databases/get-collection-usage.md +1 -1
  121. package/docs/examples/databases/get-collection.md +1 -1
  122. package/docs/examples/databases/get-database-usage.md +1 -1
  123. package/docs/examples/databases/get-document.md +1 -1
  124. package/docs/examples/databases/get-index.md +1 -1
  125. package/docs/examples/databases/get-usage.md +1 -1
  126. package/docs/examples/databases/get.md +1 -1
  127. package/docs/examples/databases/list-attributes.md +1 -1
  128. package/docs/examples/databases/list-collection-logs.md +1 -1
  129. package/docs/examples/databases/list-collections.md +1 -1
  130. package/docs/examples/databases/list-document-logs.md +1 -1
  131. package/docs/examples/databases/list-documents.md +1 -1
  132. package/docs/examples/databases/list-indexes.md +1 -1
  133. package/docs/examples/databases/list-logs.md +1 -1
  134. package/docs/examples/databases/list.md +1 -1
  135. package/docs/examples/databases/update-boolean-attribute.md +1 -1
  136. package/docs/examples/databases/update-collection.md +1 -1
  137. package/docs/examples/databases/update-datetime-attribute.md +1 -1
  138. package/docs/examples/databases/update-document.md +1 -1
  139. package/docs/examples/databases/update-documents.md +16 -0
  140. package/docs/examples/databases/update-email-attribute.md +1 -1
  141. package/docs/examples/databases/update-enum-attribute.md +1 -1
  142. package/docs/examples/databases/update-float-attribute.md +1 -1
  143. package/docs/examples/databases/update-integer-attribute.md +1 -1
  144. package/docs/examples/databases/update-ip-attribute.md +1 -1
  145. package/docs/examples/databases/update-relationship-attribute.md +1 -1
  146. package/docs/examples/databases/update-string-attribute.md +1 -1
  147. package/docs/examples/databases/update-url-attribute.md +1 -1
  148. package/docs/examples/databases/update.md +1 -1
  149. package/docs/examples/databases/upsert-documents.md +15 -0
  150. package/docs/examples/domains/create-preset-google-workspace.md +13 -0
  151. package/docs/examples/domains/create-preset-i-cloud.md +13 -0
  152. package/docs/examples/domains/create-preset-mailgun.md +13 -0
  153. package/docs/examples/domains/create-preset-outlook.md +13 -0
  154. package/docs/examples/domains/create-preset-proton-mail.md +13 -0
  155. package/docs/examples/domains/create-preset-zoho.md +13 -0
  156. package/docs/examples/domains/create-record-a-a-a-a.md +17 -0
  157. package/docs/examples/domains/create-record-a.md +17 -0
  158. package/docs/examples/domains/create-record-alias.md +17 -0
  159. package/docs/examples/domains/create-record-c-a-a.md +17 -0
  160. package/docs/examples/domains/create-record-c-n-a-m-e.md +17 -0
  161. package/docs/examples/domains/create-record-h-t-t-p-s.md +17 -0
  162. package/docs/examples/domains/create-record-m-x.md +18 -0
  163. package/docs/examples/domains/create-record-n-s.md +17 -0
  164. package/docs/examples/domains/create-record-s-r-v.md +20 -0
  165. package/docs/examples/domains/create-record-t-x-t.md +17 -0
  166. package/docs/examples/domains/create.md +14 -0
  167. package/docs/examples/domains/delete-record.md +14 -0
  168. package/docs/examples/domains/delete.md +13 -0
  169. package/docs/examples/domains/get-preset-google-workspace.md +13 -0
  170. package/docs/examples/domains/get-preset-i-cloud.md +13 -0
  171. package/docs/examples/domains/get-preset-mailgun.md +13 -0
  172. package/docs/examples/domains/get-preset-outlook.md +13 -0
  173. package/docs/examples/domains/get-preset-proton-mail.md +13 -0
  174. package/docs/examples/domains/get-preset-zoho.md +13 -0
  175. package/docs/examples/domains/get-record.md +14 -0
  176. package/docs/examples/domains/get-zone.md +13 -0
  177. package/docs/examples/domains/get.md +13 -0
  178. package/docs/examples/domains/list-records.md +14 -0
  179. package/docs/examples/domains/list.md +14 -0
  180. package/docs/examples/domains/update-nameservers.md +13 -0
  181. package/docs/examples/domains/update-record-a-a-a-a.md +18 -0
  182. package/docs/examples/domains/update-record-a.md +18 -0
  183. package/docs/examples/domains/update-record-alias.md +18 -0
  184. package/docs/examples/domains/update-record-c-a-a.md +18 -0
  185. package/docs/examples/domains/update-record-c-n-a-m-e.md +18 -0
  186. package/docs/examples/domains/update-record-h-t-t-p-s.md +18 -0
  187. package/docs/examples/domains/update-record-m-x.md +19 -0
  188. package/docs/examples/domains/update-record-n-s.md +18 -0
  189. package/docs/examples/domains/update-record-s-r-v.md +21 -0
  190. package/docs/examples/domains/update-record-t-x-t.md +18 -0
  191. package/docs/examples/domains/update-team.md +14 -0
  192. package/docs/examples/domains/update-zone.md +14 -0
  193. package/docs/examples/functions/create-deployment.md +1 -1
  194. package/docs/examples/functions/create-duplicate-deployment.md +15 -0
  195. package/docs/examples/functions/create-execution.md +1 -1
  196. package/docs/examples/functions/create-template-deployment.md +18 -0
  197. package/docs/examples/functions/create-variable.md +3 -2
  198. package/docs/examples/functions/create-vcs-deployment.md +16 -0
  199. package/docs/examples/functions/create.md +3 -3
  200. package/docs/examples/functions/delete-deployment.md +1 -1
  201. package/docs/examples/functions/delete-execution.md +1 -1
  202. package/docs/examples/functions/delete-variable.md +1 -1
  203. package/docs/examples/functions/delete.md +1 -1
  204. package/docs/examples/functions/get-deployment-download.md +4 -3
  205. package/docs/examples/functions/get-deployment.md +1 -1
  206. package/docs/examples/functions/get-execution.md +1 -1
  207. package/docs/examples/functions/get-template.md +1 -1
  208. package/docs/examples/functions/get-usage.md +2 -1
  209. package/docs/examples/functions/get-variable.md +1 -1
  210. package/docs/examples/functions/get.md +1 -1
  211. package/docs/examples/functions/list-deployments.md +1 -1
  212. package/docs/examples/functions/list-executions.md +2 -3
  213. package/docs/examples/functions/list-runtimes.md +1 -1
  214. package/docs/examples/functions/list-specifications.md +1 -1
  215. package/docs/examples/functions/list-templates.md +1 -1
  216. package/docs/examples/functions/list-usage.md +13 -0
  217. package/docs/examples/functions/list-variables.md +1 -1
  218. package/docs/examples/functions/list.md +1 -1
  219. package/docs/examples/functions/update-deployment-status.md +14 -0
  220. package/docs/examples/functions/update-function-deployment.md +14 -0
  221. package/docs/examples/functions/update-variable.md +3 -2
  222. package/docs/examples/functions/update.md +1 -1
  223. package/docs/examples/graphql/mutation.md +1 -1
  224. package/docs/examples/graphql/query.md +1 -1
  225. package/docs/examples/health/get-antivirus.md +1 -1
  226. package/docs/examples/health/get-cache.md +1 -1
  227. package/docs/examples/health/get-certificate.md +1 -1
  228. package/docs/examples/health/get-d-b.md +1 -1
  229. package/docs/examples/health/get-failed-jobs.md +1 -1
  230. package/docs/examples/health/get-pub-sub.md +1 -1
  231. package/docs/examples/health/get-queue-billing-aggregation.md +1 -1
  232. package/docs/examples/health/get-queue-builds.md +1 -1
  233. package/docs/examples/health/get-queue-certificates.md +1 -1
  234. package/docs/examples/health/get-queue-databases.md +1 -1
  235. package/docs/examples/health/get-queue-deletes.md +1 -1
  236. package/docs/examples/health/get-queue-functions.md +1 -1
  237. package/docs/examples/health/get-queue-logs.md +1 -1
  238. package/docs/examples/health/get-queue-mails.md +1 -1
  239. package/docs/examples/health/get-queue-messaging.md +1 -1
  240. package/docs/examples/health/get-queue-migrations.md +1 -1
  241. package/docs/examples/health/get-queue-priority-builds.md +1 -1
  242. package/docs/examples/health/get-queue-region-manager.md +13 -0
  243. package/docs/examples/health/get-queue-stats-resources.md +1 -1
  244. package/docs/examples/health/get-queue-usage.md +1 -1
  245. package/docs/examples/health/get-queue-webhooks.md +1 -1
  246. package/docs/examples/health/get-storage-local.md +1 -1
  247. package/docs/examples/health/get-storage.md +1 -1
  248. package/docs/examples/health/get-time.md +1 -1
  249. package/docs/examples/health/get.md +1 -1
  250. package/docs/examples/locale/get.md +1 -1
  251. package/docs/examples/locale/list-codes.md +1 -1
  252. package/docs/examples/locale/list-continents.md +1 -1
  253. package/docs/examples/locale/list-countries-e-u.md +1 -1
  254. package/docs/examples/locale/list-countries-phones.md +1 -1
  255. package/docs/examples/locale/list-countries.md +1 -1
  256. package/docs/examples/locale/list-currencies.md +1 -1
  257. package/docs/examples/locale/list-languages.md +1 -1
  258. package/docs/examples/messaging/create-apns-provider.md +1 -1
  259. package/docs/examples/messaging/create-email.md +1 -1
  260. package/docs/examples/messaging/create-fcm-provider.md +1 -1
  261. package/docs/examples/messaging/create-mailgun-provider.md +1 -1
  262. package/docs/examples/messaging/create-msg91provider.md +1 -1
  263. package/docs/examples/messaging/create-push.md +1 -1
  264. package/docs/examples/messaging/create-sendgrid-provider.md +1 -1
  265. package/docs/examples/messaging/create-sms.md +1 -1
  266. package/docs/examples/messaging/create-smtp-provider.md +1 -1
  267. package/docs/examples/messaging/create-subscriber.md +1 -1
  268. package/docs/examples/messaging/create-telesign-provider.md +1 -1
  269. package/docs/examples/messaging/create-textmagic-provider.md +1 -1
  270. package/docs/examples/messaging/create-topic.md +1 -1
  271. package/docs/examples/messaging/create-twilio-provider.md +1 -1
  272. package/docs/examples/messaging/create-vonage-provider.md +1 -1
  273. package/docs/examples/messaging/delete-provider.md +1 -1
  274. package/docs/examples/messaging/delete-subscriber.md +1 -1
  275. package/docs/examples/messaging/delete-topic.md +1 -1
  276. package/docs/examples/messaging/delete.md +1 -1
  277. package/docs/examples/messaging/get-message.md +1 -1
  278. package/docs/examples/messaging/get-provider.md +1 -1
  279. package/docs/examples/messaging/get-subscriber.md +1 -1
  280. package/docs/examples/messaging/get-topic.md +1 -1
  281. package/docs/examples/messaging/list-message-logs.md +1 -1
  282. package/docs/examples/messaging/list-messages.md +1 -1
  283. package/docs/examples/messaging/list-provider-logs.md +1 -1
  284. package/docs/examples/messaging/list-providers.md +1 -1
  285. package/docs/examples/messaging/list-subscriber-logs.md +1 -1
  286. package/docs/examples/messaging/list-subscribers.md +1 -1
  287. package/docs/examples/messaging/list-targets.md +1 -1
  288. package/docs/examples/messaging/list-topic-logs.md +1 -1
  289. package/docs/examples/messaging/list-topics.md +1 -1
  290. package/docs/examples/messaging/update-apns-provider.md +1 -1
  291. package/docs/examples/messaging/update-email.md +1 -1
  292. package/docs/examples/messaging/update-fcm-provider.md +1 -1
  293. package/docs/examples/messaging/update-mailgun-provider.md +1 -1
  294. package/docs/examples/messaging/update-msg91provider.md +1 -1
  295. package/docs/examples/messaging/update-push.md +1 -1
  296. package/docs/examples/messaging/update-sendgrid-provider.md +1 -1
  297. package/docs/examples/messaging/update-sms.md +1 -1
  298. package/docs/examples/messaging/update-smtp-provider.md +1 -1
  299. package/docs/examples/messaging/update-telesign-provider.md +1 -1
  300. package/docs/examples/messaging/update-textmagic-provider.md +1 -1
  301. package/docs/examples/messaging/update-topic.md +1 -1
  302. package/docs/examples/messaging/update-twilio-provider.md +1 -1
  303. package/docs/examples/messaging/update-vonage-provider.md +1 -1
  304. package/docs/examples/migrations/create-appwrite-migration.md +1 -1
  305. package/docs/examples/migrations/create-csv-migration.md +15 -0
  306. package/docs/examples/migrations/create-firebase-migration.md +1 -1
  307. package/docs/examples/migrations/create-n-host-migration.md +1 -1
  308. package/docs/examples/migrations/create-supabase-migration.md +1 -1
  309. package/docs/examples/migrations/delete.md +1 -1
  310. package/docs/examples/migrations/get-appwrite-report.md +1 -1
  311. package/docs/examples/migrations/get-firebase-report.md +1 -1
  312. package/docs/examples/migrations/get-n-host-report.md +1 -1
  313. package/docs/examples/migrations/get-supabase-report.md +1 -1
  314. package/docs/examples/migrations/get.md +1 -1
  315. package/docs/examples/migrations/list.md +1 -1
  316. package/docs/examples/migrations/retry.md +1 -1
  317. package/docs/examples/organizations/add-credit.md +1 -1
  318. package/docs/examples/organizations/create-invoice-payment.md +1 -1
  319. package/docs/examples/organizations/create.md +1 -1
  320. package/docs/examples/organizations/delete-backup-payment-method.md +1 -1
  321. package/docs/examples/organizations/delete-billing-address.md +1 -1
  322. package/docs/examples/organizations/delete-default-payment-method.md +1 -1
  323. package/docs/examples/organizations/delete.md +1 -1
  324. package/docs/examples/organizations/get-aggregation.md +1 -1
  325. package/docs/examples/organizations/get-billing-address.md +1 -1
  326. package/docs/examples/organizations/get-credit.md +1 -1
  327. package/docs/examples/organizations/get-invoice-download.md +1 -1
  328. package/docs/examples/organizations/get-invoice-view.md +1 -1
  329. package/docs/examples/organizations/get-invoice.md +1 -1
  330. package/docs/examples/organizations/get-payment-method.md +1 -1
  331. package/docs/examples/organizations/get-plan.md +1 -1
  332. package/docs/examples/organizations/get-scopes.md +1 -1
  333. package/docs/examples/organizations/list-aggregations.md +1 -1
  334. package/docs/examples/organizations/list-credits.md +1 -1
  335. package/docs/examples/organizations/list-invoices.md +1 -1
  336. package/docs/examples/organizations/list.md +1 -1
  337. package/docs/examples/organizations/set-backup-payment-method.md +1 -1
  338. package/docs/examples/organizations/set-billing-address.md +1 -1
  339. package/docs/examples/organizations/set-billing-email.md +1 -1
  340. package/docs/examples/organizations/set-billing-tax-id.md +1 -1
  341. package/docs/examples/organizations/set-default-payment-method.md +1 -1
  342. package/docs/examples/organizations/update-budget.md +1 -1
  343. package/docs/examples/organizations/update-plan.md +1 -1
  344. package/docs/examples/organizations/validate-invoice.md +14 -0
  345. package/docs/examples/project/create-variable.md +3 -2
  346. package/docs/examples/project/delete-variable.md +1 -1
  347. package/docs/examples/project/get-usage.md +1 -1
  348. package/docs/examples/project/get-variable.md +1 -1
  349. package/docs/examples/project/list-variables.md +1 -1
  350. package/docs/examples/project/update-variable.md +3 -2
  351. package/docs/examples/projects/create-dev-key.md +15 -0
  352. package/docs/examples/projects/create-j-w-t.md +1 -1
  353. package/docs/examples/projects/create-key.md +1 -1
  354. package/docs/examples/projects/create-platform.md +1 -1
  355. package/docs/examples/projects/create-smtp-test.md +1 -1
  356. package/docs/examples/projects/create-webhook.md +1 -1
  357. package/docs/examples/projects/create.md +2 -2
  358. package/docs/examples/projects/delete-dev-key.md +14 -0
  359. package/docs/examples/projects/delete-email-template.md +1 -1
  360. package/docs/examples/projects/delete-key.md +1 -1
  361. package/docs/examples/projects/delete-platform.md +1 -1
  362. package/docs/examples/projects/delete-sms-template.md +1 -1
  363. package/docs/examples/projects/delete-webhook.md +1 -1
  364. package/docs/examples/projects/delete.md +1 -1
  365. package/docs/examples/projects/get-dev-key.md +14 -0
  366. package/docs/examples/projects/get-email-template.md +1 -1
  367. package/docs/examples/projects/get-key.md +1 -1
  368. package/docs/examples/projects/get-platform.md +1 -1
  369. package/docs/examples/projects/get-sms-template.md +1 -1
  370. package/docs/examples/projects/get-webhook.md +1 -1
  371. package/docs/examples/projects/get.md +1 -1
  372. package/docs/examples/projects/list-dev-keys.md +14 -0
  373. package/docs/examples/projects/list-keys.md +1 -1
  374. package/docs/examples/projects/list-platforms.md +1 -1
  375. package/docs/examples/projects/list-webhooks.md +1 -1
  376. package/docs/examples/projects/list.md +1 -1
  377. package/docs/examples/projects/update-api-status-all.md +1 -1
  378. package/docs/examples/projects/update-api-status.md +1 -1
  379. package/docs/examples/projects/update-auth-duration.md +1 -1
  380. package/docs/examples/projects/update-auth-limit.md +1 -1
  381. package/docs/examples/projects/update-auth-password-dictionary.md +1 -1
  382. package/docs/examples/projects/update-auth-password-history.md +1 -1
  383. package/docs/examples/projects/update-auth-sessions-limit.md +1 -1
  384. package/docs/examples/projects/update-auth-status.md +1 -1
  385. package/docs/examples/projects/update-dev-key.md +16 -0
  386. package/docs/examples/projects/update-email-template.md +1 -1
  387. package/docs/examples/projects/update-key.md +1 -1
  388. package/docs/examples/projects/update-memberships-privacy.md +1 -1
  389. package/docs/examples/projects/update-mock-numbers.md +1 -1
  390. package/docs/examples/projects/update-o-auth2.md +1 -1
  391. package/docs/examples/projects/update-personal-data-check.md +1 -1
  392. package/docs/examples/projects/update-platform.md +1 -1
  393. package/docs/examples/projects/update-service-status-all.md +1 -1
  394. package/docs/examples/projects/update-service-status.md +1 -1
  395. package/docs/examples/projects/update-session-alerts.md +1 -1
  396. package/docs/examples/projects/update-sms-template.md +1 -1
  397. package/docs/examples/projects/update-smtp.md +1 -1
  398. package/docs/examples/projects/update-team.md +1 -1
  399. package/docs/examples/projects/update-webhook-signature.md +1 -1
  400. package/docs/examples/projects/update-webhook.md +1 -1
  401. package/docs/examples/projects/update.md +1 -1
  402. package/docs/examples/proxy/create-a-p-i-rule.md +13 -0
  403. package/docs/examples/proxy/create-function-rule.md +15 -0
  404. package/docs/examples/proxy/create-redirect-rule.md +15 -0
  405. package/docs/examples/proxy/create-site-rule.md +15 -0
  406. package/docs/examples/proxy/delete-rule.md +1 -1
  407. package/docs/examples/proxy/get-rule.md +1 -1
  408. package/docs/examples/proxy/list-rules.md +1 -1
  409. package/docs/examples/proxy/update-rule-verification.md +1 -1
  410. package/docs/examples/sites/create-deployment.md +18 -0
  411. package/docs/examples/sites/create-duplicate-deployment.md +14 -0
  412. package/docs/examples/sites/create-template-deployment.md +18 -0
  413. package/docs/examples/sites/create-variable.md +16 -0
  414. package/docs/examples/sites/create-vcs-deployment.md +16 -0
  415. package/docs/examples/sites/create.md +30 -0
  416. package/docs/examples/sites/delete-deployment.md +14 -0
  417. package/docs/examples/sites/delete-log.md +14 -0
  418. package/docs/examples/sites/delete-variable.md +14 -0
  419. package/docs/examples/sites/delete.md +13 -0
  420. package/docs/examples/sites/get-deployment-download.md +15 -0
  421. package/docs/examples/sites/get-deployment.md +14 -0
  422. package/docs/examples/sites/get-log.md +14 -0
  423. package/docs/examples/sites/get-template.md +13 -0
  424. package/docs/examples/sites/get-usage.md +14 -0
  425. package/docs/examples/sites/get-variable.md +14 -0
  426. package/docs/examples/sites/get.md +13 -0
  427. package/docs/examples/sites/list-deployments.md +15 -0
  428. package/docs/examples/sites/list-frameworks.md +11 -0
  429. package/docs/examples/sites/list-logs.md +14 -0
  430. package/docs/examples/sites/list-specifications.md +11 -0
  431. package/docs/examples/sites/list-templates.md +16 -0
  432. package/docs/examples/sites/list-usage.md +13 -0
  433. package/docs/examples/sites/list-variables.md +13 -0
  434. package/docs/examples/sites/list.md +14 -0
  435. package/docs/examples/sites/update-deployment-status.md +14 -0
  436. package/docs/examples/sites/update-site-deployment.md +14 -0
  437. package/docs/examples/sites/update-variable.md +17 -0
  438. package/docs/examples/sites/update.md +30 -0
  439. package/docs/examples/storage/create-bucket.md +1 -1
  440. package/docs/examples/storage/create-file.md +1 -1
  441. package/docs/examples/storage/delete-bucket.md +1 -1
  442. package/docs/examples/storage/delete-file.md +1 -1
  443. package/docs/examples/storage/get-bucket-usage.md +1 -1
  444. package/docs/examples/storage/get-bucket.md +1 -1
  445. package/docs/examples/storage/get-file-download.md +3 -2
  446. package/docs/examples/storage/get-file-preview.md +4 -3
  447. package/docs/examples/storage/get-file-view.md +3 -2
  448. package/docs/examples/storage/get-file.md +1 -1
  449. package/docs/examples/storage/get-usage.md +1 -1
  450. package/docs/examples/storage/list-buckets.md +1 -1
  451. package/docs/examples/storage/list-files.md +1 -1
  452. package/docs/examples/storage/update-bucket.md +1 -1
  453. package/docs/examples/storage/update-file.md +1 -1
  454. package/docs/examples/teams/create-membership.md +1 -1
  455. package/docs/examples/teams/create.md +1 -1
  456. package/docs/examples/teams/delete-membership.md +1 -1
  457. package/docs/examples/teams/delete.md +1 -1
  458. package/docs/examples/teams/get-membership.md +1 -1
  459. package/docs/examples/teams/get-prefs.md +1 -1
  460. package/docs/examples/teams/get.md +1 -1
  461. package/docs/examples/teams/list-logs.md +1 -1
  462. package/docs/examples/teams/list-memberships.md +1 -1
  463. package/docs/examples/teams/list.md +1 -1
  464. package/docs/examples/teams/update-membership-status.md +1 -1
  465. package/docs/examples/teams/update-membership.md +1 -1
  466. package/docs/examples/teams/update-name.md +1 -1
  467. package/docs/examples/teams/update-prefs.md +1 -1
  468. package/docs/examples/tokens/create-file-token.md +15 -0
  469. package/docs/examples/tokens/delete.md +13 -0
  470. package/docs/examples/tokens/get.md +13 -0
  471. package/docs/examples/tokens/list.md +15 -0
  472. package/docs/examples/tokens/update.md +14 -0
  473. package/docs/examples/users/create-argon2user.md +1 -1
  474. package/docs/examples/users/create-bcrypt-user.md +1 -1
  475. package/docs/examples/users/create-j-w-t.md +1 -1
  476. package/docs/examples/users/create-m-d5user.md +1 -1
  477. package/docs/examples/users/create-mfa-recovery-codes.md +1 -1
  478. package/docs/examples/users/create-p-h-pass-user.md +1 -1
  479. package/docs/examples/users/create-s-h-a-user.md +1 -1
  480. package/docs/examples/users/create-scrypt-modified-user.md +1 -1
  481. package/docs/examples/users/create-scrypt-user.md +1 -1
  482. package/docs/examples/users/create-session.md +1 -1
  483. package/docs/examples/users/create-target.md +1 -1
  484. package/docs/examples/users/create-token.md +1 -1
  485. package/docs/examples/users/create.md +1 -1
  486. package/docs/examples/users/delete-identity.md +1 -1
  487. package/docs/examples/users/delete-mfa-authenticator.md +1 -1
  488. package/docs/examples/users/delete-session.md +1 -1
  489. package/docs/examples/users/delete-sessions.md +1 -1
  490. package/docs/examples/users/delete-target.md +1 -1
  491. package/docs/examples/users/delete.md +1 -1
  492. package/docs/examples/users/get-mfa-recovery-codes.md +1 -1
  493. package/docs/examples/users/get-prefs.md +1 -1
  494. package/docs/examples/users/get-target.md +1 -1
  495. package/docs/examples/users/get-usage.md +1 -1
  496. package/docs/examples/users/get.md +1 -1
  497. package/docs/examples/users/list-identities.md +1 -1
  498. package/docs/examples/users/list-logs.md +1 -1
  499. package/docs/examples/users/list-memberships.md +4 -2
  500. package/docs/examples/users/list-mfa-factors.md +1 -1
  501. package/docs/examples/users/list-sessions.md +1 -1
  502. package/docs/examples/users/list-targets.md +1 -1
  503. package/docs/examples/users/list.md +1 -1
  504. package/docs/examples/users/update-email-verification.md +1 -1
  505. package/docs/examples/users/update-email.md +1 -1
  506. package/docs/examples/users/update-labels.md +1 -1
  507. package/docs/examples/users/update-mfa-recovery-codes.md +1 -1
  508. package/docs/examples/users/update-mfa.md +1 -1
  509. package/docs/examples/users/update-name.md +1 -1
  510. package/docs/examples/users/update-password.md +1 -1
  511. package/docs/examples/users/update-phone-verification.md +1 -1
  512. package/docs/examples/users/update-phone.md +1 -1
  513. package/docs/examples/users/update-prefs.md +1 -1
  514. package/docs/examples/users/update-status.md +1 -1
  515. package/docs/examples/users/update-target.md +1 -1
  516. package/docs/examples/vcs/create-repository-detection.md +3 -2
  517. package/docs/examples/vcs/create-repository.md +1 -1
  518. package/docs/examples/vcs/delete-installation.md +1 -1
  519. package/docs/examples/vcs/get-installation.md +1 -1
  520. package/docs/examples/vcs/get-repository-contents.md +1 -1
  521. package/docs/examples/vcs/get-repository.md +1 -1
  522. package/docs/examples/vcs/list-installations.md +1 -1
  523. package/docs/examples/vcs/list-repositories.md +3 -2
  524. package/docs/examples/vcs/list-repository-branches.md +1 -1
  525. package/docs/examples/vcs/update-external-deployments.md +1 -1
  526. package/package.json +1 -1
  527. package/src/client.ts +32 -5
  528. package/src/enums/adapter.ts +4 -0
  529. package/src/enums/api-service.ts +1 -0
  530. package/src/enums/build-runtime.ts +62 -0
  531. package/src/enums/console-resource-type.ts +3 -0
  532. package/src/enums/deployment-download-type.ts +4 -0
  533. package/src/enums/framework.ts +16 -0
  534. package/src/enums/image-format.ts +0 -1
  535. package/src/enums/name.ts +0 -1
  536. package/src/enums/o-auth-provider.ts +1 -0
  537. package/src/enums/region.ts +2 -1
  538. package/src/enums/runtime.ts +4 -3
  539. package/src/enums/site-usage-range.ts +5 -0
  540. package/src/enums/status-code.ts +6 -0
  541. package/src/enums/v-c-s-deployment-type.ts +5 -0
  542. package/src/enums/v-c-s-detection-type.ts +4 -0
  543. package/src/index.ts +13 -2
  544. package/src/models.ts +1171 -188
  545. package/src/services/account.ts +126 -446
  546. package/src/services/assistant.ts +2 -7
  547. package/src/services/avatars.ts +7 -28
  548. package/src/services/backups.ts +24 -90
  549. package/src/services/console.ts +48 -52
  550. package/src/services/databases.ts +241 -350
  551. package/src/services/domains.ts +1821 -0
  552. package/src/services/functions.ts +216 -248
  553. package/src/services/graphql.ts +4 -14
  554. package/src/services/health.ts +56 -206
  555. package/src/services/locale.ts +16 -64
  556. package/src/services/messaging.ts +92 -335
  557. package/src/services/migrations.ts +66 -89
  558. package/src/services/organizations.ts +84 -241
  559. package/src/services/project.ts +20 -45
  560. package/src/services/projects.ts +262 -330
  561. package/src/services/proxy.ts +129 -44
  562. package/src/services/sites.ts +1104 -0
  563. package/src/services/storage.ts +42 -105
  564. package/src/services/teams.ts +28 -104
  565. package/src/services/tokens.ts +160 -0
  566. package/src/services/users.ts +94 -313
  567. package/src/services/vcs.ts +70 -108
  568. package/types/enums/adapter.d.ts +4 -0
  569. package/types/enums/api-service.d.ts +1 -0
  570. package/types/enums/build-runtime.d.ts +62 -0
  571. package/types/enums/console-resource-type.d.ts +3 -0
  572. package/types/enums/deployment-download-type.d.ts +4 -0
  573. package/types/enums/framework.d.ts +16 -0
  574. package/types/enums/image-format.d.ts +0 -1
  575. package/types/enums/name.d.ts +0 -1
  576. package/types/enums/o-auth-provider.d.ts +1 -0
  577. package/types/enums/region.d.ts +3 -2
  578. package/types/enums/runtime.d.ts +5 -4
  579. package/types/enums/site-usage-range.d.ts +5 -0
  580. package/types/enums/status-code.d.ts +6 -0
  581. package/types/enums/v-c-s-deployment-type.d.ts +5 -0
  582. package/types/enums/v-c-s-detection-type.d.ts +4 -0
  583. package/types/index.d.ts +13 -2
  584. package/types/models.d.ts +1171 -188
  585. package/types/services/account.d.ts +4 -128
  586. package/types/services/assistant.d.ts +0 -2
  587. package/types/services/avatars.d.ts +0 -14
  588. package/types/services/backups.d.ts +0 -24
  589. package/types/services/console.d.ts +9 -13
  590. package/types/services/databases.d.ts +43 -97
  591. package/types/services/domains.d.ts +524 -0
  592. package/types/services/functions.d.ts +58 -84
  593. package/types/services/graphql.d.ts +0 -4
  594. package/types/services/health.d.ts +6 -56
  595. package/types/services/locale.d.ts +0 -16
  596. package/types/services/messaging.d.ts +0 -92
  597. package/types/services/migrations.d.ts +9 -23
  598. package/types/services/organizations.d.ts +11 -68
  599. package/types/services/project.d.ts +4 -14
  600. package/types/services/projects.d.ts +47 -91
  601. package/types/services/proxy.d.ts +31 -13
  602. package/types/services/sites.d.ts +319 -0
  603. package/types/services/storage.d.ts +6 -33
  604. package/types/services/teams.d.ts +0 -28
  605. package/types/services/tokens.d.ts +51 -0
  606. package/types/services/users.d.ts +3 -87
  607. package/types/services/vcs.d.ts +14 -31
@@ -14,8 +14,6 @@ export class Users {
14
14
  }
15
15
 
16
16
  /**
17
- * List users
18
- *
19
17
  * Get a list of all the project's users. You can use the query params to filter your results.
20
18
  *
21
19
  * @param {string[]} queries
@@ -23,7 +21,7 @@ export class Users {
23
21
  * @throws {AppwriteException}
24
22
  * @returns {Promise<Models.UserList<Preferences>>}
25
23
  */
26
- async list<Preferences extends Models.Preferences>(queries?: string[], search?: string): Promise<Models.UserList<Preferences>> {
24
+ list<Preferences extends Models.Preferences>(queries?: string[], search?: string): Promise<Models.UserList<Preferences>> {
27
25
  const apiPath = '/users';
28
26
  const payload: Payload = {};
29
27
  if (typeof queries !== 'undefined') {
@@ -35,13 +33,9 @@ export class Users {
35
33
  const uri = new URL(this.client.config.endpoint + apiPath);
36
34
 
37
35
  const apiHeaders: { [header: string]: string } = {
38
- 'content-type': 'application/json',
39
36
  }
40
37
 
41
- payload['project'] = this.client.config.project;
42
-
43
-
44
- return await this.client.call(
38
+ return this.client.call(
45
39
  'get',
46
40
  uri,
47
41
  apiHeaders,
@@ -49,8 +43,6 @@ export class Users {
49
43
  );
50
44
  }
51
45
  /**
52
- * Create user
53
- *
54
46
  * Create a new user.
55
47
  *
56
48
  * @param {string} userId
@@ -61,7 +53,7 @@ export class Users {
61
53
  * @throws {AppwriteException}
62
54
  * @returns {Promise<Models.User<Preferences>>}
63
55
  */
64
- async create<Preferences extends Models.Preferences>(userId: string, email?: string, phone?: string, password?: string, name?: string): Promise<Models.User<Preferences>> {
56
+ create<Preferences extends Models.Preferences>(userId: string, email?: string, phone?: string, password?: string, name?: string): Promise<Models.User<Preferences>> {
65
57
  if (typeof userId === 'undefined') {
66
58
  throw new AppwriteException('Missing required parameter: "userId"');
67
59
  }
@@ -88,10 +80,7 @@ export class Users {
88
80
  'content-type': 'application/json',
89
81
  }
90
82
 
91
- payload['project'] = this.client.config.project;
92
-
93
-
94
- return await this.client.call(
83
+ return this.client.call(
95
84
  'post',
96
85
  uri,
97
86
  apiHeaders,
@@ -99,8 +88,6 @@ export class Users {
99
88
  );
100
89
  }
101
90
  /**
102
- * Create user with Argon2 password
103
- *
104
91
  * Create a new user. Password provided must be hashed with the [Argon2](https://en.wikipedia.org/wiki/Argon2) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password.
105
92
  *
106
93
  * @param {string} userId
@@ -110,7 +97,7 @@ export class Users {
110
97
  * @throws {AppwriteException}
111
98
  * @returns {Promise<Models.User<Preferences>>}
112
99
  */
113
- async createArgon2User<Preferences extends Models.Preferences>(userId: string, email: string, password: string, name?: string): Promise<Models.User<Preferences>> {
100
+ createArgon2User<Preferences extends Models.Preferences>(userId: string, email: string, password: string, name?: string): Promise<Models.User<Preferences>> {
114
101
  if (typeof userId === 'undefined') {
115
102
  throw new AppwriteException('Missing required parameter: "userId"');
116
103
  }
@@ -140,10 +127,7 @@ export class Users {
140
127
  'content-type': 'application/json',
141
128
  }
142
129
 
143
- payload['project'] = this.client.config.project;
144
-
145
-
146
- return await this.client.call(
130
+ return this.client.call(
147
131
  'post',
148
132
  uri,
149
133
  apiHeaders,
@@ -151,8 +135,6 @@ export class Users {
151
135
  );
152
136
  }
153
137
  /**
154
- * Create user with bcrypt password
155
- *
156
138
  * Create a new user. Password provided must be hashed with the [Bcrypt](https://en.wikipedia.org/wiki/Bcrypt) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password.
157
139
  *
158
140
  * @param {string} userId
@@ -162,7 +144,7 @@ export class Users {
162
144
  * @throws {AppwriteException}
163
145
  * @returns {Promise<Models.User<Preferences>>}
164
146
  */
165
- async createBcryptUser<Preferences extends Models.Preferences>(userId: string, email: string, password: string, name?: string): Promise<Models.User<Preferences>> {
147
+ createBcryptUser<Preferences extends Models.Preferences>(userId: string, email: string, password: string, name?: string): Promise<Models.User<Preferences>> {
166
148
  if (typeof userId === 'undefined') {
167
149
  throw new AppwriteException('Missing required parameter: "userId"');
168
150
  }
@@ -192,10 +174,7 @@ export class Users {
192
174
  'content-type': 'application/json',
193
175
  }
194
176
 
195
- payload['project'] = this.client.config.project;
196
-
197
-
198
- return await this.client.call(
177
+ return this.client.call(
199
178
  'post',
200
179
  uri,
201
180
  apiHeaders,
@@ -203,8 +182,6 @@ export class Users {
203
182
  );
204
183
  }
205
184
  /**
206
- * List identities
207
- *
208
185
  * Get identities for all users.
209
186
  *
210
187
  * @param {string[]} queries
@@ -212,7 +189,7 @@ export class Users {
212
189
  * @throws {AppwriteException}
213
190
  * @returns {Promise<Models.IdentityList>}
214
191
  */
215
- async listIdentities(queries?: string[], search?: string): Promise<Models.IdentityList> {
192
+ listIdentities(queries?: string[], search?: string): Promise<Models.IdentityList> {
216
193
  const apiPath = '/users/identities';
217
194
  const payload: Payload = {};
218
195
  if (typeof queries !== 'undefined') {
@@ -224,13 +201,9 @@ export class Users {
224
201
  const uri = new URL(this.client.config.endpoint + apiPath);
225
202
 
226
203
  const apiHeaders: { [header: string]: string } = {
227
- 'content-type': 'application/json',
228
204
  }
229
205
 
230
- payload['project'] = this.client.config.project;
231
-
232
-
233
- return await this.client.call(
206
+ return this.client.call(
234
207
  'get',
235
208
  uri,
236
209
  apiHeaders,
@@ -238,15 +211,13 @@ export class Users {
238
211
  );
239
212
  }
240
213
  /**
241
- * Delete identity
242
- *
243
214
  * Delete an identity by its unique ID.
244
215
  *
245
216
  * @param {string} identityId
246
217
  * @throws {AppwriteException}
247
218
  * @returns {Promise<{}>}
248
219
  */
249
- async deleteIdentity(identityId: string): Promise<{}> {
220
+ deleteIdentity(identityId: string): Promise<{}> {
250
221
  if (typeof identityId === 'undefined') {
251
222
  throw new AppwriteException('Missing required parameter: "identityId"');
252
223
  }
@@ -258,10 +229,7 @@ export class Users {
258
229
  'content-type': 'application/json',
259
230
  }
260
231
 
261
- payload['project'] = this.client.config.project;
262
-
263
-
264
- return await this.client.call(
232
+ return this.client.call(
265
233
  'delete',
266
234
  uri,
267
235
  apiHeaders,
@@ -269,8 +237,6 @@ export class Users {
269
237
  );
270
238
  }
271
239
  /**
272
- * Create user with MD5 password
273
- *
274
240
  * Create a new user. Password provided must be hashed with the [MD5](https://en.wikipedia.org/wiki/MD5) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password.
275
241
  *
276
242
  * @param {string} userId
@@ -280,7 +246,7 @@ export class Users {
280
246
  * @throws {AppwriteException}
281
247
  * @returns {Promise<Models.User<Preferences>>}
282
248
  */
283
- async createMD5User<Preferences extends Models.Preferences>(userId: string, email: string, password: string, name?: string): Promise<Models.User<Preferences>> {
249
+ createMD5User<Preferences extends Models.Preferences>(userId: string, email: string, password: string, name?: string): Promise<Models.User<Preferences>> {
284
250
  if (typeof userId === 'undefined') {
285
251
  throw new AppwriteException('Missing required parameter: "userId"');
286
252
  }
@@ -310,10 +276,7 @@ export class Users {
310
276
  'content-type': 'application/json',
311
277
  }
312
278
 
313
- payload['project'] = this.client.config.project;
314
-
315
-
316
- return await this.client.call(
279
+ return this.client.call(
317
280
  'post',
318
281
  uri,
319
282
  apiHeaders,
@@ -321,8 +284,6 @@ export class Users {
321
284
  );
322
285
  }
323
286
  /**
324
- * Create user with PHPass password
325
- *
326
287
  * Create a new user. Password provided must be hashed with the [PHPass](https://www.openwall.com/phpass/) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password.
327
288
  *
328
289
  * @param {string} userId
@@ -332,7 +293,7 @@ export class Users {
332
293
  * @throws {AppwriteException}
333
294
  * @returns {Promise<Models.User<Preferences>>}
334
295
  */
335
- async createPHPassUser<Preferences extends Models.Preferences>(userId: string, email: string, password: string, name?: string): Promise<Models.User<Preferences>> {
296
+ createPHPassUser<Preferences extends Models.Preferences>(userId: string, email: string, password: string, name?: string): Promise<Models.User<Preferences>> {
336
297
  if (typeof userId === 'undefined') {
337
298
  throw new AppwriteException('Missing required parameter: "userId"');
338
299
  }
@@ -362,10 +323,7 @@ export class Users {
362
323
  'content-type': 'application/json',
363
324
  }
364
325
 
365
- payload['project'] = this.client.config.project;
366
-
367
-
368
- return await this.client.call(
326
+ return this.client.call(
369
327
  'post',
370
328
  uri,
371
329
  apiHeaders,
@@ -373,8 +331,6 @@ export class Users {
373
331
  );
374
332
  }
375
333
  /**
376
- * Create user with Scrypt password
377
- *
378
334
  * Create a new user. Password provided must be hashed with the [Scrypt](https://github.com/Tarsnap/scrypt) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password.
379
335
  *
380
336
  * @param {string} userId
@@ -389,7 +345,7 @@ export class Users {
389
345
  * @throws {AppwriteException}
390
346
  * @returns {Promise<Models.User<Preferences>>}
391
347
  */
392
- async createScryptUser<Preferences extends Models.Preferences>(userId: string, email: string, password: string, passwordSalt: string, passwordCpu: number, passwordMemory: number, passwordParallel: number, passwordLength: number, name?: string): Promise<Models.User<Preferences>> {
348
+ createScryptUser<Preferences extends Models.Preferences>(userId: string, email: string, password: string, passwordSalt: string, passwordCpu: number, passwordMemory: number, passwordParallel: number, passwordLength: number, name?: string): Promise<Models.User<Preferences>> {
393
349
  if (typeof userId === 'undefined') {
394
350
  throw new AppwriteException('Missing required parameter: "userId"');
395
351
  }
@@ -449,10 +405,7 @@ export class Users {
449
405
  'content-type': 'application/json',
450
406
  }
451
407
 
452
- payload['project'] = this.client.config.project;
453
-
454
-
455
- return await this.client.call(
408
+ return this.client.call(
456
409
  'post',
457
410
  uri,
458
411
  apiHeaders,
@@ -460,8 +413,6 @@ export class Users {
460
413
  );
461
414
  }
462
415
  /**
463
- * Create user with Scrypt modified password
464
- *
465
416
  * Create a new user. Password provided must be hashed with the [Scrypt Modified](https://gist.github.com/Meldiron/eecf84a0225eccb5a378d45bb27462cc) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password.
466
417
  *
467
418
  * @param {string} userId
@@ -474,7 +425,7 @@ export class Users {
474
425
  * @throws {AppwriteException}
475
426
  * @returns {Promise<Models.User<Preferences>>}
476
427
  */
477
- async createScryptModifiedUser<Preferences extends Models.Preferences>(userId: string, email: string, password: string, passwordSalt: string, passwordSaltSeparator: string, passwordSignerKey: string, name?: string): Promise<Models.User<Preferences>> {
428
+ createScryptModifiedUser<Preferences extends Models.Preferences>(userId: string, email: string, password: string, passwordSalt: string, passwordSaltSeparator: string, passwordSignerKey: string, name?: string): Promise<Models.User<Preferences>> {
478
429
  if (typeof userId === 'undefined') {
479
430
  throw new AppwriteException('Missing required parameter: "userId"');
480
431
  }
@@ -522,10 +473,7 @@ export class Users {
522
473
  'content-type': 'application/json',
523
474
  }
524
475
 
525
- payload['project'] = this.client.config.project;
526
-
527
-
528
- return await this.client.call(
476
+ return this.client.call(
529
477
  'post',
530
478
  uri,
531
479
  apiHeaders,
@@ -533,8 +481,6 @@ export class Users {
533
481
  );
534
482
  }
535
483
  /**
536
- * Create user with SHA password
537
- *
538
484
  * Create a new user. Password provided must be hashed with the [SHA](https://en.wikipedia.org/wiki/Secure_Hash_Algorithm) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password.
539
485
  *
540
486
  * @param {string} userId
@@ -545,7 +491,7 @@ export class Users {
545
491
  * @throws {AppwriteException}
546
492
  * @returns {Promise<Models.User<Preferences>>}
547
493
  */
548
- async createSHAUser<Preferences extends Models.Preferences>(userId: string, email: string, password: string, passwordVersion?: PasswordHash, name?: string): Promise<Models.User<Preferences>> {
494
+ createSHAUser<Preferences extends Models.Preferences>(userId: string, email: string, password: string, passwordVersion?: PasswordHash, name?: string): Promise<Models.User<Preferences>> {
549
495
  if (typeof userId === 'undefined') {
550
496
  throw new AppwriteException('Missing required parameter: "userId"');
551
497
  }
@@ -578,10 +524,7 @@ export class Users {
578
524
  'content-type': 'application/json',
579
525
  }
580
526
 
581
- payload['project'] = this.client.config.project;
582
-
583
-
584
- return await this.client.call(
527
+ return this.client.call(
585
528
  'post',
586
529
  uri,
587
530
  apiHeaders,
@@ -589,8 +532,6 @@ export class Users {
589
532
  );
590
533
  }
591
534
  /**
592
- * Get users usage stats
593
- *
594
535
  * Get usage metrics and statistics for all users in the project. You can view the total number of users and sessions. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.
595
536
 
596
537
  *
@@ -598,7 +539,7 @@ export class Users {
598
539
  * @throws {AppwriteException}
599
540
  * @returns {Promise<Models.UsageUsers>}
600
541
  */
601
- async getUsage(range?: UserUsageRange): Promise<Models.UsageUsers> {
542
+ getUsage(range?: UserUsageRange): Promise<Models.UsageUsers> {
602
543
  const apiPath = '/users/usage';
603
544
  const payload: Payload = {};
604
545
  if (typeof range !== 'undefined') {
@@ -607,13 +548,9 @@ export class Users {
607
548
  const uri = new URL(this.client.config.endpoint + apiPath);
608
549
 
609
550
  const apiHeaders: { [header: string]: string } = {
610
- 'content-type': 'application/json',
611
551
  }
612
552
 
613
- payload['project'] = this.client.config.project;
614
-
615
-
616
- return await this.client.call(
553
+ return this.client.call(
617
554
  'get',
618
555
  uri,
619
556
  apiHeaders,
@@ -621,15 +558,13 @@ export class Users {
621
558
  );
622
559
  }
623
560
  /**
624
- * Get user
625
- *
626
561
  * Get a user by its unique ID.
627
562
  *
628
563
  * @param {string} userId
629
564
  * @throws {AppwriteException}
630
565
  * @returns {Promise<Models.User<Preferences>>}
631
566
  */
632
- async get<Preferences extends Models.Preferences>(userId: string): Promise<Models.User<Preferences>> {
567
+ get<Preferences extends Models.Preferences>(userId: string): Promise<Models.User<Preferences>> {
633
568
  if (typeof userId === 'undefined') {
634
569
  throw new AppwriteException('Missing required parameter: "userId"');
635
570
  }
@@ -638,13 +573,9 @@ export class Users {
638
573
  const uri = new URL(this.client.config.endpoint + apiPath);
639
574
 
640
575
  const apiHeaders: { [header: string]: string } = {
641
- 'content-type': 'application/json',
642
576
  }
643
577
 
644
- payload['project'] = this.client.config.project;
645
-
646
-
647
- return await this.client.call(
578
+ return this.client.call(
648
579
  'get',
649
580
  uri,
650
581
  apiHeaders,
@@ -652,15 +583,13 @@ export class Users {
652
583
  );
653
584
  }
654
585
  /**
655
- * Delete user
656
- *
657
586
  * Delete a user by its unique ID, thereby releasing it&#039;s ID. Since ID is released and can be reused, all user-related resources like documents or storage files should be deleted before user deletion. If you want to keep ID reserved, use the [updateStatus](https://appwrite.io/docs/server/users#usersUpdateStatus) endpoint instead.
658
587
  *
659
588
  * @param {string} userId
660
589
  * @throws {AppwriteException}
661
590
  * @returns {Promise<{}>}
662
591
  */
663
- async delete(userId: string): Promise<{}> {
592
+ delete(userId: string): Promise<{}> {
664
593
  if (typeof userId === 'undefined') {
665
594
  throw new AppwriteException('Missing required parameter: "userId"');
666
595
  }
@@ -672,10 +601,7 @@ export class Users {
672
601
  'content-type': 'application/json',
673
602
  }
674
603
 
675
- payload['project'] = this.client.config.project;
676
-
677
-
678
- return await this.client.call(
604
+ return this.client.call(
679
605
  'delete',
680
606
  uri,
681
607
  apiHeaders,
@@ -683,8 +609,6 @@ export class Users {
683
609
  );
684
610
  }
685
611
  /**
686
- * Update email
687
- *
688
612
  * Update the user email by its unique ID.
689
613
  *
690
614
  * @param {string} userId
@@ -692,7 +616,7 @@ export class Users {
692
616
  * @throws {AppwriteException}
693
617
  * @returns {Promise<Models.User<Preferences>>}
694
618
  */
695
- async updateEmail<Preferences extends Models.Preferences>(userId: string, email: string): Promise<Models.User<Preferences>> {
619
+ updateEmail<Preferences extends Models.Preferences>(userId: string, email: string): Promise<Models.User<Preferences>> {
696
620
  if (typeof userId === 'undefined') {
697
621
  throw new AppwriteException('Missing required parameter: "userId"');
698
622
  }
@@ -710,10 +634,7 @@ export class Users {
710
634
  'content-type': 'application/json',
711
635
  }
712
636
 
713
- payload['project'] = this.client.config.project;
714
-
715
-
716
- return await this.client.call(
637
+ return this.client.call(
717
638
  'patch',
718
639
  uri,
719
640
  apiHeaders,
@@ -721,8 +642,6 @@ export class Users {
721
642
  );
722
643
  }
723
644
  /**
724
- * Create user JWT
725
- *
726
645
  * Use this endpoint to create a JSON Web Token for user by its unique ID. You can use the resulting JWT to authenticate on behalf of the user. The JWT secret will become invalid if the session it uses gets deleted.
727
646
  *
728
647
  * @param {string} userId
@@ -731,7 +650,7 @@ export class Users {
731
650
  * @throws {AppwriteException}
732
651
  * @returns {Promise<Models.Jwt>}
733
652
  */
734
- async createJWT(userId: string, sessionId?: string, duration?: number): Promise<Models.Jwt> {
653
+ createJWT(userId: string, sessionId?: string, duration?: number): Promise<Models.Jwt> {
735
654
  if (typeof userId === 'undefined') {
736
655
  throw new AppwriteException('Missing required parameter: "userId"');
737
656
  }
@@ -749,10 +668,7 @@ export class Users {
749
668
  'content-type': 'application/json',
750
669
  }
751
670
 
752
- payload['project'] = this.client.config.project;
753
-
754
-
755
- return await this.client.call(
671
+ return this.client.call(
756
672
  'post',
757
673
  uri,
758
674
  apiHeaders,
@@ -760,8 +676,6 @@ export class Users {
760
676
  );
761
677
  }
762
678
  /**
763
- * Update user labels
764
- *
765
679
  * Update the user labels by its unique ID.
766
680
 
767
681
  Labels can be used to grant access to resources. While teams are a way for user&#039;s to share access to a resource, labels can be defined by the developer to grant access without an invitation. See the [Permissions docs](https://appwrite.io/docs/permissions) for more info.
@@ -771,7 +685,7 @@ Labels can be used to grant access to resources. While teams are a way for user&
771
685
  * @throws {AppwriteException}
772
686
  * @returns {Promise<Models.User<Preferences>>}
773
687
  */
774
- async updateLabels<Preferences extends Models.Preferences>(userId: string, labels: string[]): Promise<Models.User<Preferences>> {
688
+ updateLabels<Preferences extends Models.Preferences>(userId: string, labels: string[]): Promise<Models.User<Preferences>> {
775
689
  if (typeof userId === 'undefined') {
776
690
  throw new AppwriteException('Missing required parameter: "userId"');
777
691
  }
@@ -789,10 +703,7 @@ Labels can be used to grant access to resources. While teams are a way for user&
789
703
  'content-type': 'application/json',
790
704
  }
791
705
 
792
- payload['project'] = this.client.config.project;
793
-
794
-
795
- return await this.client.call(
706
+ return this.client.call(
796
707
  'put',
797
708
  uri,
798
709
  apiHeaders,
@@ -800,8 +711,6 @@ Labels can be used to grant access to resources. While teams are a way for user&
800
711
  );
801
712
  }
802
713
  /**
803
- * List user logs
804
- *
805
714
  * Get the user activity logs list by its unique ID.
806
715
  *
807
716
  * @param {string} userId
@@ -809,7 +718,7 @@ Labels can be used to grant access to resources. While teams are a way for user&
809
718
  * @throws {AppwriteException}
810
719
  * @returns {Promise<Models.LogList>}
811
720
  */
812
- async listLogs(userId: string, queries?: string[]): Promise<Models.LogList> {
721
+ listLogs(userId: string, queries?: string[]): Promise<Models.LogList> {
813
722
  if (typeof userId === 'undefined') {
814
723
  throw new AppwriteException('Missing required parameter: "userId"');
815
724
  }
@@ -821,13 +730,9 @@ Labels can be used to grant access to resources. While teams are a way for user&
821
730
  const uri = new URL(this.client.config.endpoint + apiPath);
822
731
 
823
732
  const apiHeaders: { [header: string]: string } = {
824
- 'content-type': 'application/json',
825
733
  }
826
734
 
827
- payload['project'] = this.client.config.project;
828
-
829
-
830
- return await this.client.call(
735
+ return this.client.call(
831
736
  'get',
832
737
  uri,
833
738
  apiHeaders,
@@ -835,30 +740,32 @@ Labels can be used to grant access to resources. While teams are a way for user&
835
740
  );
836
741
  }
837
742
  /**
838
- * List user memberships
839
- *
840
743
  * Get the user membership list by its unique ID.
841
744
  *
842
745
  * @param {string} userId
746
+ * @param {string[]} queries
747
+ * @param {string} search
843
748
  * @throws {AppwriteException}
844
749
  * @returns {Promise<Models.MembershipList>}
845
750
  */
846
- async listMemberships(userId: string): Promise<Models.MembershipList> {
751
+ listMemberships(userId: string, queries?: string[], search?: string): Promise<Models.MembershipList> {
847
752
  if (typeof userId === 'undefined') {
848
753
  throw new AppwriteException('Missing required parameter: "userId"');
849
754
  }
850
755
  const apiPath = '/users/{userId}/memberships'.replace('{userId}', userId);
851
756
  const payload: Payload = {};
757
+ if (typeof queries !== 'undefined') {
758
+ payload['queries'] = queries;
759
+ }
760
+ if (typeof search !== 'undefined') {
761
+ payload['search'] = search;
762
+ }
852
763
  const uri = new URL(this.client.config.endpoint + apiPath);
853
764
 
854
765
  const apiHeaders: { [header: string]: string } = {
855
- 'content-type': 'application/json',
856
766
  }
857
767
 
858
- payload['project'] = this.client.config.project;
859
-
860
-
861
- return await this.client.call(
768
+ return this.client.call(
862
769
  'get',
863
770
  uri,
864
771
  apiHeaders,
@@ -866,8 +773,6 @@ Labels can be used to grant access to resources. While teams are a way for user&
866
773
  );
867
774
  }
868
775
  /**
869
- * Update MFA
870
- *
871
776
  * Enable or disable MFA on a user account.
872
777
  *
873
778
  * @param {string} userId
@@ -875,7 +780,7 @@ Labels can be used to grant access to resources. While teams are a way for user&
875
780
  * @throws {AppwriteException}
876
781
  * @returns {Promise<Models.User<Preferences>>}
877
782
  */
878
- async updateMfa<Preferences extends Models.Preferences>(userId: string, mfa: boolean): Promise<Models.User<Preferences>> {
783
+ updateMfa<Preferences extends Models.Preferences>(userId: string, mfa: boolean): Promise<Models.User<Preferences>> {
879
784
  if (typeof userId === 'undefined') {
880
785
  throw new AppwriteException('Missing required parameter: "userId"');
881
786
  }
@@ -893,10 +798,7 @@ Labels can be used to grant access to resources. While teams are a way for user&
893
798
  'content-type': 'application/json',
894
799
  }
895
800
 
896
- payload['project'] = this.client.config.project;
897
-
898
-
899
- return await this.client.call(
801
+ return this.client.call(
900
802
  'patch',
901
803
  uri,
902
804
  apiHeaders,
@@ -904,8 +806,6 @@ Labels can be used to grant access to resources. While teams are a way for user&
904
806
  );
905
807
  }
906
808
  /**
907
- * Delete authenticator
908
- *
909
809
  * Delete an authenticator app.
910
810
  *
911
811
  * @param {string} userId
@@ -913,7 +813,7 @@ Labels can be used to grant access to resources. While teams are a way for user&
913
813
  * @throws {AppwriteException}
914
814
  * @returns {Promise<{}>}
915
815
  */
916
- async deleteMfaAuthenticator(userId: string, type: AuthenticatorType): Promise<{}> {
816
+ deleteMfaAuthenticator(userId: string, type: AuthenticatorType): Promise<{}> {
917
817
  if (typeof userId === 'undefined') {
918
818
  throw new AppwriteException('Missing required parameter: "userId"');
919
819
  }
@@ -928,10 +828,7 @@ Labels can be used to grant access to resources. While teams are a way for user&
928
828
  'content-type': 'application/json',
929
829
  }
930
830
 
931
- payload['project'] = this.client.config.project;
932
-
933
-
934
- return await this.client.call(
831
+ return this.client.call(
935
832
  'delete',
936
833
  uri,
937
834
  apiHeaders,
@@ -939,15 +836,13 @@ Labels can be used to grant access to resources. While teams are a way for user&
939
836
  );
940
837
  }
941
838
  /**
942
- * List factors
943
- *
944
839
  * List the factors available on the account to be used as a MFA challange.
945
840
  *
946
841
  * @param {string} userId
947
842
  * @throws {AppwriteException}
948
843
  * @returns {Promise<Models.MfaFactors>}
949
844
  */
950
- async listMfaFactors(userId: string): Promise<Models.MfaFactors> {
845
+ listMfaFactors(userId: string): Promise<Models.MfaFactors> {
951
846
  if (typeof userId === 'undefined') {
952
847
  throw new AppwriteException('Missing required parameter: "userId"');
953
848
  }
@@ -956,13 +851,9 @@ Labels can be used to grant access to resources. While teams are a way for user&
956
851
  const uri = new URL(this.client.config.endpoint + apiPath);
957
852
 
958
853
  const apiHeaders: { [header: string]: string } = {
959
- 'content-type': 'application/json',
960
854
  }
961
855
 
962
- payload['project'] = this.client.config.project;
963
-
964
-
965
- return await this.client.call(
856
+ return this.client.call(
966
857
  'get',
967
858
  uri,
968
859
  apiHeaders,
@@ -970,15 +861,13 @@ Labels can be used to grant access to resources. While teams are a way for user&
970
861
  );
971
862
  }
972
863
  /**
973
- * Get MFA recovery codes
974
- *
975
864
  * Get recovery codes that can be used as backup for MFA flow by User ID. Before getting codes, they must be generated using [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes) method.
976
865
  *
977
866
  * @param {string} userId
978
867
  * @throws {AppwriteException}
979
868
  * @returns {Promise<Models.MfaRecoveryCodes>}
980
869
  */
981
- async getMfaRecoveryCodes(userId: string): Promise<Models.MfaRecoveryCodes> {
870
+ getMfaRecoveryCodes(userId: string): Promise<Models.MfaRecoveryCodes> {
982
871
  if (typeof userId === 'undefined') {
983
872
  throw new AppwriteException('Missing required parameter: "userId"');
984
873
  }
@@ -987,13 +876,9 @@ Labels can be used to grant access to resources. While teams are a way for user&
987
876
  const uri = new URL(this.client.config.endpoint + apiPath);
988
877
 
989
878
  const apiHeaders: { [header: string]: string } = {
990
- 'content-type': 'application/json',
991
879
  }
992
880
 
993
- payload['project'] = this.client.config.project;
994
-
995
-
996
- return await this.client.call(
881
+ return this.client.call(
997
882
  'get',
998
883
  uri,
999
884
  apiHeaders,
@@ -1001,15 +886,13 @@ Labels can be used to grant access to resources. While teams are a way for user&
1001
886
  );
1002
887
  }
1003
888
  /**
1004
- * Regenerate MFA recovery codes
1005
- *
1006
889
  * Regenerate recovery codes that can be used as backup for MFA flow by User ID. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes) method.
1007
890
  *
1008
891
  * @param {string} userId
1009
892
  * @throws {AppwriteException}
1010
893
  * @returns {Promise<Models.MfaRecoveryCodes>}
1011
894
  */
1012
- async updateMfaRecoveryCodes(userId: string): Promise<Models.MfaRecoveryCodes> {
895
+ updateMfaRecoveryCodes(userId: string): Promise<Models.MfaRecoveryCodes> {
1013
896
  if (typeof userId === 'undefined') {
1014
897
  throw new AppwriteException('Missing required parameter: "userId"');
1015
898
  }
@@ -1021,10 +904,7 @@ Labels can be used to grant access to resources. While teams are a way for user&
1021
904
  'content-type': 'application/json',
1022
905
  }
1023
906
 
1024
- payload['project'] = this.client.config.project;
1025
-
1026
-
1027
- return await this.client.call(
907
+ return this.client.call(
1028
908
  'put',
1029
909
  uri,
1030
910
  apiHeaders,
@@ -1032,15 +912,13 @@ Labels can be used to grant access to resources. While teams are a way for user&
1032
912
  );
1033
913
  }
1034
914
  /**
1035
- * Create MFA recovery codes
1036
- *
1037
915
  * Generate recovery codes used as backup for MFA flow for User ID. Recovery codes can be used as a MFA verification type in [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge) method by client SDK.
1038
916
  *
1039
917
  * @param {string} userId
1040
918
  * @throws {AppwriteException}
1041
919
  * @returns {Promise<Models.MfaRecoveryCodes>}
1042
920
  */
1043
- async createMfaRecoveryCodes(userId: string): Promise<Models.MfaRecoveryCodes> {
921
+ createMfaRecoveryCodes(userId: string): Promise<Models.MfaRecoveryCodes> {
1044
922
  if (typeof userId === 'undefined') {
1045
923
  throw new AppwriteException('Missing required parameter: "userId"');
1046
924
  }
@@ -1052,10 +930,7 @@ Labels can be used to grant access to resources. While teams are a way for user&
1052
930
  'content-type': 'application/json',
1053
931
  }
1054
932
 
1055
- payload['project'] = this.client.config.project;
1056
-
1057
-
1058
- return await this.client.call(
933
+ return this.client.call(
1059
934
  'patch',
1060
935
  uri,
1061
936
  apiHeaders,
@@ -1063,8 +938,6 @@ Labels can be used to grant access to resources. While teams are a way for user&
1063
938
  );
1064
939
  }
1065
940
  /**
1066
- * Update name
1067
- *
1068
941
  * Update the user name by its unique ID.
1069
942
  *
1070
943
  * @param {string} userId
@@ -1072,7 +945,7 @@ Labels can be used to grant access to resources. While teams are a way for user&
1072
945
  * @throws {AppwriteException}
1073
946
  * @returns {Promise<Models.User<Preferences>>}
1074
947
  */
1075
- async updateName<Preferences extends Models.Preferences>(userId: string, name: string): Promise<Models.User<Preferences>> {
948
+ updateName<Preferences extends Models.Preferences>(userId: string, name: string): Promise<Models.User<Preferences>> {
1076
949
  if (typeof userId === 'undefined') {
1077
950
  throw new AppwriteException('Missing required parameter: "userId"');
1078
951
  }
@@ -1090,10 +963,7 @@ Labels can be used to grant access to resources. While teams are a way for user&
1090
963
  'content-type': 'application/json',
1091
964
  }
1092
965
 
1093
- payload['project'] = this.client.config.project;
1094
-
1095
-
1096
- return await this.client.call(
966
+ return this.client.call(
1097
967
  'patch',
1098
968
  uri,
1099
969
  apiHeaders,
@@ -1101,8 +971,6 @@ Labels can be used to grant access to resources. While teams are a way for user&
1101
971
  );
1102
972
  }
1103
973
  /**
1104
- * Update password
1105
- *
1106
974
  * Update the user password by its unique ID.
1107
975
  *
1108
976
  * @param {string} userId
@@ -1110,7 +978,7 @@ Labels can be used to grant access to resources. While teams are a way for user&
1110
978
  * @throws {AppwriteException}
1111
979
  * @returns {Promise<Models.User<Preferences>>}
1112
980
  */
1113
- async updatePassword<Preferences extends Models.Preferences>(userId: string, password: string): Promise<Models.User<Preferences>> {
981
+ updatePassword<Preferences extends Models.Preferences>(userId: string, password: string): Promise<Models.User<Preferences>> {
1114
982
  if (typeof userId === 'undefined') {
1115
983
  throw new AppwriteException('Missing required parameter: "userId"');
1116
984
  }
@@ -1128,10 +996,7 @@ Labels can be used to grant access to resources. While teams are a way for user&
1128
996
  'content-type': 'application/json',
1129
997
  }
1130
998
 
1131
- payload['project'] = this.client.config.project;
1132
-
1133
-
1134
- return await this.client.call(
999
+ return this.client.call(
1135
1000
  'patch',
1136
1001
  uri,
1137
1002
  apiHeaders,
@@ -1139,8 +1004,6 @@ Labels can be used to grant access to resources. While teams are a way for user&
1139
1004
  );
1140
1005
  }
1141
1006
  /**
1142
- * Update phone
1143
- *
1144
1007
  * Update the user phone by its unique ID.
1145
1008
  *
1146
1009
  * @param {string} userId
@@ -1148,7 +1011,7 @@ Labels can be used to grant access to resources. While teams are a way for user&
1148
1011
  * @throws {AppwriteException}
1149
1012
  * @returns {Promise<Models.User<Preferences>>}
1150
1013
  */
1151
- async updatePhone<Preferences extends Models.Preferences>(userId: string, number: string): Promise<Models.User<Preferences>> {
1014
+ updatePhone<Preferences extends Models.Preferences>(userId: string, number: string): Promise<Models.User<Preferences>> {
1152
1015
  if (typeof userId === 'undefined') {
1153
1016
  throw new AppwriteException('Missing required parameter: "userId"');
1154
1017
  }
@@ -1166,10 +1029,7 @@ Labels can be used to grant access to resources. While teams are a way for user&
1166
1029
  'content-type': 'application/json',
1167
1030
  }
1168
1031
 
1169
- payload['project'] = this.client.config.project;
1170
-
1171
-
1172
- return await this.client.call(
1032
+ return this.client.call(
1173
1033
  'patch',
1174
1034
  uri,
1175
1035
  apiHeaders,
@@ -1177,15 +1037,13 @@ Labels can be used to grant access to resources. While teams are a way for user&
1177
1037
  );
1178
1038
  }
1179
1039
  /**
1180
- * Get user preferences
1181
- *
1182
1040
  * Get the user preferences by its unique ID.
1183
1041
  *
1184
1042
  * @param {string} userId
1185
1043
  * @throws {AppwriteException}
1186
1044
  * @returns {Promise<Preferences>}
1187
1045
  */
1188
- async getPrefs<Preferences extends Models.Preferences>(userId: string): Promise<Preferences> {
1046
+ getPrefs<Preferences extends Models.Preferences>(userId: string): Promise<Preferences> {
1189
1047
  if (typeof userId === 'undefined') {
1190
1048
  throw new AppwriteException('Missing required parameter: "userId"');
1191
1049
  }
@@ -1194,13 +1052,9 @@ Labels can be used to grant access to resources. While teams are a way for user&
1194
1052
  const uri = new URL(this.client.config.endpoint + apiPath);
1195
1053
 
1196
1054
  const apiHeaders: { [header: string]: string } = {
1197
- 'content-type': 'application/json',
1198
1055
  }
1199
1056
 
1200
- payload['project'] = this.client.config.project;
1201
-
1202
-
1203
- return await this.client.call(
1057
+ return this.client.call(
1204
1058
  'get',
1205
1059
  uri,
1206
1060
  apiHeaders,
@@ -1208,8 +1062,6 @@ Labels can be used to grant access to resources. While teams are a way for user&
1208
1062
  );
1209
1063
  }
1210
1064
  /**
1211
- * Update user preferences
1212
- *
1213
1065
  * Update the user preferences by its unique ID. 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.
1214
1066
  *
1215
1067
  * @param {string} userId
@@ -1217,7 +1069,7 @@ Labels can be used to grant access to resources. While teams are a way for user&
1217
1069
  * @throws {AppwriteException}
1218
1070
  * @returns {Promise<Preferences>}
1219
1071
  */
1220
- async updatePrefs<Preferences extends Models.Preferences>(userId: string, prefs: object): Promise<Preferences> {
1072
+ updatePrefs<Preferences extends Models.Preferences>(userId: string, prefs: object): Promise<Preferences> {
1221
1073
  if (typeof userId === 'undefined') {
1222
1074
  throw new AppwriteException('Missing required parameter: "userId"');
1223
1075
  }
@@ -1235,10 +1087,7 @@ Labels can be used to grant access to resources. While teams are a way for user&
1235
1087
  'content-type': 'application/json',
1236
1088
  }
1237
1089
 
1238
- payload['project'] = this.client.config.project;
1239
-
1240
-
1241
- return await this.client.call(
1090
+ return this.client.call(
1242
1091
  'patch',
1243
1092
  uri,
1244
1093
  apiHeaders,
@@ -1246,15 +1095,13 @@ Labels can be used to grant access to resources. While teams are a way for user&
1246
1095
  );
1247
1096
  }
1248
1097
  /**
1249
- * List user sessions
1250
- *
1251
1098
  * Get the user sessions list by its unique ID.
1252
1099
  *
1253
1100
  * @param {string} userId
1254
1101
  * @throws {AppwriteException}
1255
1102
  * @returns {Promise<Models.SessionList>}
1256
1103
  */
1257
- async listSessions(userId: string): Promise<Models.SessionList> {
1104
+ listSessions(userId: string): Promise<Models.SessionList> {
1258
1105
  if (typeof userId === 'undefined') {
1259
1106
  throw new AppwriteException('Missing required parameter: "userId"');
1260
1107
  }
@@ -1263,13 +1110,9 @@ Labels can be used to grant access to resources. While teams are a way for user&
1263
1110
  const uri = new URL(this.client.config.endpoint + apiPath);
1264
1111
 
1265
1112
  const apiHeaders: { [header: string]: string } = {
1266
- 'content-type': 'application/json',
1267
1113
  }
1268
1114
 
1269
- payload['project'] = this.client.config.project;
1270
-
1271
-
1272
- return await this.client.call(
1115
+ return this.client.call(
1273
1116
  'get',
1274
1117
  uri,
1275
1118
  apiHeaders,
@@ -1277,8 +1120,6 @@ Labels can be used to grant access to resources. While teams are a way for user&
1277
1120
  );
1278
1121
  }
1279
1122
  /**
1280
- * Create session
1281
- *
1282
1123
  * Creates a session for a user. Returns an immediately usable session object.
1283
1124
 
1284
1125
  If you want to generate a token for a custom authentication flow, use the [POST /users/{userId}/tokens](https://appwrite.io/docs/server/users#createToken) endpoint.
@@ -1287,7 +1128,7 @@ If you want to generate a token for a custom authentication flow, use the [POST
1287
1128
  * @throws {AppwriteException}
1288
1129
  * @returns {Promise<Models.Session>}
1289
1130
  */
1290
- async createSession(userId: string): Promise<Models.Session> {
1131
+ createSession(userId: string): Promise<Models.Session> {
1291
1132
  if (typeof userId === 'undefined') {
1292
1133
  throw new AppwriteException('Missing required parameter: "userId"');
1293
1134
  }
@@ -1299,10 +1140,7 @@ If you want to generate a token for a custom authentication flow, use the [POST
1299
1140
  'content-type': 'application/json',
1300
1141
  }
1301
1142
 
1302
- payload['project'] = this.client.config.project;
1303
-
1304
-
1305
- return await this.client.call(
1143
+ return this.client.call(
1306
1144
  'post',
1307
1145
  uri,
1308
1146
  apiHeaders,
@@ -1310,15 +1148,13 @@ If you want to generate a token for a custom authentication flow, use the [POST
1310
1148
  );
1311
1149
  }
1312
1150
  /**
1313
- * Delete user sessions
1314
- *
1315
1151
  * Delete all user&#039;s sessions by using the user&#039;s unique ID.
1316
1152
  *
1317
1153
  * @param {string} userId
1318
1154
  * @throws {AppwriteException}
1319
1155
  * @returns {Promise<{}>}
1320
1156
  */
1321
- async deleteSessions(userId: string): Promise<{}> {
1157
+ deleteSessions(userId: string): Promise<{}> {
1322
1158
  if (typeof userId === 'undefined') {
1323
1159
  throw new AppwriteException('Missing required parameter: "userId"');
1324
1160
  }
@@ -1330,10 +1166,7 @@ If you want to generate a token for a custom authentication flow, use the [POST
1330
1166
  'content-type': 'application/json',
1331
1167
  }
1332
1168
 
1333
- payload['project'] = this.client.config.project;
1334
-
1335
-
1336
- return await this.client.call(
1169
+ return this.client.call(
1337
1170
  'delete',
1338
1171
  uri,
1339
1172
  apiHeaders,
@@ -1341,8 +1174,6 @@ If you want to generate a token for a custom authentication flow, use the [POST
1341
1174
  );
1342
1175
  }
1343
1176
  /**
1344
- * Delete user session
1345
- *
1346
1177
  * Delete a user sessions by its unique ID.
1347
1178
  *
1348
1179
  * @param {string} userId
@@ -1350,7 +1181,7 @@ If you want to generate a token for a custom authentication flow, use the [POST
1350
1181
  * @throws {AppwriteException}
1351
1182
  * @returns {Promise<{}>}
1352
1183
  */
1353
- async deleteSession(userId: string, sessionId: string): Promise<{}> {
1184
+ deleteSession(userId: string, sessionId: string): Promise<{}> {
1354
1185
  if (typeof userId === 'undefined') {
1355
1186
  throw new AppwriteException('Missing required parameter: "userId"');
1356
1187
  }
@@ -1365,10 +1196,7 @@ If you want to generate a token for a custom authentication flow, use the [POST
1365
1196
  'content-type': 'application/json',
1366
1197
  }
1367
1198
 
1368
- payload['project'] = this.client.config.project;
1369
-
1370
-
1371
- return await this.client.call(
1199
+ return this.client.call(
1372
1200
  'delete',
1373
1201
  uri,
1374
1202
  apiHeaders,
@@ -1376,8 +1204,6 @@ If you want to generate a token for a custom authentication flow, use the [POST
1376
1204
  );
1377
1205
  }
1378
1206
  /**
1379
- * Update user status
1380
- *
1381
1207
  * Update the user status by its unique ID. Use this endpoint as an alternative to deleting a user if you want to keep user&#039;s ID reserved.
1382
1208
  *
1383
1209
  * @param {string} userId
@@ -1385,7 +1211,7 @@ If you want to generate a token for a custom authentication flow, use the [POST
1385
1211
  * @throws {AppwriteException}
1386
1212
  * @returns {Promise<Models.User<Preferences>>}
1387
1213
  */
1388
- async updateStatus<Preferences extends Models.Preferences>(userId: string, status: boolean): Promise<Models.User<Preferences>> {
1214
+ updateStatus<Preferences extends Models.Preferences>(userId: string, status: boolean): Promise<Models.User<Preferences>> {
1389
1215
  if (typeof userId === 'undefined') {
1390
1216
  throw new AppwriteException('Missing required parameter: "userId"');
1391
1217
  }
@@ -1403,10 +1229,7 @@ If you want to generate a token for a custom authentication flow, use the [POST
1403
1229
  'content-type': 'application/json',
1404
1230
  }
1405
1231
 
1406
- payload['project'] = this.client.config.project;
1407
-
1408
-
1409
- return await this.client.call(
1232
+ return this.client.call(
1410
1233
  'patch',
1411
1234
  uri,
1412
1235
  apiHeaders,
@@ -1414,8 +1237,6 @@ If you want to generate a token for a custom authentication flow, use the [POST
1414
1237
  );
1415
1238
  }
1416
1239
  /**
1417
- * List user targets
1418
- *
1419
1240
  * List the messaging targets that are associated with a user.
1420
1241
  *
1421
1242
  * @param {string} userId
@@ -1423,7 +1244,7 @@ If you want to generate a token for a custom authentication flow, use the [POST
1423
1244
  * @throws {AppwriteException}
1424
1245
  * @returns {Promise<Models.TargetList>}
1425
1246
  */
1426
- async listTargets(userId: string, queries?: string[]): Promise<Models.TargetList> {
1247
+ listTargets(userId: string, queries?: string[]): Promise<Models.TargetList> {
1427
1248
  if (typeof userId === 'undefined') {
1428
1249
  throw new AppwriteException('Missing required parameter: "userId"');
1429
1250
  }
@@ -1435,13 +1256,9 @@ If you want to generate a token for a custom authentication flow, use the [POST
1435
1256
  const uri = new URL(this.client.config.endpoint + apiPath);
1436
1257
 
1437
1258
  const apiHeaders: { [header: string]: string } = {
1438
- 'content-type': 'application/json',
1439
1259
  }
1440
1260
 
1441
- payload['project'] = this.client.config.project;
1442
-
1443
-
1444
- return await this.client.call(
1261
+ return this.client.call(
1445
1262
  'get',
1446
1263
  uri,
1447
1264
  apiHeaders,
@@ -1449,8 +1266,6 @@ If you want to generate a token for a custom authentication flow, use the [POST
1449
1266
  );
1450
1267
  }
1451
1268
  /**
1452
- * Create user target
1453
- *
1454
1269
  * Create a messaging target.
1455
1270
  *
1456
1271
  * @param {string} userId
@@ -1462,7 +1277,7 @@ If you want to generate a token for a custom authentication flow, use the [POST
1462
1277
  * @throws {AppwriteException}
1463
1278
  * @returns {Promise<Models.Target>}
1464
1279
  */
1465
- async createTarget(userId: string, targetId: string, providerType: MessagingProviderType, identifier: string, providerId?: string, name?: string): Promise<Models.Target> {
1280
+ createTarget(userId: string, targetId: string, providerType: MessagingProviderType, identifier: string, providerId?: string, name?: string): Promise<Models.Target> {
1466
1281
  if (typeof userId === 'undefined') {
1467
1282
  throw new AppwriteException('Missing required parameter: "userId"');
1468
1283
  }
@@ -1498,10 +1313,7 @@ If you want to generate a token for a custom authentication flow, use the [POST
1498
1313
  'content-type': 'application/json',
1499
1314
  }
1500
1315
 
1501
- payload['project'] = this.client.config.project;
1502
-
1503
-
1504
- return await this.client.call(
1316
+ return this.client.call(
1505
1317
  'post',
1506
1318
  uri,
1507
1319
  apiHeaders,
@@ -1509,8 +1321,6 @@ If you want to generate a token for a custom authentication flow, use the [POST
1509
1321
  );
1510
1322
  }
1511
1323
  /**
1512
- * Get user target
1513
- *
1514
1324
  * Get a user&#039;s push notification target by ID.
1515
1325
  *
1516
1326
  * @param {string} userId
@@ -1518,7 +1328,7 @@ If you want to generate a token for a custom authentication flow, use the [POST
1518
1328
  * @throws {AppwriteException}
1519
1329
  * @returns {Promise<Models.Target>}
1520
1330
  */
1521
- async getTarget(userId: string, targetId: string): Promise<Models.Target> {
1331
+ getTarget(userId: string, targetId: string): Promise<Models.Target> {
1522
1332
  if (typeof userId === 'undefined') {
1523
1333
  throw new AppwriteException('Missing required parameter: "userId"');
1524
1334
  }
@@ -1530,13 +1340,9 @@ If you want to generate a token for a custom authentication flow, use the [POST
1530
1340
  const uri = new URL(this.client.config.endpoint + apiPath);
1531
1341
 
1532
1342
  const apiHeaders: { [header: string]: string } = {
1533
- 'content-type': 'application/json',
1534
1343
  }
1535
1344
 
1536
- payload['project'] = this.client.config.project;
1537
-
1538
-
1539
- return await this.client.call(
1345
+ return this.client.call(
1540
1346
  'get',
1541
1347
  uri,
1542
1348
  apiHeaders,
@@ -1544,8 +1350,6 @@ If you want to generate a token for a custom authentication flow, use the [POST
1544
1350
  );
1545
1351
  }
1546
1352
  /**
1547
- * Update user target
1548
- *
1549
1353
  * Update a messaging target.
1550
1354
  *
1551
1355
  * @param {string} userId
@@ -1556,7 +1360,7 @@ If you want to generate a token for a custom authentication flow, use the [POST
1556
1360
  * @throws {AppwriteException}
1557
1361
  * @returns {Promise<Models.Target>}
1558
1362
  */
1559
- async updateTarget(userId: string, targetId: string, identifier?: string, providerId?: string, name?: string): Promise<Models.Target> {
1363
+ updateTarget(userId: string, targetId: string, identifier?: string, providerId?: string, name?: string): Promise<Models.Target> {
1560
1364
  if (typeof userId === 'undefined') {
1561
1365
  throw new AppwriteException('Missing required parameter: "userId"');
1562
1366
  }
@@ -1580,10 +1384,7 @@ If you want to generate a token for a custom authentication flow, use the [POST
1580
1384
  'content-type': 'application/json',
1581
1385
  }
1582
1386
 
1583
- payload['project'] = this.client.config.project;
1584
-
1585
-
1586
- return await this.client.call(
1387
+ return this.client.call(
1587
1388
  'patch',
1588
1389
  uri,
1589
1390
  apiHeaders,
@@ -1591,8 +1392,6 @@ If you want to generate a token for a custom authentication flow, use the [POST
1591
1392
  );
1592
1393
  }
1593
1394
  /**
1594
- * Delete user target
1595
- *
1596
1395
  * Delete a messaging target.
1597
1396
  *
1598
1397
  * @param {string} userId
@@ -1600,7 +1399,7 @@ If you want to generate a token for a custom authentication flow, use the [POST
1600
1399
  * @throws {AppwriteException}
1601
1400
  * @returns {Promise<{}>}
1602
1401
  */
1603
- async deleteTarget(userId: string, targetId: string): Promise<{}> {
1402
+ deleteTarget(userId: string, targetId: string): Promise<{}> {
1604
1403
  if (typeof userId === 'undefined') {
1605
1404
  throw new AppwriteException('Missing required parameter: "userId"');
1606
1405
  }
@@ -1615,10 +1414,7 @@ If you want to generate a token for a custom authentication flow, use the [POST
1615
1414
  'content-type': 'application/json',
1616
1415
  }
1617
1416
 
1618
- payload['project'] = this.client.config.project;
1619
-
1620
-
1621
- return await this.client.call(
1417
+ return this.client.call(
1622
1418
  'delete',
1623
1419
  uri,
1624
1420
  apiHeaders,
@@ -1626,8 +1422,6 @@ If you want to generate a token for a custom authentication flow, use the [POST
1626
1422
  );
1627
1423
  }
1628
1424
  /**
1629
- * Create token
1630
- *
1631
1425
  * Returns a token with a secret key for creating a session. Use the user ID and secret and submit a request to the [PUT /account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process.
1632
1426
 
1633
1427
  *
@@ -1637,7 +1431,7 @@ If you want to generate a token for a custom authentication flow, use the [POST
1637
1431
  * @throws {AppwriteException}
1638
1432
  * @returns {Promise<Models.Token>}
1639
1433
  */
1640
- async createToken(userId: string, length?: number, expire?: number): Promise<Models.Token> {
1434
+ createToken(userId: string, length?: number, expire?: number): Promise<Models.Token> {
1641
1435
  if (typeof userId === 'undefined') {
1642
1436
  throw new AppwriteException('Missing required parameter: "userId"');
1643
1437
  }
@@ -1655,10 +1449,7 @@ If you want to generate a token for a custom authentication flow, use the [POST
1655
1449
  'content-type': 'application/json',
1656
1450
  }
1657
1451
 
1658
- payload['project'] = this.client.config.project;
1659
-
1660
-
1661
- return await this.client.call(
1452
+ return this.client.call(
1662
1453
  'post',
1663
1454
  uri,
1664
1455
  apiHeaders,
@@ -1666,8 +1457,6 @@ If you want to generate a token for a custom authentication flow, use the [POST
1666
1457
  );
1667
1458
  }
1668
1459
  /**
1669
- * Update email verification
1670
- *
1671
1460
  * Update the user email verification status by its unique ID.
1672
1461
  *
1673
1462
  * @param {string} userId
@@ -1675,7 +1464,7 @@ If you want to generate a token for a custom authentication flow, use the [POST
1675
1464
  * @throws {AppwriteException}
1676
1465
  * @returns {Promise<Models.User<Preferences>>}
1677
1466
  */
1678
- async updateEmailVerification<Preferences extends Models.Preferences>(userId: string, emailVerification: boolean): Promise<Models.User<Preferences>> {
1467
+ updateEmailVerification<Preferences extends Models.Preferences>(userId: string, emailVerification: boolean): Promise<Models.User<Preferences>> {
1679
1468
  if (typeof userId === 'undefined') {
1680
1469
  throw new AppwriteException('Missing required parameter: "userId"');
1681
1470
  }
@@ -1693,10 +1482,7 @@ If you want to generate a token for a custom authentication flow, use the [POST
1693
1482
  'content-type': 'application/json',
1694
1483
  }
1695
1484
 
1696
- payload['project'] = this.client.config.project;
1697
-
1698
-
1699
- return await this.client.call(
1485
+ return this.client.call(
1700
1486
  'patch',
1701
1487
  uri,
1702
1488
  apiHeaders,
@@ -1704,8 +1490,6 @@ If you want to generate a token for a custom authentication flow, use the [POST
1704
1490
  );
1705
1491
  }
1706
1492
  /**
1707
- * Update phone verification
1708
- *
1709
1493
  * Update the user phone verification status by its unique ID.
1710
1494
  *
1711
1495
  * @param {string} userId
@@ -1713,7 +1497,7 @@ If you want to generate a token for a custom authentication flow, use the [POST
1713
1497
  * @throws {AppwriteException}
1714
1498
  * @returns {Promise<Models.User<Preferences>>}
1715
1499
  */
1716
- async updatePhoneVerification<Preferences extends Models.Preferences>(userId: string, phoneVerification: boolean): Promise<Models.User<Preferences>> {
1500
+ updatePhoneVerification<Preferences extends Models.Preferences>(userId: string, phoneVerification: boolean): Promise<Models.User<Preferences>> {
1717
1501
  if (typeof userId === 'undefined') {
1718
1502
  throw new AppwriteException('Missing required parameter: "userId"');
1719
1503
  }
@@ -1731,10 +1515,7 @@ If you want to generate a token for a custom authentication flow, use the [POST
1731
1515
  'content-type': 'application/json',
1732
1516
  }
1733
1517
 
1734
- payload['project'] = this.client.config.project;
1735
-
1736
-
1737
- return await this.client.call(
1518
+ return this.client.call(
1738
1519
  'patch',
1739
1520
  uri,
1740
1521
  apiHeaders,