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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (453) hide show
  1. package/.travis.yml +32 -0
  2. package/README.md +5 -5
  3. package/dist/cjs/sdk.js +1182 -438
  4. package/dist/cjs/sdk.js.map +1 -1
  5. package/dist/esm/sdk.js +1183 -439
  6. package/dist/esm/sdk.js.map +1 -1
  7. package/dist/iife/sdk.js +1182 -438
  8. package/docs/examples/account/create-anonymous-session.md +6 -13
  9. package/docs/examples/account/create-email-password-session.md +9 -13
  10. package/docs/examples/account/create-email-token.md +10 -13
  11. package/docs/examples/account/create-j-w-t.md +6 -13
  12. package/docs/examples/account/create-magic-u-r-l-token.md +11 -13
  13. package/docs/examples/account/create-mfa-authenticator.md +13 -0
  14. package/docs/examples/account/create-mfa-challenge.md +13 -0
  15. package/docs/examples/account/create-mfa-recovery-codes.md +11 -0
  16. package/docs/examples/account/create-o-auth2session.md +10 -9
  17. package/docs/examples/account/create-o-auth2token.md +15 -0
  18. package/docs/examples/account/create-phone-token.md +9 -13
  19. package/docs/examples/account/create-phone-verification.md +6 -13
  20. package/docs/examples/account/create-push-target.md +10 -13
  21. package/docs/examples/account/create-recovery.md +9 -13
  22. package/docs/examples/account/create-session.md +9 -13
  23. package/docs/examples/account/create-verification.md +8 -13
  24. package/docs/examples/account/create.md +11 -13
  25. package/docs/examples/account/delete-identity.md +8 -13
  26. package/docs/examples/account/delete-mfa-authenticator.md +14 -0
  27. package/docs/examples/account/delete-push-target.md +8 -13
  28. package/docs/examples/account/delete-session.md +8 -13
  29. package/docs/examples/account/delete-sessions.md +6 -13
  30. package/docs/examples/account/delete.md +6 -13
  31. package/docs/examples/account/get-mfa-recovery-codes.md +11 -0
  32. package/docs/examples/account/get-prefs.md +6 -13
  33. package/docs/examples/account/get-session.md +8 -13
  34. package/docs/examples/account/get.md +6 -13
  35. package/docs/examples/account/list-identities.md +8 -13
  36. package/docs/examples/account/list-logs.md +8 -13
  37. package/docs/examples/account/list-mfa-factors.md +11 -0
  38. package/docs/examples/account/list-sessions.md +6 -13
  39. package/docs/examples/account/update-email.md +9 -13
  40. package/docs/examples/account/update-m-f-a.md +8 -13
  41. package/docs/examples/account/update-magic-u-r-l-session.md +9 -13
  42. package/docs/examples/account/update-mfa-authenticator.md +14 -0
  43. package/docs/examples/account/update-mfa-challenge.md +14 -0
  44. package/docs/examples/account/update-mfa-recovery-codes.md +11 -0
  45. package/docs/examples/account/update-name.md +8 -13
  46. package/docs/examples/account/update-password.md +9 -13
  47. package/docs/examples/account/update-phone-session.md +14 -0
  48. package/docs/examples/account/update-phone-verification.md +9 -13
  49. package/docs/examples/account/update-phone.md +9 -13
  50. package/docs/examples/account/update-prefs.md +8 -13
  51. package/docs/examples/account/update-push-target.md +9 -13
  52. package/docs/examples/account/update-recovery.md +10 -13
  53. package/docs/examples/account/update-session.md +8 -13
  54. package/docs/examples/account/update-status.md +6 -13
  55. package/docs/examples/account/update-verification.md +9 -13
  56. package/docs/examples/assistant/chat.md +8 -13
  57. package/docs/examples/avatars/get-browser.md +11 -9
  58. package/docs/examples/avatars/get-credit-card.md +11 -9
  59. package/docs/examples/avatars/get-favicon.md +8 -9
  60. package/docs/examples/avatars/get-flag.md +11 -9
  61. package/docs/examples/avatars/get-image.md +10 -9
  62. package/docs/examples/avatars/get-initials.md +11 -9
  63. package/docs/examples/avatars/get-q-r.md +11 -9
  64. package/docs/examples/console/variables.md +6 -13
  65. package/docs/examples/databases/create-boolean-attribute.md +13 -13
  66. package/docs/examples/databases/create-collection.md +13 -13
  67. package/docs/examples/databases/create-datetime-attribute.md +13 -13
  68. package/docs/examples/databases/create-document.md +12 -13
  69. package/docs/examples/databases/create-email-attribute.md +13 -13
  70. package/docs/examples/databases/create-enum-attribute.md +14 -13
  71. package/docs/examples/databases/create-float-attribute.md +15 -13
  72. package/docs/examples/databases/create-index.md +13 -13
  73. package/docs/examples/databases/create-integer-attribute.md +15 -13
  74. package/docs/examples/databases/create-ip-attribute.md +13 -13
  75. package/docs/examples/databases/create-relationship-attribute.md +15 -13
  76. package/docs/examples/databases/create-string-attribute.md +15 -13
  77. package/docs/examples/databases/create-url-attribute.md +13 -13
  78. package/docs/examples/databases/create.md +10 -13
  79. package/docs/examples/databases/delete-attribute.md +10 -13
  80. package/docs/examples/databases/delete-collection.md +9 -13
  81. package/docs/examples/databases/delete-document.md +10 -13
  82. package/docs/examples/databases/delete-index.md +10 -13
  83. package/docs/examples/databases/delete.md +8 -13
  84. package/docs/examples/databases/get-attribute.md +10 -13
  85. package/docs/examples/databases/get-collection-usage.md +10 -13
  86. package/docs/examples/databases/get-collection.md +9 -13
  87. package/docs/examples/databases/get-database-usage.md +9 -13
  88. package/docs/examples/databases/get-document.md +11 -13
  89. package/docs/examples/databases/get-index.md +10 -13
  90. package/docs/examples/databases/get-usage.md +8 -13
  91. package/docs/examples/databases/get.md +8 -13
  92. package/docs/examples/databases/list-attributes.md +10 -13
  93. package/docs/examples/databases/list-collection-logs.md +10 -13
  94. package/docs/examples/databases/list-collections.md +10 -13
  95. package/docs/examples/databases/list-document-logs.md +11 -13
  96. package/docs/examples/databases/list-documents.md +10 -13
  97. package/docs/examples/databases/list-indexes.md +10 -13
  98. package/docs/examples/databases/list-logs.md +9 -13
  99. package/docs/examples/databases/list.md +9 -13
  100. package/docs/examples/databases/update-boolean-attribute.md +12 -13
  101. package/docs/examples/databases/update-collection.md +13 -13
  102. package/docs/examples/databases/update-datetime-attribute.md +12 -13
  103. package/docs/examples/databases/update-document.md +12 -13
  104. package/docs/examples/databases/update-email-attribute.md +12 -13
  105. package/docs/examples/databases/update-enum-attribute.md +13 -13
  106. package/docs/examples/databases/update-float-attribute.md +14 -13
  107. package/docs/examples/databases/update-integer-attribute.md +14 -13
  108. package/docs/examples/databases/update-ip-attribute.md +12 -13
  109. package/docs/examples/databases/update-relationship-attribute.md +11 -13
  110. package/docs/examples/databases/update-string-attribute.md +12 -13
  111. package/docs/examples/databases/update-url-attribute.md +12 -13
  112. package/docs/examples/databases/update.md +10 -13
  113. package/docs/examples/functions/create-build.md +10 -13
  114. package/docs/examples/functions/create-deployment.md +12 -13
  115. package/docs/examples/functions/create-execution.md +13 -13
  116. package/docs/examples/functions/create-variable.md +10 -13
  117. package/docs/examples/functions/create.md +27 -13
  118. package/docs/examples/functions/delete-deployment.md +9 -13
  119. package/docs/examples/functions/delete-variable.md +9 -13
  120. package/docs/examples/functions/delete.md +8 -13
  121. package/docs/examples/functions/download-deployment.md +9 -9
  122. package/docs/examples/functions/get-deployment.md +9 -13
  123. package/docs/examples/functions/get-execution.md +9 -13
  124. package/docs/examples/functions/get-function-usage.md +9 -13
  125. package/docs/examples/functions/get-usage.md +8 -13
  126. package/docs/examples/functions/get-variable.md +9 -13
  127. package/docs/examples/functions/get.md +8 -13
  128. package/docs/examples/functions/list-deployments.md +10 -13
  129. package/docs/examples/functions/list-executions.md +10 -13
  130. package/docs/examples/functions/list-runtimes.md +6 -13
  131. package/docs/examples/functions/list-variables.md +8 -13
  132. package/docs/examples/functions/list.md +9 -13
  133. package/docs/examples/functions/update-deployment.md +9 -13
  134. package/docs/examples/functions/update-variable.md +11 -13
  135. package/docs/examples/functions/update.md +23 -13
  136. package/docs/examples/graphql/mutation.md +8 -13
  137. package/docs/examples/graphql/query.md +8 -13
  138. package/docs/examples/health/get-antivirus.md +6 -13
  139. package/docs/examples/health/get-cache.md +6 -13
  140. package/docs/examples/health/get-certificate.md +13 -0
  141. package/docs/examples/health/get-d-b.md +6 -13
  142. package/docs/examples/health/get-failed-jobs.md +14 -0
  143. package/docs/examples/health/get-pub-sub.md +6 -13
  144. package/docs/examples/health/get-queue-builds.md +8 -13
  145. package/docs/examples/health/get-queue-certificates.md +8 -13
  146. package/docs/examples/health/get-queue-databases.md +9 -13
  147. package/docs/examples/health/get-queue-deletes.md +8 -13
  148. package/docs/examples/health/get-queue-functions.md +8 -13
  149. package/docs/examples/health/get-queue-logs.md +8 -13
  150. package/docs/examples/health/get-queue-mails.md +8 -13
  151. package/docs/examples/health/get-queue-messaging.md +8 -13
  152. package/docs/examples/health/get-queue-migrations.md +8 -13
  153. package/docs/examples/health/get-queue-usage-dump.md +13 -0
  154. package/docs/examples/health/get-queue-usage.md +13 -0
  155. package/docs/examples/health/get-queue-webhooks.md +8 -13
  156. package/docs/examples/health/get-queue.md +6 -13
  157. package/docs/examples/health/get-storage-local.md +6 -13
  158. package/docs/examples/health/get-storage.md +11 -0
  159. package/docs/examples/health/get-time.md +6 -13
  160. package/docs/examples/health/get.md +6 -13
  161. package/docs/examples/locale/get.md +6 -13
  162. package/docs/examples/locale/list-codes.md +6 -13
  163. package/docs/examples/locale/list-continents.md +6 -13
  164. package/docs/examples/locale/list-countries-e-u.md +6 -13
  165. package/docs/examples/locale/list-countries-phones.md +6 -13
  166. package/docs/examples/locale/list-countries.md +6 -13
  167. package/docs/examples/locale/list-currencies.md +6 -13
  168. package/docs/examples/locale/list-languages.md +6 -13
  169. package/docs/examples/messaging/create-apns-provider.md +20 -0
  170. package/docs/examples/messaging/create-email.md +19 -13
  171. package/docs/examples/messaging/create-fcm-provider.md +16 -0
  172. package/docs/examples/messaging/create-mailgun-provider.md +17 -13
  173. package/docs/examples/messaging/create-msg91provider.md +13 -13
  174. package/docs/examples/messaging/create-push.md +23 -13
  175. package/docs/examples/messaging/create-sendgrid-provider.md +15 -13
  176. package/docs/examples/messaging/create-sms.md +19 -0
  177. package/docs/examples/messaging/create-smtp-provider.md +26 -0
  178. package/docs/examples/messaging/create-subscriber.md +10 -13
  179. package/docs/examples/messaging/create-telesign-provider.md +13 -13
  180. package/docs/examples/messaging/create-textmagic-provider.md +13 -13
  181. package/docs/examples/messaging/create-topic.md +10 -13
  182. package/docs/examples/messaging/create-twilio-provider.md +13 -13
  183. package/docs/examples/messaging/create-vonage-provider.md +13 -13
  184. package/docs/examples/messaging/delete-provider.md +8 -13
  185. package/docs/examples/messaging/delete-subscriber.md +9 -13
  186. package/docs/examples/messaging/delete-topic.md +8 -13
  187. package/docs/examples/messaging/delete.md +8 -13
  188. package/docs/examples/messaging/get-message.md +8 -13
  189. package/docs/examples/messaging/get-provider.md +8 -13
  190. package/docs/examples/messaging/get-subscriber.md +9 -13
  191. package/docs/examples/messaging/get-topic.md +8 -13
  192. package/docs/examples/messaging/list-message-logs.md +9 -13
  193. package/docs/examples/messaging/list-messages.md +9 -13
  194. package/docs/examples/messaging/list-provider-logs.md +9 -13
  195. package/docs/examples/messaging/list-providers.md +9 -13
  196. package/docs/examples/messaging/list-subscriber-logs.md +9 -13
  197. package/docs/examples/messaging/list-subscribers.md +10 -13
  198. package/docs/examples/messaging/list-targets.md +9 -13
  199. package/docs/examples/messaging/list-topic-logs.md +9 -13
  200. package/docs/examples/messaging/list-topics.md +9 -13
  201. package/docs/examples/messaging/update-apns-provider.md +20 -0
  202. package/docs/examples/messaging/update-email.md +18 -13
  203. package/docs/examples/messaging/update-fcm-provider.md +16 -0
  204. package/docs/examples/messaging/update-mailgun-provider.md +17 -13
  205. package/docs/examples/messaging/update-msg91provider.md +13 -13
  206. package/docs/examples/messaging/update-push.md +23 -13
  207. package/docs/examples/messaging/update-sendgrid-provider.md +15 -13
  208. package/docs/examples/messaging/update-sms.md +19 -0
  209. package/docs/examples/messaging/update-smtp-provider.md +26 -0
  210. package/docs/examples/messaging/update-telesign-provider.md +13 -13
  211. package/docs/examples/messaging/update-textmagic-provider.md +13 -13
  212. package/docs/examples/messaging/update-topic.md +10 -13
  213. package/docs/examples/messaging/update-twilio-provider.md +13 -13
  214. package/docs/examples/messaging/update-vonage-provider.md +13 -13
  215. package/docs/examples/migrations/create-appwrite-migration.md +11 -13
  216. package/docs/examples/migrations/create-firebase-migration.md +9 -13
  217. package/docs/examples/migrations/create-firebase-o-auth-migration.md +9 -13
  218. package/docs/examples/migrations/create-n-host-migration.md +15 -13
  219. package/docs/examples/migrations/create-supabase-migration.md +14 -13
  220. package/docs/examples/migrations/delete-firebase-auth.md +6 -13
  221. package/docs/examples/migrations/delete.md +8 -13
  222. package/docs/examples/migrations/get-appwrite-report.md +11 -13
  223. package/docs/examples/migrations/get-firebase-report-o-auth.md +9 -13
  224. package/docs/examples/migrations/get-firebase-report.md +9 -13
  225. package/docs/examples/migrations/get-n-host-report.md +15 -13
  226. package/docs/examples/migrations/get-supabase-report.md +14 -13
  227. package/docs/examples/migrations/get.md +8 -13
  228. package/docs/examples/migrations/list-firebase-projects.md +6 -13
  229. package/docs/examples/migrations/list.md +9 -13
  230. package/docs/examples/migrations/retry.md +8 -13
  231. package/docs/examples/project/create-variable.md +9 -13
  232. package/docs/examples/project/delete-variable.md +8 -13
  233. package/docs/examples/project/get-usage.md +10 -13
  234. package/docs/examples/project/get-variable.md +8 -13
  235. package/docs/examples/project/list-variables.md +6 -13
  236. package/docs/examples/project/update-variable.md +10 -13
  237. package/docs/examples/projects/create-key.md +11 -13
  238. package/docs/examples/projects/create-platform.md +13 -13
  239. package/docs/examples/projects/create-smtp-test.md +17 -13
  240. package/docs/examples/projects/create-webhook.md +15 -13
  241. package/docs/examples/projects/create.md +20 -13
  242. package/docs/examples/projects/delete-email-template.md +10 -13
  243. package/docs/examples/projects/delete-key.md +9 -13
  244. package/docs/examples/projects/delete-platform.md +9 -13
  245. package/docs/examples/projects/delete-sms-template.md +10 -13
  246. package/docs/examples/projects/delete-webhook.md +9 -13
  247. package/docs/examples/projects/delete.md +8 -13
  248. package/docs/examples/projects/get-email-template.md +10 -13
  249. package/docs/examples/projects/get-key.md +9 -13
  250. package/docs/examples/projects/get-platform.md +9 -13
  251. package/docs/examples/projects/get-sms-template.md +10 -13
  252. package/docs/examples/projects/get-webhook.md +9 -13
  253. package/docs/examples/projects/get.md +8 -13
  254. package/docs/examples/projects/list-keys.md +8 -13
  255. package/docs/examples/projects/list-platforms.md +8 -13
  256. package/docs/examples/projects/list-webhooks.md +8 -13
  257. package/docs/examples/projects/list.md +9 -13
  258. package/docs/examples/projects/update-api-status-all.md +14 -0
  259. package/docs/examples/projects/update-api-status.md +15 -0
  260. package/docs/examples/projects/update-auth-duration.md +9 -13
  261. package/docs/examples/projects/update-auth-limit.md +9 -13
  262. package/docs/examples/projects/update-auth-password-dictionary.md +9 -13
  263. package/docs/examples/projects/update-auth-password-history.md +9 -13
  264. package/docs/examples/projects/update-auth-sessions-limit.md +9 -13
  265. package/docs/examples/projects/update-auth-status.md +10 -13
  266. package/docs/examples/projects/update-email-template.md +15 -13
  267. package/docs/examples/projects/update-key.md +12 -13
  268. package/docs/examples/projects/update-o-auth2.md +12 -13
  269. package/docs/examples/projects/update-personal-data-check.md +9 -13
  270. package/docs/examples/projects/update-platform.md +13 -13
  271. package/docs/examples/projects/update-service-status-all.md +9 -13
  272. package/docs/examples/projects/update-service-status.md +10 -13
  273. package/docs/examples/projects/update-sms-template.md +11 -13
  274. package/docs/examples/projects/update-smtp.md +17 -13
  275. package/docs/examples/projects/update-team.md +9 -13
  276. package/docs/examples/projects/update-webhook-signature.md +9 -13
  277. package/docs/examples/projects/update-webhook.md +16 -13
  278. package/docs/examples/projects/update.md +18 -13
  279. package/docs/examples/proxy/create-rule.md +10 -13
  280. package/docs/examples/proxy/delete-rule.md +8 -13
  281. package/docs/examples/proxy/get-rule.md +8 -13
  282. package/docs/examples/proxy/list-rules.md +9 -13
  283. package/docs/examples/proxy/update-rule-verification.md +8 -13
  284. package/docs/examples/storage/create-bucket.md +17 -13
  285. package/docs/examples/storage/create-file.md +11 -13
  286. package/docs/examples/storage/delete-bucket.md +8 -13
  287. package/docs/examples/storage/delete-file.md +9 -13
  288. package/docs/examples/storage/get-bucket-usage.md +9 -13
  289. package/docs/examples/storage/get-bucket.md +8 -13
  290. package/docs/examples/storage/get-file-download.md +9 -9
  291. package/docs/examples/storage/get-file-preview.md +20 -9
  292. package/docs/examples/storage/get-file-view.md +9 -9
  293. package/docs/examples/storage/get-file.md +9 -13
  294. package/docs/examples/storage/get-usage.md +8 -13
  295. package/docs/examples/storage/list-buckets.md +9 -13
  296. package/docs/examples/storage/list-files.md +10 -13
  297. package/docs/examples/storage/update-bucket.md +17 -13
  298. package/docs/examples/storage/update-file.md +11 -13
  299. package/docs/examples/teams/create-membership.md +14 -13
  300. package/docs/examples/teams/create.md +10 -13
  301. package/docs/examples/teams/delete-membership.md +9 -13
  302. package/docs/examples/teams/delete.md +8 -13
  303. package/docs/examples/teams/get-membership.md +9 -13
  304. package/docs/examples/teams/get-prefs.md +8 -13
  305. package/docs/examples/teams/get.md +8 -13
  306. package/docs/examples/teams/list-logs.md +9 -13
  307. package/docs/examples/teams/list-memberships.md +10 -13
  308. package/docs/examples/teams/list.md +9 -13
  309. package/docs/examples/teams/update-membership-status.md +11 -13
  310. package/docs/examples/teams/update-membership.md +10 -13
  311. package/docs/examples/teams/update-name.md +9 -13
  312. package/docs/examples/teams/update-prefs.md +9 -13
  313. package/docs/examples/users/create-argon2user.md +11 -13
  314. package/docs/examples/users/create-bcrypt-user.md +11 -13
  315. package/docs/examples/users/create-m-d5user.md +11 -13
  316. package/docs/examples/users/create-mfa-recovery-codes.md +13 -0
  317. package/docs/examples/users/create-p-h-pass-user.md +11 -13
  318. package/docs/examples/users/create-s-h-a-user.md +12 -13
  319. package/docs/examples/users/create-scrypt-modified-user.md +14 -13
  320. package/docs/examples/users/create-scrypt-user.md +16 -13
  321. package/docs/examples/users/create-session.md +8 -13
  322. package/docs/examples/users/create-target.md +13 -13
  323. package/docs/examples/users/create-token.md +10 -13
  324. package/docs/examples/users/create.md +12 -13
  325. package/docs/examples/users/delete-identity.md +8 -13
  326. package/docs/examples/users/delete-mfa-authenticator.md +14 -0
  327. package/docs/examples/users/delete-session.md +9 -13
  328. package/docs/examples/users/delete-sessions.md +8 -13
  329. package/docs/examples/users/delete-target.md +9 -13
  330. package/docs/examples/users/delete.md +8 -13
  331. package/docs/examples/users/get-mfa-recovery-codes.md +13 -0
  332. package/docs/examples/users/get-prefs.md +8 -13
  333. package/docs/examples/users/get-target.md +9 -13
  334. package/docs/examples/users/get-usage.md +8 -13
  335. package/docs/examples/users/get.md +8 -13
  336. package/docs/examples/users/list-identities.md +9 -13
  337. package/docs/examples/users/list-logs.md +9 -13
  338. package/docs/examples/users/list-memberships.md +8 -13
  339. package/docs/examples/users/list-mfa-factors.md +13 -0
  340. package/docs/examples/users/list-sessions.md +8 -13
  341. package/docs/examples/users/list-targets.md +9 -13
  342. package/docs/examples/users/list.md +9 -13
  343. package/docs/examples/users/update-email-verification.md +9 -13
  344. package/docs/examples/users/update-email.md +9 -13
  345. package/docs/examples/users/update-labels.md +9 -13
  346. package/docs/examples/users/update-mfa-recovery-codes.md +13 -0
  347. package/docs/examples/users/update-mfa.md +9 -13
  348. package/docs/examples/users/update-name.md +9 -13
  349. package/docs/examples/users/update-password.md +9 -13
  350. package/docs/examples/users/update-phone-verification.md +9 -13
  351. package/docs/examples/users/update-phone.md +9 -13
  352. package/docs/examples/users/update-prefs.md +9 -13
  353. package/docs/examples/users/update-status.md +9 -13
  354. package/docs/examples/users/update-target.md +12 -13
  355. package/docs/examples/vcs/create-repository-detection.md +10 -13
  356. package/docs/examples/vcs/create-repository.md +10 -13
  357. package/docs/examples/vcs/delete-installation.md +8 -13
  358. package/docs/examples/vcs/get-installation.md +8 -13
  359. package/docs/examples/vcs/get-repository.md +9 -13
  360. package/docs/examples/vcs/list-installations.md +9 -13
  361. package/docs/examples/vcs/list-repositories.md +9 -13
  362. package/docs/examples/vcs/list-repository-branches.md +9 -13
  363. package/docs/examples/vcs/update-external-deployments.md +10 -13
  364. package/package.json +1 -1
  365. package/src/client.ts +3 -3
  366. package/src/enums/{a-p-i-service.ts → api-service.ts} +1 -1
  367. package/src/enums/api.ts +5 -0
  368. package/src/enums/authentication-factor.ts +6 -0
  369. package/src/enums/authenticator-type.ts +3 -0
  370. package/src/enums/email-template-locale.ts +133 -0
  371. package/src/enums/email-template-type.ts +7 -0
  372. package/src/enums/flag.ts +1 -1
  373. package/src/enums/index-type.ts +0 -1
  374. package/src/enums/name.ts +15 -0
  375. package/src/enums/{password-version.ts → password-hash.ts} +1 -1
  376. package/src/enums/region.ts +1 -0
  377. package/src/enums/runtime.ts +40 -0
  378. package/src/enums/{template-locale.ts → sms-template-locale.ts} +1 -1
  379. package/src/enums/{template-type.ts → sms-template-type.ts} +2 -1
  380. package/src/enums/{s-m-t-p-encryption.ts → smtp-encryption.ts} +1 -1
  381. package/src/id.ts +23 -4
  382. package/src/index.ts +11 -8
  383. package/src/models.ts +57 -19
  384. package/src/query.ts +2 -2
  385. package/src/service.ts +0 -3
  386. package/src/services/account.ts +239 -66
  387. package/src/services/assistant.ts +0 -1
  388. package/src/services/avatars.ts +0 -1
  389. package/src/services/console.ts +0 -1
  390. package/src/services/databases.ts +20 -4
  391. package/src/services/functions.ts +0 -1
  392. package/src/services/graphql.ts +0 -1
  393. package/src/services/health.ts +121 -1
  394. package/src/services/locale.ts +0 -1
  395. package/src/services/messaging.ts +171 -80
  396. package/src/services/migrations.ts +0 -1
  397. package/src/services/project.ts +1 -2
  398. package/src/services/projects.ts +97 -24
  399. package/src/services/proxy.ts +0 -1
  400. package/src/services/storage.ts +2 -3
  401. package/src/services/teams.ts +0 -1
  402. package/src/services/users.ts +115 -39
  403. package/src/services/vcs.ts +0 -1
  404. package/types/enums/{a-p-i-service.d.ts → api-service.d.ts} +1 -1
  405. package/types/enums/api.d.ts +5 -0
  406. package/types/enums/authentication-factor.d.ts +6 -0
  407. package/types/enums/authenticator-type.d.ts +3 -0
  408. package/types/enums/email-template-locale.d.ts +133 -0
  409. package/types/enums/email-template-type.d.ts +7 -0
  410. package/types/enums/flag.d.ts +1 -1
  411. package/types/enums/index-type.d.ts +1 -2
  412. package/types/enums/name.d.ts +15 -0
  413. package/types/enums/{password-version.d.ts → password-hash.d.ts} +1 -1
  414. package/types/enums/region.d.ts +2 -1
  415. package/types/enums/runtime.d.ts +41 -1
  416. package/types/enums/{template-locale.d.ts → sms-template-locale.d.ts} +1 -1
  417. package/types/enums/sms-template-type.d.ts +6 -0
  418. package/types/enums/{s-m-t-p-encryption.d.ts → smtp-encryption.d.ts} +1 -1
  419. package/types/id.d.ts +2 -1
  420. package/types/index.d.ts +11 -8
  421. package/types/models.d.ts +57 -19
  422. package/types/query.d.ts +2 -2
  423. package/types/services/account.d.ts +121 -28
  424. package/types/services/databases.d.ts +20 -3
  425. package/types/services/health.d.ts +56 -0
  426. package/types/services/messaging.d.ts +113 -53
  427. package/types/services/project.d.ts +1 -1
  428. package/types/services/projects.d.ts +47 -23
  429. package/types/services/storage.d.ts +2 -2
  430. package/types/services/users.d.ts +63 -17
  431. package/docs/examples/account/add-authenticator.md +0 -18
  432. package/docs/examples/account/create-challenge.md +0 -18
  433. package/docs/examples/account/delete-authenticator.md +0 -18
  434. package/docs/examples/account/list-factors.md +0 -18
  435. package/docs/examples/account/update-challenge.md +0 -18
  436. package/docs/examples/account/verify-authenticator.md +0 -18
  437. package/docs/examples/messaging/create-a-p-n-s-provider.md +0 -18
  438. package/docs/examples/messaging/create-f-c-m-provider.md +0 -18
  439. package/docs/examples/messaging/create-s-m-s.md +0 -18
  440. package/docs/examples/messaging/create-s-m-t-p-provider.md +0 -18
  441. package/docs/examples/messaging/update-a-p-n-s-provider.md +0 -18
  442. package/docs/examples/messaging/update-f-c-m-provider.md +0 -18
  443. package/docs/examples/messaging/update-s-m-s.md +0 -18
  444. package/docs/examples/messaging/update-s-m-t-p-provider.md +0 -18
  445. package/docs/examples/users/delete-authenticator.md +0 -18
  446. package/docs/examples/users/list-providers.md +0 -18
  447. package/src/enums/authenticator-factor.ts +0 -3
  448. package/src/enums/authenticator-provider.ts +0 -3
  449. package/src/enums/message-type.ts +0 -5
  450. package/types/enums/authenticator-factor.d.ts +0 -3
  451. package/types/enums/authenticator-provider.d.ts +0 -3
  452. package/types/enums/message-type.d.ts +0 -5
  453. package/types/enums/template-type.d.ts +0 -5
