@appwrite.io/console 0.6.0-rc.1 → 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 (458) hide show
  1. package/README.md +2 -2
  2. package/dist/cjs/sdk.js +1852 -425
  3. package/dist/cjs/sdk.js.map +1 -1
  4. package/dist/esm/sdk.js +1853 -426
  5. package/dist/esm/sdk.js.map +1 -1
  6. package/dist/iife/sdk.js +1852 -425
  7. package/docs/examples/account/add-authenticator.md +2 -2
  8. package/docs/examples/account/create-anonymous-session.md +1 -1
  9. package/docs/examples/account/{create-magic-u-r-l-session.md → create-email-password-session.md} +2 -2
  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-token.md +18 -0
  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/{update-phone-session.md → create-session.md} +2 -2
  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/{list-providers.md → delete.md} +2 -2
  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/{create-challenge.md → list-factors.md} +2 -2
  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 +1 -1
  36. package/docs/examples/account/update-email.md +1 -1
  37. package/docs/examples/account/update-m-f-a.md +1 -1
  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 +2 -2
  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-apns-provider.md → create-a-p-n-s-provider.md} +2 -2
  161. package/docs/examples/messaging/{create-push-message.md → create-email.md} +2 -2
  162. package/docs/examples/messaging/{create-fcm-provider.md → create-f-c-m-provider.md} +2 -2
  163. package/docs/examples/messaging/create-mailgun-provider.md +1 -1
  164. package/docs/examples/messaging/create-msg91provider.md +1 -1
  165. package/docs/examples/messaging/{create-s-m-s-message.md → create-push.md} +2 -2
  166. package/docs/examples/messaging/{update-push-notification.md → create-s-m-s.md} +2 -2
  167. package/docs/examples/messaging/create-s-m-t-p-provider.md +18 -0
  168. package/docs/examples/messaging/create-sendgrid-provider.md +1 -1
  169. package/docs/examples/messaging/create-subscriber.md +1 -1
  170. package/docs/examples/messaging/create-telesign-provider.md +1 -1
  171. package/docs/examples/messaging/create-textmagic-provider.md +1 -1
  172. package/docs/examples/messaging/create-topic.md +1 -1
  173. package/docs/examples/messaging/create-twilio-provider.md +1 -1
  174. package/docs/examples/messaging/create-vonage-provider.md +1 -1
  175. package/docs/examples/messaging/delete-provider.md +1 -1
  176. package/docs/examples/messaging/delete-subscriber.md +1 -1
  177. package/docs/examples/messaging/delete-topic.md +1 -1
  178. package/docs/examples/messaging/{update-fcm-provider.md → delete.md} +2 -2
  179. package/docs/examples/messaging/get-message.md +1 -1
  180. package/docs/examples/messaging/get-provider.md +1 -1
  181. package/docs/examples/messaging/get-subscriber.md +1 -1
  182. package/docs/examples/messaging/get-topic.md +1 -1
  183. package/docs/examples/messaging/list-message-logs.md +1 -1
  184. package/docs/examples/messaging/list-messages.md +1 -1
  185. package/docs/examples/messaging/list-provider-logs.md +1 -1
  186. package/docs/examples/messaging/list-providers.md +1 -1
  187. package/docs/examples/messaging/list-subscriber-logs.md +1 -1
  188. package/docs/examples/messaging/list-subscribers.md +1 -1
  189. package/docs/examples/messaging/{update-apns-provider.md → list-targets.md} +2 -2
  190. package/docs/examples/messaging/list-topic-logs.md +1 -1
  191. package/docs/examples/messaging/list-topics.md +1 -1
  192. package/docs/examples/messaging/update-a-p-n-s-provider.md +18 -0
  193. package/docs/examples/messaging/update-email.md +1 -1
  194. package/docs/examples/messaging/update-f-c-m-provider.md +18 -0
  195. package/docs/examples/messaging/update-mailgun-provider.md +1 -1
  196. package/docs/examples/messaging/update-msg91provider.md +1 -1
  197. package/docs/examples/messaging/update-push.md +18 -0
  198. package/docs/examples/messaging/update-s-m-s.md +1 -1
  199. package/docs/examples/messaging/update-s-m-t-p-provider.md +18 -0
  200. package/docs/examples/messaging/update-sendgrid-provider.md +1 -1
  201. package/docs/examples/messaging/update-telesign-provider.md +1 -1
  202. package/docs/examples/messaging/update-textmagic-provider.md +1 -1
  203. package/docs/examples/messaging/update-topic.md +1 -1
  204. package/docs/examples/messaging/update-twilio-provider.md +1 -1
  205. package/docs/examples/messaging/update-vonage-provider.md +1 -1
  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 +2 -2
  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/{update-auth-mfa-factors.md → create-smtp-test.md} +2 -2
  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/{get-usage.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 +2 -2
  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 +1 -1
  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 +1 -1
  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 +1 -1
  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 +1 -1
  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 +35 -1
  387. package/src/models.ts +278 -199
  388. package/src/query.ts +61 -34
  389. package/src/service.ts +7 -7
  390. package/src/services/account.ts +349 -164
  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 +395 -120
  400. package/src/services/migrations.ts +3 -2
  401. package/src/services/project.ts +24 -4
  402. package/src/services/projects.ts +137 -91
  403. package/src/services/proxy.ts +4 -2
  404. package/src/services/storage.ts +17 -12
  405. package/src/services/teams.ts +1 -0
  406. package/src/services/users.ts +170 -16
  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 +34 -0
  443. package/types/models.d.ts +278 -199
  444. package/types/query.d.ts +10 -3
  445. package/types/services/account.d.ts +151 -89
  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 +129 -55
  451. package/types/services/migrations.d.ts +2 -2
  452. package/types/services/project.d.ts +5 -2
  453. package/types/services/projects.d.ts +63 -53
  454. package/types/services/proxy.d.ts +3 -2
  455. package/types/services/storage.d.ts +16 -12
  456. package/types/services/users.d.ts +76 -12
  457. package/docs/examples/messaging/create-email-message.md +0 -18
  458. package/docs/examples/projects/update-smtp-configuration.md +0 -18
package/dist/iife/sdk.js CHANGED
@@ -26,17 +26,63 @@
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 @@
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 @@
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 @@
102
118
  'x-sdk-name': 'Console',
103
119
  'x-sdk-platform': 'console',
104
120
  'x-sdk-language': 'web',
105
- 'x-sdk-version': '0.6.0-rc.1',
121
+ 'x-sdk-version': '0.6.0-rc.10',
106
122
  'X-Appwrite-Response-Format': '1.4.0',
107
123
  };
108
124
  this.realtime = {
@@ -506,6 +522,24 @@
506
522
  }, payload);
507
523
  });
508
524
  }
525
+ /**
526
+ * Delete account
527
+ *
528
+ * Delete the currently logged in user.
529
+ *
530
+ * @throws {AppwriteException}
531
+ * @returns {Promise}
532
+ */
533
+ delete() {
534
+ return __awaiter(this, void 0, void 0, function* () {
535
+ const apiPath = '/account';
536
+ const payload = {};
537
+ const uri = new URL(this.client.config.endpoint + apiPath);
538
+ return yield this.client.call('delete', uri, {
539
+ 'content-type': 'application/json',
540
+ }, payload);
541
+ });
542
+ }
509
543
  /**
510
544
  * Update email
511
545
  *
@@ -550,7 +584,7 @@
550
584
  *
551
585
  * Get the list of identities for the currently logged in user.
552
586
  *
553
- * @param {string} queries
587
+ * @param {string[]} queries
554
588
  * @throws {AppwriteException}
555
589
  * @returns {Promise}
556
590
  */
@@ -568,7 +602,7 @@
568
602
  });
569
603
  }
570
604
  /**
571
- * Delete Identity
605
+ * Delete identity
572
606
  *
573
607
  * Delete an identity by its unique ID.
574
608
  *
@@ -659,22 +693,22 @@
659
693
  });
660
694
  }
661
695
  /**
662
- * Create MFA Challenge
696
+ * Create 2FA Challenge
663
697
  *
664
698
  *
665
- * @param {string} provider
699
+ * @param {Factor} factor
666
700
  * @throws {AppwriteException}
667
701
  * @returns {Promise}
668
702
  */
