@appwrite.io/console 0.6.0-rc.8 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (480) hide show
  1. package/.travis.yml +32 -0
  2. package/README.md +6 -6
  3. package/dist/cjs/sdk.js +1839 -338
  4. package/dist/cjs/sdk.js.map +1 -1
  5. package/dist/esm/sdk.js +1840 -339
  6. package/dist/esm/sdk.js.map +1 -1
  7. package/dist/iife/sdk.js +1839 -338
  8. package/docs/examples/account/create-anonymous-session.md +5 -12
  9. package/docs/examples/account/create-email-password-session.md +8 -12
  10. package/docs/examples/account/create-email-token.md +9 -12
  11. package/docs/examples/account/create-j-w-t.md +5 -12
  12. package/docs/examples/account/create-magic-u-r-l-token.md +10 -12
  13. package/docs/examples/account/create-mfa-authenticator.md +13 -0
  14. package/docs/examples/account/create-mfa-challenge.md +13 -0
  15. package/docs/examples/account/create-mfa-recovery-codes.md +11 -0
  16. package/docs/examples/account/create-o-auth2session.md +10 -9
  17. package/docs/examples/account/create-o-auth2token.md +15 -0
  18. package/docs/examples/account/create-phone-token.md +8 -12
  19. package/docs/examples/account/create-phone-verification.md +5 -12
  20. package/docs/examples/account/create-push-target.md +9 -12
  21. package/docs/examples/account/create-recovery.md +8 -12
  22. package/docs/examples/account/create-session.md +8 -12
  23. package/docs/examples/account/create-verification.md +7 -12
  24. package/docs/examples/account/create.md +10 -12
  25. package/docs/examples/account/delete-identity.md +7 -12
  26. package/docs/examples/account/delete-mfa-authenticator.md +14 -0
  27. package/docs/examples/account/delete-push-target.md +13 -0
  28. package/docs/examples/account/delete-session.md +7 -12
  29. package/docs/examples/account/delete-sessions.md +5 -12
  30. package/docs/examples/account/delete.md +5 -12
  31. package/docs/examples/account/get-mfa-recovery-codes.md +11 -0
  32. package/docs/examples/account/get-prefs.md +5 -12
  33. package/docs/examples/account/get-session.md +7 -12
  34. package/docs/examples/account/get.md +5 -12
  35. package/docs/examples/account/list-identities.md +7 -12
  36. package/docs/examples/account/list-logs.md +7 -12
  37. package/docs/examples/account/list-mfa-factors.md +11 -0
  38. package/docs/examples/account/list-sessions.md +5 -12
  39. package/docs/examples/account/update-email.md +8 -12
  40. package/docs/examples/account/update-m-f-a.md +7 -12
  41. package/docs/examples/account/update-magic-u-r-l-session.md +8 -12
  42. package/docs/examples/account/update-mfa-authenticator.md +14 -0
  43. package/docs/examples/account/update-mfa-challenge.md +14 -0
  44. package/docs/examples/account/update-mfa-recovery-codes.md +11 -0
  45. package/docs/examples/account/update-name.md +7 -12
  46. package/docs/examples/account/update-password.md +8 -12
  47. package/docs/examples/account/update-phone-session.md +14 -0
  48. package/docs/examples/account/update-phone-verification.md +8 -12
  49. package/docs/examples/account/update-phone.md +8 -12
  50. package/docs/examples/account/update-prefs.md +7 -12
  51. package/docs/examples/account/update-push-target.md +8 -12
  52. package/docs/examples/account/update-recovery.md +9 -12
  53. package/docs/examples/account/update-session.md +7 -12
  54. package/docs/examples/account/update-status.md +5 -12
  55. package/docs/examples/account/update-verification.md +8 -12
  56. package/docs/examples/assistant/chat.md +7 -12
  57. package/docs/examples/avatars/get-browser.md +11 -9
  58. package/docs/examples/avatars/get-credit-card.md +11 -9
  59. package/docs/examples/avatars/get-favicon.md +7 -8
  60. package/docs/examples/avatars/get-flag.md +11 -9
  61. package/docs/examples/avatars/get-image.md +9 -8
  62. package/docs/examples/avatars/get-initials.md +10 -8
  63. package/docs/examples/avatars/get-q-r.md +10 -8
  64. package/docs/examples/console/variables.md +5 -12
  65. package/docs/examples/databases/create-boolean-attribute.md +12 -12
  66. package/docs/examples/databases/create-collection.md +12 -12
  67. package/docs/examples/databases/create-datetime-attribute.md +12 -12
  68. package/docs/examples/databases/create-document.md +11 -12
  69. package/docs/examples/databases/create-email-attribute.md +12 -12
  70. package/docs/examples/databases/create-enum-attribute.md +13 -12
  71. package/docs/examples/databases/create-float-attribute.md +14 -12
  72. package/docs/examples/databases/create-index.md +13 -13
  73. package/docs/examples/databases/create-integer-attribute.md +14 -12
  74. package/docs/examples/databases/create-ip-attribute.md +12 -12
  75. package/docs/examples/databases/create-relationship-attribute.md +15 -13
  76. package/docs/examples/databases/create-string-attribute.md +14 -12
  77. package/docs/examples/databases/create-url-attribute.md +12 -12
  78. package/docs/examples/databases/create.md +9 -12
  79. package/docs/examples/databases/delete-attribute.md +9 -12
  80. package/docs/examples/databases/delete-collection.md +8 -12
  81. package/docs/examples/databases/delete-document.md +9 -12
  82. package/docs/examples/databases/delete-index.md +9 -12
  83. package/docs/examples/databases/delete.md +7 -12
  84. package/docs/examples/databases/get-attribute.md +9 -12
  85. package/docs/examples/databases/get-collection-usage.md +10 -13
  86. package/docs/examples/databases/get-collection.md +8 -12
  87. package/docs/examples/databases/get-database-usage.md +9 -13
  88. package/docs/examples/databases/get-document.md +10 -12
  89. package/docs/examples/databases/get-index.md +9 -12
  90. package/docs/examples/databases/get-usage.md +8 -13
  91. package/docs/examples/databases/get.md +7 -12
  92. package/docs/examples/databases/list-attributes.md +9 -12
  93. package/docs/examples/databases/list-collection-logs.md +9 -12
  94. package/docs/examples/databases/list-collections.md +9 -12
  95. package/docs/examples/databases/list-document-logs.md +10 -12
  96. package/docs/examples/databases/list-documents.md +9 -12
  97. package/docs/examples/databases/list-indexes.md +9 -12
  98. package/docs/examples/databases/list-logs.md +8 -12
  99. package/docs/examples/databases/list.md +8 -12
  100. package/docs/examples/databases/update-boolean-attribute.md +11 -12
  101. package/docs/examples/databases/update-collection.md +12 -12
  102. package/docs/examples/databases/update-datetime-attribute.md +11 -12
  103. package/docs/examples/databases/update-document.md +11 -12
  104. package/docs/examples/databases/update-email-attribute.md +11 -12
  105. package/docs/examples/databases/update-enum-attribute.md +12 -12
  106. package/docs/examples/databases/update-float-attribute.md +13 -12
  107. package/docs/examples/databases/update-integer-attribute.md +13 -12
  108. package/docs/examples/databases/update-ip-attribute.md +11 -12
  109. package/docs/examples/databases/update-relationship-attribute.md +11 -13
  110. package/docs/examples/databases/update-string-attribute.md +11 -12
  111. package/docs/examples/databases/update-url-attribute.md +11 -12
  112. package/docs/examples/databases/update.md +9 -12
  113. package/docs/examples/functions/create-build.md +9 -12
  114. package/docs/examples/functions/create-deployment.md +11 -12
  115. package/docs/examples/functions/create-execution.md +13 -13
  116. package/docs/examples/functions/create-variable.md +9 -12
  117. package/docs/examples/functions/create.md +27 -13
  118. package/docs/examples/functions/delete-deployment.md +8 -12
  119. package/docs/examples/functions/delete-variable.md +8 -12
  120. package/docs/examples/functions/delete.md +7 -12
  121. package/docs/examples/functions/download-deployment.md +8 -8
  122. package/docs/examples/functions/get-deployment.md +8 -12
  123. package/docs/examples/functions/get-execution.md +8 -12
  124. package/docs/examples/functions/get-function-usage.md +9 -13
  125. package/docs/examples/functions/get-usage.md +8 -13
  126. package/docs/examples/functions/get-variable.md +8 -12
  127. package/docs/examples/functions/get.md +7 -12
  128. package/docs/examples/functions/list-deployments.md +9 -12
  129. package/docs/examples/functions/list-executions.md +9 -12
  130. package/docs/examples/functions/list-runtimes.md +5 -12
  131. package/docs/examples/functions/list-variables.md +7 -12
  132. package/docs/examples/functions/list.md +8 -12
  133. package/docs/examples/functions/update-deployment.md +8 -12
  134. package/docs/examples/functions/update-variable.md +10 -12
  135. package/docs/examples/functions/update.md +23 -13
  136. package/docs/examples/graphql/mutation.md +7 -12
  137. package/docs/examples/graphql/query.md +7 -12
  138. package/docs/examples/health/get-antivirus.md +5 -12
  139. package/docs/examples/health/get-cache.md +5 -12
  140. package/docs/examples/health/get-certificate.md +13 -0
  141. package/docs/examples/health/get-d-b.md +5 -12
  142. package/docs/examples/health/get-failed-jobs.md +14 -0
  143. package/docs/examples/health/get-pub-sub.md +5 -12
  144. package/docs/examples/health/get-queue-builds.md +7 -12
  145. package/docs/examples/health/get-queue-certificates.md +7 -12
  146. package/docs/examples/health/get-queue-databases.md +8 -12
  147. package/docs/examples/health/get-queue-deletes.md +7 -12
  148. package/docs/examples/health/get-queue-functions.md +7 -12
  149. package/docs/examples/health/get-queue-logs.md +7 -12
  150. package/docs/examples/health/get-queue-mails.md +7 -12
  151. package/docs/examples/health/get-queue-messaging.md +7 -12
  152. package/docs/examples/health/get-queue-migrations.md +7 -12
  153. package/docs/examples/health/get-queue-usage-dump.md +13 -0
  154. package/docs/examples/health/get-queue-usage.md +13 -0
  155. package/docs/examples/health/get-queue-webhooks.md +7 -12
  156. package/docs/examples/health/get-queue.md +5 -12
  157. package/docs/examples/health/get-storage-local.md +5 -12
  158. package/docs/examples/health/get-storage.md +11 -0
  159. package/docs/examples/health/get-time.md +5 -12
  160. package/docs/examples/health/get.md +5 -12
  161. package/docs/examples/locale/get.md +5 -12
  162. package/docs/examples/locale/list-codes.md +5 -12
  163. package/docs/examples/locale/list-continents.md +5 -12
  164. package/docs/examples/locale/list-countries-e-u.md +5 -12
  165. package/docs/examples/locale/list-countries-phones.md +5 -12
  166. package/docs/examples/locale/list-countries.md +5 -12
  167. package/docs/examples/locale/list-currencies.md +5 -12
  168. package/docs/examples/locale/list-languages.md +5 -12
  169. package/docs/examples/messaging/create-apns-provider.md +20 -0
  170. package/docs/examples/messaging/create-email.md +18 -12
  171. package/docs/examples/messaging/create-fcm-provider.md +16 -0
  172. package/docs/examples/messaging/create-mailgun-provider.md +16 -12
  173. package/docs/examples/messaging/create-msg91provider.md +12 -12
  174. package/docs/examples/messaging/create-push.md +22 -12
  175. package/docs/examples/messaging/create-sendgrid-provider.md +14 -12
  176. package/docs/examples/messaging/create-sms.md +19 -0
  177. package/docs/examples/messaging/create-smtp-provider.md +26 -0
  178. package/docs/examples/messaging/create-subscriber.md +9 -12
  179. package/docs/examples/messaging/create-telesign-provider.md +12 -12
  180. package/docs/examples/messaging/create-textmagic-provider.md +12 -12
  181. package/docs/examples/messaging/create-topic.md +9 -12
  182. package/docs/examples/messaging/create-twilio-provider.md +12 -12
  183. package/docs/examples/messaging/create-vonage-provider.md +12 -12
  184. package/docs/examples/messaging/delete-provider.md +7 -12
  185. package/docs/examples/messaging/delete-subscriber.md +8 -12
  186. package/docs/examples/messaging/delete-topic.md +7 -12
  187. package/docs/examples/messaging/delete.md +13 -0
  188. package/docs/examples/messaging/get-message.md +7 -12
  189. package/docs/examples/messaging/get-provider.md +7 -12
  190. package/docs/examples/messaging/get-subscriber.md +8 -12
  191. package/docs/examples/messaging/get-topic.md +7 -12
  192. package/docs/examples/messaging/list-message-logs.md +8 -12
  193. package/docs/examples/messaging/list-messages.md +8 -12
  194. package/docs/examples/messaging/list-provider-logs.md +8 -12
  195. package/docs/examples/messaging/list-providers.md +8 -12
  196. package/docs/examples/messaging/list-subscriber-logs.md +8 -12
  197. package/docs/examples/messaging/list-subscribers.md +9 -12
  198. package/docs/examples/messaging/list-targets.md +8 -12
  199. package/docs/examples/messaging/list-topic-logs.md +8 -12
  200. package/docs/examples/messaging/list-topics.md +8 -12
  201. package/docs/examples/messaging/update-apns-provider.md +20 -0
  202. package/docs/examples/messaging/update-email.md +17 -12
  203. package/docs/examples/messaging/update-fcm-provider.md +16 -0
  204. package/docs/examples/messaging/update-mailgun-provider.md +16 -12
  205. package/docs/examples/messaging/update-msg91provider.md +12 -12
  206. package/docs/examples/messaging/update-push.md +28 -0
  207. package/docs/examples/messaging/update-sendgrid-provider.md +14 -12
  208. package/docs/examples/messaging/update-sms.md +19 -0
  209. package/docs/examples/messaging/update-smtp-provider.md +26 -0
  210. package/docs/examples/messaging/update-telesign-provider.md +12 -12
  211. package/docs/examples/messaging/update-textmagic-provider.md +12 -12
  212. package/docs/examples/messaging/update-topic.md +9 -12
  213. package/docs/examples/messaging/update-twilio-provider.md +12 -12
  214. package/docs/examples/messaging/update-vonage-provider.md +12 -12
  215. package/docs/examples/migrations/create-appwrite-migration.md +10 -12
  216. package/docs/examples/migrations/create-firebase-migration.md +8 -12
  217. package/docs/examples/migrations/create-firebase-o-auth-migration.md +8 -12
  218. package/docs/examples/migrations/create-n-host-migration.md +14 -12
  219. package/docs/examples/migrations/create-supabase-migration.md +13 -12
  220. package/docs/examples/migrations/delete-firebase-auth.md +5 -12
  221. package/docs/examples/migrations/delete.md +7 -12
  222. package/docs/examples/migrations/get-appwrite-report.md +10 -12
  223. package/docs/examples/migrations/get-firebase-report-o-auth.md +8 -12
  224. package/docs/examples/migrations/get-firebase-report.md +8 -12
  225. package/docs/examples/migrations/get-n-host-report.md +14 -12
  226. package/docs/examples/migrations/get-supabase-report.md +13 -12
  227. package/docs/examples/migrations/get.md +7 -12
  228. package/docs/examples/migrations/list-firebase-projects.md +5 -12
  229. package/docs/examples/migrations/list.md +8 -12
  230. package/docs/examples/migrations/retry.md +7 -12
  231. package/docs/examples/project/create-variable.md +8 -12
  232. package/docs/examples/project/delete-variable.md +7 -12
  233. package/docs/examples/project/get-usage.md +10 -13
  234. package/docs/examples/project/get-variable.md +7 -12
  235. package/docs/examples/project/list-variables.md +5 -12
  236. package/docs/examples/project/update-variable.md +9 -12
  237. package/docs/examples/projects/create-key.md +10 -12
  238. package/docs/examples/projects/create-platform.md +13 -13
  239. package/docs/examples/projects/create-smtp-test.md +17 -13
  240. package/docs/examples/projects/create-webhook.md +14 -12
  241. package/docs/examples/projects/create.md +20 -13
  242. package/docs/examples/projects/delete-email-template.md +10 -13
  243. package/docs/examples/projects/delete-key.md +8 -12
  244. package/docs/examples/projects/delete-platform.md +8 -12
  245. package/docs/examples/projects/delete-sms-template.md +10 -13
  246. package/docs/examples/projects/delete-webhook.md +8 -12
  247. package/docs/examples/projects/delete.md +7 -12
  248. package/docs/examples/projects/get-email-template.md +10 -13
  249. package/docs/examples/projects/get-key.md +8 -12
  250. package/docs/examples/projects/get-platform.md +8 -12
  251. package/docs/examples/projects/get-sms-template.md +10 -13
  252. package/docs/examples/projects/get-webhook.md +8 -12
  253. package/docs/examples/projects/get.md +7 -12
  254. package/docs/examples/projects/list-keys.md +7 -12
  255. package/docs/examples/projects/list-platforms.md +7 -12
  256. package/docs/examples/projects/list-webhooks.md +7 -12
  257. package/docs/examples/projects/list.md +8 -12
  258. package/docs/examples/projects/update-api-status-all.md +14 -0
  259. package/docs/examples/projects/update-api-status.md +15 -0
  260. package/docs/examples/projects/update-auth-duration.md +8 -12
  261. package/docs/examples/projects/update-auth-limit.md +8 -12
  262. package/docs/examples/projects/update-auth-password-dictionary.md +8 -12
  263. package/docs/examples/projects/update-auth-password-history.md +8 -12
  264. package/docs/examples/projects/update-auth-sessions-limit.md +8 -12
  265. package/docs/examples/projects/update-auth-status.md +10 -13
  266. package/docs/examples/projects/update-email-template.md +15 -13
  267. package/docs/examples/projects/update-key.md +11 -12
  268. package/docs/examples/projects/update-o-auth2.md +12 -13
  269. package/docs/examples/projects/update-personal-data-check.md +8 -12
  270. package/docs/examples/projects/update-platform.md +12 -12
  271. package/docs/examples/projects/update-service-status-all.md +8 -12
  272. package/docs/examples/projects/update-service-status.md +10 -13
  273. package/docs/examples/projects/update-sms-template.md +11 -13
  274. package/docs/examples/projects/update-smtp.md +17 -13
  275. package/docs/examples/projects/update-team.md +8 -12
  276. package/docs/examples/projects/update-webhook-signature.md +8 -12
  277. package/docs/examples/projects/update-webhook.md +15 -12
  278. package/docs/examples/projects/update.md +17 -12
  279. package/docs/examples/proxy/create-rule.md +10 -13
  280. package/docs/examples/proxy/delete-rule.md +7 -12
  281. package/docs/examples/proxy/get-rule.md +7 -12
  282. package/docs/examples/proxy/list-rules.md +8 -12
  283. package/docs/examples/proxy/update-rule-verification.md +7 -12
  284. package/docs/examples/storage/create-bucket.md +17 -13
  285. package/docs/examples/storage/create-file.md +10 -12
  286. package/docs/examples/storage/delete-bucket.md +7 -12
  287. package/docs/examples/storage/delete-file.md +8 -12
  288. package/docs/examples/storage/get-bucket-usage.md +9 -13
  289. package/docs/examples/storage/get-bucket.md +7 -12
  290. package/docs/examples/storage/get-file-download.md +8 -8
  291. package/docs/examples/storage/get-file-preview.md +20 -9
  292. package/docs/examples/storage/get-file-view.md +8 -8
  293. package/docs/examples/storage/get-file.md +8 -12
  294. package/docs/examples/storage/get-usage.md +8 -13
  295. package/docs/examples/storage/list-buckets.md +8 -12
  296. package/docs/examples/storage/list-files.md +9 -12
  297. package/docs/examples/storage/update-bucket.md +17 -13
  298. package/docs/examples/storage/update-file.md +10 -12
  299. package/docs/examples/teams/create-membership.md +13 -12
  300. package/docs/examples/teams/create.md +9 -12
  301. package/docs/examples/teams/delete-membership.md +8 -12
  302. package/docs/examples/teams/delete.md +7 -12
  303. package/docs/examples/teams/get-membership.md +8 -12
  304. package/docs/examples/teams/get-prefs.md +7 -12
  305. package/docs/examples/teams/get.md +7 -12
  306. package/docs/examples/teams/list-logs.md +8 -12
  307. package/docs/examples/teams/list-memberships.md +9 -12
  308. package/docs/examples/teams/list.md +8 -12
  309. package/docs/examples/teams/update-membership-status.md +10 -12
  310. package/docs/examples/teams/update-membership.md +9 -12
  311. package/docs/examples/teams/update-name.md +8 -12
  312. package/docs/examples/teams/update-prefs.md +8 -12
  313. package/docs/examples/users/create-argon2user.md +10 -12
  314. package/docs/examples/users/create-bcrypt-user.md +10 -12
  315. package/docs/examples/users/create-m-d5user.md +10 -12
  316. package/docs/examples/users/create-mfa-recovery-codes.md +13 -0
  317. package/docs/examples/users/create-p-h-pass-user.md +10 -12
  318. package/docs/examples/users/create-s-h-a-user.md +12 -13
  319. package/docs/examples/users/create-scrypt-modified-user.md +13 -12
  320. package/docs/examples/users/create-scrypt-user.md +15 -12
  321. package/docs/examples/users/create-session.md +7 -12
  322. package/docs/examples/users/create-target.md +13 -13
  323. package/docs/examples/users/create-token.md +9 -12
  324. package/docs/examples/users/create.md +11 -12
  325. package/docs/examples/users/delete-identity.md +7 -12
  326. package/docs/examples/users/delete-mfa-authenticator.md +14 -0
  327. package/docs/examples/users/delete-session.md +8 -12
  328. package/docs/examples/users/delete-sessions.md +7 -12
  329. package/docs/examples/users/delete-target.md +8 -12
  330. package/docs/examples/users/delete.md +7 -12
  331. package/docs/examples/users/get-mfa-recovery-codes.md +13 -0
  332. package/docs/examples/users/get-prefs.md +7 -12
  333. package/docs/examples/users/get-target.md +8 -12
  334. package/docs/examples/users/get-usage.md +8 -13
  335. package/docs/examples/users/get.md +7 -12
  336. package/docs/examples/users/list-identities.md +8 -12
  337. package/docs/examples/users/list-logs.md +8 -12
  338. package/docs/examples/users/list-memberships.md +7 -12
  339. package/docs/examples/users/list-mfa-factors.md +13 -0
  340. package/docs/examples/users/list-sessions.md +7 -12
  341. package/docs/examples/users/list-targets.md +8 -12
  342. package/docs/examples/users/list.md +8 -12
  343. package/docs/examples/users/update-email-verification.md +8 -12
  344. package/docs/examples/users/update-email.md +8 -12
  345. package/docs/examples/users/update-labels.md +8 -12
  346. package/docs/examples/users/update-mfa-recovery-codes.md +13 -0
  347. package/docs/examples/users/update-mfa.md +8 -12
  348. package/docs/examples/users/update-name.md +8 -12
  349. package/docs/examples/users/update-password.md +8 -12
  350. package/docs/examples/users/update-phone-verification.md +8 -12
  351. package/docs/examples/users/update-phone.md +8 -12
  352. package/docs/examples/users/update-prefs.md +8 -12
  353. package/docs/examples/users/update-status.md +8 -12
  354. package/docs/examples/users/update-target.md +11 -12
  355. package/docs/examples/vcs/create-repository-detection.md +9 -12
  356. package/docs/examples/vcs/create-repository.md +9 -12
  357. package/docs/examples/vcs/delete-installation.md +7 -12
  358. package/docs/examples/vcs/get-installation.md +7 -12
  359. package/docs/examples/vcs/get-repository.md +8 -12
  360. package/docs/examples/vcs/list-installations.md +8 -12
  361. package/docs/examples/vcs/list-repositories.md +8 -12
  362. package/docs/examples/vcs/list-repository-branches.md +8 -12
  363. package/docs/examples/vcs/update-external-deployments.md +9 -12
  364. package/package.json +1 -1
  365. package/src/client.ts +3 -3
  366. package/src/enums/api-service.ts +13 -0
  367. package/src/enums/api.ts +5 -0
  368. package/src/enums/auth-method.ts +9 -0
  369. package/src/enums/authentication-factor.ts +6 -0
  370. package/src/enums/authenticator-type.ts +3 -0
  371. package/src/enums/browser.ts +16 -0
  372. package/src/enums/compression.ts +5 -0
  373. package/src/enums/credit-card.ts +18 -0
  374. package/src/enums/database-usage-range.ts +5 -0
  375. package/src/enums/email-template-locale.ts +133 -0
  376. package/src/enums/email-template-type.ts +7 -0
  377. package/src/enums/execution-method.ts +8 -0
  378. package/src/enums/flag.ts +196 -0
  379. package/src/enums/function-usage-range.ts +5 -0
  380. package/src/enums/image-format.ts +7 -0
  381. package/src/enums/image-gravity.ts +11 -0
  382. package/src/enums/index-type.ts +5 -0
  383. package/src/enums/messaging-provider-type.ts +5 -0
  384. package/src/enums/name.ts +15 -0
  385. package/src/enums/o-auth-provider.ts +41 -0
  386. package/src/enums/password-hash.ts +13 -0
  387. package/src/enums/platform-type.ts +15 -0
  388. package/src/enums/project-usage-range.ts +4 -0
  389. package/src/enums/region.ts +4 -0
  390. package/src/enums/relation-mutate.ts +5 -0
  391. package/src/enums/relationship-type.ts +6 -0
  392. package/src/enums/resource-type.ts +4 -0
  393. package/src/enums/runtime.ts +46 -0
  394. package/src/enums/s-m-t-p-secure.ts +3 -0
  395. package/src/enums/sms-template-locale.ts +133 -0
  396. package/src/enums/sms-template-type.ts +6 -0
  397. package/src/enums/smtp-encryption.ts +5 -0
  398. package/src/enums/storage-usage-range.ts +5 -0
  399. package/src/enums/user-usage-range.ts +5 -0
  400. package/src/index.ts +35 -1
  401. package/src/models.ts +61 -23
  402. package/src/query.ts +61 -34
  403. package/src/service.ts +4 -7
  404. package/src/services/account.ts +274 -75
  405. package/src/services/avatars.ts +9 -6
  406. package/src/services/databases.ts +37 -16
  407. package/src/services/functions.ts +13 -10
  408. package/src/services/health.ts +121 -0
  409. package/src/services/messaging.ts +374 -117
  410. package/src/services/migrations.ts +2 -2
  411. package/src/services/project.ts +4 -3
  412. package/src/services/projects.ts +110 -59
  413. package/src/services/proxy.ts +3 -2
  414. package/src/services/storage.ts +17 -13
  415. package/src/services/users.ts +125 -44
  416. package/types/enums/api-service.d.ts +13 -0
  417. package/types/enums/api.d.ts +5 -0
  418. package/types/enums/auth-method.d.ts +9 -0
  419. package/types/enums/authentication-factor.d.ts +6 -0
  420. package/types/enums/authenticator-type.d.ts +3 -0
  421. package/types/enums/browser.d.ts +16 -0
  422. package/types/enums/compression.d.ts +5 -0
  423. package/types/enums/credit-card.d.ts +18 -0
  424. package/types/enums/database-usage-range.d.ts +5 -0
  425. package/types/enums/email-template-locale.d.ts +133 -0
  426. package/types/enums/email-template-type.d.ts +7 -0
  427. package/types/enums/execution-method.d.ts +8 -0
  428. package/types/enums/flag.d.ts +196 -0
  429. package/types/enums/function-usage-range.d.ts +5 -0
  430. package/types/enums/image-format.d.ts +7 -0
  431. package/types/enums/image-gravity.d.ts +11 -0
  432. package/types/enums/index-type.d.ts +5 -0
  433. package/types/enums/messaging-provider-type.d.ts +5 -0
  434. package/types/enums/name.d.ts +15 -0
  435. package/types/enums/o-auth-provider.d.ts +41 -0
  436. package/types/enums/password-hash.d.ts +13 -0
  437. package/types/enums/platform-type.d.ts +15 -0
  438. package/types/enums/project-usage-range.d.ts +4 -0
  439. package/types/enums/region.d.ts +4 -0
  440. package/types/enums/relation-mutate.d.ts +5 -0
  441. package/types/enums/relationship-type.d.ts +6 -0
  442. package/types/enums/resource-type.d.ts +4 -0
  443. package/types/enums/runtime.d.ts +46 -0
  444. package/types/enums/s-m-t-p-secure.d.ts +3 -0
  445. package/types/enums/sms-template-locale.d.ts +133 -0
  446. package/types/enums/sms-template-type.d.ts +6 -0
  447. package/types/enums/smtp-encryption.d.ts +5 -0
  448. package/types/enums/storage-usage-range.d.ts +5 -0
  449. package/types/enums/user-usage-range.d.ts +5 -0
  450. package/types/index.d.ts +34 -0
  451. package/types/models.d.ts +61 -23
  452. package/types/query.d.ts +10 -3
  453. package/types/services/account.d.ts +138 -33
  454. package/types/services/avatars.d.ts +9 -6
  455. package/types/services/databases.d.ts +37 -16
  456. package/types/services/functions.d.ts +13 -10
  457. package/types/services/health.d.ts +56 -0
  458. package/types/services/messaging.d.ts +170 -64
  459. package/types/services/migrations.d.ts +2 -2
  460. package/types/services/project.d.ts +4 -3
  461. package/types/services/projects.d.ts +64 -42
  462. package/types/services/proxy.d.ts +3 -2
  463. package/types/services/storage.d.ts +17 -13
  464. package/types/services/users.d.ts +73 -23
  465. package/docs/examples/account/add-authenticator.md +0 -18
  466. package/docs/examples/account/create-challenge.md +0 -18
  467. package/docs/examples/account/delete-authenticator.md +0 -18
  468. package/docs/examples/account/list-providers.md +0 -18
  469. package/docs/examples/account/update-challenge.md +0 -18
  470. package/docs/examples/account/verify-authenticator.md +0 -18
  471. package/docs/examples/messaging/create-a-p-n-s-provider.md +0 -18
  472. package/docs/examples/messaging/create-f-c-m-provider.md +0 -18
  473. package/docs/examples/messaging/create-s-m-s.md +0 -18
  474. package/docs/examples/messaging/update-a-p-n-s-provider.md +0 -18
  475. package/docs/examples/messaging/update-f-c-m-provider.md +0 -18
  476. package/docs/examples/messaging/update-push-notification.md +0 -18
  477. package/docs/examples/messaging/update-s-m-s.md +0 -18
  478. package/docs/examples/projects/update-auth-mfa-factors.md +0 -18
  479. package/docs/examples/users/delete-authenticator.md +0 -18
  480. package/docs/examples/users/list-providers.md +0 -18