package/dist/cjs/sdk.js CHANGED
@@ -26,7 +26,33 @@ function __awaiter(thisArg, _arguments, P, generator) {
26
26
  function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
27
27
  step((generator = generator.apply(thisArg, _arguments || [])).next());
28
28
  });
29
+ }
30
+
31
+ function __classPrivateFieldGet(receiver, state, kind, f) {
32
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
33
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
34
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
35
+ }
36
+
37
+ class Service {
38
+ constructor(client) {
39
+ this.client = client;
40
+ }
41
+ static flatten(data, prefix = '') {
42
+ let output = {};
43
+ for (const [key, value] of Object.entries(data)) {
44
+ let finalKey = prefix ? prefix + '[' + key + ']' : key;
45
+ if (Array.isArray(value)) {
46
+ output = Object.assign(Object.assign({}, output), Service.flatten(value, finalKey));
47
+ }
48
+ else {
49
+ output[finalKey] = value;
50
+ }
51
+ }
52
+ return output;
53
+ }
29
54
  }
55
+ Service.CHUNK_SIZE = 5 * 1024 * 1024; // 5MB
30
56
 
31
57
  class Query {
32
58
  constructor(method, attribute, values) {
@@ -69,31 +95,8 @@ Query.cursorBefore = (documentId) => new Query("cursorBefore", undefined, docume
69
95
  Query.limit = (limit) => new Query("limit", undefined, limit).toString();
70
96
  Query.offset = (offset) => new Query("offset", undefined, offset).toString();
71
97
  Query.contains = (attribute, value) => new Query("contains", attribute, value).toString();
72
- Query.or = (...queries) => new Query("or", undefined, queries.map((query) => JSON.parse(query))).toString();
73
- Query.and = (...queries) => new Query("and", undefined, queries.map((query) => JSON.parse(query))).toString();
74
-
75
- class Service {
76
- constructor(client) {
77
- this.client = client;
78
- }
79
- static flatten(data, prefix = '') {
80
- let output = {};
81
- for (const [key, value] of Object.entries(data)) {
82
- let finalKey = prefix ? prefix + '[' + key + ']' : key;
83
- if (Array.isArray(value)) {
84
- output = Object.assign(Object.assign({}, output), Service.flatten(value, finalKey));
85
- }
86
- else if (value instanceof Query) {
87
- output[finalKey] = JSON.stringify(value);
88
- }
89
- else {
90
- output[finalKey] = value;
91
- }
92
- }
93
- return output;
94
- }
95
- }
96
- Service.CHUNK_SIZE = 5 * 1024 * 1024; // 5MB
98
+ Query.or = (queries) => new Query("or", undefined, queries.map((query) => JSON.parse(query))).toString();
99
+ Query.and = (queries) => new Query("and", undefined, queries.map((query) => JSON.parse(query))).toString();
97
100
 
98
101
  class AppwriteException extends Error {
99
102
  constructor(message, code = 0, type = '', response = '') {
@@ -108,7 +111,7 @@ class AppwriteException extends Error {
108
111
  class Client {
109
112
  constructor() {
110
113
  this.config = {
111
- endpoint: 'https://HOSTNAME/v1',
114
+ endpoint: 'https://cloud.appwrite.io/v1',
112
115
  endpointRealtime: '',
113
116
  project: '',
114
117
  key: '',
@@ -120,8 +123,8 @@ class Client {
120
123
  'x-sdk-name': 'Console',
121
124
  'x-sdk-platform': 'console',
122
125
  'x-sdk-language': 'web',
123
- 'x-sdk-version': '0.6.0-rc.9',
124
- 'X-Appwrite-Response-Format': '1.4.0',
126
+ 'x-sdk-version': '0.6.1',
127
+ 'X-Appwrite-Response-Format': '1.5.0',
125
128
  };
126
129
  this.realtime = {
127
130
  socket: undefined,
@@ -673,6 +676,7 @@ class Account extends Service {
673
676
  /**
674
677
  * Update MFA
675
678
  *
679
+ * Enable or disable MFA on an account.
676
680
  *
677
681
  * @param {boolean} mfa
678
682
  * @throws {AppwriteException}
@@ -695,23 +699,24 @@ class Account extends Service {
695
699
  });
696
700
  }
697
701
  /**
698
- * Create MFA Challenge
702
+ * Add Authenticator
699
703
  *
704
+ * Add an authenticator app to be used as an MFA factor. Verify the
705
+ * authenticator using the [verify
706
+ * authenticator](/docs/references/cloud/client-web/account#verifyAuthenticator)
707
+ * method.
700
708
  *
701
- * @param {AuthenticatorProvider} provider
709
+ * @param {AuthenticatorType} type
702
710
  * @throws {AppwriteException}
703
711
  * @returns {Promise}
704
712
  */
705
- createChallenge(provider) {
713
+ createMfaAuthenticator(type) {
706
714
  return __awaiter(this, void 0, void 0, function* () {
707
- if (typeof provider === 'undefined') {
708
- throw new AppwriteException('Missing required parameter: "provider"');
715
+ if (typeof type === 'undefined') {
716
+ throw new AppwriteException('Missing required parameter: "type"');
709
717
  }
710
- const apiPath = '/account/mfa/challenge';
718
+ const apiPath = '/account/mfa/authenticators/{type}'.replace('{type}', type);
711
719
  const payload = {};
712
- if (typeof provider !== 'undefined') {
713
- payload['provider'] = provider;
714
- }
715
720
  const uri = new URL(this.client.config.endpoint + apiPath);
716
721
  return yield this.client.call('post', uri, {
717
722
  'content-type': 'application/json',
@@ -719,27 +724,27 @@ class Account extends Service {
719
724
  });
720
725
  }
721
726
  /**
722
- * Create MFA Challenge (confirmation)
727
+ * Verify Authenticator
723
728
  *
729
+ * Verify an authenticator app after adding it using the [add
730
+ * authenticator](/docs/references/cloud/client-web/account#addAuthenticator)
731
+ * method.
724
732
  *
725
- * @param {string} challengeId
733
+ * @param {AuthenticatorType} type
726
734
  * @param {string} otp
727
735
  * @throws {AppwriteException}
728
736
  * @returns {Promise}
729
737
  */
730
- updateChallenge(challengeId, otp) {
738
+ updateMfaAuthenticator(type, otp) {
731
739
  return __awaiter(this, void 0, void 0, function* () {
732
- if (typeof challengeId === 'undefined') {
733
- throw new AppwriteException('Missing required parameter: "challengeId"');
740
+ if (typeof type === 'undefined') {
741
+ throw new AppwriteException('Missing required parameter: "type"');
734
742
  }
735
743
  if (typeof otp === 'undefined') {
736
744
  throw new AppwriteException('Missing required parameter: "otp"');
737
745
  }
738
- const apiPath = '/account/mfa/challenge';
746
+ const apiPath = '/account/mfa/authenticators/{type}'.replace('{type}', type);
739
747
  const payload = {};
740
- if (typeof challengeId !== 'undefined') {
741
- payload['challengeId'] = challengeId;
742
- }
743
748
  if (typeof otp !== 'undefined') {
744
749
  payload['otp'] = otp;
745
750
  }
@@ -750,38 +755,55 @@ class Account extends Service {
750
755
  });
751
756
  }
752
757
  /**
753
- * List Factors
758
+ * Delete Authenticator
754
759
  *
755
- * Get the currently logged in user.
760
+ * Delete an authenticator for a user by ID.
756
761
  *
762
+ * @param {AuthenticatorType} type
763
+ * @param {string} otp
757
764
  * @throws {AppwriteException}
758
765
  * @returns {Promise}
759
766
  */
760
- listFactors() {
767
+ deleteMfaAuthenticator(type, otp) {
761
768
  return __awaiter(this, void 0, void 0, function* () {
762
- const apiPath = '/account/mfa/factors';
769
+ if (typeof type === 'undefined') {
770
+ throw new AppwriteException('Missing required parameter: "type"');
771
+ }
772
+ if (typeof otp === 'undefined') {
773
+ throw new AppwriteException('Missing required parameter: "otp"');
774
+ }
775
+ const apiPath = '/account/mfa/authenticators/{type}'.replace('{type}', type);
763
776
  const payload = {};
777
+ if (typeof otp !== 'undefined') {
778
+ payload['otp'] = otp;
779
+ }
764
780
  const uri = new URL(this.client.config.endpoint + apiPath);
765
- return yield this.client.call('get', uri, {
781
+ return yield this.client.call('delete', uri, {
766
782
  'content-type': 'application/json',
767
783
  }, payload);
768
784
  });
769
785
  }
770
786
  /**
771
- * Add Authenticator
787
+ * Create 2FA Challenge
772
788
  *
789
+ * Begin the process of MFA verification after sign-in. Finish the flow with
790
+ * [updateMfaChallenge](/docs/references/cloud/client-web/account#updateMfaChallenge)
791
+ * method.
773
792
  *
774
- * @param {AuthenticatorFactor} factor
793
+ * @param {AuthenticationFactor} factor
775
794
  * @throws {AppwriteException}
776
795
  * @returns {Promise}
777
796
  */
778
- addAuthenticator(factor) {
797
+ createMfaChallenge(factor) {
779
798
  return __awaiter(this, void 0, void 0, function* () {
780
799
  if (typeof factor === 'undefined') {
781
800
  throw new AppwriteException('Missing required parameter: "factor"');
782
801
  }
783
- const apiPath = '/account/mfa/{factor}'.replace('{factor}', factor);
802
+ const apiPath = '/account/mfa/challenge';
784
803
  const payload = {};
804
+ if (typeof factor !== 'undefined') {
805
+ payload['factor'] = factor;
806
+ }
785
807
  const uri = new URL(this.client.config.endpoint + apiPath);
786
808
  return yield this.client.call('post', uri, {
787
809
  'content-type': 'application/json',
@@ -789,24 +811,32 @@ class Account extends Service {
789
811
  });
790
812
  }
791
813
  /**
792
- * Verify Authenticator
814
+ * Create MFA Challenge (confirmation)
793
815
  *
816
+ * Complete the MFA challenge by providing the one-time password. Finish the
817
+ * process of MFA verification by providing the one-time password. To begin
818
+ * the flow, use
819
+ * [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge)
820
+ * method.
794
821
  *
795
- * @param {AuthenticatorFactor} factor
822
+ * @param {string} challengeId
796
823
  * @param {string} otp
797
824
  * @throws {AppwriteException}
798
825
  * @returns {Promise}
799
826
  */
800
- verifyAuthenticator(factor, otp) {
827
+ updateMfaChallenge(challengeId, otp) {
801
828
  return __awaiter(this, void 0, void 0, function* () {
802
- if (typeof factor === 'undefined') {
803
- throw new AppwriteException('Missing required parameter: "factor"');
829
+ if (typeof challengeId === 'undefined') {
830
+ throw new AppwriteException('Missing required parameter: "challengeId"');
804
831
  }
805
832
  if (typeof otp === 'undefined') {
806
833
  throw new AppwriteException('Missing required parameter: "otp"');
807
834
  }
808
- const apiPath = '/account/mfa/{factor}'.replace('{factor}', factor);
835
+ const apiPath = '/account/mfa/challenge';
809
836
  const payload = {};
837
+ if (typeof challengeId !== 'undefined') {
838
+ payload['challengeId'] = challengeId;
839
+ }
810
840
  if (typeof otp !== 'undefined') {
811
841
  payload['otp'] = otp;
812
842
  }
@@ -817,29 +847,83 @@ class Account extends Service {
817
847
  });
818
848
  }
819
849
  /**
820
- * Delete Authenticator
850
+ * List Factors
821
851
  *
852
+ * List the factors available on the account to be used as a MFA challange.
822
853
  *
823
- * @param {AuthenticatorProvider} provider
824
- * @param {string} otp
825
854
  * @throws {AppwriteException}
826
855
  * @returns {Promise}
827
856
  */
828
- deleteAuthenticator(provider, otp) {
857
+ listMfaFactors() {
829
858
  return __awaiter(this, void 0, void 0, function* () {
830
- if (typeof provider === 'undefined') {
831
- throw new AppwriteException('Missing required parameter: "provider"');
832
- }
833
- if (typeof otp === 'undefined') {
834
- throw new AppwriteException('Missing required parameter: "otp"');
835
- }
836
- const apiPath = '/account/mfa/{provider}'.replace('{provider}', provider);
859
+ const apiPath = '/account/mfa/factors';
837
860
  const payload = {};
838
- if (typeof otp !== 'undefined') {
839
- payload['otp'] = otp;
840
- }
841
861
  const uri = new URL(this.client.config.endpoint + apiPath);
842
- return yield this.client.call('delete', uri, {
862
+ return yield this.client.call('get', uri, {
863
+ 'content-type': 'application/json',
864
+ }, payload);
865
+ });
866
+ }
867
+ /**
868
+ * Get MFA Recovery Codes
869
+ *
870
+ * Get recovery codes that can be used as backup for MFA flow. Before getting
871
+ * codes, they must be generated using
872
+ * [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes)
873
+ * method. An OTP challenge is required to read recovery codes.
874
+ *
875
+ * @throws {AppwriteException}
876
+ * @returns {Promise}
877
+ */
878
+ getMfaRecoveryCodes() {
879
+ return __awaiter(this, void 0, void 0, function* () {
880
+ const apiPath = '/account/mfa/recovery-codes';
881
+ const payload = {};
882
+ const uri = new URL(this.client.config.endpoint + apiPath);
883
+ return yield this.client.call('get', uri, {
884
+ 'content-type': 'application/json',
885
+ }, payload);
886
+ });
887
+ }
888
+ /**
889
+ * Create MFA Recovery Codes
890
+ *
891
+ * Generate recovery codes as backup for MFA flow. It's recommended to
892
+ * generate and show then immediately after user successfully adds their
893
+ * authehticator. Recovery codes can be used as a MFA verification type in
894
+ * [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge)
895
+ * method.
896
+ *
897
+ * @throws {AppwriteException}
898
+ * @returns {Promise}
899
+ */
900
+ createMfaRecoveryCodes() {
901
+ return __awaiter(this, void 0, void 0, function* () {
902
+ const apiPath = '/account/mfa/recovery-codes';
903
+ const payload = {};
904
+ const uri = new URL(this.client.config.endpoint + apiPath);
905
+ return yield this.client.call('post', uri, {
906
+ 'content-type': 'application/json',
907
+ }, payload);
908
+ });
909
+ }
910
+ /**
911
+ * Regenerate MFA Recovery Codes
912
+ *
913
+ * Regenerate recovery codes that can be used as backup for MFA flow. Before
914
+ * regenerating codes, they must be first generated using
915
+ * [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes)
916
+ * method. An OTP challenge is required to regenreate recovery codes.
917
+ *
918
+ * @throws {AppwriteException}
919
+ * @returns {Promise}
920
+ */
921
+ updateMfaRecoveryCodes() {
922
+ return __awaiter(this, void 0, void 0, function* () {
923
+ const apiPath = '/account/mfa/recovery-codes';
924
+ const payload = {};
925
+ const uri = new URL(this.client.config.endpoint + apiPath);
926
+ return yield this.client.call('patch', uri, {
843
927
  'content-type': 'application/json',
844
928
  }, payload);
845
929
  });
@@ -1168,7 +1252,7 @@ class Account extends Service {
1168
1252
  });
1169
1253
  }
1170
1254
  /**
1171
- * Create session (deprecated)
1255
+ * Update magic URL session
1172
1256
  *
1173
1257
  * Use this endpoint to create a session from token. Provide the **userId**
1174
1258
  * and **secret** parameters from the successful response of authentication
@@ -1224,12 +1308,11 @@ class Account extends Service {
1224
1308
  * @param {OAuthProvider} provider
1225
1309
  * @param {string} success
1226
1310
  * @param {string} failure
1227
- * @param {boolean} token
1228
1311
  * @param {string[]} scopes
1229
1312
  * @throws {AppwriteException}
1230
1313
  * @returns {void|string}
1231
1314
  */
1232
- createOAuth2Session(provider, success, failure, token, scopes) {
1315
+ createOAuth2Session(provider, success, failure, scopes) {
1233
1316
  if (typeof provider === 'undefined') {
1234
1317
  throw new AppwriteException('Missing required parameter: "provider"');
1235
1318
  }
@@ -1241,9 +1324,6 @@ class Account extends Service {
1241
1324
  if (typeof failure !== 'undefined') {
1242
1325
  payload['failure'] = failure;
1243
1326
  }
1244
- if (typeof token !== 'undefined') {
1245
- payload['token'] = token;
1246
- }
1247
1327
  if (typeof scopes !== 'undefined') {
1248
1328
  payload['scopes'] = scopes;
1249
1329
  }
@@ -1259,6 +1339,40 @@ class Account extends Service {
1259
1339
  return uri;
1260
1340
  }
1261
1341
  }
1342
+ /**
1343
+ * Update phone session
1344
+ *
1345
+ * Use this endpoint to create a session from token. Provide the **userId**
1346
+ * and **secret** parameters from the successful response of authentication
1347
+ * flows initiated by token creation. For example, magic URL and phone login.
1348
+ *
1349
+ * @param {string} userId
1350
+ * @param {string} secret
1351
+ * @throws {AppwriteException}
1352
+ * @returns {Promise}
1353
+ */
1354
+ updatePhoneSession(userId, secret) {
1355
+ return __awaiter(this, void 0, void 0, function* () {
1356
+ if (typeof userId === 'undefined') {
1357
+ throw new AppwriteException('Missing required parameter: "userId"');
1358
+ }
1359
+ if (typeof secret === 'undefined') {
1360
+ throw new AppwriteException('Missing required parameter: "secret"');
1361
+ }
1362
+ const apiPath = '/account/sessions/phone';
1363
+ const payload = {};
1364
+ if (typeof userId !== 'undefined') {
1365
+ payload['userId'] = userId;
1366
+ }
1367
+ if (typeof secret !== 'undefined') {
1368
+ payload['secret'] = secret;
1369
+ }
1370
+ const uri = new URL(this.client.config.endpoint + apiPath);
1371
+ return yield this.client.call('put', uri, {
1372
+ 'content-type': 'application/json',
1373
+ }, payload);
1374
+ });
1375
+ }
1262
1376
  /**
1263
1377
  * Create session
1264
1378
  *
@@ -1317,10 +1431,11 @@ class Account extends Service {
1317
1431
  });
1318
1432
  }
1319
1433
  /**
1320
- * Update (or renew) a session
1434
+ * Update session
1321
1435
  *
1322
- * Extend session's expiry to increase it's lifespan. Extending a session is
1323
- * useful when session length is short such as 5 minutes.
1436
+ * Use this endpoint to extend a session's length. Extending a session is
1437
+ * useful when session expiry is short. If the session was created using an
1438
+ * OAuth provider, this endpoint refreshes the access token from the provider.
1324
1439
  *
1325
1440
  * @param {string} sessionId
1326
1441
  * @throws {AppwriteException}
@@ -1386,7 +1501,7 @@ class Account extends Service {
1386
1501
  });
1387
1502
  }
1388
1503
  /**
1389
- * Create a push target
1504
+ * Create push target
1390
1505
  *
1391
1506
  *
1392
1507
  * @param {string} targetId
@@ -1421,7 +1536,7 @@ class Account extends Service {
1421
1536
  });
1422
1537
  }
1423
1538
  /**
1424
- * Update a push target
1539
+ * Update push target
1425
1540
  *
1426
1541
  *
1427
1542
  * @param {string} targetId
@@ -1449,7 +1564,7 @@ class Account extends Service {
1449
1564
  });
1450
1565
  }
1451
1566
  /**
1452
- * Delete a push target
1567
+ * Delete push target
1453
1568
  *
1454
1569
  *
1455
1570
  * @param {string} targetId
@@ -1569,6 +1684,58 @@ class Account extends Service {
1569
1684
  }, payload);
1570
1685
  });
1571
1686
  }
1687
+ /**
1688
+ * Create OAuth2 token
1689
+ *
1690
+ * Allow the user to login to their account using the OAuth2 provider of their
1691
+ * choice. Each OAuth2 provider should be enabled from the Appwrite console
1692
+ * first. Use the success and failure arguments to provide a redirect URL's
1693
+ * back to your app when login is completed.
1694
+ *
1695
+ * If authentication succeeds, `userId` and `secret` of a token will be
1696
+ * appended to the success URL as query parameters. These can be used to
1697
+ * create a new session using the [Create
1698
+ * session](https://appwrite.io/docs/references/cloud/client-web/account#createSession)
1699
+ * endpoint.
1700
+ *
1701
+ * A user is limited to 10 active sessions at a time by default. [Learn more
1702
+ * about session
1703
+ * limits](https://appwrite.io/docs/authentication-security#limits).
1704
+ *
1705
+ * @param {OAuthProvider} provider
1706
+ * @param {string} success
1707
+ * @param {string} failure
1708
+ * @param {string[]} scopes
1709
+ * @throws {AppwriteException}
1710
+ * @returns {void|string}
1711
+ */
1712
+ createOAuth2Token(provider, success, failure, scopes) {
1713
+ if (typeof provider === 'undefined') {
1714
+ throw new AppwriteException('Missing required parameter: "provider"');
1715
+ }
1716
+ const apiPath = '/account/tokens/oauth2/{provider}'.replace('{provider}', provider);
1717
+ const payload = {};
1718
+ if (typeof success !== 'undefined') {
1719
+ payload['success'] = success;
1720
+ }
1721
+ if (typeof failure !== 'undefined') {
1722
+ payload['failure'] = failure;
1723
+ }
1724
+ if (typeof scopes !== 'undefined') {
1725
+ payload['scopes'] = scopes;
1726
+ }
1727
+ const uri = new URL(this.client.config.endpoint + apiPath);
1728
+ payload['project'] = this.client.config.project;
1729
+ for (const [key, value] of Object.entries(Service.flatten(payload))) {
1730
+ uri.searchParams.append(key, value);
1731
+ }
1732
+ if (typeof window !== 'undefined' && (window === null || window === void 0 ? void 0 : window.location)) {
1733
+ window.location.href = uri.toString();
1734
+ }
1735
+ else {
1736
+ return uri;
1737
+ }
1738
+ }
1572
1739
  /**
1573
1740
  * Create phone token
1574
1741
  *
@@ -2160,7 +2327,7 @@ class Databases extends Service {
2160
2327
  });
2161
2328
  }
2162
2329
  /**
2163
- * Get usage stats for the database
2330
+ * Get databases usage stats
2164
2331
  *
2165
2332
  *
2166
2333
  * @param {DatabaseUsageRange} range
@@ -2443,6 +2610,7 @@ class Databases extends Service {
2443
2610
  /**
2444
2611
  * List attributes
2445
2612
  *
2613
+ * List attributes in the collection.
2446
2614
  *
2447
2615
  * @param {string} databaseId
2448
2616
  * @param {string} collectionId
@@ -2521,6 +2689,8 @@ class Databases extends Service {
2521
2689
  /**
2522
2690
  * Update boolean attribute
2523
2691
  *
2692
+ * Update a boolean attribute. Changing the `default` value will not update
2693
+ * already existing documents.
2524
2694
  *
2525
2695
  * @param {string} databaseId
2526
2696
  * @param {string} collectionId
@@ -2564,6 +2734,7 @@ class Databases extends Service {
2564
2734
  /**
2565
2735
  * Create datetime attribute
2566
2736
  *
2737
+ * Create a date time attribute according to the ISO 8601 standard.
2567
2738
  *
2568
2739
  * @param {string} databaseId
2569
2740
  * @param {string} collectionId
@@ -2611,6 +2782,8 @@ class Databases extends Service {
2611
2782
  /**
2612
2783
  * Update dateTime attribute
2613
2784
  *
2785
+ * Update a date time attribute. Changing the `default` value will not update
2786
+ * already existing documents.
2614
2787
  *
2615
2788
  * @param {string} databaseId
2616
2789
  * @param {string} collectionId
@@ -2749,6 +2922,9 @@ class Databases extends Service {
2749
2922
  /**
2750
2923
  * Create enum attribute
2751
2924
  *
2925
+ * Create an enumeration attribute. The `elements` param acts as a white-list
2926
+ * of accepted values for this attribute.
2927
+ *
2752
2928
  *
2753
2929
  * @param {string} databaseId
2754
2930
  * @param {string} collectionId
@@ -3446,6 +3622,7 @@ class Databases extends Service {
3446
3622
  /**
3447
3623
  * Get attribute
3448
3624
  *
3625
+ * Get attribute by ID.
3449
3626
  *
3450
3627
  * @param {string} databaseId
3451
3628
  * @param {string} collectionId
@@ -3475,6 +3652,7 @@ class Databases extends Service {
3475
3652
  /**
3476
3653
  * Delete attribute
3477
3654
  *
3655
+ * Deletes an attribute.
3478
3656
  *
3479
3657
  * @param {string} databaseId
3480
3658
  * @param {string} collectionId
@@ -3756,6 +3934,7 @@ class Databases extends Service {
3756
3934
  /**
3757
3935
  * List indexes
3758
3936
  *
3937
+ * List indexes in the collection.
3759
3938
  *
3760
3939
  * @param {string} databaseId
3761
3940
  * @param {string} collectionId
@@ -3785,6 +3964,9 @@ class Databases extends Service {
3785
3964
  /**
3786
3965
  * Create index
3787
3966
  *
3967
+ * Creates an index on the attributes listed. Your index should include all
3968
+ * the attributes you will query in a single request.
3969
+ * Attributes can be `key`, `fulltext`, and `unique`.
3788
3970
  *
3789
3971
  * @param {string} databaseId
3790
3972
  * @param {string} collectionId
@@ -3835,6 +4017,7 @@ class Databases extends Service {
3835
4017
  /**
3836
4018
  * Get index
3837
4019
  *
4020
+ * Get index by ID.
3838
4021
  *
3839
4022
  * @param {string} databaseId
3840
4023
  * @param {string} collectionId
@@ -3864,6 +4047,7 @@ class Databases extends Service {
3864
4047
  /**
3865
4048
  * Delete index
3866
4049
  *
4050
+ * Delete an index.
3867
4051
  *
3868
4052
  * @param {string} databaseId
3869
4053
  * @param {string} collectionId
@@ -3921,7 +4105,7 @@ class Databases extends Service {
3921
4105
  });
3922
4106
  }
3923
4107
  /**
3924
- * Get usage stats for a collection
4108
+ * Get collection usage stats
3925
4109
  *
3926
4110
  *
3927
4111
  * @param {string} databaseId
@@ -3976,7 +4160,7 @@ class Databases extends Service {
3976
4160
  });
3977
4161
  }
3978
4162
  /**
3979
- * Get usage stats for the database
4163
+ * Get database usage stats
3980
4164
  *
3981
4165
  *
3982
4166
  * @param {string} databaseId
@@ -4959,6 +5143,28 @@ class Health extends Service {
4959
5143
  }, payload);
4960
5144
  });
4961
5145
  }
5146
+ /**
5147
+ * Get the SSL certificate for a domain
5148
+ *
5149
+ * Get the SSL certificate for a domain
5150
+ *
5151
+ * @param {string} domain
5152
+ * @throws {AppwriteException}
5153
+ * @returns {Promise}
5154
+ */
5155
+ getCertificate(domain) {
5156
+ return __awaiter(this, void 0, void 0, function* () {
5157
+ const apiPath = '/health/certificate';
5158
+ const payload = {};
5159
+ if (typeof domain !== 'undefined') {
5160
+ payload['domain'] = domain;
5161
+ }
5162
+ const uri = new URL(this.client.config.endpoint + apiPath);
5163
+ return yield this.client.call('get', uri, {
5164
+ 'content-type': 'application/json',
5165
+ }, payload);
5166
+ });
5167
+ }
4962
5168
  /**
4963
5169
  * Get DB
4964
5170
  *
@@ -5111,9 +5317,38 @@ class Health extends Service {
5111
5317
  }, payload);
5112
5318
  });
5113
5319
  }
5320
+ /**
5321
+ * Get number of failed queue jobs
5322
+ *
5323
+ * Returns the amount of failed jobs in a given queue.
5324
+ *
5325
+ *
5326
+ * @param {Name} name
5327
+ * @param {number} threshold
5328
+ * @throws {AppwriteException}
5329
+ * @returns {Promise}
5330
+ */
5331
+ getFailedJobs(name, threshold) {
5332
+ return __awaiter(this, void 0, void 0, function* () {
5333
+ if (typeof name === 'undefined') {
5334
+ throw new AppwriteException('Missing required parameter: "name"');
5335
+ }
5336
+ const apiPath = '/health/queue/failed/{name}'.replace('{name}', name);
5337
+ const payload = {};
5338
+ if (typeof threshold !== 'undefined') {
5339
+ payload['threshold'] = threshold;
5340
+ }
5341
+ const uri = new URL(this.client.config.endpoint + apiPath);
5342
+ return yield this.client.call('get', uri, {
5343
+ 'content-type': 'application/json',
5344
+ }, payload);
5345
+ });
5346
+ }
5114
5347
  /**
5115
5348
  * Get functions queue
5116
5349
  *
5350
+ * Get the number of function executions that are waiting to be processed in
5351
+ * the Appwrite internal queue server.
5117
5352
  *
5118
5353
  * @param {number} threshold
5119
5354
  * @throws {AppwriteException}
@@ -5121,7 +5356,76 @@ class Health extends Service {
5121
5356
  */
5122
5357
  getQueueFunctions(threshold) {
5123
5358
  return __awaiter(this, void 0, void 0, function* () {
5124
- const apiPath = '/health/queue/functions';
5359
+ const apiPath = '/health/queue/functions';
5360
+ const payload = {};
5361
+ if (typeof threshold !== 'undefined') {
5362
+ payload['threshold'] = threshold;
5363
+ }
5364
+ const uri = new URL(this.client.config.endpoint + apiPath);
5365
+ return yield this.client.call('get', uri, {
5366
+ 'content-type': 'application/json',
5367
+ }, payload);
5368
+ });
5369
+ }
5370
+ /**
5371
+ * Get logs queue
5372
+ *
5373
+ * Get the number of logs that are waiting to be processed in the Appwrite
5374
+ * internal queue server.
5375
+ *
5376
+ * @param {number} threshold
5377
+ * @throws {AppwriteException}
5378
+ * @returns {Promise}
5379
+ */
5380
+ getQueueLogs(threshold) {
5381
+ return __awaiter(this, void 0, void 0, function* () {
5382
+ const apiPath = '/health/queue/logs';
5383
+ const payload = {};
5384
+ if (typeof threshold !== 'undefined') {
5385
+ payload['threshold'] = threshold;
5386
+ }
5387
+ const uri = new URL(this.client.config.endpoint + apiPath);
5388
+ return yield this.client.call('get', uri, {
5389
+ 'content-type': 'application/json',
5390
+ }, payload);
5391
+ });
5392
+ }
5393
+ /**
5394
+ * Get mails queue
5395
+ *
5396
+ * Get the number of mails that are waiting to be processed in the Appwrite
5397
+ * internal queue server.
5398
+ *
5399
+ * @param {number} threshold
5400
+ * @throws {AppwriteException}
5401
+ * @returns {Promise}
5402
+ */
5403
+ getQueueMails(threshold) {
5404
+ return __awaiter(this, void 0, void 0, function* () {
5405
+ const apiPath = '/health/queue/mails';
5406
+ const payload = {};
5407
+ if (typeof threshold !== 'undefined') {
5408
+ payload['threshold'] = threshold;
5409
+ }
5410
+ const uri = new URL(this.client.config.endpoint + apiPath);
5411
+ return yield this.client.call('get', uri, {
5412
+ 'content-type': 'application/json',
5413
+ }, payload);
5414
+ });
5415
+ }
5416
+ /**
5417
+ * Get messaging queue
5418
+ *
5419
+ * Get the number of messages that are waiting to be processed in the Appwrite
5420
+ * internal queue server.
5421
+ *
5422
+ * @param {number} threshold
5423
+ * @throws {AppwriteException}
5424
+ * @returns {Promise}
5425
+ */
5426
+ getQueueMessaging(threshold) {
5427
+ return __awaiter(this, void 0, void 0, function* () {
5428
+ const apiPath = '/health/queue/messaging';
5125
5429
  const payload = {};
5126
5430
  if (typeof threshold !== 'undefined') {
5127
5431
  payload['threshold'] = threshold;
@@ -5133,18 +5437,18 @@ class Health extends Service {
5133
5437
  });
5134
5438
  }
5135
5439
  /**
5136
- * Get logs queue
5440
+ * Get migrations queue
5137
5441
  *
5138
- * Get the number of logs that are waiting to be processed in the Appwrite
5139
- * internal queue server.
5442
+ * Get the number of migrations that are waiting to be processed in the
5443
+ * Appwrite internal queue server.
5140
5444
  *
5141
5445
  * @param {number} threshold
5142
5446
  * @throws {AppwriteException}
5143
5447
  * @returns {Promise}
5144
5448
  */
5145
- getQueueLogs(threshold) {
5449
+ getQueueMigrations(threshold) {
5146
5450
  return __awaiter(this, void 0, void 0, function* () {
5147
- const apiPath = '/health/queue/logs';
5451
+ const apiPath = '/health/queue/migrations';
5148
5452
  const payload = {};
5149
5453
  if (typeof threshold !== 'undefined') {
5150
5454
  payload['threshold'] = threshold;
@@ -5156,18 +5460,18 @@ class Health extends Service {
5156
5460
  });
5157
5461
  }
5158
5462
  /**
5159
- * Get mails queue
5463
+ * Get usage queue
5160
5464
  *
5161
- * Get the number of mails that are waiting to be processed in the Appwrite
5465
+ * Get the number of metrics that are waiting to be processed in the Appwrite
5162
5466
  * internal queue server.
5163
5467
  *
5164
5468
  * @param {number} threshold
5165
5469
  * @throws {AppwriteException}
5166
5470
  * @returns {Promise}
5167
5471
  */
5168
- getQueueMails(threshold) {
5472
+ getQueueUsage(threshold) {
5169
5473
  return __awaiter(this, void 0, void 0, function* () {
5170
- const apiPath = '/health/queue/mails';
5474
+ const apiPath = '/health/queue/usage';
5171
5475
  const payload = {};
5172
5476
  if (typeof threshold !== 'undefined') {
5173
5477
  payload['threshold'] = threshold;
@@ -5179,18 +5483,18 @@ class Health extends Service {
5179
5483
  });
5180
5484
  }
5181
5485
  /**
5182
- * Get messaging queue
5486
+ * Get usage dump queue
5183
5487
  *
5184
- * Get the number of messages that are waiting to be processed in the Appwrite
5185
- * internal queue server.
5488
+ * Get the number of projects containing metrics that are waiting to be
5489
+ * processed in the Appwrite internal queue server.
5186
5490
  *
5187
5491
  * @param {number} threshold
5188
5492
  * @throws {AppwriteException}
5189
5493
  * @returns {Promise}
5190
5494
  */
5191
- getQueueMessaging(threshold) {
5495
+ getQueueUsageDump(threshold) {
5192
5496
  return __awaiter(this, void 0, void 0, function* () {
5193
- const apiPath = '/health/queue/messaging';
5497
+ const apiPath = '/health/queue/usage-dump';
5194
5498
  const payload = {};
5195
5499
  if (typeof threshold !== 'undefined') {
5196
5500
  payload['threshold'] = threshold;
@@ -5202,18 +5506,18 @@ class Health extends Service {
5202
5506
  });
5203
5507
  }
5204
5508
  /**
5205
- * Get migrations queue
5509
+ * Get webhooks queue
5206
5510
  *
5207
- * Get the number of migrations that are waiting to be processed in the
5208
- * Appwrite internal queue server.
5511
+ * Get the number of webhooks that are waiting to be processed in the Appwrite
5512
+ * internal queue server.
5209
5513
  *
5210
5514
  * @param {number} threshold
5211
5515
  * @throws {AppwriteException}
5212
5516
  * @returns {Promise}
5213
5517
  */
5214
- getQueueMigrations(threshold) {
5518
+ getQueueWebhooks(threshold) {
5215
5519
  return __awaiter(this, void 0, void 0, function* () {
5216
- const apiPath = '/health/queue/migrations';
5520
+ const apiPath = '/health/queue/webhooks';
5217
5521
  const payload = {};
5218
5522
  if (typeof threshold !== 'undefined') {
5219
5523
  payload['threshold'] = threshold;
@@ -5225,22 +5529,17 @@ class Health extends Service {
5225
5529
  });
5226
5530
  }
5227
5531
  /**
5228
- * Get webhooks queue
5532
+ * Get storage
5229
5533
  *
5230
- * Get the number of webhooks that are waiting to be processed in the Appwrite
5231
- * internal queue server.
5534
+ * Check the Appwrite storage device is up and connection is successful.
5232
5535
  *
5233
- * @param {number} threshold
5234
5536
  * @throws {AppwriteException}
5235
5537
  * @returns {Promise}
5236
5538
  */
5237
- getQueueWebhooks(threshold) {
5539
+ getStorage() {
5238
5540
  return __awaiter(this, void 0, void 0, function* () {
5239
- const apiPath = '/health/queue/webhooks';
5541
+ const apiPath = '/health/storage';
5240
5542
  const payload = {};
5241
- if (typeof threshold !== 'undefined') {
5242
- payload['threshold'] = threshold;
5243
- }
5244
5543
  const uri = new URL(this.client.config.endpoint + apiPath);
5245
5544
  return yield this.client.call('get', uri, {
5246
5545
  'content-type': 'application/json',
@@ -5461,6 +5760,7 @@ class Messaging extends Service {
5461
5760
  /**
5462
5761
  * List messages
5463
5762
  *
5763
+ * Get a list of all messages from the current Appwrite project.
5464
5764
  *
5465
5765
  * @param {string[]} queries
5466
5766
  * @param {string} search
@@ -5484,8 +5784,9 @@ class Messaging extends Service {
5484
5784
  });
5485
5785
  }
5486
5786
  /**
5487
- * Create an email.
5787
+ * Create email
5488
5788
  *
5789
+ * Create a new email message.
5489
5790
  *
5490
5791
  * @param {string} messageId
5491
5792
  * @param {string} subject
@@ -5495,13 +5796,14 @@ class Messaging extends Service {
5495
5796
  * @param {string[]} targets
5496
5797
  * @param {string[]} cc
5497
5798
  * @param {string[]} bcc
5498
- * @param {MessageType} status
5799
+ * @param {string[]} attachments
5800
+ * @param {boolean} draft
5499
5801
  * @param {boolean} html
5500
5802
  * @param {string} scheduledAt
5501
5803
  * @throws {AppwriteException}
5502
5804
  * @returns {Promise}
5503
5805
  */
5504
- createEmail(messageId, subject, content, topics, users, targets, cc, bcc, status, html, scheduledAt) {
5806
+ createEmail(messageId, subject, content, topics, users, targets, cc, bcc, attachments, draft, html, scheduledAt) {
5505
5807
  return __awaiter(this, void 0, void 0, function* () {
5506
5808
  if (typeof messageId === 'undefined') {
5507
5809
  throw new AppwriteException('Missing required parameter: "messageId"');
@@ -5538,8 +5840,11 @@ class Messaging extends Service {
5538
5840
  if (typeof bcc !== 'undefined') {
5539
5841
  payload['bcc'] = bcc;
5540
5842
  }
5541
- if (typeof status !== 'undefined') {
5542
- payload['status'] = status;
5843
+ if (typeof attachments !== 'undefined') {
5844
+ payload['attachments'] = attachments;
5845
+ }
5846
+ if (typeof draft !== 'undefined') {
5847
+ payload['draft'] = draft;
5543
5848
  }
5544
5849
  if (typeof html !== 'undefined') {
5545
5850
  payload['html'] = html;
@@ -5554,7 +5859,9 @@ class Messaging extends Service {
5554
5859
  });
5555
5860
  }
5556
5861
  /**
5557
- * Update an email.
5862
+ * Update email
5863
+ *
5864
+ * Update an email message by its unique ID.
5558
5865
  *
5559
5866
  *
5560
5867
  * @param {string} messageId
@@ -5563,7 +5870,7 @@ class Messaging extends Service {
5563
5870
  * @param {string[]} targets
5564
5871
  * @param {string} subject
5565
5872
  * @param {string} content
5566
- * @param {MessageType} status
5873
+ * @param {boolean} draft
5567
5874
  * @param {boolean} html
5568
5875
  * @param {string[]} cc
5569
5876
  * @param {string[]} bcc
@@ -5571,7 +5878,7 @@ class Messaging extends Service {
5571
5878
  * @throws {AppwriteException}
5572
5879
  * @returns {Promise}
5573
5880
  */
5574
- updateEmail(messageId, topics, users, targets, subject, content, status, html, cc, bcc, scheduledAt) {
5881
+ updateEmail(messageId, topics, users, targets, subject, content, draft, html, cc, bcc, scheduledAt) {
5575
5882
  return __awaiter(this, void 0, void 0, function* () {
5576
5883
  if (typeof messageId === 'undefined') {
5577
5884
  throw new AppwriteException('Missing required parameter: "messageId"');
@@ -5593,8 +5900,8 @@ class Messaging extends Service {
5593
5900
  if (typeof content !== 'undefined') {
5594
5901
  payload['content'] = content;
5595
5902
  }
5596
- if (typeof status !== 'undefined') {
5597
- payload['status'] = status;
5903
+ if (typeof draft !== 'undefined') {
5904
+ payload['draft'] = draft;
5598
5905
  }
5599
5906
  if (typeof html !== 'undefined') {
5600
5907
  payload['html'] = html;
@@ -5615,8 +5922,9 @@ class Messaging extends Service {
5615
5922
  });
5616
5923
  }
5617
5924
  /**
5618
- * Create a push notification.
5925
+ * Create push notification
5619
5926
  *
5927
+ * Create a new push notification.
5620
5928
  *
5621
5929
  * @param {string} messageId
5622
5930
  * @param {string} title
@@ -5626,17 +5934,18 @@ class Messaging extends Service {
5626
5934
  * @param {string[]} targets
5627
5935
  * @param {object} data
5628
5936
  * @param {string} action
5937
+ * @param {string} image
5629
5938
  * @param {string} icon
5630
5939
  * @param {string} sound
5631
5940
  * @param {string} color
5632
5941
  * @param {string} tag
5633
5942
  * @param {string} badge
5634
- * @param {MessageType} status
5943
+ * @param {boolean} draft
5635
5944
  * @param {string} scheduledAt
5636
5945
  * @throws {AppwriteException}
5637
5946
  * @returns {Promise}
5638
5947
  */
5639
- createPush(messageId, title, body, topics, users, targets, data, action, icon, sound, color, tag, badge, status, scheduledAt) {
5948
+ createPush(messageId, title, body, topics, users, targets, data, action, image, icon, sound, color, tag, badge, draft, scheduledAt) {
5640
5949
  return __awaiter(this, void 0, void 0, function* () {
5641
5950
  if (typeof messageId === 'undefined') {
5642
5951
  throw new AppwriteException('Missing required parameter: "messageId"');
@@ -5673,6 +5982,9 @@ class Messaging extends Service {
5673
5982
  if (typeof action !== 'undefined') {
5674
5983
  payload['action'] = action;
5675
5984
  }
5985
+ if (typeof image !== 'undefined') {
5986
+ payload['image'] = image;
5987
+ }
5676
5988
  if (typeof icon !== 'undefined') {
5677
5989
  payload['icon'] = icon;
5678
5990
  }
@@ -5688,8 +6000,8 @@ class Messaging extends Service {
5688
6000
  if (typeof badge !== 'undefined') {
5689
6001
  payload['badge'] = badge;
5690
6002
  }
5691
- if (typeof status !== 'undefined') {
5692
- payload['status'] = status;
6003
+ if (typeof draft !== 'undefined') {
6004
+ payload['draft'] = draft;
5693
6005
  }
5694
6006
  if (typeof scheduledAt !== 'undefined') {
5695
6007
  payload['scheduledAt'] = scheduledAt;
@@ -5701,7 +6013,9 @@ class Messaging extends Service {
5701
6013
  });
5702
6014
  }
5703
6015
  /**
5704
- * Update a push notification.
6016
+ * Update push notification
6017
+ *
6018
+ * Update a push notification by its unique ID.
5705
6019
  *
5706
6020
  *
5707
6021
  * @param {string} messageId
@@ -5712,17 +6026,18 @@ class Messaging extends Service {
5712
6026
  * @param {string} body
5713
6027
  * @param {object} data
5714
6028
  * @param {string} action
6029
+ * @param {string} image
5715
6030
  * @param {string} icon
5716
6031
  * @param {string} sound
5717
6032
  * @param {string} color
5718
6033
  * @param {string} tag
5719
6034
  * @param {number} badge
5720
- * @param {MessageType} status
6035
+ * @param {boolean} draft
5721
6036
  * @param {string} scheduledAt
5722
6037
  * @throws {AppwriteException}
5723
6038
  * @returns {Promise}
5724
6039
  */
5725
- updatePush(messageId, topics, users, targets, title, body, data, action, icon, sound, color, tag, badge, status, scheduledAt) {
6040
+ updatePush(messageId, topics, users, targets, title, body, data, action, image, icon, sound, color, tag, badge, draft, scheduledAt) {
5726
6041
  return __awaiter(this, void 0, void 0, function* () {
5727
6042
  if (typeof messageId === 'undefined') {
5728
6043
  throw new AppwriteException('Missing required parameter: "messageId"');
@@ -5750,6 +6065,9 @@ class Messaging extends Service {
5750
6065
  if (typeof action !== 'undefined') {
5751
6066
  payload['action'] = action;
5752
6067
  }
6068
+ if (typeof image !== 'undefined') {
6069
+ payload['image'] = image;
6070
+ }
5753
6071
  if (typeof icon !== 'undefined') {
5754
6072
  payload['icon'] = icon;
5755
6073
  }
@@ -5765,8 +6083,8 @@ class Messaging extends Service {
5765
6083
  if (typeof badge !== 'undefined') {
5766
6084
  payload['badge'] = badge;
5767
6085
  }
5768
- if (typeof status !== 'undefined') {
5769
- payload['status'] = status;
6086
+ if (typeof draft !== 'undefined') {
6087
+ payload['draft'] = draft;
5770
6088
  }
5771
6089
  if (typeof scheduledAt !== 'undefined') {
5772
6090
  payload['scheduledAt'] = scheduledAt;
@@ -5778,20 +6096,21 @@ class Messaging extends Service {
5778
6096
  });
5779
6097
  }
5780
6098
  /**
5781
- * Create an SMS.
6099
+ * Create SMS
5782
6100
  *
6101
+ * Create a new SMS message.
5783
6102
  *
5784
6103
  * @param {string} messageId
5785
6104
  * @param {string} content
5786
6105
  * @param {string[]} topics
5787
6106
  * @param {string[]} users
5788
6107
  * @param {string[]} targets
5789
- * @param {MessageType} status
6108
+ * @param {boolean} draft
5790
6109
  * @param {string} scheduledAt
5791
6110
  * @throws {AppwriteException}
5792
6111
  * @returns {Promise}
5793
6112
  */
5794
- createSMS(messageId, content, topics, users, targets, status, scheduledAt) {
6113
+ createSms(messageId, content, topics, users, targets, draft, scheduledAt) {
5795
6114
  return __awaiter(this, void 0, void 0, function* () {
5796
6115
  if (typeof messageId === 'undefined') {
5797
6116
  throw new AppwriteException('Missing required parameter: "messageId"');
@@ -5816,8 +6135,8 @@ class Messaging extends Service {
5816
6135
  if (typeof targets !== 'undefined') {
5817
6136
  payload['targets'] = targets;
5818
6137
  }
5819
- if (typeof status !== 'undefined') {
5820
- payload['status'] = status;
6138
+ if (typeof draft !== 'undefined') {
6139
+ payload['draft'] = draft;
5821
6140
  }
5822
6141
  if (typeof scheduledAt !== 'undefined') {
5823
6142
  payload['scheduledAt'] = scheduledAt;
@@ -5829,7 +6148,9 @@ class Messaging extends Service {
5829
6148
  });
5830
6149
  }
5831
6150
  /**
5832
- * Update an SMS.
6151
+ * Update SMS
6152
+ *
6153
+ * Update an email message by its unique ID.
5833
6154
  *
5834
6155
  *
5835
6156
  * @param {string} messageId
@@ -5837,12 +6158,12 @@ class Messaging extends Service {
5837
6158
  * @param {string[]} users
5838
6159
  * @param {string[]} targets
5839
6160
  * @param {string} content
5840
- * @param {MessageType} status
6161
+ * @param {boolean} draft
5841
6162
  * @param {string} scheduledAt
5842
6163
  * @throws {AppwriteException}
5843
6164
  * @returns {Promise}
5844
6165
  */
5845
- updateSMS(messageId, topics, users, targets, content, status, scheduledAt) {
6166
+ updateSms(messageId, topics, users, targets, content, draft, scheduledAt) {
5846
6167
  return __awaiter(this, void 0, void 0, function* () {
5847
6168
  if (typeof messageId === 'undefined') {
5848
6169
  throw new AppwriteException('Missing required parameter: "messageId"');
@@ -5861,8 +6182,8 @@ class Messaging extends Service {
5861
6182
  if (typeof content !== 'undefined') {
5862
6183
  payload['content'] = content;
5863
6184
  }
5864
- if (typeof status !== 'undefined') {
5865
- payload['status'] = status;
6185
+ if (typeof draft !== 'undefined') {
6186
+ payload['draft'] = draft;
5866
6187
  }
5867
6188
  if (typeof scheduledAt !== 'undefined') {
5868
6189
  payload['scheduledAt'] = scheduledAt;
@@ -5874,7 +6195,9 @@ class Messaging extends Service {
5874
6195
  });
5875
6196
  }
5876
6197
  /**
5877
- * Get a message
6198
+ * Get message
6199
+ *
6200
+ * Get a message by its unique ID.
5878
6201
  *
5879
6202
  *
5880
6203
  * @param {string} messageId
@@ -5895,8 +6218,10 @@ class Messaging extends Service {
5895
6218
  });
5896
6219
  }
5897
6220
  /**
5898
- * Delete a message
6221
+ * Delete message
5899
6222
  *
6223
+ * Delete a message. If the message is not a draft or scheduled, but has been
6224
+ * sent, this will not recall the message.
5900
6225
  *
5901
6226
  * @param {string} messageId
5902
6227
  * @throws {AppwriteException}
@@ -5918,6 +6243,7 @@ class Messaging extends Service {
5918
6243
  /**
5919
6244
  * List message logs
5920
6245
  *
6246
+ * Get the message activity logs listed by its unique ID.
5921
6247
  *
5922
6248
  * @param {string} messageId
5923
6249
  * @param {string[]} queries
@@ -5943,8 +6269,7 @@ class Messaging extends Service {
5943
6269
  /**
5944
6270
  * List message targets
5945
6271
  *
5946
- * List the targets associated with a message as set via the targets
5947
- * attribute.
6272
+ * Get a list of the targets associated with a message.
5948
6273
  *
5949
6274
  * @param {string} messageId
5950
6275
  * @param {string[]} queries
@@ -5970,6 +6295,7 @@ class Messaging extends Service {
5970
6295
  /**
5971
6296
  * List providers
5972
6297
  *
6298
+ * Get a list of all providers from the current Appwrite project.
5973
6299
  *
5974
6300
  * @param {string[]} queries
5975
6301
  * @param {string} search
@@ -5995,6 +6321,7 @@ class Messaging extends Service {
5995
6321
  /**
5996
6322
  * Create APNS provider
5997
6323
  *
6324
+ * Create a new Apple Push Notification service provider.
5998
6325
  *
5999
6326
  * @param {string} providerId
6000
6327
  * @param {string} name
@@ -6002,11 +6329,12 @@ class Messaging extends Service {
6002
6329
  * @param {string} authKeyId
6003
6330
  * @param {string} teamId
6004
6331
  * @param {string} bundleId
6332
+ * @param {boolean} sandbox
6005
6333
  * @param {boolean} enabled
6006
6334
  * @throws {AppwriteException}
6007
6335
  * @returns {Promise}
6008
6336
  */
6009
- createAPNSProvider(providerId, name, authKey, authKeyId, teamId, bundleId, enabled) {
6337
+ createApnsProvider(providerId, name, authKey, authKeyId, teamId, bundleId, sandbox, enabled) {
6010
6338
  return __awaiter(this, void 0, void 0, function* () {
6011
6339
  if (typeof providerId === 'undefined') {
6012
6340
  throw new AppwriteException('Missing required parameter: "providerId"');
@@ -6034,6 +6362,9 @@ class Messaging extends Service {
6034
6362
  if (typeof bundleId !== 'undefined') {
6035
6363
  payload['bundleId'] = bundleId;
6036
6364
  }
6365
+ if (typeof sandbox !== 'undefined') {
6366
+ payload['sandbox'] = sandbox;
6367
+ }
6037
6368
  if (typeof enabled !== 'undefined') {
6038
6369
  payload['enabled'] = enabled;
6039
6370
  }
@@ -6046,6 +6377,7 @@ class Messaging extends Service {
6046
6377
  /**
6047
6378
  * Update APNS provider
6048
6379
  *
6380
+ * Update a Apple Push Notification service provider by its unique ID.
6049
6381
  *
6050
6382
  * @param {string} providerId
6051
6383
  * @param {string} name
@@ -6054,10 +6386,11 @@ class Messaging extends Service {
6054
6386
  * @param {string} authKeyId
6055
6387
  * @param {string} teamId
6056
6388
  * @param {string} bundleId
6389
+ * @param {boolean} sandbox
6057
6390
  * @throws {AppwriteException}
6058
6391
  * @returns {Promise}
6059
6392
  */
6060
- updateAPNSProvider(providerId, name, enabled, authKey, authKeyId, teamId, bundleId) {
6393
+ updateApnsProvider(providerId, name, enabled, authKey, authKeyId, teamId, bundleId, sandbox) {
6061
6394
  return __awaiter(this, void 0, void 0, function* () {
6062
6395
  if (typeof providerId === 'undefined') {
6063
6396
  throw new AppwriteException('Missing required parameter: "providerId"');
@@ -6082,6 +6415,9 @@ class Messaging extends Service {
6082
6415
  if (typeof bundleId !== 'undefined') {
6083
6416
  payload['bundleId'] = bundleId;
6084
6417
  }
6418
+ if (typeof sandbox !== 'undefined') {
6419
+ payload['sandbox'] = sandbox;
6420
+ }
6085
6421
  const uri = new URL(this.client.config.endpoint + apiPath);
6086
6422
  return yield this.client.call('patch', uri, {
6087
6423
  'content-type': 'application/json',
@@ -6091,6 +6427,7 @@ class Messaging extends Service {
6091
6427
  /**
6092
6428
  * Create FCM provider
6093
6429
  *
6430
+ * Create a new Firebase Cloud Messaging provider.
6094
6431
  *
6095
6432
  * @param {string} providerId
6096
6433
  * @param {string} name
@@ -6099,7 +6436,7 @@ class Messaging extends Service {
6099
6436
  * @throws {AppwriteException}
6100
6437
  * @returns {Promise}
6101
6438
  */
6102
- createFCMProvider(providerId, name, serviceAccountJSON, enabled) {
6439
+ createFcmProvider(providerId, name, serviceAccountJSON, enabled) {
6103
6440
  return __awaiter(this, void 0, void 0, function* () {
6104
6441
  if (typeof providerId === 'undefined') {
6105
6442
  throw new AppwriteException('Missing required parameter: "providerId"');
@@ -6130,6 +6467,7 @@ class Messaging extends Service {
6130
6467
  /**
6131
6468
  * Update FCM provider
6132
6469
  *
6470
+ * Update a Firebase Cloud Messaging provider by its unique ID.
6133
6471
  *
6134
6472
  * @param {string} providerId
6135
6473
  * @param {string} name
@@ -6138,7 +6476,7 @@ class Messaging extends Service {
6138
6476
  * @throws {AppwriteException}
6139
6477
  * @returns {Promise}
6140
6478
  */
6141
- updateFCMProvider(providerId, name, enabled, serviceAccountJSON) {
6479
+ updateFcmProvider(providerId, name, enabled, serviceAccountJSON) {
6142
6480
  return __awaiter(this, void 0, void 0, function* () {
6143
6481
  if (typeof providerId === 'undefined') {
6144
6482
  throw new AppwriteException('Missing required parameter: "providerId"');
@@ -6163,6 +6501,7 @@ class Messaging extends Service {
6163
6501
  /**
6164
6502
  * Create Mailgun provider
6165
6503
  *
6504
+ * Create a new Mailgun provider.
6166
6505
  *
6167
6506
  * @param {string} providerId
6168
6507
  * @param {string} name
@@ -6226,6 +6565,7 @@ class Messaging extends Service {
6226
6565
  /**
6227
6566
  * Update Mailgun provider
6228
6567
  *
6568
+ * Update a Mailgun provider by its unique ID.
6229
6569
  *
6230
6570
  * @param {string} providerId
6231
6571
  * @param {string} name
@@ -6283,17 +6623,18 @@ class Messaging extends Service {
6283
6623
  /**
6284
6624
  * Create Msg91 provider
6285
6625
  *
6626
+ * Create a new MSG91 provider.
6286
6627
  *
6287
6628
  * @param {string} providerId
6288
6629
  * @param {string} name
6289
- * @param {string} from
6630
+ * @param {string} templateId
6290
6631
  * @param {string} senderId
6291
6632
  * @param {string} authKey
6292
6633
  * @param {boolean} enabled
6293
6634
  * @throws {AppwriteException}
6294
6635
  * @returns {Promise}
6295
6636
  */
6296
- createMsg91Provider(providerId, name, from, senderId, authKey, enabled) {
6637
+ createMsg91Provider(providerId, name, templateId, senderId, authKey, enabled) {
6297
6638
  return __awaiter(this, void 0, void 0, function* () {
6298
6639
  if (typeof providerId === 'undefined') {
6299
6640
  throw new AppwriteException('Missing required parameter: "providerId"');
@@ -6309,8 +6650,8 @@ class Messaging extends Service {
6309
6650
  if (typeof name !== 'undefined') {
6310
6651
  payload['name'] = name;
6311
6652
  }
6312
- if (typeof from !== 'undefined') {
6313
- payload['from'] = from;
6653
+ if (typeof templateId !== 'undefined') {
6654
+ payload['templateId'] = templateId;
6314
6655
  }
6315
6656
  if (typeof senderId !== 'undefined') {
6316
6657
  payload['senderId'] = senderId;
@@ -6330,17 +6671,18 @@ class Messaging extends Service {
6330
6671
  /**
6331
6672
  * Update Msg91 provider
6332
6673
  *
6674
+ * Update a MSG91 provider by its unique ID.
6333
6675
  *
6334
6676
  * @param {string} providerId
6335
6677
  * @param {string} name
6336
6678
  * @param {boolean} enabled
6679
+ * @param {string} templateId
6337
6680
  * @param {string} senderId
6338
6681
  * @param {string} authKey
6339
- * @param {string} from
6340
6682
  * @throws {AppwriteException}
6341
6683
  * @returns {Promise}
6342
6684
  */
6343
- updateMsg91Provider(providerId, name, enabled, senderId, authKey, from) {
6685
+ updateMsg91Provider(providerId, name, enabled, templateId, senderId, authKey) {
6344
6686
  return __awaiter(this, void 0, void 0, function* () {
6345
6687
  if (typeof providerId === 'undefined') {
6346
6688
  throw new AppwriteException('Missing required parameter: "providerId"');
@@ -6353,15 +6695,15 @@ class Messaging extends Service {
6353
6695
  if (typeof enabled !== 'undefined') {
6354
6696
  payload['enabled'] = enabled;
6355
6697
  }
6698
+ if (typeof templateId !== 'undefined') {
6699
+ payload['templateId'] = templateId;
6700
+ }
6356
6701
  if (typeof senderId !== 'undefined') {
6357
6702
  payload['senderId'] = senderId;
6358
6703
  }
6359
6704
  if (typeof authKey !== 'undefined') {
6360
6705
  payload['authKey'] = authKey;
6361
6706
  }
6362
- if (typeof from !== 'undefined') {
6363
- payload['from'] = from;
6364
- }
6365
6707
  const uri = new URL(this.client.config.endpoint + apiPath);
6366
6708
  return yield this.client.call('patch', uri, {
6367
6709
  'content-type': 'application/json',
@@ -6371,6 +6713,7 @@ class Messaging extends Service {
6371
6713
  /**
6372
6714
  * Create Sendgrid provider
6373
6715
  *
6716
+ * Create a new Sendgrid provider.
6374
6717
  *
6375
6718
  * @param {string} providerId
6376
6719
  * @param {string} name
@@ -6426,6 +6769,7 @@ class Messaging extends Service {
6426
6769
  /**
6427
6770
  * Update Sendgrid provider
6428
6771
  *
6772
+ * Update a Sendgrid provider by its unique ID.
6429
6773
  *
6430
6774
  * @param {string} providerId
6431
6775
  * @param {string} name
@@ -6475,6 +6819,7 @@ class Messaging extends Service {
6475
6819
  /**
6476
6820
  * Create SMTP provider
6477
6821
  *
6822
+ * Create a new SMTP provider.
6478
6823
  *
6479
6824
  * @param {string} providerId
6480
6825
  * @param {string} name
@@ -6482,7 +6827,7 @@ class Messaging extends Service {
6482
6827
  * @param {number} port
6483
6828
  * @param {string} username
6484
6829
  * @param {string} password
6485
- * @param {SMTPEncryption} encryption
6830
+ * @param {SmtpEncryption} encryption
6486
6831
  * @param {boolean} autoTLS
6487
6832
  * @param {string} mailer
6488
6833
  * @param {string} fromName
@@ -6493,7 +6838,7 @@ class Messaging extends Service {
6493
6838
  * @throws {AppwriteException}
6494
6839
  * @returns {Promise}
6495
6840
  */
6496
- createSMTPProvider(providerId, name, host, port, username, password, encryption, autoTLS, mailer, fromName, fromEmail, replyToName, replyToEmail, enabled) {
6841
+ createSmtpProvider(providerId, name, host, port, username, password, encryption, autoTLS, mailer, fromName, fromEmail, replyToName, replyToEmail, enabled) {
6497
6842
  return __awaiter(this, void 0, void 0, function* () {
6498
6843
  if (typeof providerId === 'undefined') {
6499
6844
  throw new AppwriteException('Missing required parameter: "providerId"');
@@ -6557,6 +6902,7 @@ class Messaging extends Service {
6557
6902
  /**
6558
6903
  * Update SMTP provider
6559
6904
  *
6905
+ * Update a SMTP provider by its unique ID.
6560
6906
  *
6561
6907
  * @param {string} providerId
6562
6908
  * @param {string} name
@@ -6564,8 +6910,9 @@ class Messaging extends Service {
6564
6910
  * @param {number} port
6565
6911
  * @param {string} username
6566
6912
  * @param {string} password
6567
- * @param {SMTPEncryption} encryption
6913
+ * @param {SmtpEncryption} encryption
6568
6914
  * @param {boolean} autoTLS
6915
+ * @param {string} mailer
6569
6916
  * @param {string} fromName
6570
6917
  * @param {string} fromEmail
6571
6918
  * @param {string} replyToName
@@ -6574,7 +6921,7 @@ class Messaging extends Service {
6574
6921
  * @throws {AppwriteException}
6575
6922
  * @returns {Promise}
6576
6923
  */
6577
- updateSMTPProvider(providerId, name, host, port, username, password, encryption, autoTLS, fromName, fromEmail, replyToName, replyToEmail, enabled) {
6924
+ updateSmtpProvider(providerId, name, host, port, username, password, encryption, autoTLS, mailer, fromName, fromEmail, replyToName, replyToEmail, enabled) {
6578
6925
  return __awaiter(this, void 0, void 0, function* () {
6579
6926
  if (typeof providerId === 'undefined') {
6580
6927
  throw new AppwriteException('Missing required parameter: "providerId"');
@@ -6602,6 +6949,9 @@ class Messaging extends Service {
6602
6949
  if (typeof autoTLS !== 'undefined') {
6603
6950
  payload['autoTLS'] = autoTLS;
6604
6951
  }
6952
+ if (typeof mailer !== 'undefined') {
6953
+ payload['mailer'] = mailer;
6954
+ }
6605
6955
  if (typeof fromName !== 'undefined') {
6606
6956
  payload['fromName'] = fromName;
6607
6957
  }
@@ -6626,17 +6976,18 @@ class Messaging extends Service {
6626
6976
  /**
6627
6977
  * Create Telesign provider
6628
6978
  *
6979
+ * Create a new Telesign provider.
6629
6980
  *
6630
6981
  * @param {string} providerId
6631
6982
  * @param {string} name
6632
6983
  * @param {string} from
6633
- * @param {string} username
6634
- * @param {string} password
6984
+ * @param {string} customerId
6985
+ * @param {string} apiKey
6635
6986
  * @param {boolean} enabled
6636
6987
  * @throws {AppwriteException}
6637
6988
  * @returns {Promise}
6638
6989
  */
6639
- createTelesignProvider(providerId, name, from, username, password, enabled) {
6990
+ createTelesignProvider(providerId, name, from, customerId, apiKey, enabled) {
6640
6991
  return __awaiter(this, void 0, void 0, function* () {
6641
6992
  if (typeof providerId === 'undefined') {
6642
6993
  throw new AppwriteException('Missing required parameter: "providerId"');
@@ -6655,11 +7006,11 @@ class Messaging extends Service {
6655
7006
  if (typeof from !== 'undefined') {
6656
7007
  payload['from'] = from;
6657
7008
  }
6658
- if (typeof username !== 'undefined') {
6659
- payload['username'] = username;
7009
+ if (typeof customerId !== 'undefined') {
7010
+ payload['customerId'] = customerId;
6660
7011
  }
6661
- if (typeof password !== 'undefined') {
6662
- payload['password'] = password;
7012
+ if (typeof apiKey !== 'undefined') {
7013
+ payload['apiKey'] = apiKey;
6663
7014
  }
6664
7015
  if (typeof enabled !== 'undefined') {
6665
7016
  payload['enabled'] = enabled;
@@ -6673,17 +7024,18 @@ class Messaging extends Service {
6673
7024
  /**
6674
7025
  * Update Telesign provider
6675
7026
  *
7027
+ * Update a Telesign provider by its unique ID.
6676
7028
  *
6677
7029
  * @param {string} providerId
6678
7030
  * @param {string} name
6679
7031
  * @param {boolean} enabled
6680
- * @param {string} username
6681
- * @param {string} password
7032
+ * @param {string} customerId
7033
+ * @param {string} apiKey
6682
7034
  * @param {string} from
6683
7035
  * @throws {AppwriteException}
6684
7036
  * @returns {Promise}
6685
7037
  */
6686
- updateTelesignProvider(providerId, name, enabled, username, password, from) {
7038
+ updateTelesignProvider(providerId, name, enabled, customerId, apiKey, from) {
6687
7039
  return __awaiter(this, void 0, void 0, function* () {
6688
7040
  if (typeof providerId === 'undefined') {
6689
7041
  throw new AppwriteException('Missing required parameter: "providerId"');
@@ -6696,11 +7048,11 @@ class Messaging extends Service {
6696
7048
  if (typeof enabled !== 'undefined') {
6697
7049
  payload['enabled'] = enabled;
6698
7050
  }
6699
- if (typeof username !== 'undefined') {
6700
- payload['username'] = username;
7051
+ if (typeof customerId !== 'undefined') {
7052
+ payload['customerId'] = customerId;
6701
7053
  }
6702
- if (typeof password !== 'undefined') {
6703
- payload['password'] = password;
7054
+ if (typeof apiKey !== 'undefined') {
7055
+ payload['apiKey'] = apiKey;
6704
7056
  }
6705
7057
  if (typeof from !== 'undefined') {
6706
7058
  payload['from'] = from;
@@ -6714,6 +7066,7 @@ class Messaging extends Service {
6714
7066
  /**
6715
7067
  * Create Textmagic provider
6716
7068
  *
7069
+ * Create a new Textmagic provider.
6717
7070
  *
6718
7071
  * @param {string} providerId
6719
7072
  * @param {string} name
@@ -6761,6 +7114,7 @@ class Messaging extends Service {
6761
7114
  /**
6762
7115
  * Update Textmagic provider
6763
7116
  *
7117
+ * Update a Textmagic provider by its unique ID.
6764
7118
  *
6765
7119
  * @param {string} providerId
6766
7120
  * @param {string} name
@@ -6802,6 +7156,7 @@ class Messaging extends Service {
6802
7156
  /**
6803
7157
  * Create Twilio provider
6804
7158
  *
7159
+ * Create a new Twilio provider.
6805
7160
  *
6806
7161
  * @param {string} providerId
6807
7162
  * @param {string} name
@@ -6849,6 +7204,7 @@ class Messaging extends Service {
6849
7204
  /**
6850
7205
  * Update Twilio provider
6851
7206
  *
7207
+ * Update a Twilio provider by its unique ID.
6852
7208
  *
6853
7209
  * @param {string} providerId
6854
7210
  * @param {string} name
@@ -6890,6 +7246,7 @@ class Messaging extends Service {
6890
7246
  /**
6891
7247
  * Create Vonage provider
6892
7248
  *
7249
+ * Create a new Vonage provider.
6893
7250
  *
6894
7251
  * @param {string} providerId
6895
7252
  * @param {string} name
@@ -6937,6 +7294,7 @@ class Messaging extends Service {
6937
7294
  /**
6938
7295
  * Update Vonage provider
6939
7296
  *
7297
+ * Update a Vonage provider by its unique ID.
6940
7298
  *
6941
7299
  * @param {string} providerId
6942
7300
  * @param {string} name
@@ -6978,6 +7336,8 @@ class Messaging extends Service {
6978
7336
  /**
6979
7337
  * Get provider
6980
7338
  *
7339
+ * Get a provider by its unique ID.
7340
+ *
6981
7341
  *
6982
7342
  * @param {string} providerId
6983
7343
  * @throws {AppwriteException}
@@ -6999,6 +7359,7 @@ class Messaging extends Service {
6999
7359
  /**
7000
7360
  * Delete provider
7001
7361
  *
7362
+ * Delete a provider by its unique ID.
7002
7363
  *
7003
7364
  * @param {string} providerId
7004
7365
  * @throws {AppwriteException}
@@ -7020,6 +7381,7 @@ class Messaging extends Service {
7020
7381
  /**
7021
7382
  * List provider logs
7022
7383
  *
7384
+ * Get the provider activity logs listed by its unique ID.
7023
7385
  *
7024
7386
  * @param {string} providerId
7025
7387
  * @param {string[]} queries
@@ -7045,6 +7407,7 @@ class Messaging extends Service {
7045
7407
  /**
7046
7408
  * List subscriber logs
7047
7409
  *
7410
+ * Get the subscriber activity logs listed by its unique ID.
7048
7411
  *
7049
7412
  * @param {string} subscriberId
7050
7413
  * @param {string[]} queries
@@ -7068,8 +7431,9 @@ class Messaging extends Service {
7068
7431
  });
7069
7432
  }
7070
7433
  /**
7071
- * List topics.
7434
+ * List topics
7072
7435
  *
7436
+ * Get a list of all topics from the current Appwrite project.
7073
7437
  *
7074
7438
  * @param {string[]} queries
7075
7439
  * @param {string} search
@@ -7093,15 +7457,17 @@ class Messaging extends Service {
7093
7457
  });
7094
7458
  }
7095
7459
  /**
7096
- * Create a topic.
7460
+ * Create topic
7097
7461
  *
7462
+ * Create a new topic.
7098
7463
  *
7099
7464
  * @param {string} topicId
7100
7465
  * @param {string} name
7466
+ * @param {string[]} subscribe
7101
7467
  * @throws {AppwriteException}
7102
7468
  * @returns {Promise}
7103
7469
  */
7104
- createTopic(topicId, name) {
7470
+ createTopic(topicId, name, subscribe) {
7105
7471
  return __awaiter(this, void 0, void 0, function* () {
7106
7472
  if (typeof topicId === 'undefined') {
7107
7473
  throw new AppwriteException('Missing required parameter: "topicId"');
@@ -7117,6 +7483,9 @@ class Messaging extends Service {
7117
7483
  if (typeof name !== 'undefined') {
7118
7484
  payload['name'] = name;
7119
7485
  }
7486
+ if (typeof subscribe !== 'undefined') {
7487
+ payload['subscribe'] = subscribe;
7488
+ }
7120
7489
  const uri = new URL(this.client.config.endpoint + apiPath);
7121
7490
  return yield this.client.call('post', uri, {
7122
7491
  'content-type': 'application/json',
@@ -7124,7 +7493,9 @@ class Messaging extends Service {
7124
7493
  });
7125
7494
  }
7126
7495
  /**
7127
- * Get a topic.
7496
+ * Get topic
7497
+ *
7498
+ * Get a topic by its unique ID.
7128
7499
  *
7129
7500
  *
7130
7501
  * @param {string} topicId
@@ -7145,15 +7516,18 @@ class Messaging extends Service {
7145
7516
  });
7146
7517
  }
7147
7518
  /**
7148
- * Update a topic.
7519
+ * Update topic
7520
+ *
7521
+ * Update a topic by its unique ID.
7149
7522
  *
7150
7523
  *
7151
7524
  * @param {string} topicId
7152
7525
  * @param {string} name
7526
+ * @param {string[]} subscribe
7153
7527
  * @throws {AppwriteException}
7154
7528
  * @returns {Promise}
7155
7529
  */
7156
- updateTopic(topicId, name) {
7530
+ updateTopic(topicId, name, subscribe) {
7157
7531
  return __awaiter(this, void 0, void 0, function* () {
7158
7532
  if (typeof topicId === 'undefined') {
7159
7533
  throw new AppwriteException('Missing required parameter: "topicId"');
@@ -7163,6 +7537,9 @@ class Messaging extends Service {
7163
7537
  if (typeof name !== 'undefined') {
7164
7538
  payload['name'] = name;
7165
7539
  }
7540
+ if (typeof subscribe !== 'undefined') {
7541
+ payload['subscribe'] = subscribe;
7542
+ }
7166
7543
  const uri = new URL(this.client.config.endpoint + apiPath);
7167
7544
  return yield this.client.call('patch', uri, {
7168
7545
  'content-type': 'application/json',
@@ -7170,8 +7547,9 @@ class Messaging extends Service {
7170
7547
  });
7171
7548
  }
7172
7549
  /**
7173
- * Delete a topic.
7550
+ * Delete topic
7174
7551
  *
7552
+ * Delete a topic by its unique ID.
7175
7553
  *
7176
7554
  * @param {string} topicId
7177
7555
  * @throws {AppwriteException}
@@ -7193,6 +7571,7 @@ class Messaging extends Service {
7193
7571
  /**
7194
7572
  * List topic logs
7195
7573
  *
7574
+ * Get the topic activity logs listed by its unique ID.
7196
7575
  *
7197
7576
  * @param {string} topicId
7198
7577
  * @param {string[]} queries
@@ -7216,8 +7595,9 @@ class Messaging extends Service {
7216
7595
  });
7217
7596
  }
7218
7597
  /**
7219
- * List subscribers.
7598
+ * List subscribers
7220
7599
  *
7600
+ * Get a list of all subscribers from the current Appwrite project.
7221
7601
  *
7222
7602
  * @param {string} topicId
7223
7603
  * @param {string[]} queries
@@ -7245,8 +7625,9 @@ class Messaging extends Service {
7245
7625
  });
7246
7626
  }
7247
7627
  /**
7248
- * Create a subscriber.
7628
+ * Create subscriber
7249
7629
  *
7630
+ * Create a new subscriber.
7250
7631
  *
7251
7632
  * @param {string} topicId
7252
7633
  * @param {string} subscriberId
@@ -7280,7 +7661,9 @@ class Messaging extends Service {
7280
7661
  });
7281
7662
  }
7282
7663
  /**
7283
- * Get a subscriber.
7664
+ * Get subscriber
7665
+ *
7666
+ * Get a subscriber by its unique ID.
7284
7667
  *
7285
7668
  *
7286
7669
  * @param {string} topicId
@@ -7305,8 +7688,9 @@ class Messaging extends Service {
7305
7688
  });
7306
7689
  }
7307
7690
  /**
7308
- * Delete a subscriber.
7691
+ * Delete subscriber
7309
7692
  *
7693
+ * Delete a subscriber by its unique ID.
7310
7694
  *
7311
7695
  * @param {string} topicId
7312
7696
  * @param {string} subscriberId
@@ -7944,7 +8328,7 @@ class Project extends Service {
7944
8328
  super(client);
7945
8329
  }
7946
8330
  /**
7947
- * Get usage stats for a project
8331
+ * Get project usage stats
7948
8332
  *
7949
8333
  *
7950
8334
  * @param {string} startDate
@@ -8323,6 +8707,69 @@ class Projects extends Service {
8323
8707
  }, payload);
8324
8708
  });
8325
8709
  }
8710
+ /**
8711
+ * Update API status
8712
+ *
8713
+ *
8714
+ * @param {string} projectId
8715
+ * @param {Api} api
8716
+ * @param {boolean} status
8717
+ * @throws {AppwriteException}
8718
+ * @returns {Promise}
8719
+ */
8720
+ updateApiStatus(projectId, api, status) {
8721
+ return __awaiter(this, void 0, void 0, function* () {
8722
+ if (typeof projectId === 'undefined') {
8723
+ throw new AppwriteException('Missing required parameter: "projectId"');
8724
+ }
8725
+ if (typeof api === 'undefined') {
8726
+ throw new AppwriteException('Missing required parameter: "api"');
8727
+ }
8728
+ if (typeof status === 'undefined') {
8729
+ throw new AppwriteException('Missing required parameter: "status"');
8730
+ }
8731
+ const apiPath = '/projects/{projectId}/api'.replace('{projectId}', projectId);
8732
+ const payload = {};
8733
+ if (typeof api !== 'undefined') {
8734
+ payload['api'] = api;
8735
+ }
8736
+ if (typeof status !== 'undefined') {
8737
+ payload['status'] = status;
8738
+ }
8739
+ const uri = new URL(this.client.config.endpoint + apiPath);
8740
+ return yield this.client.call('patch', uri, {
8741
+ 'content-type': 'application/json',
8742
+ }, payload);
8743
+ });
8744
+ }
8745
+ /**
8746
+ * Update all API status
8747
+ *
8748
+ *
8749
+ * @param {string} projectId
8750
+ * @param {boolean} status
8751
+ * @throws {AppwriteException}
8752
+ * @returns {Promise}
8753
+ */
8754
+ updateApiStatusAll(projectId, status) {
8755
+ return __awaiter(this, void 0, void 0, function* () {
8756
+ if (typeof projectId === 'undefined') {
8757
+ throw new AppwriteException('Missing required parameter: "projectId"');
8758
+ }
8759
+ if (typeof status === 'undefined') {
8760
+ throw new AppwriteException('Missing required parameter: "status"');
8761
+ }
8762
+ const apiPath = '/projects/{projectId}/api/all'.replace('{projectId}', projectId);
8763
+ const payload = {};
8764
+ if (typeof status !== 'undefined') {
8765
+ payload['status'] = status;
8766
+ }
8767
+ const uri = new URL(this.client.config.endpoint + apiPath);
8768
+ return yield this.client.call('patch', uri, {
8769
+ 'content-type': 'application/json',
8770
+ }, payload);
8771
+ });
8772
+ }
8326
8773
  /**
8327
8774
  * Update project authentication duration
8328
8775
  *
@@ -8883,7 +9330,7 @@ class Projects extends Service {
8883
9330
  *
8884
9331
  *
8885
9332
  * @param {string} projectId
8886
- * @param {APIService} service
9333
+ * @param {ApiService} service
8887
9334
  * @param {boolean} status
8888
9335
  * @throws {AppwriteException}
8889
9336
  * @returns {Promise}
@@ -9103,8 +9550,8 @@ class Projects extends Service {
9103
9550
  *
9104
9551
  *
9105
9552
  * @param {string} projectId
9106
- * @param {TemplateType} type
9107
- * @param {TemplateLocale} locale
9553
+ * @param {EmailTemplateType} type
9554
+ * @param {EmailTemplateLocale} locale
9108
9555
  * @throws {AppwriteException}
9109
9556
  * @returns {Promise}
9110
9557
  */
@@ -9132,8 +9579,8 @@ class Projects extends Service {
9132
9579
  *
9133
9580
  *
9134
9581
  * @param {string} projectId
9135
- * @param {TemplateType} type
9136
- * @param {TemplateLocale} locale
9582
+ * @param {EmailTemplateType} type
9583
+ * @param {EmailTemplateLocale} locale
9137
9584
  * @param {string} subject
9138
9585
  * @param {string} message
9139
9586
  * @param {string} senderName
@@ -9187,8 +9634,8 @@ class Projects extends Service {
9187
9634
  *
9188
9635
  *
9189
9636
  * @param {string} projectId
9190
- * @param {TemplateType} type
9191
- * @param {TemplateLocale} locale
9637
+ * @param {EmailTemplateType} type
9638
+ * @param {EmailTemplateLocale} locale
9192
9639
  * @throws {AppwriteException}
9193
9640
  * @returns {Promise}
9194
9641
  */
@@ -9216,8 +9663,8 @@ class Projects extends Service {
9216
9663
  *
9217
9664
  *
9218
9665
  * @param {string} projectId
9219
- * @param {TemplateType} type
9220
- * @param {TemplateLocale} locale
9666
+ * @param {SmsTemplateType} type
9667
+ * @param {SmsTemplateLocale} locale
9221
9668
  * @throws {AppwriteException}
9222
9669
  * @returns {Promise}
9223
9670
  */
@@ -9245,8 +9692,8 @@ class Projects extends Service {
9245
9692
  *
9246
9693
  *
9247
9694
  * @param {string} projectId
9248
- * @param {TemplateType} type
9249
- * @param {TemplateLocale} locale
9695
+ * @param {SmsTemplateType} type
9696
+ * @param {SmsTemplateLocale} locale
9250
9697
  * @param {string} message
9251
9698
  * @throws {AppwriteException}
9252
9699
  * @returns {Promise}
@@ -9281,8 +9728,8 @@ class Projects extends Service {
9281
9728
  *
9282
9729
  *
9283
9730
  * @param {string} projectId
9284
- * @param {TemplateType} type
9285
- * @param {TemplateLocale} locale
9731
+ * @param {SmsTemplateType} type
9732
+ * @param {SmsTemplateLocale} locale
9286
9733
  * @throws {AppwriteException}
9287
9734
  * @returns {Promise}
9288
9735
  */
@@ -10212,7 +10659,7 @@ class Storage extends Service {
10212
10659
  return uri;
10213
10660
  }
10214
10661
  /**
10215
- * Get usage stats for storage
10662
+ * Get storage usage stats
10216
10663
  *
10217
10664
  *
10218
10665
  * @param {StorageUsageRange} range
@@ -10233,7 +10680,7 @@ class Storage extends Service {
10233
10680
  });
10234
10681
  }
10235
10682
  /**
10236
- * Get usage stats for storage bucket
10683
+ * Get bucket usage stats
10237
10684
  *
10238
10685
  *
10239
10686
  * @param {string} bucketId
@@ -11186,7 +11633,7 @@ class Users extends Service {
11186
11633
  * @param {string} userId
11187
11634
  * @param {string} email
11188
11635
  * @param {string} password
11189
- * @param {PasswordVersion} passwordVersion
11636
+ * @param {PasswordHash} passwordVersion
11190
11637
  * @param {string} name
11191
11638
  * @throws {AppwriteException}
11192
11639
  * @returns {Promise}
@@ -11226,7 +11673,7 @@ class Users extends Service {
11226
11673
  });
11227
11674
  }
11228
11675
  /**
11229
- * Get usage stats for the users API
11676
+ * Get users usage stats
11230
11677
  *
11231
11678
  *
11232
11679
  * @param {UserUsageRange} range
@@ -11409,6 +11856,7 @@ class Users extends Service {
11409
11856
  /**
11410
11857
  * Update MFA
11411
11858
  *
11859
+ * Enable or disable MFA on a user account.
11412
11860
  *
11413
11861
  * @param {string} userId
11414
11862
  * @param {boolean} mfa
@@ -11437,31 +11885,122 @@ class Users extends Service {
11437
11885
  /**
11438
11886
  * Delete Authenticator
11439
11887
  *
11888
+ * Delete an authenticator app.
11440
11889
  *
11441
11890
  * @param {string} userId
11442
- * @param {AuthenticatorProvider} provider
11443
- * @param {string} otp
11891
+ * @param {AuthenticatorType} type
11444
11892
  * @throws {AppwriteException}
11445
11893
  * @returns {Promise}
11446
11894
  */
11447
- deleteAuthenticator(userId, provider, otp) {
11895
+ deleteMfaAuthenticator(userId, type) {
11448
11896
  return __awaiter(this, void 0, void 0, function* () {
11449
11897
  if (typeof userId === 'undefined') {
11450
11898
  throw new AppwriteException('Missing required parameter: "userId"');
11451
11899
  }
11452
- if (typeof provider === 'undefined') {
11453
- throw new AppwriteException('Missing required parameter: "provider"');
11900
+ if (typeof type === 'undefined') {
11901
+ throw new AppwriteException('Missing required parameter: "type"');
11454
11902
  }
11455
- if (typeof otp === 'undefined') {
11456
- throw new AppwriteException('Missing required parameter: "otp"');
11903
+ const apiPath = '/users/{userId}/mfa/authenticators/{type}'.replace('{userId}', userId).replace('{type}', type);
11904
+ const payload = {};
11905
+ const uri = new URL(this.client.config.endpoint + apiPath);
11906
+ return yield this.client.call('delete', uri, {
11907
+ 'content-type': 'application/json',
11908
+ }, payload);
11909
+ });
11910
+ }
11911
+ /**
11912
+ * List Factors
11913
+ *
11914
+ * List the factors available on the account to be used as a MFA challange.
11915
+ *
11916
+ * @param {string} userId
11917
+ * @throws {AppwriteException}
11918
+ * @returns {Promise}
11919
+ */
11920
+ listMfaFactors(userId) {
11921
+ return __awaiter(this, void 0, void 0, function* () {
11922
+ if (typeof userId === 'undefined') {
11923
+ throw new AppwriteException('Missing required parameter: "userId"');
11457
11924
  }
11458
- const apiPath = '/users/{userId}/mfa/{provider}'.replace('{userId}', userId).replace('{provider}', provider);
11925
+ const apiPath = '/users/{userId}/mfa/factors'.replace('{userId}', userId);
11459
11926
  const payload = {};
11460
- if (typeof otp !== 'undefined') {
11461
- payload['otp'] = otp;
11927
+ const uri = new URL(this.client.config.endpoint + apiPath);
11928
+ return yield this.client.call('get', uri, {
11929
+ 'content-type': 'application/json',
11930
+ }, payload);
11931
+ });
11932
+ }
11933
+ /**
11934
+ * Get MFA Recovery Codes
11935
+ *
11936
+ * Get recovery codes that can be used as backup for MFA flow by User ID.
11937
+ * Before getting codes, they must be generated using
11938
+ * [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes)
11939
+ * method.
11940
+ *
11941
+ * @param {string} userId
11942
+ * @throws {AppwriteException}
11943
+ * @returns {Promise}
11944
+ */
11945
+ getMfaRecoveryCodes(userId) {
11946
+ return __awaiter(this, void 0, void 0, function* () {
11947
+ if (typeof userId === 'undefined') {
11948
+ throw new AppwriteException('Missing required parameter: "userId"');
11462
11949
  }
11950
+ const apiPath = '/users/{userId}/mfa/recovery-codes'.replace('{userId}', userId);
11951
+ const payload = {};
11463
11952
  const uri = new URL(this.client.config.endpoint + apiPath);
11464
- return yield this.client.call('delete', uri, {
11953
+ return yield this.client.call('get', uri, {
11954
+ 'content-type': 'application/json',
11955
+ }, payload);
11956
+ });
11957
+ }
11958
+ /**
11959
+ * Regenerate MFA Recovery Codes
11960
+ *
11961
+ * Regenerate recovery codes that can be used as backup for MFA flow by User
11962
+ * ID. Before regenerating codes, they must be first generated using
11963
+ * [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes)
11964
+ * method.
11965
+ *
11966
+ * @param {string} userId
11967
+ * @throws {AppwriteException}
11968
+ * @returns {Promise}
11969
+ */
11970
+ updateMfaRecoveryCodes(userId) {
11971
+ return __awaiter(this, void 0, void 0, function* () {
11972
+ if (typeof userId === 'undefined') {
11973
+ throw new AppwriteException('Missing required parameter: "userId"');
11974
+ }
11975
+ const apiPath = '/users/{userId}/mfa/recovery-codes'.replace('{userId}', userId);
11976
+ const payload = {};
11977
+ const uri = new URL(this.client.config.endpoint + apiPath);
11978
+ return yield this.client.call('put', uri, {
11979
+ 'content-type': 'application/json',
11980
+ }, payload);
11981
+ });
11982
+ }
11983
+ /**
11984
+ * Create MFA Recovery Codes
11985
+ *
11986
+ * Generate recovery codes used as backup for MFA flow for User ID. Recovery
11987
+ * codes can be used as a MFA verification type in
11988
+ * [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge)
11989
+ * method by client SDK.
11990
+ *
11991
+ * @param {string} userId
11992
+ * @throws {AppwriteException}
11993
+ * @returns {Promise}
11994
+ */
11995
+ createMfaRecoveryCodes(userId) {
11996
+ return __awaiter(this, void 0, void 0, function* () {
11997
+ if (typeof userId === 'undefined') {
11998
+ throw new AppwriteException('Missing required parameter: "userId"');
11999
+ }
12000
+ const apiPath = '/users/{userId}/mfa/recovery-codes'.replace('{userId}', userId);
12001
+ const payload = {};
12002
+ const uri = new URL(this.client.config.endpoint + apiPath);
12003
+ return yield this.client.call('patch', uri, {
11465
12004
  'content-type': 'application/json',
11466
12005
  }, payload);
11467
12006
  });
@@ -11606,27 +12145,6 @@ class Users extends Service {
11606
12145
  }, payload);
11607
12146
  });
11608
12147
  }
11609
- /**
11610
- * List Providers
11611
- *
11612
- *
11613
- * @param {string} userId
11614
- * @throws {AppwriteException}
11615
- * @returns {Promise}
11616
- */
11617
- listProviders(userId) {
11618
- return __awaiter(this, void 0, void 0, function* () {
11619
- if (typeof userId === 'undefined') {
11620
- throw new AppwriteException('Missing required parameter: "userId"');
11621
- }
11622
- const apiPath = '/users/{userId}/providers'.replace('{userId}', userId);
11623
- const payload = {};
11624
- const uri = new URL(this.client.config.endpoint + apiPath);
11625
- return yield this.client.call('get', uri, {
11626
- 'content-type': 'application/json',
11627
- }, payload);
11628
- });
11629
- }
11630
12148
  /**
11631
12149
  * List user sessions
11632
12150
  *
@@ -11757,6 +12275,7 @@ class Users extends Service {
11757
12275
  /**
11758
12276
  * List User Targets
11759
12277
  *
12278
+ * List the messaging targets that are associated with a user.
11760
12279
  *
11761
12280
  * @param {string} userId
11762
12281
  * @param {string[]} queries
@@ -11782,6 +12301,7 @@ class Users extends Service {
11782
12301
  /**
11783
12302
  * Create User Target
11784
12303
  *
12304
+ * Create a messaging target.
11785
12305
  *
11786
12306
  * @param {string} userId
11787
12307
  * @param {string} targetId
@@ -11832,6 +12352,7 @@ class Users extends Service {
11832
12352
  /**
11833
12353
  * Get User Target
11834
12354
  *
12355
+ * Get a user's push notification target by ID.
11835
12356
  *
11836
12357
  * @param {string} userId
11837
12358
  * @param {string} targetId
@@ -11857,6 +12378,7 @@ class Users extends Service {
11857
12378
  /**
11858
12379
  * Update User target
11859
12380
  *
12381
+ * Update a messaging target.
11860
12382
  *
11861
12383
  * @param {string} userId
11862
12384
  * @param {string} targetId
@@ -11894,6 +12416,7 @@ class Users extends Service {
11894
12416
  /**
11895
12417
  * Delete user target
11896
12418
  *
12419
+ * Delete a messaging target.
11897
12420
  *
11898
12421
  * @param {string} userId
11899
12422
  * @param {string} targetId
@@ -12366,24 +12889,43 @@ class Role {
12366
12889
  }
12367
12890
  }
12368
12891
 
12892
+ var _a, _ID_hexTimestamp;
12369
12893
  class ID {
12370
12894
  static custom(id) {
12371
12895
  return id;
12372
12896
  }
12373
- static unique() {
12374
- return 'unique()';
12897
+ static unique(padding = 7) {
12898
+ // Generate a unique ID with padding to have a longer ID
12899
+ const baseId = __classPrivateFieldGet(ID, _a, "m", _ID_hexTimestamp).call(ID);
12900
+ let randomPadding = '';
12901
+ for (let i = 0; i < padding; i++) {
12902
+ const randomHexDigit = Math.floor(Math.random() * 16).toString(16);
12903
+ randomPadding += randomHexDigit;
12904
+ }
12905
+ return baseId + randomPadding;
12375
12906
  }
12376
12907
  }
12908
+ _a = ID, _ID_hexTimestamp = function _ID_hexTimestamp() {
12909
+ const now = new Date();
12910
+ const sec = Math.floor(now.getTime() / 1000);
12911
+ const msec = now.getMilliseconds();
12912
+ // Convert to hexadecimal
12913
+ const hexTimestamp = sec.toString(16) + msec.toString(16).padStart(5, '0');
12914
+ return hexTimestamp;
12915
+ };
12377
12916
 
12378
- exports.AuthenticatorProvider = void 0;
12379
- (function (AuthenticatorProvider) {
12380
- AuthenticatorProvider["Totp"] = "totp";
12381
- })(exports.AuthenticatorProvider || (exports.AuthenticatorProvider = {}));
12917
+ exports.AuthenticatorType = void 0;
12918
+ (function (AuthenticatorType) {
12919
+ AuthenticatorType["Totp"] = "totp";
12920
+ })(exports.AuthenticatorType || (exports.AuthenticatorType = {}));
12382
12921
 
12383
- exports.AuthenticatorFactor = void 0;
12384
- (function (AuthenticatorFactor) {
12385
- AuthenticatorFactor["Totp"] = "totp";
12386
- })(exports.AuthenticatorFactor || (exports.AuthenticatorFactor = {}));
12922
+ exports.AuthenticationFactor = void 0;
12923
+ (function (AuthenticationFactor) {
12924
+ AuthenticationFactor["Email"] = "email";
12925
+ AuthenticationFactor["Phone"] = "phone";
12926
+ AuthenticationFactor["Totp"] = "totp";
12927
+ AuthenticationFactor["Recoverycode"] = "recoverycode";
12928
+ })(exports.AuthenticationFactor || (exports.AuthenticationFactor = {}));
12387
12929
 
12388
12930
  exports.OAuthProvider = void 0;
12389
12931
  (function (OAuthProvider) {
@@ -12501,7 +13043,7 @@ exports.Flag = void 0;
12501
13043
  Flag["Switzerland"] = "ch";
12502
13044
  Flag["Chile"] = "cl";
12503
13045
  Flag["China"] = "cn";
12504
- Flag["CTeDIvoire"] = "ci";
13046
+ Flag["CoteDIvoire"] = "ci";
12505
13047
  Flag["Cameroon"] = "cm";
12506
13048
  Flag["DemocraticRepublicOfTheCongo"] = "cd";
12507
13049
  Flag["RepublicOfTheCongo"] = "cg";
@@ -12691,15 +13233,54 @@ exports.IndexType = void 0;
12691
13233
  IndexType["Key"] = "key";
12692
13234
  IndexType["Fulltext"] = "fulltext";
12693
13235
  IndexType["Unique"] = "unique";
12694
- IndexType["Spatial"] = "spatial";
12695
13236
  })(exports.IndexType || (exports.IndexType = {}));
12696
13237
 
12697
13238
  exports.Runtime = void 0;
12698
13239
  (function (Runtime) {
13240
+ Runtime["Node145"] = "node-14.5";
13241
+ Runtime["Node160"] = "node-16.0";
12699
13242
  Runtime["Node180"] = "node-18.0";
13243
+ Runtime["Node190"] = "node-19.0";
13244
+ Runtime["Node200"] = "node-20.0";
13245
+ Runtime["Node210"] = "node-21.0";
12700
13246
  Runtime["Php80"] = "php-8.0";
13247
+ Runtime["Php81"] = "php-8.1";
13248
+ Runtime["Php82"] = "php-8.2";
13249
+ Runtime["Php83"] = "php-8.3";
13250
+ Runtime["Ruby30"] = "ruby-3.0";
12701
13251
  Runtime["Ruby31"] = "ruby-3.1";
13252
+ Runtime["Ruby32"] = "ruby-3.2";
13253
+ Runtime["Ruby33"] = "ruby-3.3";
13254
+ Runtime["Python38"] = "python-3.8";
12702
13255
  Runtime["Python39"] = "python-3.9";
13256
+ Runtime["Python310"] = "python-3.10";
13257
+ Runtime["Python311"] = "python-3.11";
13258
+ Runtime["Python312"] = "python-3.12";
13259
+ Runtime["Deno140"] = "deno-1.40";
13260
+ Runtime["Dart215"] = "dart-2.15";
13261
+ Runtime["Dart216"] = "dart-2.16";
13262
+ Runtime["Dart217"] = "dart-2.17";
13263
+ Runtime["Dart218"] = "dart-2.18";
13264
+ Runtime["Dart30"] = "dart-3.0";
13265
+ Runtime["Dart31"] = "dart-3.1";
13266
+ Runtime["Dart33"] = "dart-3.3";
13267
+ Runtime["Dotnet31"] = "dotnet-3.1";
13268
+ Runtime["Dotnet60"] = "dotnet-6.0";
13269
+ Runtime["Dotnet70"] = "dotnet-7.0";
13270
+ Runtime["Java80"] = "java-8.0";
13271
+ Runtime["Java110"] = "java-11.0";
13272
+ Runtime["Java170"] = "java-17.0";
13273
+ Runtime["Java180"] = "java-18.0";
13274
+ Runtime["Java210"] = "java-21.0";
13275
+ Runtime["Swift55"] = "swift-5.5";
13276
+ Runtime["Swift58"] = "swift-5.8";
13277
+ Runtime["Swift59"] = "swift-5.9";
13278
+ Runtime["Kotlin16"] = "kotlin-1.6";
13279
+ Runtime["Kotlin18"] = "kotlin-1.8";
13280
+ Runtime["Kotlin19"] = "kotlin-1.9";
13281
+ Runtime["Cpp17"] = "cpp-17";
13282
+ Runtime["Cpp20"] = "cpp-20";
13283
+ Runtime["Bun10"] = "bun-1.0";
12703
13284
  })(exports.Runtime || (exports.Runtime = {}));
12704
13285
 
12705
13286
  exports.FunctionUsageRange = void 0;
@@ -12719,19 +13300,29 @@ exports.ExecutionMethod = void 0;
12719
13300
  ExecutionMethod["OPTIONS"] = "OPTIONS";
12720
13301
  })(exports.ExecutionMethod || (exports.ExecutionMethod = {}));
12721
13302
 
12722
- exports.MessageType = void 0;
12723
- (function (MessageType) {
12724
- MessageType["Draft"] = "draft";
12725
- MessageType["Cancelled"] = "cancelled";
12726
- MessageType["Processing"] = "processing";
12727
- })(exports.MessageType || (exports.MessageType = {}));
13303
+ exports.Name = void 0;
13304
+ (function (Name) {
13305
+ Name["V1database"] = "v1-database";
13306
+ Name["V1deletes"] = "v1-deletes";
13307
+ Name["V1audits"] = "v1-audits";
13308
+ Name["V1mails"] = "v1-mails";
13309
+ Name["V1functions"] = "v1-functions";
13310
+ Name["V1usage"] = "v1-usage";
13311
+ Name["V1usagedump"] = "v1-usage-dump";
13312
+ Name["Webhooksv1"] = "webhooksv1";
13313
+ Name["V1certificates"] = "v1-certificates";
13314
+ Name["V1builds"] = "v1-builds";
13315
+ Name["V1messaging"] = "v1-messaging";
13316
+ Name["V1migrations"] = "v1-migrations";
13317
+ Name["Hamsterv1"] = "hamsterv1";
13318
+ })(exports.Name || (exports.Name = {}));
12728
13319
 
12729
- exports.SMTPEncryption = void 0;
12730
- (function (SMTPEncryption) {
12731
- SMTPEncryption["None"] = "none";
12732
- SMTPEncryption["Ssl"] = "ssl";
12733
- SMTPEncryption["Tls"] = "tls";
12734
- })(exports.SMTPEncryption || (exports.SMTPEncryption = {}));
13320
+ exports.SmtpEncryption = void 0;
13321
+ (function (SmtpEncryption) {
13322
+ SmtpEncryption["None"] = "none";
13323
+ SmtpEncryption["Ssl"] = "ssl";
13324
+ SmtpEncryption["Tls"] = "tls";
13325
+ })(exports.SmtpEncryption || (exports.SmtpEncryption = {}));
12735
13326
 
12736
13327
  exports.ProjectUsageRange = void 0;
12737
13328
  (function (ProjectUsageRange) {
@@ -12742,8 +13333,16 @@ exports.ProjectUsageRange = void 0;
12742
13333
  exports.Region = void 0;
12743
13334
  (function (Region) {
12744
13335
  Region["Default"] = "default";
13336
+ Region["Fra"] = "fra";
12745
13337
  })(exports.Region || (exports.Region = {}));
12746
13338
 
13339
+ exports.Api = void 0;
13340
+ (function (Api) {
13341
+ Api["Rest"] = "rest";
13342
+ Api["Graphql"] = "graphql";
13343
+ Api["Realtime"] = "realtime";
13344
+ })(exports.Api || (exports.Api = {}));
13345
+
12747
13346
  exports.AuthMethod = void 0;
12748
13347
  (function (AuthMethod) {
12749
13348
  AuthMethod["Emailpassword"] = "email-password";
@@ -12772,167 +13371,312 @@ exports.PlatformType = void 0;
12772
13371
  PlatformType["Unity"] = "unity";
12773
13372
  })(exports.PlatformType || (exports.PlatformType = {}));
12774
13373
 
12775
- exports.APIService = void 0;
12776
- (function (APIService) {
12777
- APIService["Account"] = "account";
12778
- APIService["Avatars"] = "avatars";
12779
- APIService["Databases"] = "databases";
12780
- APIService["Locale"] = "locale";
12781
- APIService["Health"] = "health";
12782
- APIService["Storage"] = "storage";
12783
- APIService["Teams"] = "teams";
12784
- APIService["Users"] = "users";
12785
- APIService["Functions"] = "functions";
12786
- APIService["Graphql"] = "graphql";
12787
- APIService["Messaging"] = "messaging";
12788
- })(exports.APIService || (exports.APIService = {}));
13374
+ exports.ApiService = void 0;
13375
+ (function (ApiService) {
13376
+ ApiService["Account"] = "account";
13377
+ ApiService["Avatars"] = "avatars";
13378
+ ApiService["Databases"] = "databases";
13379
+ ApiService["Locale"] = "locale";
13380
+ ApiService["Health"] = "health";
13381
+ ApiService["Storage"] = "storage";
13382
+ ApiService["Teams"] = "teams";
13383
+ ApiService["Users"] = "users";
13384
+ ApiService["Functions"] = "functions";
13385
+ ApiService["Graphql"] = "graphql";
13386
+ ApiService["Messaging"] = "messaging";
13387
+ })(exports.ApiService || (exports.ApiService = {}));
12789
13388
 
12790
13389
  exports.SMTPSecure = void 0;
12791
13390
  (function (SMTPSecure) {
12792
13391
  SMTPSecure["Tls"] = "tls";
12793
13392
  })(exports.SMTPSecure || (exports.SMTPSecure = {}));
12794
13393
 
12795
- exports.TemplateType = void 0;
12796
- (function (TemplateType) {
12797
- TemplateType["Verification"] = "verification";
12798
- TemplateType["Login"] = "login";
12799
- TemplateType["Invitation"] = "invitation";
12800
- })(exports.TemplateType || (exports.TemplateType = {}));
13394
+ exports.EmailTemplateType = void 0;
13395
+ (function (EmailTemplateType) {
13396
+ EmailTemplateType["Verification"] = "verification";
13397
+ EmailTemplateType["Magicsession"] = "magicsession";
13398
+ EmailTemplateType["Recovery"] = "recovery";
13399
+ EmailTemplateType["Invitation"] = "invitation";
13400
+ EmailTemplateType["Mfachallenge"] = "mfachallenge";
13401
+ })(exports.EmailTemplateType || (exports.EmailTemplateType = {}));
13402
+
13403
+ exports.EmailTemplateLocale = void 0;
13404
+ (function (EmailTemplateLocale) {
13405
+ EmailTemplateLocale["Af"] = "af";
13406
+ EmailTemplateLocale["Arae"] = "ar-ae";
13407
+ EmailTemplateLocale["Arbh"] = "ar-bh";
13408
+ EmailTemplateLocale["Ardz"] = "ar-dz";
13409
+ EmailTemplateLocale["Areg"] = "ar-eg";
13410
+ EmailTemplateLocale["Ariq"] = "ar-iq";
13411
+ EmailTemplateLocale["Arjo"] = "ar-jo";
13412
+ EmailTemplateLocale["Arkw"] = "ar-kw";
13413
+ EmailTemplateLocale["Arlb"] = "ar-lb";
13414
+ EmailTemplateLocale["Arly"] = "ar-ly";
13415
+ EmailTemplateLocale["Arma"] = "ar-ma";
13416
+ EmailTemplateLocale["Arom"] = "ar-om";
13417
+ EmailTemplateLocale["Arqa"] = "ar-qa";
13418
+ EmailTemplateLocale["Arsa"] = "ar-sa";
13419
+ EmailTemplateLocale["Arsy"] = "ar-sy";
13420
+ EmailTemplateLocale["Artn"] = "ar-tn";
13421
+ EmailTemplateLocale["Arye"] = "ar-ye";
13422
+ EmailTemplateLocale["As"] = "as";
13423
+ EmailTemplateLocale["Az"] = "az";
13424
+ EmailTemplateLocale["Be"] = "be";
13425
+ EmailTemplateLocale["Bg"] = "bg";
13426
+ EmailTemplateLocale["Bh"] = "bh";
13427
+ EmailTemplateLocale["Bn"] = "bn";
13428
+ EmailTemplateLocale["Bs"] = "bs";
13429
+ EmailTemplateLocale["Ca"] = "ca";
13430
+ EmailTemplateLocale["Cs"] = "cs";
13431
+ EmailTemplateLocale["Cy"] = "cy";
13432
+ EmailTemplateLocale["Da"] = "da";
13433
+ EmailTemplateLocale["De"] = "de";
13434
+ EmailTemplateLocale["Deat"] = "de-at";
13435
+ EmailTemplateLocale["Dech"] = "de-ch";
13436
+ EmailTemplateLocale["Deli"] = "de-li";
13437
+ EmailTemplateLocale["Delu"] = "de-lu";
13438
+ EmailTemplateLocale["El"] = "el";
13439
+ EmailTemplateLocale["En"] = "en";
13440
+ EmailTemplateLocale["Enau"] = "en-au";
13441
+ EmailTemplateLocale["Enbz"] = "en-bz";
13442
+ EmailTemplateLocale["Enca"] = "en-ca";
13443
+ EmailTemplateLocale["Engb"] = "en-gb";
13444
+ EmailTemplateLocale["Enie"] = "en-ie";
13445
+ EmailTemplateLocale["Enjm"] = "en-jm";
13446
+ EmailTemplateLocale["Ennz"] = "en-nz";
13447
+ EmailTemplateLocale["Entt"] = "en-tt";
13448
+ EmailTemplateLocale["Enus"] = "en-us";
13449
+ EmailTemplateLocale["Enza"] = "en-za";
13450
+ EmailTemplateLocale["Eo"] = "eo";
13451
+ EmailTemplateLocale["Es"] = "es";
13452
+ EmailTemplateLocale["Esar"] = "es-ar";
13453
+ EmailTemplateLocale["Esbo"] = "es-bo";
13454
+ EmailTemplateLocale["Escl"] = "es-cl";
13455
+ EmailTemplateLocale["Esco"] = "es-co";
13456
+ EmailTemplateLocale["Escr"] = "es-cr";
13457
+ EmailTemplateLocale["Esdo"] = "es-do";
13458
+ EmailTemplateLocale["Esec"] = "es-ec";
13459
+ EmailTemplateLocale["Esgt"] = "es-gt";
13460
+ EmailTemplateLocale["Eshn"] = "es-hn";
13461
+ EmailTemplateLocale["Esmx"] = "es-mx";
13462
+ EmailTemplateLocale["Esni"] = "es-ni";
13463
+ EmailTemplateLocale["Espa"] = "es-pa";
13464
+ EmailTemplateLocale["Espe"] = "es-pe";
13465
+ EmailTemplateLocale["Espr"] = "es-pr";
13466
+ EmailTemplateLocale["Espy"] = "es-py";
13467
+ EmailTemplateLocale["Essv"] = "es-sv";
13468
+ EmailTemplateLocale["Esuy"] = "es-uy";
13469
+ EmailTemplateLocale["Esve"] = "es-ve";
13470
+ EmailTemplateLocale["Et"] = "et";
13471
+ EmailTemplateLocale["Eu"] = "eu";
13472
+ EmailTemplateLocale["Fa"] = "fa";
13473
+ EmailTemplateLocale["Fi"] = "fi";
13474
+ EmailTemplateLocale["Fo"] = "fo";
13475
+ EmailTemplateLocale["Fr"] = "fr";
13476
+ EmailTemplateLocale["Frbe"] = "fr-be";
13477
+ EmailTemplateLocale["Frca"] = "fr-ca";
13478
+ EmailTemplateLocale["Frch"] = "fr-ch";
13479
+ EmailTemplateLocale["Frlu"] = "fr-lu";
13480
+ EmailTemplateLocale["Ga"] = "ga";
13481
+ EmailTemplateLocale["Gd"] = "gd";
13482
+ EmailTemplateLocale["He"] = "he";
13483
+ EmailTemplateLocale["Hi"] = "hi";
13484
+ EmailTemplateLocale["Hr"] = "hr";
13485
+ EmailTemplateLocale["Hu"] = "hu";
13486
+ EmailTemplateLocale["Id"] = "id";
13487
+ EmailTemplateLocale["Is"] = "is";
13488
+ EmailTemplateLocale["It"] = "it";
13489
+ EmailTemplateLocale["Itch"] = "it-ch";
13490
+ EmailTemplateLocale["Ja"] = "ja";
13491
+ EmailTemplateLocale["Ji"] = "ji";
13492
+ EmailTemplateLocale["Ko"] = "ko";
13493
+ EmailTemplateLocale["Ku"] = "ku";
13494
+ EmailTemplateLocale["Lt"] = "lt";
13495
+ EmailTemplateLocale["Lv"] = "lv";
13496
+ EmailTemplateLocale["Mk"] = "mk";
13497
+ EmailTemplateLocale["Ml"] = "ml";
13498
+ EmailTemplateLocale["Ms"] = "ms";
13499
+ EmailTemplateLocale["Mt"] = "mt";
13500
+ EmailTemplateLocale["Nb"] = "nb";
13501
+ EmailTemplateLocale["Ne"] = "ne";
13502
+ EmailTemplateLocale["Nl"] = "nl";
13503
+ EmailTemplateLocale["Nlbe"] = "nl-be";
13504
+ EmailTemplateLocale["Nn"] = "nn";
13505
+ EmailTemplateLocale["No"] = "no";
13506
+ EmailTemplateLocale["Pa"] = "pa";
13507
+ EmailTemplateLocale["Pl"] = "pl";
13508
+ EmailTemplateLocale["Pt"] = "pt";
13509
+ EmailTemplateLocale["Ptbr"] = "pt-br";
13510
+ EmailTemplateLocale["Rm"] = "rm";
13511
+ EmailTemplateLocale["Ro"] = "ro";
13512
+ EmailTemplateLocale["Romd"] = "ro-md";
13513
+ EmailTemplateLocale["Ru"] = "ru";
13514
+ EmailTemplateLocale["Rumd"] = "ru-md";
13515
+ EmailTemplateLocale["Sb"] = "sb";
13516
+ EmailTemplateLocale["Sk"] = "sk";
13517
+ EmailTemplateLocale["Sl"] = "sl";
13518
+ EmailTemplateLocale["Sq"] = "sq";
13519
+ EmailTemplateLocale["Sr"] = "sr";
13520
+ EmailTemplateLocale["Sv"] = "sv";
13521
+ EmailTemplateLocale["Svfi"] = "sv-fi";
13522
+ EmailTemplateLocale["Th"] = "th";
13523
+ EmailTemplateLocale["Tn"] = "tn";
13524
+ EmailTemplateLocale["Tr"] = "tr";
13525
+ EmailTemplateLocale["Ts"] = "ts";
13526
+ EmailTemplateLocale["Ua"] = "ua";
13527
+ EmailTemplateLocale["Ur"] = "ur";
13528
+ EmailTemplateLocale["Ve"] = "ve";
13529
+ EmailTemplateLocale["Vi"] = "vi";
13530
+ EmailTemplateLocale["Xh"] = "xh";
13531
+ EmailTemplateLocale["Zhcn"] = "zh-cn";
13532
+ EmailTemplateLocale["Zhhk"] = "zh-hk";
13533
+ EmailTemplateLocale["Zhsg"] = "zh-sg";
13534
+ EmailTemplateLocale["Zhtw"] = "zh-tw";
13535
+ EmailTemplateLocale["Zu"] = "zu";
13536
+ })(exports.EmailTemplateLocale || (exports.EmailTemplateLocale = {}));
13537
+
13538
+ exports.SmsTemplateType = void 0;
13539
+ (function (SmsTemplateType) {
13540
+ SmsTemplateType["Verification"] = "verification";
13541
+ SmsTemplateType["Login"] = "login";
13542
+ SmsTemplateType["Invitation"] = "invitation";
13543
+ SmsTemplateType["Mfachallenge"] = "mfachallenge";
13544
+ })(exports.SmsTemplateType || (exports.SmsTemplateType = {}));
12801
13545
 
12802
- exports.TemplateLocale = void 0;
12803
- (function (TemplateLocale) {
12804
- TemplateLocale["Af"] = "af";
12805
- TemplateLocale["Arae"] = "ar-ae";
12806
- TemplateLocale["Arbh"] = "ar-bh";
12807
- TemplateLocale["Ardz"] = "ar-dz";
12808
- TemplateLocale["Areg"] = "ar-eg";
12809
- TemplateLocale["Ariq"] = "ar-iq";
12810
- TemplateLocale["Arjo"] = "ar-jo";
12811
- TemplateLocale["Arkw"] = "ar-kw";
12812
- TemplateLocale["Arlb"] = "ar-lb";
12813
- TemplateLocale["Arly"] = "ar-ly";
12814
- TemplateLocale["Arma"] = "ar-ma";
12815
- TemplateLocale["Arom"] = "ar-om";
12816
- TemplateLocale["Arqa"] = "ar-qa";
12817
- TemplateLocale["Arsa"] = "ar-sa";
12818
- TemplateLocale["Arsy"] = "ar-sy";
12819
- TemplateLocale["Artn"] = "ar-tn";
12820
- TemplateLocale["Arye"] = "ar-ye";
12821
- TemplateLocale["As"] = "as";
12822
- TemplateLocale["Az"] = "az";
12823
- TemplateLocale["Be"] = "be";
12824
- TemplateLocale["Bg"] = "bg";
12825
- TemplateLocale["Bh"] = "bh";
12826
- TemplateLocale["Bn"] = "bn";
12827
- TemplateLocale["Bs"] = "bs";
12828
- TemplateLocale["Ca"] = "ca";
12829
- TemplateLocale["Cs"] = "cs";
12830
- TemplateLocale["Cy"] = "cy";
12831
- TemplateLocale["Da"] = "da";
12832
- TemplateLocale["De"] = "de";
12833
- TemplateLocale["Deat"] = "de-at";
12834
- TemplateLocale["Dech"] = "de-ch";
12835
- TemplateLocale["Deli"] = "de-li";
12836
- TemplateLocale["Delu"] = "de-lu";
12837
- TemplateLocale["El"] = "el";
12838
- TemplateLocale["En"] = "en";
12839
- TemplateLocale["Enau"] = "en-au";
12840
- TemplateLocale["Enbz"] = "en-bz";
12841
- TemplateLocale["Enca"] = "en-ca";
12842
- TemplateLocale["Engb"] = "en-gb";
12843
- TemplateLocale["Enie"] = "en-ie";
12844
- TemplateLocale["Enjm"] = "en-jm";
12845
- TemplateLocale["Ennz"] = "en-nz";
12846
- TemplateLocale["Entt"] = "en-tt";
12847
- TemplateLocale["Enus"] = "en-us";
12848
- TemplateLocale["Enza"] = "en-za";
12849
- TemplateLocale["Eo"] = "eo";
12850
- TemplateLocale["Es"] = "es";
12851
- TemplateLocale["Esar"] = "es-ar";
12852
- TemplateLocale["Esbo"] = "es-bo";
12853
- TemplateLocale["Escl"] = "es-cl";
12854
- TemplateLocale["Esco"] = "es-co";
12855
- TemplateLocale["Escr"] = "es-cr";
12856
- TemplateLocale["Esdo"] = "es-do";
12857
- TemplateLocale["Esec"] = "es-ec";
12858
- TemplateLocale["Esgt"] = "es-gt";
12859
- TemplateLocale["Eshn"] = "es-hn";
12860
- TemplateLocale["Esmx"] = "es-mx";
12861
- TemplateLocale["Esni"] = "es-ni";
12862
- TemplateLocale["Espa"] = "es-pa";
12863
- TemplateLocale["Espe"] = "es-pe";
12864
- TemplateLocale["Espr"] = "es-pr";
12865
- TemplateLocale["Espy"] = "es-py";
12866
- TemplateLocale["Essv"] = "es-sv";
12867
- TemplateLocale["Esuy"] = "es-uy";
12868
- TemplateLocale["Esve"] = "es-ve";
12869
- TemplateLocale["Et"] = "et";
12870
- TemplateLocale["Eu"] = "eu";
12871
- TemplateLocale["Fa"] = "fa";
12872
- TemplateLocale["Fi"] = "fi";
12873
- TemplateLocale["Fo"] = "fo";
12874
- TemplateLocale["Fr"] = "fr";
12875
- TemplateLocale["Frbe"] = "fr-be";
12876
- TemplateLocale["Frca"] = "fr-ca";
12877
- TemplateLocale["Frch"] = "fr-ch";
12878
- TemplateLocale["Frlu"] = "fr-lu";
12879
- TemplateLocale["Ga"] = "ga";
12880
- TemplateLocale["Gd"] = "gd";
12881
- TemplateLocale["He"] = "he";
12882
- TemplateLocale["Hi"] = "hi";
12883
- TemplateLocale["Hr"] = "hr";
12884
- TemplateLocale["Hu"] = "hu";
12885
- TemplateLocale["Id"] = "id";
12886
- TemplateLocale["Is"] = "is";
12887
- TemplateLocale["It"] = "it";
12888
- TemplateLocale["Itch"] = "it-ch";
12889
- TemplateLocale["Ja"] = "ja";
12890
- TemplateLocale["Ji"] = "ji";
12891
- TemplateLocale["Ko"] = "ko";
12892
- TemplateLocale["Ku"] = "ku";
12893
- TemplateLocale["Lt"] = "lt";
12894
- TemplateLocale["Lv"] = "lv";
12895
- TemplateLocale["Mk"] = "mk";
12896
- TemplateLocale["Ml"] = "ml";
12897
- TemplateLocale["Ms"] = "ms";
12898
- TemplateLocale["Mt"] = "mt";
12899
- TemplateLocale["Nb"] = "nb";
12900
- TemplateLocale["Ne"] = "ne";
12901
- TemplateLocale["Nl"] = "nl";
12902
- TemplateLocale["Nlbe"] = "nl-be";
12903
- TemplateLocale["Nn"] = "nn";
12904
- TemplateLocale["No"] = "no";
12905
- TemplateLocale["Pa"] = "pa";
12906
- TemplateLocale["Pl"] = "pl";
12907
- TemplateLocale["Pt"] = "pt";
12908
- TemplateLocale["Ptbr"] = "pt-br";
12909
- TemplateLocale["Rm"] = "rm";
12910
- TemplateLocale["Ro"] = "ro";
12911
- TemplateLocale["Romd"] = "ro-md";
12912
- TemplateLocale["Ru"] = "ru";
12913
- TemplateLocale["Rumd"] = "ru-md";
12914
- TemplateLocale["Sb"] = "sb";
12915
- TemplateLocale["Sk"] = "sk";
12916
- TemplateLocale["Sl"] = "sl";
12917
- TemplateLocale["Sq"] = "sq";
12918
- TemplateLocale["Sr"] = "sr";
12919
- TemplateLocale["Sv"] = "sv";
12920
- TemplateLocale["Svfi"] = "sv-fi";
12921
- TemplateLocale["Th"] = "th";
12922
- TemplateLocale["Tn"] = "tn";
12923
- TemplateLocale["Tr"] = "tr";
12924
- TemplateLocale["Ts"] = "ts";
12925
- TemplateLocale["Ua"] = "ua";
12926
- TemplateLocale["Ur"] = "ur";
12927
- TemplateLocale["Ve"] = "ve";
12928
- TemplateLocale["Vi"] = "vi";
12929
- TemplateLocale["Xh"] = "xh";
12930
- TemplateLocale["Zhcn"] = "zh-cn";
12931
- TemplateLocale["Zhhk"] = "zh-hk";
12932
- TemplateLocale["Zhsg"] = "zh-sg";
12933
- TemplateLocale["Zhtw"] = "zh-tw";
12934
- TemplateLocale["Zu"] = "zu";
12935
- })(exports.TemplateLocale || (exports.TemplateLocale = {}));
13546
+ exports.SmsTemplateLocale = void 0;
13547
+ (function (SmsTemplateLocale) {
13548
+ SmsTemplateLocale["Af"] = "af";
13549
+ SmsTemplateLocale["Arae"] = "ar-ae";
13550
+ SmsTemplateLocale["Arbh"] = "ar-bh";
13551
+ SmsTemplateLocale["Ardz"] = "ar-dz";
13552
+ SmsTemplateLocale["Areg"] = "ar-eg";
13553
+ SmsTemplateLocale["Ariq"] = "ar-iq";
13554
+ SmsTemplateLocale["Arjo"] = "ar-jo";
13555
+ SmsTemplateLocale["Arkw"] = "ar-kw";
13556
+ SmsTemplateLocale["Arlb"] = "ar-lb";
13557
+ SmsTemplateLocale["Arly"] = "ar-ly";
13558
+ SmsTemplateLocale["Arma"] = "ar-ma";
13559
+ SmsTemplateLocale["Arom"] = "ar-om";
13560
+ SmsTemplateLocale["Arqa"] = "ar-qa";
13561
+ SmsTemplateLocale["Arsa"] = "ar-sa";
13562
+ SmsTemplateLocale["Arsy"] = "ar-sy";
13563
+ SmsTemplateLocale["Artn"] = "ar-tn";
13564
+ SmsTemplateLocale["Arye"] = "ar-ye";
13565
+ SmsTemplateLocale["As"] = "as";
13566
+ SmsTemplateLocale["Az"] = "az";
13567
+ SmsTemplateLocale["Be"] = "be";
13568
+ SmsTemplateLocale["Bg"] = "bg";
13569
+ SmsTemplateLocale["Bh"] = "bh";
13570
+ SmsTemplateLocale["Bn"] = "bn";
13571
+ SmsTemplateLocale["Bs"] = "bs";
13572
+ SmsTemplateLocale["Ca"] = "ca";
13573
+ SmsTemplateLocale["Cs"] = "cs";
13574
+ SmsTemplateLocale["Cy"] = "cy";
13575
+ SmsTemplateLocale["Da"] = "da";
13576
+ SmsTemplateLocale["De"] = "de";
13577
+ SmsTemplateLocale["Deat"] = "de-at";
13578
+ SmsTemplateLocale["Dech"] = "de-ch";
13579
+ SmsTemplateLocale["Deli"] = "de-li";
13580
+ SmsTemplateLocale["Delu"] = "de-lu";
13581
+ SmsTemplateLocale["El"] = "el";
13582
+ SmsTemplateLocale["En"] = "en";
13583
+ SmsTemplateLocale["Enau"] = "en-au";
13584
+ SmsTemplateLocale["Enbz"] = "en-bz";
13585
+ SmsTemplateLocale["Enca"] = "en-ca";
13586
+ SmsTemplateLocale["Engb"] = "en-gb";
13587
+ SmsTemplateLocale["Enie"] = "en-ie";
13588
+ SmsTemplateLocale["Enjm"] = "en-jm";
13589
+ SmsTemplateLocale["Ennz"] = "en-nz";
13590
+ SmsTemplateLocale["Entt"] = "en-tt";
13591
+ SmsTemplateLocale["Enus"] = "en-us";
13592
+ SmsTemplateLocale["Enza"] = "en-za";
13593
+ SmsTemplateLocale["Eo"] = "eo";
13594
+ SmsTemplateLocale["Es"] = "es";
13595
+ SmsTemplateLocale["Esar"] = "es-ar";
13596
+ SmsTemplateLocale["Esbo"] = "es-bo";
13597
+ SmsTemplateLocale["Escl"] = "es-cl";
13598
+ SmsTemplateLocale["Esco"] = "es-co";
13599
+ SmsTemplateLocale["Escr"] = "es-cr";
13600
+ SmsTemplateLocale["Esdo"] = "es-do";
13601
+ SmsTemplateLocale["Esec"] = "es-ec";
13602
+ SmsTemplateLocale["Esgt"] = "es-gt";
13603
+ SmsTemplateLocale["Eshn"] = "es-hn";
13604
+ SmsTemplateLocale["Esmx"] = "es-mx";
13605
+ SmsTemplateLocale["Esni"] = "es-ni";
13606
+ SmsTemplateLocale["Espa"] = "es-pa";
13607
+ SmsTemplateLocale["Espe"] = "es-pe";
13608
+ SmsTemplateLocale["Espr"] = "es-pr";
13609
+ SmsTemplateLocale["Espy"] = "es-py";
13610
+ SmsTemplateLocale["Essv"] = "es-sv";
13611
+ SmsTemplateLocale["Esuy"] = "es-uy";
13612
+ SmsTemplateLocale["Esve"] = "es-ve";
13613
+ SmsTemplateLocale["Et"] = "et";
13614
+ SmsTemplateLocale["Eu"] = "eu";
13615
+ SmsTemplateLocale["Fa"] = "fa";
13616
+ SmsTemplateLocale["Fi"] = "fi";
13617
+ SmsTemplateLocale["Fo"] = "fo";
13618
+ SmsTemplateLocale["Fr"] = "fr";
13619
+ SmsTemplateLocale["Frbe"] = "fr-be";
13620
+ SmsTemplateLocale["Frca"] = "fr-ca";
13621
+ SmsTemplateLocale["Frch"] = "fr-ch";
13622
+ SmsTemplateLocale["Frlu"] = "fr-lu";
13623
+ SmsTemplateLocale["Ga"] = "ga";
13624
+ SmsTemplateLocale["Gd"] = "gd";
13625
+ SmsTemplateLocale["He"] = "he";
13626
+ SmsTemplateLocale["Hi"] = "hi";
13627
+ SmsTemplateLocale["Hr"] = "hr";
13628
+ SmsTemplateLocale["Hu"] = "hu";
13629
+ SmsTemplateLocale["Id"] = "id";
13630
+ SmsTemplateLocale["Is"] = "is";
13631
+ SmsTemplateLocale["It"] = "it";
13632
+ SmsTemplateLocale["Itch"] = "it-ch";
13633
+ SmsTemplateLocale["Ja"] = "ja";
13634
+ SmsTemplateLocale["Ji"] = "ji";
13635
+ SmsTemplateLocale["Ko"] = "ko";
13636
+ SmsTemplateLocale["Ku"] = "ku";
13637
+ SmsTemplateLocale["Lt"] = "lt";
13638
+ SmsTemplateLocale["Lv"] = "lv";
13639
+ SmsTemplateLocale["Mk"] = "mk";
13640
+ SmsTemplateLocale["Ml"] = "ml";
13641
+ SmsTemplateLocale["Ms"] = "ms";
13642
+ SmsTemplateLocale["Mt"] = "mt";
13643
+ SmsTemplateLocale["Nb"] = "nb";
13644
+ SmsTemplateLocale["Ne"] = "ne";
13645
+ SmsTemplateLocale["Nl"] = "nl";
13646
+ SmsTemplateLocale["Nlbe"] = "nl-be";
13647
+ SmsTemplateLocale["Nn"] = "nn";
13648
+ SmsTemplateLocale["No"] = "no";
13649
+ SmsTemplateLocale["Pa"] = "pa";
13650
+ SmsTemplateLocale["Pl"] = "pl";
13651
+ SmsTemplateLocale["Pt"] = "pt";
13652
+ SmsTemplateLocale["Ptbr"] = "pt-br";
13653
+ SmsTemplateLocale["Rm"] = "rm";
13654
+ SmsTemplateLocale["Ro"] = "ro";
13655
+ SmsTemplateLocale["Romd"] = "ro-md";
13656
+ SmsTemplateLocale["Ru"] = "ru";
13657
+ SmsTemplateLocale["Rumd"] = "ru-md";
13658
+ SmsTemplateLocale["Sb"] = "sb";
13659
+ SmsTemplateLocale["Sk"] = "sk";
13660
+ SmsTemplateLocale["Sl"] = "sl";
13661
+ SmsTemplateLocale["Sq"] = "sq";
13662
+ SmsTemplateLocale["Sr"] = "sr";
13663
+ SmsTemplateLocale["Sv"] = "sv";
13664
+ SmsTemplateLocale["Svfi"] = "sv-fi";
13665
+ SmsTemplateLocale["Th"] = "th";
13666
+ SmsTemplateLocale["Tn"] = "tn";
13667
+ SmsTemplateLocale["Tr"] = "tr";
13668
+ SmsTemplateLocale["Ts"] = "ts";
13669
+ SmsTemplateLocale["Ua"] = "ua";
13670
+ SmsTemplateLocale["Ur"] = "ur";
13671
+ SmsTemplateLocale["Ve"] = "ve";
13672
+ SmsTemplateLocale["Vi"] = "vi";
13673
+ SmsTemplateLocale["Xh"] = "xh";
13674
+ SmsTemplateLocale["Zhcn"] = "zh-cn";
13675
+ SmsTemplateLocale["Zhhk"] = "zh-hk";
13676
+ SmsTemplateLocale["Zhsg"] = "zh-sg";
13677
+ SmsTemplateLocale["Zhtw"] = "zh-tw";
13678
+ SmsTemplateLocale["Zu"] = "zu";
13679
+ })(exports.SmsTemplateLocale || (exports.SmsTemplateLocale = {}));
12936
13680
 
12937
13681
  exports.ResourceType = void 0;
12938
13682
  (function (ResourceType) {
@@ -12976,20 +13720,20 @@ exports.StorageUsageRange = void 0;
12976
13720
  StorageUsageRange["NinetyDays"] = "90d";
12977
13721
  })(exports.StorageUsageRange || (exports.StorageUsageRange = {}));
12978
13722
 
12979
- exports.PasswordVersion = void 0;
12980
- (function (PasswordVersion) {
12981
- PasswordVersion["Sha1"] = "sha1";
12982
- PasswordVersion["Sha224"] = "sha224";
12983
- PasswordVersion["Sha256"] = "sha256";
12984
- PasswordVersion["Sha384"] = "sha384";
12985
- PasswordVersion["Sha512224"] = "sha512/224";
12986
- PasswordVersion["Sha512256"] = "sha512/256";
12987
- PasswordVersion["Sha512"] = "sha512";
12988
- PasswordVersion["Sha3224"] = "sha3-224";
12989
- PasswordVersion["Sha3256"] = "sha3-256";
12990
- PasswordVersion["Sha3384"] = "sha3-384";
12991
- PasswordVersion["Sha3512"] = "sha3-512";
12992
- })(exports.PasswordVersion || (exports.PasswordVersion = {}));
13723
+ exports.PasswordHash = void 0;
13724
+ (function (PasswordHash) {
13725
+ PasswordHash["Sha1"] = "sha1";
13726
+ PasswordHash["Sha224"] = "sha224";
13727
+ PasswordHash["Sha256"] = "sha256";
13728
+ PasswordHash["Sha384"] = "sha384";
13729
+ PasswordHash["Sha512224"] = "sha512/224";
13730
+ PasswordHash["Sha512256"] = "sha512/256";
13731
+ PasswordHash["Sha512"] = "sha512";
13732
+ PasswordHash["Sha3224"] = "sha3-224";
13733
+ PasswordHash["Sha3256"] = "sha3-256";
13734
+ PasswordHash["Sha3384"] = "sha3-384";
13735
+ PasswordHash["Sha3512"] = "sha3-512";
13736
+ })(exports.PasswordHash || (exports.PasswordHash = {}));
12993
13737
 
12994
13738
  exports.UserUsageRange = void 0;
12995
13739
  (function (UserUsageRange) {