@appwrite.io/console 0.6.0-rc.9 → 0.6.1

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 (453) hide show
  1. package/.travis.yml +32 -0
  2. package/README.md +5 -5
  3. package/dist/cjs/sdk.js +1182 -438
  4. package/dist/cjs/sdk.js.map +1 -1
  5. package/dist/esm/sdk.js +1183 -439
  6. package/dist/esm/sdk.js.map +1 -1
  7. package/dist/iife/sdk.js +1182 -438
  8. package/docs/examples/account/create-anonymous-session.md +6 -13
  9. package/docs/examples/account/create-email-password-session.md +9 -13
  10. package/docs/examples/account/create-email-token.md +10 -13
  11. package/docs/examples/account/create-j-w-t.md +6 -13
  12. package/docs/examples/account/create-magic-u-r-l-token.md +11 -13
  13. package/docs/examples/account/create-mfa-authenticator.md +13 -0
  14. package/docs/examples/account/create-mfa-challenge.md +13 -0
  15. package/docs/examples/account/create-mfa-recovery-codes.md +11 -0
  16. package/docs/examples/account/create-o-auth2session.md +10 -9
  17. package/docs/examples/account/create-o-auth2token.md +15 -0
  18. package/docs/examples/account/create-phone-token.md +9 -13
  19. package/docs/examples/account/create-phone-verification.md +6 -13
  20. package/docs/examples/account/create-push-target.md +10 -13
  21. package/docs/examples/account/create-recovery.md +9 -13
  22. package/docs/examples/account/create-session.md +9 -13
  23. package/docs/examples/account/create-verification.md +8 -13
  24. package/docs/examples/account/create.md +11 -13
  25. package/docs/examples/account/delete-identity.md +8 -13
  26. package/docs/examples/account/delete-mfa-authenticator.md +14 -0
  27. package/docs/examples/account/delete-push-target.md +8 -13
  28. package/docs/examples/account/delete-session.md +8 -13
  29. package/docs/examples/account/delete-sessions.md +6 -13
  30. package/docs/examples/account/delete.md +6 -13
  31. package/docs/examples/account/get-mfa-recovery-codes.md +11 -0
  32. package/docs/examples/account/get-prefs.md +6 -13
  33. package/docs/examples/account/get-session.md +8 -13
  34. package/docs/examples/account/get.md +6 -13
  35. package/docs/examples/account/list-identities.md +8 -13
  36. package/docs/examples/account/list-logs.md +8 -13
  37. package/docs/examples/account/list-mfa-factors.md +11 -0
  38. package/docs/examples/account/list-sessions.md +6 -13
  39. package/docs/examples/account/update-email.md +9 -13
  40. package/docs/examples/account/update-m-f-a.md +8 -13
  41. package/docs/examples/account/update-magic-u-r-l-session.md +9 -13
  42. package/docs/examples/account/update-mfa-authenticator.md +14 -0
  43. package/docs/examples/account/update-mfa-challenge.md +14 -0
  44. package/docs/examples/account/update-mfa-recovery-codes.md +11 -0
  45. package/docs/examples/account/update-name.md +8 -13
  46. package/docs/examples/account/update-password.md +9 -13
  47. package/docs/examples/account/update-phone-session.md +14 -0
  48. package/docs/examples/account/update-phone-verification.md +9 -13
  49. package/docs/examples/account/update-phone.md +9 -13
  50. package/docs/examples/account/update-prefs.md +8 -13
  51. package/docs/examples/account/update-push-target.md +9 -13
  52. package/docs/examples/account/update-recovery.md +10 -13
  53. package/docs/examples/account/update-session.md +8 -13
  54. package/docs/examples/account/update-status.md +6 -13
  55. package/docs/examples/account/update-verification.md +9 -13
  56. package/docs/examples/assistant/chat.md +8 -13
  57. package/docs/examples/avatars/get-browser.md +11 -9
  58. package/docs/examples/avatars/get-credit-card.md +11 -9
  59. package/docs/examples/avatars/get-favicon.md +8 -9
  60. package/docs/examples/avatars/get-flag.md +11 -9
  61. package/docs/examples/avatars/get-image.md +10 -9
  62. package/docs/examples/avatars/get-initials.md +11 -9
  63. package/docs/examples/avatars/get-q-r.md +11 -9
  64. package/docs/examples/console/variables.md +6 -13
  65. package/docs/examples/databases/create-boolean-attribute.md +13 -13
  66. package/docs/examples/databases/create-collection.md +13 -13
  67. package/docs/examples/databases/create-datetime-attribute.md +13 -13
  68. package/docs/examples/databases/create-document.md +12 -13
  69. package/docs/examples/databases/create-email-attribute.md +13 -13
  70. package/docs/examples/databases/create-enum-attribute.md +14 -13
  71. package/docs/examples/databases/create-float-attribute.md +15 -13
  72. package/docs/examples/databases/create-index.md +13 -13
  73. package/docs/examples/databases/create-integer-attribute.md +15 -13
  74. package/docs/examples/databases/create-ip-attribute.md +13 -13
  75. package/docs/examples/databases/create-relationship-attribute.md +15 -13
  76. package/docs/examples/databases/create-string-attribute.md +15 -13
  77. package/docs/examples/databases/create-url-attribute.md +13 -13
  78. package/docs/examples/databases/create.md +10 -13
  79. package/docs/examples/databases/delete-attribute.md +10 -13
  80. package/docs/examples/databases/delete-collection.md +9 -13
  81. package/docs/examples/databases/delete-document.md +10 -13
  82. package/docs/examples/databases/delete-index.md +10 -13
  83. package/docs/examples/databases/delete.md +8 -13
  84. package/docs/examples/databases/get-attribute.md +10 -13
  85. package/docs/examples/databases/get-collection-usage.md +10 -13
  86. package/docs/examples/databases/get-collection.md +9 -13
  87. package/docs/examples/databases/get-database-usage.md +9 -13
  88. package/docs/examples/databases/get-document.md +11 -13
  89. package/docs/examples/databases/get-index.md +10 -13
  90. package/docs/examples/databases/get-usage.md +8 -13
  91. package/docs/examples/databases/get.md +8 -13
  92. package/docs/examples/databases/list-attributes.md +10 -13
  93. package/docs/examples/databases/list-collection-logs.md +10 -13
  94. package/docs/examples/databases/list-collections.md +10 -13
  95. package/docs/examples/databases/list-document-logs.md +11 -13
  96. package/docs/examples/databases/list-documents.md +10 -13
  97. package/docs/examples/databases/list-indexes.md +10 -13
  98. package/docs/examples/databases/list-logs.md +9 -13
  99. package/docs/examples/databases/list.md +9 -13
  100. package/docs/examples/databases/update-boolean-attribute.md +12 -13
  101. package/docs/examples/databases/update-collection.md +13 -13
  102. package/docs/examples/databases/update-datetime-attribute.md +12 -13
  103. package/docs/examples/databases/update-document.md +12 -13
  104. package/docs/examples/databases/update-email-attribute.md +12 -13
  105. package/docs/examples/databases/update-enum-attribute.md +13 -13
  106. package/docs/examples/databases/update-float-attribute.md +14 -13
  107. package/docs/examples/databases/update-integer-attribute.md +14 -13
  108. package/docs/examples/databases/update-ip-attribute.md +12 -13
  109. package/docs/examples/databases/update-relationship-attribute.md +11 -13
  110. package/docs/examples/databases/update-string-attribute.md +12 -13
  111. package/docs/examples/databases/update-url-attribute.md +12 -13
  112. package/docs/examples/databases/update.md +10 -13
  113. package/docs/examples/functions/create-build.md +10 -13
  114. package/docs/examples/functions/create-deployment.md +12 -13
  115. package/docs/examples/functions/create-execution.md +13 -13
  116. package/docs/examples/functions/create-variable.md +10 -13
  117. package/docs/examples/functions/create.md +27 -13
  118. package/docs/examples/functions/delete-deployment.md +9 -13
  119. package/docs/examples/functions/delete-variable.md +9 -13
  120. package/docs/examples/functions/delete.md +8 -13
  121. package/docs/examples/functions/download-deployment.md +9 -9
  122. package/docs/examples/functions/get-deployment.md +9 -13
  123. package/docs/examples/functions/get-execution.md +9 -13
  124. package/docs/examples/functions/get-function-usage.md +9 -13
  125. package/docs/examples/functions/get-usage.md +8 -13
  126. package/docs/examples/functions/get-variable.md +9 -13
  127. package/docs/examples/functions/get.md +8 -13
  128. package/docs/examples/functions/list-deployments.md +10 -13
  129. package/docs/examples/functions/list-executions.md +10 -13
  130. package/docs/examples/functions/list-runtimes.md +6 -13
  131. package/docs/examples/functions/list-variables.md +8 -13
  132. package/docs/examples/functions/list.md +9 -13
  133. package/docs/examples/functions/update-deployment.md +9 -13
  134. package/docs/examples/functions/update-variable.md +11 -13
  135. package/docs/examples/functions/update.md +23 -13
  136. package/docs/examples/graphql/mutation.md +8 -13
  137. package/docs/examples/graphql/query.md +8 -13
  138. package/docs/examples/health/get-antivirus.md +6 -13
  139. package/docs/examples/health/get-cache.md +6 -13
  140. package/docs/examples/health/get-certificate.md +13 -0
  141. package/docs/examples/health/get-d-b.md +6 -13
  142. package/docs/examples/health/get-failed-jobs.md +14 -0
  143. package/docs/examples/health/get-pub-sub.md +6 -13
  144. package/docs/examples/health/get-queue-builds.md +8 -13
  145. package/docs/examples/health/get-queue-certificates.md +8 -13
  146. package/docs/examples/health/get-queue-databases.md +9 -13
  147. package/docs/examples/health/get-queue-deletes.md +8 -13
  148. package/docs/examples/health/get-queue-functions.md +8 -13
  149. package/docs/examples/health/get-queue-logs.md +8 -13
  150. package/docs/examples/health/get-queue-mails.md +8 -13
  151. package/docs/examples/health/get-queue-messaging.md +8 -13
  152. package/docs/examples/health/get-queue-migrations.md +8 -13
  153. package/docs/examples/health/get-queue-usage-dump.md +13 -0
  154. package/docs/examples/health/get-queue-usage.md +13 -0
  155. package/docs/examples/health/get-queue-webhooks.md +8 -13
  156. package/docs/examples/health/get-queue.md +6 -13
  157. package/docs/examples/health/get-storage-local.md +6 -13
  158. package/docs/examples/health/get-storage.md +11 -0
  159. package/docs/examples/health/get-time.md +6 -13
  160. package/docs/examples/health/get.md +6 -13
  161. package/docs/examples/locale/get.md +6 -13
  162. package/docs/examples/locale/list-codes.md +6 -13
  163. package/docs/examples/locale/list-continents.md +6 -13
  164. package/docs/examples/locale/list-countries-e-u.md +6 -13
  165. package/docs/examples/locale/list-countries-phones.md +6 -13
  166. package/docs/examples/locale/list-countries.md +6 -13
  167. package/docs/examples/locale/list-currencies.md +6 -13
  168. package/docs/examples/locale/list-languages.md +6 -13
  169. package/docs/examples/messaging/create-apns-provider.md +20 -0
  170. package/docs/examples/messaging/create-email.md +19 -13
  171. package/docs/examples/messaging/create-fcm-provider.md +16 -0
  172. package/docs/examples/messaging/create-mailgun-provider.md +17 -13
  173. package/docs/examples/messaging/create-msg91provider.md +13 -13
  174. package/docs/examples/messaging/create-push.md +23 -13
  175. package/docs/examples/messaging/create-sendgrid-provider.md +15 -13
  176. package/docs/examples/messaging/create-sms.md +19 -0
  177. package/docs/examples/messaging/create-smtp-provider.md +26 -0
  178. package/docs/examples/messaging/create-subscriber.md +10 -13
  179. package/docs/examples/messaging/create-telesign-provider.md +13 -13
  180. package/docs/examples/messaging/create-textmagic-provider.md +13 -13
  181. package/docs/examples/messaging/create-topic.md +10 -13
  182. package/docs/examples/messaging/create-twilio-provider.md +13 -13
  183. package/docs/examples/messaging/create-vonage-provider.md +13 -13
  184. package/docs/examples/messaging/delete-provider.md +8 -13
  185. package/docs/examples/messaging/delete-subscriber.md +9 -13
  186. package/docs/examples/messaging/delete-topic.md +8 -13
  187. package/docs/examples/messaging/delete.md +8 -13
  188. package/docs/examples/messaging/get-message.md +8 -13
  189. package/docs/examples/messaging/get-provider.md +8 -13
  190. package/docs/examples/messaging/get-subscriber.md +9 -13
  191. package/docs/examples/messaging/get-topic.md +8 -13
  192. package/docs/examples/messaging/list-message-logs.md +9 -13
  193. package/docs/examples/messaging/list-messages.md +9 -13
  194. package/docs/examples/messaging/list-provider-logs.md +9 -13
  195. package/docs/examples/messaging/list-providers.md +9 -13
  196. package/docs/examples/messaging/list-subscriber-logs.md +9 -13
  197. package/docs/examples/messaging/list-subscribers.md +10 -13
  198. package/docs/examples/messaging/list-targets.md +9 -13
  199. package/docs/examples/messaging/list-topic-logs.md +9 -13
  200. package/docs/examples/messaging/list-topics.md +9 -13
  201. package/docs/examples/messaging/update-apns-provider.md +20 -0
  202. package/docs/examples/messaging/update-email.md +18 -13
  203. package/docs/examples/messaging/update-fcm-provider.md +16 -0
  204. package/docs/examples/messaging/update-mailgun-provider.md +17 -13
  205. package/docs/examples/messaging/update-msg91provider.md +13 -13
  206. package/docs/examples/messaging/update-push.md +23 -13
  207. package/docs/examples/messaging/update-sendgrid-provider.md +15 -13
  208. package/docs/examples/messaging/update-sms.md +19 -0
  209. package/docs/examples/messaging/update-smtp-provider.md +26 -0
  210. package/docs/examples/messaging/update-telesign-provider.md +13 -13
  211. package/docs/examples/messaging/update-textmagic-provider.md +13 -13
  212. package/docs/examples/messaging/update-topic.md +10 -13
  213. package/docs/examples/messaging/update-twilio-provider.md +13 -13
  214. package/docs/examples/messaging/update-vonage-provider.md +13 -13
  215. package/docs/examples/migrations/create-appwrite-migration.md +11 -13
  216. package/docs/examples/migrations/create-firebase-migration.md +9 -13
  217. package/docs/examples/migrations/create-firebase-o-auth-migration.md +9 -13
  218. package/docs/examples/migrations/create-n-host-migration.md +15 -13
  219. package/docs/examples/migrations/create-supabase-migration.md +14 -13
  220. package/docs/examples/migrations/delete-firebase-auth.md +6 -13
  221. package/docs/examples/migrations/delete.md +8 -13
  222. package/docs/examples/migrations/get-appwrite-report.md +11 -13
  223. package/docs/examples/migrations/get-firebase-report-o-auth.md +9 -13
  224. package/docs/examples/migrations/get-firebase-report.md +9 -13
  225. package/docs/examples/migrations/get-n-host-report.md +15 -13
  226. package/docs/examples/migrations/get-supabase-report.md +14 -13
  227. package/docs/examples/migrations/get.md +8 -13
  228. package/docs/examples/migrations/list-firebase-projects.md +6 -13
  229. package/docs/examples/migrations/list.md +9 -13
  230. package/docs/examples/migrations/retry.md +8 -13
  231. package/docs/examples/project/create-variable.md +9 -13
  232. package/docs/examples/project/delete-variable.md +8 -13
  233. package/docs/examples/project/get-usage.md +10 -13
  234. package/docs/examples/project/get-variable.md +8 -13
  235. package/docs/examples/project/list-variables.md +6 -13
  236. package/docs/examples/project/update-variable.md +10 -13
  237. package/docs/examples/projects/create-key.md +11 -13
  238. package/docs/examples/projects/create-platform.md +13 -13
  239. package/docs/examples/projects/create-smtp-test.md +17 -13
  240. package/docs/examples/projects/create-webhook.md +15 -13
  241. package/docs/examples/projects/create.md +20 -13
  242. package/docs/examples/projects/delete-email-template.md +10 -13
  243. package/docs/examples/projects/delete-key.md +9 -13
  244. package/docs/examples/projects/delete-platform.md +9 -13
  245. package/docs/examples/projects/delete-sms-template.md +10 -13
  246. package/docs/examples/projects/delete-webhook.md +9 -13
  247. package/docs/examples/projects/delete.md +8 -13
  248. package/docs/examples/projects/get-email-template.md +10 -13
  249. package/docs/examples/projects/get-key.md +9 -13
  250. package/docs/examples/projects/get-platform.md +9 -13
  251. package/docs/examples/projects/get-sms-template.md +10 -13
  252. package/docs/examples/projects/get-webhook.md +9 -13
  253. package/docs/examples/projects/get.md +8 -13
  254. package/docs/examples/projects/list-keys.md +8 -13
  255. package/docs/examples/projects/list-platforms.md +8 -13
  256. package/docs/examples/projects/list-webhooks.md +8 -13
  257. package/docs/examples/projects/list.md +9 -13
  258. package/docs/examples/projects/update-api-status-all.md +14 -0
  259. package/docs/examples/projects/update-api-status.md +15 -0
  260. package/docs/examples/projects/update-auth-duration.md +9 -13
  261. package/docs/examples/projects/update-auth-limit.md +9 -13
  262. package/docs/examples/projects/update-auth-password-dictionary.md +9 -13
  263. package/docs/examples/projects/update-auth-password-history.md +9 -13
  264. package/docs/examples/projects/update-auth-sessions-limit.md +9 -13
  265. package/docs/examples/projects/update-auth-status.md +10 -13
  266. package/docs/examples/projects/update-email-template.md +15 -13
  267. package/docs/examples/projects/update-key.md +12 -13
  268. package/docs/examples/projects/update-o-auth2.md +12 -13
  269. package/docs/examples/projects/update-personal-data-check.md +9 -13
  270. package/docs/examples/projects/update-platform.md +13 -13
  271. package/docs/examples/projects/update-service-status-all.md +9 -13
  272. package/docs/examples/projects/update-service-status.md +10 -13
  273. package/docs/examples/projects/update-sms-template.md +11 -13
  274. package/docs/examples/projects/update-smtp.md +17 -13
  275. package/docs/examples/projects/update-team.md +9 -13
  276. package/docs/examples/projects/update-webhook-signature.md +9 -13
  277. package/docs/examples/projects/update-webhook.md +16 -13
  278. package/docs/examples/projects/update.md +18 -13
  279. package/docs/examples/proxy/create-rule.md +10 -13
  280. package/docs/examples/proxy/delete-rule.md +8 -13
  281. package/docs/examples/proxy/get-rule.md +8 -13
  282. package/docs/examples/proxy/list-rules.md +9 -13
  283. package/docs/examples/proxy/update-rule-verification.md +8 -13
  284. package/docs/examples/storage/create-bucket.md +17 -13
  285. package/docs/examples/storage/create-file.md +11 -13
  286. package/docs/examples/storage/delete-bucket.md +8 -13
  287. package/docs/examples/storage/delete-file.md +9 -13
  288. package/docs/examples/storage/get-bucket-usage.md +9 -13
  289. package/docs/examples/storage/get-bucket.md +8 -13
  290. package/docs/examples/storage/get-file-download.md +9 -9
  291. package/docs/examples/storage/get-file-preview.md +20 -9
  292. package/docs/examples/storage/get-file-view.md +9 -9
  293. package/docs/examples/storage/get-file.md +9 -13
  294. package/docs/examples/storage/get-usage.md +8 -13
  295. package/docs/examples/storage/list-buckets.md +9 -13
  296. package/docs/examples/storage/list-files.md +10 -13
  297. package/docs/examples/storage/update-bucket.md +17 -13
  298. package/docs/examples/storage/update-file.md +11 -13
  299. package/docs/examples/teams/create-membership.md +14 -13
  300. package/docs/examples/teams/create.md +10 -13
  301. package/docs/examples/teams/delete-membership.md +9 -13
  302. package/docs/examples/teams/delete.md +8 -13
  303. package/docs/examples/teams/get-membership.md +9 -13
  304. package/docs/examples/teams/get-prefs.md +8 -13
  305. package/docs/examples/teams/get.md +8 -13
  306. package/docs/examples/teams/list-logs.md +9 -13
  307. package/docs/examples/teams/list-memberships.md +10 -13
  308. package/docs/examples/teams/list.md +9 -13
  309. package/docs/examples/teams/update-membership-status.md +11 -13
  310. package/docs/examples/teams/update-membership.md +10 -13
  311. package/docs/examples/teams/update-name.md +9 -13
  312. package/docs/examples/teams/update-prefs.md +9 -13
  313. package/docs/examples/users/create-argon2user.md +11 -13
  314. package/docs/examples/users/create-bcrypt-user.md +11 -13
  315. package/docs/examples/users/create-m-d5user.md +11 -13
  316. package/docs/examples/users/create-mfa-recovery-codes.md +13 -0
  317. package/docs/examples/users/create-p-h-pass-user.md +11 -13
  318. package/docs/examples/users/create-s-h-a-user.md +12 -13
  319. package/docs/examples/users/create-scrypt-modified-user.md +14 -13
  320. package/docs/examples/users/create-scrypt-user.md +16 -13
  321. package/docs/examples/users/create-session.md +8 -13
  322. package/docs/examples/users/create-target.md +13 -13
  323. package/docs/examples/users/create-token.md +10 -13
  324. package/docs/examples/users/create.md +12 -13
  325. package/docs/examples/users/delete-identity.md +8 -13
  326. package/docs/examples/users/delete-mfa-authenticator.md +14 -0
  327. package/docs/examples/users/delete-session.md +9 -13
  328. package/docs/examples/users/delete-sessions.md +8 -13
  329. package/docs/examples/users/delete-target.md +9 -13
  330. package/docs/examples/users/delete.md +8 -13
  331. package/docs/examples/users/get-mfa-recovery-codes.md +13 -0
  332. package/docs/examples/users/get-prefs.md +8 -13
  333. package/docs/examples/users/get-target.md +9 -13
  334. package/docs/examples/users/get-usage.md +8 -13
  335. package/docs/examples/users/get.md +8 -13
  336. package/docs/examples/users/list-identities.md +9 -13
  337. package/docs/examples/users/list-logs.md +9 -13
  338. package/docs/examples/users/list-memberships.md +8 -13
  339. package/docs/examples/users/list-mfa-factors.md +13 -0
  340. package/docs/examples/users/list-sessions.md +8 -13
  341. package/docs/examples/users/list-targets.md +9 -13
  342. package/docs/examples/users/list.md +9 -13
  343. package/docs/examples/users/update-email-verification.md +9 -13
  344. package/docs/examples/users/update-email.md +9 -13
  345. package/docs/examples/users/update-labels.md +9 -13
  346. package/docs/examples/users/update-mfa-recovery-codes.md +13 -0
  347. package/docs/examples/users/update-mfa.md +9 -13
  348. package/docs/examples/users/update-name.md +9 -13
  349. package/docs/examples/users/update-password.md +9 -13
  350. package/docs/examples/users/update-phone-verification.md +9 -13
  351. package/docs/examples/users/update-phone.md +9 -13
  352. package/docs/examples/users/update-prefs.md +9 -13
  353. package/docs/examples/users/update-status.md +9 -13
  354. package/docs/examples/users/update-target.md +12 -13
  355. package/docs/examples/vcs/create-repository-detection.md +10 -13
  356. package/docs/examples/vcs/create-repository.md +10 -13
  357. package/docs/examples/vcs/delete-installation.md +8 -13
  358. package/docs/examples/vcs/get-installation.md +8 -13
  359. package/docs/examples/vcs/get-repository.md +9 -13
  360. package/docs/examples/vcs/list-installations.md +9 -13
  361. package/docs/examples/vcs/list-repositories.md +9 -13
  362. package/docs/examples/vcs/list-repository-branches.md +9 -13
  363. package/docs/examples/vcs/update-external-deployments.md +10 -13
  364. package/package.json +1 -1
  365. package/src/client.ts +3 -3
  366. package/src/enums/{a-p-i-service.ts → api-service.ts} +1 -1
  367. package/src/enums/api.ts +5 -0
  368. package/src/enums/authentication-factor.ts +6 -0
  369. package/src/enums/authenticator-type.ts +3 -0
  370. package/src/enums/email-template-locale.ts +133 -0
  371. package/src/enums/email-template-type.ts +7 -0
  372. package/src/enums/flag.ts +1 -1
  373. package/src/enums/index-type.ts +0 -1
  374. package/src/enums/name.ts +15 -0
  375. package/src/enums/{password-version.ts → password-hash.ts} +1 -1
  376. package/src/enums/region.ts +1 -0
  377. package/src/enums/runtime.ts +40 -0
  378. package/src/enums/{template-locale.ts → sms-template-locale.ts} +1 -1
  379. package/src/enums/{template-type.ts → sms-template-type.ts} +2 -1
  380. package/src/enums/{s-m-t-p-encryption.ts → smtp-encryption.ts} +1 -1
  381. package/src/id.ts +23 -4
  382. package/src/index.ts +11 -8
  383. package/src/models.ts +57 -19
  384. package/src/query.ts +2 -2
  385. package/src/service.ts +0 -3
  386. package/src/services/account.ts +239 -66
  387. package/src/services/assistant.ts +0 -1
  388. package/src/services/avatars.ts +0 -1
  389. package/src/services/console.ts +0 -1
  390. package/src/services/databases.ts +20 -4
  391. package/src/services/functions.ts +0 -1
  392. package/src/services/graphql.ts +0 -1
  393. package/src/services/health.ts +121 -1
  394. package/src/services/locale.ts +0 -1
  395. package/src/services/messaging.ts +171 -80
  396. package/src/services/migrations.ts +0 -1
  397. package/src/services/project.ts +1 -2
  398. package/src/services/projects.ts +97 -24
  399. package/src/services/proxy.ts +0 -1
  400. package/src/services/storage.ts +2 -3
  401. package/src/services/teams.ts +0 -1
  402. package/src/services/users.ts +115 -39
  403. package/src/services/vcs.ts +0 -1
  404. package/types/enums/{a-p-i-service.d.ts → api-service.d.ts} +1 -1
  405. package/types/enums/api.d.ts +5 -0
  406. package/types/enums/authentication-factor.d.ts +6 -0
  407. package/types/enums/authenticator-type.d.ts +3 -0
  408. package/types/enums/email-template-locale.d.ts +133 -0
  409. package/types/enums/email-template-type.d.ts +7 -0
  410. package/types/enums/flag.d.ts +1 -1
  411. package/types/enums/index-type.d.ts +1 -2
  412. package/types/enums/name.d.ts +15 -0
  413. package/types/enums/{password-version.d.ts → password-hash.d.ts} +1 -1
  414. package/types/enums/region.d.ts +2 -1
  415. package/types/enums/runtime.d.ts +41 -1
  416. package/types/enums/{template-locale.d.ts → sms-template-locale.d.ts} +1 -1
  417. package/types/enums/sms-template-type.d.ts +6 -0
  418. package/types/enums/{s-m-t-p-encryption.d.ts → smtp-encryption.d.ts} +1 -1
  419. package/types/id.d.ts +2 -1
  420. package/types/index.d.ts +11 -8
  421. package/types/models.d.ts +57 -19
  422. package/types/query.d.ts +2 -2
  423. package/types/services/account.d.ts +121 -28
  424. package/types/services/databases.d.ts +20 -3
  425. package/types/services/health.d.ts +56 -0
  426. package/types/services/messaging.d.ts +113 -53
  427. package/types/services/project.d.ts +1 -1
  428. package/types/services/projects.d.ts +47 -23
  429. package/types/services/storage.d.ts +2 -2
  430. package/types/services/users.d.ts +63 -17
  431. package/docs/examples/account/add-authenticator.md +0 -18
  432. package/docs/examples/account/create-challenge.md +0 -18
  433. package/docs/examples/account/delete-authenticator.md +0 -18
  434. package/docs/examples/account/list-factors.md +0 -18
  435. package/docs/examples/account/update-challenge.md +0 -18
  436. package/docs/examples/account/verify-authenticator.md +0 -18
  437. package/docs/examples/messaging/create-a-p-n-s-provider.md +0 -18
  438. package/docs/examples/messaging/create-f-c-m-provider.md +0 -18
  439. package/docs/examples/messaging/create-s-m-s.md +0 -18
  440. package/docs/examples/messaging/create-s-m-t-p-provider.md +0 -18
  441. package/docs/examples/messaging/update-a-p-n-s-provider.md +0 -18
  442. package/docs/examples/messaging/update-f-c-m-provider.md +0 -18
  443. package/docs/examples/messaging/update-s-m-s.md +0 -18
  444. package/docs/examples/messaging/update-s-m-t-p-provider.md +0 -18
  445. package/docs/examples/users/delete-authenticator.md +0 -18
  446. package/docs/examples/users/list-providers.md +0 -18
  447. package/src/enums/authenticator-factor.ts +0 -3
  448. package/src/enums/authenticator-provider.ts +0 -3
  449. package/src/enums/message-type.ts +0 -5
  450. package/types/enums/authenticator-factor.d.ts +0 -3
  451. package/types/enums/authenticator-provider.d.ts +0 -3
  452. package/types/enums/message-type.d.ts +0 -5
  453. package/types/enums/template-type.d.ts +0 -5