669
- createChallenge(provider) {
703
+ create2FAChallenge(factor) {
670
704
  return __awaiter(this, void 0, void 0, function* () {
671
- if (typeof provider === 'undefined') {
672
- throw new AppwriteException('Missing required parameter: "provider"');
705
+ if (typeof factor === 'undefined') {
706
+ throw new AppwriteException('Missing required parameter: "factor"');
673
707
  }
674
708
  const apiPath = '/account/mfa/challenge';
675
709
  const payload = {};
676
- if (typeof provider !== 'undefined') {
677
- payload['provider'] = provider;
710
+ if (typeof factor !== 'undefined') {
711
+ payload['factor'] = factor;
678
712
  }
679
713
  const uri = new URL(this.client.config.endpoint + apiPath);
680
714
  return yield this.client.call('post', uri, {
@@ -714,16 +748,15 @@
714
748
  });
715
749
  }
716
750
  /**
717
- * List Providers
751
+ * List Factors
718
752
  *
719
- * Get the currently logged in user.
720
753
  *
721
754
  * @throws {AppwriteException}
722
755
  * @returns {Promise}
723
756
  */
724
- listProviders() {
757
+ listFactors() {
725
758
  return __awaiter(this, void 0, void 0, function* () {
726
- const apiPath = '/account/mfa/providers';
759
+ const apiPath = '/account/mfa/factors';
727
760
  const payload = {};
728
761
  const uri = new URL(this.client.config.endpoint + apiPath);
729
762
  return yield this.client.call('get', uri, {
@@ -735,16 +768,16 @@
735
768
  * Add Authenticator
736
769
  *
737
770
  *
738
- * @param {string} provider
771
+ * @param {Type} type
739
772
  * @throws {AppwriteException}
740
773
  * @returns {Promise}
741
774
  */
742
- addAuthenticator(provider) {
775
+ addAuthenticator(type) {
743
776
  return __awaiter(this, void 0, void 0, function* () {
744
- if (typeof provider === 'undefined') {
745
- throw new AppwriteException('Missing required parameter: "provider"');
777
+ if (typeof type === 'undefined') {
778
+ throw new AppwriteException('Missing required parameter: "type"');
746
779
  }
747
- const apiPath = '/account/mfa/{provider}'.replace('{provider}', provider);
780
+ const apiPath = '/account/mfa/{type}'.replace('{type}', type);
748
781
  const payload = {};
749
782
  const uri = new URL(this.client.config.endpoint + apiPath);
750
783
  return yield this.client.call('post', uri, {
@@ -756,20 +789,20 @@
756
789
  * Verify Authenticator
757
790
  *
758
791
  *
759
- * @param {string} provider
792
+ * @param {Type} type
760
793
  * @param {string} otp
761
794
  * @throws {AppwriteException}
762
795
  * @returns {Promise}
763
796
  */
764
- verifyAuthenticator(provider, otp) {
797
+ verifyAuthenticator(type, otp) {
765
798
  return __awaiter(this, void 0, void 0, function* () {
766
- if (typeof provider === 'undefined') {
767
- throw new AppwriteException('Missing required parameter: "provider"');
799
+ if (typeof type === 'undefined') {
800
+ throw new AppwriteException('Missing required parameter: "type"');
768
801
  }
769
802
  if (typeof otp === 'undefined') {
770
803
  throw new AppwriteException('Missing required parameter: "otp"');
771
804
  }
772
- const apiPath = '/account/mfa/{provider}'.replace('{provider}', provider);
805
+ const apiPath = '/account/mfa/{type}'.replace('{type}', type);
773
806
  const payload = {};
774
807
  if (typeof otp !== 'undefined') {
775
808
  payload['otp'] = otp;
@@ -780,6 +813,34 @@
780
813
  }, payload);
781
814
  });
782
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
+ }
783
844
  /**
784
845
  * Update name
785
846
  *
@@ -973,11 +1034,10 @@
973
1034
  * @param {string} userId
974
1035
  * @param {string} secret
975
1036
  * @param {string} password
976
- * @param {string} passwordAgain
977
1037
  * @throws {AppwriteException}
978
1038
  * @returns {Promise}
979
1039
  */
980
- updateRecovery(userId, secret, password, passwordAgain) {
1040
+ updateRecovery(userId, secret, password) {
981
1041
  return __awaiter(this, void 0, void 0, function* () {
982
1042
  if (typeof userId === 'undefined') {
983
1043
  throw new AppwriteException('Missing required parameter: "userId"');
@@ -988,9 +1048,6 @@
988
1048
  if (typeof password === 'undefined') {
989
1049
  throw new AppwriteException('Missing required parameter: "password"');
990
1050
  }
991
- if (typeof passwordAgain === 'undefined') {
992
- throw new AppwriteException('Missing required parameter: "passwordAgain"');
993
- }
994
1051
  const apiPath = '/account/recovery';
995
1052
  const payload = {};
996
1053
  if (typeof userId !== 'undefined') {
@@ -1002,9 +1059,6 @@
1002
1059
  if (typeof password !== 'undefined') {
1003
1060
  payload['password'] = password;
1004
1061
  }
1005
- if (typeof passwordAgain !== 'undefined') {
1006
- payload['passwordAgain'] = passwordAgain;
1007
- }
1008
1062
  const uri = new URL(this.client.config.endpoint + apiPath);
1009
1063
  return yield this.client.call('put', uri, {
1010
1064
  'content-type': 'application/json',
@@ -1074,7 +1128,7 @@
1074
1128
  });
1075
1129
  }
1076
1130
  /**
1077
- * Create email session
1131
+ * Create email password session
1078
1132
  *
1079
1133
  * Allow the user to login into their account by providing a valid email and
1080
1134
  * password combination. This route will create a new session for the user.
@@ -1088,7 +1142,7 @@
1088
1142
  * @throws {AppwriteException}
1089
1143
  * @returns {Promise}
1090
1144
  */
1091
- createEmailSession(email, password) {
1145
+ createEmailPasswordSession(email, password) {
1092
1146
  return __awaiter(this, void 0, void 0, function* () {
1093
1147
  if (typeof email === 'undefined') {
1094
1148
  throw new AppwriteException('Missing required parameter: "email"');
@@ -1111,70 +1165,11 @@
1111
1165
  });
1112
1166
  }
1113
1167
  /**
1114
- * Create magic URL session
1115
- *
1116
- * Sends the user an email with a secret key for creating a session. If the
1117
- * provided user ID has not been registered, a new user will be created. When
1118
- * the user clicks the link in the email, the user is redirected back to the
1119
- * URL you provided with the secret key and userId values attached to the URL
1120
- * query string. Use the query string parameters to submit a request to the
1121
- * [PUT
1122
- * /account/sessions/magic-url](https://appwrite.io/docs/references/cloud/client-web/account#updateMagicURLSession)
1123
- * endpoint to complete the login process. The link sent to the user's email
1124
- * address is valid for 1 hour. If you are on a mobile device you can leave
1125
- * the URL parameter empty, so that the login completion will be handled by
1126
- * your Appwrite instance by default.
1127
- *
1128
- * A user is limited to 10 active sessions at a time by default. [Learn more
1129
- * about session
1130
- * limits](https://appwrite.io/docs/authentication-security#limits).
1168
+ * Create session (deprecated)
1131
1169
  *
1132
- *
1133
- * @param {string} userId
1134
- * @param {string} email
1135
- * @param {string} url
1136
- * @throws {AppwriteException}
1137
- * @returns {Promise}
1138
- */
1139
- createMagicURLSession(userId, email, url) {
1140
- return __awaiter(this, void 0, void 0, function* () {
1141
- if (typeof userId === 'undefined') {
1142
- throw new AppwriteException('Missing required parameter: "userId"');
1143
- }
1144
- if (typeof email === 'undefined') {
1145
- throw new AppwriteException('Missing required parameter: "email"');
1146
- }
1147
- const apiPath = '/account/sessions/magic-url';
1148
- const payload = {};
1149
- if (typeof userId !== 'undefined') {
1150
- payload['userId'] = userId;
1151
- }
1152
- if (typeof email !== 'undefined') {
1153
- payload['email'] = email;
1154
- }
1155
- if (typeof url !== 'undefined') {
1156
- payload['url'] = url;
1157
- }
1158
- const uri = new URL(this.client.config.endpoint + apiPath);
1159
- return yield this.client.call('post', uri, {
1160
- 'content-type': 'application/json',
1161
- }, payload);
1162
- });
1163
- }
1164
- /**
1165
- * Create magic URL session (confirmation)
1166
- *
1167
- * Use this endpoint to complete creating the session with the Magic URL. Both
1168
- * the **userId** and **secret** arguments will be passed as query parameters
1169
- * to the redirect URL you have provided when sending your request to the
1170
- * [POST
1171
- * /account/sessions/magic-url](https://appwrite.io/docs/references/cloud/client-web/account#createMagicURLSession)
1172
- * endpoint.
1173
- *
1174
- * Please note that in order to avoid a [Redirect
1175
- * Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md)
1176
- * the only valid redirect URLs are the ones from domains you have set when
1177
- * 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.
1178
1173
  *
1179
1174
  * @param {string} userId
1180
1175
  * @param {string} secret
@@ -1223,14 +1218,15 @@
1223
1218
  * limits](https://appwrite.io/docs/authentication-security#limits).
1224
1219
  *
1225
1220
  *
1226
- * @param {string} provider
1221
+ * @param {OAuthProvider} provider
1227
1222
  * @param {string} success
1228
1223
  * @param {string} failure
1224
+ * @param {boolean} token
1229
1225
  * @param {string[]} scopes
1230
1226
  * @throws {AppwriteException}
1231
1227
  * @returns {void|string}
1232
1228
  */
1233
- createOAuth2Session(provider, success, failure, scopes) {
1229
+ createOAuth2Session(provider, success, failure, token, scopes) {
1234
1230
  if (typeof provider === 'undefined') {
1235
1231
  throw new AppwriteException('Missing required parameter: "provider"');
1236
1232
  }
@@ -1242,6 +1238,9 @@
1242
1238
  if (typeof failure !== 'undefined') {
1243
1239
  payload['failure'] = failure;
1244
1240
  }
1241
+ if (typeof token !== 'undefined') {
1242
+ payload['token'] = token;
1243
+ }
1245
1244
  if (typeof scopes !== 'undefined') {
1246
1245
  payload['scopes'] = scopes;
1247
1246
  }
@@ -1258,61 +1257,18 @@
1258
1257
  }
1259
1258
  }
1260
1259
  /**
1261
- * Create phone session
1262
- *
1263
- * Sends the user an SMS with a secret key for creating a session. If the
1264
- * provided user ID has not be registered, a new user will be created. Use the
1265
- * returned user ID and secret and submit a request to the [PUT
1266
- * /account/sessions/phone](https://appwrite.io/docs/references/cloud/client-web/account#updatePhoneSession)
1267
- * endpoint to complete the login process. The secret sent to the user's phone
1268
- * is valid for 15 minutes.
1269
- *
1270
- * A user is limited to 10 active sessions at a time by default. [Learn more
1271
- * about session
1272
- * limits](https://appwrite.io/docs/authentication-security#limits).
1273
- *
1274
- * @param {string} userId
1275
- * @param {string} phone
1276
- * @throws {AppwriteException}
1277
- * @returns {Promise}
1278
- */
1279
- createPhoneSession(userId, phone) {
1280
- return __awaiter(this, void 0, void 0, function* () {
1281
- if (typeof userId === 'undefined') {
1282
- throw new AppwriteException('Missing required parameter: "userId"');
1283
- }
1284
- if (typeof phone === 'undefined') {
1285
- throw new AppwriteException('Missing required parameter: "phone"');
1286
- }
1287
- const apiPath = '/account/sessions/phone';
1288
- const payload = {};
1289
- if (typeof userId !== 'undefined') {
1290
- payload['userId'] = userId;
1291
- }
1292
- if (typeof phone !== 'undefined') {
1293
- payload['phone'] = phone;
1294
- }
1295
- const uri = new URL(this.client.config.endpoint + apiPath);
1296
- return yield this.client.call('post', uri, {
1297
- 'content-type': 'application/json',
1298
- }, payload);
1299
- });
1300
- }
1301
- /**
1302
- * Create phone session (confirmation)
1260
+ * Create session
1303
1261
  *
1304
- * Use this endpoint to complete creating a session with SMS. Use the
1305
- * **userId** from the
1306
- * [createPhoneSession](https://appwrite.io/docs/references/cloud/client-web/account#createPhoneSession)
1307
- * endpoint and the **secret** received via SMS to successfully update and
1308
- * 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.
1309
1265
  *
1310
1266
  * @param {string} userId
1311
1267
  * @param {string} secret
1312
1268
  * @throws {AppwriteException}
1313
1269
  * @returns {Promise}
1314
1270
  */
1315
- updatePhoneSession(userId, secret) {
1271
+ createSession(userId, secret) {
1316
1272
  return __awaiter(this, void 0, void 0, function* () {
1317
1273
  if (typeof userId === 'undefined') {
1318
1274
  throw new AppwriteException('Missing required parameter: "userId"');
@@ -1320,7 +1276,7 @@
1320
1276
  if (typeof secret === 'undefined') {
1321
1277
  throw new AppwriteException('Missing required parameter: "secret"');
1322
1278
  }
1323
- const apiPath = '/account/sessions/phone';
1279
+ const apiPath = '/account/sessions/token';
1324
1280
  const payload = {};
1325
1281
  if (typeof userId !== 'undefined') {
1326
1282
  payload['userId'] = userId;
@@ -1329,7 +1285,7 @@
1329
1285
  payload['secret'] = secret;
1330
1286
  }
1331
1287
  const uri = new URL(this.client.config.endpoint + apiPath);
1332
- return yield this.client.call('put', uri, {
1288
+ return yield this.client.call('post', uri, {
1333
1289
  'content-type': 'application/json',
1334
1290
  }, payload);
1335
1291
  });
@@ -1358,11 +1314,10 @@
1358
1314
  });
1359
1315
  }
1360
1316
  /**
1361
- * Update OAuth session (refresh tokens)
1317
+ * Update (or renew) a session
1362
1318
  *
1363
- * Access tokens have limited lifespan and expire to mitigate security risks.
1364
- * If session was created using an OAuth provider, this route can be used to
1365
- * "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.
1366
1321
  *
1367
1322
  * @param {string} sessionId
1368
1323
  * @throws {AppwriteException}
@@ -1427,6 +1382,231 @@
1427
1382
  }, payload);
1428
1383
  });
1429
1384
  }
1385
+ /**
1386
+ * Create a push target
1387
+ *
1388
+ *
1389
+ * @param {string} targetId
1390
+ * @param {string} identifier
1391
+ * @param {string} providerId
1392
+ * @throws {AppwriteException}
1393
+ * @returns {Promise}
1394
+ */
1395
+ createPushTarget(targetId, identifier, providerId) {
1396
+ return __awaiter(this, void 0, void 0, function* () {
1397
+ if (typeof targetId === 'undefined') {
1398
+ throw new AppwriteException('Missing required parameter: "targetId"');
1399
+ }
1400
+ if (typeof identifier === 'undefined') {
1401
+ throw new AppwriteException('Missing required parameter: "identifier"');
1402
+ }
1403
+ const apiPath = '/account/targets/push';
1404
+ const payload = {};
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;
1413
+ }
1414
+ const uri = new URL(this.client.config.endpoint + apiPath);
1415
+ return yield this.client.call('post', uri, {
1416
+ 'content-type': 'application/json',
1417
+ }, payload);
1418
+ });
1419
+ }
1420
+ /**
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
+ }
1430
1610
  /**
1431
1611
  * Create email verification
1432
1612
  *
@@ -1581,7 +1761,7 @@
1581
1761
  * image at source quality. If dimensions are not specified, the default size
1582
1762
  * of image returned is 100x100px.
1583
1763
  *
1584
- * @param {string} code
1764
+ * @param {Browser} code
1585
1765
  * @param {number} width
1586
1766
  * @param {number} height
1587
1767
  * @param {number} quality
@@ -1623,7 +1803,7 @@
1623
1803
  * of image returned is 100x100px.
1624
1804
  *
1625
1805
  *
1626
- * @param {string} code
1806
+ * @param {CreditCard} code
1627
1807
  * @param {number} width
1628
1808
  * @param {number} height
1629
1809
  * @param {number} quality
@@ -1693,7 +1873,7 @@
1693
1873
  * of image returned is 100x100px.
1694
1874
  *
1695
1875
  *
1696
- * @param {string} code
1876
+ * @param {Flag} code
1697
1877
  * @param {number} width
1698
1878
  * @param {number} height
1699
1879
  * @param {number} quality
@@ -1980,7 +2160,7 @@
1980
2160
  * Get usage stats for the database
1981
2161
  *
1982
2162
  *
1983
- * @param {string} range
2163
+ * @param {DatabaseUsageRange} range
1984
2164
  * @throws {AppwriteException}
1985
2165
  * @returns {Promise}
1986
2166
  */
@@ -3011,11 +3191,11 @@
3011
3191
  * @param {string} databaseId
3012
3192
  * @param {string} collectionId
3013
3193
  * @param {string} relatedCollectionId
3014
- * @param {string} type
3194
+ * @param {RelationshipType} type
3015
3195
  * @param {boolean} twoWay
3016
3196
  * @param {string} key
3017
3197
  * @param {string} twoWayKey
3018
- * @param {string} onDelete
3198
+ * @param {RelationMutate} onDelete
3019
3199
  * @throws {AppwriteException}
3020
3200
  * @returns {Promise}
3021
3201
  */
@@ -3328,7 +3508,7 @@
3328
3508
  * @param {string} databaseId
3329
3509
  * @param {string} collectionId
3330
3510
  * @param {string} key
3331
- * @param {string} onDelete
3511
+ * @param {RelationMutate} onDelete
3332
3512
  * @throws {AppwriteException}
3333
3513
  * @returns {Promise}
3334
3514
  */
@@ -3606,7 +3786,7 @@
3606
3786
  * @param {string} databaseId
3607
3787
  * @param {string} collectionId
3608
3788
  * @param {string} key
3609
- * @param {string} type
3789
+ * @param {IndexType} type
3610
3790
  * @param {string[]} attributes
3611
3791
  * @param {string[]} orders
3612
3792
  * @throws {AppwriteException}
@@ -3743,7 +3923,7 @@
3743
3923
  *
3744
3924
  * @param {string} databaseId
3745
3925
  * @param {string} collectionId
3746
- * @param {string} range
3926
+ * @param {DatabaseUsageRange} range
3747
3927
  * @throws {AppwriteException}
3748
3928
  * @returns {Promise}
3749
3929
  */
@@ -3797,7 +3977,7 @@
3797
3977
  *
3798
3978
  *
3799
3979
  * @param {string} databaseId
3800
- * @param {string} range
3980
+ * @param {DatabaseUsageRange} range
3801
3981
  * @throws {AppwriteException}
3802
3982
  * @returns {Promise}
3803
3983
  */
@@ -3860,7 +4040,7 @@
3860
4040
  *
3861
4041
  * @param {string} functionId
3862
4042
  * @param {string} name
3863
- * @param {string} runtime
4043
+ * @param {Runtime} runtime
3864
4044
  * @param {string[]} execute
3865
4045
  * @param {string[]} events
3866
4046
  * @param {string} schedule
@@ -3982,7 +4162,7 @@
3982
4162
  * Get functions usage
3983
4163
  *
3984
4164
  *
3985
- * @param {string} range
4165
+ * @param {FunctionUsageRange} range
3986
4166
  * @throws {AppwriteException}
3987
4167
  * @returns {Promise}
3988
4168
  */
@@ -4028,7 +4208,7 @@
4028
4208
  *
4029
4209
  * @param {string} functionId
4030
4210
  * @param {string} name
4031
- * @param {string} runtime
4211
+ * @param {Runtime} runtime
4032
4212
  * @param {string[]} execute
4033
4213
  * @param {string[]} events
4034
4214
  * @param {string} schedule
@@ -4425,7 +4605,7 @@
4425
4605
  * @param {string} body
4426
4606
  * @param {boolean} async
4427
4607
  * @param {string} xpath
4428
- * @param {string} method
4608
+ * @param {ExecutionMethod} method
4429
4609
  * @param {object} headers
4430
4610
  * @throws {AppwriteException}
4431
4611
  * @returns {Promise}
@@ -4489,7 +4669,7 @@
4489
4669
  *
4490
4670
  *
4491
4671
  * @param {string} functionId
4492
- * @param {string} range
4672
+ * @param {FunctionUsageRange} range
4493
4673
  * @throws {AppwriteException}
4494
4674
  * @returns {Promise}
4495
4675
  */
@@ -4776,6 +4956,28 @@
4776
4956
  }, payload);
4777
4957
  });
4778
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
+ }
4779
4981
  /**
4780
4982
  * Get DB
4781
4983
  *
@@ -4928,6 +5130,33 @@
4928
5130
  }, payload);
4929
5131
  });
4930
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
+ }
4931
5160
  /**
4932
5161
  * Get functions queue
4933
5162
  *
@@ -5279,7 +5508,7 @@
5279
5508
  * List messages
5280
5509
  *
5281
5510
  *
5282
- * @param {string} queries
5511
+ * @param {string[]} queries
5283
5512
  * @param {string} search
5284
5513
  * @throws {AppwriteException}
5285
5514
  * @returns {Promise}
@@ -5310,14 +5539,15 @@
5310
5539
  * @param {string[]} topics
5311
5540
  * @param {string[]} users
5312
5541
  * @param {string[]} targets
5313
- * @param {string} description
5314
- * @param {string} status
5542
+ * @param {string[]} cc
5543
+ * @param {string[]} bcc
5544
+ * @param {MessageStatus} status
5315
5545
  * @param {boolean} html
5316
5546
  * @param {string} scheduledAt
5317
5547
  * @throws {AppwriteException}
5318
5548
  * @returns {Promise}
5319
5549
  */
5320
- createEmailMessage(messageId, subject, content, topics, users, targets, description, status, html, scheduledAt) {
5550
+ createEmail(messageId, subject, content, topics, users, targets, cc, bcc, status, html, scheduledAt) {
5321
5551
  return __awaiter(this, void 0, void 0, function* () {
5322
5552
  if (typeof messageId === 'undefined') {
5323
5553
  throw new AppwriteException('Missing required parameter: "messageId"');
@@ -5348,8 +5578,11 @@
5348
5578
  if (typeof targets !== 'undefined') {
5349
5579
  payload['targets'] = targets;
5350
5580
  }
5351
- if (typeof description !== 'undefined') {
5352
- payload['description'] = description;
5581
+ if (typeof cc !== 'undefined') {
5582
+ payload['cc'] = cc;
5583
+ }
5584
+ if (typeof bcc !== 'undefined') {
5585
+ payload['bcc'] = bcc;
5353
5586
  }
5354
5587
  if (typeof status !== 'undefined') {
5355
5588
  payload['status'] = status;
@@ -5375,15 +5608,16 @@
5375
5608
  * @param {string[]} users
5376
5609
  * @param {string[]} targets
5377
5610
  * @param {string} subject
5378
- * @param {string} description
5379
5611
  * @param {string} content
5380
- * @param {string} status
5612
+ * @param {MessageStatus} status
5381
5613
  * @param {boolean} html
5614
+ * @param {string[]} cc
5615
+ * @param {string[]} bcc
5382
5616
  * @param {string} scheduledAt
5383
5617
  * @throws {AppwriteException}
5384
5618
  * @returns {Promise}
5385
5619
  */
5386
- updateEmail(messageId, topics, users, targets, subject, description, content, status, html, scheduledAt) {
5620
+ updateEmail(messageId, topics, users, targets, subject, content, status, html, cc, bcc, scheduledAt) {
5387
5621
  return __awaiter(this, void 0, void 0, function* () {
5388
5622
  if (typeof messageId === 'undefined') {
5389
5623
  throw new AppwriteException('Missing required parameter: "messageId"');
@@ -5402,9 +5636,6 @@
5402
5636
  if (typeof subject !== 'undefined') {
5403
5637
  payload['subject'] = subject;
5404
5638
  }
5405
- if (typeof description !== 'undefined') {
5406
- payload['description'] = description;
5407
- }
5408
5639
  if (typeof content !== 'undefined') {
5409
5640
  payload['content'] = content;
5410
5641
  }
@@ -5414,6 +5645,12 @@
5414
5645
  if (typeof html !== 'undefined') {
5415
5646
  payload['html'] = html;
5416
5647
  }
5648
+ if (typeof cc !== 'undefined') {
5649
+ payload['cc'] = cc;
5650
+ }
5651
+ if (typeof bcc !== 'undefined') {
5652
+ payload['bcc'] = bcc;
5653
+ }
5417
5654
  if (typeof scheduledAt !== 'undefined') {
5418
5655
  payload['scheduledAt'] = scheduledAt;
5419
5656
  }
@@ -5433,7 +5670,6 @@
5433
5670
  * @param {string[]} topics
5434
5671
  * @param {string[]} users
5435
5672
  * @param {string[]} targets
5436
- * @param {string} description
5437
5673
  * @param {object} data
5438
5674
  * @param {string} action
5439
5675
  * @param {string} icon
@@ -5441,12 +5677,12 @@
5441
5677
  * @param {string} color
5442
5678
  * @param {string} tag
5443
5679
  * @param {string} badge
5444
- * @param {string} status
5680
+ * @param {MessageStatus} status
5445
5681
  * @param {string} scheduledAt
5446
5682
  * @throws {AppwriteException}
5447
5683
  * @returns {Promise}
5448
5684
  */
5449
- createPushMessage(messageId, title, body, topics, users, targets, description, data, action, icon, sound, color, tag, badge, status, scheduledAt) {
5685
+ createPush(messageId, title, body, topics, users, targets, data, action, icon, sound, color, tag, badge, status, scheduledAt) {
5450
5686
  return __awaiter(this, void 0, void 0, function* () {
5451
5687
  if (typeof messageId === 'undefined') {
5452
5688
  throw new AppwriteException('Missing required parameter: "messageId"');
@@ -5477,9 +5713,6 @@
5477
5713
  if (typeof targets !== 'undefined') {
5478
5714
  payload['targets'] = targets;
5479
5715
  }
5480
- if (typeof description !== 'undefined') {
5481
- payload['description'] = description;
5482
- }
5483
5716
  if (typeof data !== 'undefined') {
5484
5717
  payload['data'] = data;
5485
5718
  }
@@ -5521,7 +5754,6 @@
5521
5754
  * @param {string[]} topics
5522
5755
  * @param {string[]} users
5523
5756
  * @param {string[]} targets
5524
- * @param {string} description
5525
5757
  * @param {string} title
5526
5758
  * @param {string} body
5527
5759
  * @param {object} data
@@ -5530,13 +5762,13 @@
5530
5762
  * @param {string} sound
5531
5763
  * @param {string} color
5532
5764
  * @param {string} tag
5533
- * @param {string} badge
5534
- * @param {string} status
5765
+ * @param {number} badge
5766
+ * @param {MessageStatus} status
5535
5767
  * @param {string} scheduledAt
5536
5768
  * @throws {AppwriteException}
5537
5769
  * @returns {Promise}
5538
5770
  */
5539
- updatePushNotification(messageId, topics, users, targets, description, title, body, data, action, icon, sound, color, tag, badge, status, scheduledAt) {
5771
+ updatePush(messageId, topics, users, targets, title, body, data, action, icon, sound, color, tag, badge, status, scheduledAt) {
5540
5772
  return __awaiter(this, void 0, void 0, function* () {
5541
5773
  if (typeof messageId === 'undefined') {
5542
5774
  throw new AppwriteException('Missing required parameter: "messageId"');
@@ -5552,9 +5784,6 @@
5552
5784
  if (typeof targets !== 'undefined') {
5553
5785
  payload['targets'] = targets;
5554
5786
  }
5555
- if (typeof description !== 'undefined') {
5556
- payload['description'] = description;
5557
- }
5558
5787
  if (typeof title !== 'undefined') {
5559
5788
  payload['title'] = title;
5560
5789
  }
@@ -5603,13 +5832,12 @@
5603
5832
  * @param {string[]} topics
5604
5833
  * @param {string[]} users
5605
5834
  * @param {string[]} targets
5606
- * @param {string} description
5607
- * @param {string} status
5835
+ * @param {MessageStatus} status
5608
5836
  * @param {string} scheduledAt
5609
5837
  * @throws {AppwriteException}
5610
5838
  * @returns {Promise}
5611
5839
  */
5612
- createSMSMessage(messageId, content, topics, users, targets, description, status, scheduledAt) {
5840
+ createSMS(messageId, content, topics, users, targets, status, scheduledAt) {
5613
5841
  return __awaiter(this, void 0, void 0, function* () {
5614
5842
  if (typeof messageId === 'undefined') {
5615
5843
  throw new AppwriteException('Missing required parameter: "messageId"');
@@ -5634,9 +5862,6 @@
5634
5862
  if (typeof targets !== 'undefined') {
5635
5863
  payload['targets'] = targets;
5636
5864
  }
5637
- if (typeof description !== 'undefined') {
5638
- payload['description'] = description;
5639
- }
5640
5865
  if (typeof status !== 'undefined') {
5641
5866
  payload['status'] = status;
5642
5867
  }
@@ -5657,14 +5882,13 @@
5657
5882
  * @param {string[]} topics
5658
5883
  * @param {string[]} users
5659
5884
  * @param {string[]} targets
5660
- * @param {string} description
5661
5885
  * @param {string} content
5662
- * @param {string} status
5886
+ * @param {MessageStatus} status
5663
5887
  * @param {string} scheduledAt
5664
5888
  * @throws {AppwriteException}
5665
5889
  * @returns {Promise}
5666
5890
  */
5667
- updateSMS(messageId, topics, users, targets, description, content, status, scheduledAt) {
5891
+ updateSMS(messageId, topics, users, targets, content, status, scheduledAt) {
5668
5892
  return __awaiter(this, void 0, void 0, function* () {
5669
5893
  if (typeof messageId === 'undefined') {
5670
5894
  throw new AppwriteException('Missing required parameter: "messageId"');
@@ -5680,9 +5904,6 @@
5680
5904
  if (typeof targets !== 'undefined') {
5681
5905
  payload['targets'] = targets;
5682
5906
  }
5683
- if (typeof description !== 'undefined') {
5684
- payload['description'] = description;
5685
- }
5686
5907
  if (typeof content !== 'undefined') {
5687
5908
  payload['content'] = content;
5688
5909
  }
@@ -5693,20 +5914,41 @@
5693
5914
  payload['scheduledAt'] = scheduledAt;
5694
5915
  }
5695
5916
  const uri = new URL(this.client.config.endpoint + apiPath);
5696
- return yield this.client.call('patch', uri, {
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, {
5697
5939
  'content-type': 'application/json',
5698
5940
  }, payload);
5699
5941
  });
5700
5942
  }
5701
5943
  /**
5702
- * Get a message
5944
+ * Delete a message
5703
5945
  *
5704
5946
  *
5705
5947
  * @param {string} messageId
5706
5948
  * @throws {AppwriteException}
5707
5949
  * @returns {Promise}
5708
5950
  */
5709
- getMessage(messageId) {
5951
+ delete(messageId) {
5710
5952
  return __awaiter(this, void 0, void 0, function* () {
5711
5953
  if (typeof messageId === 'undefined') {
5712
5954
  throw new AppwriteException('Missing required parameter: "messageId"');
@@ -5714,7 +5956,7 @@
5714
5956
  const apiPath = '/messaging/messages/{messageId}'.replace('{messageId}', messageId);
5715
5957
  const payload = {};
5716
5958
  const uri = new URL(this.client.config.endpoint + apiPath);
5717
- return yield this.client.call('get', uri, {
5959
+ return yield this.client.call('delete', uri, {
5718
5960
  'content-type': 'application/json',
5719
5961
  }, payload);
5720
5962
  });
@@ -5744,11 +5986,38 @@
5744
5986
  }, payload);
5745
5987
  });
5746
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
+ }
5747
6016
  /**
5748
6017
  * List providers
5749
6018
  *
5750
6019
  *
5751
- * @param {string} queries
6020
+ * @param {string[]} queries
5752
6021
  * @param {string} search
5753
6022
  * @throws {AppwriteException}
5754
6023
  * @returns {Promise}
@@ -5779,12 +6048,11 @@
5779
6048
  * @param {string} authKeyId
5780
6049
  * @param {string} teamId
5781
6050
  * @param {string} bundleId
5782
- * @param {string} endpoint
5783
6051
  * @param {boolean} enabled
5784
6052
  * @throws {AppwriteException}
5785
6053
  * @returns {Promise}
5786
6054
  */
5787
- createApnsProvider(providerId, name, authKey, authKeyId, teamId, bundleId, endpoint, enabled) {
6055
+ createAPNSProvider(providerId, name, authKey, authKeyId, teamId, bundleId, enabled) {
5788
6056
  return __awaiter(this, void 0, void 0, function* () {
5789
6057
  if (typeof providerId === 'undefined') {
5790
6058
  throw new AppwriteException('Missing required parameter: "providerId"');
@@ -5812,9 +6080,6 @@
5812
6080
  if (typeof bundleId !== 'undefined') {
5813
6081
  payload['bundleId'] = bundleId;
5814
6082
  }
5815
- if (typeof endpoint !== 'undefined') {
5816
- payload['endpoint'] = endpoint;
5817
- }
5818
6083
  if (typeof enabled !== 'undefined') {
5819
6084
  payload['enabled'] = enabled;
5820
6085
  }
@@ -5835,11 +6100,10 @@
5835
6100
  * @param {string} authKeyId
5836
6101
  * @param {string} teamId
5837
6102
  * @param {string} bundleId
5838
- * @param {string} endpoint
5839
6103
  * @throws {AppwriteException}
5840
6104
  * @returns {Promise}
5841
6105
  */
5842
- updateApnsProvider(providerId, name, enabled, authKey, authKeyId, teamId, bundleId, endpoint) {
6106
+ updateAPNSProvider(providerId, name, enabled, authKey, authKeyId, teamId, bundleId) {
5843
6107
  return __awaiter(this, void 0, void 0, function* () {
5844
6108
  if (typeof providerId === 'undefined') {
5845
6109
  throw new AppwriteException('Missing required parameter: "providerId"');
@@ -5864,9 +6128,6 @@
5864
6128
  if (typeof bundleId !== 'undefined') {
5865
6129
  payload['bundleId'] = bundleId;
5866
6130
  }
5867
- if (typeof endpoint !== 'undefined') {
5868
- payload['endpoint'] = endpoint;
5869
- }
5870
6131
  const uri = new URL(this.client.config.endpoint + apiPath);
5871
6132
  return yield this.client.call('patch', uri, {
5872
6133
  'content-type': 'application/json',
@@ -5879,12 +6140,12 @@
5879
6140
  *
5880
6141
  * @param {string} providerId
5881
6142
  * @param {string} name
5882
- * @param {string} serverKey
6143
+ * @param {object} serviceAccountJSON
5883
6144
  * @param {boolean} enabled
5884
6145
  * @throws {AppwriteException}
5885
6146
  * @returns {Promise}
5886
6147
  */
5887
- createFcmProvider(providerId, name, serverKey, enabled) {
6148
+ createFCMProvider(providerId, name, serviceAccountJSON, enabled) {
5888
6149
  return __awaiter(this, void 0, void 0, function* () {
5889
6150
  if (typeof providerId === 'undefined') {
5890
6151
  throw new AppwriteException('Missing required parameter: "providerId"');
@@ -5900,8 +6161,8 @@
5900
6161
  if (typeof name !== 'undefined') {
5901
6162
  payload['name'] = name;
5902
6163
  }
5903
- if (typeof serverKey !== 'undefined') {
5904
- payload['serverKey'] = serverKey;
6164
+ if (typeof serviceAccountJSON !== 'undefined') {
6165
+ payload['serviceAccountJSON'] = serviceAccountJSON;
5905
6166
  }
5906
6167
  if (typeof enabled !== 'undefined') {
5907
6168
  payload['enabled'] = enabled;
@@ -5919,11 +6180,11 @@
5919
6180
  * @param {string} providerId
5920
6181
  * @param {string} name
5921
6182
  * @param {boolean} enabled
5922
- * @param {string} serverKey
6183
+ * @param {object} serviceAccountJSON
5923
6184
  * @throws {AppwriteException}
5924
6185
  * @returns {Promise}
5925
6186
  */
5926
- updateFcmProvider(providerId, name, enabled, serverKey) {
6187
+ updateFCMProvider(providerId, name, enabled, serviceAccountJSON) {
5927
6188
  return __awaiter(this, void 0, void 0, function* () {
5928
6189
  if (typeof providerId === 'undefined') {
5929
6190
  throw new AppwriteException('Missing required parameter: "providerId"');
@@ -5936,8 +6197,8 @@
5936
6197
  if (typeof enabled !== 'undefined') {
5937
6198
  payload['enabled'] = enabled;
5938
6199
  }
5939
- if (typeof serverKey !== 'undefined') {
5940
- payload['serverKey'] = serverKey;
6200
+ if (typeof serviceAccountJSON !== 'undefined') {
6201
+ payload['serviceAccountJSON'] = serviceAccountJSON;
5941
6202
  }
5942
6203
  const uri = new URL(this.client.config.endpoint + apiPath);
5943
6204
  return yield this.client.call('patch', uri, {
@@ -5951,15 +6212,18 @@
5951
6212
  *
5952
6213
  * @param {string} providerId
5953
6214
  * @param {string} name
5954
- * @param {string} from
5955
6215
  * @param {string} apiKey
5956
6216
  * @param {string} domain
5957
6217
  * @param {boolean} isEuRegion
6218
+ * @param {string} fromName
6219
+ * @param {string} fromEmail
6220
+ * @param {string} replyToName
6221
+ * @param {string} replyToEmail
5958
6222
  * @param {boolean} enabled
5959
6223
  * @throws {AppwriteException}
5960
6224
  * @returns {Promise}
5961
6225
  */
5962
- createMailgunProvider(providerId, name, from, apiKey, domain, isEuRegion, enabled) {
6226
+ createMailgunProvider(providerId, name, apiKey, domain, isEuRegion, fromName, fromEmail, replyToName, replyToEmail, enabled) {
5963
6227
  return __awaiter(this, void 0, void 0, function* () {
5964
6228
  if (typeof providerId === 'undefined') {
5965
6229
  throw new AppwriteException('Missing required parameter: "providerId"');
@@ -5975,9 +6239,6 @@
5975
6239
  if (typeof name !== 'undefined') {
5976
6240
  payload['name'] = name;
5977
6241
  }
5978
- if (typeof from !== 'undefined') {
5979
- payload['from'] = from;
5980
- }
5981
6242
  if (typeof apiKey !== 'undefined') {
5982
6243
  payload['apiKey'] = apiKey;
5983
6244
  }
@@ -5987,6 +6248,18 @@
5987
6248
  if (typeof isEuRegion !== 'undefined') {
5988
6249
  payload['isEuRegion'] = isEuRegion;
5989
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
+ }
5990
6263
  if (typeof enabled !== 'undefined') {
5991
6264
  payload['enabled'] = enabled;
5992
6265
  }
@@ -6002,15 +6275,18 @@
6002
6275
  *
6003
6276
  * @param {string} providerId
6004
6277
  * @param {string} name
6005
- * @param {boolean} enabled
6006
- * @param {boolean} isEuRegion
6007
- * @param {string} from
6008
6278
  * @param {string} apiKey
6009
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
6010
6286
  * @throws {AppwriteException}
6011
6287
  * @returns {Promise}
6012
6288
  */
6013
- updateMailgunProvider(providerId, name, enabled, isEuRegion, from, apiKey, domain) {
6289
+ updateMailgunProvider(providerId, name, apiKey, domain, isEuRegion, enabled, fromName, fromEmail, replyToName, replyToEmail) {
6014
6290
  return __awaiter(this, void 0, void 0, function* () {
6015
6291
  if (typeof providerId === 'undefined') {
6016
6292
  throw new AppwriteException('Missing required parameter: "providerId"');
@@ -6020,20 +6296,29 @@
6020
6296
  if (typeof name !== 'undefined') {
6021
6297
  payload['name'] = name;
6022
6298
  }
6023
- if (typeof enabled !== 'undefined') {
6024
- payload['enabled'] = enabled;
6299
+ if (typeof apiKey !== 'undefined') {
6300
+ payload['apiKey'] = apiKey;
6301
+ }
6302
+ if (typeof domain !== 'undefined') {
6303
+ payload['domain'] = domain;
6025
6304
  }
6026
6305
  if (typeof isEuRegion !== 'undefined') {
6027
6306
  payload['isEuRegion'] = isEuRegion;
6028
6307
  }
6029
- if (typeof from !== 'undefined') {
6030
- payload['from'] = from;
6308
+ if (typeof enabled !== 'undefined') {
6309
+ payload['enabled'] = enabled;
6031
6310
  }
6032
- if (typeof apiKey !== 'undefined') {
6033
- payload['apiKey'] = apiKey;
6311
+ if (typeof fromName !== 'undefined') {
6312
+ payload['fromName'] = fromName;
6034
6313
  }
6035
- if (typeof domain !== 'undefined') {
6036
- payload['domain'] = domain;
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;
6037
6322
  }
6038
6323
  const uri = new URL(this.client.config.endpoint + apiPath);
6039
6324
  return yield this.client.call('patch', uri, {
@@ -6135,13 +6420,16 @@
6135
6420
  *
6136
6421
  * @param {string} providerId
6137
6422
  * @param {string} name
6138
- * @param {string} from
6139
6423
  * @param {string} apiKey
6424
+ * @param {string} fromName
6425
+ * @param {string} fromEmail
6426
+ * @param {string} replyToName
6427
+ * @param {string} replyToEmail
6140
6428
  * @param {boolean} enabled
6141
6429
  * @throws {AppwriteException}
6142
6430
  * @returns {Promise}
6143
6431
  */
6144
- createSendgridProvider(providerId, name, from, apiKey, enabled) {
6432
+ createSendgridProvider(providerId, name, apiKey, fromName, fromEmail, replyToName, replyToEmail, enabled) {
6145
6433
  return __awaiter(this, void 0, void 0, function* () {
6146
6434
  if (typeof providerId === 'undefined') {
6147
6435
  throw new AppwriteException('Missing required parameter: "providerId"');
@@ -6157,12 +6445,21 @@
6157
6445
  if (typeof name !== 'undefined') {
6158
6446
  payload['name'] = name;
6159
6447
  }
6160
- if (typeof from !== 'undefined') {
6161
- payload['from'] = from;
6162
- }
6163
6448
  if (typeof apiKey !== 'undefined') {
6164
6449
  payload['apiKey'] = apiKey;
6165
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
+ }
6166
6463
  if (typeof enabled !== 'undefined') {
6167
6464
  payload['enabled'] = enabled;
6168
6465
  }
@@ -6180,11 +6477,14 @@
6180
6477
  * @param {string} name
6181
6478
  * @param {boolean} enabled
6182
6479
  * @param {string} apiKey
6183
- * @param {string} from
6480
+ * @param {string} fromName
6481
+ * @param {string} fromEmail
6482
+ * @param {string} replyToName
6483
+ * @param {string} replyToEmail
6184
6484
  * @throws {AppwriteException}
6185
6485
  * @returns {Promise}
6186
6486
  */
6187
- updateSendgridProvider(providerId, name, enabled, apiKey, from) {
6487
+ updateSendgridProvider(providerId, name, enabled, apiKey, fromName, fromEmail, replyToName, replyToEmail) {
6188
6488
  return __awaiter(this, void 0, void 0, function* () {
6189
6489
  if (typeof providerId === 'undefined') {
6190
6490
  throw new AppwriteException('Missing required parameter: "providerId"');
@@ -6200,8 +6500,17 @@
6200
6500
  if (typeof apiKey !== 'undefined') {
6201
6501
  payload['apiKey'] = apiKey;
6202
6502
  }
6203
- if (typeof from !== 'undefined') {
6204
- payload['from'] = from;
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;
6205
6514
  }
6206
6515
  const uri = new URL(this.client.config.endpoint + apiPath);
6207
6516
  return yield this.client.call('patch', uri, {
@@ -6210,19 +6519,27 @@
6210
6519
  });
6211
6520
  }
6212
6521
  /**
6213
- * Create Telesign provider
6522
+ * Create SMTP provider
6214
6523
  *
6215
6524
  *
6216
6525
  * @param {string} providerId
6217
6526
  * @param {string} name
6218
- * @param {string} from
6527
+ * @param {string} host
6528
+ * @param {number} port
6219
6529
  * @param {string} username
6220
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
6221
6538
  * @param {boolean} enabled
6222
6539
  * @throws {AppwriteException}
6223
6540
  * @returns {Promise}
6224
6541
  */
6225
- createTelesignProvider(providerId, name, from, username, password, enabled) {
6542
+ createSMTPProvider(providerId, name, host, port, username, password, encryption, autoTLS, mailer, fromName, fromEmail, replyToName, replyToEmail, enabled) {
6226
6543
  return __awaiter(this, void 0, void 0, function* () {
6227
6544
  if (typeof providerId === 'undefined') {
6228
6545
  throw new AppwriteException('Missing required parameter: "providerId"');
@@ -6230,7 +6547,10 @@
6230
6547
  if (typeof name === 'undefined') {
6231
6548
  throw new AppwriteException('Missing required parameter: "name"');
6232
6549
  }
6233
- const apiPath = '/messaging/providers/telesign';
6550
+ if (typeof host === 'undefined') {
6551
+ throw new AppwriteException('Missing required parameter: "host"');
6552
+ }
6553
+ const apiPath = '/messaging/providers/smtp';
6234
6554
  const payload = {};
6235
6555
  if (typeof providerId !== 'undefined') {
6236
6556
  payload['providerId'] = providerId;
@@ -6238,8 +6558,11 @@
6238
6558
  if (typeof name !== 'undefined') {
6239
6559
  payload['name'] = name;
6240
6560
  }
6241
- if (typeof from !== 'undefined') {
6242
- payload['from'] = from;
6561
+ if (typeof host !== 'undefined') {
6562
+ payload['host'] = host;
6563
+ }
6564
+ if (typeof port !== 'undefined') {
6565
+ payload['port'] = port;
6243
6566
  }
6244
6567
  if (typeof username !== 'undefined') {
6245
6568
  payload['username'] = username;
@@ -6247,6 +6570,27 @@
6247
6570
  if (typeof password !== 'undefined') {
6248
6571
  payload['password'] = password;
6249
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
+ }
6250
6594
  if (typeof enabled !== 'undefined') {
6251
6595
  payload['enabled'] = enabled;
6252
6596
  }
@@ -6257,30 +6601,41 @@
6257
6601
  });
6258
6602
  }
6259
6603
  /**
6260
- * Update Telesign provider
6604
+ * Update SMTP provider
6261
6605
  *
6262
6606
  *
6263
6607
  * @param {string} providerId
6264
6608
  * @param {string} name
6265
- * @param {boolean} enabled
6609
+ * @param {string} host
6610
+ * @param {number} port
6266
6611
  * @param {string} username
6267
6612
  * @param {string} password
6268
- * @param {string} from
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
6269
6621
  * @throws {AppwriteException}
6270
6622
  * @returns {Promise}
6271
6623
  */
6272
- updateTelesignProvider(providerId, name, enabled, username, password, from) {
6624
+ updateSMTPProvider(providerId, name, host, port, username, password, encryption, autoTLS, mailer, fromName, fromEmail, replyToName, replyToEmail, enabled) {
6273
6625
  return __awaiter(this, void 0, void 0, function* () {
6274
6626
  if (typeof providerId === 'undefined') {
6275
6627
  throw new AppwriteException('Missing required parameter: "providerId"');
6276
6628
  }
6277
- const apiPath = '/messaging/providers/telesign/{providerId}'.replace('{providerId}', providerId);
6629
+ const apiPath = '/messaging/providers/smtp/{providerId}'.replace('{providerId}', providerId);
6278
6630
  const payload = {};
6279
6631
  if (typeof name !== 'undefined') {
6280
6632
  payload['name'] = name;
6281
6633
  }
6282
- if (typeof enabled !== 'undefined') {
6283
- payload['enabled'] = enabled;
6634
+ if (typeof host !== 'undefined') {
6635
+ payload['host'] = host;
6636
+ }
6637
+ if (typeof port !== 'undefined') {
6638
+ payload['port'] = port;
6284
6639
  }
6285
6640
  if (typeof username !== 'undefined') {
6286
6641
  payload['username'] = username;
@@ -6288,6 +6643,115 @@
6288
6643
  if (typeof password !== 'undefined') {
6289
6644
  payload['password'] = password;
6290
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
+ }
6291
6755
  if (typeof from !== 'undefined') {
6292
6756
  payload['from'] = from;
6293
6757
  }
@@ -6657,7 +7121,7 @@
6657
7121
  * List topics.
6658
7122
  *
6659
7123
  *
6660
- * @param {string} queries
7124
+ * @param {string[]} queries
6661
7125
  * @param {string} search
6662
7126
  * @throws {AppwriteException}
6663
7127
  * @returns {Promise}
@@ -6684,11 +7148,11 @@
6684
7148
  *
6685
7149
  * @param {string} topicId
6686
7150
  * @param {string} name
6687
- * @param {string} description
7151
+ * @param {string[]} subscribe
6688
7152
  * @throws {AppwriteException}
6689
7153
  * @returns {Promise}
6690
7154
  */
6691
- createTopic(topicId, name, description) {
7155
+ createTopic(topicId, name, subscribe) {
6692
7156
  return __awaiter(this, void 0, void 0, function* () {
6693
7157
  if (typeof topicId === 'undefined') {
6694
7158
  throw new AppwriteException('Missing required parameter: "topicId"');
@@ -6704,8 +7168,8 @@
6704
7168
  if (typeof name !== 'undefined') {
6705
7169
  payload['name'] = name;
6706
7170
  }
6707
- if (typeof description !== 'undefined') {
6708
- payload['description'] = description;
7171
+ if (typeof subscribe !== 'undefined') {
7172
+ payload['subscribe'] = subscribe;
6709
7173
  }
6710
7174
  const uri = new URL(this.client.config.endpoint + apiPath);
6711
7175
  return yield this.client.call('post', uri, {
@@ -6740,11 +7204,10 @@
6740
7204
  *
6741
7205
  * @param {string} topicId
6742
7206
  * @param {string} name
6743
- * @param {string} description
6744
7207
  * @throws {AppwriteException}
6745
7208
  * @returns {Promise}
6746
7209
  */
6747
- updateTopic(topicId, name, description) {
7210
+ updateTopic(topicId, name) {
6748
7211
  return __awaiter(this, void 0, void 0, function* () {
6749
7212
  if (typeof topicId === 'undefined') {
6750
7213
  throw new AppwriteException('Missing required parameter: "topicId"');
@@ -6754,9 +7217,6 @@
6754
7217
  if (typeof name !== 'undefined') {
6755
7218
  payload['name'] = name;
6756
7219
  }
6757
- if (typeof description !== 'undefined') {
6758
- payload['description'] = description;
6759
- }
6760
7220
  const uri = new URL(this.client.config.endpoint + apiPath);
6761
7221
  return yield this.client.call('patch', uri, {
6762
7222
  'content-type': 'application/json',
@@ -6814,7 +7274,7 @@
6814
7274
  *
6815
7275
  *
6816
7276
  * @param {string} topicId
6817
- * @param {string} queries
7277
+ * @param {string[]} queries
6818
7278
  * @param {string} search
6819
7279
  * @throws {AppwriteException}
6820
7280
  * @returns {Promise}
@@ -6933,7 +7393,7 @@
6933
7393
  * List Migrations
6934
7394
  *
6935
7395
  *
6936
- * @param {string} queries
7396
+ * @param {string[]} queries
6937
7397
  * @param {string} search
6938
7398
  * @throws {AppwriteException}
6939
7399
  * @returns {Promise}
@@ -7541,16 +8001,30 @@
7541
8001
  * Get usage stats for a project
7542
8002
  *
7543
8003
  *
7544
- * @param {string} range
8004
+ * @param {string} startDate
8005
+ * @param {string} endDate
8006
+ * @param {ProjectUsageRange} period
7545
8007
  * @throws {AppwriteException}
7546
8008
  * @returns {Promise}
7547
8009
  */
7548
- getUsage(range) {
8010
+ getUsage(startDate, endDate, period) {
7549
8011
  return __awaiter(this, void 0, void 0, function* () {
8012
+ if (typeof startDate === 'undefined') {
8013
+ throw new AppwriteException('Missing required parameter: "startDate"');
8014
+ }
8015
+ if (typeof endDate === 'undefined') {
8016
+ throw new AppwriteException('Missing required parameter: "endDate"');
8017
+ }
7550
8018
  const apiPath = '/project/usage';
7551
8019
  const payload = {};
7552
- if (typeof range !== 'undefined') {
7553
- payload['range'] = range;
8020
+ if (typeof startDate !== 'undefined') {
8021
+ payload['startDate'] = startDate;
8022
+ }
8023
+ if (typeof endDate !== 'undefined') {
8024
+ payload['endDate'] = endDate;
8025
+ }
8026
+ if (typeof period !== 'undefined') {
8027
+ payload['period'] = period;
7554
8028
  }
7555
8029
  const uri = new URL(this.client.config.endpoint + apiPath);
7556
8030
  return yield this.client.call('get', uri, {
@@ -7726,7 +8200,7 @@
7726
8200
  * @param {string} projectId
7727
8201
  * @param {string} name
7728
8202
  * @param {string} teamId
7729
- * @param {string} region
8203
+ * @param {Region} region
7730
8204
  * @param {string} description
7731
8205
  * @param {string} logo
7732
8206
  * @param {string} url
@@ -7922,36 +8396,8 @@
7922
8396
  }
7923
8397
  const apiPath = '/projects/{projectId}/auth/duration'.replace('{projectId}', projectId);
7924
8398
  const payload = {};
7925
- if (typeof duration !== 'undefined') {
7926
- payload['duration'] = duration;
7927
- }
7928
- const uri = new URL(this.client.config.endpoint + apiPath);
7929
- return yield this.client.call('patch', uri, {
7930
- 'content-type': 'application/json',
7931
- }, payload);
7932
- });
7933
- }
7934
- /**
7935
- * Update project users limit
7936
- *
7937
- *
7938
- * @param {string} projectId
7939
- * @param {number} limit
7940
- * @throws {AppwriteException}
7941
- * @returns {Promise}
7942
- */
7943
- updateAuthLimit(projectId, limit) {
7944
- return __awaiter(this, void 0, void 0, function* () {
7945
- if (typeof projectId === 'undefined') {
7946
- throw new AppwriteException('Missing required parameter: "projectId"');
7947
- }
7948
- if (typeof limit === 'undefined') {
7949
- throw new AppwriteException('Missing required parameter: "limit"');
7950
- }
7951
- const apiPath = '/projects/{projectId}/auth/limit'.replace('{projectId}', projectId);
7952
- const payload = {};
7953
- if (typeof limit !== 'undefined') {
7954
- payload['limit'] = limit;
8399
+ if (typeof duration !== 'undefined') {
8400
+ payload['duration'] = duration;
7955
8401
  }
7956
8402
  const uri = new URL(this.client.config.endpoint + apiPath);
7957
8403
  return yield this.client.call('patch', uri, {
@@ -7960,7 +8406,7 @@
7960
8406
  });
7961
8407
  }
7962
8408
  /**
7963
- * Update project user sessions limit
8409
+ * Update project users limit
7964
8410
  *
7965
8411
  *
7966
8412
  * @param {string} projectId
@@ -7968,7 +8414,7 @@
7968
8414
  * @throws {AppwriteException}
7969
8415
  * @returns {Promise}
7970
8416
  */
7971
- updateAuthSessionsLimit(projectId, limit) {
8417
+ updateAuthLimit(projectId, limit) {
7972
8418
  return __awaiter(this, void 0, void 0, function* () {
7973
8419
  if (typeof projectId === 'undefined') {
7974
8420
  throw new AppwriteException('Missing required parameter: "projectId"');
@@ -7976,7 +8422,7 @@
7976
8422
  if (typeof limit === 'undefined') {
7977
8423
  throw new AppwriteException('Missing required parameter: "limit"');
7978
8424
  }
7979
- const apiPath = '/projects/{projectId}/auth/max-sessions'.replace('{projectId}', projectId);
8425
+ const apiPath = '/projects/{projectId}/auth/limit'.replace('{projectId}', projectId);
7980
8426
  const payload = {};
7981
8427
  if (typeof limit !== 'undefined') {
7982
8428
  payload['limit'] = limit;
@@ -7988,26 +8434,26 @@
7988
8434
  });
7989
8435
  }
7990
8436
  /**
7991
- * Update Project user minimum sessions factors
8437
+ * Update project user sessions limit
7992
8438
  *
7993
8439
  *
7994
8440
  * @param {string} projectId
7995
- * @param {number} factors
8441
+ * @param {number} limit
7996
8442
  * @throws {AppwriteException}
7997
8443
  * @returns {Promise}
7998
8444
  */
7999
- updateAuthMfaFactors(projectId, factors) {
8445
+ updateAuthSessionsLimit(projectId, limit) {
8000
8446
  return __awaiter(this, void 0, void 0, function* () {
8001
8447
  if (typeof projectId === 'undefined') {
8002
8448
  throw new AppwriteException('Missing required parameter: "projectId"');
8003
8449
  }
8004
- if (typeof factors === 'undefined') {
8005
- throw new AppwriteException('Missing required parameter: "factors"');
8450
+ if (typeof limit === 'undefined') {
8451
+ throw new AppwriteException('Missing required parameter: "limit"');
8006
8452
  }
8007
- const apiPath = '/projects/{projectId}/auth/mfa/factors'.replace('{projectId}', projectId);
8453
+ const apiPath = '/projects/{projectId}/auth/max-sessions'.replace('{projectId}', projectId);
8008
8454
  const payload = {};
8009
- if (typeof factors !== 'undefined') {
8010
- payload['factors'] = factors;
8455
+ if (typeof limit !== 'undefined') {
8456
+ payload['limit'] = limit;
8011
8457
  }
8012
8458
  const uri = new URL(this.client.config.endpoint + apiPath);
8013
8459
  return yield this.client.call('patch', uri, {
@@ -8104,7 +8550,7 @@
8104
8550
  *
8105
8551
  *
8106
8552
  * @param {string} projectId
8107
- * @param {string} method
8553
+ * @param {AuthMethod} method
8108
8554
  * @param {boolean} status
8109
8555
  * @throws {AppwriteException}
8110
8556
  * @returns {Promise}
@@ -8289,7 +8735,7 @@
8289
8735
  *
8290
8736
  *
8291
8737
  * @param {string} projectId
8292
- * @param {string} provider
8738
+ * @param {OAuthProvider} provider
8293
8739
  * @param {string} appId
8294
8740
  * @param {string} secret
8295
8741
  * @param {boolean} enabled
@@ -8350,7 +8796,7 @@
8350
8796
  *
8351
8797
  *
8352
8798
  * @param {string} projectId
8353
- * @param {string} type
8799
+ * @param {PlatformType} type
8354
8800
  * @param {string} name
8355
8801
  * @param {string} key
8356
8802
  * @param {string} store
@@ -8491,7 +8937,7 @@
8491
8937
  *
8492
8938
  *
8493
8939
  * @param {string} projectId
8494
- * @param {string} service
8940
+ * @param {APIService} service
8495
8941
  * @param {boolean} status
8496
8942
  * @throws {AppwriteException}
8497
8943
  * @returns {Promise}
@@ -8550,7 +8996,7 @@
8550
8996
  });
8551
8997
  }
8552
8998
  /**
8553
- * Update SMTP configuration
8999
+ * Update SMTP
8554
9000
  *
8555
9001
  *
8556
9002
  * @param {string} projectId
@@ -8562,11 +9008,11 @@
8562
9008
  * @param {number} port
8563
9009
  * @param {string} username
8564
9010
  * @param {string} password
8565
- * @param {string} secure
9011
+ * @param {SMTPSecure} secure
8566
9012
  * @throws {AppwriteException}
8567
9013
  * @returns {Promise}
8568
9014
  */
8569
- updateSmtpConfiguration(projectId, enabled, senderName, senderEmail, replyTo, host, port, username, password, secure) {
9015
+ updateSmtp(projectId, enabled, senderName, senderEmail, replyTo, host, port, username, password, secure) {
8570
9016
  return __awaiter(this, void 0, void 0, function* () {
8571
9017
  if (typeof projectId === 'undefined') {
8572
9018
  throw new AppwriteException('Missing required parameter: "projectId"');
@@ -8609,6 +9055,75 @@
8609
9055
  }, payload);
8610
9056
  });
8611
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
+ }
8612
9127
  /**
8613
9128
  * Update Project Team
8614
9129
  *
@@ -8642,8 +9157,8 @@
8642
9157
  *
8643
9158
  *
8644
9159
  * @param {string} projectId
8645
- * @param {string} type
8646
- * @param {string} locale
9160
+ * @param {EmailTemplateType} type
9161
+ * @param {EmailTemplateLocale} locale
8647
9162
  * @throws {AppwriteException}
8648
9163
  * @returns {Promise}
8649
9164
  */
@@ -8671,8 +9186,8 @@
8671
9186
  *
8672
9187
  *
8673
9188
  * @param {string} projectId
8674
- * @param {string} type
8675
- * @param {string} locale
9189
+ * @param {EmailTemplateType} type
9190
+ * @param {EmailTemplateLocale} locale
8676
9191
  * @param {string} subject
8677
9192
  * @param {string} message
8678
9193
  * @param {string} senderName
@@ -8726,8 +9241,8 @@
8726
9241
  *
8727
9242
  *
8728
9243
  * @param {string} projectId
8729
- * @param {string} type
8730
- * @param {string} locale
9244
+ * @param {EmailTemplateType} type
9245
+ * @param {EmailTemplateLocale} locale
8731
9246
  * @throws {AppwriteException}
8732
9247
  * @returns {Promise}
8733
9248
  */
@@ -8755,8 +9270,8 @@
8755
9270
  *
8756
9271
  *
8757
9272
  * @param {string} projectId
8758
- * @param {string} type
8759
- * @param {string} locale
9273
+ * @param {SMSTemplateType} type
9274
+ * @param {SMSTemplateLocale} locale
8760
9275
  * @throws {AppwriteException}
8761
9276
  * @returns {Promise}
8762
9277
  */
@@ -8784,8 +9299,8 @@
8784
9299
  *
8785
9300
  *
8786
9301
  * @param {string} projectId
8787
- * @param {string} type
8788
- * @param {string} locale
9302
+ * @param {SMSTemplateType} type
9303
+ * @param {SMSTemplateLocale} locale
8789
9304
  * @param {string} message
8790
9305
  * @throws {AppwriteException}
8791
9306
  * @returns {Promise}
@@ -8820,8 +9335,8 @@
8820
9335
  *
8821
9336
  *
8822
9337
  * @param {string} projectId
8823
- * @param {string} type
8824
- * @param {string} locale
9338
+ * @param {SMSTemplateType} type
9339
+ * @param {SMSTemplateLocale} locale
8825
9340
  * @throws {AppwriteException}
8826
9341
  * @returns {Promise}
8827
9342
  */
@@ -8844,31 +9359,6 @@
8844
9359
  }, payload);
8845
9360
  });
8846
9361
  }
8847
- /**
8848
- * Get usage stats for a project
8849
- *
8850
- *
8851
- * @param {string} projectId
8852
- * @param {string} range
8853
- * @throws {AppwriteException}
8854
- * @returns {Promise}
8855
- */
8856
- getUsage(projectId, range) {
8857
- return __awaiter(this, void 0, void 0, function* () {
8858
- if (typeof projectId === 'undefined') {
8859
- throw new AppwriteException('Missing required parameter: "projectId"');
8860
- }
8861
- const apiPath = '/projects/{projectId}/usage'.replace('{projectId}', projectId);
8862
- const payload = {};
8863
- if (typeof range !== 'undefined') {
8864
- payload['range'] = range;
8865
- }
8866
- const uri = new URL(this.client.config.endpoint + apiPath);
8867
- return yield this.client.call('get', uri, {
8868
- 'content-type': 'application/json',
8869
- }, payload);
8870
- });
8871
- }
8872
9362
  /**
8873
9363
  * List webhooks
8874
9364
  *
@@ -8899,12 +9389,13 @@
8899
9389
  * @param {string[]} events
8900
9390
  * @param {string} url
8901
9391
  * @param {boolean} security
9392
+ * @param {boolean} enabled
8902
9393
  * @param {string} httpUser
8903
9394
  * @param {string} httpPass
8904
9395
  * @throws {AppwriteException}
8905
9396
  * @returns {Promise}
8906
9397
  */
8907
- createWebhook(projectId, name, events, url, security, httpUser, httpPass) {
9398
+ createWebhook(projectId, name, events, url, security, enabled, httpUser, httpPass) {
8908
9399
  return __awaiter(this, void 0, void 0, function* () {
8909
9400
  if (typeof projectId === 'undefined') {
8910
9401
  throw new AppwriteException('Missing required parameter: "projectId"');
@@ -8926,6 +9417,9 @@
8926
9417
  if (typeof name !== 'undefined') {
8927
9418
  payload['name'] = name;
8928
9419
  }
9420
+ if (typeof enabled !== 'undefined') {
9421
+ payload['enabled'] = enabled;
9422
+ }
8929
9423
  if (typeof events !== 'undefined') {
8930
9424
  payload['events'] = events;
8931
9425
  }
@@ -8982,12 +9476,13 @@
8982
9476
  * @param {string[]} events
8983
9477
  * @param {string} url
8984
9478
  * @param {boolean} security
9479
+ * @param {boolean} enabled
8985
9480
  * @param {string} httpUser
8986
9481
  * @param {string} httpPass
8987
9482
  * @throws {AppwriteException}
8988
9483
  * @returns {Promise}
8989
9484
  */
8990
- updateWebhook(projectId, webhookId, name, events, url, security, httpUser, httpPass) {
9485
+ updateWebhook(projectId, webhookId, name, events, url, security, enabled, httpUser, httpPass) {
8991
9486
  return __awaiter(this, void 0, void 0, function* () {
8992
9487
  if (typeof projectId === 'undefined') {
8993
9488
  throw new AppwriteException('Missing required parameter: "projectId"');
@@ -9012,6 +9507,9 @@
9012
9507
  if (typeof name !== 'undefined') {
9013
9508
  payload['name'] = name;
9014
9509
  }
9510
+ if (typeof enabled !== 'undefined') {
9511
+ payload['enabled'] = enabled;
9512
+ }
9015
9513
  if (typeof events !== 'undefined') {
9016
9514
  payload['events'] = events;
9017
9515
  }
@@ -9122,7 +9620,7 @@
9122
9620
  * Create a new proxy rule.
9123
9621
  *
9124
9622
  * @param {string} domain
9125
- * @param {string} resourceType
9623
+ * @param {ResourceType} resourceType
9126
9624
  * @param {string} resourceId
9127
9625
  * @throws {AppwriteException}
9128
9626
  * @returns {Promise}
@@ -9262,7 +9760,7 @@
9262
9760
  * @param {boolean} enabled
9263
9761
  * @param {number} maximumFileSize
9264
9762
  * @param {string[]} allowedFileExtensions
9265
- * @param {string} compression
9763
+ * @param {Compression} compression
9266
9764
  * @param {boolean} encryption
9267
9765
  * @param {boolean} antivirus
9268
9766
  * @throws {AppwriteException}
@@ -9349,7 +9847,7 @@
9349
9847
  * @param {boolean} enabled
9350
9848
  * @param {number} maximumFileSize
9351
9849
  * @param {string[]} allowedFileExtensions
9352
- * @param {string} compression
9850
+ * @param {Compression} compression
9353
9851
  * @param {boolean} encryption
9354
9852
  * @param {boolean} antivirus
9355
9853
  * @throws {AppwriteException}
@@ -9678,7 +10176,7 @@
9678
10176
  * @param {string} fileId
9679
10177
  * @param {number} width
9680
10178
  * @param {number} height
9681
- * @param {string} gravity
10179
+ * @param {ImageGravity} gravity
9682
10180
  * @param {number} quality
9683
10181
  * @param {number} borderWidth
9684
10182
  * @param {string} borderColor
@@ -9686,7 +10184,7 @@
9686
10184
  * @param {number} opacity
9687
10185
  * @param {number} rotation
9688
10186
  * @param {string} background
9689
- * @param {string} output
10187
+ * @param {ImageFormat} output
9690
10188
  * @throws {AppwriteException}
9691
10189
  * @returns {URL}
9692
10190
  */
@@ -9771,7 +10269,7 @@
9771
10269
  * Get usage stats for storage
9772
10270
  *
9773
10271
  *
9774
- * @param {string} range
10272
+ * @param {StorageUsageRange} range
9775
10273
  * @throws {AppwriteException}
9776
10274
  * @returns {Promise}
9777
10275
  */
@@ -9789,11 +10287,11 @@
9789
10287
  });
9790
10288
  }
9791
10289
  /**
9792
- * Get usage stats for a storage bucket
10290
+ * Get usage stats for storage bucket
9793
10291
  *
9794
10292
  *
9795
10293
  * @param {string} bucketId
9796
- * @param {string} range
10294
+ * @param {StorageUsageRange} range
9797
10295
  * @throws {AppwriteException}
9798
10296
  * @returns {Promise}
9799
10297
  */
@@ -10447,7 +10945,7 @@
10447
10945
  *
10448
10946
  * Get identities for all users.
10449
10947
  *
10450
- * @param {string} queries
10948
+ * @param {string[]} queries
10451
10949
  * @param {string} search
10452
10950
  * @throws {AppwriteException}
10453
10951
  * @returns {Promise}
@@ -10469,7 +10967,7 @@
10469
10967
  });
10470
10968
  }
10471
10969
  /**
10472
- * Delete Identity
10970
+ * Delete identity
10473
10971
  *
10474
10972
  * Delete an identity by its unique ID.
10475
10973
  *
@@ -10742,7 +11240,7 @@
10742
11240
  * @param {string} userId
10743
11241
  * @param {string} email
10744
11242
  * @param {string} password
10745
- * @param {string} passwordVersion
11243
+ * @param {PasswordHash} passwordVersion
10746
11244
  * @param {string} name
10747
11245
  * @throws {AppwriteException}
10748
11246
  * @returns {Promise}
@@ -10785,21 +11283,17 @@
10785
11283
  * Get usage stats for the users API
10786
11284
  *
10787
11285
  *
10788
- * @param {string} range
10789
- * @param {string} provider
11286
+ * @param {UserUsageRange} range
10790
11287
  * @throws {AppwriteException}
10791
11288
  * @returns {Promise}
10792
11289
  */
10793
- getUsage(range, provider) {
11290
+ getUsage(range) {
10794
11291
  return __awaiter(this, void 0, void 0, function* () {
10795
11292
  const apiPath = '/users/usage';
10796
11293
  const payload = {};
10797
11294
  if (typeof range !== 'undefined') {
10798
11295
  payload['range'] = range;
10799
11296
  }
10800
- if (typeof provider !== 'undefined') {
10801
- payload['provider'] = provider;
10802
- }
10803
11297
  const uri = new URL(this.client.config.endpoint + apiPath);
10804
11298
  return yield this.client.call('get', uri, {
10805
11299
  'content-type': 'application/json',
@@ -10966,6 +11460,87 @@
10966
11460
  }, payload);
10967
11461
  });
10968
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
+ }
10969
11544
  /**
10970
11545
  * Update name
10971
11546
  *
@@ -11128,6 +11703,33 @@
11128
11703
  }, payload);
11129
11704
  });
11130
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
+ }
11131
11733
  /**
11132
11734
  * Delete user sessions
11133
11735
  *
@@ -11211,7 +11813,7 @@
11211
11813
  *
11212
11814
  *
11213
11815
  * @param {string} userId
11214
- * @param {string} queries
11816
+ * @param {string[]} queries
11215
11817
  * @throws {AppwriteException}
11216
11818
  * @returns {Promise}
11217
11819
  */
@@ -11237,7 +11839,7 @@
11237
11839
  *
11238
11840
  * @param {string} userId
11239
11841
  * @param {string} targetId
11240
- * @param {string} providerType
11842
+ * @param {MessagingProviderType} providerType
11241
11843
  * @param {string} identifier
11242
11844
  * @param {string} providerId
11243
11845
  * @param {string} name
@@ -11368,6 +11970,40 @@
11368
11970
  }, payload);
11369
11971
  });
11370
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
+ }
11371
12007
  /**
11372
12008
  * Update email verification
11373
12009
  *
@@ -11793,6 +12429,797 @@
11793
12429
  }
11794
12430
  }
11795
12431
 
12432
+ exports.Factor = void 0;
12433
+ (function (Factor) {
12434
+ Factor["Totp"] = "totp";
12435
+ Factor["Phone"] = "phone";
12436
+ Factor["Email"] = "email";
12437
+ })(exports.Factor || (exports.Factor = {}));
12438
+
12439
+ exports.Type = void 0;
12440
+ (function (Type) {
12441
+ Type["Totp"] = "totp";
12442
+ })(exports.Type || (exports.Type = {}));
12443
+
12444
+ exports.OAuthProvider = void 0;
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
+ })(exports.OAuthProvider || (exports.OAuthProvider = {}));
12486
+
12487
+ exports.Browser = void 0;
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
+ })(exports.Browser || (exports.Browser = {}));
12504
+
12505
+ exports.CreditCard = void 0;
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
+ })(exports.CreditCard || (exports.CreditCard = {}));
12524
+
12525
+ exports.Flag = void 0;
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
+ })(exports.Flag || (exports.Flag = {}));
12722
+
12723
+ exports.DatabaseUsageRange = void 0;
12724
+ (function (DatabaseUsageRange) {
12725
+ DatabaseUsageRange["TwentyFourHours"] = "24h";
12726
+ DatabaseUsageRange["ThirtyDays"] = "30d";
12727
+ DatabaseUsageRange["NinetyDays"] = "90d";
12728
+ })(exports.DatabaseUsageRange || (exports.DatabaseUsageRange = {}));
12729
+
12730
+ exports.RelationshipType = void 0;
12731
+ (function (RelationshipType) {
12732
+ RelationshipType["OneToOne"] = "oneToOne";
12733
+ RelationshipType["ManyToOne"] = "manyToOne";
12734
+ RelationshipType["ManyToMany"] = "manyToMany";
12735
+ RelationshipType["OneToMany"] = "oneToMany";
12736
+ })(exports.RelationshipType || (exports.RelationshipType = {}));
12737
+
12738
+ exports.RelationMutate = void 0;
12739
+ (function (RelationMutate) {
12740
+ RelationMutate["Cascade"] = "cascade";
12741
+ RelationMutate["Restrict"] = "restrict";
12742
+ RelationMutate["SetNull"] = "setNull";
12743
+ })(exports.RelationMutate || (exports.RelationMutate = {}));
12744
+
12745
+ exports.IndexType = void 0;
12746
+ (function (IndexType) {
12747
+ IndexType["Key"] = "key";
12748
+ IndexType["Fulltext"] = "fulltext";
12749
+ IndexType["Unique"] = "unique";
12750
+ IndexType["Spatial"] = "spatial";
12751
+ })(exports.IndexType || (exports.IndexType = {}));
12752
+
12753
+ exports.Runtime = void 0;
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
+ })(exports.Runtime || (exports.Runtime = {}));
12760
+
12761
+ exports.FunctionUsageRange = void 0;
12762
+ (function (FunctionUsageRange) {
12763
+ FunctionUsageRange["TwentyFourHours"] = "24h";
12764
+ FunctionUsageRange["ThirtyDays"] = "30d";
12765
+ FunctionUsageRange["NinetyDays"] = "90d";
12766
+ })(exports.FunctionUsageRange || (exports.FunctionUsageRange = {}));
12767
+
12768
+ exports.ExecutionMethod = void 0;
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
+ })(exports.ExecutionMethod || (exports.ExecutionMethod = {}));
12777
+
12778
+ exports.Name = void 0;
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
+ })(exports.Name || (exports.Name = {}));
12793
+
12794
+ exports.MessageStatus = void 0;
12795
+ (function (MessageStatus) {
12796
+ MessageStatus["Draft"] = "draft";
12797
+ MessageStatus["Scheduled"] = "scheduled";
12798
+ MessageStatus["Processing"] = "processing";
12799
+ })(exports.MessageStatus || (exports.MessageStatus = {}));
12800
+
12801
+ exports.SMTPEncryption = void 0;
12802
+ (function (SMTPEncryption) {
12803
+ SMTPEncryption["None"] = "none";
12804
+ SMTPEncryption["Ssl"] = "ssl";
12805
+ SMTPEncryption["Tls"] = "tls";
12806
+ })(exports.SMTPEncryption || (exports.SMTPEncryption = {}));
12807
+
12808
+ exports.ProjectUsageRange = void 0;
12809
+ (function (ProjectUsageRange) {
12810
+ ProjectUsageRange["OneHour"] = "1h";
12811
+ ProjectUsageRange["OneDay"] = "1d";
12812
+ })(exports.ProjectUsageRange || (exports.ProjectUsageRange = {}));
12813
+
12814
+ exports.Region = void 0;
12815
+ (function (Region) {
12816
+ Region["Default"] = "default";
12817
+ })(exports.Region || (exports.Region = {}));
12818
+
12819
+ exports.AuthMethod = void 0;
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
+ })(exports.AuthMethod || (exports.AuthMethod = {}));
12829
+
12830
+ exports.PlatformType = void 0;
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
+ })(exports.PlatformType || (exports.PlatformType = {}));
12846
+
12847
+ exports.APIService = void 0;
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
+ })(exports.APIService || (exports.APIService = {}));
12861
+
12862
+ exports.SMTPSecure = void 0;
12863
+ (function (SMTPSecure) {
12864
+ SMTPSecure["Tls"] = "tls";
12865
+ })(exports.SMTPSecure || (exports.SMTPSecure = {}));
12866
+
12867
+ exports.EmailTemplateType = void 0;
12868
+ (function (EmailTemplateType) {
12869
+ EmailTemplateType["Verification"] = "verification";
12870
+ EmailTemplateType["Magicsession"] = "magicsession";
12871
+ EmailTemplateType["Recovery"] = "recovery";
12872
+ EmailTemplateType["Invitation"] = "invitation";
12873
+ })(exports.EmailTemplateType || (exports.EmailTemplateType = {}));
12874
+
12875
+ exports.EmailTemplateLocale = void 0;
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
+ })(exports.EmailTemplateLocale || (exports.EmailTemplateLocale = {}));
13009
+
13010
+ exports.SMSTemplateType = void 0;
13011
+ (function (SMSTemplateType) {
13012
+ SMSTemplateType["Verification"] = "verification";
13013
+ SMSTemplateType["Login"] = "login";
13014
+ SMSTemplateType["Invitation"] = "invitation";
13015
+ })(exports.SMSTemplateType || (exports.SMSTemplateType = {}));
13016
+
13017
+ exports.SMSTemplateLocale = void 0;
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
+ })(exports.SMSTemplateLocale || (exports.SMSTemplateLocale = {}));
13151
+
13152
+ exports.ResourceType = void 0;
13153
+ (function (ResourceType) {
13154
+ ResourceType["Api"] = "api";
13155
+ ResourceType["Function"] = "function";
13156
+ })(exports.ResourceType || (exports.ResourceType = {}));
13157
+
13158
+ exports.Compression = void 0;
13159
+ (function (Compression) {
13160
+ Compression["None"] = "none";
13161
+ Compression["Gzip"] = "gzip";
13162
+ Compression["Zstd"] = "zstd";
13163
+ })(exports.Compression || (exports.Compression = {}));
13164
+
13165
+ exports.ImageGravity = void 0;
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
+ })(exports.ImageGravity || (exports.ImageGravity = {}));
13177
+
13178
+ exports.ImageFormat = void 0;
13179
+ (function (ImageFormat) {
13180
+ ImageFormat["Jpg"] = "jpg";
13181
+ ImageFormat["Jpeg"] = "jpeg";
13182
+ ImageFormat["Gif"] = "gif";
13183
+ ImageFormat["Png"] = "png";
13184
+ ImageFormat["Webp"] = "webp";
13185
+ })(exports.ImageFormat || (exports.ImageFormat = {}));
13186
+
13187
+ exports.StorageUsageRange = void 0;
13188
+ (function (StorageUsageRange) {
13189
+ StorageUsageRange["TwentyFourHours"] = "24h";
13190
+ StorageUsageRange["ThirtyDays"] = "30d";
13191
+ StorageUsageRange["NinetyDays"] = "90d";
13192
+ })(exports.StorageUsageRange || (exports.StorageUsageRange = {}));
13193
+
13194
+ exports.PasswordHash = void 0;
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
+ })(exports.PasswordHash || (exports.PasswordHash = {}));
13208
+
13209
+ exports.UserUsageRange = void 0;
13210
+ (function (UserUsageRange) {
13211
+ UserUsageRange["TwentyFourHours"] = "24h";
13212
+ UserUsageRange["ThirtyDays"] = "30d";
13213
+ UserUsageRange["NinetyDays"] = "90d";
13214
+ })(exports.UserUsageRange || (exports.UserUsageRange = {}));
13215
+
13216
+ exports.MessagingProviderType = void 0;
13217
+ (function (MessagingProviderType) {
13218
+ MessagingProviderType["Email"] = "email";
13219
+ MessagingProviderType["Sms"] = "sms";
13220
+ MessagingProviderType["Push"] = "push";
13221
+ })(exports.MessagingProviderType || (exports.MessagingProviderType = {}));
13222
+
11796
13223
  exports.Account = Account;
11797
13224
  exports.AppwriteException = AppwriteException;
11798
13225
  exports.Assistant = Assistant;