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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (480) hide show
  1. package/.travis.yml +32 -0
  2. package/README.md +6 -6
  3. package/dist/cjs/sdk.js +1839 -338
  4. package/dist/cjs/sdk.js.map +1 -1
  5. package/dist/esm/sdk.js +1840 -339
  6. package/dist/esm/sdk.js.map +1 -1
  7. package/dist/iife/sdk.js +1839 -338
  8. package/docs/examples/account/create-anonymous-session.md +5 -12
  9. package/docs/examples/account/create-email-password-session.md +8 -12
  10. package/docs/examples/account/create-email-token.md +9 -12
  11. package/docs/examples/account/create-j-w-t.md +5 -12
  12. package/docs/examples/account/create-magic-u-r-l-token.md +10 -12
  13. package/docs/examples/account/create-mfa-authenticator.md +13 -0
  14. package/docs/examples/account/create-mfa-challenge.md +13 -0
  15. package/docs/examples/account/create-mfa-recovery-codes.md +11 -0
  16. package/docs/examples/account/create-o-auth2session.md +10 -9
  17. package/docs/examples/account/create-o-auth2token.md +15 -0
  18. package/docs/examples/account/create-phone-token.md +8 -12
  19. package/docs/examples/account/create-phone-verification.md +5 -12
  20. package/docs/examples/account/create-push-target.md +9 -12
  21. package/docs/examples/account/create-recovery.md +8 -12
  22. package/docs/examples/account/create-session.md +8 -12
  23. package/docs/examples/account/create-verification.md +7 -12
  24. package/docs/examples/account/create.md +10 -12
  25. package/docs/examples/account/delete-identity.md +7 -12
  26. package/docs/examples/account/delete-mfa-authenticator.md +14 -0
  27. package/docs/examples/account/delete-push-target.md +13 -0
  28. package/docs/examples/account/delete-session.md +7 -12
  29. package/docs/examples/account/delete-sessions.md +5 -12
  30. package/docs/examples/account/delete.md +5 -12
  31. package/docs/examples/account/get-mfa-recovery-codes.md +11 -0
  32. package/docs/examples/account/get-prefs.md +5 -12
  33. package/docs/examples/account/get-session.md +7 -12
  34. package/docs/examples/account/get.md +5 -12
  35. package/docs/examples/account/list-identities.md +7 -12
  36. package/docs/examples/account/list-logs.md +7 -12
  37. package/docs/examples/account/list-mfa-factors.md +11 -0
  38. package/docs/examples/account/list-sessions.md +5 -12
  39. package/docs/examples/account/update-email.md +8 -12
  40. package/docs/examples/account/update-m-f-a.md +7 -12
  41. package/docs/examples/account/update-magic-u-r-l-session.md +8 -12
  42. package/docs/examples/account/update-mfa-authenticator.md +14 -0
  43. package/docs/examples/account/update-mfa-challenge.md +14 -0
  44. package/docs/examples/account/update-mfa-recovery-codes.md +11 -0
  45. package/docs/examples/account/update-name.md +7 -12
  46. package/docs/examples/account/update-password.md +8 -12
  47. package/docs/examples/account/update-phone-session.md +14 -0
  48. package/docs/examples/account/update-phone-verification.md +8 -12
  49. package/docs/examples/account/update-phone.md +8 -12
  50. package/docs/examples/account/update-prefs.md +7 -12
  51. package/docs/examples/account/update-push-target.md +8 -12
  52. package/docs/examples/account/update-recovery.md +9 -12
  53. package/docs/examples/account/update-session.md +7 -12
  54. package/docs/examples/account/update-status.md +5 -12
  55. package/docs/examples/account/update-verification.md +8 -12
  56. package/docs/examples/assistant/chat.md +7 -12
  57. package/docs/examples/avatars/get-browser.md +11 -9
  58. package/docs/examples/avatars/get-credit-card.md +11 -9
  59. package/docs/examples/avatars/get-favicon.md +7 -8
  60. package/docs/examples/avatars/get-flag.md +11 -9
  61. package/docs/examples/avatars/get-image.md +9 -8
  62. package/docs/examples/avatars/get-initials.md +10 -8
  63. package/docs/examples/avatars/get-q-r.md +10 -8
  64. package/docs/examples/console/variables.md +5 -12
  65. package/docs/examples/databases/create-boolean-attribute.md +12 -12
  66. package/docs/examples/databases/create-collection.md +12 -12
  67. package/docs/examples/databases/create-datetime-attribute.md +12 -12
  68. package/docs/examples/databases/create-document.md +11 -12
  69. package/docs/examples/databases/create-email-attribute.md +12 -12
  70. package/docs/examples/databases/create-enum-attribute.md +13 -12
  71. package/docs/examples/databases/create-float-attribute.md +14 -12
  72. package/docs/examples/databases/create-index.md +13 -13
  73. package/docs/examples/databases/create-integer-attribute.md +14 -12
  74. package/docs/examples/databases/create-ip-attribute.md +12 -12
  75. package/docs/examples/databases/create-relationship-attribute.md +15 -13
  76. package/docs/examples/databases/create-string-attribute.md +14 -12
  77. package/docs/examples/databases/create-url-attribute.md +12 -12
  78. package/docs/examples/databases/create.md +9 -12
  79. package/docs/examples/databases/delete-attribute.md +9 -12
  80. package/docs/examples/databases/delete-collection.md +8 -12
  81. package/docs/examples/databases/delete-document.md +9 -12
  82. package/docs/examples/databases/delete-index.md +9 -12
  83. package/docs/examples/databases/delete.md +7 -12
  84. package/docs/examples/databases/get-attribute.md +9 -12
  85. package/docs/examples/databases/get-collection-usage.md +10 -13
  86. package/docs/examples/databases/get-collection.md +8 -12
  87. package/docs/examples/databases/get-database-usage.md +9 -13
  88. package/docs/examples/databases/get-document.md +10 -12
  89. package/docs/examples/databases/get-index.md +9 -12
  90. package/docs/examples/databases/get-usage.md +8 -13
  91. package/docs/examples/databases/get.md +7 -12
  92. package/docs/examples/databases/list-attributes.md +9 -12
  93. package/docs/examples/databases/list-collection-logs.md +9 -12
  94. package/docs/examples/databases/list-collections.md +9 -12
  95. package/docs/examples/databases/list-document-logs.md +10 -12
  96. package/docs/examples/databases/list-documents.md +9 -12
  97. package/docs/examples/databases/list-indexes.md +9 -12
  98. package/docs/examples/databases/list-logs.md +8 -12
  99. package/docs/examples/databases/list.md +8 -12
  100. package/docs/examples/databases/update-boolean-attribute.md +11 -12
  101. package/docs/examples/databases/update-collection.md +12 -12
  102. package/docs/examples/databases/update-datetime-attribute.md +11 -12
  103. package/docs/examples/databases/update-document.md +11 -12
  104. package/docs/examples/databases/update-email-attribute.md +11 -12
  105. package/docs/examples/databases/update-enum-attribute.md +12 -12
  106. package/docs/examples/databases/update-float-attribute.md +13 -12
  107. package/docs/examples/databases/update-integer-attribute.md +13 -12
  108. package/docs/examples/databases/update-ip-attribute.md +11 -12
  109. package/docs/examples/databases/update-relationship-attribute.md +11 -13
  110. package/docs/examples/databases/update-string-attribute.md +11 -12
  111. package/docs/examples/databases/update-url-attribute.md +11 -12
  112. package/docs/examples/databases/update.md +9 -12
  113. package/docs/examples/functions/create-build.md +9 -12
  114. package/docs/examples/functions/create-deployment.md +11 -12
  115. package/docs/examples/functions/create-execution.md +13 -13
  116. package/docs/examples/functions/create-variable.md +9 -12
  117. package/docs/examples/functions/create.md +27 -13
  118. package/docs/examples/functions/delete-deployment.md +8 -12
  119. package/docs/examples/functions/delete-variable.md +8 -12
  120. package/docs/examples/functions/delete.md +7 -12
  121. package/docs/examples/functions/download-deployment.md +8 -8
  122. package/docs/examples/functions/get-deployment.md +8 -12
  123. package/docs/examples/functions/get-execution.md +8 -12
  124. package/docs/examples/functions/get-function-usage.md +9 -13
  125. package/docs/examples/functions/get-usage.md +8 -13
  126. package/docs/examples/functions/get-variable.md +8 -12
  127. package/docs/examples/functions/get.md +7 -12
  128. package/docs/examples/functions/list-deployments.md +9 -12
  129. package/docs/examples/functions/list-executions.md +9 -12
  130. package/docs/examples/functions/list-runtimes.md +5 -12
  131. package/docs/examples/functions/list-variables.md +7 -12
  132. package/docs/examples/functions/list.md +8 -12
  133. package/docs/examples/functions/update-deployment.md +8 -12
  134. package/docs/examples/functions/update-variable.md +10 -12
  135. package/docs/examples/functions/update.md +23 -13
  136. package/docs/examples/graphql/mutation.md +7 -12
  137. package/docs/examples/graphql/query.md +7 -12
  138. package/docs/examples/health/get-antivirus.md +5 -12
  139. package/docs/examples/health/get-cache.md +5 -12
  140. package/docs/examples/health/get-certificate.md +13 -0
  141. package/docs/examples/health/get-d-b.md +5 -12
  142. package/docs/examples/health/get-failed-jobs.md +14 -0
  143. package/docs/examples/health/get-pub-sub.md +5 -12
  144. package/docs/examples/health/get-queue-builds.md +7 -12
  145. package/docs/examples/health/get-queue-certificates.md +7 -12
  146. package/docs/examples/health/get-queue-databases.md +8 -12
  147. package/docs/examples/health/get-queue-deletes.md +7 -12
  148. package/docs/examples/health/get-queue-functions.md +7 -12
  149. package/docs/examples/health/get-queue-logs.md +7 -12
  150. package/docs/examples/health/get-queue-mails.md +7 -12
  151. package/docs/examples/health/get-queue-messaging.md +7 -12
  152. package/docs/examples/health/get-queue-migrations.md +7 -12
  153. package/docs/examples/health/get-queue-usage-dump.md +13 -0
  154. package/docs/examples/health/get-queue-usage.md +13 -0
  155. package/docs/examples/health/get-queue-webhooks.md +7 -12
  156. package/docs/examples/health/get-queue.md +5 -12
  157. package/docs/examples/health/get-storage-local.md +5 -12
  158. package/docs/examples/health/get-storage.md +11 -0
  159. package/docs/examples/health/get-time.md +5 -12
  160. package/docs/examples/health/get.md +5 -12
  161. package/docs/examples/locale/get.md +5 -12
  162. package/docs/examples/locale/list-codes.md +5 -12
  163. package/docs/examples/locale/list-continents.md +5 -12
  164. package/docs/examples/locale/list-countries-e-u.md +5 -12
  165. package/docs/examples/locale/list-countries-phones.md +5 -12
  166. package/docs/examples/locale/list-countries.md +5 -12
  167. package/docs/examples/locale/list-currencies.md +5 -12
  168. package/docs/examples/locale/list-languages.md +5 -12
  169. package/docs/examples/messaging/create-apns-provider.md +20 -0
  170. package/docs/examples/messaging/create-email.md +18 -12
  171. package/docs/examples/messaging/create-fcm-provider.md +16 -0
  172. package/docs/examples/messaging/create-mailgun-provider.md +16 -12
  173. package/docs/examples/messaging/create-msg91provider.md +12 -12
  174. package/docs/examples/messaging/create-push.md +22 -12
  175. package/docs/examples/messaging/create-sendgrid-provider.md +14 -12
  176. package/docs/examples/messaging/create-sms.md +19 -0
  177. package/docs/examples/messaging/create-smtp-provider.md +26 -0
  178. package/docs/examples/messaging/create-subscriber.md +9 -12
  179. package/docs/examples/messaging/create-telesign-provider.md +12 -12
  180. package/docs/examples/messaging/create-textmagic-provider.md +12 -12
  181. package/docs/examples/messaging/create-topic.md +9 -12
  182. package/docs/examples/messaging/create-twilio-provider.md +12 -12
  183. package/docs/examples/messaging/create-vonage-provider.md +12 -12
  184. package/docs/examples/messaging/delete-provider.md +7 -12
  185. package/docs/examples/messaging/delete-subscriber.md +8 -12
  186. package/docs/examples/messaging/delete-topic.md +7 -12
  187. package/docs/examples/messaging/delete.md +13 -0
  188. package/docs/examples/messaging/get-message.md +7 -12
  189. package/docs/examples/messaging/get-provider.md +7 -12
  190. package/docs/examples/messaging/get-subscriber.md +8 -12
  191. package/docs/examples/messaging/get-topic.md +7 -12
  192. package/docs/examples/messaging/list-message-logs.md +8 -12
  193. package/docs/examples/messaging/list-messages.md +8 -12
  194. package/docs/examples/messaging/list-provider-logs.md +8 -12
  195. package/docs/examples/messaging/list-providers.md +8 -12
  196. package/docs/examples/messaging/list-subscriber-logs.md +8 -12
  197. package/docs/examples/messaging/list-subscribers.md +9 -12
  198. package/docs/examples/messaging/list-targets.md +8 -12
  199. package/docs/examples/messaging/list-topic-logs.md +8 -12
  200. package/docs/examples/messaging/list-topics.md +8 -12
  201. package/docs/examples/messaging/update-apns-provider.md +20 -0
  202. package/docs/examples/messaging/update-email.md +17 -12
  203. package/docs/examples/messaging/update-fcm-provider.md +16 -0
  204. package/docs/examples/messaging/update-mailgun-provider.md +16 -12
  205. package/docs/examples/messaging/update-msg91provider.md +12 -12
  206. package/docs/examples/messaging/update-push.md +28 -0
  207. package/docs/examples/messaging/update-sendgrid-provider.md +14 -12
  208. package/docs/examples/messaging/update-sms.md +19 -0
  209. package/docs/examples/messaging/update-smtp-provider.md +26 -0
  210. package/docs/examples/messaging/update-telesign-provider.md +12 -12
  211. package/docs/examples/messaging/update-textmagic-provider.md +12 -12
  212. package/docs/examples/messaging/update-topic.md +9 -12
  213. package/docs/examples/messaging/update-twilio-provider.md +12 -12
  214. package/docs/examples/messaging/update-vonage-provider.md +12 -12
  215. package/docs/examples/migrations/create-appwrite-migration.md +10 -12
  216. package/docs/examples/migrations/create-firebase-migration.md +8 -12
  217. package/docs/examples/migrations/create-firebase-o-auth-migration.md +8 -12
  218. package/docs/examples/migrations/create-n-host-migration.md +14 -12
  219. package/docs/examples/migrations/create-supabase-migration.md +13 -12
  220. package/docs/examples/migrations/delete-firebase-auth.md +5 -12
  221. package/docs/examples/migrations/delete.md +7 -12
  222. package/docs/examples/migrations/get-appwrite-report.md +10 -12
  223. package/docs/examples/migrations/get-firebase-report-o-auth.md +8 -12
  224. package/docs/examples/migrations/get-firebase-report.md +8 -12
  225. package/docs/examples/migrations/get-n-host-report.md +14 -12
  226. package/docs/examples/migrations/get-supabase-report.md +13 -12
  227. package/docs/examples/migrations/get.md +7 -12
  228. package/docs/examples/migrations/list-firebase-projects.md +5 -12
  229. package/docs/examples/migrations/list.md +8 -12
  230. package/docs/examples/migrations/retry.md +7 -12
  231. package/docs/examples/project/create-variable.md +8 -12
  232. package/docs/examples/project/delete-variable.md +7 -12
  233. package/docs/examples/project/get-usage.md +10 -13
  234. package/docs/examples/project/get-variable.md +7 -12
  235. package/docs/examples/project/list-variables.md +5 -12
  236. package/docs/examples/project/update-variable.md +9 -12
  237. package/docs/examples/projects/create-key.md +10 -12
  238. package/docs/examples/projects/create-platform.md +13 -13
  239. package/docs/examples/projects/create-smtp-test.md +17 -13
  240. package/docs/examples/projects/create-webhook.md +14 -12
  241. package/docs/examples/projects/create.md +20 -13
  242. package/docs/examples/projects/delete-email-template.md +10 -13
  243. package/docs/examples/projects/delete-key.md +8 -12
  244. package/docs/examples/projects/delete-platform.md +8 -12
  245. package/docs/examples/projects/delete-sms-template.md +10 -13
  246. package/docs/examples/projects/delete-webhook.md +8 -12
  247. package/docs/examples/projects/delete.md +7 -12
  248. package/docs/examples/projects/get-email-template.md +10 -13
  249. package/docs/examples/projects/get-key.md +8 -12
  250. package/docs/examples/projects/get-platform.md +8 -12
  251. package/docs/examples/projects/get-sms-template.md +10 -13
  252. package/docs/examples/projects/get-webhook.md +8 -12
  253. package/docs/examples/projects/get.md +7 -12
  254. package/docs/examples/projects/list-keys.md +7 -12
  255. package/docs/examples/projects/list-platforms.md +7 -12
  256. package/docs/examples/projects/list-webhooks.md +7 -12
  257. package/docs/examples/projects/list.md +8 -12
  258. package/docs/examples/projects/update-api-status-all.md +14 -0
  259. package/docs/examples/projects/update-api-status.md +15 -0
  260. package/docs/examples/projects/update-auth-duration.md +8 -12
  261. package/docs/examples/projects/update-auth-limit.md +8 -12
  262. package/docs/examples/projects/update-auth-password-dictionary.md +8 -12
  263. package/docs/examples/projects/update-auth-password-history.md +8 -12
  264. package/docs/examples/projects/update-auth-sessions-limit.md +8 -12
  265. package/docs/examples/projects/update-auth-status.md +10 -13
  266. package/docs/examples/projects/update-email-template.md +15 -13
  267. package/docs/examples/projects/update-key.md +11 -12
  268. package/docs/examples/projects/update-o-auth2.md +12 -13
  269. package/docs/examples/projects/update-personal-data-check.md +8 -12
  270. package/docs/examples/projects/update-platform.md +12 -12
  271. package/docs/examples/projects/update-service-status-all.md +8 -12
  272. package/docs/examples/projects/update-service-status.md +10 -13
  273. package/docs/examples/projects/update-sms-template.md +11 -13
  274. package/docs/examples/projects/update-smtp.md +17 -13
  275. package/docs/examples/projects/update-team.md +8 -12
  276. package/docs/examples/projects/update-webhook-signature.md +8 -12
  277. package/docs/examples/projects/update-webhook.md +15 -12
  278. package/docs/examples/projects/update.md +17 -12
  279. package/docs/examples/proxy/create-rule.md +10 -13
  280. package/docs/examples/proxy/delete-rule.md +7 -12
  281. package/docs/examples/proxy/get-rule.md +7 -12
  282. package/docs/examples/proxy/list-rules.md +8 -12
  283. package/docs/examples/proxy/update-rule-verification.md +7 -12
  284. package/docs/examples/storage/create-bucket.md +17 -13
  285. package/docs/examples/storage/create-file.md +10 -12
  286. package/docs/examples/storage/delete-bucket.md +7 -12
  287. package/docs/examples/storage/delete-file.md +8 -12
  288. package/docs/examples/storage/get-bucket-usage.md +9 -13
  289. package/docs/examples/storage/get-bucket.md +7 -12
  290. package/docs/examples/storage/get-file-download.md +8 -8
  291. package/docs/examples/storage/get-file-preview.md +20 -9
  292. package/docs/examples/storage/get-file-view.md +8 -8
  293. package/docs/examples/storage/get-file.md +8 -12
  294. package/docs/examples/storage/get-usage.md +8 -13
  295. package/docs/examples/storage/list-buckets.md +8 -12
  296. package/docs/examples/storage/list-files.md +9 -12
  297. package/docs/examples/storage/update-bucket.md +17 -13
  298. package/docs/examples/storage/update-file.md +10 -12
  299. package/docs/examples/teams/create-membership.md +13 -12
  300. package/docs/examples/teams/create.md +9 -12
  301. package/docs/examples/teams/delete-membership.md +8 -12
  302. package/docs/examples/teams/delete.md +7 -12
  303. package/docs/examples/teams/get-membership.md +8 -12
  304. package/docs/examples/teams/get-prefs.md +7 -12
  305. package/docs/examples/teams/get.md +7 -12
  306. package/docs/examples/teams/list-logs.md +8 -12
  307. package/docs/examples/teams/list-memberships.md +9 -12
  308. package/docs/examples/teams/list.md +8 -12
  309. package/docs/examples/teams/update-membership-status.md +10 -12
  310. package/docs/examples/teams/update-membership.md +9 -12
  311. package/docs/examples/teams/update-name.md +8 -12
  312. package/docs/examples/teams/update-prefs.md +8 -12
  313. package/docs/examples/users/create-argon2user.md +10 -12
  314. package/docs/examples/users/create-bcrypt-user.md +10 -12
  315. package/docs/examples/users/create-m-d5user.md +10 -12
  316. package/docs/examples/users/create-mfa-recovery-codes.md +13 -0
  317. package/docs/examples/users/create-p-h-pass-user.md +10 -12
  318. package/docs/examples/users/create-s-h-a-user.md +12 -13
  319. package/docs/examples/users/create-scrypt-modified-user.md +13 -12
  320. package/docs/examples/users/create-scrypt-user.md +15 -12
  321. package/docs/examples/users/create-session.md +7 -12
  322. package/docs/examples/users/create-target.md +13 -13
  323. package/docs/examples/users/create-token.md +9 -12
  324. package/docs/examples/users/create.md +11 -12
  325. package/docs/examples/users/delete-identity.md +7 -12
  326. package/docs/examples/users/delete-mfa-authenticator.md +14 -0
  327. package/docs/examples/users/delete-session.md +8 -12
  328. package/docs/examples/users/delete-sessions.md +7 -12
  329. package/docs/examples/users/delete-target.md +8 -12
  330. package/docs/examples/users/delete.md +7 -12
  331. package/docs/examples/users/get-mfa-recovery-codes.md +13 -0
  332. package/docs/examples/users/get-prefs.md +7 -12
  333. package/docs/examples/users/get-target.md +8 -12
  334. package/docs/examples/users/get-usage.md +8 -13
  335. package/docs/examples/users/get.md +7 -12
  336. package/docs/examples/users/list-identities.md +8 -12
  337. package/docs/examples/users/list-logs.md +8 -12
  338. package/docs/examples/users/list-memberships.md +7 -12
  339. package/docs/examples/users/list-mfa-factors.md +13 -0
  340. package/docs/examples/users/list-sessions.md +7 -12
  341. package/docs/examples/users/list-targets.md +8 -12
  342. package/docs/examples/users/list.md +8 -12
  343. package/docs/examples/users/update-email-verification.md +8 -12
  344. package/docs/examples/users/update-email.md +8 -12
  345. package/docs/examples/users/update-labels.md +8 -12
  346. package/docs/examples/users/update-mfa-recovery-codes.md +13 -0
  347. package/docs/examples/users/update-mfa.md +8 -12
  348. package/docs/examples/users/update-name.md +8 -12
  349. package/docs/examples/users/update-password.md +8 -12
  350. package/docs/examples/users/update-phone-verification.md +8 -12
  351. package/docs/examples/users/update-phone.md +8 -12
  352. package/docs/examples/users/update-prefs.md +8 -12
  353. package/docs/examples/users/update-status.md +8 -12
  354. package/docs/examples/users/update-target.md +11 -12
  355. package/docs/examples/vcs/create-repository-detection.md +9 -12
  356. package/docs/examples/vcs/create-repository.md +9 -12
  357. package/docs/examples/vcs/delete-installation.md +7 -12
  358. package/docs/examples/vcs/get-installation.md +7 -12
  359. package/docs/examples/vcs/get-repository.md +8 -12
  360. package/docs/examples/vcs/list-installations.md +8 -12
  361. package/docs/examples/vcs/list-repositories.md +8 -12
  362. package/docs/examples/vcs/list-repository-branches.md +8 -12
  363. package/docs/examples/vcs/update-external-deployments.md +9 -12
  364. package/package.json +1 -1
  365. package/src/client.ts +3 -3
  366. package/src/enums/api-service.ts +13 -0
  367. package/src/enums/api.ts +5 -0
  368. package/src/enums/auth-method.ts +9 -0
  369. package/src/enums/authentication-factor.ts +6 -0
  370. package/src/enums/authenticator-type.ts +3 -0
  371. package/src/enums/browser.ts +16 -0
  372. package/src/enums/compression.ts +5 -0
  373. package/src/enums/credit-card.ts +18 -0
  374. package/src/enums/database-usage-range.ts +5 -0
  375. package/src/enums/email-template-locale.ts +133 -0
  376. package/src/enums/email-template-type.ts +7 -0
  377. package/src/enums/execution-method.ts +8 -0
  378. package/src/enums/flag.ts +196 -0
  379. package/src/enums/function-usage-range.ts +5 -0
  380. package/src/enums/image-format.ts +7 -0
  381. package/src/enums/image-gravity.ts +11 -0
  382. package/src/enums/index-type.ts +5 -0
  383. package/src/enums/messaging-provider-type.ts +5 -0
  384. package/src/enums/name.ts +15 -0
  385. package/src/enums/o-auth-provider.ts +41 -0
  386. package/src/enums/password-hash.ts +13 -0
  387. package/src/enums/platform-type.ts +15 -0
  388. package/src/enums/project-usage-range.ts +4 -0
  389. package/src/enums/region.ts +4 -0
  390. package/src/enums/relation-mutate.ts +5 -0
  391. package/src/enums/relationship-type.ts +6 -0
  392. package/src/enums/resource-type.ts +4 -0
  393. package/src/enums/runtime.ts +46 -0
  394. package/src/enums/s-m-t-p-secure.ts +3 -0
  395. package/src/enums/sms-template-locale.ts +133 -0
  396. package/src/enums/sms-template-type.ts +6 -0
  397. package/src/enums/smtp-encryption.ts +5 -0
  398. package/src/enums/storage-usage-range.ts +5 -0
  399. package/src/enums/user-usage-range.ts +5 -0
  400. package/src/index.ts +35 -1
  401. package/src/models.ts +61 -23
  402. package/src/query.ts +61 -34
  403. package/src/service.ts +4 -7
  404. package/src/services/account.ts +274 -75
  405. package/src/services/avatars.ts +9 -6
  406. package/src/services/databases.ts +37 -16
  407. package/src/services/functions.ts +13 -10
  408. package/src/services/health.ts +121 -0
  409. package/src/services/messaging.ts +374 -117
  410. package/src/services/migrations.ts +2 -2
  411. package/src/services/project.ts +4 -3
  412. package/src/services/projects.ts +110 -59
  413. package/src/services/proxy.ts +3 -2
  414. package/src/services/storage.ts +17 -13
  415. package/src/services/users.ts +125 -44
  416. package/types/enums/api-service.d.ts +13 -0
  417. package/types/enums/api.d.ts +5 -0
  418. package/types/enums/auth-method.d.ts +9 -0
  419. package/types/enums/authentication-factor.d.ts +6 -0
  420. package/types/enums/authenticator-type.d.ts +3 -0
  421. package/types/enums/browser.d.ts +16 -0
  422. package/types/enums/compression.d.ts +5 -0
  423. package/types/enums/credit-card.d.ts +18 -0
  424. package/types/enums/database-usage-range.d.ts +5 -0
  425. package/types/enums/email-template-locale.d.ts +133 -0
  426. package/types/enums/email-template-type.d.ts +7 -0
  427. package/types/enums/execution-method.d.ts +8 -0
  428. package/types/enums/flag.d.ts +196 -0
  429. package/types/enums/function-usage-range.d.ts +5 -0
  430. package/types/enums/image-format.d.ts +7 -0
  431. package/types/enums/image-gravity.d.ts +11 -0
  432. package/types/enums/index-type.d.ts +5 -0
  433. package/types/enums/messaging-provider-type.d.ts +5 -0
  434. package/types/enums/name.d.ts +15 -0
  435. package/types/enums/o-auth-provider.d.ts +41 -0
  436. package/types/enums/password-hash.d.ts +13 -0
  437. package/types/enums/platform-type.d.ts +15 -0
  438. package/types/enums/project-usage-range.d.ts +4 -0
  439. package/types/enums/region.d.ts +4 -0
  440. package/types/enums/relation-mutate.d.ts +5 -0
  441. package/types/enums/relationship-type.d.ts +6 -0
  442. package/types/enums/resource-type.d.ts +4 -0
  443. package/types/enums/runtime.d.ts +46 -0
  444. package/types/enums/s-m-t-p-secure.d.ts +3 -0
  445. package/types/enums/sms-template-locale.d.ts +133 -0
  446. package/types/enums/sms-template-type.d.ts +6 -0
  447. package/types/enums/smtp-encryption.d.ts +5 -0
  448. package/types/enums/storage-usage-range.d.ts +5 -0
  449. package/types/enums/user-usage-range.d.ts +5 -0
  450. package/types/index.d.ts +34 -0
  451. package/types/models.d.ts +61 -23
  452. package/types/query.d.ts +10 -3
  453. package/types/services/account.d.ts +138 -33
  454. package/types/services/avatars.d.ts +9 -6
  455. package/types/services/databases.d.ts +37 -16
  456. package/types/services/functions.d.ts +13 -10
  457. package/types/services/health.d.ts +56 -0
  458. package/types/services/messaging.d.ts +170 -64
  459. package/types/services/migrations.d.ts +2 -2
  460. package/types/services/project.d.ts +4 -3
  461. package/types/services/projects.d.ts +64 -42
  462. package/types/services/proxy.d.ts +3 -2
  463. package/types/services/storage.d.ts +17 -13
  464. package/types/services/users.d.ts +73 -23
  465. package/docs/examples/account/add-authenticator.md +0 -18
  466. package/docs/examples/account/create-challenge.md +0 -18
  467. package/docs/examples/account/delete-authenticator.md +0 -18
  468. package/docs/examples/account/list-providers.md +0 -18
  469. package/docs/examples/account/update-challenge.md +0 -18
  470. package/docs/examples/account/verify-authenticator.md +0 -18
  471. package/docs/examples/messaging/create-a-p-n-s-provider.md +0 -18
  472. package/docs/examples/messaging/create-f-c-m-provider.md +0 -18
  473. package/docs/examples/messaging/create-s-m-s.md +0 -18
  474. package/docs/examples/messaging/update-a-p-n-s-provider.md +0 -18
  475. package/docs/examples/messaging/update-f-c-m-provider.md +0 -18
  476. package/docs/examples/messaging/update-push-notification.md +0 -18
  477. package/docs/examples/messaging/update-s-m-s.md +0 -18
  478. package/docs/examples/projects/update-auth-mfa-factors.md +0 -18
  479. package/docs/examples/users/delete-authenticator.md +0 -18
  480. package/docs/examples/users/list-providers.md +0 -18
