@appwrite.io/console 0.5.0 → 0.6.0-rc.10

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 (456) hide show
  1. package/README.md +2 -2
  2. package/dist/cjs/sdk.js +3770 -355
  3. package/dist/cjs/sdk.js.map +1 -1
  4. package/dist/esm/sdk.js +3770 -356
  5. package/dist/esm/sdk.js.map +1 -1
  6. package/dist/iife/sdk.js +3770 -355
  7. package/docs/examples/account/{update-phone-session.md → add-authenticator.md} +2 -2
  8. package/docs/examples/account/create-anonymous-session.md +1 -1
  9. package/docs/examples/account/create-email-password-session.md +18 -0
  10. package/docs/examples/account/{create-email-session.md → create-email-token.md} +2 -2
  11. package/docs/examples/account/create-j-w-t.md +1 -1
  12. package/docs/examples/account/{create-magic-u-r-l-session.md → create-magic-u-r-l-token.md} +2 -2
  13. package/docs/examples/account/create-o-auth2session.md +2 -2
  14. package/docs/examples/account/{create-phone-session.md → create-phone-token.md} +2 -2
  15. package/docs/examples/account/create-phone-verification.md +1 -1
  16. package/docs/examples/account/create-push-target.md +18 -0
  17. package/docs/examples/account/create-recovery.md +1 -1
  18. package/docs/examples/account/create-session.md +18 -0
  19. package/docs/examples/account/create-verification.md +1 -1
  20. package/docs/examples/account/create.md +1 -1
  21. package/docs/examples/account/create2f-a-challenge.md +18 -0
  22. package/docs/examples/account/delete-authenticator.md +18 -0
  23. package/docs/examples/account/delete-identity.md +1 -1
  24. package/docs/examples/account/delete-push-target.md +18 -0
  25. package/docs/examples/account/delete-session.md +1 -1
  26. package/docs/examples/account/delete-sessions.md +1 -1
  27. package/docs/examples/account/delete.md +1 -1
  28. package/docs/examples/account/get-prefs.md +1 -1
  29. package/docs/examples/account/get-session.md +1 -1
  30. package/docs/examples/account/get.md +1 -1
  31. package/docs/examples/account/list-factors.md +18 -0
  32. package/docs/examples/account/list-identities.md +1 -1
  33. package/docs/examples/account/list-logs.md +1 -1
  34. package/docs/examples/account/list-sessions.md +1 -1
  35. package/docs/examples/account/update-challenge.md +18 -0
  36. package/docs/examples/account/update-email.md +1 -1
  37. package/docs/examples/account/update-m-f-a.md +18 -0
  38. package/docs/examples/account/update-magic-u-r-l-session.md +1 -1
  39. package/docs/examples/account/update-name.md +1 -1
  40. package/docs/examples/account/update-password.md +1 -1
  41. package/docs/examples/account/update-phone-verification.md +1 -1
  42. package/docs/examples/account/update-phone.md +1 -1
  43. package/docs/examples/account/update-prefs.md +1 -1
  44. package/docs/examples/account/update-push-target.md +18 -0
  45. package/docs/examples/account/update-recovery.md +2 -2
  46. package/docs/examples/account/update-session.md +1 -1
  47. package/docs/examples/account/update-status.md +1 -1
  48. package/docs/examples/account/update-verification.md +1 -1
  49. package/docs/examples/account/verify-authenticator.md +18 -0
  50. package/docs/examples/assistant/chat.md +1 -1
  51. package/docs/examples/avatars/get-browser.md +2 -2
  52. package/docs/examples/avatars/get-credit-card.md +2 -2
  53. package/docs/examples/avatars/get-favicon.md +1 -1
  54. package/docs/examples/avatars/get-flag.md +2 -2
  55. package/docs/examples/avatars/get-image.md +1 -1
  56. package/docs/examples/avatars/get-initials.md +1 -1
  57. package/docs/examples/avatars/get-q-r.md +1 -1
  58. package/docs/examples/console/variables.md +1 -1
  59. package/docs/examples/databases/create-boolean-attribute.md +1 -1
  60. package/docs/examples/databases/create-collection.md +1 -1
  61. package/docs/examples/databases/create-datetime-attribute.md +1 -1
  62. package/docs/examples/databases/create-document.md +1 -1
  63. package/docs/examples/databases/create-email-attribute.md +1 -1
  64. package/docs/examples/databases/create-enum-attribute.md +1 -1
  65. package/docs/examples/databases/create-float-attribute.md +1 -1
  66. package/docs/examples/databases/create-index.md +2 -2
  67. package/docs/examples/databases/create-integer-attribute.md +1 -1
  68. package/docs/examples/databases/create-ip-attribute.md +1 -1
  69. package/docs/examples/databases/create-relationship-attribute.md +2 -2
  70. package/docs/examples/databases/create-string-attribute.md +1 -1
  71. package/docs/examples/databases/create-url-attribute.md +1 -1
  72. package/docs/examples/databases/create.md +1 -1
  73. package/docs/examples/databases/delete-attribute.md +1 -1
  74. package/docs/examples/databases/delete-collection.md +1 -1
  75. package/docs/examples/databases/delete-document.md +1 -1
  76. package/docs/examples/databases/delete-index.md +1 -1
  77. package/docs/examples/databases/delete.md +1 -1
  78. package/docs/examples/databases/get-attribute.md +1 -1
  79. package/docs/examples/databases/get-collection-usage.md +1 -1
  80. package/docs/examples/databases/get-collection.md +1 -1
  81. package/docs/examples/databases/get-database-usage.md +1 -1
  82. package/docs/examples/databases/get-document.md +1 -1
  83. package/docs/examples/databases/get-index.md +1 -1
  84. package/docs/examples/databases/get-usage.md +1 -1
  85. package/docs/examples/databases/get.md +1 -1
  86. package/docs/examples/databases/list-attributes.md +1 -1
  87. package/docs/examples/databases/list-collection-logs.md +1 -1
  88. package/docs/examples/databases/list-collections.md +1 -1
  89. package/docs/examples/databases/list-document-logs.md +1 -1
  90. package/docs/examples/databases/list-documents.md +1 -1
  91. package/docs/examples/databases/list-indexes.md +1 -1
  92. package/docs/examples/databases/list-logs.md +1 -1
  93. package/docs/examples/databases/list.md +1 -1
  94. package/docs/examples/databases/update-boolean-attribute.md +1 -1
  95. package/docs/examples/databases/update-collection.md +1 -1
  96. package/docs/examples/databases/update-datetime-attribute.md +1 -1
  97. package/docs/examples/databases/update-document.md +1 -1
  98. package/docs/examples/databases/update-email-attribute.md +1 -1
  99. package/docs/examples/databases/update-enum-attribute.md +1 -1
  100. package/docs/examples/databases/update-float-attribute.md +1 -1
  101. package/docs/examples/databases/update-integer-attribute.md +1 -1
  102. package/docs/examples/databases/update-ip-attribute.md +1 -1
  103. package/docs/examples/databases/update-relationship-attribute.md +1 -1
  104. package/docs/examples/databases/update-string-attribute.md +1 -1
  105. package/docs/examples/databases/update-url-attribute.md +1 -1
  106. package/docs/examples/databases/update.md +1 -1
  107. package/docs/examples/functions/create-build.md +1 -1
  108. package/docs/examples/functions/create-deployment.md +1 -1
  109. package/docs/examples/functions/create-execution.md +1 -1
  110. package/docs/examples/functions/create-variable.md +1 -1
  111. package/docs/examples/functions/create.md +2 -2
  112. package/docs/examples/functions/delete-deployment.md +1 -1
  113. package/docs/examples/functions/delete-variable.md +1 -1
  114. package/docs/examples/functions/delete.md +1 -1
  115. package/docs/examples/functions/download-deployment.md +1 -1
  116. package/docs/examples/functions/get-deployment.md +1 -1
  117. package/docs/examples/functions/get-execution.md +1 -1
  118. package/docs/examples/functions/get-function-usage.md +1 -1
  119. package/docs/examples/functions/get-usage.md +1 -1
  120. package/docs/examples/functions/get-variable.md +1 -1
  121. package/docs/examples/functions/get.md +1 -1
  122. package/docs/examples/functions/list-deployments.md +1 -1
  123. package/docs/examples/functions/list-executions.md +1 -1
  124. package/docs/examples/functions/list-runtimes.md +1 -1
  125. package/docs/examples/functions/list-variables.md +1 -1
  126. package/docs/examples/functions/list.md +1 -1
  127. package/docs/examples/functions/update-deployment.md +1 -1
  128. package/docs/examples/functions/update-variable.md +1 -1
  129. package/docs/examples/functions/update.md +1 -1
  130. package/docs/examples/graphql/mutation.md +1 -1
  131. package/docs/examples/graphql/query.md +1 -1
  132. package/docs/examples/health/get-antivirus.md +1 -1
  133. package/docs/examples/health/get-cache.md +1 -1
  134. package/docs/examples/health/get-certificate.md +18 -0
  135. package/docs/examples/health/get-d-b.md +1 -1
  136. package/docs/examples/health/get-failed-jobs.md +18 -0
  137. package/docs/examples/health/get-pub-sub.md +1 -1
  138. package/docs/examples/health/get-queue-builds.md +1 -1
  139. package/docs/examples/health/get-queue-certificates.md +1 -1
  140. package/docs/examples/health/get-queue-databases.md +1 -1
  141. package/docs/examples/health/get-queue-deletes.md +1 -1
  142. package/docs/examples/health/get-queue-functions.md +1 -1
  143. package/docs/examples/health/get-queue-logs.md +1 -1
  144. package/docs/examples/health/get-queue-mails.md +1 -1
  145. package/docs/examples/health/get-queue-messaging.md +1 -1
  146. package/docs/examples/health/get-queue-migrations.md +1 -1
  147. package/docs/examples/health/get-queue-webhooks.md +1 -1
  148. package/docs/examples/health/get-queue.md +1 -1
  149. package/docs/examples/health/get-storage-local.md +1 -1
  150. package/docs/examples/health/get-time.md +1 -1
  151. package/docs/examples/health/get.md +1 -1
  152. package/docs/examples/locale/get.md +1 -1
  153. package/docs/examples/locale/list-codes.md +1 -1
  154. package/docs/examples/locale/list-continents.md +1 -1
  155. package/docs/examples/locale/list-countries-e-u.md +1 -1
  156. package/docs/examples/locale/list-countries-phones.md +1 -1
  157. package/docs/examples/locale/list-countries.md +1 -1
  158. package/docs/examples/locale/list-currencies.md +1 -1
  159. package/docs/examples/locale/list-languages.md +1 -1
  160. package/docs/examples/messaging/create-a-p-n-s-provider.md +18 -0
  161. package/docs/examples/messaging/create-email.md +18 -0
  162. package/docs/examples/messaging/create-f-c-m-provider.md +18 -0
  163. package/docs/examples/messaging/create-mailgun-provider.md +18 -0
  164. package/docs/examples/messaging/create-msg91provider.md +18 -0
  165. package/docs/examples/messaging/create-push.md +18 -0
  166. package/docs/examples/messaging/create-s-m-s.md +18 -0
  167. package/docs/examples/messaging/create-s-m-t-p-provider.md +18 -0
  168. package/docs/examples/messaging/create-sendgrid-provider.md +18 -0
  169. package/docs/examples/messaging/create-subscriber.md +18 -0
  170. package/docs/examples/messaging/create-telesign-provider.md +18 -0
  171. package/docs/examples/messaging/create-textmagic-provider.md +18 -0
  172. package/docs/examples/messaging/create-topic.md +18 -0
  173. package/docs/examples/messaging/create-twilio-provider.md +18 -0
  174. package/docs/examples/messaging/create-vonage-provider.md +18 -0
  175. package/docs/examples/messaging/delete-provider.md +18 -0
  176. package/docs/examples/messaging/delete-subscriber.md +18 -0
  177. package/docs/examples/messaging/delete-topic.md +18 -0
  178. package/docs/examples/messaging/delete.md +18 -0
  179. package/docs/examples/messaging/get-message.md +18 -0
  180. package/docs/examples/messaging/get-provider.md +18 -0
  181. package/docs/examples/messaging/get-subscriber.md +18 -0
  182. package/docs/examples/messaging/get-topic.md +18 -0
  183. package/docs/examples/messaging/list-message-logs.md +18 -0
  184. package/docs/examples/messaging/list-messages.md +18 -0
  185. package/docs/examples/messaging/list-provider-logs.md +18 -0
  186. package/docs/examples/messaging/list-providers.md +18 -0
  187. package/docs/examples/messaging/list-subscriber-logs.md +18 -0
  188. package/docs/examples/messaging/list-subscribers.md +18 -0
  189. package/docs/examples/messaging/list-targets.md +18 -0
  190. package/docs/examples/messaging/list-topic-logs.md +18 -0
  191. package/docs/examples/messaging/list-topics.md +18 -0
  192. package/docs/examples/messaging/update-a-p-n-s-provider.md +18 -0
  193. package/docs/examples/messaging/update-email.md +18 -0
  194. package/docs/examples/messaging/update-f-c-m-provider.md +18 -0
  195. package/docs/examples/messaging/update-mailgun-provider.md +18 -0
  196. package/docs/examples/messaging/update-msg91provider.md +18 -0
  197. package/docs/examples/messaging/update-push.md +18 -0
  198. package/docs/examples/messaging/update-s-m-s.md +18 -0
  199. package/docs/examples/messaging/update-s-m-t-p-provider.md +18 -0
  200. package/docs/examples/messaging/update-sendgrid-provider.md +18 -0
  201. package/docs/examples/messaging/update-telesign-provider.md +18 -0
  202. package/docs/examples/messaging/update-textmagic-provider.md +18 -0
  203. package/docs/examples/messaging/update-topic.md +18 -0
  204. package/docs/examples/messaging/update-twilio-provider.md +18 -0
  205. package/docs/examples/messaging/update-vonage-provider.md +18 -0
  206. package/docs/examples/migrations/create-appwrite-migration.md +1 -1
  207. package/docs/examples/migrations/create-firebase-migration.md +1 -1
  208. package/docs/examples/migrations/create-firebase-o-auth-migration.md +1 -1
  209. package/docs/examples/migrations/create-n-host-migration.md +1 -1
  210. package/docs/examples/migrations/create-supabase-migration.md +1 -1
  211. package/docs/examples/migrations/delete-firebase-auth.md +1 -1
  212. package/docs/examples/migrations/delete.md +1 -1
  213. package/docs/examples/migrations/get-appwrite-report.md +1 -1
  214. package/docs/examples/migrations/get-firebase-report-o-auth.md +1 -1
  215. package/docs/examples/migrations/get-firebase-report.md +1 -1
  216. package/docs/examples/migrations/get-n-host-report.md +1 -1
  217. package/docs/examples/migrations/get-supabase-report.md +1 -1
  218. package/docs/examples/migrations/get.md +1 -1
  219. package/docs/examples/migrations/list-firebase-projects.md +1 -1
  220. package/docs/examples/migrations/list.md +1 -1
  221. package/docs/examples/migrations/retry.md +1 -1
  222. package/docs/examples/project/create-variable.md +1 -1
  223. package/docs/examples/project/delete-variable.md +1 -1
  224. package/docs/examples/project/get-usage.md +1 -1
  225. package/docs/examples/project/get-variable.md +1 -1
  226. package/docs/examples/project/list-variables.md +1 -1
  227. package/docs/examples/project/update-variable.md +1 -1
  228. package/docs/examples/projects/create-key.md +1 -1
  229. package/docs/examples/projects/create-platform.md +2 -2
  230. package/docs/examples/projects/create-smtp-test.md +18 -0
  231. package/docs/examples/projects/create-webhook.md +2 -2
  232. package/docs/examples/projects/create.md +1 -1
  233. package/docs/examples/projects/delete-email-template.md +2 -2
  234. package/docs/examples/projects/delete-key.md +1 -1
  235. package/docs/examples/projects/delete-platform.md +1 -1
  236. package/docs/examples/projects/delete-sms-template.md +2 -2
  237. package/docs/examples/projects/delete-webhook.md +1 -1
  238. package/docs/examples/projects/delete.md +1 -1
  239. package/docs/examples/projects/get-email-template.md +2 -2
  240. package/docs/examples/projects/get-key.md +1 -1
  241. package/docs/examples/projects/get-platform.md +1 -1
  242. package/docs/examples/projects/get-sms-template.md +2 -2
  243. package/docs/examples/projects/get-webhook.md +1 -1
  244. package/docs/examples/projects/get.md +1 -1
  245. package/docs/examples/projects/list-keys.md +1 -1
  246. package/docs/examples/projects/list-platforms.md +1 -1
  247. package/docs/examples/projects/list-webhooks.md +1 -1
  248. package/docs/examples/projects/list.md +1 -1
  249. package/docs/examples/projects/update-auth-duration.md +1 -1
  250. package/docs/examples/projects/update-auth-limit.md +1 -1
  251. package/docs/examples/projects/update-auth-password-dictionary.md +1 -1
  252. package/docs/examples/projects/update-auth-password-history.md +1 -1
  253. package/docs/examples/projects/update-auth-sessions-limit.md +1 -1
  254. package/docs/examples/projects/update-auth-status.md +2 -2
  255. package/docs/examples/projects/update-email-template.md +2 -2
  256. package/docs/examples/projects/update-key.md +1 -1
  257. package/docs/examples/projects/update-o-auth2.md +2 -2
  258. package/docs/examples/projects/update-personal-data-check.md +1 -1
  259. package/docs/examples/projects/update-platform.md +1 -1
  260. package/docs/examples/projects/update-service-status-all.md +1 -1
  261. package/docs/examples/projects/update-service-status.md +2 -2
  262. package/docs/examples/projects/update-sms-template.md +2 -2
  263. package/docs/examples/projects/{update-smtp-configuration.md → update-smtp.md} +2 -2
  264. package/docs/examples/projects/update-team.md +1 -1
  265. package/docs/examples/projects/update-webhook-signature.md +1 -1
  266. package/docs/examples/projects/update-webhook.md +2 -2
  267. package/docs/examples/projects/update.md +1 -1
  268. package/docs/examples/proxy/create-rule.md +2 -2
  269. package/docs/examples/proxy/delete-rule.md +1 -1
  270. package/docs/examples/proxy/get-rule.md +1 -1
  271. package/docs/examples/proxy/list-rules.md +1 -1
  272. package/docs/examples/proxy/update-rule-verification.md +1 -1
  273. package/docs/examples/storage/create-bucket.md +1 -1
  274. package/docs/examples/storage/create-file.md +1 -1
  275. package/docs/examples/storage/delete-bucket.md +1 -1
  276. package/docs/examples/storage/delete-file.md +1 -1
  277. package/docs/examples/storage/get-bucket-usage.md +1 -1
  278. package/docs/examples/storage/get-bucket.md +1 -1
  279. package/docs/examples/storage/get-file-download.md +1 -1
  280. package/docs/examples/storage/get-file-preview.md +1 -1
  281. package/docs/examples/storage/get-file-view.md +1 -1
  282. package/docs/examples/storage/get-file.md +1 -1
  283. package/docs/examples/storage/get-usage.md +1 -1
  284. package/docs/examples/storage/list-buckets.md +1 -1
  285. package/docs/examples/storage/list-files.md +1 -1
  286. package/docs/examples/storage/update-bucket.md +1 -1
  287. package/docs/examples/storage/update-file.md +1 -1
  288. package/docs/examples/teams/create-membership.md +1 -1
  289. package/docs/examples/teams/create.md +1 -1
  290. package/docs/examples/teams/delete-membership.md +1 -1
  291. package/docs/examples/teams/delete.md +1 -1
  292. package/docs/examples/teams/get-membership.md +1 -1
  293. package/docs/examples/teams/get-prefs.md +1 -1
  294. package/docs/examples/teams/get.md +1 -1
  295. package/docs/examples/teams/list-logs.md +1 -1
  296. package/docs/examples/teams/list-memberships.md +1 -1
  297. package/docs/examples/teams/list.md +1 -1
  298. package/docs/examples/teams/update-membership-status.md +1 -1
  299. package/docs/examples/teams/update-membership.md +1 -1
  300. package/docs/examples/teams/update-name.md +1 -1
  301. package/docs/examples/teams/update-prefs.md +1 -1
  302. package/docs/examples/users/create-argon2user.md +1 -1
  303. package/docs/examples/users/create-bcrypt-user.md +1 -1
  304. package/docs/examples/users/create-m-d5user.md +1 -1
  305. package/docs/examples/users/create-p-h-pass-user.md +1 -1
  306. package/docs/examples/users/create-s-h-a-user.md +1 -1
  307. package/docs/examples/users/create-scrypt-modified-user.md +1 -1
  308. package/docs/examples/users/create-scrypt-user.md +1 -1
  309. package/docs/examples/users/create-session.md +18 -0
  310. package/docs/examples/users/create-target.md +18 -0
  311. package/docs/examples/users/create-token.md +18 -0
  312. package/docs/examples/users/create.md +1 -1
  313. package/docs/examples/users/delete-authenticator.md +18 -0
  314. package/docs/examples/users/delete-identity.md +1 -1
  315. package/docs/examples/users/delete-session.md +1 -1
  316. package/docs/examples/users/delete-sessions.md +1 -1
  317. package/docs/examples/users/delete-target.md +18 -0
  318. package/docs/examples/users/delete.md +1 -1
  319. package/docs/examples/users/get-prefs.md +1 -1
  320. package/docs/examples/users/get-target.md +18 -0
  321. package/docs/examples/users/get-usage.md +1 -1
  322. package/docs/examples/users/get.md +1 -1
  323. package/docs/examples/users/list-factors.md +18 -0
  324. package/docs/examples/users/list-identities.md +1 -1
  325. package/docs/examples/users/list-logs.md +1 -1
  326. package/docs/examples/users/list-memberships.md +1 -1
  327. package/docs/examples/users/list-sessions.md +1 -1
  328. package/docs/examples/users/list-targets.md +18 -0
  329. package/docs/examples/users/list.md +1 -1
  330. package/docs/examples/users/update-email-verification.md +1 -1
  331. package/docs/examples/users/update-email.md +1 -1
  332. package/docs/examples/users/update-labels.md +1 -1
  333. package/docs/examples/users/update-mfa.md +18 -0
  334. package/docs/examples/users/update-name.md +1 -1
  335. package/docs/examples/users/update-password.md +1 -1
  336. package/docs/examples/users/update-phone-verification.md +1 -1
  337. package/docs/examples/users/update-phone.md +1 -1
  338. package/docs/examples/users/update-prefs.md +1 -1
  339. package/docs/examples/users/update-status.md +1 -1
  340. package/docs/examples/users/update-target.md +18 -0
  341. package/docs/examples/vcs/create-repository-detection.md +1 -1
  342. package/docs/examples/vcs/create-repository.md +1 -1
  343. package/docs/examples/vcs/delete-installation.md +1 -1
  344. package/docs/examples/vcs/get-installation.md +1 -1
  345. package/docs/examples/vcs/get-repository.md +1 -1
  346. package/docs/examples/vcs/list-installations.md +1 -1
  347. package/docs/examples/vcs/list-repositories.md +1 -1
  348. package/docs/examples/vcs/list-repository-branches.md +1 -1
  349. package/docs/examples/vcs/update-external-deployments.md +1 -1
  350. package/package.json +1 -1
  351. package/src/client.ts +2 -2
  352. package/src/enums/a-p-i-service.ts +13 -0
  353. package/src/enums/auth-method.ts +9 -0
  354. package/src/enums/browser.ts +16 -0
  355. package/src/enums/compression.ts +5 -0
  356. package/src/enums/credit-card.ts +18 -0
  357. package/src/enums/database-usage-range.ts +5 -0
  358. package/src/enums/email-template-locale.ts +133 -0
  359. package/src/enums/email-template-type.ts +6 -0
  360. package/src/enums/execution-method.ts +8 -0
  361. package/src/enums/factor.ts +5 -0
  362. package/src/enums/flag.ts +196 -0
  363. package/src/enums/function-usage-range.ts +5 -0
  364. package/src/enums/image-format.ts +7 -0
  365. package/src/enums/image-gravity.ts +11 -0
  366. package/src/enums/index-type.ts +6 -0
  367. package/src/enums/message-status.ts +5 -0
  368. package/src/enums/messaging-provider-type.ts +5 -0
  369. package/src/enums/name.ts +14 -0
  370. package/src/enums/o-auth-provider.ts +41 -0
  371. package/src/enums/password-hash.ts +13 -0
  372. package/src/enums/platform-type.ts +15 -0
  373. package/src/enums/project-usage-range.ts +4 -0
  374. package/src/enums/region.ts +3 -0
  375. package/src/enums/relation-mutate.ts +5 -0
  376. package/src/enums/relationship-type.ts +6 -0
  377. package/src/enums/resource-type.ts +4 -0
  378. package/src/enums/runtime.ts +6 -0
  379. package/src/enums/s-m-s-template-locale.ts +133 -0
  380. package/src/enums/s-m-s-template-type.ts +5 -0
  381. package/src/enums/s-m-t-p-encryption.ts +5 -0
  382. package/src/enums/s-m-t-p-secure.ts +3 -0
  383. package/src/enums/storage-usage-range.ts +5 -0
  384. package/src/enums/type.ts +3 -0
  385. package/src/enums/user-usage-range.ts +5 -0
  386. package/src/index.ts +36 -1
  387. package/src/models.ts +417 -7
  388. package/src/query.ts +61 -34
  389. package/src/service.ts +7 -7
  390. package/src/services/account.ts +468 -143
  391. package/src/services/assistant.ts +1 -0
  392. package/src/services/avatars.ts +10 -6
  393. package/src/services/console.ts +1 -0
  394. package/src/services/databases.ts +18 -13
  395. package/src/services/functions.ts +14 -10
  396. package/src/services/graphql.ts +1 -0
  397. package/src/services/health.ts +54 -0
  398. package/src/services/locale.ts +1 -0
  399. package/src/services/messaging.ts +2176 -0
  400. package/src/services/migrations.ts +3 -2
  401. package/src/services/project.ts +4 -2
  402. package/src/services/projects.ts +137 -33
  403. package/src/services/proxy.ts +4 -2
  404. package/src/services/storage.ts +16 -11
  405. package/src/services/teams.ts +1 -0
  406. package/src/services/users.ts +348 -7
  407. package/src/services/vcs.ts +1 -0
  408. package/types/enums/a-p-i-service.d.ts +13 -0
  409. package/types/enums/auth-method.d.ts +9 -0
  410. package/types/enums/browser.d.ts +16 -0
  411. package/types/enums/compression.d.ts +5 -0
  412. package/types/enums/credit-card.d.ts +18 -0
  413. package/types/enums/database-usage-range.d.ts +5 -0
  414. package/types/enums/email-template-locale.d.ts +133 -0
  415. package/types/enums/email-template-type.d.ts +6 -0
  416. package/types/enums/execution-method.d.ts +8 -0
  417. package/types/enums/factor.d.ts +5 -0
  418. package/types/enums/flag.d.ts +196 -0
  419. package/types/enums/function-usage-range.d.ts +5 -0
  420. package/types/enums/image-format.d.ts +7 -0
  421. package/types/enums/image-gravity.d.ts +11 -0
  422. package/types/enums/index-type.d.ts +6 -0
  423. package/types/enums/message-status.d.ts +5 -0
  424. package/types/enums/messaging-provider-type.d.ts +5 -0
  425. package/types/enums/name.d.ts +14 -0
  426. package/types/enums/o-auth-provider.d.ts +41 -0
  427. package/types/enums/password-hash.d.ts +13 -0
  428. package/types/enums/platform-type.d.ts +15 -0
  429. package/types/enums/project-usage-range.d.ts +4 -0
  430. package/types/enums/region.d.ts +3 -0
  431. package/types/enums/relation-mutate.d.ts +5 -0
  432. package/types/enums/relationship-type.d.ts +6 -0
  433. package/types/enums/resource-type.d.ts +4 -0
  434. package/types/enums/runtime.d.ts +6 -0
  435. package/types/enums/s-m-s-template-locale.d.ts +133 -0
  436. package/types/enums/s-m-s-template-type.d.ts +5 -0
  437. package/types/enums/s-m-t-p-encryption.d.ts +5 -0
  438. package/types/enums/s-m-t-p-secure.d.ts +3 -0
  439. package/types/enums/storage-usage-range.d.ts +5 -0
  440. package/types/enums/type.d.ts +3 -0
  441. package/types/enums/user-usage-range.d.ts +5 -0
  442. package/types/index.d.ts +35 -0
  443. package/types/models.d.ts +417 -7
  444. package/types/query.d.ts +10 -3
  445. package/types/services/account.d.ts +188 -79
  446. package/types/services/avatars.d.ts +9 -6
  447. package/types/services/databases.d.ts +17 -13
  448. package/types/services/functions.d.ts +13 -10
  449. package/types/services/health.d.ts +23 -0
  450. package/types/services/messaging.d.ts +627 -0
  451. package/types/services/migrations.d.ts +2 -2
  452. package/types/services/project.d.ts +3 -2
  453. package/types/services/projects.d.ts +63 -33
  454. package/types/services/proxy.d.ts +3 -2
  455. package/types/services/storage.d.ts +15 -11
  456. package/types/services/users.d.ts +129 -7
package/dist/esm/sdk.js CHANGED
@@ -26,17 +26,63 @@ function __awaiter(thisArg, _arguments, P, generator) {
26
26
  });
27
27
  }
28
28
 