@@ -2,6 +2,7 @@ import { Service } from '../service';
2
2
  import { AppwriteException, Client } from '../client';
3
3
  import type { Models } from '../models';
4
4
  import type { UploadProgress, Payload } from '../client';
5
+ import { SmtpEncryption } from '../enums/smtp-encryption';
5
6
 
6
7
  export class Messaging extends Service {
7
8
 
@@ -13,13 +14,14 @@ export class Messaging extends Service {
13
14
  /**
14
15
  * List messages
15
16
  *
17
+ * Get a list of all messages from the current Appwrite project.
16
18
  *
17
- * @param {string} queries
19
+ * @param {string[]} queries
18
20
  * @param {string} search
19
21
  * @throws {AppwriteException}
20
22
  * @returns {Promise}
21
23
  */
22
- async listMessages(queries?: string, search?: string): Promise<Models.MessageList> {
24
+ async listMessages(queries?: string[], search?: string): Promise<Models.MessageList> {
23
25
  const apiPath = '/messaging/messages';
24
26
  const payload: Payload = {};
25
27
 
@@ -38,8 +40,9 @@ export class Messaging extends Service {
38
40
  }
39
41
 
40
42
  /**
41
- * Create an email.
43
+ * Create email
42
44
  *
45
+ * Create a new email message.
43
46
  *
44
47
  * @param {string} messageId
45
48
  * @param {string} subject
@@ -49,14 +52,14 @@ export class Messaging extends Service {
49
52
  * @param {string[]} targets
50
53
  * @param {string[]} cc
51
54
  * @param {string[]} bcc
52
- * @param {string} description
53
- * @param {string} status
55
+ * @param {string[]} attachments
56
+ * @param {boolean} draft
54
57
  * @param {boolean} html
55
58
  * @param {string} scheduledAt
56
59
  * @throws {AppwriteException}
57
60
  * @returns {Promise}
58
61
  */
59
- async createEmail(messageId: string, subject: string, content: string, topics?: string[], users?: string[], targets?: string[], cc?: string[], bcc?: string[], description?: string, status?: string, html?: boolean, scheduledAt?: string): Promise<Models.Message> {
62
+ async createEmail(messageId: string, subject: string, content: string, topics?: string[], users?: string[], targets?: string[], cc?: string[], bcc?: string[], attachments?: string[], draft?: boolean, html?: boolean, scheduledAt?: string): Promise<Models.Message> {
60
63
  if (typeof messageId === 'undefined') {
61
64
  throw new AppwriteException('Missing required parameter: "messageId"');
62
65
  }
@@ -104,12 +107,12 @@ export class Messaging extends Service {
104
107
  payload['bcc'] = bcc;
105
108
  }
106
109
 
107
- if (typeof description !== 'undefined') {
108
- payload['description'] = description;
110
+ if (typeof attachments !== 'undefined') {
111
+ payload['attachments'] = attachments;
109
112
  }
110
113
 
111
- if (typeof status !== 'undefined') {
112
- payload['status'] = status;
114
+ if (typeof draft !== 'undefined') {
115
+ payload['draft'] = draft;
113
116
  }
114
117
 
115
118
  if (typeof html !== 'undefined') {
@@ -127,17 +130,18 @@ export class Messaging extends Service {
127
130
  }
128
131
 
129
132
  /**
130
- * Update an email.
133
+ * Update email
131
134
  *
135
+ * Update an email message by its unique ID.
136
+ *
132
137
  *
133
138
  * @param {string} messageId
134
139
  * @param {string[]} topics
135
140
  * @param {string[]} users
136
141
  * @param {string[]} targets
137
142
  * @param {string} subject
138
- * @param {string} description
139
143
  * @param {string} content
140
- * @param {string} status
144
+ * @param {boolean} draft
141
145
  * @param {boolean} html
142
146
  * @param {string[]} cc
143
147
  * @param {string[]} bcc
@@ -145,7 +149,7 @@ export class Messaging extends Service {
145
149
  * @throws {AppwriteException}
146
150
  * @returns {Promise}
147
151
  */
148
- async updateEmail(messageId: string, topics?: string[], users?: string[], targets?: string[], subject?: string, description?: string, content?: string, status?: string, html?: boolean, cc?: string[], bcc?: string[], scheduledAt?: string): Promise<Models.Message> {
152
+ async updateEmail(messageId: string, topics?: string[], users?: string[], targets?: string[], subject?: string, content?: string, draft?: boolean, html?: boolean, cc?: string[], bcc?: string[], scheduledAt?: string): Promise<Models.Message> {
149
153
  if (typeof messageId === 'undefined') {
150
154
  throw new AppwriteException('Missing required parameter: "messageId"');
151
155
  }
@@ -169,16 +173,12 @@ export class Messaging extends Service {
169
173
  payload['subject'] = subject;
170
174
  }
171
175
 
172
- if (typeof description !== 'undefined') {
173
- payload['description'] = description;
174
- }
175
-
176
176
  if (typeof content !== 'undefined') {
177
177
  payload['content'] = content;
178
178
  }
179
179
 
180
- if (typeof status !== 'undefined') {
181
- payload['status'] = status;
180
+ if (typeof draft !== 'undefined') {
181
+ payload['draft'] = draft;
182
182
  }
183
183
 
184
184
  if (typeof html !== 'undefined') {
@@ -204,8 +204,9 @@ export class Messaging extends Service {
204
204
  }
205
205
 
206
206
  /**
207
- * Create a push notification.
207
+ * Create push notification
208
208
  *
209
+ * Create a new push notification.
209
210
  *
210
211
  * @param {string} messageId
211
212
  * @param {string} title
@@ -213,20 +214,20 @@ export class Messaging extends Service {
213
214
  * @param {string[]} topics
214
215
  * @param {string[]} users
215
216
  * @param {string[]} targets
216
- * @param {string} description
217
217
  * @param {object} data
218
218
  * @param {string} action
219
+ * @param {string} image
219
220
  * @param {string} icon
220
221
  * @param {string} sound
221
222
  * @param {string} color
222
223
  * @param {string} tag
223
224
  * @param {string} badge
224
- * @param {string} status
225
+ * @param {boolean} draft
225
226
  * @param {string} scheduledAt
226
227
  * @throws {AppwriteException}
227
228
  * @returns {Promise}
228
229
  */
229
- async createPush(messageId: string, title: string, body: string, topics?: string[], users?: string[], targets?: string[], description?: string, data?: object, action?: string, icon?: string, sound?: string, color?: string, tag?: string, badge?: string, status?: string, scheduledAt?: string): Promise<Models.Message> {
230
+ async createPush(messageId: string, title: string, body: string, topics?: string[], users?: string[], targets?: string[], data?: object, action?: string, image?: string, icon?: string, sound?: string, color?: string, tag?: string, badge?: string, draft?: boolean, scheduledAt?: string): Promise<Models.Message> {
230
231
  if (typeof messageId === 'undefined') {
231
232
  throw new AppwriteException('Missing required parameter: "messageId"');
232
233
  }
@@ -266,10 +267,6 @@ export class Messaging extends Service {
266
267
  payload['targets'] = targets;
267
268
  }
268
269
 
269
- if (typeof description !== 'undefined') {
270
- payload['description'] = description;
271
- }
272
-
273
270
  if (typeof data !== 'undefined') {
274
271
  payload['data'] = data;
275
272
  }
@@ -278,6 +275,10 @@ export class Messaging extends Service {
278
275
  payload['action'] = action;
279
276
  }
280
277
 
278
+ if (typeof image !== 'undefined') {
279
+ payload['image'] = image;
280
+ }
281
+
281
282
  if (typeof icon !== 'undefined') {
282
283
  payload['icon'] = icon;
283
284
  }
@@ -298,8 +299,8 @@ export class Messaging extends Service {
298
299
  payload['badge'] = badge;
299
300
  }
300
301
 
301
- if (typeof status !== 'undefined') {
302
- payload['status'] = status;
302
+ if (typeof draft !== 'undefined') {
303
+ payload['draft'] = draft;
303
304
  }
304
305
 
305
306
  if (typeof scheduledAt !== 'undefined') {
@@ -313,29 +314,31 @@ export class Messaging extends Service {
313
314
  }
314
315
 
315
316
  /**
316
- * Update a push notification.
317
+ * Update push notification
317
318
  *
319
+ * Update a push notification by its unique ID.
320
+ *
318
321
  *
319
322
  * @param {string} messageId
320
323
  * @param {string[]} topics
321
324
  * @param {string[]} users
322
325
  * @param {string[]} targets
323
- * @param {string} description
324
326
  * @param {string} title
325
327
  * @param {string} body
326
328
  * @param {object} data
327
329
  * @param {string} action
330
+ * @param {string} image
328
331
  * @param {string} icon
329
332
  * @param {string} sound
330
333
  * @param {string} color
331
334
  * @param {string} tag
332
335
  * @param {number} badge
333
- * @param {string} status
336
+ * @param {boolean} draft
334
337
  * @param {string} scheduledAt
335
338
  * @throws {AppwriteException}
336
339
  * @returns {Promise}
337
340
  */
338
- async updatePushNotification(messageId: string, topics?: string[], users?: string[], targets?: string[], description?: string, title?: string, body?: string, data?: object, action?: string, icon?: string, sound?: string, color?: string, tag?: string, badge?: number, status?: string, scheduledAt?: string): Promise<Models.Message> {
341
+ async updatePush(messageId: string, topics?: string[], users?: string[], targets?: string[], title?: string, body?: string, data?: object, action?: string, image?: string, icon?: string, sound?: string, color?: string, tag?: string, badge?: number, draft?: boolean, scheduledAt?: string): Promise<Models.Message> {
339
342
  if (typeof messageId === 'undefined') {
340
343
  throw new AppwriteException('Missing required parameter: "messageId"');
341
344
  }
@@ -355,10 +358,6 @@ export class Messaging extends Service {
355
358
  payload['targets'] = targets;
356
359
  }
357
360
 
358
- if (typeof description !== 'undefined') {
359
- payload['description'] = description;
360
- }
361
-
362
361
  if (typeof title !== 'undefined') {
363
362
  payload['title'] = title;
364
363
  }
@@ -375,6 +374,10 @@ export class Messaging extends Service {
375
374
  payload['action'] = action;
376
375
  }
377
376
 
377
+ if (typeof image !== 'undefined') {
378
+ payload['image'] = image;
379
+ }
380
+
378
381
  if (typeof icon !== 'undefined') {
379
382
  payload['icon'] = icon;
380
383
  }
@@ -395,8 +398,8 @@ export class Messaging extends Service {
395
398
  payload['badge'] = badge;
396
399
  }
397
400
 
398
- if (typeof status !== 'undefined') {
399
- payload['status'] = status;
401
+ if (typeof draft !== 'undefined') {
402
+ payload['draft'] = draft;
400
403
  }
401
404
 
402
405
  if (typeof scheduledAt !== 'undefined') {
@@ -410,21 +413,21 @@ export class Messaging extends Service {
410
413
  }
411
414
 
412
415
  /**
413
- * Create an SMS.
416
+ * Create SMS
414
417
  *
418
+ * Create a new SMS message.
415
419
  *
416
420
  * @param {string} messageId
417
421
  * @param {string} content
418
422
  * @param {string[]} topics
419
423
  * @param {string[]} users
420
424
  * @param {string[]} targets
421
- * @param {string} description
422
- * @param {string} status
425
+ * @param {boolean} draft
423
426
  * @param {string} scheduledAt
424
427
  * @throws {AppwriteException}
425
428
  * @returns {Promise}
426
429
  */
427
- async createSMS(messageId: string, content: string, topics?: string[], users?: string[], targets?: string[], description?: string, status?: string, scheduledAt?: string): Promise<Models.Message> {
430
+ async createSms(messageId: string, content: string, topics?: string[], users?: string[], targets?: string[], draft?: boolean, scheduledAt?: string): Promise<Models.Message> {
428
431
  if (typeof messageId === 'undefined') {
429
432
  throw new AppwriteException('Missing required parameter: "messageId"');
430
433
  }
@@ -456,12 +459,8 @@ export class Messaging extends Service {
456
459
  payload['targets'] = targets;
457
460
  }
458
461
 
459
- if (typeof description !== 'undefined') {
460
- payload['description'] = description;
461
- }
462
-
463
- if (typeof status !== 'undefined') {
464
- payload['status'] = status;
462
+ if (typeof draft !== 'undefined') {
463
+ payload['draft'] = draft;
465
464
  }
466
465
 
467
466
  if (typeof scheduledAt !== 'undefined') {
@@ -475,21 +474,22 @@ export class Messaging extends Service {
475
474
  }
476
475
 
477
476
  /**
478
- * Update an SMS.
477
+ * Update SMS
479
478
  *
479
+ * Update an email message by its unique ID.
480
+ *
480
481
  *
481
482
  * @param {string} messageId
482
483
  * @param {string[]} topics
483
484
  * @param {string[]} users
484
485
  * @param {string[]} targets
485
- * @param {string} description
486
486
  * @param {string} content
487
- * @param {string} status
487
+ * @param {boolean} draft
488
488
  * @param {string} scheduledAt
489
489
  * @throws {AppwriteException}
490
490
  * @returns {Promise}
491
491
  */
492
- async updateSMS(messageId: string, topics?: string[], users?: string[], targets?: string[], description?: string, content?: string, status?: string, scheduledAt?: string): Promise<Models.Message> {
492
+ async updateSms(messageId: string, topics?: string[], users?: string[], targets?: string[], content?: string, draft?: boolean, scheduledAt?: string): Promise<Models.Message> {
493
493
  if (typeof messageId === 'undefined') {
494
494
  throw new AppwriteException('Missing required parameter: "messageId"');
495
495
  }
@@ -509,16 +509,12 @@ export class Messaging extends Service {
509
509
  payload['targets'] = targets;
510
510
  }
511
511
 
512
- if (typeof description !== 'undefined') {
513
- payload['description'] = description;
514
- }
515
-
516
512
  if (typeof content !== 'undefined') {
517
513
  payload['content'] = content;
518
514
  }
519
515
 
520
- if (typeof status !== 'undefined') {
521
- payload['status'] = status;
516
+ if (typeof draft !== 'undefined') {
517
+ payload['draft'] = draft;
522
518
  }
523
519
 
524
520
  if (typeof scheduledAt !== 'undefined') {
@@ -532,8 +528,10 @@ export class Messaging extends Service {
532
528
  }
533
529
 
534
530
  /**
535
- * Get a message
531
+ * Get message
536
532
  *
533
+ * Get a message by its unique ID.
534
+ *
537
535
  *
538
536
  * @param {string} messageId
539
537
  * @throws {AppwriteException}
@@ -553,9 +551,34 @@ export class Messaging extends Service {
553
551
  }, payload);
554
552
  }
555
553
 
554
+ /**
555
+ * Delete message
556
+ *
557
+ * Delete a message. If the message is not a draft or scheduled, but has been
558
+ * sent, this will not recall the message.
559
+ *
560
+ * @param {string} messageId
561
+ * @throws {AppwriteException}
562
+ * @returns {Promise}
563
+ */
564
+ async delete(messageId: string): Promise<{}> {
565
+ if (typeof messageId === 'undefined') {
566
+ throw new AppwriteException('Missing required parameter: "messageId"');
567
+ }
568
+
569
+ const apiPath = '/messaging/messages/{messageId}'.replace('{messageId}', messageId);
570
+ const payload: Payload = {};
571
+
572
+ const uri = new URL(this.client.config.endpoint + apiPath);
573
+ return await this.client.call('delete', uri, {
574
+ 'content-type': 'application/json',
575
+ }, payload);
576
+ }
577
+
556
578
  /**
557
579
  * List message logs
558
580
  *
581
+ * Get the message activity logs listed by its unique ID.
559
582
  *
560
583
  * @param {string} messageId
561
584
  * @param {string[]} queries
@@ -583,15 +606,14 @@ export class Messaging extends Service {
583
606
  /**
584
607
  * List message targets
585
608
  *
586
- * List the targets associated with a message as set via the targets
587
- * attribute.
609
+ * Get a list of the targets associated with a message.
588
610
  *
589
611
  * @param {string} messageId
590
- * @param {string} queries
612
+ * @param {string[]} queries
591
613
  * @throws {AppwriteException}
592
614
  * @returns {Promise}
593
615
  */
594
- async listTargets(messageId: string, queries?: string): Promise<Models.TargetList> {
616
+ async listTargets(messageId: string, queries?: string[]): Promise<Models.TargetList> {
595
617
  if (typeof messageId === 'undefined') {
596
618
  throw new AppwriteException('Missing required parameter: "messageId"');
597
619
  }
@@ -612,13 +634,14 @@ export class Messaging extends Service {
612
634
  /**
613
635
  * List providers
614
636
  *
637
+ * Get a list of all providers from the current Appwrite project.
615
638
  *
616
- * @param {string} queries
639
+ * @param {string[]} queries
617
640
  * @param {string} search
618
641
  * @throws {AppwriteException}
619
642
  * @returns {Promise}
620
643
  */
621
- async listProviders(queries?: string, search?: string): Promise<Models.ProviderList> {
644
+ async listProviders(queries?: string[], search?: string): Promise<Models.ProviderList> {
622
645
  const apiPath = '/messaging/providers';
623
646
  const payload: Payload = {};
624
647
 
@@ -639,6 +662,7 @@ export class Messaging extends Service {
639
662
  /**
640
663
  * Create APNS provider
641
664
  *
665
+ * Create a new Apple Push Notification service provider.
642
666
  *
643
667
  * @param {string} providerId
644
668
  * @param {string} name
@@ -646,11 +670,12 @@ export class Messaging extends Service {
646
670
  * @param {string} authKeyId
647
671
  * @param {string} teamId
648
672
  * @param {string} bundleId
673
+ * @param {boolean} sandbox
649
674
  * @param {boolean} enabled
650
675
  * @throws {AppwriteException}
651
676
  * @returns {Promise}
652
677
  */
653
- async createAPNSProvider(providerId: string, name: string, authKey?: string, authKeyId?: string, teamId?: string, bundleId?: string, enabled?: boolean): Promise<Models.Provider> {
678
+ async createApnsProvider(providerId: string, name: string, authKey?: string, authKeyId?: string, teamId?: string, bundleId?: string, sandbox?: boolean, enabled?: boolean): Promise<Models.Provider> {
654
679
  if (typeof providerId === 'undefined') {
655
680
  throw new AppwriteException('Missing required parameter: "providerId"');
656
681
  }
@@ -686,6 +711,10 @@ export class Messaging extends Service {
686
711
  payload['bundleId'] = bundleId;
687
712
  }
688
713
 
714
+ if (typeof sandbox !== 'undefined') {
715
+ payload['sandbox'] = sandbox;
716
+ }
717
+
689
718
  if (typeof enabled !== 'undefined') {
690
719
  payload['enabled'] = enabled;
691
720
  }
@@ -699,6 +728,7 @@ export class Messaging extends Service {
699
728
  /**
700
729
  * Update APNS provider
701
730
  *
731
+ * Update a Apple Push Notification service provider by its unique ID.
702
732
  *
703
733
  * @param {string} providerId
704
734
  * @param {string} name
@@ -707,10 +737,11 @@ export class Messaging extends Service {
707
737
  * @param {string} authKeyId
708
738
  * @param {string} teamId
709
739
  * @param {string} bundleId
740
+ * @param {boolean} sandbox
710
741
  * @throws {AppwriteException}
711
742
  * @returns {Promise}
712
743
  */
713
- async updateAPNSProvider(providerId: string, name?: string, enabled?: boolean, authKey?: string, authKeyId?: string, teamId?: string, bundleId?: string): Promise<Models.Provider> {
744
+ async updateApnsProvider(providerId: string, name?: string, enabled?: boolean, authKey?: string, authKeyId?: string, teamId?: string, bundleId?: string, sandbox?: boolean): Promise<Models.Provider> {
714
745
  if (typeof providerId === 'undefined') {
715
746
  throw new AppwriteException('Missing required parameter: "providerId"');
716
747
  }
@@ -742,6 +773,10 @@ export class Messaging extends Service {
742
773
  payload['bundleId'] = bundleId;
743
774
  }
744
775
 
776
+ if (typeof sandbox !== 'undefined') {
777
+ payload['sandbox'] = sandbox;
778
+ }
779
+
745
780
  const uri = new URL(this.client.config.endpoint + apiPath);
746
781
  return await this.client.call('patch', uri, {
747
782
  'content-type': 'application/json',
@@ -751,6 +786,7 @@ export class Messaging extends Service {
751
786
  /**
752
787
  * Create FCM provider
753
788
  *
789
+ * Create a new Firebase Cloud Messaging provider.
754
790
  *
755
791
  * @param {string} providerId
756
792
  * @param {string} name
@@ -759,7 +795,7 @@ export class Messaging extends Service {
759
795
  * @throws {AppwriteException}
760
796
  * @returns {Promise}
761
797
  */
762
- async createFCMProvider(providerId: string, name: string, serviceAccountJSON?: object, enabled?: boolean): Promise<Models.Provider> {
798
+ async createFcmProvider(providerId: string, name: string, serviceAccountJSON?: object, enabled?: boolean): Promise<Models.Provider> {
763
799
  if (typeof providerId === 'undefined') {
764
800
  throw new AppwriteException('Missing required parameter: "providerId"');
765
801
  }
@@ -796,6 +832,7 @@ export class Messaging extends Service {
796
832
  /**
797
833
  * Update FCM provider
798
834
  *
835
+ * Update a Firebase Cloud Messaging provider by its unique ID.
799
836
  *
800
837
  * @param {string} providerId
801
838
  * @param {string} name
@@ -804,7 +841,7 @@ export class Messaging extends Service {
804
841
  * @throws {AppwriteException}
805
842
  * @returns {Promise}
806
843
  */
807
- async updateFCMProvider(providerId: string, name?: string, enabled?: boolean, serviceAccountJSON?: object): Promise<Models.Provider> {
844
+ async updateFcmProvider(providerId: string, name?: string, enabled?: boolean, serviceAccountJSON?: object): Promise<Models.Provider> {
808
845
  if (typeof providerId === 'undefined') {
809
846
  throw new AppwriteException('Missing required parameter: "providerId"');
810
847
  }
@@ -833,21 +870,22 @@ export class Messaging extends Service {
833
870
  /**
834
871
  * Create Mailgun provider
835
872
  *
873
+ * Create a new Mailgun provider.
836
874
  *
837
875
  * @param {string} providerId
838
876
  * @param {string} name
839
877
  * @param {string} apiKey
840
878
  * @param {string} domain
841
879
  * @param {boolean} isEuRegion
842
- * @param {boolean} enabled
843
880
  * @param {string} fromName
844
881
  * @param {string} fromEmail
845
882
  * @param {string} replyToName
846
883
  * @param {string} replyToEmail
884
+ * @param {boolean} enabled
847
885
  * @throws {AppwriteException}
848
886
  * @returns {Promise}
849
887
  */
850
- async createMailgunProvider(providerId: string, name: string, apiKey?: string, domain?: string, isEuRegion?: boolean, enabled?: boolean, fromName?: string, fromEmail?: string, replyToName?: string, replyToEmail?: string): Promise<Models.Provider> {
888
+ async createMailgunProvider(providerId: string, name: string, apiKey?: string, domain?: string, isEuRegion?: boolean, fromName?: string, fromEmail?: string, replyToName?: string, replyToEmail?: string, enabled?: boolean): Promise<Models.Provider> {
851
889
  if (typeof providerId === 'undefined') {
852
890
  throw new AppwriteException('Missing required parameter: "providerId"');
853
891
  }
@@ -879,10 +917,6 @@ export class Messaging extends Service {
879
917
  payload['isEuRegion'] = isEuRegion;
880
918
  }
881
919
 
882
- if (typeof enabled !== 'undefined') {
883
- payload['enabled'] = enabled;
884
- }
885
-
886
920
  if (typeof fromName !== 'undefined') {
887
921
  payload['fromName'] = fromName;
888
922
  }
@@ -899,6 +933,10 @@ export class Messaging extends Service {
899
933
  payload['replyToEmail'] = replyToEmail;
900
934
  }
901
935
 
936
+ if (typeof enabled !== 'undefined') {
937
+ payload['enabled'] = enabled;
938
+ }
939
+
902
940
  const uri = new URL(this.client.config.endpoint + apiPath);
903
941
  return await this.client.call('post', uri, {
904
942
  'content-type': 'application/json',
@@ -908,6 +946,7 @@ export class Messaging extends Service {
908
946
  /**
909
947
  * Update Mailgun provider
910
948
  *
949
+ * Update a Mailgun provider by its unique ID.
911
950
  *
912
951
  * @param {string} providerId
913
952
  * @param {string} name
@@ -975,6 +1014,7 @@ export class Messaging extends Service {
975
1014
  /**
976
1015
  * Create Msg91 provider
977
1016
  *
1017
+ * Create a new MSG91 provider.
978
1018
  *
979
1019
  * @param {string} providerId
980
1020
  * @param {string} name
@@ -1030,6 +1070,7 @@ export class Messaging extends Service {
1030
1070
  /**
1031
1071
  * Update Msg91 provider
1032
1072
  *
1073
+ * Update a MSG91 provider by its unique ID.
1033
1074
  *
1034
1075
  * @param {string} providerId
1035
1076
  * @param {string} name
@@ -1077,19 +1118,20 @@ export class Messaging extends Service {
1077
1118
  /**
1078
1119
  * Create Sendgrid provider
1079
1120
  *
1121
+ * Create a new Sendgrid provider.
1080
1122
  *
1081
1123
  * @param {string} providerId
1082
1124
  * @param {string} name
1083
1125
  * @param {string} apiKey
1084
- * @param {boolean} enabled
1085
1126
  * @param {string} fromName
1086
1127
  * @param {string} fromEmail
1087
1128
  * @param {string} replyToName
1088
1129
  * @param {string} replyToEmail
1130
+ * @param {boolean} enabled
1089
1131
  * @throws {AppwriteException}
1090
1132
  * @returns {Promise}
1091
1133
  */
1092
- async createSendgridProvider(providerId: string, name: string, apiKey?: string, enabled?: boolean, fromName?: string, fromEmail?: string, replyToName?: string, replyToEmail?: string): Promise<Models.Provider> {
1134
+ async createSendgridProvider(providerId: string, name: string, apiKey?: string, fromName?: string, fromEmail?: string, replyToName?: string, replyToEmail?: string, enabled?: boolean): Promise<Models.Provider> {
1093
1135
  if (typeof providerId === 'undefined') {
1094
1136
  throw new AppwriteException('Missing required parameter: "providerId"');
1095
1137
  }
@@ -1113,10 +1155,6 @@ export class Messaging extends Service {
1113
1155
  payload['apiKey'] = apiKey;
1114
1156
  }
1115
1157
 
1116
- if (typeof enabled !== 'undefined') {
1117
- payload['enabled'] = enabled;
1118
- }
1119
-
1120
1158
  if (typeof fromName !== 'undefined') {
1121
1159
  payload['fromName'] = fromName;
1122
1160
  }
@@ -1133,6 +1171,10 @@ export class Messaging extends Service {
1133
1171
  payload['replyToEmail'] = replyToEmail;
1134
1172
  }
1135
1173
 
1174
+ if (typeof enabled !== 'undefined') {
1175
+ payload['enabled'] = enabled;
1176
+ }
1177
+
1136
1178
  const uri = new URL(this.client.config.endpoint + apiPath);
1137
1179
  return await this.client.call('post', uri, {
1138
1180
  'content-type': 'application/json',
@@ -1142,6 +1184,7 @@ export class Messaging extends Service {
1142
1184
  /**
1143
1185
  * Update Sendgrid provider
1144
1186
  *
1187
+ * Update a Sendgrid provider by its unique ID.
1145
1188
  *
1146
1189
  * @param {string} providerId
1147
1190
  * @param {string} name
@@ -1197,19 +1240,28 @@ export class Messaging extends Service {
1197
1240
  }
1198
1241
 
1199
1242
  /**
1200
- * Create Telesign provider
1243
+ * Create SMTP provider
1201
1244
  *
1245
+ * Create a new SMTP provider.
1202
1246
  *
1203
1247
  * @param {string} providerId
1204
1248
  * @param {string} name
1205
- * @param {string} from
1249
+ * @param {string} host
1250
+ * @param {number} port
1206
1251
  * @param {string} username
1207
1252
  * @param {string} password
1253
+ * @param {SmtpEncryption} encryption
1254
+ * @param {boolean} autoTLS
1255
+ * @param {string} mailer
1256
+ * @param {string} fromName
1257
+ * @param {string} fromEmail
1258
+ * @param {string} replyToName
1259
+ * @param {string} replyToEmail
1208
1260
  * @param {boolean} enabled
1209
1261
  * @throws {AppwriteException}
1210
1262
  * @returns {Promise}
1211
1263
  */
1212
- async createTelesignProvider(providerId: string, name: string, from?: string, username?: string, password?: string, enabled?: boolean): Promise<Models.Provider> {
1264
+ async createSmtpProvider(providerId: string, name: string, host: string, port?: number, username?: string, password?: string, encryption?: SmtpEncryption, autoTLS?: boolean, mailer?: string, fromName?: string, fromEmail?: string, replyToName?: string, replyToEmail?: string, enabled?: boolean): Promise<Models.Provider> {
1213
1265
  if (typeof providerId === 'undefined') {
1214
1266
  throw new AppwriteException('Missing required parameter: "providerId"');
1215
1267
  }
@@ -1218,7 +1270,11 @@ export class Messaging extends Service {
1218
1270
  throw new AppwriteException('Missing required parameter: "name"');
1219
1271
  }
1220
1272
 
1221
- const apiPath = '/messaging/providers/telesign';
1273
+ if (typeof host === 'undefined') {
1274
+ throw new AppwriteException('Missing required parameter: "host"');
1275
+ }
1276
+
1277
+ const apiPath = '/messaging/providers/smtp';
1222
1278
  const payload: Payload = {};
1223
1279
 
1224
1280
  if (typeof providerId !== 'undefined') {
@@ -1229,8 +1285,12 @@ export class Messaging extends Service {
1229
1285
  payload['name'] = name;
1230
1286
  }
1231
1287
 
1232
- if (typeof from !== 'undefined') {
1233
- payload['from'] = from;
1288
+ if (typeof host !== 'undefined') {
1289
+ payload['host'] = host;
1290
+ }
1291
+
1292
+ if (typeof port !== 'undefined') {
1293
+ payload['port'] = port;
1234
1294
  }
1235
1295
 
1236
1296
  if (typeof username !== 'undefined') {
@@ -1241,6 +1301,34 @@ export class Messaging extends Service {
1241
1301
  payload['password'] = password;
1242
1302
  }
1243
1303
 
1304
+ if (typeof encryption !== 'undefined') {
1305
+ payload['encryption'] = encryption;
1306
+ }
1307
+
1308
+ if (typeof autoTLS !== 'undefined') {
1309
+ payload['autoTLS'] = autoTLS;
1310
+ }
1311
+
1312
+ if (typeof mailer !== 'undefined') {
1313
+ payload['mailer'] = mailer;
1314
+ }
1315
+
1316
+ if (typeof fromName !== 'undefined') {
1317
+ payload['fromName'] = fromName;
1318
+ }
1319
+
1320
+ if (typeof fromEmail !== 'undefined') {
1321
+ payload['fromEmail'] = fromEmail;
1322
+ }
1323
+
1324
+ if (typeof replyToName !== 'undefined') {
1325
+ payload['replyToName'] = replyToName;
1326
+ }
1327
+
1328
+ if (typeof replyToEmail !== 'undefined') {
1329
+ payload['replyToEmail'] = replyToEmail;
1330
+ }
1331
+
1244
1332
  if (typeof enabled !== 'undefined') {
1245
1333
  payload['enabled'] = enabled;
1246
1334
  }
@@ -1252,32 +1340,45 @@ export class Messaging extends Service {
1252
1340
  }
1253
1341
 
1254
1342
  /**
1255
- * Update Telesign provider
1343
+ * Update SMTP provider
1256
1344
  *
1345
+ * Update a SMTP provider by its unique ID.
1257
1346
  *
1258
1347
  * @param {string} providerId
1259
1348
  * @param {string} name
1260
- * @param {boolean} enabled
1349
+ * @param {string} host
1350
+ * @param {number} port
1261
1351
  * @param {string} username
1262
1352
  * @param {string} password
1263
- * @param {string} from
1353
+ * @param {SmtpEncryption} encryption
1354
+ * @param {boolean} autoTLS
1355
+ * @param {string} mailer
1356
+ * @param {string} fromName
1357
+ * @param {string} fromEmail
1358
+ * @param {string} replyToName
1359
+ * @param {string} replyToEmail
1360
+ * @param {boolean} enabled
1264
1361
  * @throws {AppwriteException}
1265
1362
  * @returns {Promise}
1266
1363
  */
1267
- async updateTelesignProvider(providerId: string, name?: string, enabled?: boolean, username?: string, password?: string, from?: string): Promise<Models.Provider> {
1364
+ async updateSmtpProvider(providerId: string, name?: string, host?: string, port?: number, username?: string, password?: string, encryption?: SmtpEncryption, autoTLS?: boolean, mailer?: string, fromName?: string, fromEmail?: string, replyToName?: string, replyToEmail?: string, enabled?: boolean): Promise<Models.Provider> {
1268
1365
  if (typeof providerId === 'undefined') {
1269
1366
  throw new AppwriteException('Missing required parameter: "providerId"');
1270
1367
  }
1271
1368
 
1272
- const apiPath = '/messaging/providers/telesign/{providerId}'.replace('{providerId}', providerId);
1369
+ const apiPath = '/messaging/providers/smtp/{providerId}'.replace('{providerId}', providerId);
1273
1370
  const payload: Payload = {};
1274
1371
 
1275
1372
  if (typeof name !== 'undefined') {
1276
1373
  payload['name'] = name;
1277
1374
  }
1278
1375
 
1279
- if (typeof enabled !== 'undefined') {
1280
- payload['enabled'] = enabled;
1376
+ if (typeof host !== 'undefined') {
1377
+ payload['host'] = host;
1378
+ }
1379
+
1380
+ if (typeof port !== 'undefined') {
1381
+ payload['port'] = port;
1281
1382
  }
1282
1383
 
1283
1384
  if (typeof username !== 'undefined') {
@@ -1288,6 +1389,138 @@ export class Messaging extends Service {
1288
1389
  payload['password'] = password;
1289
1390
  }
1290
1391
 
1392
+ if (typeof encryption !== 'undefined') {
1393
+ payload['encryption'] = encryption;
1394
+ }
1395
+
1396
+ if (typeof autoTLS !== 'undefined') {
1397
+ payload['autoTLS'] = autoTLS;
1398
+ }
1399
+
1400
+ if (typeof mailer !== 'undefined') {
1401
+ payload['mailer'] = mailer;
1402
+ }
1403
+
1404
+ if (typeof fromName !== 'undefined') {
1405
+ payload['fromName'] = fromName;
1406
+ }
1407
+
1408
+ if (typeof fromEmail !== 'undefined') {
1409
+ payload['fromEmail'] = fromEmail;
1410
+ }
1411
+
1412
+ if (typeof replyToName !== 'undefined') {
1413
+ payload['replyToName'] = replyToName;
1414
+ }
1415
+
1416
+ if (typeof replyToEmail !== 'undefined') {
1417
+ payload['replyToEmail'] = replyToEmail;
1418
+ }
1419
+
1420
+ if (typeof enabled !== 'undefined') {
1421
+ payload['enabled'] = enabled;
1422
+ }
1423
+
1424
+ const uri = new URL(this.client.config.endpoint + apiPath);
1425
+ return await this.client.call('patch', uri, {
1426
+ 'content-type': 'application/json',
1427
+ }, payload);
1428
+ }
1429
+
1430
+ /**
1431
+ * Create Telesign provider
1432
+ *
1433
+ * Create a new Telesign provider.
1434
+ *
1435
+ * @param {string} providerId
1436
+ * @param {string} name
1437
+ * @param {string} from
1438
+ * @param {string} customerId
1439
+ * @param {string} apiKey
1440
+ * @param {boolean} enabled
1441
+ * @throws {AppwriteException}
1442
+ * @returns {Promise}
1443
+ */
1444
+ async createTelesignProvider(providerId: string, name: string, from?: string, customerId?: string, apiKey?: string, enabled?: boolean): Promise<Models.Provider> {
1445
+ if (typeof providerId === 'undefined') {
1446
+ throw new AppwriteException('Missing required parameter: "providerId"');
1447
+ }
1448
+
1449
+ if (typeof name === 'undefined') {
1450
+ throw new AppwriteException('Missing required parameter: "name"');
1451
+ }
1452
+
1453
+ const apiPath = '/messaging/providers/telesign';
1454
+ const payload: Payload = {};
1455
+
1456
+ if (typeof providerId !== 'undefined') {
1457
+ payload['providerId'] = providerId;
1458
+ }
1459
+
1460
+ if (typeof name !== 'undefined') {
1461
+ payload['name'] = name;
1462
+ }
1463
+
1464
+ if (typeof from !== 'undefined') {
1465
+ payload['from'] = from;
1466
+ }
1467
+
1468
+ if (typeof customerId !== 'undefined') {
1469
+ payload['customerId'] = customerId;
1470
+ }
1471
+
1472
+ if (typeof apiKey !== 'undefined') {
1473
+ payload['apiKey'] = apiKey;
1474
+ }
1475
+
1476
+ if (typeof enabled !== 'undefined') {
1477
+ payload['enabled'] = enabled;
1478
+ }
1479
+
1480
+ const uri = new URL(this.client.config.endpoint + apiPath);
1481
+ return await this.client.call('post', uri, {
1482
+ 'content-type': 'application/json',
1483
+ }, payload);
1484
+ }
1485
+
1486
+ /**
1487
+ * Update Telesign provider
1488
+ *
1489
+ * Update a Telesign provider by its unique ID.
1490
+ *
1491
+ * @param {string} providerId
1492
+ * @param {string} name
1493
+ * @param {boolean} enabled
1494
+ * @param {string} customerId
1495
+ * @param {string} apiKey
1496
+ * @param {string} from
1497
+ * @throws {AppwriteException}
1498
+ * @returns {Promise}
1499
+ */
1500
+ async updateTelesignProvider(providerId: string, name?: string, enabled?: boolean, customerId?: string, apiKey?: string, from?: string): Promise<Models.Provider> {
1501
+ if (typeof providerId === 'undefined') {
1502
+ throw new AppwriteException('Missing required parameter: "providerId"');
1503
+ }
1504
+
1505
+ const apiPath = '/messaging/providers/telesign/{providerId}'.replace('{providerId}', providerId);
1506
+ const payload: Payload = {};
1507
+
1508
+ if (typeof name !== 'undefined') {
1509
+ payload['name'] = name;
1510
+ }
1511
+
1512
+ if (typeof enabled !== 'undefined') {
1513
+ payload['enabled'] = enabled;
1514
+ }
1515
+
1516
+ if (typeof customerId !== 'undefined') {
1517
+ payload['customerId'] = customerId;
1518
+ }
1519
+
1520
+ if (typeof apiKey !== 'undefined') {
1521
+ payload['apiKey'] = apiKey;
1522
+ }
1523
+
1291
1524
  if (typeof from !== 'undefined') {
1292
1525
  payload['from'] = from;
1293
1526
  }
@@ -1301,6 +1534,7 @@ export class Messaging extends Service {
1301
1534
  /**
1302
1535
  * Create Textmagic provider
1303
1536
  *
1537
+ * Create a new Textmagic provider.
1304
1538
  *
1305
1539
  * @param {string} providerId
1306
1540
  * @param {string} name
@@ -1356,6 +1590,7 @@ export class Messaging extends Service {
1356
1590
  /**
1357
1591
  * Update Textmagic provider
1358
1592
  *
1593
+ * Update a Textmagic provider by its unique ID.
1359
1594
  *
1360
1595
  * @param {string} providerId
1361
1596
  * @param {string} name
@@ -1403,6 +1638,7 @@ export class Messaging extends Service {
1403
1638
  /**
1404
1639
  * Create Twilio provider
1405
1640
  *
1641
+ * Create a new Twilio provider.
1406
1642
  *
1407
1643
  * @param {string} providerId
1408
1644
  * @param {string} name
@@ -1458,6 +1694,7 @@ export class Messaging extends Service {
1458
1694
  /**
1459
1695
  * Update Twilio provider
1460
1696
  *
1697
+ * Update a Twilio provider by its unique ID.
1461
1698
  *
1462
1699
  * @param {string} providerId
1463
1700
  * @param {string} name
@@ -1505,6 +1742,7 @@ export class Messaging extends Service {
1505
1742
  /**
1506
1743
  * Create Vonage provider
1507
1744
  *
1745
+ * Create a new Vonage provider.
1508
1746
  *
1509
1747
  * @param {string} providerId
1510
1748
  * @param {string} name
@@ -1560,6 +1798,7 @@ export class Messaging extends Service {
1560
1798
  /**
1561
1799
  * Update Vonage provider
1562
1800
  *
1801
+ * Update a Vonage provider by its unique ID.
1563
1802
  *
1564
1803
  * @param {string} providerId
1565
1804
  * @param {string} name
@@ -1607,6 +1846,8 @@ export class Messaging extends Service {
1607
1846
  /**
1608
1847
  * Get provider
1609
1848
  *
1849
+ * Get a provider by its unique ID.
1850
+ *
1610
1851
  *
1611
1852
  * @param {string} providerId
1612
1853
  * @throws {AppwriteException}
@@ -1629,6 +1870,7 @@ export class Messaging extends Service {
1629
1870
  /**
1630
1871
  * Delete provider
1631
1872
  *
1873
+ * Delete a provider by its unique ID.
1632
1874
  *
1633
1875
  * @param {string} providerId
1634
1876
  * @throws {AppwriteException}
@@ -1651,6 +1893,7 @@ export class Messaging extends Service {
1651
1893
  /**
1652
1894
  * List provider logs
1653
1895
  *
1896
+ * Get the provider activity logs listed by its unique ID.
1654
1897
  *
1655
1898
  * @param {string} providerId
1656
1899
  * @param {string[]} queries
@@ -1678,6 +1921,7 @@ export class Messaging extends Service {
1678
1921
  /**
1679
1922
  * List subscriber logs
1680
1923
  *
1924
+ * Get the subscriber activity logs listed by its unique ID.
1681
1925
  *
1682
1926
  * @param {string} subscriberId
1683
1927
  * @param {string[]} queries
@@ -1703,15 +1947,16 @@ export class Messaging extends Service {
1703
1947
  }
1704
1948
 
1705
1949
  /**
1706
- * List topics.
1950
+ * List topics
1707
1951
  *
1952
+ * Get a list of all topics from the current Appwrite project.
1708
1953
  *
1709
- * @param {string} queries
1954
+ * @param {string[]} queries
1710
1955
  * @param {string} search
1711
1956
  * @throws {AppwriteException}
1712
1957
  * @returns {Promise}
1713
1958
  */
1714
- async listTopics(queries?: string, search?: string): Promise<Models.TopicList> {
1959
+ async listTopics(queries?: string[], search?: string): Promise<Models.TopicList> {
1715
1960
  const apiPath = '/messaging/topics';
1716
1961
  const payload: Payload = {};
1717
1962
 
@@ -1730,16 +1975,17 @@ export class Messaging extends Service {
1730
1975
  }
1731
1976
 
1732
1977
  /**
1733
- * Create a topic.
1978
+ * Create topic
1734
1979
  *
1980
+ * Create a new topic.
1735
1981
  *
1736
1982
  * @param {string} topicId
1737
1983
  * @param {string} name
1738
- * @param {string} description
1984
+ * @param {string[]} subscribe
1739
1985
  * @throws {AppwriteException}
1740
1986
  * @returns {Promise}
1741
1987
  */
1742
- async createTopic(topicId: string, name: string, description?: string): Promise<Models.Topic> {
1988
+ async createTopic(topicId: string, name: string, subscribe?: string[]): Promise<Models.Topic> {
1743
1989
  if (typeof topicId === 'undefined') {
1744
1990
  throw new AppwriteException('Missing required parameter: "topicId"');
1745
1991
  }
@@ -1759,8 +2005,8 @@ export class Messaging extends Service {
1759
2005
  payload['name'] = name;
1760
2006
  }
1761
2007
 
1762
- if (typeof description !== 'undefined') {
1763
- payload['description'] = description;
2008
+ if (typeof subscribe !== 'undefined') {
2009
+ payload['subscribe'] = subscribe;
1764
2010
  }
1765
2011
 
1766
2012
  const uri = new URL(this.client.config.endpoint + apiPath);
@@ -1770,8 +2016,10 @@ export class Messaging extends Service {
1770
2016
  }
1771
2017
 
1772
2018
  /**
1773
- * Get a topic.
2019
+ * Get topic
1774
2020
  *
2021
+ * Get a topic by its unique ID.
2022
+ *
1775
2023
  *
1776
2024
  * @param {string} topicId
1777
2025
  * @throws {AppwriteException}
@@ -1792,16 +2040,18 @@ export class Messaging extends Service {
1792
2040
  }
1793
2041
 
1794
2042
  /**
1795
- * Update a topic.
2043
+ * Update topic
1796
2044
  *
2045
+ * Update a topic by its unique ID.
2046
+ *
1797
2047
  *
1798
2048
  * @param {string} topicId
1799
2049
  * @param {string} name
1800
- * @param {string} description
2050
+ * @param {string[]} subscribe
1801
2051
  * @throws {AppwriteException}
1802
2052
  * @returns {Promise}
1803
2053
  */
1804
- async updateTopic(topicId: string, name?: string, description?: string): Promise<Models.Topic> {
2054
+ async updateTopic(topicId: string, name?: string, subscribe?: string[]): Promise<Models.Topic> {
1805
2055
  if (typeof topicId === 'undefined') {
1806
2056
  throw new AppwriteException('Missing required parameter: "topicId"');
1807
2057
  }
@@ -1813,8 +2063,8 @@ export class Messaging extends Service {
1813
2063
  payload['name'] = name;
1814
2064
  }
1815
2065
 
1816
- if (typeof description !== 'undefined') {
1817
- payload['description'] = description;
2066
+ if (typeof subscribe !== 'undefined') {
2067
+ payload['subscribe'] = subscribe;
1818
2068
  }
1819
2069
 
1820
2070
  const uri = new URL(this.client.config.endpoint + apiPath);
@@ -1824,8 +2074,9 @@ export class Messaging extends Service {
1824
2074
  }
1825
2075
 
1826
2076
  /**
1827
- * Delete a topic.
2077
+ * Delete topic
1828
2078
  *
2079
+ * Delete a topic by its unique ID.
1829
2080
  *
1830
2081
  * @param {string} topicId
1831
2082
  * @throws {AppwriteException}
@@ -1848,6 +2099,7 @@ export class Messaging extends Service {
1848
2099
  /**
1849
2100
  * List topic logs
1850
2101
  *
2102
+ * Get the topic activity logs listed by its unique ID.
1851
2103
  *
1852
2104
  * @param {string} topicId
1853
2105
  * @param {string[]} queries
@@ -1873,16 +2125,17 @@ export class Messaging extends Service {
1873
2125
  }
1874
2126
 
1875
2127
  /**
1876
- * List subscribers.
2128
+ * List subscribers
1877
2129
  *
2130
+ * Get a list of all subscribers from the current Appwrite project.
1878
2131
  *
1879
2132
  * @param {string} topicId
1880
- * @param {string} queries
2133
+ * @param {string[]} queries
1881
2134
  * @param {string} search
1882
2135
  * @throws {AppwriteException}
1883
2136
  * @returns {Promise}
1884
2137
  */
1885
- async listSubscribers(topicId: string, queries?: string, search?: string): Promise<Models.SubscriberList> {
2138
+ async listSubscribers(topicId: string, queries?: string[], search?: string): Promise<Models.SubscriberList> {
1886
2139
  if (typeof topicId === 'undefined') {
1887
2140
  throw new AppwriteException('Missing required parameter: "topicId"');
1888
2141
  }
@@ -1905,8 +2158,9 @@ export class Messaging extends Service {
1905
2158
  }
1906
2159
 
1907
2160
  /**
1908
- * Create a subscriber.
2161
+ * Create subscriber
1909
2162
  *
2163
+ * Create a new subscriber.
1910
2164
  *
1911
2165
  * @param {string} topicId
1912
2166
  * @param {string} subscriberId
@@ -1945,8 +2199,10 @@ export class Messaging extends Service {
1945
2199
  }
1946
2200
 
1947
2201
  /**
1948
- * Get a subscriber.
2202
+ * Get subscriber
1949
2203
  *
2204
+ * Get a subscriber by its unique ID.
2205
+ *
1950
2206
  *
1951
2207
  * @param {string} topicId
1952
2208
  * @param {string} subscriberId
@@ -1972,8 +2228,9 @@ export class Messaging extends Service {
1972
2228
  }
1973
2229
 
1974
2230
  /**
1975
- * Delete a subscriber.
2231
+ * Delete subscriber
1976
2232
  *
2233
+ * Delete a subscriber by its unique ID.
1977
2234
  *
1978
2235
  * @param {string} topicId
1979
2236
  * @param {string} subscriberId