package/dist/iife/sdk.js CHANGED
@@ -32,11 +32,10 @@
32
32
  }
33
33
  static flatten(data, prefix = '') {
34
34
  let output = {};
35
- for (const key in data) {
36
- let value = data[key];
37
- let finalKey = prefix ? `${prefix}[${key}]` : key;
35
+ for (const [key, value] of Object.entries(data)) {
36
+ let finalKey = prefix ? prefix + '[' + key + ']' : key;
38
37
  if (Array.isArray(value)) {
39
- output = Object.assign(output, this.flatten(value, finalKey));
38
+ output = Object.assign(Object.assign({}, output), Service.flatten(value, finalKey));
40
39
  }
41
40
  else {
42
41
  output[finalKey] = value;
@@ -48,34 +47,48 @@
48
47
  Service.CHUNK_SIZE = 5 * 1024 * 1024; // 5MB
49
48
 
50
49
  class Query {
50
+ constructor(method, attribute, values) {
51
+ this.method = method;
52
+ this.attribute = attribute;
53
+ if (values !== undefined) {
54
+ if (Array.isArray(values)) {
55
+ this.values = values;
56
+ }
57
+ else {
58
+ this.values = [values];
59
+ }
60
+ }
61
+ }
62
+ toString() {
63
+ return JSON.stringify({
64
+ method: this.method,
65
+ attribute: this.attribute,
66
+ values: this.values,
67
+ });
68
+ }
51
69
  }
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}`;
70
+ Query.equal = (attribute, value) => new Query("equal", attribute, value).toString();
71
+ Query.notEqual = (attribute, value) => new Query("notEqual", attribute, value).toString();
72
+ Query.lessThan = (attribute, value) => new Query("lessThan", attribute, value).toString();
73
+ Query.lessThanEqual = (attribute, value) => new Query("lessThanEqual", attribute, value).toString();
74
+ Query.greaterThan = (attribute, value) => new Query("greaterThan", attribute, value).toString();
75
+ Query.greaterThanEqual = (attribute, value) => new Query("greaterThanEqual", attribute, value).toString();
76
+ Query.isNull = (attribute) => new Query("isNull", attribute).toString();
77
+ Query.isNotNull = (attribute) => new Query("isNotNull", attribute).toString();
78
+ Query.between = (attribute, start, end) => new Query("between", attribute, [start, end]).toString();
79
+ Query.startsWith = (attribute, value) => new Query("startsWith", attribute, value).toString();
80
+ Query.endsWith = (attribute, value) => new Query("endsWith", attribute, value).toString();
81
+ Query.select = (attributes) => new Query("select", undefined, attributes).toString();
82
+ Query.search = (attribute, value) => new Query("search", attribute, value).toString();
83
+ Query.orderDesc = (attribute) => new Query("orderDesc", attribute).toString();
84
+ Query.orderAsc = (attribute) => new Query("orderAsc", attribute).toString();
85
+ Query.cursorAfter = (documentId) => new Query("cursorAfter", undefined, documentId).toString();
86
+ Query.cursorBefore = (documentId) => new Query("cursorBefore", undefined, documentId).toString();
87
+ Query.limit = (limit) => new Query("limit", undefined, limit).toString();
88
+ Query.offset = (offset) => new Query("offset", undefined, offset).toString();
89
+ Query.contains = (attribute, value) => new Query("contains", attribute, value).toString();
90
+ Query.or = (queries) => new Query("or", undefined, queries.map((query) => JSON.parse(query))).toString();
91
+ Query.and = (queries) => new Query("and", undefined, queries.map((query) => JSON.parse(query))).toString();
79
92
 
80
93
  class AppwriteException extends Error {
81
94
  constructor(message, code = 0, type = '', response = '') {
@@ -90,7 +103,7 @@
90
103
  class Client {
91
104
  constructor() {
92
105
  this.config = {
93
- endpoint: 'https://HOSTNAME/v1',
106
+ endpoint: 'https://cloud.appwrite.io/v1',
94
107
  endpointRealtime: '',
95
108
  project: '',
96
109
  key: '',
@@ -102,8 +115,8 @@
102
115
  'x-sdk-name': 'Console',
103
116
  'x-sdk-platform': 'console',
104
117
  'x-sdk-language': 'web',
105
- 'x-sdk-version': '0.6.0-rc.8',
106
- 'X-Appwrite-Response-Format': '1.4.0',
118
+ 'x-sdk-version': '0.6.0',
119
+ 'X-Appwrite-Response-Format': '1.5.0',
107
120
  };
108
121
  this.realtime = {
109
122
  socket: undefined,
@@ -568,7 +581,7 @@
568
581
  *
569
582
  * Get the list of identities for the currently logged in user.
570
583
  *
571
- * @param {string} queries
584
+ * @param {string[]} queries
572
585
  * @throws {AppwriteException}
573
586
  * @returns {Promise}
574
587
  */
@@ -655,6 +668,7 @@
655
668
  /**
656
669
  * Update MFA
657
670
  *
671
+ * Enable or disable MFA on an account.
658
672
  *
659
673
  * @param {boolean} mfa
660
674
  * @throws {AppwriteException}
@@ -677,23 +691,24 @@
677
691
  });
678
692
  }
679
693
  /**
680
- * Create MFA Challenge
694
+ * Add Authenticator
681
695
  *
696
+ * Add an authenticator app to be used as an MFA factor. Verify the
697
+ * authenticator using the [verify
698
+ * authenticator](/docs/references/cloud/client-web/account#verifyAuthenticator)
699
+ * method.
682
700
  *
683
- * @param {string} provider
701
+ * @param {AuthenticatorType} type
684
702
  * @throws {AppwriteException}
685
703
  * @returns {Promise}
686
704
  */
687
- createChallenge(provider) {
705
+ createMfaAuthenticator(type) {
688
706
  return __awaiter(this, void 0, void 0, function* () {
689
- if (typeof provider === 'undefined') {
690
- throw new AppwriteException('Missing required parameter: "provider"');
707
+ if (typeof type === 'undefined') {
708
+ throw new AppwriteException('Missing required parameter: "type"');
691
709
  }
692
- const apiPath = '/account/mfa/challenge';
710
+ const apiPath = '/account/mfa/authenticators/{type}'.replace('{type}', type);
693
711
  const payload = {};
694
- if (typeof provider !== 'undefined') {
695
- payload['provider'] = provider;
696
- }
697
712
  const uri = new URL(this.client.config.endpoint + apiPath);
698
713
  return yield this.client.call('post', uri, {
699
714
  'content-type': 'application/json',
@@ -701,27 +716,27 @@
701
716
  });
702
717
  }
703
718
  /**
704
- * Create MFA Challenge (confirmation)
719
+ * Verify Authenticator
705
720
  *
721
+ * Verify an authenticator app after adding it using the [add
722
+ * authenticator](/docs/references/cloud/client-web/account#addAuthenticator)
723
+ * method.
706
724
  *
707
- * @param {string} challengeId
725
+ * @param {AuthenticatorType} type
708
726
  * @param {string} otp
709
727
  * @throws {AppwriteException}
710
728
  * @returns {Promise}
711
729
  */
712
- updateChallenge(challengeId, otp) {
730
+ updateMfaAuthenticator(type, otp) {
713
731
  return __awaiter(this, void 0, void 0, function* () {
714
- if (typeof challengeId === 'undefined') {
715
- throw new AppwriteException('Missing required parameter: "challengeId"');
732
+ if (typeof type === 'undefined') {
733
+ throw new AppwriteException('Missing required parameter: "type"');
716
734
  }
717
735
  if (typeof otp === 'undefined') {
718
736
  throw new AppwriteException('Missing required parameter: "otp"');
719
737
  }
720
- const apiPath = '/account/mfa/challenge';
738
+ const apiPath = '/account/mfa/authenticators/{type}'.replace('{type}', type);
721
739
  const payload = {};
722
- if (typeof challengeId !== 'undefined') {
723
- payload['challengeId'] = challengeId;
724
- }
725
740
  if (typeof otp !== 'undefined') {
726
741
  payload['otp'] = otp;
727
742
  }
@@ -732,38 +747,55 @@
732
747
  });
733
748
  }
734
749
  /**
735
- * List Providers
750
+ * Delete Authenticator
736
751
  *
737
- * Get the currently logged in user.
752
+ * Delete an authenticator for a user by ID.
738
753
  *
754
+ * @param {AuthenticatorType} type
755
+ * @param {string} otp
739
756
  * @throws {AppwriteException}
740
757
  * @returns {Promise}
741
758
  */
742
- listProviders() {
759
+ deleteMfaAuthenticator(type, otp) {
743
760
  return __awaiter(this, void 0, void 0, function* () {
744
- const apiPath = '/account/mfa/providers';
761
+ if (typeof type === 'undefined') {
762
+ throw new AppwriteException('Missing required parameter: "type"');
763
+ }
764
+ if (typeof otp === 'undefined') {
765
+ throw new AppwriteException('Missing required parameter: "otp"');
766
+ }
767
+ const apiPath = '/account/mfa/authenticators/{type}'.replace('{type}', type);
745
768
  const payload = {};
769
+ if (typeof otp !== 'undefined') {
770
+ payload['otp'] = otp;
771
+ }
746
772
  const uri = new URL(this.client.config.endpoint + apiPath);
747
- return yield this.client.call('get', uri, {
773
+ return yield this.client.call('delete', uri, {
748
774
  'content-type': 'application/json',
749
775
  }, payload);
750
776
  });
751
777
  }
752
778
  /**
753
- * Add Authenticator
779
+ * Create 2FA Challenge
754
780
  *
781
+ * Begin the process of MFA verification after sign-in. Finish the flow with
782
+ * [updateMfaChallenge](/docs/references/cloud/client-web/account#updateMfaChallenge)
783
+ * method.
755
784
  *
756
- * @param {string} provider
785
+ * @param {AuthenticationFactor} factor
757
786
  * @throws {AppwriteException}
758
787
  * @returns {Promise}
759
788
  */
760
- addAuthenticator(provider) {
789
+ createMfaChallenge(factor) {
761
790
  return __awaiter(this, void 0, void 0, function* () {
762
- if (typeof provider === 'undefined') {
763
- throw new AppwriteException('Missing required parameter: "provider"');
791
+ if (typeof factor === 'undefined') {
792
+ throw new AppwriteException('Missing required parameter: "factor"');
764
793
  }
765
- const apiPath = '/account/mfa/{provider}'.replace('{provider}', provider);
794
+ const apiPath = '/account/mfa/challenge';
766
795
  const payload = {};
796
+ if (typeof factor !== 'undefined') {
797
+ payload['factor'] = factor;
798
+ }
767
799
  const uri = new URL(this.client.config.endpoint + apiPath);
768
800
  return yield this.client.call('post', uri, {
769
801
  'content-type': 'application/json',
@@ -771,24 +803,32 @@
771
803
  });
772
804
  }
773
805
  /**
774
- * Verify Authenticator
806
+ * Create MFA Challenge (confirmation)
775
807
  *
808
+ * Complete the MFA challenge by providing the one-time password. Finish the
809
+ * process of MFA verification by providing the one-time password. To begin
810
+ * the flow, use
811
+ * [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge)
812
+ * method.
776
813
  *
777
- * @param {string} provider
814
+ * @param {string} challengeId
778
815
  * @param {string} otp
779
816
  * @throws {AppwriteException}
780
817
  * @returns {Promise}
781
818
  */
782
- verifyAuthenticator(provider, otp) {
819
+ updateMfaChallenge(challengeId, otp) {
783
820
  return __awaiter(this, void 0, void 0, function* () {
784
- if (typeof provider === 'undefined') {
785
- throw new AppwriteException('Missing required parameter: "provider"');
821
+ if (typeof challengeId === 'undefined') {
822
+ throw new AppwriteException('Missing required parameter: "challengeId"');
786
823
  }
787
824
  if (typeof otp === 'undefined') {
788
825
  throw new AppwriteException('Missing required parameter: "otp"');
789
826
  }
790
- const apiPath = '/account/mfa/{provider}'.replace('{provider}', provider);
827
+ const apiPath = '/account/mfa/challenge';
791
828
  const payload = {};
829
+ if (typeof challengeId !== 'undefined') {
830
+ payload['challengeId'] = challengeId;
831
+ }
792
832
  if (typeof otp !== 'undefined') {
793
833
  payload['otp'] = otp;
794
834
  }
@@ -799,29 +839,83 @@
799
839
  });
800
840
  }
801
841
  /**
802
- * Delete Authenticator
842
+ * List Factors
803
843
  *
844
+ * List the factors available on the account to be used as a MFA challange.
804
845
  *
805
- * @param {string} provider
806
- * @param {string} otp
807
846
  * @throws {AppwriteException}
808
847
  * @returns {Promise}
809
848
  */
810
- deleteAuthenticator(provider, otp) {
849
+ listMfaFactors() {
811
850
  return __awaiter(this, void 0, void 0, function* () {
812
- if (typeof provider === 'undefined') {
813
- throw new AppwriteException('Missing required parameter: "provider"');
814
- }
815
- if (typeof otp === 'undefined') {
816
- throw new AppwriteException('Missing required parameter: "otp"');
817
- }
818
- const apiPath = '/account/mfa/{provider}'.replace('{provider}', provider);
851
+ const apiPath = '/account/mfa/factors';
819
852
  const payload = {};
820
- if (typeof otp !== 'undefined') {
821
- payload['otp'] = otp;
822
- }
823
853
  const uri = new URL(this.client.config.endpoint + apiPath);
824
- return yield this.client.call('delete', uri, {
854
+ return yield this.client.call('get', uri, {
855
+ 'content-type': 'application/json',
856
+ }, payload);
857
+ });
858
+ }
859
+ /**
860
+ * Get MFA Recovery Codes
861
+ *
862
+ * Get recovery codes that can be used as backup for MFA flow. Before getting
863
+ * codes, they must be generated using
864
+ * [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes)
865
+ * method. An OTP challenge is required to read recovery codes.
866
+ *
867
+ * @throws {AppwriteException}
868
+ * @returns {Promise}
869
+ */
870
+ getMfaRecoveryCodes() {
871
+ return __awaiter(this, void 0, void 0, function* () {
872
+ const apiPath = '/account/mfa/recovery-codes';
873
+ const payload = {};
874
+ const uri = new URL(this.client.config.endpoint + apiPath);
875
+ return yield this.client.call('get', uri, {
876
+ 'content-type': 'application/json',
877
+ }, payload);
878
+ });
879
+ }
880
+ /**
881
+ * Create MFA Recovery Codes
882
+ *
883
+ * Generate recovery codes as backup for MFA flow. It's recommended to
884
+ * generate and show then immediately after user successfully adds their
885
+ * authehticator. Recovery codes can be used as a MFA verification type in
886
+ * [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge)
887
+ * method.
888
+ *
889
+ * @throws {AppwriteException}
890
+ * @returns {Promise}
891
+ */
892
+ createMfaRecoveryCodes() {
893
+ return __awaiter(this, void 0, void 0, function* () {
894
+ const apiPath = '/account/mfa/recovery-codes';
895
+ const payload = {};
896
+ const uri = new URL(this.client.config.endpoint + apiPath);
897
+ return yield this.client.call('post', uri, {
898
+ 'content-type': 'application/json',
899
+ }, payload);
900
+ });
901
+ }
902
+ /**
903
+ * Regenerate MFA Recovery Codes
904
+ *
905
+ * Regenerate recovery codes that can be used as backup for MFA flow. Before
906
+ * regenerating codes, they must be first generated using
907
+ * [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes)
908
+ * method. An OTP challenge is required to regenreate recovery codes.
909
+ *
910
+ * @throws {AppwriteException}
911
+ * @returns {Promise}
912
+ */
913
+ updateMfaRecoveryCodes() {
914
+ return __awaiter(this, void 0, void 0, function* () {
915
+ const apiPath = '/account/mfa/recovery-codes';
916
+ const payload = {};
917
+ const uri = new URL(this.client.config.endpoint + apiPath);
918
+ return yield this.client.call('patch', uri, {
825
919
  'content-type': 'application/json',
826
920
  }, payload);
827
921
  });
@@ -1150,7 +1244,7 @@
1150
1244
  });
1151
1245
  }
1152
1246
  /**
1153
- * Create session (deprecated)
1247
+ * Update magic URL session
1154
1248
  *
1155
1249
  * Use this endpoint to create a session from token. Provide the **userId**
1156
1250
  * and **secret** parameters from the successful response of authentication
@@ -1203,15 +1297,14 @@
1203
1297
  * limits](https://appwrite.io/docs/authentication-security#limits).
1204
1298
  *
1205
1299
  *
1206
- * @param {string} provider
1300
+ * @param {OAuthProvider} provider
1207
1301
  * @param {string} success
1208
1302
  * @param {string} failure
1209
- * @param {boolean} token
1210
1303
  * @param {string[]} scopes
1211
1304
  * @throws {AppwriteException}
1212
1305
  * @returns {void|string}
1213
1306
  */
1214
- createOAuth2Session(provider, success, failure, token, scopes) {
1307
+ createOAuth2Session(provider, success, failure, scopes) {
1215
1308
  if (typeof provider === 'undefined') {
1216
1309
  throw new AppwriteException('Missing required parameter: "provider"');
1217
1310
  }
@@ -1223,9 +1316,6 @@
1223
1316
  if (typeof failure !== 'undefined') {
1224
1317
  payload['failure'] = failure;
1225
1318
  }
1226
- if (typeof token !== 'undefined') {
1227
- payload['token'] = token;
1228
- }
1229
1319
  if (typeof scopes !== 'undefined') {
1230
1320
  payload['scopes'] = scopes;
1231
1321
  }
@@ -1241,6 +1331,40 @@
1241
1331
  return uri;
1242
1332
  }
1243
1333
  }
1334
+ /**
1335
+ * Update phone session
1336
+ *
1337
+ * Use this endpoint to create a session from token. Provide the **userId**
1338
+ * and **secret** parameters from the successful response of authentication
1339
+ * flows initiated by token creation. For example, magic URL and phone login.
1340
+ *
1341
+ * @param {string} userId
1342
+ * @param {string} secret
1343
+ * @throws {AppwriteException}
1344
+ * @returns {Promise}
1345
+ */
1346
+ updatePhoneSession(userId, secret) {
1347
+ return __awaiter(this, void 0, void 0, function* () {
1348
+ if (typeof userId === 'undefined') {
1349
+ throw new AppwriteException('Missing required parameter: "userId"');
1350
+ }
1351
+ if (typeof secret === 'undefined') {
1352
+ throw new AppwriteException('Missing required parameter: "secret"');
1353
+ }
1354
+ const apiPath = '/account/sessions/phone';
1355
+ const payload = {};
1356
+ if (typeof userId !== 'undefined') {
1357
+ payload['userId'] = userId;
1358
+ }
1359
+ if (typeof secret !== 'undefined') {
1360
+ payload['secret'] = secret;
1361
+ }
1362
+ const uri = new URL(this.client.config.endpoint + apiPath);
1363
+ return yield this.client.call('put', uri, {
1364
+ 'content-type': 'application/json',
1365
+ }, payload);
1366
+ });
1367
+ }
1244
1368
  /**
1245
1369
  * Create session
1246
1370
  *
@@ -1299,10 +1423,11 @@
1299
1423
  });
1300
1424
  }
1301
1425
  /**
1302
- * Update (or renew) a session
1426
+ * Update session
1303
1427
  *
1304
- * Extend session's expiry to increase it's lifespan. Extending a session is
1305
- * useful when session length is short such as 5 minutes.
1428
+ * Use this endpoint to extend a session's length. Extending a session is
1429
+ * useful when session expiry is short. If the session was created using an
1430
+ * OAuth provider, this endpoint refreshes the access token from the provider.
1306
1431
  *
1307
1432
  * @param {string} sessionId
1308
1433
  * @throws {AppwriteException}
@@ -1368,7 +1493,7 @@
1368
1493
  });
1369
1494
  }
1370
1495
  /**
1371
- * Create Account's push target
1496
+ * Create push target
1372
1497
  *
1373
1498
  *
1374
1499
  * @param {string} targetId
@@ -1403,7 +1528,7 @@
1403
1528
  });
1404
1529
  }
1405
1530
  /**
1406
- * Update Account's push target
1531
+ * Update push target
1407
1532
  *
1408
1533
  *
1409
1534
  * @param {string} targetId
@@ -1430,6 +1555,27 @@
1430
1555
  }, payload);
1431
1556
  });
1432
1557
  }
1558
+ /**
1559
+ * Delete push target
1560
+ *
1561
+ *
1562
+ * @param {string} targetId
1563
+ * @throws {AppwriteException}
1564
+ * @returns {Promise}
1565
+ */
1566
+ deletePushTarget(targetId) {
1567
+ return __awaiter(this, void 0, void 0, function* () {
1568
+ if (typeof targetId === 'undefined') {
1569
+ throw new AppwriteException('Missing required parameter: "targetId"');
1570
+ }
1571
+ const apiPath = '/account/targets/{targetId}/push'.replace('{targetId}', targetId);
1572
+ const payload = {};
1573
+ const uri = new URL(this.client.config.endpoint + apiPath);
1574
+ return yield this.client.call('delete', uri, {
1575
+ 'content-type': 'application/json',
1576
+ }, payload);
1577
+ });
1578
+ }
1433
1579
  /**
1434
1580
  * Create email token (OTP)
1435
1581
  *
@@ -1446,11 +1592,11 @@
1446
1592
  *
1447
1593
  * @param {string} userId
1448
1594
  * @param {string} email
1449
- * @param {boolean} securityPhrase
1595
+ * @param {boolean} phrase
1450
1596
  * @throws {AppwriteException}
1451
1597
  * @returns {Promise}
1452
1598
  */
1453
- createEmailToken(userId, email, securityPhrase) {
1599
+ createEmailToken(userId, email, phrase) {
1454
1600
  return __awaiter(this, void 0, void 0, function* () {
1455
1601
  if (typeof userId === 'undefined') {
1456
1602
  throw new AppwriteException('Missing required parameter: "userId"');
@@ -1466,8 +1612,8 @@
1466
1612
  if (typeof email !== 'undefined') {
1467
1613
  payload['email'] = email;
1468
1614
  }
1469
- if (typeof securityPhrase !== 'undefined') {
1470
- payload['securityPhrase'] = securityPhrase;
1615
+ if (typeof phrase !== 'undefined') {
1616
+ payload['phrase'] = phrase;
1471
1617
  }
1472
1618
  const uri = new URL(this.client.config.endpoint + apiPath);
1473
1619
  return yield this.client.call('post', uri, {
@@ -1498,11 +1644,11 @@
1498
1644
  * @param {string} userId
1499
1645
  * @param {string} email
1500
1646
  * @param {string} url
1501
- * @param {boolean} securityPhrase
1647
+ * @param {boolean} phrase
1502
1648
  * @throws {AppwriteException}
1503
1649
  * @returns {Promise}
1504
1650
  */
1505
- createMagicURLToken(userId, email, url, securityPhrase) {
1651
+ createMagicURLToken(userId, email, url, phrase) {
1506
1652
  return __awaiter(this, void 0, void 0, function* () {
1507
1653
  if (typeof userId === 'undefined') {
1508
1654
  throw new AppwriteException('Missing required parameter: "userId"');
@@ -1521,8 +1667,8 @@
1521
1667
  if (typeof url !== 'undefined') {
1522
1668
  payload['url'] = url;
1523
1669
  }
1524
- if (typeof securityPhrase !== 'undefined') {
1525
- payload['securityPhrase'] = securityPhrase;
1670
+ if (typeof phrase !== 'undefined') {
1671
+ payload['phrase'] = phrase;
1526
1672
  }
1527
1673
  const uri = new URL(this.client.config.endpoint + apiPath);
1528
1674
  return yield this.client.call('post', uri, {
@@ -1530,6 +1676,58 @@
1530
1676
  }, payload);
1531
1677
  });
1532
1678
  }
1679
+ /**
1680
+ * Create OAuth2 token
1681
+ *
1682
+ * Allow the user to login to their account using the OAuth2 provider of their
1683
+ * choice. Each OAuth2 provider should be enabled from the Appwrite console
1684
+ * first. Use the success and failure arguments to provide a redirect URL's
1685
+ * back to your app when login is completed.
1686
+ *
1687
+ * If authentication succeeds, `userId` and `secret` of a token will be
1688
+ * appended to the success URL as query parameters. These can be used to
1689
+ * create a new session using the [Create
1690
+ * session](https://appwrite.io/docs/references/cloud/client-web/account#createSession)
1691
+ * endpoint.
1692
+ *
1693
+ * A user is limited to 10 active sessions at a time by default. [Learn more
1694
+ * about session
1695
+ * limits](https://appwrite.io/docs/authentication-security#limits).
1696
+ *
1697
+ * @param {OAuthProvider} provider
1698
+ * @param {string} success
1699
+ * @param {string} failure
1700
+ * @param {string[]} scopes
1701
+ * @throws {AppwriteException}
1702
+ * @returns {void|string}
1703
+ */
1704
+ createOAuth2Token(provider, success, failure, scopes) {
1705
+ if (typeof provider === 'undefined') {
1706
+ throw new AppwriteException('Missing required parameter: "provider"');
1707
+ }
1708
+ const apiPath = '/account/tokens/oauth2/{provider}'.replace('{provider}', provider);
1709
+ const payload = {};
1710
+ if (typeof success !== 'undefined') {
1711
+ payload['success'] = success;
1712
+ }
1713
+ if (typeof failure !== 'undefined') {
1714
+ payload['failure'] = failure;
1715
+ }
1716
+ if (typeof scopes !== 'undefined') {
1717
+ payload['scopes'] = scopes;
1718
+ }
1719
+ const uri = new URL(this.client.config.endpoint + apiPath);
1720
+ payload['project'] = this.client.config.project;
1721
+ for (const [key, value] of Object.entries(Service.flatten(payload))) {
1722
+ uri.searchParams.append(key, value);
1723
+ }
1724
+ if (typeof window !== 'undefined' && (window === null || window === void 0 ? void 0 : window.location)) {
1725
+ window.location.href = uri.toString();
1726
+ }
1727
+ else {
1728
+ return uri;
1729
+ }
1730
+ }
1533
1731
  /**
1534
1732
  * Create phone token
1535
1733
  *
@@ -1725,7 +1923,7 @@
1725
1923
  * image at source quality. If dimensions are not specified, the default size
1726
1924
  * of image returned is 100x100px.
1727
1925
  *
1728
- * @param {string} code
1926
+ * @param {Browser} code
1729
1927
  * @param {number} width
1730
1928
  * @param {number} height
1731
1929
  * @param {number} quality
@@ -1767,7 +1965,7 @@
1767
1965
  * of image returned is 100x100px.
1768
1966
  *
1769
1967
  *
1770
- * @param {string} code
1968
+ * @param {CreditCard} code
1771
1969
  * @param {number} width
1772
1970
  * @param {number} height
1773
1971
  * @param {number} quality
@@ -1837,7 +2035,7 @@
1837
2035
  * of image returned is 100x100px.
1838
2036
  *
1839
2037
  *
1840
- * @param {string} code
2038
+ * @param {Flag} code
1841
2039
  * @param {number} width
1842
2040
  * @param {number} height
1843
2041
  * @param {number} quality
@@ -2121,10 +2319,10 @@
2121
2319
  });
2122
2320
  }
2123
2321
  /**
2124
- * Get usage stats for the database
2322
+ * Get databases usage stats
2125
2323
  *
2126
2324
  *
2127
- * @param {string} range
2325
+ * @param {DatabaseUsageRange} range
2128
2326
  * @throws {AppwriteException}
2129
2327
  * @returns {Promise}
2130
2328
  */
@@ -2404,6 +2602,7 @@
2404
2602
  /**
2405
2603
  * List attributes
2406
2604
  *
2605
+ * List attributes in the collection.
2407
2606
  *
2408
2607
  * @param {string} databaseId
2409
2608
  * @param {string} collectionId
@@ -2482,6 +2681,8 @@
2482
2681
  /**
2483
2682
  * Update boolean attribute
2484
2683
  *
2684
+ * Update a boolean attribute. Changing the `default` value will not update
2685
+ * already existing documents.
2485
2686
  *
2486
2687
  * @param {string} databaseId
2487
2688
  * @param {string} collectionId
@@ -2525,6 +2726,7 @@
2525
2726
  /**
2526
2727
  * Create datetime attribute
2527
2728
  *
2729
+ * Create a date time attribute according to the ISO 8601 standard.
2528
2730
  *
2529
2731
  * @param {string} databaseId
2530
2732
  * @param {string} collectionId
@@ -2572,6 +2774,8 @@
2572
2774
  /**
2573
2775
  * Update dateTime attribute
2574
2776
  *
2777
+ * Update a date time attribute. Changing the `default` value will not update
2778
+ * already existing documents.
2575
2779
  *
2576
2780
  * @param {string} databaseId
2577
2781
  * @param {string} collectionId
@@ -2710,6 +2914,9 @@
2710
2914
  /**
2711
2915
  * Create enum attribute
2712
2916
  *
2917
+ * Create an enumeration attribute. The `elements` param acts as a white-list
2918
+ * of accepted values for this attribute.
2919
+ *
2713
2920
  *
2714
2921
  * @param {string} databaseId
2715
2922
  * @param {string} collectionId
@@ -3155,11 +3362,11 @@
3155
3362
  * @param {string} databaseId
3156
3363
  * @param {string} collectionId
3157
3364
  * @param {string} relatedCollectionId
3158
- * @param {string} type
3365
+ * @param {RelationshipType} type
3159
3366
  * @param {boolean} twoWay
3160
3367
  * @param {string} key
3161
3368
  * @param {string} twoWayKey
3162
- * @param {string} onDelete
3369
+ * @param {RelationMutate} onDelete
3163
3370
  * @throws {AppwriteException}
3164
3371
  * @returns {Promise}
3165
3372
  */
@@ -3407,6 +3614,7 @@
3407
3614
  /**
3408
3615
  * Get attribute
3409
3616
  *
3617
+ * Get attribute by ID.
3410
3618
  *
3411
3619
  * @param {string} databaseId
3412
3620
  * @param {string} collectionId
@@ -3436,6 +3644,7 @@
3436
3644
  /**
3437
3645
  * Delete attribute
3438
3646
  *
3647
+ * Deletes an attribute.
3439
3648
  *
3440
3649
  * @param {string} databaseId
3441
3650
  * @param {string} collectionId
@@ -3472,7 +3681,7 @@
3472
3681
  * @param {string} databaseId
3473
3682
  * @param {string} collectionId
3474
3683
  * @param {string} key
3475
- * @param {string} onDelete
3684
+ * @param {RelationMutate} onDelete
3476
3685
  * @throws {AppwriteException}
3477
3686
  * @returns {Promise}
3478
3687
  */
@@ -3717,6 +3926,7 @@
3717
3926
  /**
3718
3927
  * List indexes
3719
3928
  *
3929
+ * List indexes in the collection.
3720
3930
  *
3721
3931
  * @param {string} databaseId
3722
3932
  * @param {string} collectionId
@@ -3746,11 +3956,14 @@
3746
3956
  /**
3747
3957
  * Create index
3748
3958
  *
3959
+ * Creates an index on the attributes listed. Your index should include all
3960
+ * the attributes you will query in a single request.
3961
+ * Attributes can be `key`, `fulltext`, and `unique`.
3749
3962
  *
3750
3963
  * @param {string} databaseId
3751
3964
  * @param {string} collectionId
3752
3965
  * @param {string} key
3753
- * @param {string} type
3966
+ * @param {IndexType} type
3754
3967
  * @param {string[]} attributes
3755
3968
  * @param {string[]} orders
3756
3969
  * @throws {AppwriteException}
@@ -3796,6 +4009,7 @@
3796
4009
  /**
3797
4010
  * Get index
3798
4011
  *
4012
+ * Get index by ID.
3799
4013
  *
3800
4014
  * @param {string} databaseId
3801
4015
  * @param {string} collectionId
@@ -3825,6 +4039,7 @@
3825
4039
  /**
3826
4040
  * Delete index
3827
4041
  *
4042
+ * Delete an index.
3828
4043
  *
3829
4044
  * @param {string} databaseId
3830
4045
  * @param {string} collectionId
@@ -3882,12 +4097,12 @@
3882
4097
  });
3883
4098
  }
3884
4099
  /**
3885
- * Get usage stats for a collection
4100
+ * Get collection usage stats
3886
4101
  *
3887
4102
  *
3888
4103
  * @param {string} databaseId
3889
4104
  * @param {string} collectionId
3890
- * @param {string} range
4105
+ * @param {DatabaseUsageRange} range
3891
4106
  * @throws {AppwriteException}
3892
4107
  * @returns {Promise}
3893
4108
  */
@@ -3937,11 +4152,11 @@
3937
4152
  });
3938
4153
  }
3939
4154
  /**
3940
- * Get usage stats for the database
4155
+ * Get database usage stats
3941
4156
  *
3942
4157
  *
3943
4158
  * @param {string} databaseId
3944
- * @param {string} range
4159
+ * @param {DatabaseUsageRange} range
3945
4160
  * @throws {AppwriteException}
3946
4161
  * @returns {Promise}
3947
4162
  */
@@ -4004,7 +4219,7 @@
4004
4219
  *
4005
4220
  * @param {string} functionId
4006
4221
  * @param {string} name
4007
- * @param {string} runtime
4222
+ * @param {Runtime} runtime
4008
4223
  * @param {string[]} execute
4009
4224
  * @param {string[]} events
4010
4225
  * @param {string} schedule
@@ -4126,7 +4341,7 @@
4126
4341
  * Get functions usage
4127
4342
  *
4128
4343
  *
4129
- * @param {string} range
4344
+ * @param {FunctionUsageRange} range
4130
4345
  * @throws {AppwriteException}
4131
4346
  * @returns {Promise}
4132
4347
  */
@@ -4172,7 +4387,7 @@
4172
4387
  *
4173
4388
  * @param {string} functionId
4174
4389
  * @param {string} name
4175
- * @param {string} runtime
4390
+ * @param {Runtime} runtime
4176
4391
  * @param {string[]} execute
4177
4392
  * @param {string[]} events
4178
4393
  * @param {string} schedule
@@ -4569,7 +4784,7 @@
4569
4784
  * @param {string} body
4570
4785
  * @param {boolean} async
4571
4786
  * @param {string} xpath
4572
- * @param {string} method
4787
+ * @param {ExecutionMethod} method
4573
4788
  * @param {object} headers
4574
4789
  * @throws {AppwriteException}
4575
4790
  * @returns {Promise}
@@ -4633,7 +4848,7 @@
4633
4848
  *
4634
4849
  *
4635
4850
  * @param {string} functionId
4636
- * @param {string} range
4851
+ * @param {FunctionUsageRange} range
4637
4852
  * @throws {AppwriteException}
4638
4853
  * @returns {Promise}
4639
4854
  */
@@ -4920,6 +5135,28 @@
4920
5135
  }, payload);
4921
5136
  });
4922
5137
  }
5138
+ /**
5139
+ * Get the SSL certificate for a domain
5140
+ *
5141
+ * Get the SSL certificate for a domain
5142
+ *
5143
+ * @param {string} domain
5144
+ * @throws {AppwriteException}
5145
+ * @returns {Promise}
5146
+ */
5147
+ getCertificate(domain) {
5148
+ return __awaiter(this, void 0, void 0, function* () {
5149
+ const apiPath = '/health/certificate';
5150
+ const payload = {};
5151
+ if (typeof domain !== 'undefined') {
5152
+ payload['domain'] = domain;
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
+ }
4923
5160
  /**
4924
5161
  * Get DB
4925
5162
  *
@@ -5072,9 +5309,38 @@
5072
5309
  }, payload);
5073
5310
  });
5074
5311
  }
5312
+ /**
5313
+ * Get number of failed queue jobs
5314
+ *
5315
+ * Returns the amount of failed jobs in a given queue.
5316
+ *
5317
+ *
5318
+ * @param {Name} name
5319
+ * @param {number} threshold
5320
+ * @throws {AppwriteException}
5321
+ * @returns {Promise}
5322
+ */
5323
+ getFailedJobs(name, threshold) {
5324
+ return __awaiter(this, void 0, void 0, function* () {
5325
+ if (typeof name === 'undefined') {
5326
+ throw new AppwriteException('Missing required parameter: "name"');
5327
+ }
5328
+ const apiPath = '/health/queue/failed/{name}'.replace('{name}', name);
5329
+ const payload = {};
5330
+ if (typeof threshold !== 'undefined') {
5331
+ payload['threshold'] = threshold;
5332
+ }
5333
+ const uri = new URL(this.client.config.endpoint + apiPath);
5334
+ return yield this.client.call('get', uri, {
5335
+ 'content-type': 'application/json',
5336
+ }, payload);
5337
+ });
5338
+ }
5075
5339
  /**
5076
5340
  * Get functions queue
5077
5341
  *
5342
+ * Get the number of function executions that are waiting to be processed in
5343
+ * the Appwrite internal queue server.
5078
5344
  *
5079
5345
  * @param {number} threshold
5080
5346
  * @throws {AppwriteException}
@@ -5186,18 +5452,18 @@
5186
5452
  });
5187
5453
  }
5188
5454
  /**
5189
- * Get webhooks queue
5455
+ * Get usage queue
5190
5456
  *
5191
- * Get the number of webhooks that are waiting to be processed in the Appwrite
5457
+ * Get the number of metrics that are waiting to be processed in the Appwrite
5192
5458
  * internal queue server.
5193
5459
  *
5194
5460
  * @param {number} threshold
5195
5461
  * @throws {AppwriteException}
5196
5462
  * @returns {Promise}
5197
5463
  */
5198
- getQueueWebhooks(threshold) {
5464
+ getQueueUsage(threshold) {
5199
5465
  return __awaiter(this, void 0, void 0, function* () {
5200
- const apiPath = '/health/queue/webhooks';
5466
+ const apiPath = '/health/queue/usage';
5201
5467
  const payload = {};
5202
5468
  if (typeof threshold !== 'undefined') {
5203
5469
  payload['threshold'] = threshold;
@@ -5209,7 +5475,71 @@
5209
5475
  });
5210
5476
  }
5211
5477
  /**
5212
- * Get local storage
5478
+ * Get usage dump queue
5479
+ *
5480
+ * Get the number of projects containing metrics that are waiting to be
5481
+ * processed in the Appwrite internal queue server.
5482
+ *
5483
+ * @param {number} threshold
5484
+ * @throws {AppwriteException}
5485
+ * @returns {Promise}
5486
+ */
5487
+ getQueueUsageDump(threshold) {
5488
+ return __awaiter(this, void 0, void 0, function* () {
5489
+ const apiPath = '/health/queue/usage-dump';
5490
+ const payload = {};
5491
+ if (typeof threshold !== 'undefined') {
5492
+ payload['threshold'] = threshold;
5493
+ }
5494
+ const uri = new URL(this.client.config.endpoint + apiPath);
5495
+ return yield this.client.call('get', uri, {
5496
+ 'content-type': 'application/json',
5497
+ }, payload);
5498
+ });
5499
+ }
5500
+ /**
5501
+ * Get webhooks queue
5502
+ *
5503
+ * Get the number of webhooks that are waiting to be processed in the Appwrite
5504
+ * internal queue server.
5505
+ *
5506
+ * @param {number} threshold
5507
+ * @throws {AppwriteException}
5508
+ * @returns {Promise}
5509
+ */
5510
+ getQueueWebhooks(threshold) {
5511
+ return __awaiter(this, void 0, void 0, function* () {
5512
+ const apiPath = '/health/queue/webhooks';
5513
+ const payload = {};
5514
+ if (typeof threshold !== 'undefined') {
5515
+ payload['threshold'] = threshold;
5516
+ }
5517
+ const uri = new URL(this.client.config.endpoint + apiPath);
5518
+ return yield this.client.call('get', uri, {
5519
+ 'content-type': 'application/json',
5520
+ }, payload);
5521
+ });
5522
+ }
5523
+ /**
5524
+ * Get storage
5525
+ *
5526
+ * Check the Appwrite storage device is up and connection is successful.
5527
+ *
5528
+ * @throws {AppwriteException}
5529
+ * @returns {Promise}
5530
+ */
5531
+ getStorage() {
5532
+ return __awaiter(this, void 0, void 0, function* () {
5533
+ const apiPath = '/health/storage';
5534
+ const payload = {};
5535
+ const uri = new URL(this.client.config.endpoint + apiPath);
5536
+ return yield this.client.call('get', uri, {
5537
+ 'content-type': 'application/json',
5538
+ }, payload);
5539
+ });
5540
+ }
5541
+ /**
5542
+ * Get local storage
5213
5543
  *
5214
5544
  * Check the Appwrite local storage device is up and connection is successful.
5215
5545
  *
@@ -5422,8 +5752,9 @@
5422
5752
  /**
5423
5753
  * List messages
5424
5754
  *
5755
+ * Get a list of all messages from the current Appwrite project.
5425
5756
  *
5426
- * @param {string} queries
5757
+ * @param {string[]} queries
5427
5758
  * @param {string} search
5428
5759
  * @throws {AppwriteException}
5429
5760
  * @returns {Promise}
@@ -5445,8 +5776,9 @@
5445
5776
  });
5446
5777
  }
5447
5778
  /**
5448
- * Create an email.
5779
+ * Create email
5449
5780
  *
5781
+ * Create a new email message.
5450
5782
  *
5451
5783
  * @param {string} messageId
5452
5784
  * @param {string} subject
@@ -5456,14 +5788,14 @@
5456
5788
  * @param {string[]} targets
5457
5789
  * @param {string[]} cc
5458
5790
  * @param {string[]} bcc
5459
- * @param {string} description
5460
- * @param {string} status
5791
+ * @param {string[]} attachments
5792
+ * @param {boolean} draft
5461
5793
  * @param {boolean} html
5462
5794
  * @param {string} scheduledAt
5463
5795
  * @throws {AppwriteException}
5464
5796
  * @returns {Promise}
5465
5797
  */
5466
- createEmail(messageId, subject, content, topics, users, targets, cc, bcc, description, status, html, scheduledAt) {
5798
+ createEmail(messageId, subject, content, topics, users, targets, cc, bcc, attachments, draft, html, scheduledAt) {
5467
5799
  return __awaiter(this, void 0, void 0, function* () {
5468
5800
  if (typeof messageId === 'undefined') {
5469
5801
  throw new AppwriteException('Missing required parameter: "messageId"');
@@ -5500,11 +5832,11 @@
5500
5832
  if (typeof bcc !== 'undefined') {
5501
5833
  payload['bcc'] = bcc;
5502
5834
  }
5503
- if (typeof description !== 'undefined') {
5504
- payload['description'] = description;
5835
+ if (typeof attachments !== 'undefined') {
5836
+ payload['attachments'] = attachments;
5505
5837
  }
5506
- if (typeof status !== 'undefined') {
5507
- payload['status'] = status;
5838
+ if (typeof draft !== 'undefined') {
5839
+ payload['draft'] = draft;
5508
5840
  }
5509
5841
  if (typeof html !== 'undefined') {
5510
5842
  payload['html'] = html;
@@ -5519,7 +5851,9 @@
5519
5851
  });
5520
5852
  }
5521
5853
  /**
5522
- * Update an email.
5854
+ * Update email
5855
+ *
5856
+ * Update an email message by its unique ID.
5523
5857
  *
5524
5858
  *
5525
5859
  * @param {string} messageId
@@ -5527,9 +5861,8 @@
5527
5861
  * @param {string[]} users
5528
5862
  * @param {string[]} targets
5529
5863
  * @param {string} subject
5530
- * @param {string} description
5531
5864
  * @param {string} content
5532
- * @param {string} status
5865
+ * @param {boolean} draft
5533
5866
  * @param {boolean} html
5534
5867
  * @param {string[]} cc
5535
5868
  * @param {string[]} bcc
@@ -5537,7 +5870,7 @@
5537
5870
  * @throws {AppwriteException}
5538
5871
  * @returns {Promise}
5539
5872
  */
5540
- updateEmail(messageId, topics, users, targets, subject, description, content, status, html, cc, bcc, scheduledAt) {
5873
+ updateEmail(messageId, topics, users, targets, subject, content, draft, html, cc, bcc, scheduledAt) {
5541
5874
  return __awaiter(this, void 0, void 0, function* () {
5542
5875
  if (typeof messageId === 'undefined') {
5543
5876
  throw new AppwriteException('Missing required parameter: "messageId"');
@@ -5556,14 +5889,11 @@
5556
5889
  if (typeof subject !== 'undefined') {
5557
5890
  payload['subject'] = subject;
5558
5891
  }
5559
- if (typeof description !== 'undefined') {
5560
- payload['description'] = description;
5561
- }
5562
5892
  if (typeof content !== 'undefined') {
5563
5893
  payload['content'] = content;
5564
5894
  }
5565
- if (typeof status !== 'undefined') {
5566
- payload['status'] = status;
5895
+ if (typeof draft !== 'undefined') {
5896
+ payload['draft'] = draft;
5567
5897
  }
5568
5898
  if (typeof html !== 'undefined') {
5569
5899
  payload['html'] = html;
@@ -5584,8 +5914,9 @@
5584
5914
  });
5585
5915
  }
5586
5916
  /**
5587
- * Create a push notification.
5917
+ * Create push notification
5588
5918
  *
5919
+ * Create a new push notification.
5589
5920
  *
5590
5921
  * @param {string} messageId
5591
5922
  * @param {string} title
@@ -5593,20 +5924,20 @@
5593
5924
  * @param {string[]} topics
5594
5925
  * @param {string[]} users
5595
5926
  * @param {string[]} targets
5596
- * @param {string} description
5597
5927
  * @param {object} data
5598
5928
  * @param {string} action
5929
+ * @param {string} image
5599
5930
  * @param {string} icon
5600
5931
  * @param {string} sound
5601
5932
  * @param {string} color
5602
5933
  * @param {string} tag
5603
5934
  * @param {string} badge
5604
- * @param {string} status
5935
+ * @param {boolean} draft
5605
5936
  * @param {string} scheduledAt
5606
5937
  * @throws {AppwriteException}
5607
5938
  * @returns {Promise}
5608
5939
  */
5609
- createPush(messageId, title, body, topics, users, targets, description, data, action, icon, sound, color, tag, badge, status, scheduledAt) {
5940
+ createPush(messageId, title, body, topics, users, targets, data, action, image, icon, sound, color, tag, badge, draft, scheduledAt) {
5610
5941
  return __awaiter(this, void 0, void 0, function* () {
5611
5942
  if (typeof messageId === 'undefined') {
5612
5943
  throw new AppwriteException('Missing required parameter: "messageId"');
@@ -5637,15 +5968,15 @@
5637
5968
  if (typeof targets !== 'undefined') {
5638
5969
  payload['targets'] = targets;
5639
5970
  }
5640
- if (typeof description !== 'undefined') {
5641
- payload['description'] = description;
5642
- }
5643
5971
  if (typeof data !== 'undefined') {
5644
5972
  payload['data'] = data;
5645
5973
  }
5646
5974
  if (typeof action !== 'undefined') {
5647
5975
  payload['action'] = action;
5648
5976
  }
5977
+ if (typeof image !== 'undefined') {
5978
+ payload['image'] = image;
5979
+ }
5649
5980
  if (typeof icon !== 'undefined') {
5650
5981
  payload['icon'] = icon;
5651
5982
  }
@@ -5661,8 +5992,8 @@
5661
5992
  if (typeof badge !== 'undefined') {
5662
5993
  payload['badge'] = badge;
5663
5994
  }
5664
- if (typeof status !== 'undefined') {
5665
- payload['status'] = status;
5995
+ if (typeof draft !== 'undefined') {
5996
+ payload['draft'] = draft;
5666
5997
  }
5667
5998
  if (typeof scheduledAt !== 'undefined') {
5668
5999
  payload['scheduledAt'] = scheduledAt;
@@ -5674,29 +6005,31 @@
5674
6005
  });
5675
6006
  }
5676
6007
  /**
5677
- * Update a push notification.
6008
+ * Update push notification
6009
+ *
6010
+ * Update a push notification by its unique ID.
5678
6011
  *
5679
6012
  *
5680
6013
  * @param {string} messageId
5681
6014
  * @param {string[]} topics
5682
6015
  * @param {string[]} users
5683
6016
  * @param {string[]} targets
5684
- * @param {string} description
5685
6017
  * @param {string} title
5686
6018
  * @param {string} body
5687
6019
  * @param {object} data
5688
6020
  * @param {string} action
6021
+ * @param {string} image
5689
6022
  * @param {string} icon
5690
6023
  * @param {string} sound
5691
6024
  * @param {string} color
5692
6025
  * @param {string} tag
5693
6026
  * @param {number} badge
5694
- * @param {string} status
6027
+ * @param {boolean} draft
5695
6028
  * @param {string} scheduledAt
5696
6029
  * @throws {AppwriteException}
5697
6030
  * @returns {Promise}
5698
6031
  */
5699
- updatePushNotification(messageId, topics, users, targets, description, title, body, data, action, icon, sound, color, tag, badge, status, scheduledAt) {
6032
+ updatePush(messageId, topics, users, targets, title, body, data, action, image, icon, sound, color, tag, badge, draft, scheduledAt) {
5700
6033
  return __awaiter(this, void 0, void 0, function* () {
5701
6034
  if (typeof messageId === 'undefined') {
5702
6035
  throw new AppwriteException('Missing required parameter: "messageId"');
@@ -5712,9 +6045,6 @@
5712
6045
  if (typeof targets !== 'undefined') {
5713
6046
  payload['targets'] = targets;
5714
6047
  }
5715
- if (typeof description !== 'undefined') {
5716
- payload['description'] = description;
5717
- }
5718
6048
  if (typeof title !== 'undefined') {
5719
6049
  payload['title'] = title;
5720
6050
  }
@@ -5727,6 +6057,9 @@
5727
6057
  if (typeof action !== 'undefined') {
5728
6058
  payload['action'] = action;
5729
6059
  }
6060
+ if (typeof image !== 'undefined') {
6061
+ payload['image'] = image;
6062
+ }
5730
6063
  if (typeof icon !== 'undefined') {
5731
6064
  payload['icon'] = icon;
5732
6065
  }
@@ -5742,8 +6075,8 @@
5742
6075
  if (typeof badge !== 'undefined') {
5743
6076
  payload['badge'] = badge;
5744
6077
  }
5745
- if (typeof status !== 'undefined') {
5746
- payload['status'] = status;
6078
+ if (typeof draft !== 'undefined') {
6079
+ payload['draft'] = draft;
5747
6080
  }
5748
6081
  if (typeof scheduledAt !== 'undefined') {
5749
6082
  payload['scheduledAt'] = scheduledAt;
@@ -5755,21 +6088,21 @@
5755
6088
  });
5756
6089
  }
5757
6090
  /**
5758
- * Create an SMS.
6091
+ * Create SMS
5759
6092
  *
6093
+ * Create a new SMS message.
5760
6094
  *
5761
6095
  * @param {string} messageId
5762
6096
  * @param {string} content
5763
6097
  * @param {string[]} topics
5764
6098
  * @param {string[]} users
5765
6099
  * @param {string[]} targets
5766
- * @param {string} description
5767
- * @param {string} status
6100
+ * @param {boolean} draft
5768
6101
  * @param {string} scheduledAt
5769
6102
  * @throws {AppwriteException}
5770
6103
  * @returns {Promise}
5771
6104
  */
5772
- createSMS(messageId, content, topics, users, targets, description, status, scheduledAt) {
6105
+ createSms(messageId, content, topics, users, targets, draft, scheduledAt) {
5773
6106
  return __awaiter(this, void 0, void 0, function* () {
5774
6107
  if (typeof messageId === 'undefined') {
5775
6108
  throw new AppwriteException('Missing required parameter: "messageId"');
@@ -5794,11 +6127,8 @@
5794
6127
  if (typeof targets !== 'undefined') {
5795
6128
  payload['targets'] = targets;
5796
6129
  }
5797
- if (typeof description !== 'undefined') {
5798
- payload['description'] = description;
5799
- }
5800
- if (typeof status !== 'undefined') {
5801
- payload['status'] = status;
6130
+ if (typeof draft !== 'undefined') {
6131
+ payload['draft'] = draft;
5802
6132
  }
5803
6133
  if (typeof scheduledAt !== 'undefined') {
5804
6134
  payload['scheduledAt'] = scheduledAt;
@@ -5810,21 +6140,22 @@
5810
6140
  });
5811
6141
  }
5812
6142
  /**
5813
- * Update an SMS.
6143
+ * Update SMS
6144
+ *
6145
+ * Update an email message by its unique ID.
5814
6146
  *
5815
6147
  *
5816
6148
  * @param {string} messageId
5817
6149
  * @param {string[]} topics
5818
6150
  * @param {string[]} users
5819
6151
  * @param {string[]} targets
5820
- * @param {string} description
5821
6152
  * @param {string} content
5822
- * @param {string} status
6153
+ * @param {boolean} draft
5823
6154
  * @param {string} scheduledAt
5824
6155
  * @throws {AppwriteException}
5825
6156
  * @returns {Promise}
5826
6157
  */
5827
- updateSMS(messageId, topics, users, targets, description, content, status, scheduledAt) {
6158
+ updateSms(messageId, topics, users, targets, content, draft, scheduledAt) {
5828
6159
  return __awaiter(this, void 0, void 0, function* () {
5829
6160
  if (typeof messageId === 'undefined') {
5830
6161
  throw new AppwriteException('Missing required parameter: "messageId"');
@@ -5840,14 +6171,11 @@
5840
6171
  if (typeof targets !== 'undefined') {
5841
6172
  payload['targets'] = targets;
5842
6173
  }
5843
- if (typeof description !== 'undefined') {
5844
- payload['description'] = description;
5845
- }
5846
6174
  if (typeof content !== 'undefined') {
5847
6175
  payload['content'] = content;
5848
6176
  }
5849
- if (typeof status !== 'undefined') {
5850
- payload['status'] = status;
6177
+ if (typeof draft !== 'undefined') {
6178
+ payload['draft'] = draft;
5851
6179
  }
5852
6180
  if (typeof scheduledAt !== 'undefined') {
5853
6181
  payload['scheduledAt'] = scheduledAt;
@@ -5859,7 +6187,9 @@
5859
6187
  });
5860
6188
  }
5861
6189
  /**
5862
- * Get a message
6190
+ * Get message
6191
+ *
6192
+ * Get a message by its unique ID.
5863
6193
  *
5864
6194
  *
5865
6195
  * @param {string} messageId
@@ -5879,9 +6209,33 @@
5879
6209
  }, payload);
5880
6210
  });
5881
6211
  }
6212
+ /**
6213
+ * Delete message
6214
+ *
6215
+ * Delete a message. If the message is not a draft or scheduled, but has been
6216
+ * sent, this will not recall the message.
6217
+ *
6218
+ * @param {string} messageId
6219
+ * @throws {AppwriteException}
6220
+ * @returns {Promise}
6221
+ */
6222
+ delete(messageId) {
6223
+ return __awaiter(this, void 0, void 0, function* () {
6224
+ if (typeof messageId === 'undefined') {
6225
+ throw new AppwriteException('Missing required parameter: "messageId"');
6226
+ }
6227
+ const apiPath = '/messaging/messages/{messageId}'.replace('{messageId}', messageId);
6228
+ const payload = {};
6229
+ const uri = new URL(this.client.config.endpoint + apiPath);
6230
+ return yield this.client.call('delete', uri, {
6231
+ 'content-type': 'application/json',
6232
+ }, payload);
6233
+ });
6234
+ }
5882
6235
  /**
5883
6236
  * List message logs
5884
6237
  *
6238
+ * Get the message activity logs listed by its unique ID.
5885
6239
  *
5886
6240
  * @param {string} messageId
5887
6241
  * @param {string[]} queries
@@ -5907,11 +6261,10 @@
5907
6261
  /**
5908
6262
  * List message targets
5909
6263
  *
5910
- * List the targets associated with a message as set via the targets
5911
- * attribute.
6264
+ * Get a list of the targets associated with a message.
5912
6265
  *
5913
6266
  * @param {string} messageId
5914
- * @param {string} queries
6267
+ * @param {string[]} queries
5915
6268
  * @throws {AppwriteException}
5916
6269
  * @returns {Promise}
5917
6270
  */
@@ -5934,8 +6287,9 @@
5934
6287
  /**
5935
6288
  * List providers
5936
6289
  *
6290
+ * Get a list of all providers from the current Appwrite project.
5937
6291
  *
5938
- * @param {string} queries
6292
+ * @param {string[]} queries
5939
6293
  * @param {string} search
5940
6294
  * @throws {AppwriteException}
5941
6295
  * @returns {Promise}
@@ -5959,6 +6313,7 @@
5959
6313
  /**
5960
6314
  * Create APNS provider
5961
6315
  *
6316
+ * Create a new Apple Push Notification service provider.
5962
6317
  *
5963
6318
  * @param {string} providerId
5964
6319
  * @param {string} name
@@ -5966,11 +6321,12 @@
5966
6321
  * @param {string} authKeyId
5967
6322
  * @param {string} teamId
5968
6323
  * @param {string} bundleId
6324
+ * @param {boolean} sandbox
5969
6325
  * @param {boolean} enabled
5970
6326
  * @throws {AppwriteException}
5971
6327
  * @returns {Promise}
5972
6328
  */
5973
- createAPNSProvider(providerId, name, authKey, authKeyId, teamId, bundleId, enabled) {
6329
+ createApnsProvider(providerId, name, authKey, authKeyId, teamId, bundleId, sandbox, enabled) {
5974
6330
  return __awaiter(this, void 0, void 0, function* () {
5975
6331
  if (typeof providerId === 'undefined') {
5976
6332
  throw new AppwriteException('Missing required parameter: "providerId"');
@@ -5998,6 +6354,9 @@
5998
6354
  if (typeof bundleId !== 'undefined') {
5999
6355
  payload['bundleId'] = bundleId;
6000
6356
  }
6357
+ if (typeof sandbox !== 'undefined') {
6358
+ payload['sandbox'] = sandbox;
6359
+ }
6001
6360
  if (typeof enabled !== 'undefined') {
6002
6361
  payload['enabled'] = enabled;
6003
6362
  }
@@ -6010,6 +6369,7 @@
6010
6369
  /**
6011
6370
  * Update APNS provider
6012
6371
  *
6372
+ * Update a Apple Push Notification service provider by its unique ID.
6013
6373
  *
6014
6374
  * @param {string} providerId
6015
6375
  * @param {string} name
@@ -6018,10 +6378,11 @@
6018
6378
  * @param {string} authKeyId
6019
6379
  * @param {string} teamId
6020
6380
  * @param {string} bundleId
6381
+ * @param {boolean} sandbox
6021
6382
  * @throws {AppwriteException}
6022
6383
  * @returns {Promise}
6023
6384
  */
6024
- updateAPNSProvider(providerId, name, enabled, authKey, authKeyId, teamId, bundleId) {
6385
+ updateApnsProvider(providerId, name, enabled, authKey, authKeyId, teamId, bundleId, sandbox) {
6025
6386
  return __awaiter(this, void 0, void 0, function* () {
6026
6387
  if (typeof providerId === 'undefined') {
6027
6388
  throw new AppwriteException('Missing required parameter: "providerId"');
@@ -6046,6 +6407,9 @@
6046
6407
  if (typeof bundleId !== 'undefined') {
6047
6408
  payload['bundleId'] = bundleId;
6048
6409
  }
6410
+ if (typeof sandbox !== 'undefined') {
6411
+ payload['sandbox'] = sandbox;
6412
+ }
6049
6413
  const uri = new URL(this.client.config.endpoint + apiPath);
6050
6414
  return yield this.client.call('patch', uri, {
6051
6415
  'content-type': 'application/json',
@@ -6055,6 +6419,7 @@
6055
6419
  /**
6056
6420
  * Create FCM provider
6057
6421
  *
6422
+ * Create a new Firebase Cloud Messaging provider.
6058
6423
  *
6059
6424
  * @param {string} providerId
6060
6425
  * @param {string} name
@@ -6063,7 +6428,7 @@
6063
6428
  * @throws {AppwriteException}
6064
6429
  * @returns {Promise}
6065
6430
  */
6066
- createFCMProvider(providerId, name, serviceAccountJSON, enabled) {
6431
+ createFcmProvider(providerId, name, serviceAccountJSON, enabled) {
6067
6432
  return __awaiter(this, void 0, void 0, function* () {
6068
6433
  if (typeof providerId === 'undefined') {
6069
6434
  throw new AppwriteException('Missing required parameter: "providerId"');
@@ -6094,6 +6459,7 @@
6094
6459
  /**
6095
6460
  * Update FCM provider
6096
6461
  *
6462
+ * Update a Firebase Cloud Messaging provider by its unique ID.
6097
6463
  *
6098
6464
  * @param {string} providerId
6099
6465
  * @param {string} name
@@ -6102,7 +6468,7 @@
6102
6468
  * @throws {AppwriteException}
6103
6469
  * @returns {Promise}
6104
6470
  */
6105
- updateFCMProvider(providerId, name, enabled, serviceAccountJSON) {
6471
+ updateFcmProvider(providerId, name, enabled, serviceAccountJSON) {
6106
6472
  return __awaiter(this, void 0, void 0, function* () {
6107
6473
  if (typeof providerId === 'undefined') {
6108
6474
  throw new AppwriteException('Missing required parameter: "providerId"');
@@ -6127,21 +6493,22 @@
6127
6493
  /**
6128
6494
  * Create Mailgun provider
6129
6495
  *
6496
+ * Create a new Mailgun provider.
6130
6497
  *
6131
6498
  * @param {string} providerId
6132
6499
  * @param {string} name
6133
6500
  * @param {string} apiKey
6134
6501
  * @param {string} domain
6135
6502
  * @param {boolean} isEuRegion
6136
- * @param {boolean} enabled
6137
6503
  * @param {string} fromName
6138
6504
  * @param {string} fromEmail
6139
6505
  * @param {string} replyToName
6140
6506
  * @param {string} replyToEmail
6507
+ * @param {boolean} enabled
6141
6508
  * @throws {AppwriteException}
6142
6509
  * @returns {Promise}
6143
6510
  */
6144
- createMailgunProvider(providerId, name, apiKey, domain, isEuRegion, enabled, fromName, fromEmail, replyToName, replyToEmail) {
6511
+ createMailgunProvider(providerId, name, apiKey, domain, isEuRegion, fromName, fromEmail, replyToName, replyToEmail, enabled) {
6145
6512
  return __awaiter(this, void 0, void 0, function* () {
6146
6513
  if (typeof providerId === 'undefined') {
6147
6514
  throw new AppwriteException('Missing required parameter: "providerId"');
@@ -6166,9 +6533,6 @@
6166
6533
  if (typeof isEuRegion !== 'undefined') {
6167
6534
  payload['isEuRegion'] = isEuRegion;
6168
6535
  }
6169
- if (typeof enabled !== 'undefined') {
6170
- payload['enabled'] = enabled;
6171
- }
6172
6536
  if (typeof fromName !== 'undefined') {
6173
6537
  payload['fromName'] = fromName;
6174
6538
  }
@@ -6181,6 +6545,9 @@
6181
6545
  if (typeof replyToEmail !== 'undefined') {
6182
6546
  payload['replyToEmail'] = replyToEmail;
6183
6547
  }
6548
+ if (typeof enabled !== 'undefined') {
6549
+ payload['enabled'] = enabled;
6550
+ }
6184
6551
  const uri = new URL(this.client.config.endpoint + apiPath);
6185
6552
  return yield this.client.call('post', uri, {
6186
6553
  'content-type': 'application/json',
@@ -6190,6 +6557,7 @@
6190
6557
  /**
6191
6558
  * Update Mailgun provider
6192
6559
  *
6560
+ * Update a Mailgun provider by its unique ID.
6193
6561
  *
6194
6562
  * @param {string} providerId
6195
6563
  * @param {string} name
@@ -6247,6 +6615,7 @@
6247
6615
  /**
6248
6616
  * Create Msg91 provider
6249
6617
  *
6618
+ * Create a new MSG91 provider.
6250
6619
  *
6251
6620
  * @param {string} providerId
6252
6621
  * @param {string} name
@@ -6294,6 +6663,7 @@
6294
6663
  /**
6295
6664
  * Update Msg91 provider
6296
6665
  *
6666
+ * Update a MSG91 provider by its unique ID.
6297
6667
  *
6298
6668
  * @param {string} providerId
6299
6669
  * @param {string} name
@@ -6335,19 +6705,20 @@
6335
6705
  /**
6336
6706
  * Create Sendgrid provider
6337
6707
  *
6708
+ * Create a new Sendgrid provider.
6338
6709
  *
6339
6710
  * @param {string} providerId
6340
6711
  * @param {string} name
6341
6712
  * @param {string} apiKey
6342
- * @param {boolean} enabled
6343
6713
  * @param {string} fromName
6344
6714
  * @param {string} fromEmail
6345
6715
  * @param {string} replyToName
6346
6716
  * @param {string} replyToEmail
6717
+ * @param {boolean} enabled
6347
6718
  * @throws {AppwriteException}
6348
6719
  * @returns {Promise}
6349
6720
  */
6350
- createSendgridProvider(providerId, name, apiKey, enabled, fromName, fromEmail, replyToName, replyToEmail) {
6721
+ createSendgridProvider(providerId, name, apiKey, fromName, fromEmail, replyToName, replyToEmail, enabled) {
6351
6722
  return __awaiter(this, void 0, void 0, function* () {
6352
6723
  if (typeof providerId === 'undefined') {
6353
6724
  throw new AppwriteException('Missing required parameter: "providerId"');
@@ -6366,9 +6737,6 @@
6366
6737
  if (typeof apiKey !== 'undefined') {
6367
6738
  payload['apiKey'] = apiKey;
6368
6739
  }
6369
- if (typeof enabled !== 'undefined') {
6370
- payload['enabled'] = enabled;
6371
- }
6372
6740
  if (typeof fromName !== 'undefined') {
6373
6741
  payload['fromName'] = fromName;
6374
6742
  }
@@ -6381,6 +6749,9 @@
6381
6749
  if (typeof replyToEmail !== 'undefined') {
6382
6750
  payload['replyToEmail'] = replyToEmail;
6383
6751
  }
6752
+ if (typeof enabled !== 'undefined') {
6753
+ payload['enabled'] = enabled;
6754
+ }
6384
6755
  const uri = new URL(this.client.config.endpoint + apiPath);
6385
6756
  return yield this.client.call('post', uri, {
6386
6757
  'content-type': 'application/json',
@@ -6390,6 +6761,7 @@
6390
6761
  /**
6391
6762
  * Update Sendgrid provider
6392
6763
  *
6764
+ * Update a Sendgrid provider by its unique ID.
6393
6765
  *
6394
6766
  * @param {string} providerId
6395
6767
  * @param {string} name
@@ -6407,16 +6779,170 @@
6407
6779
  if (typeof providerId === 'undefined') {
6408
6780
  throw new AppwriteException('Missing required parameter: "providerId"');
6409
6781
  }
6410
- const apiPath = '/messaging/providers/sendgrid/{providerId}'.replace('{providerId}', providerId);
6411
- const payload = {};
6412
- if (typeof name !== 'undefined') {
6413
- payload['name'] = name;
6782
+ const apiPath = '/messaging/providers/sendgrid/{providerId}'.replace('{providerId}', providerId);
6783
+ const payload = {};
6784
+ if (typeof name !== 'undefined') {
6785
+ payload['name'] = name;
6786
+ }
6787
+ if (typeof enabled !== 'undefined') {
6788
+ payload['enabled'] = enabled;
6789
+ }
6790
+ if (typeof apiKey !== 'undefined') {
6791
+ payload['apiKey'] = apiKey;
6792
+ }
6793
+ if (typeof fromName !== 'undefined') {
6794
+ payload['fromName'] = fromName;
6795
+ }
6796
+ if (typeof fromEmail !== 'undefined') {
6797
+ payload['fromEmail'] = fromEmail;
6798
+ }
6799
+ if (typeof replyToName !== 'undefined') {
6800
+ payload['replyToName'] = replyToName;
6801
+ }
6802
+ if (typeof replyToEmail !== 'undefined') {
6803
+ payload['replyToEmail'] = replyToEmail;
6804
+ }
6805
+ const uri = new URL(this.client.config.endpoint + apiPath);
6806
+ return yield this.client.call('patch', uri, {
6807
+ 'content-type': 'application/json',
6808
+ }, payload);
6809
+ });
6810
+ }
6811
+ /**
6812
+ * Create SMTP provider
6813
+ *
6814
+ * Create a new SMTP provider.
6815
+ *
6816
+ * @param {string} providerId
6817
+ * @param {string} name
6818
+ * @param {string} host
6819
+ * @param {number} port
6820
+ * @param {string} username
6821
+ * @param {string} password
6822
+ * @param {SmtpEncryption} encryption
6823
+ * @param {boolean} autoTLS
6824
+ * @param {string} mailer
6825
+ * @param {string} fromName
6826
+ * @param {string} fromEmail
6827
+ * @param {string} replyToName
6828
+ * @param {string} replyToEmail
6829
+ * @param {boolean} enabled
6830
+ * @throws {AppwriteException}
6831
+ * @returns {Promise}
6832
+ */
6833
+ createSmtpProvider(providerId, name, host, port, username, password, encryption, autoTLS, mailer, fromName, fromEmail, replyToName, replyToEmail, enabled) {
6834
+ return __awaiter(this, void 0, void 0, function* () {
6835
+ if (typeof providerId === 'undefined') {
6836
+ throw new AppwriteException('Missing required parameter: "providerId"');
6837
+ }
6838
+ if (typeof name === 'undefined') {
6839
+ throw new AppwriteException('Missing required parameter: "name"');
6840
+ }
6841
+ if (typeof host === 'undefined') {
6842
+ throw new AppwriteException('Missing required parameter: "host"');
6843
+ }
6844
+ const apiPath = '/messaging/providers/smtp';
6845
+ const payload = {};
6846
+ if (typeof providerId !== 'undefined') {
6847
+ payload['providerId'] = providerId;
6848
+ }
6849
+ if (typeof name !== 'undefined') {
6850
+ payload['name'] = name;
6851
+ }
6852
+ if (typeof host !== 'undefined') {
6853
+ payload['host'] = host;
6854
+ }
6855
+ if (typeof port !== 'undefined') {
6856
+ payload['port'] = port;
6857
+ }
6858
+ if (typeof username !== 'undefined') {
6859
+ payload['username'] = username;
6860
+ }
6861
+ if (typeof password !== 'undefined') {
6862
+ payload['password'] = password;
6863
+ }
6864
+ if (typeof encryption !== 'undefined') {
6865
+ payload['encryption'] = encryption;
6866
+ }
6867
+ if (typeof autoTLS !== 'undefined') {
6868
+ payload['autoTLS'] = autoTLS;
6869
+ }
6870
+ if (typeof mailer !== 'undefined') {
6871
+ payload['mailer'] = mailer;
6872
+ }
6873
+ if (typeof fromName !== 'undefined') {
6874
+ payload['fromName'] = fromName;
6875
+ }
6876
+ if (typeof fromEmail !== 'undefined') {
6877
+ payload['fromEmail'] = fromEmail;
6878
+ }
6879
+ if (typeof replyToName !== 'undefined') {
6880
+ payload['replyToName'] = replyToName;
6881
+ }
6882
+ if (typeof replyToEmail !== 'undefined') {
6883
+ payload['replyToEmail'] = replyToEmail;
6884
+ }
6885
+ if (typeof enabled !== 'undefined') {
6886
+ payload['enabled'] = enabled;
6887
+ }
6888
+ const uri = new URL(this.client.config.endpoint + apiPath);
6889
+ return yield this.client.call('post', uri, {
6890
+ 'content-type': 'application/json',
6891
+ }, payload);
6892
+ });
6893
+ }
6894
+ /**
6895
+ * Update SMTP provider
6896
+ *
6897
+ * Update a SMTP provider by its unique ID.
6898
+ *
6899
+ * @param {string} providerId
6900
+ * @param {string} name
6901
+ * @param {string} host
6902
+ * @param {number} port
6903
+ * @param {string} username
6904
+ * @param {string} password
6905
+ * @param {SmtpEncryption} encryption
6906
+ * @param {boolean} autoTLS
6907
+ * @param {string} mailer
6908
+ * @param {string} fromName
6909
+ * @param {string} fromEmail
6910
+ * @param {string} replyToName
6911
+ * @param {string} replyToEmail
6912
+ * @param {boolean} enabled
6913
+ * @throws {AppwriteException}
6914
+ * @returns {Promise}
6915
+ */
6916
+ updateSmtpProvider(providerId, name, host, port, username, password, encryption, autoTLS, mailer, fromName, fromEmail, replyToName, replyToEmail, enabled) {
6917
+ return __awaiter(this, void 0, void 0, function* () {
6918
+ if (typeof providerId === 'undefined') {
6919
+ throw new AppwriteException('Missing required parameter: "providerId"');
6920
+ }
6921
+ const apiPath = '/messaging/providers/smtp/{providerId}'.replace('{providerId}', providerId);
6922
+ const payload = {};
6923
+ if (typeof name !== 'undefined') {
6924
+ payload['name'] = name;
6925
+ }
6926
+ if (typeof host !== 'undefined') {
6927
+ payload['host'] = host;
6928
+ }
6929
+ if (typeof port !== 'undefined') {
6930
+ payload['port'] = port;
6931
+ }
6932
+ if (typeof username !== 'undefined') {
6933
+ payload['username'] = username;
6414
6934
  }
6415
- if (typeof enabled !== 'undefined') {
6416
- payload['enabled'] = enabled;
6935
+ if (typeof password !== 'undefined') {
6936
+ payload['password'] = password;
6417
6937
  }
6418
- if (typeof apiKey !== 'undefined') {
6419
- payload['apiKey'] = apiKey;
6938
+ if (typeof encryption !== 'undefined') {
6939
+ payload['encryption'] = encryption;
6940
+ }
6941
+ if (typeof autoTLS !== 'undefined') {
6942
+ payload['autoTLS'] = autoTLS;
6943
+ }
6944
+ if (typeof mailer !== 'undefined') {
6945
+ payload['mailer'] = mailer;
6420
6946
  }
6421
6947
  if (typeof fromName !== 'undefined') {
6422
6948
  payload['fromName'] = fromName;
@@ -6430,6 +6956,9 @@
6430
6956
  if (typeof replyToEmail !== 'undefined') {
6431
6957
  payload['replyToEmail'] = replyToEmail;
6432
6958
  }
6959
+ if (typeof enabled !== 'undefined') {
6960
+ payload['enabled'] = enabled;
6961
+ }
6433
6962
  const uri = new URL(this.client.config.endpoint + apiPath);
6434
6963
  return yield this.client.call('patch', uri, {
6435
6964
  'content-type': 'application/json',
@@ -6439,17 +6968,18 @@
6439
6968
  /**
6440
6969
  * Create Telesign provider
6441
6970
  *
6971
+ * Create a new Telesign provider.
6442
6972
  *
6443
6973
  * @param {string} providerId
6444
6974
  * @param {string} name
6445
6975
  * @param {string} from
6446
- * @param {string} username
6447
- * @param {string} password
6976
+ * @param {string} customerId
6977
+ * @param {string} apiKey
6448
6978
  * @param {boolean} enabled
6449
6979
  * @throws {AppwriteException}
6450
6980
  * @returns {Promise}
6451
6981
  */
6452
- createTelesignProvider(providerId, name, from, username, password, enabled) {
6982
+ createTelesignProvider(providerId, name, from, customerId, apiKey, enabled) {
6453
6983
  return __awaiter(this, void 0, void 0, function* () {
6454
6984
  if (typeof providerId === 'undefined') {
6455
6985
  throw new AppwriteException('Missing required parameter: "providerId"');
@@ -6468,11 +6998,11 @@
6468
6998
  if (typeof from !== 'undefined') {
6469
6999
  payload['from'] = from;
6470
7000
  }
6471
- if (typeof username !== 'undefined') {
6472
- payload['username'] = username;
7001
+ if (typeof customerId !== 'undefined') {
7002
+ payload['customerId'] = customerId;
6473
7003
  }
6474
- if (typeof password !== 'undefined') {
6475
- payload['password'] = password;
7004
+ if (typeof apiKey !== 'undefined') {
7005
+ payload['apiKey'] = apiKey;
6476
7006
  }
6477
7007
  if (typeof enabled !== 'undefined') {
6478
7008
  payload['enabled'] = enabled;
@@ -6486,17 +7016,18 @@
6486
7016
  /**
6487
7017
  * Update Telesign provider
6488
7018
  *
7019
+ * Update a Telesign provider by its unique ID.
6489
7020
  *
6490
7021
  * @param {string} providerId
6491
7022
  * @param {string} name
6492
7023
  * @param {boolean} enabled
6493
- * @param {string} username
6494
- * @param {string} password
7024
+ * @param {string} customerId
7025
+ * @param {string} apiKey
6495
7026
  * @param {string} from
6496
7027
  * @throws {AppwriteException}
6497
7028
  * @returns {Promise}
6498
7029
  */
6499
- updateTelesignProvider(providerId, name, enabled, username, password, from) {
7030
+ updateTelesignProvider(providerId, name, enabled, customerId, apiKey, from) {
6500
7031
  return __awaiter(this, void 0, void 0, function* () {
6501
7032
  if (typeof providerId === 'undefined') {
6502
7033
  throw new AppwriteException('Missing required parameter: "providerId"');
@@ -6509,11 +7040,11 @@
6509
7040
  if (typeof enabled !== 'undefined') {
6510
7041
  payload['enabled'] = enabled;
6511
7042
  }
6512
- if (typeof username !== 'undefined') {
6513
- payload['username'] = username;
7043
+ if (typeof customerId !== 'undefined') {
7044
+ payload['customerId'] = customerId;
6514
7045
  }
6515
- if (typeof password !== 'undefined') {
6516
- payload['password'] = password;
7046
+ if (typeof apiKey !== 'undefined') {
7047
+ payload['apiKey'] = apiKey;
6517
7048
  }
6518
7049
  if (typeof from !== 'undefined') {
6519
7050
  payload['from'] = from;
@@ -6527,6 +7058,7 @@
6527
7058
  /**
6528
7059
  * Create Textmagic provider
6529
7060
  *
7061
+ * Create a new Textmagic provider.
6530
7062
  *
6531
7063
  * @param {string} providerId
6532
7064
  * @param {string} name
@@ -6574,6 +7106,7 @@
6574
7106
  /**
6575
7107
  * Update Textmagic provider
6576
7108
  *
7109
+ * Update a Textmagic provider by its unique ID.
6577
7110
  *
6578
7111
  * @param {string} providerId
6579
7112
  * @param {string} name
@@ -6615,6 +7148,7 @@
6615
7148
  /**
6616
7149
  * Create Twilio provider
6617
7150
  *
7151
+ * Create a new Twilio provider.
6618
7152
  *
6619
7153
  * @param {string} providerId
6620
7154
  * @param {string} name
@@ -6662,6 +7196,7 @@
6662
7196
  /**
6663
7197
  * Update Twilio provider
6664
7198
  *
7199
+ * Update a Twilio provider by its unique ID.
6665
7200
  *
6666
7201
  * @param {string} providerId
6667
7202
  * @param {string} name
@@ -6703,6 +7238,7 @@
6703
7238
  /**
6704
7239
  * Create Vonage provider
6705
7240
  *
7241
+ * Create a new Vonage provider.
6706
7242
  *
6707
7243
  * @param {string} providerId
6708
7244
  * @param {string} name
@@ -6750,6 +7286,7 @@
6750
7286
  /**
6751
7287
  * Update Vonage provider
6752
7288
  *
7289
+ * Update a Vonage provider by its unique ID.
6753
7290
  *
6754
7291
  * @param {string} providerId
6755
7292
  * @param {string} name
@@ -6791,6 +7328,8 @@
6791
7328
  /**
6792
7329
  * Get provider
6793
7330
  *
7331
+ * Get a provider by its unique ID.
7332
+ *
6794
7333
  *
6795
7334
  * @param {string} providerId
6796
7335
  * @throws {AppwriteException}
@@ -6812,6 +7351,7 @@
6812
7351
  /**
6813
7352
  * Delete provider
6814
7353
  *
7354
+ * Delete a provider by its unique ID.
6815
7355
  *
6816
7356
  * @param {string} providerId
6817
7357
  * @throws {AppwriteException}
@@ -6833,6 +7373,7 @@
6833
7373
  /**
6834
7374
  * List provider logs
6835
7375
  *
7376
+ * Get the provider activity logs listed by its unique ID.
6836
7377
  *
6837
7378
  * @param {string} providerId
6838
7379
  * @param {string[]} queries
@@ -6858,6 +7399,7 @@
6858
7399
  /**
6859
7400
  * List subscriber logs
6860
7401
  *
7402
+ * Get the subscriber activity logs listed by its unique ID.
6861
7403
  *
6862
7404
  * @param {string} subscriberId
6863
7405
  * @param {string[]} queries
@@ -6881,10 +7423,11 @@
6881
7423
  });
6882
7424
  }
6883
7425
  /**
6884
- * List topics.
7426
+ * List topics
6885
7427
  *
7428
+ * Get a list of all topics from the current Appwrite project.
6886
7429
  *
6887
- * @param {string} queries
7430
+ * @param {string[]} queries
6888
7431
  * @param {string} search
6889
7432
  * @throws {AppwriteException}
6890
7433
  * @returns {Promise}
@@ -6906,16 +7449,17 @@
6906
7449
  });
6907
7450
  }
6908
7451
  /**
6909
- * Create a topic.
7452
+ * Create topic
6910
7453
  *
7454
+ * Create a new topic.
6911
7455
  *
6912
7456
  * @param {string} topicId
6913
7457
  * @param {string} name
6914
- * @param {string} description
7458
+ * @param {string[]} subscribe
6915
7459
  * @throws {AppwriteException}
6916
7460
  * @returns {Promise}
6917
7461
  */
6918
- createTopic(topicId, name, description) {
7462
+ createTopic(topicId, name, subscribe) {
6919
7463
  return __awaiter(this, void 0, void 0, function* () {
6920
7464
  if (typeof topicId === 'undefined') {
6921
7465
  throw new AppwriteException('Missing required parameter: "topicId"');
@@ -6931,8 +7475,8 @@
6931
7475
  if (typeof name !== 'undefined') {
6932
7476
  payload['name'] = name;
6933
7477
  }
6934
- if (typeof description !== 'undefined') {
6935
- payload['description'] = description;
7478
+ if (typeof subscribe !== 'undefined') {
7479
+ payload['subscribe'] = subscribe;
6936
7480
  }
6937
7481
  const uri = new URL(this.client.config.endpoint + apiPath);
6938
7482
  return yield this.client.call('post', uri, {
@@ -6941,7 +7485,9 @@
6941
7485
  });
6942
7486
  }
6943
7487
  /**
6944
- * Get a topic.
7488
+ * Get topic
7489
+ *
7490
+ * Get a topic by its unique ID.
6945
7491
  *
6946
7492
  *
6947
7493
  * @param {string} topicId
@@ -6962,16 +7508,18 @@
6962
7508
  });
6963
7509
  }
6964
7510
  /**
6965
- * Update a topic.
7511
+ * Update topic
7512
+ *
7513
+ * Update a topic by its unique ID.
6966
7514
  *
6967
7515
  *
6968
7516
  * @param {string} topicId
6969
7517
  * @param {string} name
6970
- * @param {string} description
7518
+ * @param {string[]} subscribe
6971
7519
  * @throws {AppwriteException}
6972
7520
  * @returns {Promise}
6973
7521
  */
6974
- updateTopic(topicId, name, description) {
7522
+ updateTopic(topicId, name, subscribe) {
6975
7523
  return __awaiter(this, void 0, void 0, function* () {
6976
7524
  if (typeof topicId === 'undefined') {
6977
7525
  throw new AppwriteException('Missing required parameter: "topicId"');
@@ -6981,8 +7529,8 @@
6981
7529
  if (typeof name !== 'undefined') {
6982
7530
  payload['name'] = name;
6983
7531
  }
6984
- if (typeof description !== 'undefined') {
6985
- payload['description'] = description;
7532
+ if (typeof subscribe !== 'undefined') {
7533
+ payload['subscribe'] = subscribe;
6986
7534
  }
6987
7535
  const uri = new URL(this.client.config.endpoint + apiPath);
6988
7536
  return yield this.client.call('patch', uri, {
@@ -6991,8 +7539,9 @@
6991
7539
  });
6992
7540
  }
6993
7541
  /**
6994
- * Delete a topic.
7542
+ * Delete topic
6995
7543
  *
7544
+ * Delete a topic by its unique ID.
6996
7545
  *
6997
7546
  * @param {string} topicId
6998
7547
  * @throws {AppwriteException}
@@ -7014,6 +7563,7 @@
7014
7563
  /**
7015
7564
  * List topic logs
7016
7565
  *
7566
+ * Get the topic activity logs listed by its unique ID.
7017
7567
  *
7018
7568
  * @param {string} topicId
7019
7569
  * @param {string[]} queries
@@ -7037,11 +7587,12 @@
7037
7587
  });
7038
7588
  }
7039
7589
  /**
7040
- * List subscribers.
7590
+ * List subscribers
7041
7591
  *
7592
+ * Get a list of all subscribers from the current Appwrite project.
7042
7593
  *
7043
7594
  * @param {string} topicId
7044
- * @param {string} queries
7595
+ * @param {string[]} queries
7045
7596
  * @param {string} search
7046
7597
  * @throws {AppwriteException}
7047
7598
  * @returns {Promise}
@@ -7066,8 +7617,9 @@
7066
7617
  });
7067
7618
  }
7068
7619
  /**
7069
- * Create a subscriber.
7620
+ * Create subscriber
7070
7621
  *
7622
+ * Create a new subscriber.
7071
7623
  *
7072
7624
  * @param {string} topicId
7073
7625
  * @param {string} subscriberId
@@ -7101,7 +7653,9 @@
7101
7653
  });
7102
7654
  }
7103
7655
  /**
7104
- * Get a subscriber.
7656
+ * Get subscriber
7657
+ *
7658
+ * Get a subscriber by its unique ID.
7105
7659
  *
7106
7660
  *
7107
7661
  * @param {string} topicId
@@ -7126,8 +7680,9 @@
7126
7680
  });
7127
7681
  }
7128
7682
  /**
7129
- * Delete a subscriber.
7683
+ * Delete subscriber
7130
7684
  *
7685
+ * Delete a subscriber by its unique ID.
7131
7686
  *
7132
7687
  * @param {string} topicId
7133
7688
  * @param {string} subscriberId
@@ -7160,7 +7715,7 @@
7160
7715
  * List Migrations
7161
7716
  *
7162
7717
  *
7163
- * @param {string} queries
7718
+ * @param {string[]} queries
7164
7719
  * @param {string} search
7165
7720
  * @throws {AppwriteException}
7166
7721
  * @returns {Promise}
@@ -7765,12 +8320,12 @@
7765
8320
  super(client);
7766
8321
  }
7767
8322
  /**
7768
- * Get usage stats for a project
8323
+ * Get project usage stats
7769
8324
  *
7770
8325
  *
7771
8326
  * @param {string} startDate
7772
8327
  * @param {string} endDate
7773
- * @param {string} period
8328
+ * @param {ProjectUsageRange} period
7774
8329
  * @throws {AppwriteException}
7775
8330
  * @returns {Promise}
7776
8331
  */
@@ -7967,7 +8522,7 @@
7967
8522
  * @param {string} projectId
7968
8523
  * @param {string} name
7969
8524
  * @param {string} teamId
7970
- * @param {string} region
8525
+ * @param {Region} region
7971
8526
  * @param {string} description
7972
8527
  * @param {string} logo
7973
8528
  * @param {string} url
@@ -8145,26 +8700,33 @@
8145
8700
  });
8146
8701
  }
8147
8702
  /**
8148
- * Update project authentication duration
8703
+ * Update API status
8149
8704
  *
8150
8705
  *
8151
8706
  * @param {string} projectId
8152
- * @param {number} duration
8707
+ * @param {Api} api
8708
+ * @param {boolean} status
8153
8709
  * @throws {AppwriteException}
8154
8710
  * @returns {Promise}
8155
8711
  */
8156
- updateAuthDuration(projectId, duration) {
8712
+ updateApiStatus(projectId, api, status) {
8157
8713
  return __awaiter(this, void 0, void 0, function* () {
8158
8714
  if (typeof projectId === 'undefined') {
8159
8715
  throw new AppwriteException('Missing required parameter: "projectId"');
8160
8716
  }
8161
- if (typeof duration === 'undefined') {
8162
- throw new AppwriteException('Missing required parameter: "duration"');
8717
+ if (typeof api === 'undefined') {
8718
+ throw new AppwriteException('Missing required parameter: "api"');
8163
8719
  }
8164
- const apiPath = '/projects/{projectId}/auth/duration'.replace('{projectId}', projectId);
8720
+ if (typeof status === 'undefined') {
8721
+ throw new AppwriteException('Missing required parameter: "status"');
8722
+ }
8723
+ const apiPath = '/projects/{projectId}/api'.replace('{projectId}', projectId);
8165
8724
  const payload = {};
8166
- if (typeof duration !== 'undefined') {
8167
- payload['duration'] = duration;
8725
+ if (typeof api !== 'undefined') {
8726
+ payload['api'] = api;
8727
+ }
8728
+ if (typeof status !== 'undefined') {
8729
+ payload['status'] = status;
8168
8730
  }
8169
8731
  const uri = new URL(this.client.config.endpoint + apiPath);
8170
8732
  return yield this.client.call('patch', uri, {
@@ -8173,26 +8735,26 @@
8173
8735
  });
8174
8736
  }
8175
8737
  /**
8176
- * Update project users limit
8738
+ * Update all API status
8177
8739
  *
8178
8740
  *
8179
8741
  * @param {string} projectId
8180
- * @param {number} limit
8742
+ * @param {boolean} status
8181
8743
  * @throws {AppwriteException}
8182
8744
  * @returns {Promise}
8183
8745
  */
8184
- updateAuthLimit(projectId, limit) {
8746
+ updateApiStatusAll(projectId, status) {
8185
8747
  return __awaiter(this, void 0, void 0, function* () {
8186
8748
  if (typeof projectId === 'undefined') {
8187
8749
  throw new AppwriteException('Missing required parameter: "projectId"');
8188
8750
  }
8189
- if (typeof limit === 'undefined') {
8190
- throw new AppwriteException('Missing required parameter: "limit"');
8751
+ if (typeof status === 'undefined') {
8752
+ throw new AppwriteException('Missing required parameter: "status"');
8191
8753
  }
8192
- const apiPath = '/projects/{projectId}/auth/limit'.replace('{projectId}', projectId);
8754
+ const apiPath = '/projects/{projectId}/api/all'.replace('{projectId}', projectId);
8193
8755
  const payload = {};
8194
- if (typeof limit !== 'undefined') {
8195
- payload['limit'] = limit;
8756
+ if (typeof status !== 'undefined') {
8757
+ payload['status'] = status;
8196
8758
  }
8197
8759
  const uri = new URL(this.client.config.endpoint + apiPath);
8198
8760
  return yield this.client.call('patch', uri, {
@@ -8201,7 +8763,35 @@
8201
8763
  });
8202
8764
  }
8203
8765
  /**
8204
- * Update project user sessions limit
8766
+ * Update project authentication duration
8767
+ *
8768
+ *
8769
+ * @param {string} projectId
8770
+ * @param {number} duration
8771
+ * @throws {AppwriteException}
8772
+ * @returns {Promise}
8773
+ */
8774
+ updateAuthDuration(projectId, duration) {
8775
+ return __awaiter(this, void 0, void 0, function* () {
8776
+ if (typeof projectId === 'undefined') {
8777
+ throw new AppwriteException('Missing required parameter: "projectId"');
8778
+ }
8779
+ if (typeof duration === 'undefined') {
8780
+ throw new AppwriteException('Missing required parameter: "duration"');
8781
+ }
8782
+ const apiPath = '/projects/{projectId}/auth/duration'.replace('{projectId}', projectId);
8783
+ const payload = {};
8784
+ if (typeof duration !== 'undefined') {
8785
+ payload['duration'] = duration;
8786
+ }
8787
+ const uri = new URL(this.client.config.endpoint + apiPath);
8788
+ return yield this.client.call('patch', uri, {
8789
+ 'content-type': 'application/json',
8790
+ }, payload);
8791
+ });
8792
+ }
8793
+ /**
8794
+ * Update project users limit
8205
8795
  *
8206
8796
  *
8207
8797
  * @param {string} projectId
@@ -8209,7 +8799,7 @@
8209
8799
  * @throws {AppwriteException}
8210
8800
  * @returns {Promise}
8211
8801
  */
8212
- updateAuthSessionsLimit(projectId, limit) {
8802
+ updateAuthLimit(projectId, limit) {
8213
8803
  return __awaiter(this, void 0, void 0, function* () {
8214
8804
  if (typeof projectId === 'undefined') {
8215
8805
  throw new AppwriteException('Missing required parameter: "projectId"');
@@ -8217,7 +8807,7 @@
8217
8807
  if (typeof limit === 'undefined') {
8218
8808
  throw new AppwriteException('Missing required parameter: "limit"');
8219
8809
  }
8220
- const apiPath = '/projects/{projectId}/auth/max-sessions'.replace('{projectId}', projectId);
8810
+ const apiPath = '/projects/{projectId}/auth/limit'.replace('{projectId}', projectId);
8221
8811
  const payload = {};
8222
8812
  if (typeof limit !== 'undefined') {
8223
8813
  payload['limit'] = limit;
@@ -8229,26 +8819,26 @@
8229
8819
  });
8230
8820
  }
8231
8821
  /**
8232
- * Update Project user minimum sessions factors
8822
+ * Update project user sessions limit
8233
8823
  *
8234
8824
  *
8235
8825
  * @param {string} projectId
8236
- * @param {number} factors
8826
+ * @param {number} limit
8237
8827
  * @throws {AppwriteException}
8238
8828
  * @returns {Promise}
8239
8829
  */
8240
- updateAuthMfaFactors(projectId, factors) {
8830
+ updateAuthSessionsLimit(projectId, limit) {
8241
8831
  return __awaiter(this, void 0, void 0, function* () {
8242
8832
  if (typeof projectId === 'undefined') {
8243
8833
  throw new AppwriteException('Missing required parameter: "projectId"');
8244
8834
  }
8245
- if (typeof factors === 'undefined') {
8246
- throw new AppwriteException('Missing required parameter: "factors"');
8835
+ if (typeof limit === 'undefined') {
8836
+ throw new AppwriteException('Missing required parameter: "limit"');
8247
8837
  }
8248
- const apiPath = '/projects/{projectId}/auth/mfa/factors'.replace('{projectId}', projectId);
8838
+ const apiPath = '/projects/{projectId}/auth/max-sessions'.replace('{projectId}', projectId);
8249
8839
  const payload = {};
8250
- if (typeof factors !== 'undefined') {
8251
- payload['factors'] = factors;
8840
+ if (typeof limit !== 'undefined') {
8841
+ payload['limit'] = limit;
8252
8842
  }
8253
8843
  const uri = new URL(this.client.config.endpoint + apiPath);
8254
8844
  return yield this.client.call('patch', uri, {
@@ -8345,7 +8935,7 @@
8345
8935
  *
8346
8936
  *
8347
8937
  * @param {string} projectId
8348
- * @param {string} method
8938
+ * @param {AuthMethod} method
8349
8939
  * @param {boolean} status
8350
8940
  * @throws {AppwriteException}
8351
8941
  * @returns {Promise}
@@ -8530,7 +9120,7 @@
8530
9120
  *
8531
9121
  *
8532
9122
  * @param {string} projectId
8533
- * @param {string} provider
9123
+ * @param {OAuthProvider} provider
8534
9124
  * @param {string} appId
8535
9125
  * @param {string} secret
8536
9126
  * @param {boolean} enabled
@@ -8591,7 +9181,7 @@
8591
9181
  *
8592
9182
  *
8593
9183
  * @param {string} projectId
8594
- * @param {string} type
9184
+ * @param {PlatformType} type
8595
9185
  * @param {string} name
8596
9186
  * @param {string} key
8597
9187
  * @param {string} store
@@ -8732,7 +9322,7 @@
8732
9322
  *
8733
9323
  *
8734
9324
  * @param {string} projectId
8735
- * @param {string} service
9325
+ * @param {ApiService} service
8736
9326
  * @param {boolean} status
8737
9327
  * @throws {AppwriteException}
8738
9328
  * @returns {Promise}
@@ -8803,7 +9393,7 @@
8803
9393
  * @param {number} port
8804
9394
  * @param {string} username
8805
9395
  * @param {string} password
8806
- * @param {string} secure
9396
+ * @param {SMTPSecure} secure
8807
9397
  * @throws {AppwriteException}
8808
9398
  * @returns {Promise}
8809
9399
  */
@@ -8863,7 +9453,7 @@
8863
9453
  * @param {number} port
8864
9454
  * @param {string} username
8865
9455
  * @param {string} password
8866
- * @param {string} secure
9456
+ * @param {SMTPSecure} secure
8867
9457
  * @throws {AppwriteException}
8868
9458
  * @returns {Promise}
8869
9459
  */
@@ -8952,8 +9542,8 @@
8952
9542
  *
8953
9543
  *
8954
9544
  * @param {string} projectId
8955
- * @param {string} type
8956
- * @param {string} locale
9545
+ * @param {EmailTemplateType} type
9546
+ * @param {EmailTemplateLocale} locale
8957
9547
  * @throws {AppwriteException}
8958
9548
  * @returns {Promise}
8959
9549
  */
@@ -8981,8 +9571,8 @@
8981
9571
  *
8982
9572
  *
8983
9573
  * @param {string} projectId
8984
- * @param {string} type
8985
- * @param {string} locale
9574
+ * @param {EmailTemplateType} type
9575
+ * @param {EmailTemplateLocale} locale
8986
9576
  * @param {string} subject
8987
9577
  * @param {string} message
8988
9578
  * @param {string} senderName
@@ -9036,8 +9626,8 @@
9036
9626
  *
9037
9627
  *
9038
9628
  * @param {string} projectId
9039
- * @param {string} type
9040
- * @param {string} locale
9629
+ * @param {EmailTemplateType} type
9630
+ * @param {EmailTemplateLocale} locale
9041
9631
  * @throws {AppwriteException}
9042
9632
  * @returns {Promise}
9043
9633
  */
@@ -9065,8 +9655,8 @@
9065
9655
  *
9066
9656
  *
9067
9657
  * @param {string} projectId
9068
- * @param {string} type
9069
- * @param {string} locale
9658
+ * @param {SmsTemplateType} type
9659
+ * @param {SmsTemplateLocale} locale
9070
9660
  * @throws {AppwriteException}
9071
9661
  * @returns {Promise}
9072
9662
  */
@@ -9094,8 +9684,8 @@
9094
9684
  *
9095
9685
  *
9096
9686
  * @param {string} projectId
9097
- * @param {string} type
9098
- * @param {string} locale
9687
+ * @param {SmsTemplateType} type
9688
+ * @param {SmsTemplateLocale} locale
9099
9689
  * @param {string} message
9100
9690
  * @throws {AppwriteException}
9101
9691
  * @returns {Promise}
@@ -9130,8 +9720,8 @@
9130
9720
  *
9131
9721
  *
9132
9722
  * @param {string} projectId
9133
- * @param {string} type
9134
- * @param {string} locale
9723
+ * @param {SmsTemplateType} type
9724
+ * @param {SmsTemplateLocale} locale
9135
9725
  * @throws {AppwriteException}
9136
9726
  * @returns {Promise}
9137
9727
  */
@@ -9415,7 +10005,7 @@
9415
10005
  * Create a new proxy rule.
9416
10006
  *
9417
10007
  * @param {string} domain
9418
- * @param {string} resourceType
10008
+ * @param {ResourceType} resourceType
9419
10009
  * @param {string} resourceId
9420
10010
  * @throws {AppwriteException}
9421
10011
  * @returns {Promise}
@@ -9555,7 +10145,7 @@
9555
10145
  * @param {boolean} enabled
9556
10146
  * @param {number} maximumFileSize
9557
10147
  * @param {string[]} allowedFileExtensions
9558
- * @param {string} compression
10148
+ * @param {Compression} compression
9559
10149
  * @param {boolean} encryption
9560
10150
  * @param {boolean} antivirus
9561
10151
  * @throws {AppwriteException}
@@ -9642,7 +10232,7 @@
9642
10232
  * @param {boolean} enabled
9643
10233
  * @param {number} maximumFileSize
9644
10234
  * @param {string[]} allowedFileExtensions
9645
- * @param {string} compression
10235
+ * @param {Compression} compression
9646
10236
  * @param {boolean} encryption
9647
10237
  * @param {boolean} antivirus
9648
10238
  * @throws {AppwriteException}
@@ -9971,7 +10561,7 @@
9971
10561
  * @param {string} fileId
9972
10562
  * @param {number} width
9973
10563
  * @param {number} height
9974
- * @param {string} gravity
10564
+ * @param {ImageGravity} gravity
9975
10565
  * @param {number} quality
9976
10566
  * @param {number} borderWidth
9977
10567
  * @param {string} borderColor
@@ -9979,7 +10569,7 @@
9979
10569
  * @param {number} opacity
9980
10570
  * @param {number} rotation
9981
10571
  * @param {string} background
9982
- * @param {string} output
10572
+ * @param {ImageFormat} output
9983
10573
  * @throws {AppwriteException}
9984
10574
  * @returns {URL}
9985
10575
  */
@@ -10061,10 +10651,10 @@
10061
10651
  return uri;
10062
10652
  }
10063
10653
  /**
10064
- * Get usage stats for storage
10654
+ * Get storage usage stats
10065
10655
  *
10066
10656
  *
10067
- * @param {string} range
10657
+ * @param {StorageUsageRange} range
10068
10658
  * @throws {AppwriteException}
10069
10659
  * @returns {Promise}
10070
10660
  */
@@ -10082,11 +10672,11 @@
10082
10672
  });
10083
10673
  }
10084
10674
  /**
10085
- * Get usage stats for storage bucket
10675
+ * Get bucket usage stats
10086
10676
  *
10087
10677
  *
10088
10678
  * @param {string} bucketId
10089
- * @param {string} range
10679
+ * @param {StorageUsageRange} range
10090
10680
  * @throws {AppwriteException}
10091
10681
  * @returns {Promise}
10092
10682
  */
@@ -10740,7 +11330,7 @@
10740
11330
  *
10741
11331
  * Get identities for all users.
10742
11332
  *
10743
- * @param {string} queries
11333
+ * @param {string[]} queries
10744
11334
  * @param {string} search
10745
11335
  * @throws {AppwriteException}
10746
11336
  * @returns {Promise}
@@ -11035,7 +11625,7 @@
11035
11625
  * @param {string} userId
11036
11626
  * @param {string} email
11037
11627
  * @param {string} password
11038
- * @param {string} passwordVersion
11628
+ * @param {PasswordHash} passwordVersion
11039
11629
  * @param {string} name
11040
11630
  * @throws {AppwriteException}
11041
11631
  * @returns {Promise}
@@ -11075,10 +11665,10 @@
11075
11665
  });
11076
11666
  }
11077
11667
  /**
11078
- * Get usage stats for the users API
11668
+ * Get users usage stats
11079
11669
  *
11080
11670
  *
11081
- * @param {string} range
11671
+ * @param {UserUsageRange} range
11082
11672
  * @throws {AppwriteException}
11083
11673
  * @returns {Promise}
11084
11674
  */
@@ -11258,6 +11848,7 @@
11258
11848
  /**
11259
11849
  * Update MFA
11260
11850
  *
11851
+ * Enable or disable MFA on a user account.
11261
11852
  *
11262
11853
  * @param {string} userId
11263
11854
  * @param {boolean} mfa
@@ -11286,31 +11877,122 @@
11286
11877
  /**
11287
11878
  * Delete Authenticator
11288
11879
  *
11880
+ * Delete an authenticator app.
11289
11881
  *
11290
11882
  * @param {string} userId
11291
- * @param {string} provider
11292
- * @param {string} otp
11883
+ * @param {AuthenticatorType} type
11293
11884
  * @throws {AppwriteException}
11294
11885
  * @returns {Promise}
11295
11886
  */
11296
- deleteAuthenticator(userId, provider, otp) {
11887
+ deleteMfaAuthenticator(userId, type) {
11297
11888
  return __awaiter(this, void 0, void 0, function* () {
11298
11889
  if (typeof userId === 'undefined') {
11299
11890
  throw new AppwriteException('Missing required parameter: "userId"');
11300
11891
  }
11301
- if (typeof provider === 'undefined') {
11302
- throw new AppwriteException('Missing required parameter: "provider"');
11892
+ if (typeof type === 'undefined') {
11893
+ throw new AppwriteException('Missing required parameter: "type"');
11303
11894
  }
11304
- if (typeof otp === 'undefined') {
11305
- throw new AppwriteException('Missing required parameter: "otp"');
11895
+ const apiPath = '/users/{userId}/mfa/authenticators/{type}'.replace('{userId}', userId).replace('{type}', type);
11896
+ const payload = {};
11897
+ const uri = new URL(this.client.config.endpoint + apiPath);
11898
+ return yield this.client.call('delete', uri, {
11899
+ 'content-type': 'application/json',
11900
+ }, payload);
11901
+ });
11902
+ }
11903
+ /**
11904
+ * List Factors
11905
+ *
11906
+ * List the factors available on the account to be used as a MFA challange.
11907
+ *
11908
+ * @param {string} userId
11909
+ * @throws {AppwriteException}
11910
+ * @returns {Promise}
11911
+ */
11912
+ listMfaFactors(userId) {
11913
+ return __awaiter(this, void 0, void 0, function* () {
11914
+ if (typeof userId === 'undefined') {
11915
+ throw new AppwriteException('Missing required parameter: "userId"');
11306
11916
  }
11307
- const apiPath = '/users/{userId}/mfa/{provider}'.replace('{userId}', userId).replace('{provider}', provider);
11917
+ const apiPath = '/users/{userId}/mfa/factors'.replace('{userId}', userId);
11308
11918
  const payload = {};
11309
- if (typeof otp !== 'undefined') {
11310
- payload['otp'] = otp;
11919
+ const uri = new URL(this.client.config.endpoint + apiPath);
11920
+ return yield this.client.call('get', uri, {
11921
+ 'content-type': 'application/json',
11922
+ }, payload);
11923
+ });
11924
+ }
11925
+ /**
11926
+ * Get MFA Recovery Codes
11927
+ *
11928
+ * Get recovery codes that can be used as backup for MFA flow by User ID.
11929
+ * Before getting codes, they must be generated using
11930
+ * [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes)
11931
+ * method.
11932
+ *
11933
+ * @param {string} userId
11934
+ * @throws {AppwriteException}
11935
+ * @returns {Promise}
11936
+ */
11937
+ getMfaRecoveryCodes(userId) {
11938
+ return __awaiter(this, void 0, void 0, function* () {
11939
+ if (typeof userId === 'undefined') {
11940
+ throw new AppwriteException('Missing required parameter: "userId"');
11311
11941
  }
11942
+ const apiPath = '/users/{userId}/mfa/recovery-codes'.replace('{userId}', userId);
11943
+ const payload = {};
11312
11944
  const uri = new URL(this.client.config.endpoint + apiPath);
11313
- return yield this.client.call('delete', uri, {
11945
+ return yield this.client.call('get', uri, {
11946
+ 'content-type': 'application/json',
11947
+ }, payload);
11948
+ });
11949
+ }
11950
+ /**
11951
+ * Regenerate MFA Recovery Codes
11952
+ *
11953
+ * Regenerate recovery codes that can be used as backup for MFA flow by User
11954
+ * ID. Before regenerating codes, they must be first generated using
11955
+ * [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes)
11956
+ * method.
11957
+ *
11958
+ * @param {string} userId
11959
+ * @throws {AppwriteException}
11960
+ * @returns {Promise}
11961
+ */
11962
+ updateMfaRecoveryCodes(userId) {
11963
+ return __awaiter(this, void 0, void 0, function* () {
11964
+ if (typeof userId === 'undefined') {
11965
+ throw new AppwriteException('Missing required parameter: "userId"');
11966
+ }
11967
+ const apiPath = '/users/{userId}/mfa/recovery-codes'.replace('{userId}', userId);
11968
+ const payload = {};
11969
+ const uri = new URL(this.client.config.endpoint + apiPath);
11970
+ return yield this.client.call('put', uri, {
11971
+ 'content-type': 'application/json',
11972
+ }, payload);
11973
+ });
11974
+ }
11975
+ /**
11976
+ * Create MFA Recovery Codes
11977
+ *
11978
+ * Generate recovery codes used as backup for MFA flow for User ID. Recovery
11979
+ * codes can be used as a MFA verification type in
11980
+ * [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge)
11981
+ * method by client SDK.
11982
+ *
11983
+ * @param {string} userId
11984
+ * @throws {AppwriteException}
11985
+ * @returns {Promise}
11986
+ */
11987
+ createMfaRecoveryCodes(userId) {
11988
+ return __awaiter(this, void 0, void 0, function* () {
11989
+ if (typeof userId === 'undefined') {
11990
+ throw new AppwriteException('Missing required parameter: "userId"');
11991
+ }
11992
+ const apiPath = '/users/{userId}/mfa/recovery-codes'.replace('{userId}', userId);
11993
+ const payload = {};
11994
+ const uri = new URL(this.client.config.endpoint + apiPath);
11995
+ return yield this.client.call('patch', uri, {
11314
11996
  'content-type': 'application/json',
11315
11997
  }, payload);
11316
11998
  });
@@ -11455,27 +12137,6 @@
11455
12137
  }, payload);
11456
12138
  });
11457
12139
  }
11458
- /**
11459
- * List Providers
11460
- *
11461
- *
11462
- * @param {string} userId
11463
- * @throws {AppwriteException}
11464
- * @returns {Promise}
11465
- */
11466
- listProviders(userId) {
11467
- return __awaiter(this, void 0, void 0, function* () {
11468
- if (typeof userId === 'undefined') {
11469
- throw new AppwriteException('Missing required parameter: "userId"');
11470
- }
11471
- const apiPath = '/users/{userId}/providers'.replace('{userId}', userId);
11472
- const payload = {};
11473
- const uri = new URL(this.client.config.endpoint + apiPath);
11474
- return yield this.client.call('get', uri, {
11475
- 'content-type': 'application/json',
11476
- }, payload);
11477
- });
11478
- }
11479
12140
  /**
11480
12141
  * List user sessions
11481
12142
  *
@@ -11606,9 +12267,10 @@
11606
12267
  /**
11607
12268
  * List User Targets
11608
12269
  *
12270
+ * List the messaging targets that are associated with a user.
11609
12271
  *
11610
12272
  * @param {string} userId
11611
- * @param {string} queries
12273
+ * @param {string[]} queries
11612
12274
  * @throws {AppwriteException}
11613
12275
  * @returns {Promise}
11614
12276
  */
@@ -11631,10 +12293,11 @@
11631
12293
  /**
11632
12294
  * Create User Target
11633
12295
  *
12296
+ * Create a messaging target.
11634
12297
  *
11635
12298
  * @param {string} userId
11636
12299
  * @param {string} targetId
11637
- * @param {string} providerType
12300
+ * @param {MessagingProviderType} providerType
11638
12301
  * @param {string} identifier
11639
12302
  * @param {string} providerId
11640
12303
  * @param {string} name
@@ -11681,6 +12344,7 @@
11681
12344
  /**
11682
12345
  * Get User Target
11683
12346
  *
12347
+ * Get a user's push notification target by ID.
11684
12348
  *
11685
12349
  * @param {string} userId
11686
12350
  * @param {string} targetId
@@ -11706,6 +12370,7 @@
11706
12370
  /**
11707
12371
  * Update User target
11708
12372
  *
12373
+ * Update a messaging target.
11709
12374
  *
11710
12375
  * @param {string} userId
11711
12376
  * @param {string} targetId
@@ -11743,6 +12408,7 @@
11743
12408
  /**
11744
12409
  * Delete user target
11745
12410
  *
12411
+ * Delete a messaging target.
11746
12412
  *
11747
12413
  * @param {string} userId
11748
12414
  * @param {string} targetId
@@ -12224,6 +12890,841 @@
12224
12890
  }
12225
12891
  }
12226
12892
 
12893
+ exports.AuthenticatorType = void 0;
12894
+ (function (AuthenticatorType) {
12895
+ AuthenticatorType["Totp"] = "totp";
12896
+ })(exports.AuthenticatorType || (exports.AuthenticatorType = {}));
12897
+
12898
+ exports.AuthenticationFactor = void 0;
12899
+ (function (AuthenticationFactor) {
12900
+ AuthenticationFactor["Email"] = "email";
12901
+ AuthenticationFactor["Phone"] = "phone";
12902
+ AuthenticationFactor["Totp"] = "totp";
12903
+ AuthenticationFactor["Recoverycode"] = "recoverycode";
12904
+ })(exports.AuthenticationFactor || (exports.AuthenticationFactor = {}));
12905
+
12906
+ exports.OAuthProvider = void 0;
12907
+ (function (OAuthProvider) {
12908
+ OAuthProvider["Amazon"] = "amazon";
12909
+ OAuthProvider["Apple"] = "apple";
12910
+ OAuthProvider["Auth0"] = "auth0";
12911
+ OAuthProvider["Authentik"] = "authentik";
12912
+ OAuthProvider["Autodesk"] = "autodesk";
12913
+ OAuthProvider["Bitbucket"] = "bitbucket";
12914
+ OAuthProvider["Bitly"] = "bitly";
12915
+ OAuthProvider["Box"] = "box";
12916
+ OAuthProvider["Dailymotion"] = "dailymotion";
12917
+ OAuthProvider["Discord"] = "discord";
12918
+ OAuthProvider["Disqus"] = "disqus";
12919
+ OAuthProvider["Dropbox"] = "dropbox";
12920
+ OAuthProvider["Etsy"] = "etsy";
12921
+ OAuthProvider["Facebook"] = "facebook";
12922
+ OAuthProvider["Github"] = "github";
12923
+ OAuthProvider["Gitlab"] = "gitlab";
12924
+ OAuthProvider["Google"] = "google";
12925
+ OAuthProvider["Linkedin"] = "linkedin";
12926
+ OAuthProvider["Microsoft"] = "microsoft";
12927
+ OAuthProvider["Notion"] = "notion";
12928
+ OAuthProvider["Oidc"] = "oidc";
12929
+ OAuthProvider["Okta"] = "okta";
12930
+ OAuthProvider["Paypal"] = "paypal";
12931
+ OAuthProvider["PaypalSandbox"] = "paypalSandbox";
12932
+ OAuthProvider["Podio"] = "podio";
12933
+ OAuthProvider["Salesforce"] = "salesforce";
12934
+ OAuthProvider["Slack"] = "slack";
12935
+ OAuthProvider["Spotify"] = "spotify";
12936
+ OAuthProvider["Stripe"] = "stripe";
12937
+ OAuthProvider["Tradeshift"] = "tradeshift";
12938
+ OAuthProvider["TradeshiftBox"] = "tradeshiftBox";
12939
+ OAuthProvider["Twitch"] = "twitch";
12940
+ OAuthProvider["Wordpress"] = "wordpress";
12941
+ OAuthProvider["Yahoo"] = "yahoo";
12942
+ OAuthProvider["Yammer"] = "yammer";
12943
+ OAuthProvider["Yandex"] = "yandex";
12944
+ OAuthProvider["Zoho"] = "zoho";
12945
+ OAuthProvider["Zoom"] = "zoom";
12946
+ OAuthProvider["Mock"] = "mock";
12947
+ })(exports.OAuthProvider || (exports.OAuthProvider = {}));
12948
+
12949
+ exports.Browser = void 0;
12950
+ (function (Browser) {
12951
+ Browser["AvantBrowser"] = "aa";
12952
+ Browser["AndroidWebViewBeta"] = "an";
12953
+ Browser["GoogleChrome"] = "ch";
12954
+ Browser["GoogleChromeIOS"] = "ci";
12955
+ Browser["GoogleChromeMobile"] = "cm";
12956
+ Browser["Chromium"] = "cr";
12957
+ Browser["MozillaFirefox"] = "ff";
12958
+ Browser["Safari"] = "sf";
12959
+ Browser["MobileSafari"] = "mf";
12960
+ Browser["MicrosoftEdge"] = "ps";
12961
+ Browser["MicrosoftEdgeIOS"] = "oi";
12962
+ Browser["OperaMini"] = "om";
12963
+ Browser["Opera"] = "op";
12964
+ Browser["OperaNext"] = "on";
12965
+ })(exports.Browser || (exports.Browser = {}));
12966
+
12967
+ exports.CreditCard = void 0;
12968
+ (function (CreditCard) {
12969
+ CreditCard["AmericanExpress"] = "amex";
12970
+ CreditCard["Argencard"] = "argencard";
12971
+ CreditCard["Cabal"] = "cabal";
12972
+ CreditCard["Consosud"] = "censosud";
12973
+ CreditCard["DinersClub"] = "diners";
12974
+ CreditCard["Discover"] = "discover";
12975
+ CreditCard["Elo"] = "elo";
12976
+ CreditCard["Hipercard"] = "hipercard";
12977
+ CreditCard["JCB"] = "jcb";
12978
+ CreditCard["Mastercard"] = "mastercard";
12979
+ CreditCard["Naranja"] = "naranja";
12980
+ CreditCard["TarjetaShopping"] = "targeta-shopping";
12981
+ CreditCard["UnionChinaPay"] = "union-china-pay";
12982
+ CreditCard["Visa"] = "visa";
12983
+ CreditCard["MIR"] = "mir";
12984
+ CreditCard["Maestro"] = "maestro";
12985
+ })(exports.CreditCard || (exports.CreditCard = {}));
12986
+
12987
+ exports.Flag = void 0;
12988
+ (function (Flag) {
12989
+ Flag["Afghanistan"] = "af";
12990
+ Flag["Angola"] = "ao";
12991
+ Flag["Albania"] = "al";
12992
+ Flag["Andorra"] = "ad";
12993
+ Flag["UnitedArabEmirates"] = "ae";
12994
+ Flag["Argentina"] = "ar";
12995
+ Flag["Armenia"] = "am";
12996
+ Flag["AntiguaAndBarbuda"] = "ag";
12997
+ Flag["Australia"] = "au";
12998
+ Flag["Austria"] = "at";
12999
+ Flag["Azerbaijan"] = "az";
13000
+ Flag["Burundi"] = "bi";
13001
+ Flag["Belgium"] = "be";
13002
+ Flag["Benin"] = "bj";
13003
+ Flag["BurkinaFaso"] = "bf";
13004
+ Flag["Bangladesh"] = "bd";
13005
+ Flag["Bulgaria"] = "bg";
13006
+ Flag["Bahrain"] = "bh";
13007
+ Flag["Bahamas"] = "bs";
13008
+ Flag["BosniaAndHerzegovina"] = "ba";
13009
+ Flag["Belarus"] = "by";
13010
+ Flag["Belize"] = "bz";
13011
+ Flag["Bolivia"] = "bo";
13012
+ Flag["Brazil"] = "br";
13013
+ Flag["Barbados"] = "bb";
13014
+ Flag["BruneiDarussalam"] = "bn";
13015
+ Flag["Bhutan"] = "bt";
13016
+ Flag["Botswana"] = "bw";
13017
+ Flag["CentralAfricanRepublic"] = "cf";
13018
+ Flag["Canada"] = "ca";
13019
+ Flag["Switzerland"] = "ch";
13020
+ Flag["Chile"] = "cl";
13021
+ Flag["China"] = "cn";
13022
+ Flag["CTeDIvoire"] = "ci";
13023
+ Flag["Cameroon"] = "cm";
13024
+ Flag["DemocraticRepublicOfTheCongo"] = "cd";
13025
+ Flag["RepublicOfTheCongo"] = "cg";
13026
+ Flag["Colombia"] = "co";
13027
+ Flag["Comoros"] = "km";
13028
+ Flag["CapeVerde"] = "cv";
13029
+ Flag["CostaRica"] = "cr";
13030
+ Flag["Cuba"] = "cu";
13031
+ Flag["Cyprus"] = "cy";
13032
+ Flag["CzechRepublic"] = "cz";
13033
+ Flag["Germany"] = "de";
13034
+ Flag["Djibouti"] = "dj";
13035
+ Flag["Dominica"] = "dm";
13036
+ Flag["Denmark"] = "dk";
13037
+ Flag["DominicanRepublic"] = "do";
13038
+ Flag["Algeria"] = "dz";
13039
+ Flag["Ecuador"] = "ec";
13040
+ Flag["Egypt"] = "eg";
13041
+ Flag["Eritrea"] = "er";
13042
+ Flag["Spain"] = "es";
13043
+ Flag["Estonia"] = "ee";
13044
+ Flag["Ethiopia"] = "et";
13045
+ Flag["Finland"] = "fi";
13046
+ Flag["Fiji"] = "fj";
13047
+ Flag["France"] = "fr";
13048
+ Flag["MicronesiaFederatedStatesOf"] = "fm";
13049
+ Flag["Gabon"] = "ga";
13050
+ Flag["UnitedKingdom"] = "gb";
13051
+ Flag["Georgia"] = "ge";
13052
+ Flag["Ghana"] = "gh";
13053
+ Flag["Guinea"] = "gn";
13054
+ Flag["Gambia"] = "gm";
13055
+ Flag["GuineaBissau"] = "gw";
13056
+ Flag["EquatorialGuinea"] = "gq";
13057
+ Flag["Greece"] = "gr";
13058
+ Flag["Grenada"] = "gd";
13059
+ Flag["Guatemala"] = "gt";
13060
+ Flag["Guyana"] = "gy";
13061
+ Flag["Honduras"] = "hn";
13062
+ Flag["Croatia"] = "hr";
13063
+ Flag["Haiti"] = "ht";
13064
+ Flag["Hungary"] = "hu";
13065
+ Flag["Indonesia"] = "id";
13066
+ Flag["India"] = "in";
13067
+ Flag["Ireland"] = "ie";
13068
+ Flag["IranIslamicRepublicOf"] = "ir";
13069
+ Flag["Iraq"] = "iq";
13070
+ Flag["Iceland"] = "is";
13071
+ Flag["Israel"] = "il";
13072
+ Flag["Italy"] = "it";
13073
+ Flag["Jamaica"] = "jm";
13074
+ Flag["Jordan"] = "jo";
13075
+ Flag["Japan"] = "jp";
13076
+ Flag["Kazakhstan"] = "kz";
13077
+ Flag["Kenya"] = "ke";
13078
+ Flag["Kyrgyzstan"] = "kg";
13079
+ Flag["Cambodia"] = "kh";
13080
+ Flag["Kiribati"] = "ki";
13081
+ Flag["SaintKittsAndNevis"] = "kn";
13082
+ Flag["SouthKorea"] = "kr";
13083
+ Flag["Kuwait"] = "kw";
13084
+ Flag["LaoPeopleSDemocraticRepublic"] = "la";
13085
+ Flag["Lebanon"] = "lb";
13086
+ Flag["Liberia"] = "lr";
13087
+ Flag["Libya"] = "ly";
13088
+ Flag["SaintLucia"] = "lc";
13089
+ Flag["Liechtenstein"] = "li";
13090
+ Flag["SriLanka"] = "lk";
13091
+ Flag["Lesotho"] = "ls";
13092
+ Flag["Lithuania"] = "lt";
13093
+ Flag["Luxembourg"] = "lu";
13094
+ Flag["Latvia"] = "lv";
13095
+ Flag["Morocco"] = "ma";
13096
+ Flag["Monaco"] = "mc";
13097
+ Flag["Moldova"] = "md";
13098
+ Flag["Madagascar"] = "mg";
13099
+ Flag["Maldives"] = "mv";
13100
+ Flag["Mexico"] = "mx";
13101
+ Flag["MarshallIslands"] = "mh";
13102
+ Flag["NorthMacedonia"] = "mk";
13103
+ Flag["Mali"] = "ml";
13104
+ Flag["Malta"] = "mt";
13105
+ Flag["Myanmar"] = "mm";
13106
+ Flag["Montenegro"] = "me";
13107
+ Flag["Mongolia"] = "mn";
13108
+ Flag["Mozambique"] = "mz";
13109
+ Flag["Mauritania"] = "mr";
13110
+ Flag["Mauritius"] = "mu";
13111
+ Flag["Malawi"] = "mw";
13112
+ Flag["Malaysia"] = "my";
13113
+ Flag["Namibia"] = "na";
13114
+ Flag["Niger"] = "ne";
13115
+ Flag["Nigeria"] = "ng";
13116
+ Flag["Nicaragua"] = "ni";
13117
+ Flag["Netherlands"] = "nl";
13118
+ Flag["Norway"] = "no";
13119
+ Flag["Nepal"] = "np";
13120
+ Flag["Nauru"] = "nr";
13121
+ Flag["NewZealand"] = "nz";
13122
+ Flag["Oman"] = "om";
13123
+ Flag["Pakistan"] = "pk";
13124
+ Flag["Panama"] = "pa";
13125
+ Flag["Peru"] = "pe";
13126
+ Flag["Philippines"] = "ph";
13127
+ Flag["Palau"] = "pw";
13128
+ Flag["PapuaNewGuinea"] = "pg";
13129
+ Flag["Poland"] = "pl";
13130
+ Flag["NorthKorea"] = "kp";
13131
+ Flag["Portugal"] = "pt";
13132
+ Flag["Paraguay"] = "py";
13133
+ Flag["Qatar"] = "qa";
13134
+ Flag["Romania"] = "ro";
13135
+ Flag["Russia"] = "ru";
13136
+ Flag["Rwanda"] = "rw";
13137
+ Flag["SaudiArabia"] = "sa";
13138
+ Flag["Sudan"] = "sd";
13139
+ Flag["Senegal"] = "sn";
13140
+ Flag["Singapore"] = "sg";
13141
+ Flag["SolomonIslands"] = "sb";
13142
+ Flag["SierraLeone"] = "sl";
13143
+ Flag["ElSalvador"] = "sv";
13144
+ Flag["SanMarino"] = "sm";
13145
+ Flag["Somalia"] = "so";
13146
+ Flag["Serbia"] = "rs";
13147
+ Flag["SouthSudan"] = "ss";
13148
+ Flag["SaoTomeAndPrincipe"] = "st";
13149
+ Flag["Suriname"] = "sr";
13150
+ Flag["Slovakia"] = "sk";
13151
+ Flag["Slovenia"] = "si";
13152
+ Flag["Sweden"] = "se";
13153
+ Flag["Eswatini"] = "sz";
13154
+ Flag["Seychelles"] = "sc";
13155
+ Flag["Syria"] = "sy";
13156
+ Flag["Chad"] = "td";
13157
+ Flag["Togo"] = "tg";
13158
+ Flag["Thailand"] = "th";
13159
+ Flag["Tajikistan"] = "tj";
13160
+ Flag["Turkmenistan"] = "tm";
13161
+ Flag["TimorLeste"] = "tl";
13162
+ Flag["Tonga"] = "to";
13163
+ Flag["TrinidadAndTobago"] = "tt";
13164
+ Flag["Tunisia"] = "tn";
13165
+ Flag["Turkey"] = "tr";
13166
+ Flag["Tuvalu"] = "tv";
13167
+ Flag["Tanzania"] = "tz";
13168
+ Flag["Uganda"] = "ug";
13169
+ Flag["Ukraine"] = "ua";
13170
+ Flag["Uruguay"] = "uy";
13171
+ Flag["UnitedStates"] = "us";
13172
+ Flag["Uzbekistan"] = "uz";
13173
+ Flag["VaticanCity"] = "va";
13174
+ Flag["SaintVincentAndTheGrenadines"] = "vc";
13175
+ Flag["Venezuela"] = "ve";
13176
+ Flag["Vietnam"] = "vn";
13177
+ Flag["Vanuatu"] = "vu";
13178
+ Flag["Samoa"] = "ws";
13179
+ Flag["Yemen"] = "ye";
13180
+ Flag["SouthAfrica"] = "za";
13181
+ Flag["Zambia"] = "zm";
13182
+ Flag["Zimbabwe"] = "zw";
13183
+ })(exports.Flag || (exports.Flag = {}));
13184
+
13185
+ exports.DatabaseUsageRange = void 0;
13186
+ (function (DatabaseUsageRange) {
13187
+ DatabaseUsageRange["TwentyFourHours"] = "24h";
13188
+ DatabaseUsageRange["ThirtyDays"] = "30d";
13189
+ DatabaseUsageRange["NinetyDays"] = "90d";
13190
+ })(exports.DatabaseUsageRange || (exports.DatabaseUsageRange = {}));
13191
+
13192
+ exports.RelationshipType = void 0;
13193
+ (function (RelationshipType) {
13194
+ RelationshipType["OneToOne"] = "oneToOne";
13195
+ RelationshipType["ManyToOne"] = "manyToOne";
13196
+ RelationshipType["ManyToMany"] = "manyToMany";
13197
+ RelationshipType["OneToMany"] = "oneToMany";
13198
+ })(exports.RelationshipType || (exports.RelationshipType = {}));
13199
+
13200
+ exports.RelationMutate = void 0;
13201
+ (function (RelationMutate) {
13202
+ RelationMutate["Cascade"] = "cascade";
13203
+ RelationMutate["Restrict"] = "restrict";
13204
+ RelationMutate["SetNull"] = "setNull";
13205
+ })(exports.RelationMutate || (exports.RelationMutate = {}));
13206
+
13207
+ exports.IndexType = void 0;
13208
+ (function (IndexType) {
13209
+ IndexType["Key"] = "key";
13210
+ IndexType["Fulltext"] = "fulltext";
13211
+ IndexType["Unique"] = "unique";
13212
+ })(exports.IndexType || (exports.IndexType = {}));
13213
+
13214
+ exports.Runtime = void 0;
13215
+ (function (Runtime) {
13216
+ Runtime["Node145"] = "node-14.5";
13217
+ Runtime["Node160"] = "node-16.0";
13218
+ Runtime["Node180"] = "node-18.0";
13219
+ Runtime["Node190"] = "node-19.0";
13220
+ Runtime["Node200"] = "node-20.0";
13221
+ Runtime["Node210"] = "node-21.0";
13222
+ Runtime["Php80"] = "php-8.0";
13223
+ Runtime["Php81"] = "php-8.1";
13224
+ Runtime["Php82"] = "php-8.2";
13225
+ Runtime["Php83"] = "php-8.3";
13226
+ Runtime["Ruby30"] = "ruby-3.0";
13227
+ Runtime["Ruby31"] = "ruby-3.1";
13228
+ Runtime["Ruby32"] = "ruby-3.2";
13229
+ Runtime["Ruby33"] = "ruby-3.3";
13230
+ Runtime["Python38"] = "python-3.8";
13231
+ Runtime["Python39"] = "python-3.9";
13232
+ Runtime["Python310"] = "python-3.10";
13233
+ Runtime["Python311"] = "python-3.11";
13234
+ Runtime["Python312"] = "python-3.12";
13235
+ Runtime["Deno140"] = "deno-1.40";
13236
+ Runtime["Dart215"] = "dart-2.15";
13237
+ Runtime["Dart216"] = "dart-2.16";
13238
+ Runtime["Dart217"] = "dart-2.17";
13239
+ Runtime["Dart218"] = "dart-2.18";
13240
+ Runtime["Dart30"] = "dart-3.0";
13241
+ Runtime["Dart31"] = "dart-3.1";
13242
+ Runtime["Dart33"] = "dart-3.3";
13243
+ Runtime["Dotnet31"] = "dotnet-3.1";
13244
+ Runtime["Dotnet60"] = "dotnet-6.0";
13245
+ Runtime["Dotnet70"] = "dotnet-7.0";
13246
+ Runtime["Java80"] = "java-8.0";
13247
+ Runtime["Java110"] = "java-11.0";
13248
+ Runtime["Java170"] = "java-17.0";
13249
+ Runtime["Java180"] = "java-18.0";
13250
+ Runtime["Java210"] = "java-21.0";
13251
+ Runtime["Swift55"] = "swift-5.5";
13252
+ Runtime["Swift58"] = "swift-5.8";
13253
+ Runtime["Swift59"] = "swift-5.9";
13254
+ Runtime["Kotlin16"] = "kotlin-1.6";
13255
+ Runtime["Kotlin18"] = "kotlin-1.8";
13256
+ Runtime["Kotlin19"] = "kotlin-1.9";
13257
+ Runtime["Cpp17"] = "cpp-17";
13258
+ Runtime["Cpp20"] = "cpp-20";
13259
+ Runtime["Bun10"] = "bun-1.0";
13260
+ })(exports.Runtime || (exports.Runtime = {}));
13261
+
13262
+ exports.FunctionUsageRange = void 0;
13263
+ (function (FunctionUsageRange) {
13264
+ FunctionUsageRange["TwentyFourHours"] = "24h";
13265
+ FunctionUsageRange["ThirtyDays"] = "30d";
13266
+ FunctionUsageRange["NinetyDays"] = "90d";
13267
+ })(exports.FunctionUsageRange || (exports.FunctionUsageRange = {}));
13268
+
13269
+ exports.ExecutionMethod = void 0;
13270
+ (function (ExecutionMethod) {
13271
+ ExecutionMethod["GET"] = "GET";
13272
+ ExecutionMethod["POST"] = "POST";
13273
+ ExecutionMethod["PUT"] = "PUT";
13274
+ ExecutionMethod["PATCH"] = "PATCH";
13275
+ ExecutionMethod["DELETE"] = "DELETE";
13276
+ ExecutionMethod["OPTIONS"] = "OPTIONS";
13277
+ })(exports.ExecutionMethod || (exports.ExecutionMethod = {}));
13278
+
13279
+ exports.Name = void 0;
13280
+ (function (Name) {
13281
+ Name["V1database"] = "v1-database";
13282
+ Name["V1deletes"] = "v1-deletes";
13283
+ Name["V1audits"] = "v1-audits";
13284
+ Name["V1mails"] = "v1-mails";
13285
+ Name["V1functions"] = "v1-functions";
13286
+ Name["V1usage"] = "v1-usage";
13287
+ Name["V1usagedump"] = "v1-usage-dump";
13288
+ Name["Webhooksv1"] = "webhooksv1";
13289
+ Name["V1certificates"] = "v1-certificates";
13290
+ Name["V1builds"] = "v1-builds";
13291
+ Name["V1messaging"] = "v1-messaging";
13292
+ Name["V1migrations"] = "v1-migrations";
13293
+ Name["Hamsterv1"] = "hamsterv1";
13294
+ })(exports.Name || (exports.Name = {}));
13295
+
13296
+ exports.SmtpEncryption = void 0;
13297
+ (function (SmtpEncryption) {
13298
+ SmtpEncryption["None"] = "none";
13299
+ SmtpEncryption["Ssl"] = "ssl";
13300
+ SmtpEncryption["Tls"] = "tls";
13301
+ })(exports.SmtpEncryption || (exports.SmtpEncryption = {}));
13302
+
13303
+ exports.ProjectUsageRange = void 0;
13304
+ (function (ProjectUsageRange) {
13305
+ ProjectUsageRange["OneHour"] = "1h";
13306
+ ProjectUsageRange["OneDay"] = "1d";
13307
+ })(exports.ProjectUsageRange || (exports.ProjectUsageRange = {}));
13308
+
13309
+ exports.Region = void 0;
13310
+ (function (Region) {
13311
+ Region["Default"] = "default";
13312
+ Region["Fra"] = "fra";
13313
+ })(exports.Region || (exports.Region = {}));
13314
+
13315
+ exports.Api = void 0;
13316
+ (function (Api) {
13317
+ Api["Rest"] = "rest";
13318
+ Api["Graphql"] = "graphql";
13319
+ Api["Realtime"] = "realtime";
13320
+ })(exports.Api || (exports.Api = {}));
13321
+
13322
+ exports.AuthMethod = void 0;
13323
+ (function (AuthMethod) {
13324
+ AuthMethod["Emailpassword"] = "email-password";
13325
+ AuthMethod["Magicurl"] = "magic-url";
13326
+ AuthMethod["Emailotp"] = "email-otp";
13327
+ AuthMethod["Anonymous"] = "anonymous";
13328
+ AuthMethod["Invites"] = "invites";
13329
+ AuthMethod["Jwt"] = "jwt";
13330
+ AuthMethod["Phone"] = "phone";
13331
+ })(exports.AuthMethod || (exports.AuthMethod = {}));
13332
+
13333
+ exports.PlatformType = void 0;
13334
+ (function (PlatformType) {
13335
+ PlatformType["Web"] = "web";
13336
+ PlatformType["Flutterweb"] = "flutter-web";
13337
+ PlatformType["Flutterios"] = "flutter-ios";
13338
+ PlatformType["Flutterandroid"] = "flutter-android";
13339
+ PlatformType["Flutterlinux"] = "flutter-linux";
13340
+ PlatformType["Fluttermacos"] = "flutter-macos";
13341
+ PlatformType["Flutterwindows"] = "flutter-windows";
13342
+ PlatformType["Appleios"] = "apple-ios";
13343
+ PlatformType["Applemacos"] = "apple-macos";
13344
+ PlatformType["Applewatchos"] = "apple-watchos";
13345
+ PlatformType["Appletvos"] = "apple-tvos";
13346
+ PlatformType["Android"] = "android";
13347
+ PlatformType["Unity"] = "unity";
13348
+ })(exports.PlatformType || (exports.PlatformType = {}));
13349
+
13350
+ exports.ApiService = void 0;
13351
+ (function (ApiService) {
13352
+ ApiService["Account"] = "account";
13353
+ ApiService["Avatars"] = "avatars";
13354
+ ApiService["Databases"] = "databases";
13355
+ ApiService["Locale"] = "locale";
13356
+ ApiService["Health"] = "health";
13357
+ ApiService["Storage"] = "storage";
13358
+ ApiService["Teams"] = "teams";
13359
+ ApiService["Users"] = "users";
13360
+ ApiService["Functions"] = "functions";
13361
+ ApiService["Graphql"] = "graphql";
13362
+ ApiService["Messaging"] = "messaging";
13363
+ })(exports.ApiService || (exports.ApiService = {}));
13364
+
13365
+ exports.SMTPSecure = void 0;
13366
+ (function (SMTPSecure) {
13367
+ SMTPSecure["Tls"] = "tls";
13368
+ })(exports.SMTPSecure || (exports.SMTPSecure = {}));
13369
+
13370
+ exports.EmailTemplateType = void 0;
13371
+ (function (EmailTemplateType) {
13372
+ EmailTemplateType["Verification"] = "verification";
13373
+ EmailTemplateType["Magicsession"] = "magicsession";
13374
+ EmailTemplateType["Recovery"] = "recovery";
13375
+ EmailTemplateType["Invitation"] = "invitation";
13376
+ EmailTemplateType["Mfachallenge"] = "mfachallenge";
13377
+ })(exports.EmailTemplateType || (exports.EmailTemplateType = {}));
13378
+
13379
+ exports.EmailTemplateLocale = void 0;
13380
+ (function (EmailTemplateLocale) {
13381
+ EmailTemplateLocale["Af"] = "af";
13382
+ EmailTemplateLocale["Arae"] = "ar-ae";
13383
+ EmailTemplateLocale["Arbh"] = "ar-bh";
13384
+ EmailTemplateLocale["Ardz"] = "ar-dz";
13385
+ EmailTemplateLocale["Areg"] = "ar-eg";
13386
+ EmailTemplateLocale["Ariq"] = "ar-iq";
13387
+ EmailTemplateLocale["Arjo"] = "ar-jo";
13388
+ EmailTemplateLocale["Arkw"] = "ar-kw";
13389
+ EmailTemplateLocale["Arlb"] = "ar-lb";
13390
+ EmailTemplateLocale["Arly"] = "ar-ly";
13391
+ EmailTemplateLocale["Arma"] = "ar-ma";
13392
+ EmailTemplateLocale["Arom"] = "ar-om";
13393
+ EmailTemplateLocale["Arqa"] = "ar-qa";
13394
+ EmailTemplateLocale["Arsa"] = "ar-sa";
13395
+ EmailTemplateLocale["Arsy"] = "ar-sy";
13396
+ EmailTemplateLocale["Artn"] = "ar-tn";
13397
+ EmailTemplateLocale["Arye"] = "ar-ye";
13398
+ EmailTemplateLocale["As"] = "as";
13399
+ EmailTemplateLocale["Az"] = "az";
13400
+ EmailTemplateLocale["Be"] = "be";
13401
+ EmailTemplateLocale["Bg"] = "bg";
13402
+ EmailTemplateLocale["Bh"] = "bh";
13403
+ EmailTemplateLocale["Bn"] = "bn";
13404
+ EmailTemplateLocale["Bs"] = "bs";
13405
+ EmailTemplateLocale["Ca"] = "ca";
13406
+ EmailTemplateLocale["Cs"] = "cs";
13407
+ EmailTemplateLocale["Cy"] = "cy";
13408
+ EmailTemplateLocale["Da"] = "da";
13409
+ EmailTemplateLocale["De"] = "de";
13410
+ EmailTemplateLocale["Deat"] = "de-at";
13411
+ EmailTemplateLocale["Dech"] = "de-ch";
13412
+ EmailTemplateLocale["Deli"] = "de-li";
13413
+ EmailTemplateLocale["Delu"] = "de-lu";
13414
+ EmailTemplateLocale["El"] = "el";
13415
+ EmailTemplateLocale["En"] = "en";
13416
+ EmailTemplateLocale["Enau"] = "en-au";
13417
+ EmailTemplateLocale["Enbz"] = "en-bz";
13418
+ EmailTemplateLocale["Enca"] = "en-ca";
13419
+ EmailTemplateLocale["Engb"] = "en-gb";
13420
+ EmailTemplateLocale["Enie"] = "en-ie";
13421
+ EmailTemplateLocale["Enjm"] = "en-jm";
13422
+ EmailTemplateLocale["Ennz"] = "en-nz";
13423
+ EmailTemplateLocale["Entt"] = "en-tt";
13424
+ EmailTemplateLocale["Enus"] = "en-us";
13425
+ EmailTemplateLocale["Enza"] = "en-za";
13426
+ EmailTemplateLocale["Eo"] = "eo";
13427
+ EmailTemplateLocale["Es"] = "es";
13428
+ EmailTemplateLocale["Esar"] = "es-ar";
13429
+ EmailTemplateLocale["Esbo"] = "es-bo";
13430
+ EmailTemplateLocale["Escl"] = "es-cl";
13431
+ EmailTemplateLocale["Esco"] = "es-co";
13432
+ EmailTemplateLocale["Escr"] = "es-cr";
13433
+ EmailTemplateLocale["Esdo"] = "es-do";
13434
+ EmailTemplateLocale["Esec"] = "es-ec";
13435
+ EmailTemplateLocale["Esgt"] = "es-gt";
13436
+ EmailTemplateLocale["Eshn"] = "es-hn";
13437
+ EmailTemplateLocale["Esmx"] = "es-mx";
13438
+ EmailTemplateLocale["Esni"] = "es-ni";
13439
+ EmailTemplateLocale["Espa"] = "es-pa";
13440
+ EmailTemplateLocale["Espe"] = "es-pe";
13441
+ EmailTemplateLocale["Espr"] = "es-pr";
13442
+ EmailTemplateLocale["Espy"] = "es-py";
13443
+ EmailTemplateLocale["Essv"] = "es-sv";
13444
+ EmailTemplateLocale["Esuy"] = "es-uy";
13445
+ EmailTemplateLocale["Esve"] = "es-ve";
13446
+ EmailTemplateLocale["Et"] = "et";
13447
+ EmailTemplateLocale["Eu"] = "eu";
13448
+ EmailTemplateLocale["Fa"] = "fa";
13449
+ EmailTemplateLocale["Fi"] = "fi";
13450
+ EmailTemplateLocale["Fo"] = "fo";
13451
+ EmailTemplateLocale["Fr"] = "fr";
13452
+ EmailTemplateLocale["Frbe"] = "fr-be";
13453
+ EmailTemplateLocale["Frca"] = "fr-ca";
13454
+ EmailTemplateLocale["Frch"] = "fr-ch";
13455
+ EmailTemplateLocale["Frlu"] = "fr-lu";
13456
+ EmailTemplateLocale["Ga"] = "ga";
13457
+ EmailTemplateLocale["Gd"] = "gd";
13458
+ EmailTemplateLocale["He"] = "he";
13459
+ EmailTemplateLocale["Hi"] = "hi";
13460
+ EmailTemplateLocale["Hr"] = "hr";
13461
+ EmailTemplateLocale["Hu"] = "hu";
13462
+ EmailTemplateLocale["Id"] = "id";
13463
+ EmailTemplateLocale["Is"] = "is";
13464
+ EmailTemplateLocale["It"] = "it";
13465
+ EmailTemplateLocale["Itch"] = "it-ch";
13466
+ EmailTemplateLocale["Ja"] = "ja";
13467
+ EmailTemplateLocale["Ji"] = "ji";
13468
+ EmailTemplateLocale["Ko"] = "ko";
13469
+ EmailTemplateLocale["Ku"] = "ku";
13470
+ EmailTemplateLocale["Lt"] = "lt";
13471
+ EmailTemplateLocale["Lv"] = "lv";
13472
+ EmailTemplateLocale["Mk"] = "mk";
13473
+ EmailTemplateLocale["Ml"] = "ml";
13474
+ EmailTemplateLocale["Ms"] = "ms";
13475
+ EmailTemplateLocale["Mt"] = "mt";
13476
+ EmailTemplateLocale["Nb"] = "nb";
13477
+ EmailTemplateLocale["Ne"] = "ne";
13478
+ EmailTemplateLocale["Nl"] = "nl";
13479
+ EmailTemplateLocale["Nlbe"] = "nl-be";
13480
+ EmailTemplateLocale["Nn"] = "nn";
13481
+ EmailTemplateLocale["No"] = "no";
13482
+ EmailTemplateLocale["Pa"] = "pa";
13483
+ EmailTemplateLocale["Pl"] = "pl";
13484
+ EmailTemplateLocale["Pt"] = "pt";
13485
+ EmailTemplateLocale["Ptbr"] = "pt-br";
13486
+ EmailTemplateLocale["Rm"] = "rm";
13487
+ EmailTemplateLocale["Ro"] = "ro";
13488
+ EmailTemplateLocale["Romd"] = "ro-md";
13489
+ EmailTemplateLocale["Ru"] = "ru";
13490
+ EmailTemplateLocale["Rumd"] = "ru-md";
13491
+ EmailTemplateLocale["Sb"] = "sb";
13492
+ EmailTemplateLocale["Sk"] = "sk";
13493
+ EmailTemplateLocale["Sl"] = "sl";
13494
+ EmailTemplateLocale["Sq"] = "sq";
13495
+ EmailTemplateLocale["Sr"] = "sr";
13496
+ EmailTemplateLocale["Sv"] = "sv";
13497
+ EmailTemplateLocale["Svfi"] = "sv-fi";
13498
+ EmailTemplateLocale["Th"] = "th";
13499
+ EmailTemplateLocale["Tn"] = "tn";
13500
+ EmailTemplateLocale["Tr"] = "tr";
13501
+ EmailTemplateLocale["Ts"] = "ts";
13502
+ EmailTemplateLocale["Ua"] = "ua";
13503
+ EmailTemplateLocale["Ur"] = "ur";
13504
+ EmailTemplateLocale["Ve"] = "ve";
13505
+ EmailTemplateLocale["Vi"] = "vi";
13506
+ EmailTemplateLocale["Xh"] = "xh";
13507
+ EmailTemplateLocale["Zhcn"] = "zh-cn";
13508
+ EmailTemplateLocale["Zhhk"] = "zh-hk";
13509
+ EmailTemplateLocale["Zhsg"] = "zh-sg";
13510
+ EmailTemplateLocale["Zhtw"] = "zh-tw";
13511
+ EmailTemplateLocale["Zu"] = "zu";
13512
+ })(exports.EmailTemplateLocale || (exports.EmailTemplateLocale = {}));
13513
+
13514
+ exports.SmsTemplateType = void 0;
13515
+ (function (SmsTemplateType) {
13516
+ SmsTemplateType["Verification"] = "verification";
13517
+ SmsTemplateType["Login"] = "login";
13518
+ SmsTemplateType["Invitation"] = "invitation";
13519
+ SmsTemplateType["Mfachallenge"] = "mfachallenge";
13520
+ })(exports.SmsTemplateType || (exports.SmsTemplateType = {}));
13521
+
13522
+ exports.SmsTemplateLocale = void 0;
13523
+ (function (SmsTemplateLocale) {
13524
+ SmsTemplateLocale["Af"] = "af";
13525
+ SmsTemplateLocale["Arae"] = "ar-ae";
13526
+ SmsTemplateLocale["Arbh"] = "ar-bh";
13527
+ SmsTemplateLocale["Ardz"] = "ar-dz";
13528
+ SmsTemplateLocale["Areg"] = "ar-eg";
13529
+ SmsTemplateLocale["Ariq"] = "ar-iq";
13530
+ SmsTemplateLocale["Arjo"] = "ar-jo";
13531
+ SmsTemplateLocale["Arkw"] = "ar-kw";
13532
+ SmsTemplateLocale["Arlb"] = "ar-lb";
13533
+ SmsTemplateLocale["Arly"] = "ar-ly";
13534
+ SmsTemplateLocale["Arma"] = "ar-ma";
13535
+ SmsTemplateLocale["Arom"] = "ar-om";
13536
+ SmsTemplateLocale["Arqa"] = "ar-qa";
13537
+ SmsTemplateLocale["Arsa"] = "ar-sa";
13538
+ SmsTemplateLocale["Arsy"] = "ar-sy";
13539
+ SmsTemplateLocale["Artn"] = "ar-tn";
13540
+ SmsTemplateLocale["Arye"] = "ar-ye";
13541
+ SmsTemplateLocale["As"] = "as";
13542
+ SmsTemplateLocale["Az"] = "az";
13543
+ SmsTemplateLocale["Be"] = "be";
13544
+ SmsTemplateLocale["Bg"] = "bg";
13545
+ SmsTemplateLocale["Bh"] = "bh";
13546
+ SmsTemplateLocale["Bn"] = "bn";
13547
+ SmsTemplateLocale["Bs"] = "bs";
13548
+ SmsTemplateLocale["Ca"] = "ca";
13549
+ SmsTemplateLocale["Cs"] = "cs";
13550
+ SmsTemplateLocale["Cy"] = "cy";
13551
+ SmsTemplateLocale["Da"] = "da";
13552
+ SmsTemplateLocale["De"] = "de";
13553
+ SmsTemplateLocale["Deat"] = "de-at";
13554
+ SmsTemplateLocale["Dech"] = "de-ch";
13555
+ SmsTemplateLocale["Deli"] = "de-li";
13556
+ SmsTemplateLocale["Delu"] = "de-lu";
13557
+ SmsTemplateLocale["El"] = "el";
13558
+ SmsTemplateLocale["En"] = "en";
13559
+ SmsTemplateLocale["Enau"] = "en-au";
13560
+ SmsTemplateLocale["Enbz"] = "en-bz";
13561
+ SmsTemplateLocale["Enca"] = "en-ca";
13562
+ SmsTemplateLocale["Engb"] = "en-gb";
13563
+ SmsTemplateLocale["Enie"] = "en-ie";
13564
+ SmsTemplateLocale["Enjm"] = "en-jm";
13565
+ SmsTemplateLocale["Ennz"] = "en-nz";
13566
+ SmsTemplateLocale["Entt"] = "en-tt";
13567
+ SmsTemplateLocale["Enus"] = "en-us";
13568
+ SmsTemplateLocale["Enza"] = "en-za";
13569
+ SmsTemplateLocale["Eo"] = "eo";
13570
+ SmsTemplateLocale["Es"] = "es";
13571
+ SmsTemplateLocale["Esar"] = "es-ar";
13572
+ SmsTemplateLocale["Esbo"] = "es-bo";
13573
+ SmsTemplateLocale["Escl"] = "es-cl";
13574
+ SmsTemplateLocale["Esco"] = "es-co";
13575
+ SmsTemplateLocale["Escr"] = "es-cr";
13576
+ SmsTemplateLocale["Esdo"] = "es-do";
13577
+ SmsTemplateLocale["Esec"] = "es-ec";
13578
+ SmsTemplateLocale["Esgt"] = "es-gt";
13579
+ SmsTemplateLocale["Eshn"] = "es-hn";
13580
+ SmsTemplateLocale["Esmx"] = "es-mx";
13581
+ SmsTemplateLocale["Esni"] = "es-ni";
13582
+ SmsTemplateLocale["Espa"] = "es-pa";
13583
+ SmsTemplateLocale["Espe"] = "es-pe";
13584
+ SmsTemplateLocale["Espr"] = "es-pr";
13585
+ SmsTemplateLocale["Espy"] = "es-py";
13586
+ SmsTemplateLocale["Essv"] = "es-sv";
13587
+ SmsTemplateLocale["Esuy"] = "es-uy";
13588
+ SmsTemplateLocale["Esve"] = "es-ve";
13589
+ SmsTemplateLocale["Et"] = "et";
13590
+ SmsTemplateLocale["Eu"] = "eu";
13591
+ SmsTemplateLocale["Fa"] = "fa";
13592
+ SmsTemplateLocale["Fi"] = "fi";
13593
+ SmsTemplateLocale["Fo"] = "fo";
13594
+ SmsTemplateLocale["Fr"] = "fr";
13595
+ SmsTemplateLocale["Frbe"] = "fr-be";
13596
+ SmsTemplateLocale["Frca"] = "fr-ca";
13597
+ SmsTemplateLocale["Frch"] = "fr-ch";
13598
+ SmsTemplateLocale["Frlu"] = "fr-lu";
13599
+ SmsTemplateLocale["Ga"] = "ga";
13600
+ SmsTemplateLocale["Gd"] = "gd";
13601
+ SmsTemplateLocale["He"] = "he";
13602
+ SmsTemplateLocale["Hi"] = "hi";
13603
+ SmsTemplateLocale["Hr"] = "hr";
13604
+ SmsTemplateLocale["Hu"] = "hu";
13605
+ SmsTemplateLocale["Id"] = "id";
13606
+ SmsTemplateLocale["Is"] = "is";
13607
+ SmsTemplateLocale["It"] = "it";
13608
+ SmsTemplateLocale["Itch"] = "it-ch";
13609
+ SmsTemplateLocale["Ja"] = "ja";
13610
+ SmsTemplateLocale["Ji"] = "ji";
13611
+ SmsTemplateLocale["Ko"] = "ko";
13612
+ SmsTemplateLocale["Ku"] = "ku";
13613
+ SmsTemplateLocale["Lt"] = "lt";
13614
+ SmsTemplateLocale["Lv"] = "lv";
13615
+ SmsTemplateLocale["Mk"] = "mk";
13616
+ SmsTemplateLocale["Ml"] = "ml";
13617
+ SmsTemplateLocale["Ms"] = "ms";
13618
+ SmsTemplateLocale["Mt"] = "mt";
13619
+ SmsTemplateLocale["Nb"] = "nb";
13620
+ SmsTemplateLocale["Ne"] = "ne";
13621
+ SmsTemplateLocale["Nl"] = "nl";
13622
+ SmsTemplateLocale["Nlbe"] = "nl-be";
13623
+ SmsTemplateLocale["Nn"] = "nn";
13624
+ SmsTemplateLocale["No"] = "no";
13625
+ SmsTemplateLocale["Pa"] = "pa";
13626
+ SmsTemplateLocale["Pl"] = "pl";
13627
+ SmsTemplateLocale["Pt"] = "pt";
13628
+ SmsTemplateLocale["Ptbr"] = "pt-br";
13629
+ SmsTemplateLocale["Rm"] = "rm";
13630
+ SmsTemplateLocale["Ro"] = "ro";
13631
+ SmsTemplateLocale["Romd"] = "ro-md";
13632
+ SmsTemplateLocale["Ru"] = "ru";
13633
+ SmsTemplateLocale["Rumd"] = "ru-md";
13634
+ SmsTemplateLocale["Sb"] = "sb";
13635
+ SmsTemplateLocale["Sk"] = "sk";
13636
+ SmsTemplateLocale["Sl"] = "sl";
13637
+ SmsTemplateLocale["Sq"] = "sq";
13638
+ SmsTemplateLocale["Sr"] = "sr";
13639
+ SmsTemplateLocale["Sv"] = "sv";
13640
+ SmsTemplateLocale["Svfi"] = "sv-fi";
13641
+ SmsTemplateLocale["Th"] = "th";
13642
+ SmsTemplateLocale["Tn"] = "tn";
13643
+ SmsTemplateLocale["Tr"] = "tr";
13644
+ SmsTemplateLocale["Ts"] = "ts";
13645
+ SmsTemplateLocale["Ua"] = "ua";
13646
+ SmsTemplateLocale["Ur"] = "ur";
13647
+ SmsTemplateLocale["Ve"] = "ve";
13648
+ SmsTemplateLocale["Vi"] = "vi";
13649
+ SmsTemplateLocale["Xh"] = "xh";
13650
+ SmsTemplateLocale["Zhcn"] = "zh-cn";
13651
+ SmsTemplateLocale["Zhhk"] = "zh-hk";
13652
+ SmsTemplateLocale["Zhsg"] = "zh-sg";
13653
+ SmsTemplateLocale["Zhtw"] = "zh-tw";
13654
+ SmsTemplateLocale["Zu"] = "zu";
13655
+ })(exports.SmsTemplateLocale || (exports.SmsTemplateLocale = {}));
13656
+
13657
+ exports.ResourceType = void 0;
13658
+ (function (ResourceType) {
13659
+ ResourceType["Api"] = "api";
13660
+ ResourceType["Function"] = "function";
13661
+ })(exports.ResourceType || (exports.ResourceType = {}));
13662
+
13663
+ exports.Compression = void 0;
13664
+ (function (Compression) {
13665
+ Compression["None"] = "none";
13666
+ Compression["Gzip"] = "gzip";
13667
+ Compression["Zstd"] = "zstd";
13668
+ })(exports.Compression || (exports.Compression = {}));
13669
+
13670
+ exports.ImageGravity = void 0;
13671
+ (function (ImageGravity) {
13672
+ ImageGravity["Center"] = "center";
13673
+ ImageGravity["Topleft"] = "top-left";
13674
+ ImageGravity["Top"] = "top";
13675
+ ImageGravity["Topright"] = "top-right";
13676
+ ImageGravity["Left"] = "left";
13677
+ ImageGravity["Right"] = "right";
13678
+ ImageGravity["Bottomleft"] = "bottom-left";
13679
+ ImageGravity["Bottom"] = "bottom";
13680
+ ImageGravity["Bottomright"] = "bottom-right";
13681
+ })(exports.ImageGravity || (exports.ImageGravity = {}));
13682
+
13683
+ exports.ImageFormat = void 0;
13684
+ (function (ImageFormat) {
13685
+ ImageFormat["Jpg"] = "jpg";
13686
+ ImageFormat["Jpeg"] = "jpeg";
13687
+ ImageFormat["Gif"] = "gif";
13688
+ ImageFormat["Png"] = "png";
13689
+ ImageFormat["Webp"] = "webp";
13690
+ })(exports.ImageFormat || (exports.ImageFormat = {}));
13691
+
13692
+ exports.StorageUsageRange = void 0;
13693
+ (function (StorageUsageRange) {
13694
+ StorageUsageRange["TwentyFourHours"] = "24h";
13695
+ StorageUsageRange["ThirtyDays"] = "30d";
13696
+ StorageUsageRange["NinetyDays"] = "90d";
13697
+ })(exports.StorageUsageRange || (exports.StorageUsageRange = {}));
13698
+
13699
+ exports.PasswordHash = void 0;
13700
+ (function (PasswordHash) {
13701
+ PasswordHash["Sha1"] = "sha1";
13702
+ PasswordHash["Sha224"] = "sha224";
13703
+ PasswordHash["Sha256"] = "sha256";
13704
+ PasswordHash["Sha384"] = "sha384";
13705
+ PasswordHash["Sha512224"] = "sha512/224";
13706
+ PasswordHash["Sha512256"] = "sha512/256";
13707
+ PasswordHash["Sha512"] = "sha512";
13708
+ PasswordHash["Sha3224"] = "sha3-224";
13709
+ PasswordHash["Sha3256"] = "sha3-256";
13710
+ PasswordHash["Sha3384"] = "sha3-384";
13711
+ PasswordHash["Sha3512"] = "sha3-512";
13712
+ })(exports.PasswordHash || (exports.PasswordHash = {}));
13713
+
13714
+ exports.UserUsageRange = void 0;
13715
+ (function (UserUsageRange) {
13716
+ UserUsageRange["TwentyFourHours"] = "24h";
13717
+ UserUsageRange["ThirtyDays"] = "30d";
13718
+ UserUsageRange["NinetyDays"] = "90d";
13719
+ })(exports.UserUsageRange || (exports.UserUsageRange = {}));
13720
+
13721
+ exports.MessagingProviderType = void 0;
13722
+ (function (MessagingProviderType) {
13723
+ MessagingProviderType["Email"] = "email";
13724
+ MessagingProviderType["Sms"] = "sms";
13725
+ MessagingProviderType["Push"] = "push";
13726
+ })(exports.MessagingProviderType || (exports.MessagingProviderType = {}));
13727
+
12227
13728
  exports.Account = Account;
12228
13729
  exports.AppwriteException = AppwriteException;
12229
13730
  exports.Assistant = Assistant;