29
+ class Query {
30
+ constructor(method, attribute, values) {
31
+ this.method = method;
32
+ this.attribute = attribute;
33
+ if (values !== undefined) {
34
+ if (Array.isArray(values)) {
35
+ this.values = values;
36
+ }
37
+ else {
38
+ this.values = [values];
39
+ }
40
+ }
41
+ }
42
+ toString() {
43
+ return JSON.stringify({
44
+ method: this.method,
45
+ attribute: this.attribute,
46
+ values: this.values,
47
+ });
48
+ }
49
+ }
50
+ Query.equal = (attribute, value) => new Query("equal", attribute, value).toString();
51
+ Query.notEqual = (attribute, value) => new Query("notEqual", attribute, value).toString();
52
+ Query.lessThan = (attribute, value) => new Query("lessThan", attribute, value).toString();
53
+ Query.lessThanEqual = (attribute, value) => new Query("lessThanEqual", attribute, value).toString();
54
+ Query.greaterThan = (attribute, value) => new Query("greaterThan", attribute, value).toString();
55
+ Query.greaterThanEqual = (attribute, value) => new Query("greaterThanEqual", attribute, value).toString();
56
+ Query.isNull = (attribute) => new Query("isNull", attribute).toString();
57
+ Query.isNotNull = (attribute) => new Query("isNotNull", attribute).toString();
58
+ Query.between = (attribute, start, end) => new Query("between", attribute, [start, end]).toString();
59
+ Query.startsWith = (attribute, value) => new Query("startsWith", attribute, value).toString();
60
+ Query.endsWith = (attribute, value) => new Query("endsWith", attribute, value).toString();
61
+ Query.select = (attributes) => new Query("select", undefined, attributes).toString();
62
+ Query.search = (attribute, value) => new Query("search", attribute, value).toString();
63
+ Query.orderDesc = (attribute) => new Query("orderDesc", attribute).toString();
64
+ Query.orderAsc = (attribute) => new Query("orderAsc", attribute).toString();
65
+ Query.cursorAfter = (documentId) => new Query("cursorAfter", undefined, documentId).toString();
66
+ Query.cursorBefore = (documentId) => new Query("cursorBefore", undefined, documentId).toString();
67
+ Query.limit = (limit) => new Query("limit", undefined, limit).toString();
68
+ Query.offset = (offset) => new Query("offset", undefined, offset).toString();
69
+ Query.contains = (attribute, value) => new Query("contains", attribute, value).toString();
70
+ Query.or = (queries) => new Query("or", undefined, queries.map((query) => JSON.parse(query))).toString();
71
+ Query.and = (queries) => new Query("and", undefined, queries.map((query) => JSON.parse(query))).toString();
72
+
29
73
  class Service {
30
74
  constructor(client) {
31
75
  this.client = client;
32
76
  }
33
77
  static flatten(data, prefix = '') {
34
78
  let output = {};
35
- for (const key in data) {
36
- let value = data[key];
37
- let finalKey = prefix ? `${prefix}[${key}]` : key;
79
+ for (const [key, value] of Object.entries(data)) {
80
+ let finalKey = prefix ? prefix + '[' + key + ']' : key;
38
81
  if (Array.isArray(value)) {
39
- output = Object.assign(output, this.flatten(value, finalKey));
82
+ output = Object.assign(Object.assign({}, output), Service.flatten(value, finalKey));
83
+ }
84
+ else if (value instanceof Query) {
85
+ output[finalKey] = JSON.stringify(value);
40
86
  }
41
87
  else {
42
88
  output[finalKey] = value;
@@ -47,36 +93,6 @@ class Service {
47
93
  }
48
94
  Service.CHUNK_SIZE = 5 * 1024 * 1024; // 5MB
49
95
 
50
- class Query {
51
- }
52
- Query.equal = (attribute, value) => Query.addQuery(attribute, "equal", value);
53
- Query.notEqual = (attribute, value) => Query.addQuery(attribute, "notEqual", value);
54
- Query.lessThan = (attribute, value) => Query.addQuery(attribute, "lessThan", value);
55
- Query.lessThanEqual = (attribute, value) => Query.addQuery(attribute, "lessThanEqual", value);
56
- Query.greaterThan = (attribute, value) => Query.addQuery(attribute, "greaterThan", value);
57
- Query.greaterThanEqual = (attribute, value) => Query.addQuery(attribute, "greaterThanEqual", value);
58
- Query.isNull = (attribute) => `isNull("${attribute}")`;
59
- Query.isNotNull = (attribute) => `isNotNull("${attribute}")`;
60
- Query.between = (attribute, start, end) => `between("${attribute}", ${Query.parseValues(start)}, ${Query.parseValues(end)})`;
61
- Query.startsWith = (attribute, value) => Query.addQuery(attribute, "startsWith", value);
62
- Query.endsWith = (attribute, value) => Query.addQuery(attribute, "endsWith", value);
63
- Query.select = (attributes) => `select([${attributes.map((attr) => `"${attr}"`).join(",")}])`;
64
- Query.search = (attribute, value) => Query.addQuery(attribute, "search", value);
65
- Query.orderDesc = (attribute) => `orderDesc("${attribute}")`;
66
- Query.orderAsc = (attribute) => `orderAsc("${attribute}")`;
67
- Query.cursorAfter = (documentId) => `cursorAfter("${documentId}")`;
68
- Query.cursorBefore = (documentId) => `cursorBefore("${documentId}")`;
69
- Query.limit = (limit) => `limit(${limit})`;
70
- Query.offset = (offset) => `offset(${offset})`;
71
- Query.addQuery = (attribute, method, value) => value instanceof Array
72
- ? `${method}("${attribute}", [${value
73
- .map((v) => Query.parseValues(v))
74
- .join(",")}])`
75
- : `${method}("${attribute}", [${Query.parseValues(value)}])`;
76
- Query.parseValues = (value) => typeof value === "string" || value instanceof String
77
- ? `"${value}"`
78
- : `${value}`;
79
-
80
96
  class AppwriteException extends Error {
81
97
  constructor(message, code = 0, type = '', response = '') {
82
98
  super(message);
@@ -90,7 +106,7 @@ class AppwriteException extends Error {
90
106
  class Client {
91
107
  constructor() {
92
108
  this.config = {
93
- endpoint: 'https://HOSTNAME/v1',
109
+ endpoint: 'https://cloud.appwrite.io/v1',
94
110
  endpointRealtime: '',
95
111
  project: '',
96
112
  key: '',
@@ -102,7 +118,7 @@ class Client {
102
118
  'x-sdk-name': 'Console',
103
119
  'x-sdk-platform': 'console',
104
120
  'x-sdk-language': 'web',
105
- 'x-sdk-version': '0.5.0',
121
+ 'x-sdk-version': '0.6.0-rc.10',
106
122
  'X-Appwrite-Response-Format': '1.4.0',
107
123
  };
108
124
  this.realtime = {
@@ -568,7 +584,7 @@ class Account extends Service {
568
584
  *
569
585
  * Get the list of identities for the currently logged in user.
570
586
  *
571
- * @param {string} queries
587
+ * @param {string[]} queries
572
588
  * @throws {AppwriteException}
573
589
  * @returns {Promise}
574
590
  */
@@ -586,7 +602,7 @@ class Account extends Service {
586
602
  });
587
603
  }
588
604
  /**
589
- * Delete Identity
605
+ * Delete identity
590
606
  *
591
607
  * Delete an identity by its unique ID.
592
608
  *
@@ -652,6 +668,179 @@ class Account extends Service {
652
668
  }, payload);
653
669
  });
654
670
  }
671
+ /**
672
+ * Update MFA
673
+ *
674
+ *
675
+ * @param {boolean} mfa
676
+ * @throws {AppwriteException}
677
+ * @returns {Promise}
678
+ */
679
+ updateMFA(mfa) {
680
+ return __awaiter(this, void 0, void 0, function* () {
681
+ if (typeof mfa === 'undefined') {
682
+ throw new AppwriteException('Missing required parameter: "mfa"');
683
+ }
684
+ const apiPath = '/account/mfa';
685
+ const payload = {};
686
+ if (typeof mfa !== 'undefined') {
687
+ payload['mfa'] = mfa;
688
+ }
689
+ const uri = new URL(this.client.config.endpoint + apiPath);
690
+ return yield this.client.call('patch', uri, {
691
+ 'content-type': 'application/json',
692
+ }, payload);
693
+ });
694
+ }
695
+ /**
696
+ * Create 2FA Challenge
697
+ *
698
+ *
699
+ * @param {Factor} factor
700
+ * @throws {AppwriteException}
701
+ * @returns {Promise}
702
+ */
703
+ create2FAChallenge(factor) {
704
+ return __awaiter(this, void 0, void 0, function* () {
705
+ if (typeof factor === 'undefined') {
706
+ throw new AppwriteException('Missing required parameter: "factor"');
707
+ }
708
+ const apiPath = '/account/mfa/challenge';
709
+ const payload = {};
710
+ if (typeof factor !== 'undefined') {
711
+ payload['factor'] = factor;
712
+ }
713
+ const uri = new URL(this.client.config.endpoint + apiPath);
714
+ return yield this.client.call('post', uri, {
715
+ 'content-type': 'application/json',
716
+ }, payload);
717
+ });
718
+ }
719
+ /**
720
+ * Create MFA Challenge (confirmation)
721
+ *
722
+ *
723
+ * @param {string} challengeId
724
+ * @param {string} otp
725
+ * @throws {AppwriteException}
726
+ * @returns {Promise}
727
+ */
728
+ updateChallenge(challengeId, otp) {
729
+ return __awaiter(this, void 0, void 0, function* () {
730
+ if (typeof challengeId === 'undefined') {
731
+ throw new AppwriteException('Missing required parameter: "challengeId"');
732
+ }
733
+ if (typeof otp === 'undefined') {
734
+ throw new AppwriteException('Missing required parameter: "otp"');
735
+ }
736
+ const apiPath = '/account/mfa/challenge';
737
+ const payload = {};
738
+ if (typeof challengeId !== 'undefined') {
739
+ payload['challengeId'] = challengeId;
740
+ }
741
+ if (typeof otp !== 'undefined') {
742
+ payload['otp'] = otp;
743
+ }
744
+ const uri = new URL(this.client.config.endpoint + apiPath);
745
+ return yield this.client.call('put', uri, {
746
+ 'content-type': 'application/json',
747
+ }, payload);
748
+ });
749
+ }
750
+ /**
751
+ * List Factors
752
+ *
753
+ *
754
+ * @throws {AppwriteException}
755
+ * @returns {Promise}
756
+ */
757
+ listFactors() {
758
+ return __awaiter(this, void 0, void 0, function* () {
759
+ const apiPath = '/account/mfa/factors';
760
+ const payload = {};
761
+ const uri = new URL(this.client.config.endpoint + apiPath);
762
+ return yield this.client.call('get', uri, {
763
+ 'content-type': 'application/json',
764
+ }, payload);
765
+ });
766
+ }
767
+ /**
768
+ * Add Authenticator
769
+ *
770
+ *
771
+ * @param {Type} type
772
+ * @throws {AppwriteException}
773
+ * @returns {Promise}
774
+ */
775
+ addAuthenticator(type) {
776
+ return __awaiter(this, void 0, void 0, function* () {
777
+ if (typeof type === 'undefined') {
778
+ throw new AppwriteException('Missing required parameter: "type"');
779
+ }
780
+ const apiPath = '/account/mfa/{type}'.replace('{type}', type);
781
+ const payload = {};
782
+ const uri = new URL(this.client.config.endpoint + apiPath);
783
+ return yield this.client.call('post', uri, {
784
+ 'content-type': 'application/json',
785
+ }, payload);
786
+ });
787
+ }
788
+ /**
789
+ * Verify Authenticator
790
+ *
791
+ *
792
+ * @param {Type} type
793
+ * @param {string} otp
794
+ * @throws {AppwriteException}
795
+ * @returns {Promise}
796
+ */
797
+ verifyAuthenticator(type, otp) {
798
+ return __awaiter(this, void 0, void 0, function* () {
799
+ if (typeof type === 'undefined') {
800
+ throw new AppwriteException('Missing required parameter: "type"');
801
+ }
802
+ if (typeof otp === 'undefined') {
803
+ throw new AppwriteException('Missing required parameter: "otp"');
804
+ }
805
+ const apiPath = '/account/mfa/{type}'.replace('{type}', type);
806
+ const payload = {};
807
+ if (typeof otp !== 'undefined') {
808
+ payload['otp'] = otp;
809
+ }
810
+ const uri = new URL(this.client.config.endpoint + apiPath);
811
+ return yield this.client.call('put', uri, {
812
+ 'content-type': 'application/json',
813
+ }, payload);
814
+ });
815
+ }
816
+ /**
817
+ * Delete Authenticator
818
+ *
819
+ *
820
+ * @param {Type} type
821
+ * @param {string} otp
822
+ * @throws {AppwriteException}
823
+ * @returns {Promise}
824
+ */
825
+ deleteAuthenticator(type, otp) {
826
+ return __awaiter(this, void 0, void 0, function* () {
827
+ if (typeof type === 'undefined') {
828
+ throw new AppwriteException('Missing required parameter: "type"');
829
+ }
830
+ if (typeof otp === 'undefined') {
831
+ throw new AppwriteException('Missing required parameter: "otp"');
832
+ }
833
+ const apiPath = '/account/mfa/{type}'.replace('{type}', type);
834
+ const payload = {};
835
+ if (typeof otp !== 'undefined') {
836
+ payload['otp'] = otp;
837
+ }
838
+ const uri = new URL(this.client.config.endpoint + apiPath);
839
+ return yield this.client.call('delete', uri, {
840
+ 'content-type': 'application/json',
841
+ }, payload);
842
+ });
843
+ }
655
844
  /**
656
845
  * Update name
657
846
  *
@@ -845,11 +1034,10 @@ class Account extends Service {
845
1034
  * @param {string} userId
846
1035
  * @param {string} secret
847
1036
  * @param {string} password
848
- * @param {string} passwordAgain
849
1037
  * @throws {AppwriteException}
850
1038
  * @returns {Promise}
851
1039
  */
852
- updateRecovery(userId, secret, password, passwordAgain) {
1040
+ updateRecovery(userId, secret, password) {
853
1041
  return __awaiter(this, void 0, void 0, function* () {
854
1042
  if (typeof userId === 'undefined') {
855
1043
  throw new AppwriteException('Missing required parameter: "userId"');
@@ -860,9 +1048,6 @@ class Account extends Service {
860
1048
  if (typeof password === 'undefined') {
861
1049
  throw new AppwriteException('Missing required parameter: "password"');
862
1050
  }
863
- if (typeof passwordAgain === 'undefined') {
864
- throw new AppwriteException('Missing required parameter: "passwordAgain"');
865
- }
866
1051
  const apiPath = '/account/recovery';
867
1052
  const payload = {};
868
1053
  if (typeof userId !== 'undefined') {
@@ -874,9 +1059,6 @@ class Account extends Service {
874
1059
  if (typeof password !== 'undefined') {
875
1060
  payload['password'] = password;
876
1061
  }
877
- if (typeof passwordAgain !== 'undefined') {
878
- payload['passwordAgain'] = passwordAgain;
879
- }
880
1062
  const uri = new URL(this.client.config.endpoint + apiPath);
881
1063
  return yield this.client.call('put', uri, {
882
1064
  'content-type': 'application/json',
@@ -946,7 +1128,7 @@ class Account extends Service {
946
1128
  });
947
1129
  }
948
1130
  /**
949
- * Create email session
1131
+ * Create email password session
950
1132
  *
951
1133
  * Allow the user to login into their account by providing a valid email and
952
1134
  * password combination. This route will create a new session for the user.
@@ -960,7 +1142,7 @@ class Account extends Service {
960
1142
  * @throws {AppwriteException}
961
1143
  * @returns {Promise}
962
1144
  */
963
- createEmailSession(email, password) {
1145
+ createEmailPasswordSession(email, password) {
964
1146
  return __awaiter(this, void 0, void 0, function* () {
965
1147
  if (typeof email === 'undefined') {
966
1148
  throw new AppwriteException('Missing required parameter: "email"');
@@ -983,70 +1165,11 @@ class Account extends Service {
983
1165
  });
984
1166
  }
985
1167
  /**
986
- * Create magic URL session
987
- *
988
- * Sends the user an email with a secret key for creating a session. If the
989
- * provided user ID has not been registered, a new user will be created. When
990
- * the user clicks the link in the email, the user is redirected back to the
991
- * URL you provided with the secret key and userId values attached to the URL
992
- * query string. Use the query string parameters to submit a request to the
993
- * [PUT
994
- * /account/sessions/magic-url](https://appwrite.io/docs/references/cloud/client-web/account#updateMagicURLSession)
995
- * endpoint to complete the login process. The link sent to the user's email
996
- * address is valid for 1 hour. If you are on a mobile device you can leave
997
- * the URL parameter empty, so that the login completion will be handled by
998
- * your Appwrite instance by default.
999
- *
1000
- * A user is limited to 10 active sessions at a time by default. [Learn more
1001
- * about session
1002
- * limits](https://appwrite.io/docs/authentication-security#limits).
1003
- *
1004
- *
1005
- * @param {string} userId
1006
- * @param {string} email
1007
- * @param {string} url
1008
- * @throws {AppwriteException}
1009
- * @returns {Promise}
1010
- */
1011
- createMagicURLSession(userId, email, url) {
1012
- return __awaiter(this, void 0, void 0, function* () {
1013
- if (typeof userId === 'undefined') {
1014
- throw new AppwriteException('Missing required parameter: "userId"');
1015
- }
1016
- if (typeof email === 'undefined') {
1017
- throw new AppwriteException('Missing required parameter: "email"');
1018
- }
1019
- const apiPath = '/account/sessions/magic-url';
1020
- const payload = {};
1021
- if (typeof userId !== 'undefined') {
1022
- payload['userId'] = userId;
1023
- }
1024
- if (typeof email !== 'undefined') {
1025
- payload['email'] = email;
1026
- }
1027
- if (typeof url !== 'undefined') {
1028
- payload['url'] = url;
1029
- }
1030
- const uri = new URL(this.client.config.endpoint + apiPath);
1031
- return yield this.client.call('post', uri, {
1032
- 'content-type': 'application/json',
1033
- }, payload);
1034
- });
1035
- }
1036
- /**
1037
- * Create magic URL session (confirmation)
1038
- *
1039
- * Use this endpoint to complete creating the session with the Magic URL. Both
1040
- * the **userId** and **secret** arguments will be passed as query parameters
1041
- * to the redirect URL you have provided when sending your request to the
1042
- * [POST
1043
- * /account/sessions/magic-url](https://appwrite.io/docs/references/cloud/client-web/account#createMagicURLSession)
1044
- * endpoint.
1168
+ * Create session (deprecated)
1045
1169
  *
1046
- * Please note that in order to avoid a [Redirect
1047
- * Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md)
1048
- * the only valid redirect URLs are the ones from domains you have set when
1049
- * adding your platforms in the console interface.
1170
+ * Use this endpoint to create a session from token. Provide the **userId**
1171
+ * and **secret** parameters from the successful response of authentication
1172
+ * flows initiated by token creation. For example, magic URL and phone login.
1050
1173
  *
1051
1174
  * @param {string} userId
1052
1175
  * @param {string} secret
@@ -1095,14 +1218,15 @@ class Account extends Service {
1095
1218
  * limits](https://appwrite.io/docs/authentication-security#limits).
1096
1219
  *
1097
1220
  *
1098
- * @param {string} provider
1221
+ * @param {OAuthProvider} provider
1099
1222
  * @param {string} success
1100
1223
  * @param {string} failure
1224
+ * @param {boolean} token
1101
1225
  * @param {string[]} scopes
1102
1226
  * @throws {AppwriteException}
1103
1227
  * @returns {void|string}
1104
1228
  */
1105
- createOAuth2Session(provider, success, failure, scopes) {
1229
+ createOAuth2Session(provider, success, failure, token, scopes) {
1106
1230
  if (typeof provider === 'undefined') {
1107
1231
  throw new AppwriteException('Missing required parameter: "provider"');
1108
1232
  }
@@ -1114,6 +1238,9 @@ class Account extends Service {
1114
1238
  if (typeof failure !== 'undefined') {
1115
1239
  payload['failure'] = failure;
1116
1240
  }
1241
+ if (typeof token !== 'undefined') {
1242
+ payload['token'] = token;
1243
+ }
1117
1244
  if (typeof scopes !== 'undefined') {
1118
1245
  payload['scopes'] = scopes;
1119
1246
  }
@@ -1130,61 +1257,18 @@ class Account extends Service {
1130
1257
  }
1131
1258
  }
1132
1259
  /**
1133
- * Create phone session
1134
- *
1135
- * Sends the user an SMS with a secret key for creating a session. If the
1136
- * provided user ID has not be registered, a new user will be created. Use the
1137
- * returned user ID and secret and submit a request to the [PUT
1138
- * /account/sessions/phone](https://appwrite.io/docs/references/cloud/client-web/account#updatePhoneSession)
1139
- * endpoint to complete the login process. The secret sent to the user's phone
1140
- * is valid for 15 minutes.
1141
- *
1142
- * A user is limited to 10 active sessions at a time by default. [Learn more
1143
- * about session
1144
- * limits](https://appwrite.io/docs/authentication-security#limits).
1145
- *
1146
- * @param {string} userId
1147
- * @param {string} phone
1148
- * @throws {AppwriteException}
1149
- * @returns {Promise}
1150
- */
1151
- createPhoneSession(userId, phone) {
1152
- return __awaiter(this, void 0, void 0, function* () {
1153
- if (typeof userId === 'undefined') {
1154
- throw new AppwriteException('Missing required parameter: "userId"');
1155
- }
1156
- if (typeof phone === 'undefined') {
1157
- throw new AppwriteException('Missing required parameter: "phone"');
1158
- }
1159
- const apiPath = '/account/sessions/phone';
1160
- const payload = {};
1161
- if (typeof userId !== 'undefined') {
1162
- payload['userId'] = userId;
1163
- }
1164
- if (typeof phone !== 'undefined') {
1165
- payload['phone'] = phone;
1166
- }
1167
- const uri = new URL(this.client.config.endpoint + apiPath);
1168
- return yield this.client.call('post', uri, {
1169
- 'content-type': 'application/json',
1170
- }, payload);
1171
- });
1172
- }
1173
- /**
1174
- * Create phone session (confirmation)
1260
+ * Create session
1175
1261
  *
1176
- * Use this endpoint to complete creating a session with SMS. Use the
1177
- * **userId** from the
1178
- * [createPhoneSession](https://appwrite.io/docs/references/cloud/client-web/account#createPhoneSession)
1179
- * endpoint and the **secret** received via SMS to successfully update and
1180
- * confirm the phone session.
1262
+ * Use this endpoint to create a session from token. Provide the **userId**
1263
+ * and **secret** parameters from the successful response of authentication
1264
+ * flows initiated by token creation. For example, magic URL and phone login.
1181
1265
  *
1182
1266
  * @param {string} userId
1183
1267
  * @param {string} secret
1184
1268
  * @throws {AppwriteException}
1185
1269
  * @returns {Promise}
1186
1270
  */
1187
- updatePhoneSession(userId, secret) {
1271
+ createSession(userId, secret) {
1188
1272
  return __awaiter(this, void 0, void 0, function* () {
1189
1273
  if (typeof userId === 'undefined') {
1190
1274
  throw new AppwriteException('Missing required parameter: "userId"');
@@ -1192,7 +1276,7 @@ class Account extends Service {
1192
1276
  if (typeof secret === 'undefined') {
1193
1277
  throw new AppwriteException('Missing required parameter: "secret"');
1194
1278
  }
1195
- const apiPath = '/account/sessions/phone';
1279
+ const apiPath = '/account/sessions/token';
1196
1280
  const payload = {};
1197
1281
  if (typeof userId !== 'undefined') {
1198
1282
  payload['userId'] = userId;
@@ -1201,7 +1285,7 @@ class Account extends Service {
1201
1285
  payload['secret'] = secret;
1202
1286
  }
1203
1287
  const uri = new URL(this.client.config.endpoint + apiPath);
1204
- return yield this.client.call('put', uri, {
1288
+ return yield this.client.call('post', uri, {
1205
1289
  'content-type': 'application/json',
1206
1290
  }, payload);
1207
1291
  });
@@ -1230,11 +1314,10 @@ class Account extends Service {
1230
1314
  });
1231
1315
  }
1232
1316
  /**
1233
- * Update OAuth session (refresh tokens)
1317
+ * Update (or renew) a session
1234
1318
  *
1235
- * Access tokens have limited lifespan and expire to mitigate security risks.
1236
- * If session was created using an OAuth provider, this route can be used to
1237
- * "refresh" the access token.
1319
+ * Extend session's expiry to increase it's lifespan. Extending a session is
1320
+ * useful when session length is short such as 5 minutes.
1238
1321
  *
1239
1322
  * @param {string} sessionId
1240
1323
  * @throws {AppwriteException}
@@ -1300,37 +1383,33 @@ class Account extends Service {
1300
1383
  });
1301
1384
  }
1302
1385
  /**
1303
- * Create email verification
1304
- *
1305
- * Use this endpoint to send a verification message to your user email address
1306
- * to confirm they are the valid owners of that address. Both the **userId**
1307
- * and **secret** arguments will be passed as query parameters to the URL you
1308
- * have provided to be attached to the verification email. The provided URL
1309
- * should redirect the user back to your app and allow you to complete the
1310
- * verification process by verifying both the **userId** and **secret**
1311
- * parameters. Learn more about how to [complete the verification
1312
- * process](https://appwrite.io/docs/references/cloud/client-web/account#updateVerification).
1313
- * The verification link sent to the user's email address is valid for 7 days.
1386
+ * Create a push target
1314
1387
  *
1315
- * Please note that in order to avoid a [Redirect
1316
- * Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md),
1317
- * the only valid redirect URLs are the ones from domains you have set when
1318
- * adding your platforms in the console interface.
1319
1388
  *
1320
- *
1321
- * @param {string} url
1389
+ * @param {string} targetId
1390
+ * @param {string} identifier
1391
+ * @param {string} providerId
1322
1392
  * @throws {AppwriteException}
1323
1393
  * @returns {Promise}
1324
1394
  */
1325
- createVerification(url) {
1395
+ createPushTarget(targetId, identifier, providerId) {
1326
1396
  return __awaiter(this, void 0, void 0, function* () {
1327
- if (typeof url === 'undefined') {
1328
- throw new AppwriteException('Missing required parameter: "url"');
1397
+ if (typeof targetId === 'undefined') {
1398
+ throw new AppwriteException('Missing required parameter: "targetId"');
1329
1399
  }
1330
- const apiPath = '/account/verification';
1400
+ if (typeof identifier === 'undefined') {
1401
+ throw new AppwriteException('Missing required parameter: "identifier"');
1402
+ }
1403
+ const apiPath = '/account/targets/push';
1331
1404
  const payload = {};
1332
- if (typeof url !== 'undefined') {
1333
- payload['url'] = url;
1405
+ if (typeof targetId !== 'undefined') {
1406
+ payload['targetId'] = targetId;
1407
+ }
1408
+ if (typeof identifier !== 'undefined') {
1409
+ payload['identifier'] = identifier;
1410
+ }
1411
+ if (typeof providerId !== 'undefined') {
1412
+ payload['providerId'] = providerId;
1334
1413
  }
1335
1414
  const uri = new URL(this.client.config.endpoint + apiPath);
1336
1415
  return yield this.client.call('post', uri, {
@@ -1339,7 +1418,236 @@ class Account extends Service {
1339
1418
  });
1340
1419
  }
1341
1420
  /**
1342
- * Create email verification (confirmation)
1421
+ * Update a push target
1422
+ *
1423
+ *
1424
+ * @param {string} targetId
1425
+ * @param {string} identifier
1426
+ * @throws {AppwriteException}
1427
+ * @returns {Promise}
1428
+ */
1429
+ updatePushTarget(targetId, identifier) {
1430
+ return __awaiter(this, void 0, void 0, function* () {
1431
+ if (typeof targetId === 'undefined') {
1432
+ throw new AppwriteException('Missing required parameter: "targetId"');
1433
+ }
1434
+ if (typeof identifier === 'undefined') {
1435
+ throw new AppwriteException('Missing required parameter: "identifier"');
1436
+ }
1437
+ const apiPath = '/account/targets/{targetId}/push'.replace('{targetId}', targetId);
1438
+ const payload = {};
1439
+ if (typeof identifier !== 'undefined') {
1440
+ payload['identifier'] = identifier;
1441
+ }
1442
+ const uri = new URL(this.client.config.endpoint + apiPath);
1443
+ return yield this.client.call('put', uri, {
1444
+ 'content-type': 'application/json',
1445
+ }, payload);
1446
+ });
1447
+ }
1448
+ /**
1449
+ * Delete a push target
1450
+ *
1451
+ *
1452
+ * @param {string} targetId
1453
+ * @throws {AppwriteException}
1454
+ * @returns {Promise}
1455
+ */
1456
+ deletePushTarget(targetId) {
1457
+ return __awaiter(this, void 0, void 0, function* () {
1458
+ if (typeof targetId === 'undefined') {
1459
+ throw new AppwriteException('Missing required parameter: "targetId"');
1460
+ }
1461
+ const apiPath = '/account/targets/{targetId}/push'.replace('{targetId}', targetId);
1462
+ const payload = {};
1463
+ const uri = new URL(this.client.config.endpoint + apiPath);
1464
+ return yield this.client.call('delete', uri, {
1465
+ 'content-type': 'application/json',
1466
+ }, payload);
1467
+ });
1468
+ }
1469
+ /**
1470
+ * Create email token (OTP)
1471
+ *
1472
+ * Sends the user an email with a secret key for creating a session. If the
1473
+ * provided user ID has not be registered, a new user will be created. Use the
1474
+ * returned user ID and secret and submit a request to the [POST
1475
+ * /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession)
1476
+ * endpoint to complete the login process. The secret sent to the user's email
1477
+ * is valid for 15 minutes.
1478
+ *
1479
+ * A user is limited to 10 active sessions at a time by default. [Learn more
1480
+ * about session
1481
+ * limits](https://appwrite.io/docs/authentication-security#limits).
1482
+ *
1483
+ * @param {string} userId
1484
+ * @param {string} email
1485
+ * @param {boolean} phrase
1486
+ * @throws {AppwriteException}
1487
+ * @returns {Promise}
1488
+ */
1489
+ createEmailToken(userId, email, phrase) {
1490
+ return __awaiter(this, void 0, void 0, function* () {
1491
+ if (typeof userId === 'undefined') {
1492
+ throw new AppwriteException('Missing required parameter: "userId"');
1493
+ }
1494
+ if (typeof email === 'undefined') {
1495
+ throw new AppwriteException('Missing required parameter: "email"');
1496
+ }
1497
+ const apiPath = '/account/tokens/email';
1498
+ const payload = {};
1499
+ if (typeof userId !== 'undefined') {
1500
+ payload['userId'] = userId;
1501
+ }
1502
+ if (typeof email !== 'undefined') {
1503
+ payload['email'] = email;
1504
+ }
1505
+ if (typeof phrase !== 'undefined') {
1506
+ payload['phrase'] = phrase;
1507
+ }
1508
+ const uri = new URL(this.client.config.endpoint + apiPath);
1509
+ return yield this.client.call('post', uri, {
1510
+ 'content-type': 'application/json',
1511
+ }, payload);
1512
+ });
1513
+ }
1514
+ /**
1515
+ * Create magic URL token
1516
+ *
1517
+ * Sends the user an email with a secret key for creating a session. If the
1518
+ * provided user ID has not been registered, a new user will be created. When
1519
+ * the user clicks the link in the email, the user is redirected back to the
1520
+ * URL you provided with the secret key and userId values attached to the URL
1521
+ * query string. Use the query string parameters to submit a request to the
1522
+ * [POST
1523
+ * /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession)
1524
+ * endpoint to complete the login process. The link sent to the user's email
1525
+ * address is valid for 1 hour. If you are on a mobile device you can leave
1526
+ * the URL parameter empty, so that the login completion will be handled by
1527
+ * your Appwrite instance by default.
1528
+ *
1529
+ * A user is limited to 10 active sessions at a time by default. [Learn more
1530
+ * about session
1531
+ * limits](https://appwrite.io/docs/authentication-security#limits).
1532
+ *
1533
+ *
1534
+ * @param {string} userId
1535
+ * @param {string} email
1536
+ * @param {string} url
1537
+ * @param {boolean} phrase
1538
+ * @throws {AppwriteException}
1539
+ * @returns {Promise}
1540
+ */
1541
+ createMagicURLToken(userId, email, url, phrase) {
1542
+ return __awaiter(this, void 0, void 0, function* () {
1543
+ if (typeof userId === 'undefined') {
1544
+ throw new AppwriteException('Missing required parameter: "userId"');
1545
+ }
1546
+ if (typeof email === 'undefined') {
1547
+ throw new AppwriteException('Missing required parameter: "email"');
1548
+ }
1549
+ const apiPath = '/account/tokens/magic-url';
1550
+ const payload = {};
1551
+ if (typeof userId !== 'undefined') {
1552
+ payload['userId'] = userId;
1553
+ }
1554
+ if (typeof email !== 'undefined') {
1555
+ payload['email'] = email;
1556
+ }
1557
+ if (typeof url !== 'undefined') {
1558
+ payload['url'] = url;
1559
+ }
1560
+ if (typeof phrase !== 'undefined') {
1561
+ payload['phrase'] = phrase;
1562
+ }
1563
+ const uri = new URL(this.client.config.endpoint + apiPath);
1564
+ return yield this.client.call('post', uri, {
1565
+ 'content-type': 'application/json',
1566
+ }, payload);
1567
+ });
1568
+ }
1569
+ /**
1570
+ * Create phone token
1571
+ *
1572
+ * Sends the user an SMS with a secret key for creating a session. If the
1573
+ * provided user ID has not be registered, a new user will be created. Use the
1574
+ * returned user ID and secret and submit a request to the [POST
1575
+ * /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession)
1576
+ * endpoint to complete the login process. The secret sent to the user's phone
1577
+ * is valid for 15 minutes.
1578
+ *
1579
+ * A user is limited to 10 active sessions at a time by default. [Learn more
1580
+ * about session
1581
+ * limits](https://appwrite.io/docs/authentication-security#limits).
1582
+ *
1583
+ * @param {string} userId
1584
+ * @param {string} phone
1585
+ * @throws {AppwriteException}
1586
+ * @returns {Promise}
1587
+ */
1588
+ createPhoneToken(userId, phone) {
1589
+ return __awaiter(this, void 0, void 0, function* () {
1590
+ if (typeof userId === 'undefined') {
1591
+ throw new AppwriteException('Missing required parameter: "userId"');
1592
+ }
1593
+ if (typeof phone === 'undefined') {
1594
+ throw new AppwriteException('Missing required parameter: "phone"');
1595
+ }
1596
+ const apiPath = '/account/tokens/phone';
1597
+ const payload = {};
1598
+ if (typeof userId !== 'undefined') {
1599
+ payload['userId'] = userId;
1600
+ }
1601
+ if (typeof phone !== 'undefined') {
1602
+ payload['phone'] = phone;
1603
+ }
1604
+ const uri = new URL(this.client.config.endpoint + apiPath);
1605
+ return yield this.client.call('post', uri, {
1606
+ 'content-type': 'application/json',
1607
+ }, payload);
1608
+ });
1609
+ }
1610
+ /**
1611
+ * Create email verification
1612
+ *
1613
+ * Use this endpoint to send a verification message to your user email address
1614
+ * to confirm they are the valid owners of that address. Both the **userId**
1615
+ * and **secret** arguments will be passed as query parameters to the URL you
1616
+ * have provided to be attached to the verification email. The provided URL
1617
+ * should redirect the user back to your app and allow you to complete the
1618
+ * verification process by verifying both the **userId** and **secret**
1619
+ * parameters. Learn more about how to [complete the verification
1620
+ * process](https://appwrite.io/docs/references/cloud/client-web/account#updateVerification).
1621
+ * The verification link sent to the user's email address is valid for 7 days.
1622
+ *
1623
+ * Please note that in order to avoid a [Redirect
1624
+ * Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md),
1625
+ * the only valid redirect URLs are the ones from domains you have set when
1626
+ * adding your platforms in the console interface.
1627
+ *
1628
+ *
1629
+ * @param {string} url
1630
+ * @throws {AppwriteException}
1631
+ * @returns {Promise}
1632
+ */
1633
+ createVerification(url) {
1634
+ return __awaiter(this, void 0, void 0, function* () {
1635
+ if (typeof url === 'undefined') {
1636
+ throw new AppwriteException('Missing required parameter: "url"');
1637
+ }
1638
+ const apiPath = '/account/verification';
1639
+ const payload = {};
1640
+ if (typeof url !== 'undefined') {
1641
+ payload['url'] = url;
1642
+ }
1643
+ const uri = new URL(this.client.config.endpoint + apiPath);
1644
+ return yield this.client.call('post', uri, {
1645
+ 'content-type': 'application/json',
1646
+ }, payload);
1647
+ });
1648
+ }
1649
+ /**
1650
+ * Create email verification (confirmation)
1343
1651
  *
1344
1652
  * Use this endpoint to complete the user email verification process. Use both
1345
1653
  * the **userId** and **secret** parameters that were attached to your app URL
@@ -1453,7 +1761,7 @@ class Avatars extends Service {
1453
1761
  * image at source quality. If dimensions are not specified, the default size
1454
1762
  * of image returned is 100x100px.
1455
1763
  *
1456
- * @param {string} code
1764
+ * @param {Browser} code
1457
1765
  * @param {number} width
1458
1766
  * @param {number} height
1459
1767
  * @param {number} quality
@@ -1495,7 +1803,7 @@ class Avatars extends Service {
1495
1803
  * of image returned is 100x100px.
1496
1804
  *
1497
1805
  *
1498
- * @param {string} code
1806
+ * @param {CreditCard} code
1499
1807
  * @param {number} width
1500
1808
  * @param {number} height
1501
1809
  * @param {number} quality
@@ -1565,7 +1873,7 @@ class Avatars extends Service {
1565
1873
  * of image returned is 100x100px.
1566
1874
  *
1567
1875
  *
1568
- * @param {string} code
1876
+ * @param {Flag} code
1569
1877
  * @param {number} width
1570
1878
  * @param {number} height
1571
1879
  * @param {number} quality
@@ -1852,7 +2160,7 @@ class Databases extends Service {
1852
2160
  * Get usage stats for the database
1853
2161
  *
1854
2162
  *
1855
- * @param {string} range
2163
+ * @param {DatabaseUsageRange} range
1856
2164
  * @throws {AppwriteException}
1857
2165
  * @returns {Promise}
1858
2166
  */
@@ -2883,11 +3191,11 @@ class Databases extends Service {
2883
3191
  * @param {string} databaseId
2884
3192
  * @param {string} collectionId
2885
3193
  * @param {string} relatedCollectionId
2886
- * @param {string} type
3194
+ * @param {RelationshipType} type
2887
3195
  * @param {boolean} twoWay
2888
3196
  * @param {string} key
2889
3197
  * @param {string} twoWayKey
2890
- * @param {string} onDelete
3198
+ * @param {RelationMutate} onDelete
2891
3199
  * @throws {AppwriteException}
2892
3200
  * @returns {Promise}
2893
3201
  */
@@ -3200,7 +3508,7 @@ class Databases extends Service {
3200
3508
  * @param {string} databaseId
3201
3509
  * @param {string} collectionId
3202
3510
  * @param {string} key
3203
- * @param {string} onDelete
3511
+ * @param {RelationMutate} onDelete
3204
3512
  * @throws {AppwriteException}
3205
3513
  * @returns {Promise}
3206
3514
  */
@@ -3478,7 +3786,7 @@ class Databases extends Service {
3478
3786
  * @param {string} databaseId
3479
3787
  * @param {string} collectionId
3480
3788
  * @param {string} key
3481
- * @param {string} type
3789
+ * @param {IndexType} type
3482
3790
  * @param {string[]} attributes
3483
3791
  * @param {string[]} orders
3484
3792
  * @throws {AppwriteException}
@@ -3615,7 +3923,7 @@ class Databases extends Service {
3615
3923
  *
3616
3924
  * @param {string} databaseId
3617
3925
  * @param {string} collectionId
3618
- * @param {string} range
3926
+ * @param {DatabaseUsageRange} range
3619
3927
  * @throws {AppwriteException}
3620
3928
  * @returns {Promise}
3621
3929
  */
@@ -3669,7 +3977,7 @@ class Databases extends Service {
3669
3977
  *
3670
3978
  *
3671
3979
  * @param {string} databaseId
3672
- * @param {string} range
3980
+ * @param {DatabaseUsageRange} range
3673
3981
  * @throws {AppwriteException}
3674
3982
  * @returns {Promise}
3675
3983
  */
@@ -3732,7 +4040,7 @@ class Functions extends Service {
3732
4040
  *
3733
4041
  * @param {string} functionId
3734
4042
  * @param {string} name
3735
- * @param {string} runtime
4043
+ * @param {Runtime} runtime
3736
4044
  * @param {string[]} execute
3737
4045
  * @param {string[]} events
3738
4046
  * @param {string} schedule
@@ -3854,7 +4162,7 @@ class Functions extends Service {
3854
4162
  * Get functions usage
3855
4163
  *
3856
4164
  *
3857
- * @param {string} range
4165
+ * @param {FunctionUsageRange} range
3858
4166
  * @throws {AppwriteException}
3859
4167
  * @returns {Promise}
3860
4168
  */
@@ -3900,7 +4208,7 @@ class Functions extends Service {
3900
4208
  *
3901
4209
  * @param {string} functionId
3902
4210
  * @param {string} name
3903
- * @param {string} runtime
4211
+ * @param {Runtime} runtime
3904
4212
  * @param {string[]} execute
3905
4213
  * @param {string[]} events
3906
4214
  * @param {string} schedule
@@ -4297,7 +4605,7 @@ class Functions extends Service {
4297
4605
  * @param {string} body
4298
4606
  * @param {boolean} async
4299
4607
  * @param {string} xpath
4300
- * @param {string} method
4608
+ * @param {ExecutionMethod} method
4301
4609
  * @param {object} headers
4302
4610
  * @throws {AppwriteException}
4303
4611
  * @returns {Promise}
@@ -4361,7 +4669,7 @@ class Functions extends Service {
4361
4669
  *
4362
4670
  *
4363
4671
  * @param {string} functionId
4364
- * @param {string} range
4672
+ * @param {FunctionUsageRange} range
4365
4673
  * @throws {AppwriteException}
4366
4674
  * @returns {Promise}
4367
4675
  */
@@ -4648,6 +4956,28 @@ class Health extends Service {
4648
4956
  }, payload);
4649
4957
  });
4650
4958
  }
4959
+ /**
4960
+ * Get the SSL certificate for a domain
4961
+ *
4962
+ * Get the SSL certificate for a domain
4963
+ *
4964
+ * @param {string} domain
4965
+ * @throws {AppwriteException}
4966
+ * @returns {Promise}
4967
+ */
4968
+ getCertificate(domain) {
4969
+ return __awaiter(this, void 0, void 0, function* () {
4970
+ const apiPath = '/health/certificate';
4971
+ const payload = {};
4972
+ if (typeof domain !== 'undefined') {
4973
+ payload['domain'] = domain;
4974
+ }
4975
+ const uri = new URL(this.client.config.endpoint + apiPath);
4976
+ return yield this.client.call('get', uri, {
4977
+ 'content-type': 'application/json',
4978
+ }, payload);
4979
+ });
4980
+ }
4651
4981
  /**
4652
4982
  * Get DB
4653
4983
  *
@@ -4800,6 +5130,33 @@ class Health extends Service {
4800
5130
  }, payload);
4801
5131
  });
4802
5132
  }
5133
+ /**
5134
+ * Get number of failed queue jobs
5135
+ *
5136
+ * Returns the amount of failed jobs in a given queue.
5137
+ *
5138
+ *
5139
+ * @param {Name} name
5140
+ * @param {number} threshold
5141
+ * @throws {AppwriteException}
5142
+ * @returns {Promise}
5143
+ */
5144
+ getFailedJobs(name, threshold) {
5145
+ return __awaiter(this, void 0, void 0, function* () {
5146
+ if (typeof name === 'undefined') {
5147
+ throw new AppwriteException('Missing required parameter: "name"');
5148
+ }
5149
+ const apiPath = '/health/queue/failed/{name}'.replace('{name}', name);
5150
+ const payload = {};
5151
+ if (typeof threshold !== 'undefined') {
5152
+ payload['threshold'] = threshold;
5153
+ }
5154
+ const uri = new URL(this.client.config.endpoint + apiPath);
5155
+ return yield this.client.call('get', uri, {
5156
+ 'content-type': 'application/json',
5157
+ }, payload);
5158
+ });
5159
+ }
4803
5160
  /**
4804
5161
  * Get functions queue
4805
5162
  *
@@ -4822,45 +5179,1867 @@ class Health extends Service {
4822
5179
  });
4823
5180
  }
4824
5181
  /**
4825
- * Get logs queue
5182
+ * Get logs queue
5183
+ *
5184
+ * Get the number of logs that are waiting to be processed in the Appwrite
5185
+ * internal queue server.
5186
+ *
5187
+ * @param {number} threshold
5188
+ * @throws {AppwriteException}
5189
+ * @returns {Promise}
5190
+ */
5191
+ getQueueLogs(threshold) {
5192
+ return __awaiter(this, void 0, void 0, function* () {
5193
+ const apiPath = '/health/queue/logs';
5194
+ const payload = {};
5195
+ if (typeof threshold !== 'undefined') {
5196
+ payload['threshold'] = threshold;
5197
+ }
5198
+ const uri = new URL(this.client.config.endpoint + apiPath);
5199
+ return yield this.client.call('get', uri, {
5200
+ 'content-type': 'application/json',
5201
+ }, payload);
5202
+ });
5203
+ }
5204
+ /**
5205
+ * Get mails queue
5206
+ *
5207
+ * Get the number of mails that are waiting to be processed in the Appwrite
5208
+ * internal queue server.
5209
+ *
5210
+ * @param {number} threshold
5211
+ * @throws {AppwriteException}
5212
+ * @returns {Promise}
5213
+ */
5214
+ getQueueMails(threshold) {
5215
+ return __awaiter(this, void 0, void 0, function* () {
5216
+ const apiPath = '/health/queue/mails';
5217
+ const payload = {};
5218
+ if (typeof threshold !== 'undefined') {
5219
+ payload['threshold'] = threshold;
5220
+ }
5221
+ const uri = new URL(this.client.config.endpoint + apiPath);
5222
+ return yield this.client.call('get', uri, {
5223
+ 'content-type': 'application/json',
5224
+ }, payload);
5225
+ });
5226
+ }
5227
+ /**
5228
+ * Get messaging queue
5229
+ *
5230
+ * Get the number of messages that are waiting to be processed in the Appwrite
5231
+ * internal queue server.
5232
+ *
5233
+ * @param {number} threshold
5234
+ * @throws {AppwriteException}
5235
+ * @returns {Promise}
5236
+ */
5237
+ getQueueMessaging(threshold) {
5238
+ return __awaiter(this, void 0, void 0, function* () {
5239
+ const apiPath = '/health/queue/messaging';
5240
+ const payload = {};
5241
+ if (typeof threshold !== 'undefined') {
5242
+ payload['threshold'] = threshold;
5243
+ }
5244
+ const uri = new URL(this.client.config.endpoint + apiPath);
5245
+ return yield this.client.call('get', uri, {
5246
+ 'content-type': 'application/json',
5247
+ }, payload);
5248
+ });
5249
+ }
5250
+ /**
5251
+ * Get migrations queue
5252
+ *
5253
+ * Get the number of migrations that are waiting to be processed in the
5254
+ * Appwrite internal queue server.
5255
+ *
5256
+ * @param {number} threshold
5257
+ * @throws {AppwriteException}
5258
+ * @returns {Promise}
5259
+ */
5260
+ getQueueMigrations(threshold) {
5261
+ return __awaiter(this, void 0, void 0, function* () {
5262
+ const apiPath = '/health/queue/migrations';
5263
+ const payload = {};
5264
+ if (typeof threshold !== 'undefined') {
5265
+ payload['threshold'] = threshold;
5266
+ }
5267
+ const uri = new URL(this.client.config.endpoint + apiPath);
5268
+ return yield this.client.call('get', uri, {
5269
+ 'content-type': 'application/json',
5270
+ }, payload);
5271
+ });
5272
+ }
5273
+ /**
5274
+ * Get webhooks queue
5275
+ *
5276
+ * Get the number of webhooks that are waiting to be processed in the Appwrite
5277
+ * internal queue server.
5278
+ *
5279
+ * @param {number} threshold
5280
+ * @throws {AppwriteException}
5281
+ * @returns {Promise}
5282
+ */
5283
+ getQueueWebhooks(threshold) {
5284
+ return __awaiter(this, void 0, void 0, function* () {
5285
+ const apiPath = '/health/queue/webhooks';
5286
+ const payload = {};
5287
+ if (typeof threshold !== 'undefined') {
5288
+ payload['threshold'] = threshold;
5289
+ }
5290
+ const uri = new URL(this.client.config.endpoint + apiPath);
5291
+ return yield this.client.call('get', uri, {
5292
+ 'content-type': 'application/json',
5293
+ }, payload);
5294
+ });
5295
+ }
5296
+ /**
5297
+ * Get local storage
5298
+ *
5299
+ * Check the Appwrite local storage device is up and connection is successful.
5300
+ *
5301
+ * @throws {AppwriteException}
5302
+ * @returns {Promise}
5303
+ */
5304
+ getStorageLocal() {
5305
+ return __awaiter(this, void 0, void 0, function* () {
5306
+ const apiPath = '/health/storage/local';
5307
+ const payload = {};
5308
+ const uri = new URL(this.client.config.endpoint + apiPath);
5309
+ return yield this.client.call('get', uri, {
5310
+ 'content-type': 'application/json',
5311
+ }, payload);
5312
+ });
5313
+ }
5314
+ /**
5315
+ * Get time
5316
+ *
5317
+ * Check the Appwrite server time is synced with Google remote NTP server. We
5318
+ * use this technology to smoothly handle leap seconds with no disruptive
5319
+ * events. The [Network Time
5320
+ * Protocol](https://en.wikipedia.org/wiki/Network_Time_Protocol) (NTP) is
5321
+ * used by hundreds of millions of computers and devices to synchronize their
5322
+ * clocks over the Internet. If your computer sets its own clock, it likely
5323
+ * uses NTP.
5324
+ *
5325
+ * @throws {AppwriteException}
5326
+ * @returns {Promise}
5327
+ */
5328
+ getTime() {
5329
+ return __awaiter(this, void 0, void 0, function* () {
5330
+ const apiPath = '/health/time';
5331
+ const payload = {};
5332
+ const uri = new URL(this.client.config.endpoint + apiPath);
5333
+ return yield this.client.call('get', uri, {
5334
+ 'content-type': 'application/json',
5335
+ }, payload);
5336
+ });
5337
+ }
5338
+ }
5339
+
5340
+ class Locale extends Service {
5341
+ constructor(client) {
5342
+ super(client);
5343
+ }
5344
+ /**
5345
+ * Get user locale
5346
+ *
5347
+ * Get the current user location based on IP. Returns an object with user
5348
+ * country code, country name, continent name, continent code, ip address and
5349
+ * suggested currency. You can use the locale header to get the data in a
5350
+ * supported language.
5351
+ *
5352
+ * ([IP Geolocation by DB-IP](https://db-ip.com))
5353
+ *
5354
+ * @throws {AppwriteException}
5355
+ * @returns {Promise}
5356
+ */
5357
+ get() {
5358
+ return __awaiter(this, void 0, void 0, function* () {
5359
+ const apiPath = '/locale';
5360
+ const payload = {};
5361
+ const uri = new URL(this.client.config.endpoint + apiPath);
5362
+ return yield this.client.call('get', uri, {
5363
+ 'content-type': 'application/json',
5364
+ }, payload);
5365
+ });
5366
+ }
5367
+ /**
5368
+ * List Locale Codes
5369
+ *
5370
+ * List of all locale codes in [ISO
5371
+ * 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes).
5372
+ *
5373
+ * @throws {AppwriteException}
5374
+ * @returns {Promise}
5375
+ */
5376
+ listCodes() {
5377
+ return __awaiter(this, void 0, void 0, function* () {
5378
+ const apiPath = '/locale/codes';
5379
+ const payload = {};
5380
+ const uri = new URL(this.client.config.endpoint + apiPath);
5381
+ return yield this.client.call('get', uri, {
5382
+ 'content-type': 'application/json',
5383
+ }, payload);
5384
+ });
5385
+ }
5386
+ /**
5387
+ * List continents
5388
+ *
5389
+ * List of all continents. You can use the locale header to get the data in a
5390
+ * supported language.
5391
+ *
5392
+ * @throws {AppwriteException}
5393
+ * @returns {Promise}
5394
+ */
5395
+ listContinents() {
5396
+ return __awaiter(this, void 0, void 0, function* () {
5397
+ const apiPath = '/locale/continents';
5398
+ const payload = {};
5399
+ const uri = new URL(this.client.config.endpoint + apiPath);
5400
+ return yield this.client.call('get', uri, {
5401
+ 'content-type': 'application/json',
5402
+ }, payload);
5403
+ });
5404
+ }
5405
+ /**
5406
+ * List countries
5407
+ *
5408
+ * List of all countries. You can use the locale header to get the data in a
5409
+ * supported language.
5410
+ *
5411
+ * @throws {AppwriteException}
5412
+ * @returns {Promise}
5413
+ */
5414
+ listCountries() {
5415
+ return __awaiter(this, void 0, void 0, function* () {
5416
+ const apiPath = '/locale/countries';
5417
+ const payload = {};
5418
+ const uri = new URL(this.client.config.endpoint + apiPath);
5419
+ return yield this.client.call('get', uri, {
5420
+ 'content-type': 'application/json',
5421
+ }, payload);
5422
+ });
5423
+ }
5424
+ /**
5425
+ * List EU countries
5426
+ *
5427
+ * List of all countries that are currently members of the EU. You can use the
5428
+ * locale header to get the data in a supported language.
5429
+ *
5430
+ * @throws {AppwriteException}
5431
+ * @returns {Promise}
5432
+ */
5433
+ listCountriesEU() {
5434
+ return __awaiter(this, void 0, void 0, function* () {
5435
+ const apiPath = '/locale/countries/eu';
5436
+ const payload = {};
5437
+ const uri = new URL(this.client.config.endpoint + apiPath);
5438
+ return yield this.client.call('get', uri, {
5439
+ 'content-type': 'application/json',
5440
+ }, payload);
5441
+ });
5442
+ }
5443
+ /**
5444
+ * List countries phone codes
5445
+ *
5446
+ * List of all countries phone codes. You can use the locale header to get the
5447
+ * data in a supported language.
5448
+ *
5449
+ * @throws {AppwriteException}
5450
+ * @returns {Promise}
5451
+ */
5452
+ listCountriesPhones() {
5453
+ return __awaiter(this, void 0, void 0, function* () {
5454
+ const apiPath = '/locale/countries/phones';
5455
+ const payload = {};
5456
+ const uri = new URL(this.client.config.endpoint + apiPath);
5457
+ return yield this.client.call('get', uri, {
5458
+ 'content-type': 'application/json',
5459
+ }, payload);
5460
+ });
5461
+ }
5462
+ /**
5463
+ * List currencies
5464
+ *
5465
+ * List of all currencies, including currency symbol, name, plural, and
5466
+ * decimal digits for all major and minor currencies. You can use the locale
5467
+ * header to get the data in a supported language.
5468
+ *
5469
+ * @throws {AppwriteException}
5470
+ * @returns {Promise}
5471
+ */
5472
+ listCurrencies() {
5473
+ return __awaiter(this, void 0, void 0, function* () {
5474
+ const apiPath = '/locale/currencies';
5475
+ const payload = {};
5476
+ const uri = new URL(this.client.config.endpoint + apiPath);
5477
+ return yield this.client.call('get', uri, {
5478
+ 'content-type': 'application/json',
5479
+ }, payload);
5480
+ });
5481
+ }
5482
+ /**
5483
+ * List languages
5484
+ *
5485
+ * List of all languages classified by ISO 639-1 including 2-letter code, name
5486
+ * in English, and name in the respective language.
5487
+ *
5488
+ * @throws {AppwriteException}
5489
+ * @returns {Promise}
5490
+ */
5491
+ listLanguages() {
5492
+ return __awaiter(this, void 0, void 0, function* () {
5493
+ const apiPath = '/locale/languages';
5494
+ const payload = {};
5495
+ const uri = new URL(this.client.config.endpoint + apiPath);
5496
+ return yield this.client.call('get', uri, {
5497
+ 'content-type': 'application/json',
5498
+ }, payload);
5499
+ });
5500
+ }
5501
+ }
5502
+
5503
+ class Messaging extends Service {
5504
+ constructor(client) {
5505
+ super(client);
5506
+ }
5507
+ /**
5508
+ * List messages
5509
+ *
5510
+ *
5511
+ * @param {string[]} queries
5512
+ * @param {string} search
5513
+ * @throws {AppwriteException}
5514
+ * @returns {Promise}
5515
+ */
5516
+ listMessages(queries, search) {
5517
+ return __awaiter(this, void 0, void 0, function* () {
5518
+ const apiPath = '/messaging/messages';
5519
+ const payload = {};
5520
+ if (typeof queries !== 'undefined') {
5521
+ payload['queries'] = queries;
5522
+ }
5523
+ if (typeof search !== 'undefined') {
5524
+ payload['search'] = search;
5525
+ }
5526
+ const uri = new URL(this.client.config.endpoint + apiPath);
5527
+ return yield this.client.call('get', uri, {
5528
+ 'content-type': 'application/json',
5529
+ }, payload);
5530
+ });
5531
+ }
5532
+ /**
5533
+ * Create an email.
5534
+ *
5535
+ *
5536
+ * @param {string} messageId
5537
+ * @param {string} subject
5538
+ * @param {string} content
5539
+ * @param {string[]} topics
5540
+ * @param {string[]} users
5541
+ * @param {string[]} targets
5542
+ * @param {string[]} cc
5543
+ * @param {string[]} bcc
5544
+ * @param {MessageStatus} status
5545
+ * @param {boolean} html
5546
+ * @param {string} scheduledAt
5547
+ * @throws {AppwriteException}
5548
+ * @returns {Promise}
5549
+ */
5550
+ createEmail(messageId, subject, content, topics, users, targets, cc, bcc, status, html, scheduledAt) {
5551
+ return __awaiter(this, void 0, void 0, function* () {
5552
+ if (typeof messageId === 'undefined') {
5553
+ throw new AppwriteException('Missing required parameter: "messageId"');
5554
+ }
5555
+ if (typeof subject === 'undefined') {
5556
+ throw new AppwriteException('Missing required parameter: "subject"');
5557
+ }
5558
+ if (typeof content === 'undefined') {
5559
+ throw new AppwriteException('Missing required parameter: "content"');
5560
+ }
5561
+ const apiPath = '/messaging/messages/email';
5562
+ const payload = {};
5563
+ if (typeof messageId !== 'undefined') {
5564
+ payload['messageId'] = messageId;
5565
+ }
5566
+ if (typeof subject !== 'undefined') {
5567
+ payload['subject'] = subject;
5568
+ }
5569
+ if (typeof content !== 'undefined') {
5570
+ payload['content'] = content;
5571
+ }
5572
+ if (typeof topics !== 'undefined') {
5573
+ payload['topics'] = topics;
5574
+ }
5575
+ if (typeof users !== 'undefined') {
5576
+ payload['users'] = users;
5577
+ }
5578
+ if (typeof targets !== 'undefined') {
5579
+ payload['targets'] = targets;
5580
+ }
5581
+ if (typeof cc !== 'undefined') {
5582
+ payload['cc'] = cc;
5583
+ }
5584
+ if (typeof bcc !== 'undefined') {
5585
+ payload['bcc'] = bcc;
5586
+ }
5587
+ if (typeof status !== 'undefined') {
5588
+ payload['status'] = status;
5589
+ }
5590
+ if (typeof html !== 'undefined') {
5591
+ payload['html'] = html;
5592
+ }
5593
+ if (typeof scheduledAt !== 'undefined') {
5594
+ payload['scheduledAt'] = scheduledAt;
5595
+ }
5596
+ const uri = new URL(this.client.config.endpoint + apiPath);
5597
+ return yield this.client.call('post', uri, {
5598
+ 'content-type': 'application/json',
5599
+ }, payload);
5600
+ });
5601
+ }
5602
+ /**
5603
+ * Update an email.
5604
+ *
5605
+ *
5606
+ * @param {string} messageId
5607
+ * @param {string[]} topics
5608
+ * @param {string[]} users
5609
+ * @param {string[]} targets
5610
+ * @param {string} subject
5611
+ * @param {string} content
5612
+ * @param {MessageStatus} status
5613
+ * @param {boolean} html
5614
+ * @param {string[]} cc
5615
+ * @param {string[]} bcc
5616
+ * @param {string} scheduledAt
5617
+ * @throws {AppwriteException}
5618
+ * @returns {Promise}
5619
+ */
5620
+ updateEmail(messageId, topics, users, targets, subject, content, status, html, cc, bcc, scheduledAt) {
5621
+ return __awaiter(this, void 0, void 0, function* () {
5622
+ if (typeof messageId === 'undefined') {
5623
+ throw new AppwriteException('Missing required parameter: "messageId"');
5624
+ }
5625
+ const apiPath = '/messaging/messages/email/{messageId}'.replace('{messageId}', messageId);
5626
+ const payload = {};
5627
+ if (typeof topics !== 'undefined') {
5628
+ payload['topics'] = topics;
5629
+ }
5630
+ if (typeof users !== 'undefined') {
5631
+ payload['users'] = users;
5632
+ }
5633
+ if (typeof targets !== 'undefined') {
5634
+ payload['targets'] = targets;
5635
+ }
5636
+ if (typeof subject !== 'undefined') {
5637
+ payload['subject'] = subject;
5638
+ }
5639
+ if (typeof content !== 'undefined') {
5640
+ payload['content'] = content;
5641
+ }
5642
+ if (typeof status !== 'undefined') {
5643
+ payload['status'] = status;
5644
+ }
5645
+ if (typeof html !== 'undefined') {
5646
+ payload['html'] = html;
5647
+ }
5648
+ if (typeof cc !== 'undefined') {
5649
+ payload['cc'] = cc;
5650
+ }
5651
+ if (typeof bcc !== 'undefined') {
5652
+ payload['bcc'] = bcc;
5653
+ }
5654
+ if (typeof scheduledAt !== 'undefined') {
5655
+ payload['scheduledAt'] = scheduledAt;
5656
+ }
5657
+ const uri = new URL(this.client.config.endpoint + apiPath);
5658
+ return yield this.client.call('patch', uri, {
5659
+ 'content-type': 'application/json',
5660
+ }, payload);
5661
+ });
5662
+ }
5663
+ /**
5664
+ * Create a push notification.
5665
+ *
5666
+ *
5667
+ * @param {string} messageId
5668
+ * @param {string} title
5669
+ * @param {string} body
5670
+ * @param {string[]} topics
5671
+ * @param {string[]} users
5672
+ * @param {string[]} targets
5673
+ * @param {object} data
5674
+ * @param {string} action
5675
+ * @param {string} icon
5676
+ * @param {string} sound
5677
+ * @param {string} color
5678
+ * @param {string} tag
5679
+ * @param {string} badge
5680
+ * @param {MessageStatus} status
5681
+ * @param {string} scheduledAt
5682
+ * @throws {AppwriteException}
5683
+ * @returns {Promise}
5684
+ */
5685
+ createPush(messageId, title, body, topics, users, targets, data, action, icon, sound, color, tag, badge, status, scheduledAt) {
5686
+ return __awaiter(this, void 0, void 0, function* () {
5687
+ if (typeof messageId === 'undefined') {
5688
+ throw new AppwriteException('Missing required parameter: "messageId"');
5689
+ }
5690
+ if (typeof title === 'undefined') {
5691
+ throw new AppwriteException('Missing required parameter: "title"');
5692
+ }
5693
+ if (typeof body === 'undefined') {
5694
+ throw new AppwriteException('Missing required parameter: "body"');
5695
+ }
5696
+ const apiPath = '/messaging/messages/push';
5697
+ const payload = {};
5698
+ if (typeof messageId !== 'undefined') {
5699
+ payload['messageId'] = messageId;
5700
+ }
5701
+ if (typeof title !== 'undefined') {
5702
+ payload['title'] = title;
5703
+ }
5704
+ if (typeof body !== 'undefined') {
5705
+ payload['body'] = body;
5706
+ }
5707
+ if (typeof topics !== 'undefined') {
5708
+ payload['topics'] = topics;
5709
+ }
5710
+ if (typeof users !== 'undefined') {
5711
+ payload['users'] = users;
5712
+ }
5713
+ if (typeof targets !== 'undefined') {
5714
+ payload['targets'] = targets;
5715
+ }
5716
+ if (typeof data !== 'undefined') {
5717
+ payload['data'] = data;
5718
+ }
5719
+ if (typeof action !== 'undefined') {
5720
+ payload['action'] = action;
5721
+ }
5722
+ if (typeof icon !== 'undefined') {
5723
+ payload['icon'] = icon;
5724
+ }
5725
+ if (typeof sound !== 'undefined') {
5726
+ payload['sound'] = sound;
5727
+ }
5728
+ if (typeof color !== 'undefined') {
5729
+ payload['color'] = color;
5730
+ }
5731
+ if (typeof tag !== 'undefined') {
5732
+ payload['tag'] = tag;
5733
+ }
5734
+ if (typeof badge !== 'undefined') {
5735
+ payload['badge'] = badge;
5736
+ }
5737
+ if (typeof status !== 'undefined') {
5738
+ payload['status'] = status;
5739
+ }
5740
+ if (typeof scheduledAt !== 'undefined') {
5741
+ payload['scheduledAt'] = scheduledAt;
5742
+ }
5743
+ const uri = new URL(this.client.config.endpoint + apiPath);
5744
+ return yield this.client.call('post', uri, {
5745
+ 'content-type': 'application/json',
5746
+ }, payload);
5747
+ });
5748
+ }
5749
+ /**
5750
+ * Update a push notification.
5751
+ *
5752
+ *
5753
+ * @param {string} messageId
5754
+ * @param {string[]} topics
5755
+ * @param {string[]} users
5756
+ * @param {string[]} targets
5757
+ * @param {string} title
5758
+ * @param {string} body
5759
+ * @param {object} data
5760
+ * @param {string} action
5761
+ * @param {string} icon
5762
+ * @param {string} sound
5763
+ * @param {string} color
5764
+ * @param {string} tag
5765
+ * @param {number} badge
5766
+ * @param {MessageStatus} status
5767
+ * @param {string} scheduledAt
5768
+ * @throws {AppwriteException}
5769
+ * @returns {Promise}
5770
+ */
5771
+ updatePush(messageId, topics, users, targets, title, body, data, action, icon, sound, color, tag, badge, status, scheduledAt) {
5772
+ return __awaiter(this, void 0, void 0, function* () {
5773
+ if (typeof messageId === 'undefined') {
5774
+ throw new AppwriteException('Missing required parameter: "messageId"');
5775
+ }
5776
+ const apiPath = '/messaging/messages/push/{messageId}'.replace('{messageId}', messageId);
5777
+ const payload = {};
5778
+ if (typeof topics !== 'undefined') {
5779
+ payload['topics'] = topics;
5780
+ }
5781
+ if (typeof users !== 'undefined') {
5782
+ payload['users'] = users;
5783
+ }
5784
+ if (typeof targets !== 'undefined') {
5785
+ payload['targets'] = targets;
5786
+ }
5787
+ if (typeof title !== 'undefined') {
5788
+ payload['title'] = title;
5789
+ }
5790
+ if (typeof body !== 'undefined') {
5791
+ payload['body'] = body;
5792
+ }
5793
+ if (typeof data !== 'undefined') {
5794
+ payload['data'] = data;
5795
+ }
5796
+ if (typeof action !== 'undefined') {
5797
+ payload['action'] = action;
5798
+ }
5799
+ if (typeof icon !== 'undefined') {
5800
+ payload['icon'] = icon;
5801
+ }
5802
+ if (typeof sound !== 'undefined') {
5803
+ payload['sound'] = sound;
5804
+ }
5805
+ if (typeof color !== 'undefined') {
5806
+ payload['color'] = color;
5807
+ }
5808
+ if (typeof tag !== 'undefined') {
5809
+ payload['tag'] = tag;
5810
+ }
5811
+ if (typeof badge !== 'undefined') {
5812
+ payload['badge'] = badge;
5813
+ }
5814
+ if (typeof status !== 'undefined') {
5815
+ payload['status'] = status;
5816
+ }
5817
+ if (typeof scheduledAt !== 'undefined') {
5818
+ payload['scheduledAt'] = scheduledAt;
5819
+ }
5820
+ const uri = new URL(this.client.config.endpoint + apiPath);
5821
+ return yield this.client.call('patch', uri, {
5822
+ 'content-type': 'application/json',
5823
+ }, payload);
5824
+ });
5825
+ }
5826
+ /**
5827
+ * Create an SMS.
5828
+ *
5829
+ *
5830
+ * @param {string} messageId
5831
+ * @param {string} content
5832
+ * @param {string[]} topics
5833
+ * @param {string[]} users
5834
+ * @param {string[]} targets
5835
+ * @param {MessageStatus} status
5836
+ * @param {string} scheduledAt
5837
+ * @throws {AppwriteException}
5838
+ * @returns {Promise}
5839
+ */
5840
+ createSMS(messageId, content, topics, users, targets, status, scheduledAt) {
5841
+ return __awaiter(this, void 0, void 0, function* () {
5842
+ if (typeof messageId === 'undefined') {
5843
+ throw new AppwriteException('Missing required parameter: "messageId"');
5844
+ }
5845
+ if (typeof content === 'undefined') {
5846
+ throw new AppwriteException('Missing required parameter: "content"');
5847
+ }
5848
+ const apiPath = '/messaging/messages/sms';
5849
+ const payload = {};
5850
+ if (typeof messageId !== 'undefined') {
5851
+ payload['messageId'] = messageId;
5852
+ }
5853
+ if (typeof content !== 'undefined') {
5854
+ payload['content'] = content;
5855
+ }
5856
+ if (typeof topics !== 'undefined') {
5857
+ payload['topics'] = topics;
5858
+ }
5859
+ if (typeof users !== 'undefined') {
5860
+ payload['users'] = users;
5861
+ }
5862
+ if (typeof targets !== 'undefined') {
5863
+ payload['targets'] = targets;
5864
+ }
5865
+ if (typeof status !== 'undefined') {
5866
+ payload['status'] = status;
5867
+ }
5868
+ if (typeof scheduledAt !== 'undefined') {
5869
+ payload['scheduledAt'] = scheduledAt;
5870
+ }
5871
+ const uri = new URL(this.client.config.endpoint + apiPath);
5872
+ return yield this.client.call('post', uri, {
5873
+ 'content-type': 'application/json',
5874
+ }, payload);
5875
+ });
5876
+ }
5877
+ /**
5878
+ * Update an SMS.
5879
+ *
5880
+ *
5881
+ * @param {string} messageId
5882
+ * @param {string[]} topics
5883
+ * @param {string[]} users
5884
+ * @param {string[]} targets
5885
+ * @param {string} content
5886
+ * @param {MessageStatus} status
5887
+ * @param {string} scheduledAt
5888
+ * @throws {AppwriteException}
5889
+ * @returns {Promise}
5890
+ */
5891
+ updateSMS(messageId, topics, users, targets, content, status, scheduledAt) {
5892
+ return __awaiter(this, void 0, void 0, function* () {
5893
+ if (typeof messageId === 'undefined') {
5894
+ throw new AppwriteException('Missing required parameter: "messageId"');
5895
+ }
5896
+ const apiPath = '/messaging/messages/sms/{messageId}'.replace('{messageId}', messageId);
5897
+ const payload = {};
5898
+ if (typeof topics !== 'undefined') {
5899
+ payload['topics'] = topics;
5900
+ }
5901
+ if (typeof users !== 'undefined') {
5902
+ payload['users'] = users;
5903
+ }
5904
+ if (typeof targets !== 'undefined') {
5905
+ payload['targets'] = targets;
5906
+ }
5907
+ if (typeof content !== 'undefined') {
5908
+ payload['content'] = content;
5909
+ }
5910
+ if (typeof status !== 'undefined') {
5911
+ payload['status'] = status;
5912
+ }
5913
+ if (typeof scheduledAt !== 'undefined') {
5914
+ payload['scheduledAt'] = scheduledAt;
5915
+ }
5916
+ const uri = new URL(this.client.config.endpoint + apiPath);
5917
+ return yield this.client.call('patch', uri, {
5918
+ 'content-type': 'application/json',
5919
+ }, payload);
5920
+ });
5921
+ }
5922
+ /**
5923
+ * Get a message
5924
+ *
5925
+ *
5926
+ * @param {string} messageId
5927
+ * @throws {AppwriteException}
5928
+ * @returns {Promise}
5929
+ */
5930
+ getMessage(messageId) {
5931
+ return __awaiter(this, void 0, void 0, function* () {
5932
+ if (typeof messageId === 'undefined') {
5933
+ throw new AppwriteException('Missing required parameter: "messageId"');
5934
+ }
5935
+ const apiPath = '/messaging/messages/{messageId}'.replace('{messageId}', messageId);
5936
+ const payload = {};
5937
+ const uri = new URL(this.client.config.endpoint + apiPath);
5938
+ return yield this.client.call('get', uri, {
5939
+ 'content-type': 'application/json',
5940
+ }, payload);
5941
+ });
5942
+ }
5943
+ /**
5944
+ * Delete a message
5945
+ *
5946
+ *
5947
+ * @param {string} messageId
5948
+ * @throws {AppwriteException}
5949
+ * @returns {Promise}
5950
+ */
5951
+ delete(messageId) {
5952
+ return __awaiter(this, void 0, void 0, function* () {
5953
+ if (typeof messageId === 'undefined') {
5954
+ throw new AppwriteException('Missing required parameter: "messageId"');
5955
+ }
5956
+ const apiPath = '/messaging/messages/{messageId}'.replace('{messageId}', messageId);
5957
+ const payload = {};
5958
+ const uri = new URL(this.client.config.endpoint + apiPath);
5959
+ return yield this.client.call('delete', uri, {
5960
+ 'content-type': 'application/json',
5961
+ }, payload);
5962
+ });
5963
+ }
5964
+ /**
5965
+ * List message logs
5966
+ *
5967
+ *
5968
+ * @param {string} messageId
5969
+ * @param {string[]} queries
5970
+ * @throws {AppwriteException}
5971
+ * @returns {Promise}
5972
+ */
5973
+ listMessageLogs(messageId, queries) {
5974
+ return __awaiter(this, void 0, void 0, function* () {
5975
+ if (typeof messageId === 'undefined') {
5976
+ throw new AppwriteException('Missing required parameter: "messageId"');
5977
+ }
5978
+ const apiPath = '/messaging/messages/{messageId}/logs'.replace('{messageId}', messageId);
5979
+ const payload = {};
5980
+ if (typeof queries !== 'undefined') {
5981
+ payload['queries'] = queries;
5982
+ }
5983
+ const uri = new URL(this.client.config.endpoint + apiPath);
5984
+ return yield this.client.call('get', uri, {
5985
+ 'content-type': 'application/json',
5986
+ }, payload);
5987
+ });
5988
+ }
5989
+ /**
5990
+ * List message targets
5991
+ *
5992
+ * List the targets associated with a message as set via the targets
5993
+ * attribute.
5994
+ *
5995
+ * @param {string} messageId
5996
+ * @param {string[]} queries
5997
+ * @throws {AppwriteException}
5998
+ * @returns {Promise}
5999
+ */
6000
+ listTargets(messageId, queries) {
6001
+ return __awaiter(this, void 0, void 0, function* () {
6002
+ if (typeof messageId === 'undefined') {
6003
+ throw new AppwriteException('Missing required parameter: "messageId"');
6004
+ }
6005
+ const apiPath = '/messaging/messages/{messageId}/targets'.replace('{messageId}', messageId);
6006
+ const payload = {};
6007
+ if (typeof queries !== 'undefined') {
6008
+ payload['queries'] = queries;
6009
+ }
6010
+ const uri = new URL(this.client.config.endpoint + apiPath);
6011
+ return yield this.client.call('get', uri, {
6012
+ 'content-type': 'application/json',
6013
+ }, payload);
6014
+ });
6015
+ }
6016
+ /**
6017
+ * List providers
6018
+ *
6019
+ *
6020
+ * @param {string[]} queries
6021
+ * @param {string} search
6022
+ * @throws {AppwriteException}
6023
+ * @returns {Promise}
6024
+ */
6025
+ listProviders(queries, search) {
6026
+ return __awaiter(this, void 0, void 0, function* () {
6027
+ const apiPath = '/messaging/providers';
6028
+ const payload = {};
6029
+ if (typeof queries !== 'undefined') {
6030
+ payload['queries'] = queries;
6031
+ }
6032
+ if (typeof search !== 'undefined') {
6033
+ payload['search'] = search;
6034
+ }
6035
+ const uri = new URL(this.client.config.endpoint + apiPath);
6036
+ return yield this.client.call('get', uri, {
6037
+ 'content-type': 'application/json',
6038
+ }, payload);
6039
+ });
6040
+ }
6041
+ /**
6042
+ * Create APNS provider
6043
+ *
6044
+ *
6045
+ * @param {string} providerId
6046
+ * @param {string} name
6047
+ * @param {string} authKey
6048
+ * @param {string} authKeyId
6049
+ * @param {string} teamId
6050
+ * @param {string} bundleId
6051
+ * @param {boolean} enabled
6052
+ * @throws {AppwriteException}
6053
+ * @returns {Promise}
6054
+ */
6055
+ createAPNSProvider(providerId, name, authKey, authKeyId, teamId, bundleId, enabled) {
6056
+ return __awaiter(this, void 0, void 0, function* () {
6057
+ if (typeof providerId === 'undefined') {
6058
+ throw new AppwriteException('Missing required parameter: "providerId"');
6059
+ }
6060
+ if (typeof name === 'undefined') {
6061
+ throw new AppwriteException('Missing required parameter: "name"');
6062
+ }
6063
+ const apiPath = '/messaging/providers/apns';
6064
+ const payload = {};
6065
+ if (typeof providerId !== 'undefined') {
6066
+ payload['providerId'] = providerId;
6067
+ }
6068
+ if (typeof name !== 'undefined') {
6069
+ payload['name'] = name;
6070
+ }
6071
+ if (typeof authKey !== 'undefined') {
6072
+ payload['authKey'] = authKey;
6073
+ }
6074
+ if (typeof authKeyId !== 'undefined') {
6075
+ payload['authKeyId'] = authKeyId;
6076
+ }
6077
+ if (typeof teamId !== 'undefined') {
6078
+ payload['teamId'] = teamId;
6079
+ }
6080
+ if (typeof bundleId !== 'undefined') {
6081
+ payload['bundleId'] = bundleId;
6082
+ }
6083
+ if (typeof enabled !== 'undefined') {
6084
+ payload['enabled'] = enabled;
6085
+ }
6086
+ const uri = new URL(this.client.config.endpoint + apiPath);
6087
+ return yield this.client.call('post', uri, {
6088
+ 'content-type': 'application/json',
6089
+ }, payload);
6090
+ });
6091
+ }
6092
+ /**
6093
+ * Update APNS provider
6094
+ *
6095
+ *
6096
+ * @param {string} providerId
6097
+ * @param {string} name
6098
+ * @param {boolean} enabled
6099
+ * @param {string} authKey
6100
+ * @param {string} authKeyId
6101
+ * @param {string} teamId
6102
+ * @param {string} bundleId
6103
+ * @throws {AppwriteException}
6104
+ * @returns {Promise}
6105
+ */
6106
+ updateAPNSProvider(providerId, name, enabled, authKey, authKeyId, teamId, bundleId) {
6107
+ return __awaiter(this, void 0, void 0, function* () {
6108
+ if (typeof providerId === 'undefined') {
6109
+ throw new AppwriteException('Missing required parameter: "providerId"');
6110
+ }
6111
+ const apiPath = '/messaging/providers/apns/{providerId}'.replace('{providerId}', providerId);
6112
+ const payload = {};
6113
+ if (typeof name !== 'undefined') {
6114
+ payload['name'] = name;
6115
+ }
6116
+ if (typeof enabled !== 'undefined') {
6117
+ payload['enabled'] = enabled;
6118
+ }
6119
+ if (typeof authKey !== 'undefined') {
6120
+ payload['authKey'] = authKey;
6121
+ }
6122
+ if (typeof authKeyId !== 'undefined') {
6123
+ payload['authKeyId'] = authKeyId;
6124
+ }
6125
+ if (typeof teamId !== 'undefined') {
6126
+ payload['teamId'] = teamId;
6127
+ }
6128
+ if (typeof bundleId !== 'undefined') {
6129
+ payload['bundleId'] = bundleId;
6130
+ }
6131
+ const uri = new URL(this.client.config.endpoint + apiPath);
6132
+ return yield this.client.call('patch', uri, {
6133
+ 'content-type': 'application/json',
6134
+ }, payload);
6135
+ });
6136
+ }
6137
+ /**
6138
+ * Create FCM provider
6139
+ *
6140
+ *
6141
+ * @param {string} providerId
6142
+ * @param {string} name
6143
+ * @param {object} serviceAccountJSON
6144
+ * @param {boolean} enabled
6145
+ * @throws {AppwriteException}
6146
+ * @returns {Promise}
6147
+ */
6148
+ createFCMProvider(providerId, name, serviceAccountJSON, enabled) {
6149
+ return __awaiter(this, void 0, void 0, function* () {
6150
+ if (typeof providerId === 'undefined') {
6151
+ throw new AppwriteException('Missing required parameter: "providerId"');
6152
+ }
6153
+ if (typeof name === 'undefined') {
6154
+ throw new AppwriteException('Missing required parameter: "name"');
6155
+ }
6156
+ const apiPath = '/messaging/providers/fcm';
6157
+ const payload = {};
6158
+ if (typeof providerId !== 'undefined') {
6159
+ payload['providerId'] = providerId;
6160
+ }
6161
+ if (typeof name !== 'undefined') {
6162
+ payload['name'] = name;
6163
+ }
6164
+ if (typeof serviceAccountJSON !== 'undefined') {
6165
+ payload['serviceAccountJSON'] = serviceAccountJSON;
6166
+ }
6167
+ if (typeof enabled !== 'undefined') {
6168
+ payload['enabled'] = enabled;
6169
+ }
6170
+ const uri = new URL(this.client.config.endpoint + apiPath);
6171
+ return yield this.client.call('post', uri, {
6172
+ 'content-type': 'application/json',
6173
+ }, payload);
6174
+ });
6175
+ }
6176
+ /**
6177
+ * Update FCM provider
6178
+ *
6179
+ *
6180
+ * @param {string} providerId
6181
+ * @param {string} name
6182
+ * @param {boolean} enabled
6183
+ * @param {object} serviceAccountJSON
6184
+ * @throws {AppwriteException}
6185
+ * @returns {Promise}
6186
+ */
6187
+ updateFCMProvider(providerId, name, enabled, serviceAccountJSON) {
6188
+ return __awaiter(this, void 0, void 0, function* () {
6189
+ if (typeof providerId === 'undefined') {
6190
+ throw new AppwriteException('Missing required parameter: "providerId"');
6191
+ }
6192
+ const apiPath = '/messaging/providers/fcm/{providerId}'.replace('{providerId}', providerId);
6193
+ const payload = {};
6194
+ if (typeof name !== 'undefined') {
6195
+ payload['name'] = name;
6196
+ }
6197
+ if (typeof enabled !== 'undefined') {
6198
+ payload['enabled'] = enabled;
6199
+ }
6200
+ if (typeof serviceAccountJSON !== 'undefined') {
6201
+ payload['serviceAccountJSON'] = serviceAccountJSON;
6202
+ }
6203
+ const uri = new URL(this.client.config.endpoint + apiPath);
6204
+ return yield this.client.call('patch', uri, {
6205
+ 'content-type': 'application/json',
6206
+ }, payload);
6207
+ });
6208
+ }
6209
+ /**
6210
+ * Create Mailgun provider
6211
+ *
6212
+ *
6213
+ * @param {string} providerId
6214
+ * @param {string} name
6215
+ * @param {string} apiKey
6216
+ * @param {string} domain
6217
+ * @param {boolean} isEuRegion
6218
+ * @param {string} fromName
6219
+ * @param {string} fromEmail
6220
+ * @param {string} replyToName
6221
+ * @param {string} replyToEmail
6222
+ * @param {boolean} enabled
6223
+ * @throws {AppwriteException}
6224
+ * @returns {Promise}
6225
+ */
6226
+ createMailgunProvider(providerId, name, apiKey, domain, isEuRegion, fromName, fromEmail, replyToName, replyToEmail, enabled) {
6227
+ return __awaiter(this, void 0, void 0, function* () {
6228
+ if (typeof providerId === 'undefined') {
6229
+ throw new AppwriteException('Missing required parameter: "providerId"');
6230
+ }
6231
+ if (typeof name === 'undefined') {
6232
+ throw new AppwriteException('Missing required parameter: "name"');
6233
+ }
6234
+ const apiPath = '/messaging/providers/mailgun';
6235
+ const payload = {};
6236
+ if (typeof providerId !== 'undefined') {
6237
+ payload['providerId'] = providerId;
6238
+ }
6239
+ if (typeof name !== 'undefined') {
6240
+ payload['name'] = name;
6241
+ }
6242
+ if (typeof apiKey !== 'undefined') {
6243
+ payload['apiKey'] = apiKey;
6244
+ }
6245
+ if (typeof domain !== 'undefined') {
6246
+ payload['domain'] = domain;
6247
+ }
6248
+ if (typeof isEuRegion !== 'undefined') {
6249
+ payload['isEuRegion'] = isEuRegion;
6250
+ }
6251
+ if (typeof fromName !== 'undefined') {
6252
+ payload['fromName'] = fromName;
6253
+ }
6254
+ if (typeof fromEmail !== 'undefined') {
6255
+ payload['fromEmail'] = fromEmail;
6256
+ }
6257
+ if (typeof replyToName !== 'undefined') {
6258
+ payload['replyToName'] = replyToName;
6259
+ }
6260
+ if (typeof replyToEmail !== 'undefined') {
6261
+ payload['replyToEmail'] = replyToEmail;
6262
+ }
6263
+ if (typeof enabled !== 'undefined') {
6264
+ payload['enabled'] = enabled;
6265
+ }
6266
+ const uri = new URL(this.client.config.endpoint + apiPath);
6267
+ return yield this.client.call('post', uri, {
6268
+ 'content-type': 'application/json',
6269
+ }, payload);
6270
+ });
6271
+ }
6272
+ /**
6273
+ * Update Mailgun provider
6274
+ *
6275
+ *
6276
+ * @param {string} providerId
6277
+ * @param {string} name
6278
+ * @param {string} apiKey
6279
+ * @param {string} domain
6280
+ * @param {boolean} isEuRegion
6281
+ * @param {boolean} enabled
6282
+ * @param {string} fromName
6283
+ * @param {string} fromEmail
6284
+ * @param {string} replyToName
6285
+ * @param {string} replyToEmail
6286
+ * @throws {AppwriteException}
6287
+ * @returns {Promise}
6288
+ */
6289
+ updateMailgunProvider(providerId, name, apiKey, domain, isEuRegion, enabled, fromName, fromEmail, replyToName, replyToEmail) {
6290
+ return __awaiter(this, void 0, void 0, function* () {
6291
+ if (typeof providerId === 'undefined') {
6292
+ throw new AppwriteException('Missing required parameter: "providerId"');
6293
+ }
6294
+ const apiPath = '/messaging/providers/mailgun/{providerId}'.replace('{providerId}', providerId);
6295
+ const payload = {};
6296
+ if (typeof name !== 'undefined') {
6297
+ payload['name'] = name;
6298
+ }
6299
+ if (typeof apiKey !== 'undefined') {
6300
+ payload['apiKey'] = apiKey;
6301
+ }
6302
+ if (typeof domain !== 'undefined') {
6303
+ payload['domain'] = domain;
6304
+ }
6305
+ if (typeof isEuRegion !== 'undefined') {
6306
+ payload['isEuRegion'] = isEuRegion;
6307
+ }
6308
+ if (typeof enabled !== 'undefined') {
6309
+ payload['enabled'] = enabled;
6310
+ }
6311
+ if (typeof fromName !== 'undefined') {
6312
+ payload['fromName'] = fromName;
6313
+ }
6314
+ if (typeof fromEmail !== 'undefined') {
6315
+ payload['fromEmail'] = fromEmail;
6316
+ }
6317
+ if (typeof replyToName !== 'undefined') {
6318
+ payload['replyToName'] = replyToName;
6319
+ }
6320
+ if (typeof replyToEmail !== 'undefined') {
6321
+ payload['replyToEmail'] = replyToEmail;
6322
+ }
6323
+ const uri = new URL(this.client.config.endpoint + apiPath);
6324
+ return yield this.client.call('patch', uri, {
6325
+ 'content-type': 'application/json',
6326
+ }, payload);
6327
+ });
6328
+ }
6329
+ /**
6330
+ * Create Msg91 provider
6331
+ *
6332
+ *
6333
+ * @param {string} providerId
6334
+ * @param {string} name
6335
+ * @param {string} from
6336
+ * @param {string} senderId
6337
+ * @param {string} authKey
6338
+ * @param {boolean} enabled
6339
+ * @throws {AppwriteException}
6340
+ * @returns {Promise}
6341
+ */
6342
+ createMsg91Provider(providerId, name, from, senderId, authKey, enabled) {
6343
+ return __awaiter(this, void 0, void 0, function* () {
6344
+ if (typeof providerId === 'undefined') {
6345
+ throw new AppwriteException('Missing required parameter: "providerId"');
6346
+ }
6347
+ if (typeof name === 'undefined') {
6348
+ throw new AppwriteException('Missing required parameter: "name"');
6349
+ }
6350
+ const apiPath = '/messaging/providers/msg91';
6351
+ const payload = {};
6352
+ if (typeof providerId !== 'undefined') {
6353
+ payload['providerId'] = providerId;
6354
+ }
6355
+ if (typeof name !== 'undefined') {
6356
+ payload['name'] = name;
6357
+ }
6358
+ if (typeof from !== 'undefined') {
6359
+ payload['from'] = from;
6360
+ }
6361
+ if (typeof senderId !== 'undefined') {
6362
+ payload['senderId'] = senderId;
6363
+ }
6364
+ if (typeof authKey !== 'undefined') {
6365
+ payload['authKey'] = authKey;
6366
+ }
6367
+ if (typeof enabled !== 'undefined') {
6368
+ payload['enabled'] = enabled;
6369
+ }
6370
+ const uri = new URL(this.client.config.endpoint + apiPath);
6371
+ return yield this.client.call('post', uri, {
6372
+ 'content-type': 'application/json',
6373
+ }, payload);
6374
+ });
6375
+ }
6376
+ /**
6377
+ * Update Msg91 provider
6378
+ *
6379
+ *
6380
+ * @param {string} providerId
6381
+ * @param {string} name
6382
+ * @param {boolean} enabled
6383
+ * @param {string} senderId
6384
+ * @param {string} authKey
6385
+ * @param {string} from
6386
+ * @throws {AppwriteException}
6387
+ * @returns {Promise}
6388
+ */
6389
+ updateMsg91Provider(providerId, name, enabled, senderId, authKey, from) {
6390
+ return __awaiter(this, void 0, void 0, function* () {
6391
+ if (typeof providerId === 'undefined') {
6392
+ throw new AppwriteException('Missing required parameter: "providerId"');
6393
+ }
6394
+ const apiPath = '/messaging/providers/msg91/{providerId}'.replace('{providerId}', providerId);
6395
+ const payload = {};
6396
+ if (typeof name !== 'undefined') {
6397
+ payload['name'] = name;
6398
+ }
6399
+ if (typeof enabled !== 'undefined') {
6400
+ payload['enabled'] = enabled;
6401
+ }
6402
+ if (typeof senderId !== 'undefined') {
6403
+ payload['senderId'] = senderId;
6404
+ }
6405
+ if (typeof authKey !== 'undefined') {
6406
+ payload['authKey'] = authKey;
6407
+ }
6408
+ if (typeof from !== 'undefined') {
6409
+ payload['from'] = from;
6410
+ }
6411
+ const uri = new URL(this.client.config.endpoint + apiPath);
6412
+ return yield this.client.call('patch', uri, {
6413
+ 'content-type': 'application/json',
6414
+ }, payload);
6415
+ });
6416
+ }
6417
+ /**
6418
+ * Create Sendgrid provider
6419
+ *
6420
+ *
6421
+ * @param {string} providerId
6422
+ * @param {string} name
6423
+ * @param {string} apiKey
6424
+ * @param {string} fromName
6425
+ * @param {string} fromEmail
6426
+ * @param {string} replyToName
6427
+ * @param {string} replyToEmail
6428
+ * @param {boolean} enabled
6429
+ * @throws {AppwriteException}
6430
+ * @returns {Promise}
6431
+ */
6432
+ createSendgridProvider(providerId, name, apiKey, fromName, fromEmail, replyToName, replyToEmail, enabled) {
6433
+ return __awaiter(this, void 0, void 0, function* () {
6434
+ if (typeof providerId === 'undefined') {
6435
+ throw new AppwriteException('Missing required parameter: "providerId"');
6436
+ }
6437
+ if (typeof name === 'undefined') {
6438
+ throw new AppwriteException('Missing required parameter: "name"');
6439
+ }
6440
+ const apiPath = '/messaging/providers/sendgrid';
6441
+ const payload = {};
6442
+ if (typeof providerId !== 'undefined') {
6443
+ payload['providerId'] = providerId;
6444
+ }
6445
+ if (typeof name !== 'undefined') {
6446
+ payload['name'] = name;
6447
+ }
6448
+ if (typeof apiKey !== 'undefined') {
6449
+ payload['apiKey'] = apiKey;
6450
+ }
6451
+ if (typeof fromName !== 'undefined') {
6452
+ payload['fromName'] = fromName;
6453
+ }
6454
+ if (typeof fromEmail !== 'undefined') {
6455
+ payload['fromEmail'] = fromEmail;
6456
+ }
6457
+ if (typeof replyToName !== 'undefined') {
6458
+ payload['replyToName'] = replyToName;
6459
+ }
6460
+ if (typeof replyToEmail !== 'undefined') {
6461
+ payload['replyToEmail'] = replyToEmail;
6462
+ }
6463
+ if (typeof enabled !== 'undefined') {
6464
+ payload['enabled'] = enabled;
6465
+ }
6466
+ const uri = new URL(this.client.config.endpoint + apiPath);
6467
+ return yield this.client.call('post', uri, {
6468
+ 'content-type': 'application/json',
6469
+ }, payload);
6470
+ });
6471
+ }
6472
+ /**
6473
+ * Update Sendgrid provider
6474
+ *
6475
+ *
6476
+ * @param {string} providerId
6477
+ * @param {string} name
6478
+ * @param {boolean} enabled
6479
+ * @param {string} apiKey
6480
+ * @param {string} fromName
6481
+ * @param {string} fromEmail
6482
+ * @param {string} replyToName
6483
+ * @param {string} replyToEmail
6484
+ * @throws {AppwriteException}
6485
+ * @returns {Promise}
6486
+ */
6487
+ updateSendgridProvider(providerId, name, enabled, apiKey, fromName, fromEmail, replyToName, replyToEmail) {
6488
+ return __awaiter(this, void 0, void 0, function* () {
6489
+ if (typeof providerId === 'undefined') {
6490
+ throw new AppwriteException('Missing required parameter: "providerId"');
6491
+ }
6492
+ const apiPath = '/messaging/providers/sendgrid/{providerId}'.replace('{providerId}', providerId);
6493
+ const payload = {};
6494
+ if (typeof name !== 'undefined') {
6495
+ payload['name'] = name;
6496
+ }
6497
+ if (typeof enabled !== 'undefined') {
6498
+ payload['enabled'] = enabled;
6499
+ }
6500
+ if (typeof apiKey !== 'undefined') {
6501
+ payload['apiKey'] = apiKey;
6502
+ }
6503
+ if (typeof fromName !== 'undefined') {
6504
+ payload['fromName'] = fromName;
6505
+ }
6506
+ if (typeof fromEmail !== 'undefined') {
6507
+ payload['fromEmail'] = fromEmail;
6508
+ }
6509
+ if (typeof replyToName !== 'undefined') {
6510
+ payload['replyToName'] = replyToName;
6511
+ }
6512
+ if (typeof replyToEmail !== 'undefined') {
6513
+ payload['replyToEmail'] = replyToEmail;
6514
+ }
6515
+ const uri = new URL(this.client.config.endpoint + apiPath);
6516
+ return yield this.client.call('patch', uri, {
6517
+ 'content-type': 'application/json',
6518
+ }, payload);
6519
+ });
6520
+ }
6521
+ /**
6522
+ * Create SMTP provider
6523
+ *
6524
+ *
6525
+ * @param {string} providerId
6526
+ * @param {string} name
6527
+ * @param {string} host
6528
+ * @param {number} port
6529
+ * @param {string} username
6530
+ * @param {string} password
6531
+ * @param {SMTPEncryption} encryption
6532
+ * @param {boolean} autoTLS
6533
+ * @param {string} mailer
6534
+ * @param {string} fromName
6535
+ * @param {string} fromEmail
6536
+ * @param {string} replyToName
6537
+ * @param {string} replyToEmail
6538
+ * @param {boolean} enabled
6539
+ * @throws {AppwriteException}
6540
+ * @returns {Promise}
6541
+ */
6542
+ createSMTPProvider(providerId, name, host, port, username, password, encryption, autoTLS, mailer, fromName, fromEmail, replyToName, replyToEmail, enabled) {
6543
+ return __awaiter(this, void 0, void 0, function* () {
6544
+ if (typeof providerId === 'undefined') {
6545
+ throw new AppwriteException('Missing required parameter: "providerId"');
6546
+ }
6547
+ if (typeof name === 'undefined') {
6548
+ throw new AppwriteException('Missing required parameter: "name"');
6549
+ }
6550
+ if (typeof host === 'undefined') {
6551
+ throw new AppwriteException('Missing required parameter: "host"');
6552
+ }
6553
+ const apiPath = '/messaging/providers/smtp';
6554
+ const payload = {};
6555
+ if (typeof providerId !== 'undefined') {
6556
+ payload['providerId'] = providerId;
6557
+ }
6558
+ if (typeof name !== 'undefined') {
6559
+ payload['name'] = name;
6560
+ }
6561
+ if (typeof host !== 'undefined') {
6562
+ payload['host'] = host;
6563
+ }
6564
+ if (typeof port !== 'undefined') {
6565
+ payload['port'] = port;
6566
+ }
6567
+ if (typeof username !== 'undefined') {
6568
+ payload['username'] = username;
6569
+ }
6570
+ if (typeof password !== 'undefined') {
6571
+ payload['password'] = password;
6572
+ }
6573
+ if (typeof encryption !== 'undefined') {
6574
+ payload['encryption'] = encryption;
6575
+ }
6576
+ if (typeof autoTLS !== 'undefined') {
6577
+ payload['autoTLS'] = autoTLS;
6578
+ }
6579
+ if (typeof mailer !== 'undefined') {
6580
+ payload['mailer'] = mailer;
6581
+ }
6582
+ if (typeof fromName !== 'undefined') {
6583
+ payload['fromName'] = fromName;
6584
+ }
6585
+ if (typeof fromEmail !== 'undefined') {
6586
+ payload['fromEmail'] = fromEmail;
6587
+ }
6588
+ if (typeof replyToName !== 'undefined') {
6589
+ payload['replyToName'] = replyToName;
6590
+ }
6591
+ if (typeof replyToEmail !== 'undefined') {
6592
+ payload['replyToEmail'] = replyToEmail;
6593
+ }
6594
+ if (typeof enabled !== 'undefined') {
6595
+ payload['enabled'] = enabled;
6596
+ }
6597
+ const uri = new URL(this.client.config.endpoint + apiPath);
6598
+ return yield this.client.call('post', uri, {
6599
+ 'content-type': 'application/json',
6600
+ }, payload);
6601
+ });
6602
+ }
6603
+ /**
6604
+ * Update SMTP provider
6605
+ *
6606
+ *
6607
+ * @param {string} providerId
6608
+ * @param {string} name
6609
+ * @param {string} host
6610
+ * @param {number} port
6611
+ * @param {string} username
6612
+ * @param {string} password
6613
+ * @param {SMTPEncryption} encryption
6614
+ * @param {boolean} autoTLS
6615
+ * @param {string} mailer
6616
+ * @param {string} fromName
6617
+ * @param {string} fromEmail
6618
+ * @param {string} replyToName
6619
+ * @param {string} replyToEmail
6620
+ * @param {boolean} enabled
6621
+ * @throws {AppwriteException}
6622
+ * @returns {Promise}
6623
+ */
6624
+ updateSMTPProvider(providerId, name, host, port, username, password, encryption, autoTLS, mailer, fromName, fromEmail, replyToName, replyToEmail, enabled) {
6625
+ return __awaiter(this, void 0, void 0, function* () {
6626
+ if (typeof providerId === 'undefined') {
6627
+ throw new AppwriteException('Missing required parameter: "providerId"');
6628
+ }
6629
+ const apiPath = '/messaging/providers/smtp/{providerId}'.replace('{providerId}', providerId);
6630
+ const payload = {};
6631
+ if (typeof name !== 'undefined') {
6632
+ payload['name'] = name;
6633
+ }
6634
+ if (typeof host !== 'undefined') {
6635
+ payload['host'] = host;
6636
+ }
6637
+ if (typeof port !== 'undefined') {
6638
+ payload['port'] = port;
6639
+ }
6640
+ if (typeof username !== 'undefined') {
6641
+ payload['username'] = username;
6642
+ }
6643
+ if (typeof password !== 'undefined') {
6644
+ payload['password'] = password;
6645
+ }
6646
+ if (typeof encryption !== 'undefined') {
6647
+ payload['encryption'] = encryption;
6648
+ }
6649
+ if (typeof autoTLS !== 'undefined') {
6650
+ payload['autoTLS'] = autoTLS;
6651
+ }
6652
+ if (typeof mailer !== 'undefined') {
6653
+ payload['mailer'] = mailer;
6654
+ }
6655
+ if (typeof fromName !== 'undefined') {
6656
+ payload['fromName'] = fromName;
6657
+ }
6658
+ if (typeof fromEmail !== 'undefined') {
6659
+ payload['fromEmail'] = fromEmail;
6660
+ }
6661
+ if (typeof replyToName !== 'undefined') {
6662
+ payload['replyToName'] = replyToName;
6663
+ }
6664
+ if (typeof replyToEmail !== 'undefined') {
6665
+ payload['replyToEmail'] = replyToEmail;
6666
+ }
6667
+ if (typeof enabled !== 'undefined') {
6668
+ payload['enabled'] = enabled;
6669
+ }
6670
+ const uri = new URL(this.client.config.endpoint + apiPath);
6671
+ return yield this.client.call('patch', uri, {
6672
+ 'content-type': 'application/json',
6673
+ }, payload);
6674
+ });
6675
+ }
6676
+ /**
6677
+ * Create Telesign provider
6678
+ *
6679
+ *
6680
+ * @param {string} providerId
6681
+ * @param {string} name
6682
+ * @param {string} from
6683
+ * @param {string} customerId
6684
+ * @param {string} apiKey
6685
+ * @param {boolean} enabled
6686
+ * @throws {AppwriteException}
6687
+ * @returns {Promise}
6688
+ */
6689
+ createTelesignProvider(providerId, name, from, customerId, apiKey, enabled) {
6690
+ return __awaiter(this, void 0, void 0, function* () {
6691
+ if (typeof providerId === 'undefined') {
6692
+ throw new AppwriteException('Missing required parameter: "providerId"');
6693
+ }
6694
+ if (typeof name === 'undefined') {
6695
+ throw new AppwriteException('Missing required parameter: "name"');
6696
+ }
6697
+ const apiPath = '/messaging/providers/telesign';
6698
+ const payload = {};
6699
+ if (typeof providerId !== 'undefined') {
6700
+ payload['providerId'] = providerId;
6701
+ }
6702
+ if (typeof name !== 'undefined') {
6703
+ payload['name'] = name;
6704
+ }
6705
+ if (typeof from !== 'undefined') {
6706
+ payload['from'] = from;
6707
+ }
6708
+ if (typeof customerId !== 'undefined') {
6709
+ payload['customerId'] = customerId;
6710
+ }
6711
+ if (typeof apiKey !== 'undefined') {
6712
+ payload['apiKey'] = apiKey;
6713
+ }
6714
+ if (typeof enabled !== 'undefined') {
6715
+ payload['enabled'] = enabled;
6716
+ }
6717
+ const uri = new URL(this.client.config.endpoint + apiPath);
6718
+ return yield this.client.call('post', uri, {
6719
+ 'content-type': 'application/json',
6720
+ }, payload);
6721
+ });
6722
+ }
6723
+ /**
6724
+ * Update Telesign provider
6725
+ *
6726
+ *
6727
+ * @param {string} providerId
6728
+ * @param {string} name
6729
+ * @param {boolean} enabled
6730
+ * @param {string} customerId
6731
+ * @param {string} apiKey
6732
+ * @param {string} from
6733
+ * @throws {AppwriteException}
6734
+ * @returns {Promise}
6735
+ */
6736
+ updateTelesignProvider(providerId, name, enabled, customerId, apiKey, from) {
6737
+ return __awaiter(this, void 0, void 0, function* () {
6738
+ if (typeof providerId === 'undefined') {
6739
+ throw new AppwriteException('Missing required parameter: "providerId"');
6740
+ }
6741
+ const apiPath = '/messaging/providers/telesign/{providerId}'.replace('{providerId}', providerId);
6742
+ const payload = {};
6743
+ if (typeof name !== 'undefined') {
6744
+ payload['name'] = name;
6745
+ }
6746
+ if (typeof enabled !== 'undefined') {
6747
+ payload['enabled'] = enabled;
6748
+ }
6749
+ if (typeof customerId !== 'undefined') {
6750
+ payload['customerId'] = customerId;
6751
+ }
6752
+ if (typeof apiKey !== 'undefined') {
6753
+ payload['apiKey'] = apiKey;
6754
+ }
6755
+ if (typeof from !== 'undefined') {
6756
+ payload['from'] = from;
6757
+ }
6758
+ const uri = new URL(this.client.config.endpoint + apiPath);
6759
+ return yield this.client.call('patch', uri, {
6760
+ 'content-type': 'application/json',
6761
+ }, payload);
6762
+ });
6763
+ }
6764
+ /**
6765
+ * Create Textmagic provider
6766
+ *
6767
+ *
6768
+ * @param {string} providerId
6769
+ * @param {string} name
6770
+ * @param {string} from
6771
+ * @param {string} username
6772
+ * @param {string} apiKey
6773
+ * @param {boolean} enabled
6774
+ * @throws {AppwriteException}
6775
+ * @returns {Promise}
6776
+ */
6777
+ createTextmagicProvider(providerId, name, from, username, apiKey, enabled) {
6778
+ return __awaiter(this, void 0, void 0, function* () {
6779
+ if (typeof providerId === 'undefined') {
6780
+ throw new AppwriteException('Missing required parameter: "providerId"');
6781
+ }
6782
+ if (typeof name === 'undefined') {
6783
+ throw new AppwriteException('Missing required parameter: "name"');
6784
+ }
6785
+ const apiPath = '/messaging/providers/textmagic';
6786
+ const payload = {};
6787
+ if (typeof providerId !== 'undefined') {
6788
+ payload['providerId'] = providerId;
6789
+ }
6790
+ if (typeof name !== 'undefined') {
6791
+ payload['name'] = name;
6792
+ }
6793
+ if (typeof from !== 'undefined') {
6794
+ payload['from'] = from;
6795
+ }
6796
+ if (typeof username !== 'undefined') {
6797
+ payload['username'] = username;
6798
+ }
6799
+ if (typeof apiKey !== 'undefined') {
6800
+ payload['apiKey'] = apiKey;
6801
+ }
6802
+ if (typeof enabled !== 'undefined') {
6803
+ payload['enabled'] = enabled;
6804
+ }
6805
+ const uri = new URL(this.client.config.endpoint + apiPath);
6806
+ return yield this.client.call('post', uri, {
6807
+ 'content-type': 'application/json',
6808
+ }, payload);
6809
+ });
6810
+ }
6811
+ /**
6812
+ * Update Textmagic provider
6813
+ *
6814
+ *
6815
+ * @param {string} providerId
6816
+ * @param {string} name
6817
+ * @param {boolean} enabled
6818
+ * @param {string} username
6819
+ * @param {string} apiKey
6820
+ * @param {string} from
6821
+ * @throws {AppwriteException}
6822
+ * @returns {Promise}
6823
+ */
6824
+ updateTextmagicProvider(providerId, name, enabled, username, apiKey, from) {
6825
+ return __awaiter(this, void 0, void 0, function* () {
6826
+ if (typeof providerId === 'undefined') {
6827
+ throw new AppwriteException('Missing required parameter: "providerId"');
6828
+ }
6829
+ const apiPath = '/messaging/providers/textmagic/{providerId}'.replace('{providerId}', providerId);
6830
+ const payload = {};
6831
+ if (typeof name !== 'undefined') {
6832
+ payload['name'] = name;
6833
+ }
6834
+ if (typeof enabled !== 'undefined') {
6835
+ payload['enabled'] = enabled;
6836
+ }
6837
+ if (typeof username !== 'undefined') {
6838
+ payload['username'] = username;
6839
+ }
6840
+ if (typeof apiKey !== 'undefined') {
6841
+ payload['apiKey'] = apiKey;
6842
+ }
6843
+ if (typeof from !== 'undefined') {
6844
+ payload['from'] = from;
6845
+ }
6846
+ const uri = new URL(this.client.config.endpoint + apiPath);
6847
+ return yield this.client.call('patch', uri, {
6848
+ 'content-type': 'application/json',
6849
+ }, payload);
6850
+ });
6851
+ }
6852
+ /**
6853
+ * Create Twilio provider
6854
+ *
6855
+ *
6856
+ * @param {string} providerId
6857
+ * @param {string} name
6858
+ * @param {string} from
6859
+ * @param {string} accountSid
6860
+ * @param {string} authToken
6861
+ * @param {boolean} enabled
6862
+ * @throws {AppwriteException}
6863
+ * @returns {Promise}
6864
+ */
6865
+ createTwilioProvider(providerId, name, from, accountSid, authToken, enabled) {
6866
+ return __awaiter(this, void 0, void 0, function* () {
6867
+ if (typeof providerId === 'undefined') {
6868
+ throw new AppwriteException('Missing required parameter: "providerId"');
6869
+ }
6870
+ if (typeof name === 'undefined') {
6871
+ throw new AppwriteException('Missing required parameter: "name"');
6872
+ }
6873
+ const apiPath = '/messaging/providers/twilio';
6874
+ const payload = {};
6875
+ if (typeof providerId !== 'undefined') {
6876
+ payload['providerId'] = providerId;
6877
+ }
6878
+ if (typeof name !== 'undefined') {
6879
+ payload['name'] = name;
6880
+ }
6881
+ if (typeof from !== 'undefined') {
6882
+ payload['from'] = from;
6883
+ }
6884
+ if (typeof accountSid !== 'undefined') {
6885
+ payload['accountSid'] = accountSid;
6886
+ }
6887
+ if (typeof authToken !== 'undefined') {
6888
+ payload['authToken'] = authToken;
6889
+ }
6890
+ if (typeof enabled !== 'undefined') {
6891
+ payload['enabled'] = enabled;
6892
+ }
6893
+ const uri = new URL(this.client.config.endpoint + apiPath);
6894
+ return yield this.client.call('post', uri, {
6895
+ 'content-type': 'application/json',
6896
+ }, payload);
6897
+ });
6898
+ }
6899
+ /**
6900
+ * Update Twilio provider
6901
+ *
6902
+ *
6903
+ * @param {string} providerId
6904
+ * @param {string} name
6905
+ * @param {boolean} enabled
6906
+ * @param {string} accountSid
6907
+ * @param {string} authToken
6908
+ * @param {string} from
6909
+ * @throws {AppwriteException}
6910
+ * @returns {Promise}
6911
+ */
6912
+ updateTwilioProvider(providerId, name, enabled, accountSid, authToken, from) {
6913
+ return __awaiter(this, void 0, void 0, function* () {
6914
+ if (typeof providerId === 'undefined') {
6915
+ throw new AppwriteException('Missing required parameter: "providerId"');
6916
+ }
6917
+ const apiPath = '/messaging/providers/twilio/{providerId}'.replace('{providerId}', providerId);
6918
+ const payload = {};
6919
+ if (typeof name !== 'undefined') {
6920
+ payload['name'] = name;
6921
+ }
6922
+ if (typeof enabled !== 'undefined') {
6923
+ payload['enabled'] = enabled;
6924
+ }
6925
+ if (typeof accountSid !== 'undefined') {
6926
+ payload['accountSid'] = accountSid;
6927
+ }
6928
+ if (typeof authToken !== 'undefined') {
6929
+ payload['authToken'] = authToken;
6930
+ }
6931
+ if (typeof from !== 'undefined') {
6932
+ payload['from'] = from;
6933
+ }
6934
+ const uri = new URL(this.client.config.endpoint + apiPath);
6935
+ return yield this.client.call('patch', uri, {
6936
+ 'content-type': 'application/json',
6937
+ }, payload);
6938
+ });
6939
+ }
6940
+ /**
6941
+ * Create Vonage provider
6942
+ *
6943
+ *
6944
+ * @param {string} providerId
6945
+ * @param {string} name
6946
+ * @param {string} from
6947
+ * @param {string} apiKey
6948
+ * @param {string} apiSecret
6949
+ * @param {boolean} enabled
6950
+ * @throws {AppwriteException}
6951
+ * @returns {Promise}
6952
+ */
6953
+ createVonageProvider(providerId, name, from, apiKey, apiSecret, enabled) {
6954
+ return __awaiter(this, void 0, void 0, function* () {
6955
+ if (typeof providerId === 'undefined') {
6956
+ throw new AppwriteException('Missing required parameter: "providerId"');
6957
+ }
6958
+ if (typeof name === 'undefined') {
6959
+ throw new AppwriteException('Missing required parameter: "name"');
6960
+ }
6961
+ const apiPath = '/messaging/providers/vonage';
6962
+ const payload = {};
6963
+ if (typeof providerId !== 'undefined') {
6964
+ payload['providerId'] = providerId;
6965
+ }
6966
+ if (typeof name !== 'undefined') {
6967
+ payload['name'] = name;
6968
+ }
6969
+ if (typeof from !== 'undefined') {
6970
+ payload['from'] = from;
6971
+ }
6972
+ if (typeof apiKey !== 'undefined') {
6973
+ payload['apiKey'] = apiKey;
6974
+ }
6975
+ if (typeof apiSecret !== 'undefined') {
6976
+ payload['apiSecret'] = apiSecret;
6977
+ }
6978
+ if (typeof enabled !== 'undefined') {
6979
+ payload['enabled'] = enabled;
6980
+ }
6981
+ const uri = new URL(this.client.config.endpoint + apiPath);
6982
+ return yield this.client.call('post', uri, {
6983
+ 'content-type': 'application/json',
6984
+ }, payload);
6985
+ });
6986
+ }
6987
+ /**
6988
+ * Update Vonage provider
4826
6989
  *
4827
- * Get the number of logs that are waiting to be processed in the Appwrite
4828
- * internal queue server.
4829
6990
  *
4830
- * @param {number} threshold
6991
+ * @param {string} providerId
6992
+ * @param {string} name
6993
+ * @param {boolean} enabled
6994
+ * @param {string} apiKey
6995
+ * @param {string} apiSecret
6996
+ * @param {string} from
4831
6997
  * @throws {AppwriteException}
4832
6998
  * @returns {Promise}
4833
6999
  */
4834
- getQueueLogs(threshold) {
7000
+ updateVonageProvider(providerId, name, enabled, apiKey, apiSecret, from) {
4835
7001
  return __awaiter(this, void 0, void 0, function* () {
4836
- const apiPath = '/health/queue/logs';
7002
+ if (typeof providerId === 'undefined') {
7003
+ throw new AppwriteException('Missing required parameter: "providerId"');
7004
+ }
7005
+ const apiPath = '/messaging/providers/vonage/{providerId}'.replace('{providerId}', providerId);
4837
7006
  const payload = {};
4838
- if (typeof threshold !== 'undefined') {
4839
- payload['threshold'] = threshold;
7007
+ if (typeof name !== 'undefined') {
7008
+ payload['name'] = name;
7009
+ }
7010
+ if (typeof enabled !== 'undefined') {
7011
+ payload['enabled'] = enabled;
7012
+ }
7013
+ if (typeof apiKey !== 'undefined') {
7014
+ payload['apiKey'] = apiKey;
7015
+ }
7016
+ if (typeof apiSecret !== 'undefined') {
7017
+ payload['apiSecret'] = apiSecret;
7018
+ }
7019
+ if (typeof from !== 'undefined') {
7020
+ payload['from'] = from;
4840
7021
  }
4841
7022
  const uri = new URL(this.client.config.endpoint + apiPath);
4842
- return yield this.client.call('get', uri, {
7023
+ return yield this.client.call('patch', uri, {
4843
7024
  'content-type': 'application/json',
4844
7025
  }, payload);
4845
7026
  });
4846
7027
  }
4847
7028
  /**
4848
- * Get mails queue
7029
+ * Get provider
4849
7030
  *
4850
- * Get the number of mails that are waiting to be processed in the Appwrite
4851
- * internal queue server.
4852
7031
  *
4853
- * @param {number} threshold
7032
+ * @param {string} providerId
4854
7033
  * @throws {AppwriteException}
4855
7034
  * @returns {Promise}
4856
7035
  */
4857
- getQueueMails(threshold) {
7036
+ getProvider(providerId) {
4858
7037
  return __awaiter(this, void 0, void 0, function* () {
4859
- const apiPath = '/health/queue/mails';
4860
- const payload = {};
4861
- if (typeof threshold !== 'undefined') {
4862
- payload['threshold'] = threshold;
7038
+ if (typeof providerId === 'undefined') {
7039
+ throw new AppwriteException('Missing required parameter: "providerId"');
4863
7040
  }
7041
+ const apiPath = '/messaging/providers/{providerId}'.replace('{providerId}', providerId);
7042
+ const payload = {};
4864
7043
  const uri = new URL(this.client.config.endpoint + apiPath);
4865
7044
  return yield this.client.call('get', uri, {
4866
7045
  'content-type': 'application/json',
@@ -4868,44 +7047,44 @@ class Health extends Service {
4868
7047
  });
4869
7048
  }
4870
7049
  /**
4871
- * Get messaging queue
7050
+ * Delete provider
4872
7051
  *
4873
- * Get the number of messages that are waiting to be processed in the Appwrite
4874
- * internal queue server.
4875
7052
  *
4876
- * @param {number} threshold
7053
+ * @param {string} providerId
4877
7054
  * @throws {AppwriteException}
4878
7055
  * @returns {Promise}
4879
7056
  */
4880
- getQueueMessaging(threshold) {
7057
+ deleteProvider(providerId) {
4881
7058
  return __awaiter(this, void 0, void 0, function* () {
4882
- const apiPath = '/health/queue/messaging';
4883
- const payload = {};
4884
- if (typeof threshold !== 'undefined') {
4885
- payload['threshold'] = threshold;
7059
+ if (typeof providerId === 'undefined') {
7060
+ throw new AppwriteException('Missing required parameter: "providerId"');
4886
7061
  }
7062
+ const apiPath = '/messaging/providers/{providerId}'.replace('{providerId}', providerId);
7063
+ const payload = {};
4887
7064
  const uri = new URL(this.client.config.endpoint + apiPath);
4888
- return yield this.client.call('get', uri, {
7065
+ return yield this.client.call('delete', uri, {
4889
7066
  'content-type': 'application/json',
4890
7067
  }, payload);
4891
7068
  });
4892
7069
  }
4893
7070
  /**
4894
- * Get migrations queue
7071
+ * List provider logs
4895
7072
  *
4896
- * Get the number of migrations that are waiting to be processed in the
4897
- * Appwrite internal queue server.
4898
7073
  *
4899
- * @param {number} threshold
7074
+ * @param {string} providerId
7075
+ * @param {string[]} queries
4900
7076
  * @throws {AppwriteException}
4901
7077
  * @returns {Promise}
4902
7078
  */
4903
- getQueueMigrations(threshold) {
7079
+ listProviderLogs(providerId, queries) {
4904
7080
  return __awaiter(this, void 0, void 0, function* () {
4905
- const apiPath = '/health/queue/migrations';
7081
+ if (typeof providerId === 'undefined') {
7082
+ throw new AppwriteException('Missing required parameter: "providerId"');
7083
+ }
7084
+ const apiPath = '/messaging/providers/{providerId}/logs'.replace('{providerId}', providerId);
4906
7085
  const payload = {};
4907
- if (typeof threshold !== 'undefined') {
4908
- payload['threshold'] = threshold;
7086
+ if (typeof queries !== 'undefined') {
7087
+ payload['queries'] = queries;
4909
7088
  }
4910
7089
  const uri = new URL(this.client.config.endpoint + apiPath);
4911
7090
  return yield this.client.call('get', uri, {
@@ -4914,21 +7093,23 @@ class Health extends Service {
4914
7093
  });
4915
7094
  }
4916
7095
  /**
4917
- * Get webhooks queue
7096
+ * List subscriber logs
4918
7097
  *
4919
- * Get the number of webhooks that are waiting to be processed in the Appwrite
4920
- * internal queue server.
4921
7098
  *
4922
- * @param {number} threshold
7099
+ * @param {string} subscriberId
7100
+ * @param {string[]} queries
4923
7101
  * @throws {AppwriteException}
4924
7102
  * @returns {Promise}
4925
7103
  */
4926
- getQueueWebhooks(threshold) {
7104
+ listSubscriberLogs(subscriberId, queries) {
4927
7105
  return __awaiter(this, void 0, void 0, function* () {
4928
- const apiPath = '/health/queue/webhooks';
7106
+ if (typeof subscriberId === 'undefined') {
7107
+ throw new AppwriteException('Missing required parameter: "subscriberId"');
7108
+ }
7109
+ const apiPath = '/messaging/subscribers/{subscriberId}/logs'.replace('{subscriberId}', subscriberId);
4929
7110
  const payload = {};
4930
- if (typeof threshold !== 'undefined') {
4931
- payload['threshold'] = threshold;
7111
+ if (typeof queries !== 'undefined') {
7112
+ payload['queries'] = queries;
4932
7113
  }
4933
7114
  const uri = new URL(this.client.config.endpoint + apiPath);
4934
7115
  return yield this.client.call('get', uri, {
@@ -4937,17 +7118,24 @@ class Health extends Service {
4937
7118
  });
4938
7119
  }
4939
7120
  /**
4940
- * Get local storage
7121
+ * List topics.
4941
7122
  *
4942
- * Check the Appwrite local storage device is up and connection is successful.
4943
7123
  *
7124
+ * @param {string[]} queries
7125
+ * @param {string} search
4944
7126
  * @throws {AppwriteException}
4945
7127
  * @returns {Promise}
4946
7128
  */
4947
- getStorageLocal() {
7129
+ listTopics(queries, search) {
4948
7130
  return __awaiter(this, void 0, void 0, function* () {
4949
- const apiPath = '/health/storage/local';
7131
+ const apiPath = '/messaging/topics';
4950
7132
  const payload = {};
7133
+ if (typeof queries !== 'undefined') {
7134
+ payload['queries'] = queries;
7135
+ }
7136
+ if (typeof search !== 'undefined') {
7137
+ payload['search'] = search;
7138
+ }
4951
7139
  const uri = new URL(this.client.config.endpoint + apiPath);
4952
7140
  return yield this.client.call('get', uri, {
4953
7141
  'content-type': 'application/json',
@@ -4955,51 +7143,54 @@ class Health extends Service {
4955
7143
  });
4956
7144
  }
4957
7145
  /**
4958
- * Get time
7146
+ * Create a topic.
4959
7147
  *
4960
- * Check the Appwrite server time is synced with Google remote NTP server. We
4961
- * use this technology to smoothly handle leap seconds with no disruptive
4962
- * events. The [Network Time
4963
- * Protocol](https://en.wikipedia.org/wiki/Network_Time_Protocol) (NTP) is
4964
- * used by hundreds of millions of computers and devices to synchronize their
4965
- * clocks over the Internet. If your computer sets its own clock, it likely
4966
- * uses NTP.
4967
7148
  *
7149
+ * @param {string} topicId
7150
+ * @param {string} name
7151
+ * @param {string[]} subscribe
4968
7152
  * @throws {AppwriteException}
4969
7153
  * @returns {Promise}
4970
7154
  */
4971
- getTime() {
7155
+ createTopic(topicId, name, subscribe) {
4972
7156
  return __awaiter(this, void 0, void 0, function* () {
4973
- const apiPath = '/health/time';
7157
+ if (typeof topicId === 'undefined') {
7158
+ throw new AppwriteException('Missing required parameter: "topicId"');
7159
+ }
7160
+ if (typeof name === 'undefined') {
7161
+ throw new AppwriteException('Missing required parameter: "name"');
7162
+ }
7163
+ const apiPath = '/messaging/topics';
4974
7164
  const payload = {};
7165
+ if (typeof topicId !== 'undefined') {
7166
+ payload['topicId'] = topicId;
7167
+ }
7168
+ if (typeof name !== 'undefined') {
7169
+ payload['name'] = name;
7170
+ }
7171
+ if (typeof subscribe !== 'undefined') {
7172
+ payload['subscribe'] = subscribe;
7173
+ }
4975
7174
  const uri = new URL(this.client.config.endpoint + apiPath);
4976
- return yield this.client.call('get', uri, {
7175
+ return yield this.client.call('post', uri, {
4977
7176
  'content-type': 'application/json',
4978
7177
  }, payload);
4979
7178
  });
4980
7179
  }
4981
- }
4982
-
4983
- class Locale extends Service {
4984
- constructor(client) {
4985
- super(client);
4986
- }
4987
7180
  /**
4988
- * Get user locale
7181
+ * Get a topic.
4989
7182
  *
4990
- * Get the current user location based on IP. Returns an object with user
4991
- * country code, country name, continent name, continent code, ip address and
4992
- * suggested currency. You can use the locale header to get the data in a
4993
- * supported language.
4994
- *
4995
- * ([IP Geolocation by DB-IP](https://db-ip.com))
4996
7183
  *
7184
+ * @param {string} topicId
4997
7185
  * @throws {AppwriteException}
4998
7186
  * @returns {Promise}
4999
7187
  */
5000
- get() {
7188
+ getTopic(topicId) {
5001
7189
  return __awaiter(this, void 0, void 0, function* () {
5002
- const apiPath = '/locale';
7190
+ if (typeof topicId === 'undefined') {
7191
+ throw new AppwriteException('Missing required parameter: "topicId"');
7192
+ }
7193
+ const apiPath = '/messaging/topics/{topicId}'.replace('{topicId}', topicId);
5003
7194
  const payload = {};
5004
7195
  const uri = new URL(this.client.config.endpoint + apiPath);
5005
7196
  return yield this.client.call('get', uri, {
@@ -5008,56 +7199,70 @@ class Locale extends Service {
5008
7199
  });
5009
7200
  }
5010
7201
  /**
5011
- * List Locale Codes
7202
+ * Update a topic.
5012
7203
  *
5013
- * List of all locale codes in [ISO
5014
- * 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes).
5015
7204
  *
7205
+ * @param {string} topicId
7206
+ * @param {string} name
5016
7207
  * @throws {AppwriteException}
5017
7208
  * @returns {Promise}
5018
7209
  */
5019
- listCodes() {
7210
+ updateTopic(topicId, name) {
5020
7211
  return __awaiter(this, void 0, void 0, function* () {
5021
- const apiPath = '/locale/codes';
7212
+ if (typeof topicId === 'undefined') {
7213
+ throw new AppwriteException('Missing required parameter: "topicId"');
7214
+ }
7215
+ const apiPath = '/messaging/topics/{topicId}'.replace('{topicId}', topicId);
5022
7216
  const payload = {};
7217
+ if (typeof name !== 'undefined') {
7218
+ payload['name'] = name;
7219
+ }
5023
7220
  const uri = new URL(this.client.config.endpoint + apiPath);
5024
- return yield this.client.call('get', uri, {
7221
+ return yield this.client.call('patch', uri, {
5025
7222
  'content-type': 'application/json',
5026
7223
  }, payload);
5027
7224
  });
5028
7225
  }
5029
7226
  /**
5030
- * List continents
7227
+ * Delete a topic.
5031
7228
  *
5032
- * List of all continents. You can use the locale header to get the data in a
5033
- * supported language.
5034
7229
  *
7230
+ * @param {string} topicId
5035
7231
  * @throws {AppwriteException}
5036
7232
  * @returns {Promise}
5037
7233
  */
5038
- listContinents() {
7234
+ deleteTopic(topicId) {
5039
7235
  return __awaiter(this, void 0, void 0, function* () {
5040
- const apiPath = '/locale/continents';
7236
+ if (typeof topicId === 'undefined') {
7237
+ throw new AppwriteException('Missing required parameter: "topicId"');
7238
+ }
7239
+ const apiPath = '/messaging/topics/{topicId}'.replace('{topicId}', topicId);
5041
7240
  const payload = {};
5042
7241
  const uri = new URL(this.client.config.endpoint + apiPath);
5043
- return yield this.client.call('get', uri, {
7242
+ return yield this.client.call('delete', uri, {
5044
7243
  'content-type': 'application/json',
5045
7244
  }, payload);
5046
7245
  });
5047
7246
  }
5048
7247
  /**
5049
- * List countries
7248
+ * List topic logs
5050
7249
  *
5051
- * List of all countries. You can use the locale header to get the data in a
5052
- * supported language.
5053
7250
  *
7251
+ * @param {string} topicId
7252
+ * @param {string[]} queries
5054
7253
  * @throws {AppwriteException}
5055
7254
  * @returns {Promise}
5056
7255
  */
5057
- listCountries() {
7256
+ listTopicLogs(topicId, queries) {
5058
7257
  return __awaiter(this, void 0, void 0, function* () {
5059
- const apiPath = '/locale/countries';
7258
+ if (typeof topicId === 'undefined') {
7259
+ throw new AppwriteException('Missing required parameter: "topicId"');
7260
+ }
7261
+ const apiPath = '/messaging/topics/{topicId}/logs'.replace('{topicId}', topicId);
5060
7262
  const payload = {};
7263
+ if (typeof queries !== 'undefined') {
7264
+ payload['queries'] = queries;
7265
+ }
5061
7266
  const uri = new URL(this.client.config.endpoint + apiPath);
5062
7267
  return yield this.client.call('get', uri, {
5063
7268
  'content-type': 'application/json',
@@ -5065,18 +7270,28 @@ class Locale extends Service {
5065
7270
  });
5066
7271
  }
5067
7272
  /**
5068
- * List EU countries
7273
+ * List subscribers.
5069
7274
  *
5070
- * List of all countries that are currently members of the EU. You can use the
5071
- * locale header to get the data in a supported language.
5072
7275
  *
7276
+ * @param {string} topicId
7277
+ * @param {string[]} queries
7278
+ * @param {string} search
5073
7279
  * @throws {AppwriteException}
5074
7280
  * @returns {Promise}
5075
7281
  */
5076
- listCountriesEU() {
7282
+ listSubscribers(topicId, queries, search) {
5077
7283
  return __awaiter(this, void 0, void 0, function* () {
5078
- const apiPath = '/locale/countries/eu';
7284
+ if (typeof topicId === 'undefined') {
7285
+ throw new AppwriteException('Missing required parameter: "topicId"');
7286
+ }
7287
+ const apiPath = '/messaging/topics/{topicId}/subscribers'.replace('{topicId}', topicId);
5079
7288
  const payload = {};
7289
+ if (typeof queries !== 'undefined') {
7290
+ payload['queries'] = queries;
7291
+ }
7292
+ if (typeof search !== 'undefined') {
7293
+ payload['search'] = search;
7294
+ }
5080
7295
  const uri = new URL(this.client.config.endpoint + apiPath);
5081
7296
  return yield this.client.call('get', uri, {
5082
7297
  'content-type': 'application/json',
@@ -5084,37 +7299,58 @@ class Locale extends Service {
5084
7299
  });
5085
7300
  }
5086
7301
  /**
5087
- * List countries phone codes
7302
+ * Create a subscriber.
5088
7303
  *
5089
- * List of all countries phone codes. You can use the locale header to get the
5090
- * data in a supported language.
5091
7304
  *
7305
+ * @param {string} topicId
7306
+ * @param {string} subscriberId
7307
+ * @param {string} targetId
5092
7308
  * @throws {AppwriteException}
5093
7309
  * @returns {Promise}
5094
7310
  */
5095
- listCountriesPhones() {
7311
+ createSubscriber(topicId, subscriberId, targetId) {
5096
7312
  return __awaiter(this, void 0, void 0, function* () {
5097
- const apiPath = '/locale/countries/phones';
7313
+ if (typeof topicId === 'undefined') {
7314
+ throw new AppwriteException('Missing required parameter: "topicId"');
7315
+ }
7316
+ if (typeof subscriberId === 'undefined') {
7317
+ throw new AppwriteException('Missing required parameter: "subscriberId"');
7318
+ }
7319
+ if (typeof targetId === 'undefined') {
7320
+ throw new AppwriteException('Missing required parameter: "targetId"');
7321
+ }
7322
+ const apiPath = '/messaging/topics/{topicId}/subscribers'.replace('{topicId}', topicId);
5098
7323
  const payload = {};
7324
+ if (typeof subscriberId !== 'undefined') {
7325
+ payload['subscriberId'] = subscriberId;
7326
+ }
7327
+ if (typeof targetId !== 'undefined') {
7328
+ payload['targetId'] = targetId;
7329
+ }
5099
7330
  const uri = new URL(this.client.config.endpoint + apiPath);
5100
- return yield this.client.call('get', uri, {
7331
+ return yield this.client.call('post', uri, {
5101
7332
  'content-type': 'application/json',
5102
7333
  }, payload);
5103
7334
  });
5104
7335
  }
5105
7336
  /**
5106
- * List currencies
7337
+ * Get a subscriber.
5107
7338
  *
5108
- * List of all currencies, including currency symbol, name, plural, and
5109
- * decimal digits for all major and minor currencies. You can use the locale
5110
- * header to get the data in a supported language.
5111
7339
  *
7340
+ * @param {string} topicId
7341
+ * @param {string} subscriberId
5112
7342
  * @throws {AppwriteException}
5113
7343
  * @returns {Promise}
5114
7344
  */
5115
- listCurrencies() {
7345
+ getSubscriber(topicId, subscriberId) {
5116
7346
  return __awaiter(this, void 0, void 0, function* () {
5117
- const apiPath = '/locale/currencies';
7347
+ if (typeof topicId === 'undefined') {
7348
+ throw new AppwriteException('Missing required parameter: "topicId"');
7349
+ }
7350
+ if (typeof subscriberId === 'undefined') {
7351
+ throw new AppwriteException('Missing required parameter: "subscriberId"');
7352
+ }
7353
+ const apiPath = '/messaging/topics/{topicId}/subscribers/{subscriberId}'.replace('{topicId}', topicId).replace('{subscriberId}', subscriberId);
5118
7354
  const payload = {};
5119
7355
  const uri = new URL(this.client.config.endpoint + apiPath);
5120
7356
  return yield this.client.call('get', uri, {
@@ -5123,20 +7359,26 @@ class Locale extends Service {
5123
7359
  });
5124
7360
  }
5125
7361
  /**
5126
- * List languages
7362
+ * Delete a subscriber.
5127
7363
  *
5128
- * List of all languages classified by ISO 639-1 including 2-letter code, name
5129
- * in English, and name in the respective language.
5130
7364
  *
7365
+ * @param {string} topicId
7366
+ * @param {string} subscriberId
5131
7367
  * @throws {AppwriteException}
5132
7368
  * @returns {Promise}
5133
7369
  */
5134
- listLanguages() {
7370
+ deleteSubscriber(topicId, subscriberId) {
5135
7371
  return __awaiter(this, void 0, void 0, function* () {
5136
- const apiPath = '/locale/languages';
7372
+ if (typeof topicId === 'undefined') {
7373
+ throw new AppwriteException('Missing required parameter: "topicId"');
7374
+ }
7375
+ if (typeof subscriberId === 'undefined') {
7376
+ throw new AppwriteException('Missing required parameter: "subscriberId"');
7377
+ }
7378
+ const apiPath = '/messaging/topics/{topicId}/subscribers/{subscriberId}'.replace('{topicId}', topicId).replace('{subscriberId}', subscriberId);
5137
7379
  const payload = {};
5138
7380
  const uri = new URL(this.client.config.endpoint + apiPath);
5139
- return yield this.client.call('get', uri, {
7381
+ return yield this.client.call('delete', uri, {
5140
7382
  'content-type': 'application/json',
5141
7383
  }, payload);
5142
7384
  });
@@ -5151,7 +7393,7 @@ class Migrations extends Service {
5151
7393
  * List Migrations
5152
7394
  *
5153
7395
  *
5154
- * @param {string} queries
7396
+ * @param {string[]} queries
5155
7397
  * @param {string} search
5156
7398
  * @throws {AppwriteException}
5157
7399
  * @returns {Promise}
@@ -5761,7 +8003,7 @@ class Project extends Service {
5761
8003
  *
5762
8004
  * @param {string} startDate
5763
8005
  * @param {string} endDate
5764
- * @param {string} period
8006
+ * @param {ProjectUsageRange} period
5765
8007
  * @throws {AppwriteException}
5766
8008
  * @returns {Promise}
5767
8009
  */
@@ -5958,7 +8200,7 @@ class Projects extends Service {
5958
8200
  * @param {string} projectId
5959
8201
  * @param {string} name
5960
8202
  * @param {string} teamId
5961
- * @param {string} region
8203
+ * @param {Region} region
5962
8204
  * @param {string} description
5963
8205
  * @param {string} logo
5964
8206
  * @param {string} url
@@ -6308,7 +8550,7 @@ class Projects extends Service {
6308
8550
  *
6309
8551
  *
6310
8552
  * @param {string} projectId
6311
- * @param {string} method
8553
+ * @param {AuthMethod} method
6312
8554
  * @param {boolean} status
6313
8555
  * @throws {AppwriteException}
6314
8556
  * @returns {Promise}
@@ -6493,7 +8735,7 @@ class Projects extends Service {
6493
8735
  *
6494
8736
  *
6495
8737
  * @param {string} projectId
6496
- * @param {string} provider
8738
+ * @param {OAuthProvider} provider
6497
8739
  * @param {string} appId
6498
8740
  * @param {string} secret
6499
8741
  * @param {boolean} enabled
@@ -6554,7 +8796,7 @@ class Projects extends Service {
6554
8796
  *
6555
8797
  *
6556
8798
  * @param {string} projectId
6557
- * @param {string} type
8799
+ * @param {PlatformType} type
6558
8800
  * @param {string} name
6559
8801
  * @param {string} key
6560
8802
  * @param {string} store
@@ -6695,7 +8937,7 @@ class Projects extends Service {
6695
8937
  *
6696
8938
  *
6697
8939
  * @param {string} projectId
6698
- * @param {string} service
8940
+ * @param {APIService} service
6699
8941
  * @param {boolean} status
6700
8942
  * @throws {AppwriteException}
6701
8943
  * @returns {Promise}
@@ -6754,7 +8996,7 @@ class Projects extends Service {
6754
8996
  });
6755
8997
  }
6756
8998
  /**
6757
- * Update SMTP configuration
8999
+ * Update SMTP
6758
9000
  *
6759
9001
  *
6760
9002
  * @param {string} projectId
@@ -6766,11 +9008,11 @@ class Projects extends Service {
6766
9008
  * @param {number} port
6767
9009
  * @param {string} username
6768
9010
  * @param {string} password
6769
- * @param {string} secure
9011
+ * @param {SMTPSecure} secure
6770
9012
  * @throws {AppwriteException}
6771
9013
  * @returns {Promise}
6772
9014
  */
6773
- updateSmtpConfiguration(projectId, enabled, senderName, senderEmail, replyTo, host, port, username, password, secure) {
9015
+ updateSmtp(projectId, enabled, senderName, senderEmail, replyTo, host, port, username, password, secure) {
6774
9016
  return __awaiter(this, void 0, void 0, function* () {
6775
9017
  if (typeof projectId === 'undefined') {
6776
9018
  throw new AppwriteException('Missing required parameter: "projectId"');
@@ -6813,6 +9055,75 @@ class Projects extends Service {
6813
9055
  }, payload);
6814
9056
  });
6815
9057
  }
9058
+ /**
9059
+ * Create SMTP test
9060
+ *
9061
+ *
9062
+ * @param {string} projectId
9063
+ * @param {string[]} emails
9064
+ * @param {string} senderName
9065
+ * @param {string} senderEmail
9066
+ * @param {string} host
9067
+ * @param {string} replyTo
9068
+ * @param {number} port
9069
+ * @param {string} username
9070
+ * @param {string} password
9071
+ * @param {SMTPSecure} secure
9072
+ * @throws {AppwriteException}
9073
+ * @returns {Promise}
9074
+ */
9075
+ createSmtpTest(projectId, emails, senderName, senderEmail, host, replyTo, port, username, password, secure) {
9076
+ return __awaiter(this, void 0, void 0, function* () {
9077
+ if (typeof projectId === 'undefined') {
9078
+ throw new AppwriteException('Missing required parameter: "projectId"');
9079
+ }
9080
+ if (typeof emails === 'undefined') {
9081
+ throw new AppwriteException('Missing required parameter: "emails"');
9082
+ }
9083
+ if (typeof senderName === 'undefined') {
9084
+ throw new AppwriteException('Missing required parameter: "senderName"');
9085
+ }
9086
+ if (typeof senderEmail === 'undefined') {
9087
+ throw new AppwriteException('Missing required parameter: "senderEmail"');
9088
+ }
9089
+ if (typeof host === 'undefined') {
9090
+ throw new AppwriteException('Missing required parameter: "host"');
9091
+ }
9092
+ const apiPath = '/projects/{projectId}/smtp/tests'.replace('{projectId}', projectId);
9093
+ const payload = {};
9094
+ if (typeof emails !== 'undefined') {
9095
+ payload['emails'] = emails;
9096
+ }
9097
+ if (typeof senderName !== 'undefined') {
9098
+ payload['senderName'] = senderName;
9099
+ }
9100
+ if (typeof senderEmail !== 'undefined') {
9101
+ payload['senderEmail'] = senderEmail;
9102
+ }
9103
+ if (typeof replyTo !== 'undefined') {
9104
+ payload['replyTo'] = replyTo;
9105
+ }
9106
+ if (typeof host !== 'undefined') {
9107
+ payload['host'] = host;
9108
+ }
9109
+ if (typeof port !== 'undefined') {
9110
+ payload['port'] = port;
9111
+ }
9112
+ if (typeof username !== 'undefined') {
9113
+ payload['username'] = username;
9114
+ }
9115
+ if (typeof password !== 'undefined') {
9116
+ payload['password'] = password;
9117
+ }
9118
+ if (typeof secure !== 'undefined') {
9119
+ payload['secure'] = secure;
9120
+ }
9121
+ const uri = new URL(this.client.config.endpoint + apiPath);
9122
+ return yield this.client.call('post', uri, {
9123
+ 'content-type': 'application/json',
9124
+ }, payload);
9125
+ });
9126
+ }
6816
9127
  /**
6817
9128
  * Update Project Team
6818
9129
  *
@@ -6846,8 +9157,8 @@ class Projects extends Service {
6846
9157
  *
6847
9158
  *
6848
9159
  * @param {string} projectId
6849
- * @param {string} type
6850
- * @param {string} locale
9160
+ * @param {EmailTemplateType} type
9161
+ * @param {EmailTemplateLocale} locale
6851
9162
  * @throws {AppwriteException}
6852
9163
  * @returns {Promise}
6853
9164
  */
@@ -6875,8 +9186,8 @@ class Projects extends Service {
6875
9186
  *
6876
9187
  *
6877
9188
  * @param {string} projectId
6878
- * @param {string} type
6879
- * @param {string} locale
9189
+ * @param {EmailTemplateType} type
9190
+ * @param {EmailTemplateLocale} locale
6880
9191
  * @param {string} subject
6881
9192
  * @param {string} message
6882
9193
  * @param {string} senderName
@@ -6930,8 +9241,8 @@ class Projects extends Service {
6930
9241
  *
6931
9242
  *
6932
9243
  * @param {string} projectId
6933
- * @param {string} type
6934
- * @param {string} locale
9244
+ * @param {EmailTemplateType} type
9245
+ * @param {EmailTemplateLocale} locale
6935
9246
  * @throws {AppwriteException}
6936
9247
  * @returns {Promise}
6937
9248
  */
@@ -6959,8 +9270,8 @@ class Projects extends Service {
6959
9270
  *
6960
9271
  *
6961
9272
  * @param {string} projectId
6962
- * @param {string} type
6963
- * @param {string} locale
9273
+ * @param {SMSTemplateType} type
9274
+ * @param {SMSTemplateLocale} locale
6964
9275
  * @throws {AppwriteException}
6965
9276
  * @returns {Promise}
6966
9277
  */
@@ -6988,8 +9299,8 @@ class Projects extends Service {
6988
9299
  *
6989
9300
  *
6990
9301
  * @param {string} projectId
6991
- * @param {string} type
6992
- * @param {string} locale
9302
+ * @param {SMSTemplateType} type
9303
+ * @param {SMSTemplateLocale} locale
6993
9304
  * @param {string} message
6994
9305
  * @throws {AppwriteException}
6995
9306
  * @returns {Promise}
@@ -7024,8 +9335,8 @@ class Projects extends Service {
7024
9335
  *
7025
9336
  *
7026
9337
  * @param {string} projectId
7027
- * @param {string} type
7028
- * @param {string} locale
9338
+ * @param {SMSTemplateType} type
9339
+ * @param {SMSTemplateLocale} locale
7029
9340
  * @throws {AppwriteException}
7030
9341
  * @returns {Promise}
7031
9342
  */
@@ -7078,12 +9389,13 @@ class Projects extends Service {
7078
9389
  * @param {string[]} events
7079
9390
  * @param {string} url
7080
9391
  * @param {boolean} security
9392
+ * @param {boolean} enabled
7081
9393
  * @param {string} httpUser
7082
9394
  * @param {string} httpPass
7083
9395
  * @throws {AppwriteException}
7084
9396
  * @returns {Promise}
7085
9397
  */
7086
- createWebhook(projectId, name, events, url, security, httpUser, httpPass) {
9398
+ createWebhook(projectId, name, events, url, security, enabled, httpUser, httpPass) {
7087
9399
  return __awaiter(this, void 0, void 0, function* () {
7088
9400
  if (typeof projectId === 'undefined') {
7089
9401
  throw new AppwriteException('Missing required parameter: "projectId"');
@@ -7105,6 +9417,9 @@ class Projects extends Service {
7105
9417
  if (typeof name !== 'undefined') {
7106
9418
  payload['name'] = name;
7107
9419
  }
9420
+ if (typeof enabled !== 'undefined') {
9421
+ payload['enabled'] = enabled;
9422
+ }
7108
9423
  if (typeof events !== 'undefined') {
7109
9424
  payload['events'] = events;
7110
9425
  }
@@ -7161,12 +9476,13 @@ class Projects extends Service {
7161
9476
  * @param {string[]} events
7162
9477
  * @param {string} url
7163
9478
  * @param {boolean} security
9479
+ * @param {boolean} enabled
7164
9480
  * @param {string} httpUser
7165
9481
  * @param {string} httpPass
7166
9482
  * @throws {AppwriteException}
7167
9483
  * @returns {Promise}
7168
9484
  */
7169
- updateWebhook(projectId, webhookId, name, events, url, security, httpUser, httpPass) {
9485
+ updateWebhook(projectId, webhookId, name, events, url, security, enabled, httpUser, httpPass) {
7170
9486
  return __awaiter(this, void 0, void 0, function* () {
7171
9487
  if (typeof projectId === 'undefined') {
7172
9488
  throw new AppwriteException('Missing required parameter: "projectId"');
@@ -7191,6 +9507,9 @@ class Projects extends Service {
7191
9507
  if (typeof name !== 'undefined') {
7192
9508
  payload['name'] = name;
7193
9509
  }
9510
+ if (typeof enabled !== 'undefined') {
9511
+ payload['enabled'] = enabled;
9512
+ }
7194
9513
  if (typeof events !== 'undefined') {
7195
9514
  payload['events'] = events;
7196
9515
  }
@@ -7301,7 +9620,7 @@ class Proxy extends Service {
7301
9620
  * Create a new proxy rule.
7302
9621
  *
7303
9622
  * @param {string} domain
7304
- * @param {string} resourceType
9623
+ * @param {ResourceType} resourceType
7305
9624
  * @param {string} resourceId
7306
9625
  * @throws {AppwriteException}
7307
9626
  * @returns {Promise}
@@ -7441,7 +9760,7 @@ class Storage extends Service {
7441
9760
  * @param {boolean} enabled
7442
9761
  * @param {number} maximumFileSize
7443
9762
  * @param {string[]} allowedFileExtensions
7444
- * @param {string} compression
9763
+ * @param {Compression} compression
7445
9764
  * @param {boolean} encryption
7446
9765
  * @param {boolean} antivirus
7447
9766
  * @throws {AppwriteException}
@@ -7528,7 +9847,7 @@ class Storage extends Service {
7528
9847
  * @param {boolean} enabled
7529
9848
  * @param {number} maximumFileSize
7530
9849
  * @param {string[]} allowedFileExtensions
7531
- * @param {string} compression
9850
+ * @param {Compression} compression
7532
9851
  * @param {boolean} encryption
7533
9852
  * @param {boolean} antivirus
7534
9853
  * @throws {AppwriteException}
@@ -7857,7 +10176,7 @@ class Storage extends Service {
7857
10176
  * @param {string} fileId
7858
10177
  * @param {number} width
7859
10178
  * @param {number} height
7860
- * @param {string} gravity
10179
+ * @param {ImageGravity} gravity
7861
10180
  * @param {number} quality
7862
10181
  * @param {number} borderWidth
7863
10182
  * @param {string} borderColor
@@ -7865,7 +10184,7 @@ class Storage extends Service {
7865
10184
  * @param {number} opacity
7866
10185
  * @param {number} rotation
7867
10186
  * @param {string} background
7868
- * @param {string} output
10187
+ * @param {ImageFormat} output
7869
10188
  * @throws {AppwriteException}
7870
10189
  * @returns {URL}
7871
10190
  */
@@ -7950,7 +10269,7 @@ class Storage extends Service {
7950
10269
  * Get usage stats for storage
7951
10270
  *
7952
10271
  *
7953
- * @param {string} range
10272
+ * @param {StorageUsageRange} range
7954
10273
  * @throws {AppwriteException}
7955
10274
  * @returns {Promise}
7956
10275
  */
@@ -7972,7 +10291,7 @@ class Storage extends Service {
7972
10291
  *
7973
10292
  *
7974
10293
  * @param {string} bucketId
7975
- * @param {string} range
10294
+ * @param {StorageUsageRange} range
7976
10295
  * @throws {AppwriteException}
7977
10296
  * @returns {Promise}
7978
10297
  */
@@ -8626,7 +10945,7 @@ class Users extends Service {
8626
10945
  *
8627
10946
  * Get identities for all users.
8628
10947
  *
8629
- * @param {string} queries
10948
+ * @param {string[]} queries
8630
10949
  * @param {string} search
8631
10950
  * @throws {AppwriteException}
8632
10951
  * @returns {Promise}
@@ -8648,7 +10967,7 @@ class Users extends Service {
8648
10967
  });
8649
10968
  }
8650
10969
  /**
8651
- * Delete Identity
10970
+ * Delete identity
8652
10971
  *
8653
10972
  * Delete an identity by its unique ID.
8654
10973
  *
@@ -8921,7 +11240,7 @@ class Users extends Service {
8921
11240
  * @param {string} userId
8922
11241
  * @param {string} email
8923
11242
  * @param {string} password
8924
- * @param {string} passwordVersion
11243
+ * @param {PasswordHash} passwordVersion
8925
11244
  * @param {string} name
8926
11245
  * @throws {AppwriteException}
8927
11246
  * @returns {Promise}
@@ -8964,7 +11283,7 @@ class Users extends Service {
8964
11283
  * Get usage stats for the users API
8965
11284
  *
8966
11285
  *
8967
- * @param {string} range
11286
+ * @param {UserUsageRange} range
8968
11287
  * @throws {AppwriteException}
8969
11288
  * @returns {Promise}
8970
11289
  */
@@ -9141,6 +11460,87 @@ class Users extends Service {
9141
11460
  }, payload);
9142
11461
  });
9143
11462
  }
11463
+ /**
11464
+ * Update MFA
11465
+ *
11466
+ *
11467
+ * @param {string} userId
11468
+ * @param {boolean} mfa
11469
+ * @throws {AppwriteException}
11470
+ * @returns {Promise}
11471
+ */
11472
+ updateMfa(userId, mfa) {
11473
+ return __awaiter(this, void 0, void 0, function* () {
11474
+ if (typeof userId === 'undefined') {
11475
+ throw new AppwriteException('Missing required parameter: "userId"');
11476
+ }
11477
+ if (typeof mfa === 'undefined') {
11478
+ throw new AppwriteException('Missing required parameter: "mfa"');
11479
+ }
11480
+ const apiPath = '/users/{userId}/mfa'.replace('{userId}', userId);
11481
+ const payload = {};
11482
+ if (typeof mfa !== 'undefined') {
11483
+ payload['mfa'] = mfa;
11484
+ }
11485
+ const uri = new URL(this.client.config.endpoint + apiPath);
11486
+ return yield this.client.call('patch', uri, {
11487
+ 'content-type': 'application/json',
11488
+ }, payload);
11489
+ });
11490
+ }
11491
+ /**
11492
+ * List Factors
11493
+ *
11494
+ *
11495
+ * @param {string} userId
11496
+ * @throws {AppwriteException}
11497
+ * @returns {Promise}
11498
+ */
11499
+ listFactors(userId) {
11500
+ return __awaiter(this, void 0, void 0, function* () {
11501
+ if (typeof userId === 'undefined') {
11502
+ throw new AppwriteException('Missing required parameter: "userId"');
11503
+ }
11504
+ const apiPath = '/users/{userId}/mfa/factors'.replace('{userId}', userId);
11505
+ const payload = {};
11506
+ const uri = new URL(this.client.config.endpoint + apiPath);
11507
+ return yield this.client.call('get', uri, {
11508
+ 'content-type': 'application/json',
11509
+ }, payload);
11510
+ });
11511
+ }
11512
+ /**
11513
+ * Delete Authenticator
11514
+ *
11515
+ *
11516
+ * @param {string} userId
11517
+ * @param {Type} type
11518
+ * @param {string} otp
11519
+ * @throws {AppwriteException}
11520
+ * @returns {Promise}
11521
+ */
11522
+ deleteAuthenticator(userId, type, otp) {
11523
+ return __awaiter(this, void 0, void 0, function* () {
11524
+ if (typeof userId === 'undefined') {
11525
+ throw new AppwriteException('Missing required parameter: "userId"');
11526
+ }
11527
+ if (typeof type === 'undefined') {
11528
+ throw new AppwriteException('Missing required parameter: "type"');
11529
+ }
11530
+ if (typeof otp === 'undefined') {
11531
+ throw new AppwriteException('Missing required parameter: "otp"');
11532
+ }
11533
+ const apiPath = '/users/{userId}/mfa/{type}'.replace('{userId}', userId).replace('{type}', type);
11534
+ const payload = {};
11535
+ if (typeof otp !== 'undefined') {
11536
+ payload['otp'] = otp;
11537
+ }
11538
+ const uri = new URL(this.client.config.endpoint + apiPath);
11539
+ return yield this.client.call('delete', uri, {
11540
+ 'content-type': 'application/json',
11541
+ }, payload);
11542
+ });
11543
+ }
9144
11544
  /**
9145
11545
  * Update name
9146
11546
  *
@@ -9303,6 +11703,33 @@ class Users extends Service {
9303
11703
  }, payload);
9304
11704
  });
9305
11705
  }
11706
+ /**
11707
+ * Create session
11708
+ *
11709
+ * Creates a session for a user. Returns an immediately usable session object.
11710
+ *
11711
+ * If you want to generate a token for a custom authentication flow, use the
11712
+ * [POST
11713
+ * /users/{userId}/tokens](https://appwrite.io/docs/server/users#createToken)
11714
+ * endpoint.
11715
+ *
11716
+ * @param {string} userId
11717
+ * @throws {AppwriteException}
11718
+ * @returns {Promise}
11719
+ */
11720
+ createSession(userId) {
11721
+ return __awaiter(this, void 0, void 0, function* () {
11722
+ if (typeof userId === 'undefined') {
11723
+ throw new AppwriteException('Missing required parameter: "userId"');
11724
+ }
11725
+ const apiPath = '/users/{userId}/sessions'.replace('{userId}', userId);
11726
+ const payload = {};
11727
+ const uri = new URL(this.client.config.endpoint + apiPath);
11728
+ return yield this.client.call('post', uri, {
11729
+ 'content-type': 'application/json',
11730
+ }, payload);
11731
+ });
11732
+ }
9306
11733
  /**
9307
11734
  * Delete user sessions
9308
11735
  *
@@ -9381,6 +11808,202 @@ class Users extends Service {
9381
11808
  }, payload);
9382
11809
  });
9383
11810
  }
11811
+ /**
11812
+ * List User Targets
11813
+ *
11814
+ *
11815
+ * @param {string} userId
11816
+ * @param {string[]} queries
11817
+ * @throws {AppwriteException}
11818
+ * @returns {Promise}
11819
+ */
11820
+ listTargets(userId, queries) {
11821
+ return __awaiter(this, void 0, void 0, function* () {
11822
+ if (typeof userId === 'undefined') {
11823
+ throw new AppwriteException('Missing required parameter: "userId"');
11824
+ }
11825
+ const apiPath = '/users/{userId}/targets'.replace('{userId}', userId);
11826
+ const payload = {};
11827
+ if (typeof queries !== 'undefined') {
11828
+ payload['queries'] = queries;
11829
+ }
11830
+ const uri = new URL(this.client.config.endpoint + apiPath);
11831
+ return yield this.client.call('get', uri, {
11832
+ 'content-type': 'application/json',
11833
+ }, payload);
11834
+ });
11835
+ }
11836
+ /**
11837
+ * Create User Target
11838
+ *
11839
+ *
11840
+ * @param {string} userId
11841
+ * @param {string} targetId
11842
+ * @param {MessagingProviderType} providerType
11843
+ * @param {string} identifier
11844
+ * @param {string} providerId
11845
+ * @param {string} name
11846
+ * @throws {AppwriteException}
11847
+ * @returns {Promise}
11848
+ */
11849
+ createTarget(userId, targetId, providerType, identifier, providerId, name) {
11850
+ return __awaiter(this, void 0, void 0, function* () {
11851
+ if (typeof userId === 'undefined') {
11852
+ throw new AppwriteException('Missing required parameter: "userId"');
11853
+ }
11854
+ if (typeof targetId === 'undefined') {
11855
+ throw new AppwriteException('Missing required parameter: "targetId"');
11856
+ }
11857
+ if (typeof providerType === 'undefined') {
11858
+ throw new AppwriteException('Missing required parameter: "providerType"');
11859
+ }
11860
+ if (typeof identifier === 'undefined') {
11861
+ throw new AppwriteException('Missing required parameter: "identifier"');
11862
+ }
11863
+ const apiPath = '/users/{userId}/targets'.replace('{userId}', userId);
11864
+ const payload = {};
11865
+ if (typeof targetId !== 'undefined') {
11866
+ payload['targetId'] = targetId;
11867
+ }
11868
+ if (typeof providerType !== 'undefined') {
11869
+ payload['providerType'] = providerType;
11870
+ }
11871
+ if (typeof identifier !== 'undefined') {
11872
+ payload['identifier'] = identifier;
11873
+ }
11874
+ if (typeof providerId !== 'undefined') {
11875
+ payload['providerId'] = providerId;
11876
+ }
11877
+ if (typeof name !== 'undefined') {
11878
+ payload['name'] = name;
11879
+ }
11880
+ const uri = new URL(this.client.config.endpoint + apiPath);
11881
+ return yield this.client.call('post', uri, {
11882
+ 'content-type': 'application/json',
11883
+ }, payload);
11884
+ });
11885
+ }
11886
+ /**
11887
+ * Get User Target
11888
+ *
11889
+ *
11890
+ * @param {string} userId
11891
+ * @param {string} targetId
11892
+ * @throws {AppwriteException}
11893
+ * @returns {Promise}
11894
+ */
11895
+ getTarget(userId, targetId) {
11896
+ return __awaiter(this, void 0, void 0, function* () {
11897
+ if (typeof userId === 'undefined') {
11898
+ throw new AppwriteException('Missing required parameter: "userId"');
11899
+ }
11900
+ if (typeof targetId === 'undefined') {
11901
+ throw new AppwriteException('Missing required parameter: "targetId"');
11902
+ }
11903
+ const apiPath = '/users/{userId}/targets/{targetId}'.replace('{userId}', userId).replace('{targetId}', targetId);
11904
+ const payload = {};
11905
+ const uri = new URL(this.client.config.endpoint + apiPath);
11906
+ return yield this.client.call('get', uri, {
11907
+ 'content-type': 'application/json',
11908
+ }, payload);
11909
+ });
11910
+ }
11911
+ /**
11912
+ * Update User target
11913
+ *
11914
+ *
11915
+ * @param {string} userId
11916
+ * @param {string} targetId
11917
+ * @param {string} identifier
11918
+ * @param {string} providerId
11919
+ * @param {string} name
11920
+ * @throws {AppwriteException}
11921
+ * @returns {Promise}
11922
+ */
11923
+ updateTarget(userId, targetId, identifier, providerId, name) {
11924
+ return __awaiter(this, void 0, void 0, function* () {
11925
+ if (typeof userId === 'undefined') {
11926
+ throw new AppwriteException('Missing required parameter: "userId"');
11927
+ }
11928
+ if (typeof targetId === 'undefined') {
11929
+ throw new AppwriteException('Missing required parameter: "targetId"');
11930
+ }
11931
+ const apiPath = '/users/{userId}/targets/{targetId}'.replace('{userId}', userId).replace('{targetId}', targetId);
11932
+ const payload = {};
11933
+ if (typeof identifier !== 'undefined') {
11934
+ payload['identifier'] = identifier;
11935
+ }
11936
+ if (typeof providerId !== 'undefined') {
11937
+ payload['providerId'] = providerId;
11938
+ }
11939
+ if (typeof name !== 'undefined') {
11940
+ payload['name'] = name;
11941
+ }
11942
+ const uri = new URL(this.client.config.endpoint + apiPath);
11943
+ return yield this.client.call('patch', uri, {
11944
+ 'content-type': 'application/json',
11945
+ }, payload);
11946
+ });
11947
+ }
11948
+ /**
11949
+ * Delete user target
11950
+ *
11951
+ *
11952
+ * @param {string} userId
11953
+ * @param {string} targetId
11954
+ * @throws {AppwriteException}
11955
+ * @returns {Promise}
11956
+ */
11957
+ deleteTarget(userId, targetId) {
11958
+ return __awaiter(this, void 0, void 0, function* () {
11959
+ if (typeof userId === 'undefined') {
11960
+ throw new AppwriteException('Missing required parameter: "userId"');
11961
+ }
11962
+ if (typeof targetId === 'undefined') {
11963
+ throw new AppwriteException('Missing required parameter: "targetId"');
11964
+ }
11965
+ const apiPath = '/users/{userId}/targets/{targetId}'.replace('{userId}', userId).replace('{targetId}', targetId);
11966
+ const payload = {};
11967
+ const uri = new URL(this.client.config.endpoint + apiPath);
11968
+ return yield this.client.call('delete', uri, {
11969
+ 'content-type': 'application/json',
11970
+ }, payload);
11971
+ });
11972
+ }
11973
+ /**
11974
+ * Create token
11975
+ *
11976
+ * Returns a token with a secret key for creating a session. If the provided
11977
+ * user ID has not be registered, a new user will be created. Use the returned
11978
+ * user ID and secret and submit a request to the [PUT
11979
+ * /account/sessions/custom](https://appwrite.io/docs/references/cloud/client-web/account#updateCustomSession)
11980
+ * endpoint to complete the login process.
11981
+ *
11982
+ * @param {string} userId
11983
+ * @param {number} length
11984
+ * @param {number} expire
11985
+ * @throws {AppwriteException}
11986
+ * @returns {Promise}
11987
+ */
11988
+ createToken(userId, length, expire) {
11989
+ return __awaiter(this, void 0, void 0, function* () {
11990
+ if (typeof userId === 'undefined') {
11991
+ throw new AppwriteException('Missing required parameter: "userId"');
11992
+ }
11993
+ const apiPath = '/users/{userId}/tokens'.replace('{userId}', userId);
11994
+ const payload = {};
11995
+ if (typeof length !== 'undefined') {
11996
+ payload['length'] = length;
11997
+ }
11998
+ if (typeof expire !== 'undefined') {
11999
+ payload['expire'] = expire;
12000
+ }
12001
+ const uri = new URL(this.client.config.endpoint + apiPath);
12002
+ return yield this.client.call('post', uri, {
12003
+ 'content-type': 'application/json',
12004
+ }, payload);
12005
+ });
12006
+ }
9384
12007
  /**
9385
12008
  * Update email verification
9386
12009
  *
@@ -9806,5 +12429,796 @@ class ID {
9806
12429
  }
9807
12430
  }
9808
12431
 
9809
- export { Account, AppwriteException, Assistant, Avatars, Client, Console, Databases, Functions, Graphql, Health, ID, Locale, Migrations, Permission, Project, Projects, Proxy, Query, Role, Storage, Teams, Users, Vcs };
12432
+ var Factor;
12433
+ (function (Factor) {
12434
+ Factor["Totp"] = "totp";
12435
+ Factor["Phone"] = "phone";
12436
+ Factor["Email"] = "email";
12437
+ })(Factor || (Factor = {}));
12438
+
12439
+ var Type;
12440
+ (function (Type) {
12441
+ Type["Totp"] = "totp";
12442
+ })(Type || (Type = {}));
12443
+
12444
+ var OAuthProvider;
12445
+ (function (OAuthProvider) {
12446
+ OAuthProvider["Amazon"] = "amazon";
12447
+ OAuthProvider["Apple"] = "apple";
12448
+ OAuthProvider["Auth0"] = "auth0";
12449
+ OAuthProvider["Authentik"] = "authentik";
12450
+ OAuthProvider["Autodesk"] = "autodesk";
12451
+ OAuthProvider["Bitbucket"] = "bitbucket";
12452
+ OAuthProvider["Bitly"] = "bitly";
12453
+ OAuthProvider["Box"] = "box";
12454
+ OAuthProvider["Dailymotion"] = "dailymotion";
12455
+ OAuthProvider["Discord"] = "discord";
12456
+ OAuthProvider["Disqus"] = "disqus";
12457
+ OAuthProvider["Dropbox"] = "dropbox";
12458
+ OAuthProvider["Etsy"] = "etsy";
12459
+ OAuthProvider["Facebook"] = "facebook";
12460
+ OAuthProvider["Github"] = "github";
12461
+ OAuthProvider["Gitlab"] = "gitlab";
12462
+ OAuthProvider["Google"] = "google";
12463
+ OAuthProvider["Linkedin"] = "linkedin";
12464
+ OAuthProvider["Microsoft"] = "microsoft";
12465
+ OAuthProvider["Notion"] = "notion";
12466
+ OAuthProvider["Oidc"] = "oidc";
12467
+ OAuthProvider["Okta"] = "okta";
12468
+ OAuthProvider["Paypal"] = "paypal";
12469
+ OAuthProvider["PaypalSandbox"] = "paypalSandbox";
12470
+ OAuthProvider["Podio"] = "podio";
12471
+ OAuthProvider["Salesforce"] = "salesforce";
12472
+ OAuthProvider["Slack"] = "slack";
12473
+ OAuthProvider["Spotify"] = "spotify";
12474
+ OAuthProvider["Stripe"] = "stripe";
12475
+ OAuthProvider["Tradeshift"] = "tradeshift";
12476
+ OAuthProvider["TradeshiftBox"] = "tradeshiftBox";
12477
+ OAuthProvider["Twitch"] = "twitch";
12478
+ OAuthProvider["Wordpress"] = "wordpress";
12479
+ OAuthProvider["Yahoo"] = "yahoo";
12480
+ OAuthProvider["Yammer"] = "yammer";
12481
+ OAuthProvider["Yandex"] = "yandex";
12482
+ OAuthProvider["Zoho"] = "zoho";
12483
+ OAuthProvider["Zoom"] = "zoom";
12484
+ OAuthProvider["Mock"] = "mock";
12485
+ })(OAuthProvider || (OAuthProvider = {}));
12486
+
12487
+ var Browser;
12488
+ (function (Browser) {
12489
+ Browser["AvantBrowser"] = "aa";
12490
+ Browser["AndroidWebViewBeta"] = "an";
12491
+ Browser["GoogleChrome"] = "ch";
12492
+ Browser["GoogleChromeIOS"] = "ci";
12493
+ Browser["GoogleChromeMobile"] = "cm";
12494
+ Browser["Chromium"] = "cr";
12495
+ Browser["MozillaFirefox"] = "ff";
12496
+ Browser["Safari"] = "sf";
12497
+ Browser["MobileSafari"] = "mf";
12498
+ Browser["MicrosoftEdge"] = "ps";
12499
+ Browser["MicrosoftEdgeIOS"] = "oi";
12500
+ Browser["OperaMini"] = "om";
12501
+ Browser["Opera"] = "op";
12502
+ Browser["OperaNext"] = "on";
12503
+ })(Browser || (Browser = {}));
12504
+
12505
+ var CreditCard;
12506
+ (function (CreditCard) {
12507
+ CreditCard["AmericanExpress"] = "amex";
12508
+ CreditCard["Argencard"] = "argencard";
12509
+ CreditCard["Cabal"] = "cabal";
12510
+ CreditCard["Consosud"] = "censosud";
12511
+ CreditCard["DinersClub"] = "diners";
12512
+ CreditCard["Discover"] = "discover";
12513
+ CreditCard["Elo"] = "elo";
12514
+ CreditCard["Hipercard"] = "hipercard";
12515
+ CreditCard["JCB"] = "jcb";
12516
+ CreditCard["Mastercard"] = "mastercard";
12517
+ CreditCard["Naranja"] = "naranja";
12518
+ CreditCard["TarjetaShopping"] = "targeta-shopping";
12519
+ CreditCard["UnionChinaPay"] = "union-china-pay";
12520
+ CreditCard["Visa"] = "visa";
12521
+ CreditCard["MIR"] = "mir";
12522
+ CreditCard["Maestro"] = "maestro";
12523
+ })(CreditCard || (CreditCard = {}));
12524
+
12525
+ var Flag;
12526
+ (function (Flag) {
12527
+ Flag["Afghanistan"] = "af";
12528
+ Flag["Angola"] = "ao";
12529
+ Flag["Albania"] = "al";
12530
+ Flag["Andorra"] = "ad";
12531
+ Flag["UnitedArabEmirates"] = "ae";
12532
+ Flag["Argentina"] = "ar";
12533
+ Flag["Armenia"] = "am";
12534
+ Flag["AntiguaAndBarbuda"] = "ag";
12535
+ Flag["Australia"] = "au";
12536
+ Flag["Austria"] = "at";
12537
+ Flag["Azerbaijan"] = "az";
12538
+ Flag["Burundi"] = "bi";
12539
+ Flag["Belgium"] = "be";
12540
+ Flag["Benin"] = "bj";
12541
+ Flag["BurkinaFaso"] = "bf";
12542
+ Flag["Bangladesh"] = "bd";
12543
+ Flag["Bulgaria"] = "bg";
12544
+ Flag["Bahrain"] = "bh";
12545
+ Flag["Bahamas"] = "bs";
12546
+ Flag["BosniaAndHerzegovina"] = "ba";
12547
+ Flag["Belarus"] = "by";
12548
+ Flag["Belize"] = "bz";
12549
+ Flag["Bolivia"] = "bo";
12550
+ Flag["Brazil"] = "br";
12551
+ Flag["Barbados"] = "bb";
12552
+ Flag["BruneiDarussalam"] = "bn";
12553
+ Flag["Bhutan"] = "bt";
12554
+ Flag["Botswana"] = "bw";
12555
+ Flag["CentralAfricanRepublic"] = "cf";
12556
+ Flag["Canada"] = "ca";
12557
+ Flag["Switzerland"] = "ch";
12558
+ Flag["Chile"] = "cl";
12559
+ Flag["China"] = "cn";
12560
+ Flag["CTeDIvoire"] = "ci";
12561
+ Flag["Cameroon"] = "cm";
12562
+ Flag["DemocraticRepublicOfTheCongo"] = "cd";
12563
+ Flag["RepublicOfTheCongo"] = "cg";
12564
+ Flag["Colombia"] = "co";
12565
+ Flag["Comoros"] = "km";
12566
+ Flag["CapeVerde"] = "cv";
12567
+ Flag["CostaRica"] = "cr";
12568
+ Flag["Cuba"] = "cu";
12569
+ Flag["Cyprus"] = "cy";
12570
+ Flag["CzechRepublic"] = "cz";
12571
+ Flag["Germany"] = "de";
12572
+ Flag["Djibouti"] = "dj";
12573
+ Flag["Dominica"] = "dm";
12574
+ Flag["Denmark"] = "dk";
12575
+ Flag["DominicanRepublic"] = "do";
12576
+ Flag["Algeria"] = "dz";
12577
+ Flag["Ecuador"] = "ec";
12578
+ Flag["Egypt"] = "eg";
12579
+ Flag["Eritrea"] = "er";
12580
+ Flag["Spain"] = "es";
12581
+ Flag["Estonia"] = "ee";
12582
+ Flag["Ethiopia"] = "et";
12583
+ Flag["Finland"] = "fi";
12584
+ Flag["Fiji"] = "fj";
12585
+ Flag["France"] = "fr";
12586
+ Flag["MicronesiaFederatedStatesOf"] = "fm";
12587
+ Flag["Gabon"] = "ga";
12588
+ Flag["UnitedKingdom"] = "gb";
12589
+ Flag["Georgia"] = "ge";
12590
+ Flag["Ghana"] = "gh";
12591
+ Flag["Guinea"] = "gn";
12592
+ Flag["Gambia"] = "gm";
12593
+ Flag["GuineaBissau"] = "gw";
12594
+ Flag["EquatorialGuinea"] = "gq";
12595
+ Flag["Greece"] = "gr";
12596
+ Flag["Grenada"] = "gd";
12597
+ Flag["Guatemala"] = "gt";
12598
+ Flag["Guyana"] = "gy";
12599
+ Flag["Honduras"] = "hn";
12600
+ Flag["Croatia"] = "hr";
12601
+ Flag["Haiti"] = "ht";
12602
+ Flag["Hungary"] = "hu";
12603
+ Flag["Indonesia"] = "id";
12604
+ Flag["India"] = "in";
12605
+ Flag["Ireland"] = "ie";
12606
+ Flag["IranIslamicRepublicOf"] = "ir";
12607
+ Flag["Iraq"] = "iq";
12608
+ Flag["Iceland"] = "is";
12609
+ Flag["Israel"] = "il";
12610
+ Flag["Italy"] = "it";
12611
+ Flag["Jamaica"] = "jm";
12612
+ Flag["Jordan"] = "jo";
12613
+ Flag["Japan"] = "jp";
12614
+ Flag["Kazakhstan"] = "kz";
12615
+ Flag["Kenya"] = "ke";
12616
+ Flag["Kyrgyzstan"] = "kg";
12617
+ Flag["Cambodia"] = "kh";
12618
+ Flag["Kiribati"] = "ki";
12619
+ Flag["SaintKittsAndNevis"] = "kn";
12620
+ Flag["SouthKorea"] = "kr";
12621
+ Flag["Kuwait"] = "kw";
12622
+ Flag["LaoPeopleSDemocraticRepublic"] = "la";
12623
+ Flag["Lebanon"] = "lb";
12624
+ Flag["Liberia"] = "lr";
12625
+ Flag["Libya"] = "ly";
12626
+ Flag["SaintLucia"] = "lc";
12627
+ Flag["Liechtenstein"] = "li";
12628
+ Flag["SriLanka"] = "lk";
12629
+ Flag["Lesotho"] = "ls";
12630
+ Flag["Lithuania"] = "lt";
12631
+ Flag["Luxembourg"] = "lu";
12632
+ Flag["Latvia"] = "lv";
12633
+ Flag["Morocco"] = "ma";
12634
+ Flag["Monaco"] = "mc";
12635
+ Flag["Moldova"] = "md";
12636
+ Flag["Madagascar"] = "mg";
12637
+ Flag["Maldives"] = "mv";
12638
+ Flag["Mexico"] = "mx";
12639
+ Flag["MarshallIslands"] = "mh";
12640
+ Flag["NorthMacedonia"] = "mk";
12641
+ Flag["Mali"] = "ml";
12642
+ Flag["Malta"] = "mt";
12643
+ Flag["Myanmar"] = "mm";
12644
+ Flag["Montenegro"] = "me";
12645
+ Flag["Mongolia"] = "mn";
12646
+ Flag["Mozambique"] = "mz";
12647
+ Flag["Mauritania"] = "mr";
12648
+ Flag["Mauritius"] = "mu";
12649
+ Flag["Malawi"] = "mw";
12650
+ Flag["Malaysia"] = "my";
12651
+ Flag["Namibia"] = "na";
12652
+ Flag["Niger"] = "ne";
12653
+ Flag["Nigeria"] = "ng";
12654
+ Flag["Nicaragua"] = "ni";
12655
+ Flag["Netherlands"] = "nl";
12656
+ Flag["Norway"] = "no";
12657
+ Flag["Nepal"] = "np";
12658
+ Flag["Nauru"] = "nr";
12659
+ Flag["NewZealand"] = "nz";
12660
+ Flag["Oman"] = "om";
12661
+ Flag["Pakistan"] = "pk";
12662
+ Flag["Panama"] = "pa";
12663
+ Flag["Peru"] = "pe";
12664
+ Flag["Philippines"] = "ph";
12665
+ Flag["Palau"] = "pw";
12666
+ Flag["PapuaNewGuinea"] = "pg";
12667
+ Flag["Poland"] = "pl";
12668
+ Flag["NorthKorea"] = "kp";
12669
+ Flag["Portugal"] = "pt";
12670
+ Flag["Paraguay"] = "py";
12671
+ Flag["Qatar"] = "qa";
12672
+ Flag["Romania"] = "ro";
12673
+ Flag["Russia"] = "ru";
12674
+ Flag["Rwanda"] = "rw";
12675
+ Flag["SaudiArabia"] = "sa";
12676
+ Flag["Sudan"] = "sd";
12677
+ Flag["Senegal"] = "sn";
12678
+ Flag["Singapore"] = "sg";
12679
+ Flag["SolomonIslands"] = "sb";
12680
+ Flag["SierraLeone"] = "sl";
12681
+ Flag["ElSalvador"] = "sv";
12682
+ Flag["SanMarino"] = "sm";
12683
+ Flag["Somalia"] = "so";
12684
+ Flag["Serbia"] = "rs";
12685
+ Flag["SouthSudan"] = "ss";
12686
+ Flag["SaoTomeAndPrincipe"] = "st";
12687
+ Flag["Suriname"] = "sr";
12688
+ Flag["Slovakia"] = "sk";
12689
+ Flag["Slovenia"] = "si";
12690
+ Flag["Sweden"] = "se";
12691
+ Flag["Eswatini"] = "sz";
12692
+ Flag["Seychelles"] = "sc";
12693
+ Flag["Syria"] = "sy";
12694
+ Flag["Chad"] = "td";
12695
+ Flag["Togo"] = "tg";
12696
+ Flag["Thailand"] = "th";
12697
+ Flag["Tajikistan"] = "tj";
12698
+ Flag["Turkmenistan"] = "tm";
12699
+ Flag["TimorLeste"] = "tl";
12700
+ Flag["Tonga"] = "to";
12701
+ Flag["TrinidadAndTobago"] = "tt";
12702
+ Flag["Tunisia"] = "tn";
12703
+ Flag["Turkey"] = "tr";
12704
+ Flag["Tuvalu"] = "tv";
12705
+ Flag["Tanzania"] = "tz";
12706
+ Flag["Uganda"] = "ug";
12707
+ Flag["Ukraine"] = "ua";
12708
+ Flag["Uruguay"] = "uy";
12709
+ Flag["UnitedStates"] = "us";
12710
+ Flag["Uzbekistan"] = "uz";
12711
+ Flag["VaticanCity"] = "va";
12712
+ Flag["SaintVincentAndTheGrenadines"] = "vc";
12713
+ Flag["Venezuela"] = "ve";
12714
+ Flag["Vietnam"] = "vn";
12715
+ Flag["Vanuatu"] = "vu";
12716
+ Flag["Samoa"] = "ws";
12717
+ Flag["Yemen"] = "ye";
12718
+ Flag["SouthAfrica"] = "za";
12719
+ Flag["Zambia"] = "zm";
12720
+ Flag["Zimbabwe"] = "zw";
12721
+ })(Flag || (Flag = {}));
12722
+
12723
+ var DatabaseUsageRange;
12724
+ (function (DatabaseUsageRange) {
12725
+ DatabaseUsageRange["TwentyFourHours"] = "24h";
12726
+ DatabaseUsageRange["ThirtyDays"] = "30d";
12727
+ DatabaseUsageRange["NinetyDays"] = "90d";
12728
+ })(DatabaseUsageRange || (DatabaseUsageRange = {}));
12729
+
12730
+ var RelationshipType;
12731
+ (function (RelationshipType) {
12732
+ RelationshipType["OneToOne"] = "oneToOne";
12733
+ RelationshipType["ManyToOne"] = "manyToOne";
12734
+ RelationshipType["ManyToMany"] = "manyToMany";
12735
+ RelationshipType["OneToMany"] = "oneToMany";
12736
+ })(RelationshipType || (RelationshipType = {}));
12737
+
12738
+ var RelationMutate;
12739
+ (function (RelationMutate) {
12740
+ RelationMutate["Cascade"] = "cascade";
12741
+ RelationMutate["Restrict"] = "restrict";
12742
+ RelationMutate["SetNull"] = "setNull";
12743
+ })(RelationMutate || (RelationMutate = {}));
12744
+
12745
+ var IndexType;
12746
+ (function (IndexType) {
12747
+ IndexType["Key"] = "key";
12748
+ IndexType["Fulltext"] = "fulltext";
12749
+ IndexType["Unique"] = "unique";
12750
+ IndexType["Spatial"] = "spatial";
12751
+ })(IndexType || (IndexType = {}));
12752
+
12753
+ var Runtime;
12754
+ (function (Runtime) {
12755
+ Runtime["Node180"] = "node-18.0";
12756
+ Runtime["Php80"] = "php-8.0";
12757
+ Runtime["Ruby31"] = "ruby-3.1";
12758
+ Runtime["Python39"] = "python-3.9";
12759
+ })(Runtime || (Runtime = {}));
12760
+
12761
+ var FunctionUsageRange;
12762
+ (function (FunctionUsageRange) {
12763
+ FunctionUsageRange["TwentyFourHours"] = "24h";
12764
+ FunctionUsageRange["ThirtyDays"] = "30d";
12765
+ FunctionUsageRange["NinetyDays"] = "90d";
12766
+ })(FunctionUsageRange || (FunctionUsageRange = {}));
12767
+
12768
+ var ExecutionMethod;
12769
+ (function (ExecutionMethod) {
12770
+ ExecutionMethod["GET"] = "GET";
12771
+ ExecutionMethod["POST"] = "POST";
12772
+ ExecutionMethod["PUT"] = "PUT";
12773
+ ExecutionMethod["PATCH"] = "PATCH";
12774
+ ExecutionMethod["DELETE"] = "DELETE";
12775
+ ExecutionMethod["OPTIONS"] = "OPTIONS";
12776
+ })(ExecutionMethod || (ExecutionMethod = {}));
12777
+
12778
+ var Name;
12779
+ (function (Name) {
12780
+ Name["V1database"] = "v1-database";
12781
+ Name["V1deletes"] = "v1-deletes";
12782
+ Name["V1audits"] = "v1-audits";
12783
+ Name["V1mails"] = "v1-mails";
12784
+ Name["V1functions"] = "v1-functions";
12785
+ Name["V1usage"] = "v1-usage";
12786
+ Name["Webhooksv1"] = "webhooksv1";
12787
+ Name["V1certificates"] = "v1-certificates";
12788
+ Name["V1builds"] = "v1-builds";
12789
+ Name["V1messaging"] = "v1-messaging";
12790
+ Name["V1migrations"] = "v1-migrations";
12791
+ Name["Hamsterv1"] = "hamsterv1";
12792
+ })(Name || (Name = {}));
12793
+
12794
+ var MessageStatus;
12795
+ (function (MessageStatus) {
12796
+ MessageStatus["Draft"] = "draft";
12797
+ MessageStatus["Scheduled"] = "scheduled";
12798
+ MessageStatus["Processing"] = "processing";
12799
+ })(MessageStatus || (MessageStatus = {}));
12800
+
12801
+ var SMTPEncryption;
12802
+ (function (SMTPEncryption) {
12803
+ SMTPEncryption["None"] = "none";
12804
+ SMTPEncryption["Ssl"] = "ssl";
12805
+ SMTPEncryption["Tls"] = "tls";
12806
+ })(SMTPEncryption || (SMTPEncryption = {}));
12807
+
12808
+ var ProjectUsageRange;
12809
+ (function (ProjectUsageRange) {
12810
+ ProjectUsageRange["OneHour"] = "1h";
12811
+ ProjectUsageRange["OneDay"] = "1d";
12812
+ })(ProjectUsageRange || (ProjectUsageRange = {}));
12813
+
12814
+ var Region;
12815
+ (function (Region) {
12816
+ Region["Default"] = "default";
12817
+ })(Region || (Region = {}));
12818
+
12819
+ var AuthMethod;
12820
+ (function (AuthMethod) {
12821
+ AuthMethod["Emailpassword"] = "email-password";
12822
+ AuthMethod["Magicurl"] = "magic-url";
12823
+ AuthMethod["Emailotp"] = "email-otp";
12824
+ AuthMethod["Anonymous"] = "anonymous";
12825
+ AuthMethod["Invites"] = "invites";
12826
+ AuthMethod["Jwt"] = "jwt";
12827
+ AuthMethod["Phone"] = "phone";
12828
+ })(AuthMethod || (AuthMethod = {}));
12829
+
12830
+ var PlatformType;
12831
+ (function (PlatformType) {
12832
+ PlatformType["Web"] = "web";
12833
+ PlatformType["Flutterweb"] = "flutter-web";
12834
+ PlatformType["Flutterios"] = "flutter-ios";
12835
+ PlatformType["Flutterandroid"] = "flutter-android";
12836
+ PlatformType["Flutterlinux"] = "flutter-linux";
12837
+ PlatformType["Fluttermacos"] = "flutter-macos";
12838
+ PlatformType["Flutterwindows"] = "flutter-windows";
12839
+ PlatformType["Appleios"] = "apple-ios";
12840
+ PlatformType["Applemacos"] = "apple-macos";
12841
+ PlatformType["Applewatchos"] = "apple-watchos";
12842
+ PlatformType["Appletvos"] = "apple-tvos";
12843
+ PlatformType["Android"] = "android";
12844
+ PlatformType["Unity"] = "unity";
12845
+ })(PlatformType || (PlatformType = {}));
12846
+
12847
+ var APIService;
12848
+ (function (APIService) {
12849
+ APIService["Account"] = "account";
12850
+ APIService["Avatars"] = "avatars";
12851
+ APIService["Databases"] = "databases";
12852
+ APIService["Locale"] = "locale";
12853
+ APIService["Health"] = "health";
12854
+ APIService["Storage"] = "storage";
12855
+ APIService["Teams"] = "teams";
12856
+ APIService["Users"] = "users";
12857
+ APIService["Functions"] = "functions";
12858
+ APIService["Graphql"] = "graphql";
12859
+ APIService["Messaging"] = "messaging";
12860
+ })(APIService || (APIService = {}));
12861
+
12862
+ var SMTPSecure;
12863
+ (function (SMTPSecure) {
12864
+ SMTPSecure["Tls"] = "tls";
12865
+ })(SMTPSecure || (SMTPSecure = {}));
12866
+
12867
+ var EmailTemplateType;
12868
+ (function (EmailTemplateType) {
12869
+ EmailTemplateType["Verification"] = "verification";
12870
+ EmailTemplateType["Magicsession"] = "magicsession";
12871
+ EmailTemplateType["Recovery"] = "recovery";
12872
+ EmailTemplateType["Invitation"] = "invitation";
12873
+ })(EmailTemplateType || (EmailTemplateType = {}));
12874
+
12875
+ var EmailTemplateLocale;
12876
+ (function (EmailTemplateLocale) {
12877
+ EmailTemplateLocale["Af"] = "af";
12878
+ EmailTemplateLocale["Arae"] = "ar-ae";
12879
+ EmailTemplateLocale["Arbh"] = "ar-bh";
12880
+ EmailTemplateLocale["Ardz"] = "ar-dz";
12881
+ EmailTemplateLocale["Areg"] = "ar-eg";
12882
+ EmailTemplateLocale["Ariq"] = "ar-iq";
12883
+ EmailTemplateLocale["Arjo"] = "ar-jo";
12884
+ EmailTemplateLocale["Arkw"] = "ar-kw";
12885
+ EmailTemplateLocale["Arlb"] = "ar-lb";
12886
+ EmailTemplateLocale["Arly"] = "ar-ly";
12887
+ EmailTemplateLocale["Arma"] = "ar-ma";
12888
+ EmailTemplateLocale["Arom"] = "ar-om";
12889
+ EmailTemplateLocale["Arqa"] = "ar-qa";
12890
+ EmailTemplateLocale["Arsa"] = "ar-sa";
12891
+ EmailTemplateLocale["Arsy"] = "ar-sy";
12892
+ EmailTemplateLocale["Artn"] = "ar-tn";
12893
+ EmailTemplateLocale["Arye"] = "ar-ye";
12894
+ EmailTemplateLocale["As"] = "as";
12895
+ EmailTemplateLocale["Az"] = "az";
12896
+ EmailTemplateLocale["Be"] = "be";
12897
+ EmailTemplateLocale["Bg"] = "bg";
12898
+ EmailTemplateLocale["Bh"] = "bh";
12899
+ EmailTemplateLocale["Bn"] = "bn";
12900
+ EmailTemplateLocale["Bs"] = "bs";
12901
+ EmailTemplateLocale["Ca"] = "ca";
12902
+ EmailTemplateLocale["Cs"] = "cs";
12903
+ EmailTemplateLocale["Cy"] = "cy";
12904
+ EmailTemplateLocale["Da"] = "da";
12905
+ EmailTemplateLocale["De"] = "de";
12906
+ EmailTemplateLocale["Deat"] = "de-at";
12907
+ EmailTemplateLocale["Dech"] = "de-ch";
12908
+ EmailTemplateLocale["Deli"] = "de-li";
12909
+ EmailTemplateLocale["Delu"] = "de-lu";
12910
+ EmailTemplateLocale["El"] = "el";
12911
+ EmailTemplateLocale["En"] = "en";
12912
+ EmailTemplateLocale["Enau"] = "en-au";
12913
+ EmailTemplateLocale["Enbz"] = "en-bz";
12914
+ EmailTemplateLocale["Enca"] = "en-ca";
12915
+ EmailTemplateLocale["Engb"] = "en-gb";
12916
+ EmailTemplateLocale["Enie"] = "en-ie";
12917
+ EmailTemplateLocale["Enjm"] = "en-jm";
12918
+ EmailTemplateLocale["Ennz"] = "en-nz";
12919
+ EmailTemplateLocale["Entt"] = "en-tt";
12920
+ EmailTemplateLocale["Enus"] = "en-us";
12921
+ EmailTemplateLocale["Enza"] = "en-za";
12922
+ EmailTemplateLocale["Eo"] = "eo";
12923
+ EmailTemplateLocale["Es"] = "es";
12924
+ EmailTemplateLocale["Esar"] = "es-ar";
12925
+ EmailTemplateLocale["Esbo"] = "es-bo";
12926
+ EmailTemplateLocale["Escl"] = "es-cl";
12927
+ EmailTemplateLocale["Esco"] = "es-co";
12928
+ EmailTemplateLocale["Escr"] = "es-cr";
12929
+ EmailTemplateLocale["Esdo"] = "es-do";
12930
+ EmailTemplateLocale["Esec"] = "es-ec";
12931
+ EmailTemplateLocale["Esgt"] = "es-gt";
12932
+ EmailTemplateLocale["Eshn"] = "es-hn";
12933
+ EmailTemplateLocale["Esmx"] = "es-mx";
12934
+ EmailTemplateLocale["Esni"] = "es-ni";
12935
+ EmailTemplateLocale["Espa"] = "es-pa";
12936
+ EmailTemplateLocale["Espe"] = "es-pe";
12937
+ EmailTemplateLocale["Espr"] = "es-pr";
12938
+ EmailTemplateLocale["Espy"] = "es-py";
12939
+ EmailTemplateLocale["Essv"] = "es-sv";
12940
+ EmailTemplateLocale["Esuy"] = "es-uy";
12941
+ EmailTemplateLocale["Esve"] = "es-ve";
12942
+ EmailTemplateLocale["Et"] = "et";
12943
+ EmailTemplateLocale["Eu"] = "eu";
12944
+ EmailTemplateLocale["Fa"] = "fa";
12945
+ EmailTemplateLocale["Fi"] = "fi";
12946
+ EmailTemplateLocale["Fo"] = "fo";
12947
+ EmailTemplateLocale["Fr"] = "fr";
12948
+ EmailTemplateLocale["Frbe"] = "fr-be";
12949
+ EmailTemplateLocale["Frca"] = "fr-ca";
12950
+ EmailTemplateLocale["Frch"] = "fr-ch";
12951
+ EmailTemplateLocale["Frlu"] = "fr-lu";
12952
+ EmailTemplateLocale["Ga"] = "ga";
12953
+ EmailTemplateLocale["Gd"] = "gd";
12954
+ EmailTemplateLocale["He"] = "he";
12955
+ EmailTemplateLocale["Hi"] = "hi";
12956
+ EmailTemplateLocale["Hr"] = "hr";
12957
+ EmailTemplateLocale["Hu"] = "hu";
12958
+ EmailTemplateLocale["Id"] = "id";
12959
+ EmailTemplateLocale["Is"] = "is";
12960
+ EmailTemplateLocale["It"] = "it";
12961
+ EmailTemplateLocale["Itch"] = "it-ch";
12962
+ EmailTemplateLocale["Ja"] = "ja";
12963
+ EmailTemplateLocale["Ji"] = "ji";
12964
+ EmailTemplateLocale["Ko"] = "ko";
12965
+ EmailTemplateLocale["Ku"] = "ku";
12966
+ EmailTemplateLocale["Lt"] = "lt";
12967
+ EmailTemplateLocale["Lv"] = "lv";
12968
+ EmailTemplateLocale["Mk"] = "mk";
12969
+ EmailTemplateLocale["Ml"] = "ml";
12970
+ EmailTemplateLocale["Ms"] = "ms";
12971
+ EmailTemplateLocale["Mt"] = "mt";
12972
+ EmailTemplateLocale["Nb"] = "nb";
12973
+ EmailTemplateLocale["Ne"] = "ne";
12974
+ EmailTemplateLocale["Nl"] = "nl";
12975
+ EmailTemplateLocale["Nlbe"] = "nl-be";
12976
+ EmailTemplateLocale["Nn"] = "nn";
12977
+ EmailTemplateLocale["No"] = "no";
12978
+ EmailTemplateLocale["Pa"] = "pa";
12979
+ EmailTemplateLocale["Pl"] = "pl";
12980
+ EmailTemplateLocale["Pt"] = "pt";
12981
+ EmailTemplateLocale["Ptbr"] = "pt-br";
12982
+ EmailTemplateLocale["Rm"] = "rm";
12983
+ EmailTemplateLocale["Ro"] = "ro";
12984
+ EmailTemplateLocale["Romd"] = "ro-md";
12985
+ EmailTemplateLocale["Ru"] = "ru";
12986
+ EmailTemplateLocale["Rumd"] = "ru-md";
12987
+ EmailTemplateLocale["Sb"] = "sb";
12988
+ EmailTemplateLocale["Sk"] = "sk";
12989
+ EmailTemplateLocale["Sl"] = "sl";
12990
+ EmailTemplateLocale["Sq"] = "sq";
12991
+ EmailTemplateLocale["Sr"] = "sr";
12992
+ EmailTemplateLocale["Sv"] = "sv";
12993
+ EmailTemplateLocale["Svfi"] = "sv-fi";
12994
+ EmailTemplateLocale["Th"] = "th";
12995
+ EmailTemplateLocale["Tn"] = "tn";
12996
+ EmailTemplateLocale["Tr"] = "tr";
12997
+ EmailTemplateLocale["Ts"] = "ts";
12998
+ EmailTemplateLocale["Ua"] = "ua";
12999
+ EmailTemplateLocale["Ur"] = "ur";
13000
+ EmailTemplateLocale["Ve"] = "ve";
13001
+ EmailTemplateLocale["Vi"] = "vi";
13002
+ EmailTemplateLocale["Xh"] = "xh";
13003
+ EmailTemplateLocale["Zhcn"] = "zh-cn";
13004
+ EmailTemplateLocale["Zhhk"] = "zh-hk";
13005
+ EmailTemplateLocale["Zhsg"] = "zh-sg";
13006
+ EmailTemplateLocale["Zhtw"] = "zh-tw";
13007
+ EmailTemplateLocale["Zu"] = "zu";
13008
+ })(EmailTemplateLocale || (EmailTemplateLocale = {}));
13009
+
13010
+ var SMSTemplateType;
13011
+ (function (SMSTemplateType) {
13012
+ SMSTemplateType["Verification"] = "verification";
13013
+ SMSTemplateType["Login"] = "login";
13014
+ SMSTemplateType["Invitation"] = "invitation";
13015
+ })(SMSTemplateType || (SMSTemplateType = {}));
13016
+
13017
+ var SMSTemplateLocale;
13018
+ (function (SMSTemplateLocale) {
13019
+ SMSTemplateLocale["Af"] = "af";
13020
+ SMSTemplateLocale["Arae"] = "ar-ae";
13021
+ SMSTemplateLocale["Arbh"] = "ar-bh";
13022
+ SMSTemplateLocale["Ardz"] = "ar-dz";
13023
+ SMSTemplateLocale["Areg"] = "ar-eg";
13024
+ SMSTemplateLocale["Ariq"] = "ar-iq";
13025
+ SMSTemplateLocale["Arjo"] = "ar-jo";
13026
+ SMSTemplateLocale["Arkw"] = "ar-kw";
13027
+ SMSTemplateLocale["Arlb"] = "ar-lb";
13028
+ SMSTemplateLocale["Arly"] = "ar-ly";
13029
+ SMSTemplateLocale["Arma"] = "ar-ma";
13030
+ SMSTemplateLocale["Arom"] = "ar-om";
13031
+ SMSTemplateLocale["Arqa"] = "ar-qa";
13032
+ SMSTemplateLocale["Arsa"] = "ar-sa";
13033
+ SMSTemplateLocale["Arsy"] = "ar-sy";
13034
+ SMSTemplateLocale["Artn"] = "ar-tn";
13035
+ SMSTemplateLocale["Arye"] = "ar-ye";
13036
+ SMSTemplateLocale["As"] = "as";
13037
+ SMSTemplateLocale["Az"] = "az";
13038
+ SMSTemplateLocale["Be"] = "be";
13039
+ SMSTemplateLocale["Bg"] = "bg";
13040
+ SMSTemplateLocale["Bh"] = "bh";
13041
+ SMSTemplateLocale["Bn"] = "bn";
13042
+ SMSTemplateLocale["Bs"] = "bs";
13043
+ SMSTemplateLocale["Ca"] = "ca";
13044
+ SMSTemplateLocale["Cs"] = "cs";
13045
+ SMSTemplateLocale["Cy"] = "cy";
13046
+ SMSTemplateLocale["Da"] = "da";
13047
+ SMSTemplateLocale["De"] = "de";
13048
+ SMSTemplateLocale["Deat"] = "de-at";
13049
+ SMSTemplateLocale["Dech"] = "de-ch";
13050
+ SMSTemplateLocale["Deli"] = "de-li";
13051
+ SMSTemplateLocale["Delu"] = "de-lu";
13052
+ SMSTemplateLocale["El"] = "el";
13053
+ SMSTemplateLocale["En"] = "en";
13054
+ SMSTemplateLocale["Enau"] = "en-au";
13055
+ SMSTemplateLocale["Enbz"] = "en-bz";
13056
+ SMSTemplateLocale["Enca"] = "en-ca";
13057
+ SMSTemplateLocale["Engb"] = "en-gb";
13058
+ SMSTemplateLocale["Enie"] = "en-ie";
13059
+ SMSTemplateLocale["Enjm"] = "en-jm";
13060
+ SMSTemplateLocale["Ennz"] = "en-nz";
13061
+ SMSTemplateLocale["Entt"] = "en-tt";
13062
+ SMSTemplateLocale["Enus"] = "en-us";
13063
+ SMSTemplateLocale["Enza"] = "en-za";
13064
+ SMSTemplateLocale["Eo"] = "eo";
13065
+ SMSTemplateLocale["Es"] = "es";
13066
+ SMSTemplateLocale["Esar"] = "es-ar";
13067
+ SMSTemplateLocale["Esbo"] = "es-bo";
13068
+ SMSTemplateLocale["Escl"] = "es-cl";
13069
+ SMSTemplateLocale["Esco"] = "es-co";
13070
+ SMSTemplateLocale["Escr"] = "es-cr";
13071
+ SMSTemplateLocale["Esdo"] = "es-do";
13072
+ SMSTemplateLocale["Esec"] = "es-ec";
13073
+ SMSTemplateLocale["Esgt"] = "es-gt";
13074
+ SMSTemplateLocale["Eshn"] = "es-hn";
13075
+ SMSTemplateLocale["Esmx"] = "es-mx";
13076
+ SMSTemplateLocale["Esni"] = "es-ni";
13077
+ SMSTemplateLocale["Espa"] = "es-pa";
13078
+ SMSTemplateLocale["Espe"] = "es-pe";
13079
+ SMSTemplateLocale["Espr"] = "es-pr";
13080
+ SMSTemplateLocale["Espy"] = "es-py";
13081
+ SMSTemplateLocale["Essv"] = "es-sv";
13082
+ SMSTemplateLocale["Esuy"] = "es-uy";
13083
+ SMSTemplateLocale["Esve"] = "es-ve";
13084
+ SMSTemplateLocale["Et"] = "et";
13085
+ SMSTemplateLocale["Eu"] = "eu";
13086
+ SMSTemplateLocale["Fa"] = "fa";
13087
+ SMSTemplateLocale["Fi"] = "fi";
13088
+ SMSTemplateLocale["Fo"] = "fo";
13089
+ SMSTemplateLocale["Fr"] = "fr";
13090
+ SMSTemplateLocale["Frbe"] = "fr-be";
13091
+ SMSTemplateLocale["Frca"] = "fr-ca";
13092
+ SMSTemplateLocale["Frch"] = "fr-ch";
13093
+ SMSTemplateLocale["Frlu"] = "fr-lu";
13094
+ SMSTemplateLocale["Ga"] = "ga";
13095
+ SMSTemplateLocale["Gd"] = "gd";
13096
+ SMSTemplateLocale["He"] = "he";
13097
+ SMSTemplateLocale["Hi"] = "hi";
13098
+ SMSTemplateLocale["Hr"] = "hr";
13099
+ SMSTemplateLocale["Hu"] = "hu";
13100
+ SMSTemplateLocale["Id"] = "id";
13101
+ SMSTemplateLocale["Is"] = "is";
13102
+ SMSTemplateLocale["It"] = "it";
13103
+ SMSTemplateLocale["Itch"] = "it-ch";
13104
+ SMSTemplateLocale["Ja"] = "ja";
13105
+ SMSTemplateLocale["Ji"] = "ji";
13106
+ SMSTemplateLocale["Ko"] = "ko";
13107
+ SMSTemplateLocale["Ku"] = "ku";
13108
+ SMSTemplateLocale["Lt"] = "lt";
13109
+ SMSTemplateLocale["Lv"] = "lv";
13110
+ SMSTemplateLocale["Mk"] = "mk";
13111
+ SMSTemplateLocale["Ml"] = "ml";
13112
+ SMSTemplateLocale["Ms"] = "ms";
13113
+ SMSTemplateLocale["Mt"] = "mt";
13114
+ SMSTemplateLocale["Nb"] = "nb";
13115
+ SMSTemplateLocale["Ne"] = "ne";
13116
+ SMSTemplateLocale["Nl"] = "nl";
13117
+ SMSTemplateLocale["Nlbe"] = "nl-be";
13118
+ SMSTemplateLocale["Nn"] = "nn";
13119
+ SMSTemplateLocale["No"] = "no";
13120
+ SMSTemplateLocale["Pa"] = "pa";
13121
+ SMSTemplateLocale["Pl"] = "pl";
13122
+ SMSTemplateLocale["Pt"] = "pt";
13123
+ SMSTemplateLocale["Ptbr"] = "pt-br";
13124
+ SMSTemplateLocale["Rm"] = "rm";
13125
+ SMSTemplateLocale["Ro"] = "ro";
13126
+ SMSTemplateLocale["Romd"] = "ro-md";
13127
+ SMSTemplateLocale["Ru"] = "ru";
13128
+ SMSTemplateLocale["Rumd"] = "ru-md";
13129
+ SMSTemplateLocale["Sb"] = "sb";
13130
+ SMSTemplateLocale["Sk"] = "sk";
13131
+ SMSTemplateLocale["Sl"] = "sl";
13132
+ SMSTemplateLocale["Sq"] = "sq";
13133
+ SMSTemplateLocale["Sr"] = "sr";
13134
+ SMSTemplateLocale["Sv"] = "sv";
13135
+ SMSTemplateLocale["Svfi"] = "sv-fi";
13136
+ SMSTemplateLocale["Th"] = "th";
13137
+ SMSTemplateLocale["Tn"] = "tn";
13138
+ SMSTemplateLocale["Tr"] = "tr";
13139
+ SMSTemplateLocale["Ts"] = "ts";
13140
+ SMSTemplateLocale["Ua"] = "ua";
13141
+ SMSTemplateLocale["Ur"] = "ur";
13142
+ SMSTemplateLocale["Ve"] = "ve";
13143
+ SMSTemplateLocale["Vi"] = "vi";
13144
+ SMSTemplateLocale["Xh"] = "xh";
13145
+ SMSTemplateLocale["Zhcn"] = "zh-cn";
13146
+ SMSTemplateLocale["Zhhk"] = "zh-hk";
13147
+ SMSTemplateLocale["Zhsg"] = "zh-sg";
13148
+ SMSTemplateLocale["Zhtw"] = "zh-tw";
13149
+ SMSTemplateLocale["Zu"] = "zu";
13150
+ })(SMSTemplateLocale || (SMSTemplateLocale = {}));
13151
+
13152
+ var ResourceType;
13153
+ (function (ResourceType) {
13154
+ ResourceType["Api"] = "api";
13155
+ ResourceType["Function"] = "function";
13156
+ })(ResourceType || (ResourceType = {}));
13157
+
13158
+ var Compression;
13159
+ (function (Compression) {
13160
+ Compression["None"] = "none";
13161
+ Compression["Gzip"] = "gzip";
13162
+ Compression["Zstd"] = "zstd";
13163
+ })(Compression || (Compression = {}));
13164
+
13165
+ var ImageGravity;
13166
+ (function (ImageGravity) {
13167
+ ImageGravity["Center"] = "center";
13168
+ ImageGravity["Topleft"] = "top-left";
13169
+ ImageGravity["Top"] = "top";
13170
+ ImageGravity["Topright"] = "top-right";
13171
+ ImageGravity["Left"] = "left";
13172
+ ImageGravity["Right"] = "right";
13173
+ ImageGravity["Bottomleft"] = "bottom-left";
13174
+ ImageGravity["Bottom"] = "bottom";
13175
+ ImageGravity["Bottomright"] = "bottom-right";
13176
+ })(ImageGravity || (ImageGravity = {}));
13177
+
13178
+ var ImageFormat;
13179
+ (function (ImageFormat) {
13180
+ ImageFormat["Jpg"] = "jpg";
13181
+ ImageFormat["Jpeg"] = "jpeg";
13182
+ ImageFormat["Gif"] = "gif";
13183
+ ImageFormat["Png"] = "png";
13184
+ ImageFormat["Webp"] = "webp";
13185
+ })(ImageFormat || (ImageFormat = {}));
13186
+
13187
+ var StorageUsageRange;
13188
+ (function (StorageUsageRange) {
13189
+ StorageUsageRange["TwentyFourHours"] = "24h";
13190
+ StorageUsageRange["ThirtyDays"] = "30d";
13191
+ StorageUsageRange["NinetyDays"] = "90d";
13192
+ })(StorageUsageRange || (StorageUsageRange = {}));
13193
+
13194
+ var PasswordHash;
13195
+ (function (PasswordHash) {
13196
+ PasswordHash["Sha1"] = "sha1";
13197
+ PasswordHash["Sha224"] = "sha224";
13198
+ PasswordHash["Sha256"] = "sha256";
13199
+ PasswordHash["Sha384"] = "sha384";
13200
+ PasswordHash["Sha512224"] = "sha512/224";
13201
+ PasswordHash["Sha512256"] = "sha512/256";
13202
+ PasswordHash["Sha512"] = "sha512";
13203
+ PasswordHash["Sha3224"] = "sha3-224";
13204
+ PasswordHash["Sha3256"] = "sha3-256";
13205
+ PasswordHash["Sha3384"] = "sha3-384";
13206
+ PasswordHash["Sha3512"] = "sha3-512";
13207
+ })(PasswordHash || (PasswordHash = {}));
13208
+
13209
+ var UserUsageRange;
13210
+ (function (UserUsageRange) {
13211
+ UserUsageRange["TwentyFourHours"] = "24h";
13212
+ UserUsageRange["ThirtyDays"] = "30d";
13213
+ UserUsageRange["NinetyDays"] = "90d";
13214
+ })(UserUsageRange || (UserUsageRange = {}));
13215
+
13216
+ var MessagingProviderType;
13217
+ (function (MessagingProviderType) {
13218
+ MessagingProviderType["Email"] = "email";
13219
+ MessagingProviderType["Sms"] = "sms";
13220
+ MessagingProviderType["Push"] = "push";
13221
+ })(MessagingProviderType || (MessagingProviderType = {}));
13222
+
13223
+ export { APIService, Account, AppwriteException, Assistant, AuthMethod, Avatars, Browser, Client, Compression, Console, CreditCard, DatabaseUsageRange, Databases, EmailTemplateLocale, EmailTemplateType, ExecutionMethod, Factor, Flag, FunctionUsageRange, Functions, Graphql, Health, ID, ImageFormat, ImageGravity, IndexType, Locale, MessageStatus, Messaging, MessagingProviderType, Migrations, Name, OAuthProvider, PasswordHash, Permission, PlatformType, Project, ProjectUsageRange, Projects, Proxy, Query, Region, RelationMutate, RelationshipType, ResourceType, Role, Runtime, SMSTemplateLocale, SMSTemplateType, SMTPEncryption, SMTPSecure, Storage, StorageUsageRange, Teams, Type, UserUsageRange, Users, Vcs };
9810
13224
  //# sourceMappingURL=sdk.js.map