@@ -2,9 +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 { Query } from '../query';
6
- import { MessageType } from '../enums/message-type';
7
- import { SMTPEncryption } from '../enums/s-m-t-p-encryption';
5
+ import { SmtpEncryption } from '../enums/smtp-encryption';
8
6
 
9
7
  export class Messaging extends Service {
10
8
 
@@ -16,6 +14,7 @@ export class Messaging extends Service {
16
14
  /**
17
15
  * List messages
18
16
  *
17
+ * Get a list of all messages from the current Appwrite project.
19
18
  *
20
19
  * @param {string[]} queries
21
20
  * @param {string} search
@@ -41,8 +40,9 @@ export class Messaging extends Service {
41
40
  }
42
41
 
43
42
  /**
44
- * Create an email.
43
+ * Create email
45
44
  *
45
+ * Create a new email message.
46
46
  *
47
47
  * @param {string} messageId
48
48
  * @param {string} subject
@@ -52,13 +52,14 @@ export class Messaging extends Service {
52
52
  * @param {string[]} targets
53
53
  * @param {string[]} cc
54
54
  * @param {string[]} bcc
55
- * @param {MessageType} status
55
+ * @param {string[]} attachments
56
+ * @param {boolean} draft
56
57
  * @param {boolean} html
57
58
  * @param {string} scheduledAt
58
59
  * @throws {AppwriteException}
59
60
  * @returns {Promise}
60
61
  */
61
- async createEmail(messageId: string, subject: string, content: string, topics?: string[], users?: string[], targets?: string[], cc?: string[], bcc?: string[], status?: MessageType, 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> {
62
63
  if (typeof messageId === 'undefined') {
63
64
  throw new AppwriteException('Missing required parameter: "messageId"');
64
65
  }
@@ -106,8 +107,12 @@ export class Messaging extends Service {
106
107
  payload['bcc'] = bcc;
107
108
  }
108
109
 
109
- if (typeof status !== 'undefined') {
110
- payload['status'] = status;
110
+ if (typeof attachments !== 'undefined') {
111
+ payload['attachments'] = attachments;
112
+ }
113
+
114
+ if (typeof draft !== 'undefined') {
115
+ payload['draft'] = draft;
111
116
  }
112
117
 
113
118
  if (typeof html !== 'undefined') {
@@ -125,8 +130,10 @@ export class Messaging extends Service {
125
130
  }
126
131
 
127
132
  /**
128
- * Update an email.
133
+ * Update email
129
134
  *
135
+ * Update an email message by its unique ID.
136
+ *
130
137
  *
131
138
  * @param {string} messageId
132
139
  * @param {string[]} topics
@@ -134,7 +141,7 @@ export class Messaging extends Service {
134
141
  * @param {string[]} targets
135
142
  * @param {string} subject
136
143
  * @param {string} content
137
- * @param {MessageType} status
144
+ * @param {boolean} draft
138
145
  * @param {boolean} html
139
146
  * @param {string[]} cc
140
147
  * @param {string[]} bcc
@@ -142,7 +149,7 @@ export class Messaging extends Service {
142
149
  * @throws {AppwriteException}
143
150
  * @returns {Promise}
144
151
  */
145
- async updateEmail(messageId: string, topics?: string[], users?: string[], targets?: string[], subject?: string, content?: string, status?: MessageType, 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> {
146
153
  if (typeof messageId === 'undefined') {
147
154
  throw new AppwriteException('Missing required parameter: "messageId"');
148
155
  }
@@ -170,8 +177,8 @@ export class Messaging extends Service {
170
177
  payload['content'] = content;
171
178
  }
172
179
 
173
- if (typeof status !== 'undefined') {
174
- payload['status'] = status;
180
+ if (typeof draft !== 'undefined') {
181
+ payload['draft'] = draft;
175
182
  }
176
183
 
177
184
  if (typeof html !== 'undefined') {
@@ -197,8 +204,9 @@ export class Messaging extends Service {
197
204
  }
198
205
 
199
206
  /**
200
- * Create a push notification.
207
+ * Create push notification
201
208
  *
209
+ * Create a new push notification.
202
210
  *
203
211
  * @param {string} messageId
204
212
  * @param {string} title
@@ -208,17 +216,18 @@ export class Messaging extends Service {
208
216
  * @param {string[]} targets
209
217
  * @param {object} data
210
218
  * @param {string} action
219
+ * @param {string} image
211
220
  * @param {string} icon
212
221
  * @param {string} sound
213
222
  * @param {string} color
214
223
  * @param {string} tag
215
224
  * @param {string} badge
216
- * @param {MessageType} status
225
+ * @param {boolean} draft
217
226
  * @param {string} scheduledAt
218
227
  * @throws {AppwriteException}
219
228
  * @returns {Promise}
220
229
  */
221
- async createPush(messageId: string, title: string, body: string, topics?: string[], users?: string[], targets?: string[], data?: object, action?: string, icon?: string, sound?: string, color?: string, tag?: string, badge?: string, status?: MessageType, 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> {
222
231
  if (typeof messageId === 'undefined') {
223
232
  throw new AppwriteException('Missing required parameter: "messageId"');
224
233
  }
@@ -266,6 +275,10 @@ export class Messaging extends Service {
266
275
  payload['action'] = action;
267
276
  }
268
277
 
278
+ if (typeof image !== 'undefined') {
279
+ payload['image'] = image;
280
+ }
281
+
269
282
  if (typeof icon !== 'undefined') {
270
283
  payload['icon'] = icon;
271
284
  }
@@ -286,8 +299,8 @@ export class Messaging extends Service {
286
299
  payload['badge'] = badge;
287
300
  }
288
301
 
289
- if (typeof status !== 'undefined') {
290
- payload['status'] = status;
302
+ if (typeof draft !== 'undefined') {
303
+ payload['draft'] = draft;
291
304
  }
292
305
 
293
306
  if (typeof scheduledAt !== 'undefined') {
@@ -301,8 +314,10 @@ export class Messaging extends Service {
301
314
  }
302
315
 
303
316
  /**
304
- * Update a push notification.
317
+ * Update push notification
305
318
  *
319
+ * Update a push notification by its unique ID.
320
+ *
306
321
  *
307
322
  * @param {string} messageId
308
323
  * @param {string[]} topics
@@ -312,17 +327,18 @@ export class Messaging extends Service {
312
327
  * @param {string} body
313
328
  * @param {object} data
314
329
  * @param {string} action
330
+ * @param {string} image
315
331
  * @param {string} icon
316
332
  * @param {string} sound
317
333
  * @param {string} color
318
334
  * @param {string} tag
319
335
  * @param {number} badge
320
- * @param {MessageType} status
336
+ * @param {boolean} draft
321
337
  * @param {string} scheduledAt
322
338
  * @throws {AppwriteException}
323
339
  * @returns {Promise}
324
340
  */
325
- async updatePush(messageId: string, topics?: string[], users?: string[], targets?: string[], title?: string, body?: string, data?: object, action?: string, icon?: string, sound?: string, color?: string, tag?: string, badge?: number, status?: MessageType, 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> {
326
342
  if (typeof messageId === 'undefined') {
327
343
  throw new AppwriteException('Missing required parameter: "messageId"');
328
344
  }
@@ -358,6 +374,10 @@ export class Messaging extends Service {
358
374
  payload['action'] = action;
359
375
  }
360
376
 
377
+ if (typeof image !== 'undefined') {
378
+ payload['image'] = image;
379
+ }
380
+
361
381
  if (typeof icon !== 'undefined') {
362
382
  payload['icon'] = icon;
363
383
  }
@@ -378,8 +398,8 @@ export class Messaging extends Service {
378
398
  payload['badge'] = badge;
379
399
  }
380
400
 
381
- if (typeof status !== 'undefined') {
382
- payload['status'] = status;
401
+ if (typeof draft !== 'undefined') {
402
+ payload['draft'] = draft;
383
403
  }
384
404
 
385
405
  if (typeof scheduledAt !== 'undefined') {
@@ -393,20 +413,21 @@ export class Messaging extends Service {
393
413
  }
394
414
 
395
415
  /**
396
- * Create an SMS.
416
+ * Create SMS
397
417
  *
418
+ * Create a new SMS message.
398
419
  *
399
420
  * @param {string} messageId
400
421
  * @param {string} content
401
422
  * @param {string[]} topics
402
423
  * @param {string[]} users
403
424
  * @param {string[]} targets
404
- * @param {MessageType} status
425
+ * @param {boolean} draft
405
426
  * @param {string} scheduledAt
406
427
  * @throws {AppwriteException}
407
428
  * @returns {Promise}
408
429
  */
409
- async createSMS(messageId: string, content: string, topics?: string[], users?: string[], targets?: string[], status?: MessageType, 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> {
410
431
  if (typeof messageId === 'undefined') {
411
432
  throw new AppwriteException('Missing required parameter: "messageId"');
412
433
  }
@@ -438,8 +459,8 @@ export class Messaging extends Service {
438
459
  payload['targets'] = targets;
439
460
  }
440
461
 
441
- if (typeof status !== 'undefined') {
442
- payload['status'] = status;
462
+ if (typeof draft !== 'undefined') {
463
+ payload['draft'] = draft;
443
464
  }
444
465
 
445
466
  if (typeof scheduledAt !== 'undefined') {
@@ -453,20 +474,22 @@ export class Messaging extends Service {
453
474
  }
454
475
 
455
476
  /**
456
- * Update an SMS.
477
+ * Update SMS
457
478
  *
479
+ * Update an email message by its unique ID.
480
+ *
458
481
  *
459
482
  * @param {string} messageId
460
483
  * @param {string[]} topics
461
484
  * @param {string[]} users
462
485
  * @param {string[]} targets
463
486
  * @param {string} content
464
- * @param {MessageType} status
487
+ * @param {boolean} draft
465
488
  * @param {string} scheduledAt
466
489
  * @throws {AppwriteException}
467
490
  * @returns {Promise}
468
491
  */
469
- async updateSMS(messageId: string, topics?: string[], users?: string[], targets?: string[], content?: string, status?: MessageType, 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> {
470
493
  if (typeof messageId === 'undefined') {
471
494
  throw new AppwriteException('Missing required parameter: "messageId"');
472
495
  }
@@ -490,8 +513,8 @@ export class Messaging extends Service {
490
513
  payload['content'] = content;
491
514
  }
492
515
 
493
- if (typeof status !== 'undefined') {
494
- payload['status'] = status;
516
+ if (typeof draft !== 'undefined') {
517
+ payload['draft'] = draft;
495
518
  }
496
519
 
497
520
  if (typeof scheduledAt !== 'undefined') {
@@ -505,8 +528,10 @@ export class Messaging extends Service {
505
528
  }
506
529
 
507
530
  /**
508
- * Get a message
531
+ * Get message
509
532
  *
533
+ * Get a message by its unique ID.
534
+ *
510
535
  *
511
536
  * @param {string} messageId
512
537
  * @throws {AppwriteException}
@@ -527,8 +552,10 @@ export class Messaging extends Service {
527
552
  }
528
553
 
529
554
  /**
530
- * Delete a message
555
+ * Delete message
531
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.
532
559
  *
533
560
  * @param {string} messageId
534
561
  * @throws {AppwriteException}
@@ -551,6 +578,7 @@ export class Messaging extends Service {
551
578
  /**
552
579
  * List message logs
553
580
  *
581
+ * Get the message activity logs listed by its unique ID.
554
582
  *
555
583
  * @param {string} messageId
556
584
  * @param {string[]} queries
@@ -578,8 +606,7 @@ export class Messaging extends Service {
578
606
  /**
579
607
  * List message targets
580
608
  *
581
- * List the targets associated with a message as set via the targets
582
- * attribute.
609
+ * Get a list of the targets associated with a message.
583
610
  *
584
611
  * @param {string} messageId
585
612
  * @param {string[]} queries
@@ -607,6 +634,7 @@ export class Messaging extends Service {
607
634
  /**
608
635
  * List providers
609
636
  *
637
+ * Get a list of all providers from the current Appwrite project.
610
638
  *
611
639
  * @param {string[]} queries
612
640
  * @param {string} search
@@ -634,6 +662,7 @@ export class Messaging extends Service {
634
662
  /**
635
663
  * Create APNS provider
636
664
  *
665
+ * Create a new Apple Push Notification service provider.
637
666
  *
638
667
  * @param {string} providerId
639
668
  * @param {string} name
@@ -641,11 +670,12 @@ export class Messaging extends Service {
641
670
  * @param {string} authKeyId
642
671
  * @param {string} teamId
643
672
  * @param {string} bundleId
673
+ * @param {boolean} sandbox
644
674
  * @param {boolean} enabled
645
675
  * @throws {AppwriteException}
646
676
  * @returns {Promise}
647
677
  */
648
- 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> {
649
679
  if (typeof providerId === 'undefined') {
650
680
  throw new AppwriteException('Missing required parameter: "providerId"');
651
681
  }
@@ -681,6 +711,10 @@ export class Messaging extends Service {
681
711
  payload['bundleId'] = bundleId;
682
712
  }
683
713
 
714
+ if (typeof sandbox !== 'undefined') {
715
+ payload['sandbox'] = sandbox;
716
+ }
717
+
684
718
  if (typeof enabled !== 'undefined') {
685
719
  payload['enabled'] = enabled;
686
720
  }
@@ -694,6 +728,7 @@ export class Messaging extends Service {
694
728
  /**
695
729
  * Update APNS provider
696
730
  *
731
+ * Update a Apple Push Notification service provider by its unique ID.
697
732
  *
698
733
  * @param {string} providerId
699
734
  * @param {string} name
@@ -702,10 +737,11 @@ export class Messaging extends Service {
702
737
  * @param {string} authKeyId
703
738
  * @param {string} teamId
704
739
  * @param {string} bundleId
740
+ * @param {boolean} sandbox
705
741
  * @throws {AppwriteException}
706
742
  * @returns {Promise}
707
743
  */
708
- 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> {
709
745
  if (typeof providerId === 'undefined') {
710
746
  throw new AppwriteException('Missing required parameter: "providerId"');
711
747
  }
@@ -737,6 +773,10 @@ export class Messaging extends Service {
737
773
  payload['bundleId'] = bundleId;
738
774
  }
739
775
 
776
+ if (typeof sandbox !== 'undefined') {
777
+ payload['sandbox'] = sandbox;
778
+ }
779
+
740
780
  const uri = new URL(this.client.config.endpoint + apiPath);
741
781
  return await this.client.call('patch', uri, {
742
782
  'content-type': 'application/json',
@@ -746,6 +786,7 @@ export class Messaging extends Service {
746
786
  /**
747
787
  * Create FCM provider
748
788
  *
789
+ * Create a new Firebase Cloud Messaging provider.
749
790
  *
750
791
  * @param {string} providerId
751
792
  * @param {string} name
@@ -754,7 +795,7 @@ export class Messaging extends Service {
754
795
  * @throws {AppwriteException}
755
796
  * @returns {Promise}
756
797
  */
757
- 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> {
758
799
  if (typeof providerId === 'undefined') {
759
800
  throw new AppwriteException('Missing required parameter: "providerId"');
760
801
  }
@@ -791,6 +832,7 @@ export class Messaging extends Service {
791
832
  /**
792
833
  * Update FCM provider
793
834
  *
835
+ * Update a Firebase Cloud Messaging provider by its unique ID.
794
836
  *
795
837
  * @param {string} providerId
796
838
  * @param {string} name
@@ -799,7 +841,7 @@ export class Messaging extends Service {
799
841
  * @throws {AppwriteException}
800
842
  * @returns {Promise}
801
843
  */
802
- 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> {
803
845
  if (typeof providerId === 'undefined') {
804
846
  throw new AppwriteException('Missing required parameter: "providerId"');
805
847
  }
@@ -828,6 +870,7 @@ export class Messaging extends Service {
828
870
  /**
829
871
  * Create Mailgun provider
830
872
  *
873
+ * Create a new Mailgun provider.
831
874
  *
832
875
  * @param {string} providerId
833
876
  * @param {string} name
@@ -903,6 +946,7 @@ export class Messaging extends Service {
903
946
  /**
904
947
  * Update Mailgun provider
905
948
  *
949
+ * Update a Mailgun provider by its unique ID.
906
950
  *
907
951
  * @param {string} providerId
908
952
  * @param {string} name
@@ -970,17 +1014,18 @@ export class Messaging extends Service {
970
1014
  /**
971
1015
  * Create Msg91 provider
972
1016
  *
1017
+ * Create a new MSG91 provider.
973
1018
  *
974
1019
  * @param {string} providerId
975
1020
  * @param {string} name
976
- * @param {string} from
1021
+ * @param {string} templateId
977
1022
  * @param {string} senderId
978
1023
  * @param {string} authKey
979
1024
  * @param {boolean} enabled
980
1025
  * @throws {AppwriteException}
981
1026
  * @returns {Promise}
982
1027
  */
983
- async createMsg91Provider(providerId: string, name: string, from?: string, senderId?: string, authKey?: string, enabled?: boolean): Promise<Models.Provider> {
1028
+ async createMsg91Provider(providerId: string, name: string, templateId?: string, senderId?: string, authKey?: string, enabled?: boolean): Promise<Models.Provider> {
984
1029
  if (typeof providerId === 'undefined') {
985
1030
  throw new AppwriteException('Missing required parameter: "providerId"');
986
1031
  }
@@ -1000,8 +1045,8 @@ export class Messaging extends Service {
1000
1045
  payload['name'] = name;
1001
1046
  }
1002
1047
 
1003
- if (typeof from !== 'undefined') {
1004
- payload['from'] = from;
1048
+ if (typeof templateId !== 'undefined') {
1049
+ payload['templateId'] = templateId;
1005
1050
  }
1006
1051
 
1007
1052
  if (typeof senderId !== 'undefined') {
@@ -1025,17 +1070,18 @@ export class Messaging extends Service {
1025
1070
  /**
1026
1071
  * Update Msg91 provider
1027
1072
  *
1073
+ * Update a MSG91 provider by its unique ID.
1028
1074
  *
1029
1075
  * @param {string} providerId
1030
1076
  * @param {string} name
1031
1077
  * @param {boolean} enabled
1078
+ * @param {string} templateId
1032
1079
  * @param {string} senderId
1033
1080
  * @param {string} authKey
1034
- * @param {string} from
1035
1081
  * @throws {AppwriteException}
1036
1082
  * @returns {Promise}
1037
1083
  */
1038
- async updateMsg91Provider(providerId: string, name?: string, enabled?: boolean, senderId?: string, authKey?: string, from?: string): Promise<Models.Provider> {
1084
+ async updateMsg91Provider(providerId: string, name?: string, enabled?: boolean, templateId?: string, senderId?: string, authKey?: string): Promise<Models.Provider> {
1039
1085
  if (typeof providerId === 'undefined') {
1040
1086
  throw new AppwriteException('Missing required parameter: "providerId"');
1041
1087
  }
@@ -1051,6 +1097,10 @@ export class Messaging extends Service {
1051
1097
  payload['enabled'] = enabled;
1052
1098
  }
1053
1099
 
1100
+ if (typeof templateId !== 'undefined') {
1101
+ payload['templateId'] = templateId;
1102
+ }
1103
+
1054
1104
  if (typeof senderId !== 'undefined') {
1055
1105
  payload['senderId'] = senderId;
1056
1106
  }
@@ -1059,10 +1109,6 @@ export class Messaging extends Service {
1059
1109
  payload['authKey'] = authKey;
1060
1110
  }
1061
1111
 
1062
- if (typeof from !== 'undefined') {
1063
- payload['from'] = from;
1064
- }
1065
-
1066
1112
  const uri = new URL(this.client.config.endpoint + apiPath);
1067
1113
  return await this.client.call('patch', uri, {
1068
1114
  'content-type': 'application/json',
@@ -1072,6 +1118,7 @@ export class Messaging extends Service {
1072
1118
  /**
1073
1119
  * Create Sendgrid provider
1074
1120
  *
1121
+ * Create a new Sendgrid provider.
1075
1122
  *
1076
1123
  * @param {string} providerId
1077
1124
  * @param {string} name
@@ -1137,6 +1184,7 @@ export class Messaging extends Service {
1137
1184
  /**
1138
1185
  * Update Sendgrid provider
1139
1186
  *
1187
+ * Update a Sendgrid provider by its unique ID.
1140
1188
  *
1141
1189
  * @param {string} providerId
1142
1190
  * @param {string} name
@@ -1194,6 +1242,7 @@ export class Messaging extends Service {
1194
1242
  /**
1195
1243
  * Create SMTP provider
1196
1244
  *
1245
+ * Create a new SMTP provider.
1197
1246
  *
1198
1247
  * @param {string} providerId
1199
1248
  * @param {string} name
@@ -1201,7 +1250,7 @@ export class Messaging extends Service {
1201
1250
  * @param {number} port
1202
1251
  * @param {string} username
1203
1252
  * @param {string} password
1204
- * @param {SMTPEncryption} encryption
1253
+ * @param {SmtpEncryption} encryption
1205
1254
  * @param {boolean} autoTLS
1206
1255
  * @param {string} mailer
1207
1256
  * @param {string} fromName
@@ -1212,7 +1261,7 @@ export class Messaging extends Service {
1212
1261
  * @throws {AppwriteException}
1213
1262
  * @returns {Promise}
1214
1263
  */
1215
- 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> {
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> {
1216
1265
  if (typeof providerId === 'undefined') {
1217
1266
  throw new AppwriteException('Missing required parameter: "providerId"');
1218
1267
  }
@@ -1293,6 +1342,7 @@ export class Messaging extends Service {
1293
1342
  /**
1294
1343
  * Update SMTP provider
1295
1344
  *
1345
+ * Update a SMTP provider by its unique ID.
1296
1346
  *
1297
1347
  * @param {string} providerId
1298
1348
  * @param {string} name
@@ -1300,8 +1350,9 @@ export class Messaging extends Service {
1300
1350
  * @param {number} port
1301
1351
  * @param {string} username
1302
1352
  * @param {string} password
1303
- * @param {SMTPEncryption} encryption
1353
+ * @param {SmtpEncryption} encryption
1304
1354
  * @param {boolean} autoTLS
1355
+ * @param {string} mailer
1305
1356
  * @param {string} fromName
1306
1357
  * @param {string} fromEmail
1307
1358
  * @param {string} replyToName
@@ -1310,7 +1361,7 @@ export class Messaging extends Service {
1310
1361
  * @throws {AppwriteException}
1311
1362
  * @returns {Promise}
1312
1363
  */
1313
- async updateSMTPProvider(providerId: string, name?: string, host?: string, port?: number, username?: string, password?: string, encryption?: SMTPEncryption, autoTLS?: boolean, fromName?: string, fromEmail?: string, replyToName?: string, replyToEmail?: string, enabled?: boolean): 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> {
1314
1365
  if (typeof providerId === 'undefined') {
1315
1366
  throw new AppwriteException('Missing required parameter: "providerId"');
1316
1367
  }
@@ -1346,6 +1397,10 @@ export class Messaging extends Service {
1346
1397
  payload['autoTLS'] = autoTLS;
1347
1398
  }
1348
1399
 
1400
+ if (typeof mailer !== 'undefined') {
1401
+ payload['mailer'] = mailer;
1402
+ }
1403
+
1349
1404
  if (typeof fromName !== 'undefined') {
1350
1405
  payload['fromName'] = fromName;
1351
1406
  }
@@ -1375,17 +1430,18 @@ export class Messaging extends Service {
1375
1430
  /**
1376
1431
  * Create Telesign provider
1377
1432
  *
1433
+ * Create a new Telesign provider.
1378
1434
  *
1379
1435
  * @param {string} providerId
1380
1436
  * @param {string} name
1381
1437
  * @param {string} from
1382
- * @param {string} username
1383
- * @param {string} password
1438
+ * @param {string} customerId
1439
+ * @param {string} apiKey
1384
1440
  * @param {boolean} enabled
1385
1441
  * @throws {AppwriteException}
1386
1442
  * @returns {Promise}
1387
1443
  */
1388
- async createTelesignProvider(providerId: string, name: string, from?: string, username?: string, password?: string, enabled?: boolean): Promise<Models.Provider> {
1444
+ async createTelesignProvider(providerId: string, name: string, from?: string, customerId?: string, apiKey?: string, enabled?: boolean): Promise<Models.Provider> {
1389
1445
  if (typeof providerId === 'undefined') {
1390
1446
  throw new AppwriteException('Missing required parameter: "providerId"');
1391
1447
  }
@@ -1409,12 +1465,12 @@ export class Messaging extends Service {
1409
1465
  payload['from'] = from;
1410
1466
  }
1411
1467
 
1412
- if (typeof username !== 'undefined') {
1413
- payload['username'] = username;
1468
+ if (typeof customerId !== 'undefined') {
1469
+ payload['customerId'] = customerId;
1414
1470
  }
1415
1471
 
1416
- if (typeof password !== 'undefined') {
1417
- payload['password'] = password;
1472
+ if (typeof apiKey !== 'undefined') {
1473
+ payload['apiKey'] = apiKey;
1418
1474
  }
1419
1475
 
1420
1476
  if (typeof enabled !== 'undefined') {
@@ -1430,17 +1486,18 @@ export class Messaging extends Service {
1430
1486
  /**
1431
1487
  * Update Telesign provider
1432
1488
  *
1489
+ * Update a Telesign provider by its unique ID.
1433
1490
  *
1434
1491
  * @param {string} providerId
1435
1492
  * @param {string} name
1436
1493
  * @param {boolean} enabled
1437
- * @param {string} username
1438
- * @param {string} password
1494
+ * @param {string} customerId
1495
+ * @param {string} apiKey
1439
1496
  * @param {string} from
1440
1497
  * @throws {AppwriteException}
1441
1498
  * @returns {Promise}
1442
1499
  */
1443
- async updateTelesignProvider(providerId: string, name?: string, enabled?: boolean, username?: string, password?: string, from?: string): Promise<Models.Provider> {
1500
+ async updateTelesignProvider(providerId: string, name?: string, enabled?: boolean, customerId?: string, apiKey?: string, from?: string): Promise<Models.Provider> {
1444
1501
  if (typeof providerId === 'undefined') {
1445
1502
  throw new AppwriteException('Missing required parameter: "providerId"');
1446
1503
  }
@@ -1456,12 +1513,12 @@ export class Messaging extends Service {
1456
1513
  payload['enabled'] = enabled;
1457
1514
  }
1458
1515
 
1459
- if (typeof username !== 'undefined') {
1460
- payload['username'] = username;
1516
+ if (typeof customerId !== 'undefined') {
1517
+ payload['customerId'] = customerId;
1461
1518
  }
1462
1519
 
1463
- if (typeof password !== 'undefined') {
1464
- payload['password'] = password;
1520
+ if (typeof apiKey !== 'undefined') {
1521
+ payload['apiKey'] = apiKey;
1465
1522
  }
1466
1523
 
1467
1524
  if (typeof from !== 'undefined') {
@@ -1477,6 +1534,7 @@ export class Messaging extends Service {
1477
1534
  /**
1478
1535
  * Create Textmagic provider
1479
1536
  *
1537
+ * Create a new Textmagic provider.
1480
1538
  *
1481
1539
  * @param {string} providerId
1482
1540
  * @param {string} name
@@ -1532,6 +1590,7 @@ export class Messaging extends Service {
1532
1590
  /**
1533
1591
  * Update Textmagic provider
1534
1592
  *
1593
+ * Update a Textmagic provider by its unique ID.
1535
1594
  *
1536
1595
  * @param {string} providerId
1537
1596
  * @param {string} name
@@ -1579,6 +1638,7 @@ export class Messaging extends Service {
1579
1638
  /**
1580
1639
  * Create Twilio provider
1581
1640
  *
1641
+ * Create a new Twilio provider.
1582
1642
  *
1583
1643
  * @param {string} providerId
1584
1644
  * @param {string} name
@@ -1634,6 +1694,7 @@ export class Messaging extends Service {
1634
1694
  /**
1635
1695
  * Update Twilio provider
1636
1696
  *
1697
+ * Update a Twilio provider by its unique ID.
1637
1698
  *
1638
1699
  * @param {string} providerId
1639
1700
  * @param {string} name
@@ -1681,6 +1742,7 @@ export class Messaging extends Service {
1681
1742
  /**
1682
1743
  * Create Vonage provider
1683
1744
  *
1745
+ * Create a new Vonage provider.
1684
1746
  *
1685
1747
  * @param {string} providerId
1686
1748
  * @param {string} name
@@ -1736,6 +1798,7 @@ export class Messaging extends Service {
1736
1798
  /**
1737
1799
  * Update Vonage provider
1738
1800
  *
1801
+ * Update a Vonage provider by its unique ID.
1739
1802
  *
1740
1803
  * @param {string} providerId
1741
1804
  * @param {string} name
@@ -1783,6 +1846,8 @@ export class Messaging extends Service {
1783
1846
  /**
1784
1847
  * Get provider
1785
1848
  *
1849
+ * Get a provider by its unique ID.
1850
+ *
1786
1851
  *
1787
1852
  * @param {string} providerId
1788
1853
  * @throws {AppwriteException}
@@ -1805,6 +1870,7 @@ export class Messaging extends Service {
1805
1870
  /**
1806
1871
  * Delete provider
1807
1872
  *
1873
+ * Delete a provider by its unique ID.
1808
1874
  *
1809
1875
  * @param {string} providerId
1810
1876
  * @throws {AppwriteException}
@@ -1827,6 +1893,7 @@ export class Messaging extends Service {
1827
1893
  /**
1828
1894
  * List provider logs
1829
1895
  *
1896
+ * Get the provider activity logs listed by its unique ID.
1830
1897
  *
1831
1898
  * @param {string} providerId
1832
1899
  * @param {string[]} queries
@@ -1854,6 +1921,7 @@ export class Messaging extends Service {
1854
1921
  /**
1855
1922
  * List subscriber logs
1856
1923
  *
1924
+ * Get the subscriber activity logs listed by its unique ID.
1857
1925
  *
1858
1926
  * @param {string} subscriberId
1859
1927
  * @param {string[]} queries
@@ -1879,8 +1947,9 @@ export class Messaging extends Service {
1879
1947
  }
1880
1948
 
1881
1949
  /**
1882
- * List topics.
1950
+ * List topics
1883
1951
  *
1952
+ * Get a list of all topics from the current Appwrite project.
1884
1953
  *
1885
1954
  * @param {string[]} queries
1886
1955
  * @param {string} search
@@ -1906,15 +1975,17 @@ export class Messaging extends Service {
1906
1975
  }
1907
1976
 
1908
1977
  /**
1909
- * Create a topic.
1978
+ * Create topic
1910
1979
  *
1980
+ * Create a new topic.
1911
1981
  *
1912
1982
  * @param {string} topicId
1913
1983
  * @param {string} name
1984
+ * @param {string[]} subscribe
1914
1985
  * @throws {AppwriteException}
1915
1986
  * @returns {Promise}
1916
1987
  */
1917
- async createTopic(topicId: string, name: string): Promise<Models.Topic> {
1988
+ async createTopic(topicId: string, name: string, subscribe?: string[]): Promise<Models.Topic> {
1918
1989
  if (typeof topicId === 'undefined') {
1919
1990
  throw new AppwriteException('Missing required parameter: "topicId"');
1920
1991
  }
@@ -1934,6 +2005,10 @@ export class Messaging extends Service {
1934
2005
  payload['name'] = name;
1935
2006
  }
1936
2007
 
2008
+ if (typeof subscribe !== 'undefined') {
2009
+ payload['subscribe'] = subscribe;
2010
+ }
2011
+
1937
2012
  const uri = new URL(this.client.config.endpoint + apiPath);
1938
2013
  return await this.client.call('post', uri, {
1939
2014
  'content-type': 'application/json',
@@ -1941,8 +2016,10 @@ export class Messaging extends Service {
1941
2016
  }
1942
2017
 
1943
2018
  /**
1944
- * Get a topic.
2019
+ * Get topic
1945
2020
  *
2021
+ * Get a topic by its unique ID.
2022
+ *
1946
2023
  *
1947
2024
  * @param {string} topicId
1948
2025
  * @throws {AppwriteException}
@@ -1963,15 +2040,18 @@ export class Messaging extends Service {
1963
2040
  }
1964
2041
 
1965
2042
  /**
1966
- * Update a topic.
2043
+ * Update topic
1967
2044
  *
2045
+ * Update a topic by its unique ID.
2046
+ *
1968
2047
  *
1969
2048
  * @param {string} topicId
1970
2049
  * @param {string} name
2050
+ * @param {string[]} subscribe
1971
2051
  * @throws {AppwriteException}
1972
2052
  * @returns {Promise}
1973
2053
  */
1974
- async updateTopic(topicId: string, name?: string): Promise<Models.Topic> {
2054
+ async updateTopic(topicId: string, name?: string, subscribe?: string[]): Promise<Models.Topic> {
1975
2055
  if (typeof topicId === 'undefined') {
1976
2056
  throw new AppwriteException('Missing required parameter: "topicId"');
1977
2057
  }
@@ -1983,6 +2063,10 @@ export class Messaging extends Service {
1983
2063
  payload['name'] = name;
1984
2064
  }
1985
2065
 
2066
+ if (typeof subscribe !== 'undefined') {
2067
+ payload['subscribe'] = subscribe;
2068
+ }
2069
+
1986
2070
  const uri = new URL(this.client.config.endpoint + apiPath);
1987
2071
  return await this.client.call('patch', uri, {
1988
2072
  'content-type': 'application/json',
@@ -1990,8 +2074,9 @@ export class Messaging extends Service {
1990
2074
  }
1991
2075
 
1992
2076
  /**
1993
- * Delete a topic.
2077
+ * Delete topic
1994
2078
  *
2079
+ * Delete a topic by its unique ID.
1995
2080
  *
1996
2081
  * @param {string} topicId
1997
2082
  * @throws {AppwriteException}
@@ -2014,6 +2099,7 @@ export class Messaging extends Service {
2014
2099
  /**
2015
2100
  * List topic logs
2016
2101
  *
2102
+ * Get the topic activity logs listed by its unique ID.
2017
2103
  *
2018
2104
  * @param {string} topicId
2019
2105
  * @param {string[]} queries
@@ -2039,8 +2125,9 @@ export class Messaging extends Service {
2039
2125
  }
2040
2126
 
2041
2127
  /**
2042
- * List subscribers.
2128
+ * List subscribers
2043
2129
  *
2130
+ * Get a list of all subscribers from the current Appwrite project.
2044
2131
  *
2045
2132
  * @param {string} topicId
2046
2133
  * @param {string[]} queries
@@ -2071,8 +2158,9 @@ export class Messaging extends Service {
2071
2158
  }
2072
2159
 
2073
2160
  /**
2074
- * Create a subscriber.
2161
+ * Create subscriber
2075
2162
  *
2163
+ * Create a new subscriber.
2076
2164
  *
2077
2165
  * @param {string} topicId
2078
2166
  * @param {string} subscriberId
@@ -2111,8 +2199,10 @@ export class Messaging extends Service {
2111
2199
  }
2112
2200
 
2113
2201
  /**
2114
- * Get a subscriber.
2202
+ * Get subscriber
2115
2203
  *
2204
+ * Get a subscriber by its unique ID.
2205
+ *
2116
2206
  *
2117
2207
  * @param {string} topicId
2118
2208
  * @param {string} subscriberId
@@ -2138,8 +2228,9 @@ export class Messaging extends Service {
2138
2228
  }
2139
2229
 
2140
2230
  /**
2141
- * Delete a subscriber.
2231
+ * Delete subscriber
2142
2232
  *
2233
+ * Delete a subscriber by its unique ID.
2143
2234
  *
2144
2235
  * @param {string} topicId
2145
2236
  * @param {string} subscriberId