@appwrite.io/console 1.9.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (746) hide show
  1. package/.github/workflows/publish.yml +9 -8
  2. package/CHANGELOG.md +51 -6
  3. package/LICENSE +1 -1
  4. package/README.md +84 -4
  5. package/dist/cjs/sdk.js +15258 -6036
  6. package/dist/cjs/sdk.js.map +1 -1
  7. package/dist/esm/sdk.js +15256 -6037
  8. package/dist/esm/sdk.js.map +1 -1
  9. package/dist/iife/sdk.js +15258 -6036
  10. package/docs/examples/account/create-billing-address.md +8 -8
  11. package/docs/examples/account/create-email-password-session.md +4 -4
  12. package/docs/examples/account/create-email-token.md +5 -5
  13. package/docs/examples/account/{update-magic-u-r-l-session.md → create-email-verification.md} +3 -4
  14. package/docs/examples/account/{update-m-f-a.md → create-jwt.md} +3 -3
  15. package/docs/examples/account/{create-magic-u-r-l-token.md → create-magic-url-token.md} +6 -6
  16. package/docs/examples/account/create-mfa-authenticator.md +3 -3
  17. package/docs/examples/account/create-mfa-challenge.md +3 -3
  18. package/docs/examples/account/create-mfa-recovery-codes.md +1 -1
  19. package/docs/examples/account/{create-o-auth2token.md → create-o-auth-2-session.md} +6 -6
  20. package/docs/examples/account/{create-o-auth2session.md → create-o-auth-2-token.md} +6 -6
  21. package/docs/examples/account/create-phone-token.md +4 -4
  22. package/docs/examples/account/create-push-target.md +5 -5
  23. package/docs/examples/account/create-recovery.md +4 -4
  24. package/docs/examples/account/create-session.md +4 -4
  25. package/docs/examples/account/create-verification.md +3 -3
  26. package/docs/examples/account/create.md +6 -6
  27. package/docs/examples/account/delete-billing-address.md +3 -3
  28. package/docs/examples/account/delete-identity.md +3 -3
  29. package/docs/examples/account/delete-mfa-authenticator.md +3 -3
  30. package/docs/examples/account/delete-payment-method.md +3 -3
  31. package/docs/examples/account/delete-push-target.md +3 -3
  32. package/docs/examples/account/delete-session.md +3 -3
  33. package/docs/examples/account/get-billing-address.md +3 -3
  34. package/docs/examples/account/get-coupon.md +3 -3
  35. package/docs/examples/account/get-mfa-recovery-codes.md +1 -1
  36. package/docs/examples/account/get-payment-method.md +3 -3
  37. package/docs/examples/account/get-session.md +3 -3
  38. package/docs/examples/account/list-billing-addresses.md +3 -3
  39. package/docs/examples/account/list-identities.md +4 -3
  40. package/docs/examples/account/list-invoices.md +3 -3
  41. package/docs/examples/account/list-logs.md +4 -3
  42. package/docs/examples/account/list-mfa-factors.md +1 -1
  43. package/docs/examples/account/list-payment-methods.md +3 -3
  44. package/docs/examples/account/update-billing-address.md +9 -9
  45. package/docs/examples/account/update-email-verification.md +14 -0
  46. package/docs/examples/account/update-email.md +4 -4
  47. package/docs/examples/account/update-magic-url-session.md +14 -0
  48. package/docs/examples/account/update-mfa-authenticator.md +4 -4
  49. package/docs/examples/account/update-mfa-challenge.md +4 -4
  50. package/docs/examples/account/update-mfa-recovery-codes.md +1 -1
  51. package/docs/examples/account/{create-j-w-t.md → update-mfa.md} +3 -1
  52. package/docs/examples/account/update-name.md +3 -3
  53. package/docs/examples/account/update-password.md +4 -4
  54. package/docs/examples/account/update-payment-method-mandate-options.md +3 -3
  55. package/docs/examples/account/update-payment-method-provider.md +6 -5
  56. package/docs/examples/account/update-payment-method.md +6 -5
  57. package/docs/examples/account/update-phone-session.md +4 -4
  58. package/docs/examples/account/update-phone-verification.md +4 -4
  59. package/docs/examples/account/update-phone.md +4 -4
  60. package/docs/examples/account/update-prefs.md +7 -3
  61. package/docs/examples/account/update-push-target.md +4 -4
  62. package/docs/examples/account/update-recovery.md +5 -5
  63. package/docs/examples/account/update-session.md +3 -3
  64. package/docs/examples/account/update-verification.md +4 -4
  65. package/docs/examples/assistant/chat.md +3 -3
  66. package/docs/examples/avatars/get-browser.md +6 -6
  67. package/docs/examples/avatars/get-credit-card.md +6 -6
  68. package/docs/examples/avatars/get-favicon.md +3 -3
  69. package/docs/examples/avatars/get-flag.md +6 -6
  70. package/docs/examples/avatars/get-image.md +5 -5
  71. package/docs/examples/avatars/get-initials.md +6 -6
  72. package/docs/examples/avatars/{get-q-r.md → get-qr.md} +6 -6
  73. package/docs/examples/avatars/get-screenshot.md +35 -0
  74. package/docs/examples/backups/create-archive.md +4 -4
  75. package/docs/examples/backups/create-policy.md +9 -9
  76. package/docs/examples/backups/create-restoration.md +6 -6
  77. package/docs/examples/backups/delete-archive.md +3 -3
  78. package/docs/examples/backups/delete-policy.md +3 -3
  79. package/docs/examples/backups/get-archive.md +3 -3
  80. package/docs/examples/backups/get-policy.md +3 -3
  81. package/docs/examples/backups/get-restoration.md +3 -3
  82. package/docs/examples/backups/list-archives.md +3 -3
  83. package/docs/examples/backups/list-policies.md +3 -3
  84. package/docs/examples/backups/list-restorations.md +3 -3
  85. package/docs/examples/backups/update-policy.md +7 -7
  86. package/docs/examples/console/create-program-membership.md +3 -3
  87. package/docs/examples/console/create-source.md +7 -7
  88. package/docs/examples/console/get-campaign.md +3 -3
  89. package/docs/examples/console/get-coupon.md +3 -3
  90. package/docs/examples/console/{plans.md → get-plan.md} +3 -1
  91. package/docs/examples/console/get-plans.md +13 -0
  92. package/docs/examples/console/{regions.md → get-program.md} +3 -1
  93. package/docs/examples/console/get-regions.md +13 -0
  94. package/docs/examples/console/get-resource.md +4 -4
  95. package/docs/examples/console/suggest-columns.md +17 -0
  96. package/docs/examples/console/suggest-indexes.md +16 -0
  97. package/docs/examples/databases/create-boolean-attribute.md +8 -8
  98. package/docs/examples/databases/create-collection.md +11 -9
  99. package/docs/examples/databases/create-datetime-attribute.md +8 -8
  100. package/docs/examples/databases/create-document.md +16 -11
  101. package/docs/examples/databases/create-documents.md +7 -6
  102. package/docs/examples/databases/create-email-attribute.md +8 -8
  103. package/docs/examples/databases/create-enum-attribute.md +9 -9
  104. package/docs/examples/databases/create-float-attribute.md +10 -10
  105. package/docs/examples/databases/create-index.md +9 -9
  106. package/docs/examples/databases/create-integer-attribute.md +10 -10
  107. package/docs/examples/databases/create-ip-attribute.md +8 -8
  108. package/docs/examples/databases/create-line-attribute.md +17 -0
  109. package/docs/examples/databases/create-operations.md +24 -0
  110. package/docs/examples/databases/create-point-attribute.md +17 -0
  111. package/docs/examples/databases/create-polygon-attribute.md +17 -0
  112. package/docs/examples/databases/create-relationship-attribute.md +10 -10
  113. package/docs/examples/databases/create-string-attribute.md +10 -10
  114. package/docs/examples/databases/create-transaction.md +13 -0
  115. package/docs/examples/databases/create-url-attribute.md +8 -8
  116. package/docs/examples/databases/create.md +5 -5
  117. package/docs/examples/databases/decrement-document-attribute.md +9 -8
  118. package/docs/examples/databases/delete-attribute.md +5 -5
  119. package/docs/examples/databases/delete-collection.md +4 -4
  120. package/docs/examples/databases/delete-document.md +6 -5
  121. package/docs/examples/databases/delete-documents.md +6 -5
  122. package/docs/examples/databases/delete-index.md +5 -5
  123. package/docs/examples/databases/{get-database-usage.md → delete-transaction.md} +4 -5
  124. package/docs/examples/databases/delete.md +3 -3
  125. package/docs/examples/databases/get-attribute.md +5 -5
  126. package/docs/examples/databases/get-collection-usage.md +6 -6
  127. package/docs/examples/databases/get-collection.md +4 -4
  128. package/docs/examples/databases/get-document.md +7 -6
  129. package/docs/examples/databases/get-index.md +5 -5
  130. package/docs/examples/databases/get-transaction.md +13 -0
  131. package/docs/examples/databases/get-usage.md +5 -4
  132. package/docs/examples/databases/get.md +3 -3
  133. package/docs/examples/databases/increment-document-attribute.md +9 -8
  134. package/docs/examples/databases/list-attributes.md +6 -5
  135. package/docs/examples/databases/list-collection-logs.md +5 -5
  136. package/docs/examples/databases/list-collections.md +6 -5
  137. package/docs/examples/databases/list-document-logs.md +6 -6
  138. package/docs/examples/databases/list-documents.md +7 -5
  139. package/docs/examples/databases/list-indexes.md +6 -5
  140. package/docs/examples/databases/list-logs.md +4 -4
  141. package/docs/examples/databases/list-transactions.md +13 -0
  142. package/docs/examples/databases/list-usage.md +13 -0
  143. package/docs/examples/databases/list.md +5 -4
  144. package/docs/examples/databases/update-boolean-attribute.md +8 -8
  145. package/docs/examples/databases/update-collection.md +9 -9
  146. package/docs/examples/databases/update-datetime-attribute.md +8 -8
  147. package/docs/examples/databases/update-document.md +15 -8
  148. package/docs/examples/databases/update-documents.md +13 -6
  149. package/docs/examples/databases/update-email-attribute.md +8 -8
  150. package/docs/examples/databases/update-enum-attribute.md +9 -9
  151. package/docs/examples/databases/update-float-attribute.md +10 -10
  152. package/docs/examples/databases/update-integer-attribute.md +10 -10
  153. package/docs/examples/databases/update-ip-attribute.md +8 -8
  154. package/docs/examples/databases/update-line-attribute.md +18 -0
  155. package/docs/examples/databases/update-point-attribute.md +18 -0
  156. package/docs/examples/databases/update-polygon-attribute.md +18 -0
  157. package/docs/examples/databases/update-relationship-attribute.md +7 -7
  158. package/docs/examples/databases/update-string-attribute.md +9 -9
  159. package/docs/examples/databases/update-transaction.md +15 -0
  160. package/docs/examples/databases/update-url-attribute.md +8 -8
  161. package/docs/examples/databases/update.md +5 -5
  162. package/docs/examples/databases/upsert-document.md +15 -8
  163. package/docs/examples/databases/upsert-documents.md +6 -5
  164. package/docs/examples/domains/create-preset-google-workspace.md +3 -3
  165. package/docs/examples/domains/create-preset-i-cloud.md +3 -3
  166. package/docs/examples/domains/create-preset-mailgun.md +3 -3
  167. package/docs/examples/domains/create-preset-outlook.md +3 -3
  168. package/docs/examples/domains/create-preset-proton-mail.md +3 -3
  169. package/docs/examples/domains/create-preset-zoho.md +3 -3
  170. package/docs/examples/domains/create-record-a.md +7 -7
  171. package/docs/examples/domains/{create-record-a-a-a-a.md → create-record-aaaa.md} +7 -7
  172. package/docs/examples/domains/create-record-alias.md +7 -7
  173. package/docs/examples/domains/{create-record-n-s.md → create-record-caa.md} +7 -7
  174. package/docs/examples/domains/{create-record-c-a-a.md → create-record-cname.md} +7 -7
  175. package/docs/examples/domains/{create-record-h-t-t-p-s.md → create-record-https.md} +7 -7
  176. package/docs/examples/domains/create-record-mx.md +18 -0
  177. package/docs/examples/domains/create-record-ns.md +17 -0
  178. package/docs/examples/domains/create-record-srv.md +20 -0
  179. package/docs/examples/domains/{create-record-c-n-a-m-e.md → create-record-txt.md} +7 -7
  180. package/docs/examples/domains/create.md +4 -4
  181. package/docs/examples/domains/delete-record.md +4 -4
  182. package/docs/examples/domains/delete.md +3 -3
  183. package/docs/examples/domains/get-preset-google-workspace.md +3 -3
  184. package/docs/examples/domains/get-preset-i-cloud.md +3 -3
  185. package/docs/examples/domains/get-preset-mailgun.md +3 -3
  186. package/docs/examples/domains/get-preset-outlook.md +3 -3
  187. package/docs/examples/domains/get-preset-proton-mail.md +3 -3
  188. package/docs/examples/domains/get-preset-zoho.md +3 -3
  189. package/docs/examples/domains/get-record.md +4 -4
  190. package/docs/examples/domains/get-zone.md +3 -3
  191. package/docs/examples/domains/get.md +3 -3
  192. package/docs/examples/domains/list-records.md +4 -4
  193. package/docs/examples/domains/list.md +4 -4
  194. package/docs/examples/domains/update-nameservers.md +3 -3
  195. package/docs/examples/domains/update-record-a.md +8 -8
  196. package/docs/examples/domains/update-record-aaaa.md +18 -0
  197. package/docs/examples/domains/update-record-alias.md +8 -8
  198. package/docs/examples/domains/update-record-caa.md +18 -0
  199. package/docs/examples/domains/update-record-cname.md +18 -0
  200. package/docs/examples/domains/update-record-https.md +18 -0
  201. package/docs/examples/domains/update-record-mx.md +19 -0
  202. package/docs/examples/domains/update-record-ns.md +18 -0
  203. package/docs/examples/domains/update-record-srv.md +21 -0
  204. package/docs/examples/domains/update-record-txt.md +18 -0
  205. package/docs/examples/domains/update-team.md +4 -4
  206. package/docs/examples/domains/update-zone.md +4 -4
  207. package/docs/examples/functions/create-deployment.md +7 -7
  208. package/docs/examples/functions/create-duplicate-deployment.md +5 -5
  209. package/docs/examples/functions/create-execution.md +9 -9
  210. package/docs/examples/functions/create-template-deployment.md +10 -9
  211. package/docs/examples/functions/create-variable.md +6 -6
  212. package/docs/examples/functions/create-vcs-deployment.md +7 -7
  213. package/docs/examples/functions/create.md +21 -21
  214. package/docs/examples/functions/delete-deployment.md +4 -4
  215. package/docs/examples/functions/delete-execution.md +4 -4
  216. package/docs/examples/functions/delete-variable.md +4 -4
  217. package/docs/examples/functions/delete.md +3 -3
  218. package/docs/examples/functions/get-deployment-download.md +5 -5
  219. package/docs/examples/functions/get-deployment.md +4 -4
  220. package/docs/examples/functions/get-execution.md +4 -4
  221. package/docs/examples/functions/get-template.md +3 -3
  222. package/docs/examples/functions/get-usage.md +5 -5
  223. package/docs/examples/functions/get-variable.md +4 -4
  224. package/docs/examples/functions/get.md +3 -3
  225. package/docs/examples/functions/list-deployments.md +6 -5
  226. package/docs/examples/functions/list-executions.md +5 -4
  227. package/docs/examples/functions/list-templates.md +7 -6
  228. package/docs/examples/functions/list-usage.md +4 -4
  229. package/docs/examples/functions/list-variables.md +3 -3
  230. package/docs/examples/functions/list.md +5 -4
  231. package/docs/examples/functions/update-deployment-status.md +4 -4
  232. package/docs/examples/functions/update-function-deployment.md +4 -4
  233. package/docs/examples/functions/update-variable.md +7 -7
  234. package/docs/examples/functions/update.md +21 -21
  235. package/docs/examples/graphql/mutation.md +3 -3
  236. package/docs/examples/graphql/query.md +3 -3
  237. package/docs/examples/health/get-certificate.md +3 -3
  238. package/docs/examples/health/get-failed-jobs.md +5 -5
  239. package/docs/examples/health/get-queue-billing-project-aggregation.md +3 -3
  240. package/docs/examples/health/get-queue-billing-team-aggregation.md +3 -3
  241. package/docs/examples/health/get-queue-builds.md +3 -3
  242. package/docs/examples/health/get-queue-certificates.md +3 -3
  243. package/docs/examples/health/get-queue-databases.md +4 -4
  244. package/docs/examples/health/get-queue-deletes.md +3 -3
  245. package/docs/examples/health/get-queue-functions.md +3 -3
  246. package/docs/examples/health/get-queue-logs.md +3 -3
  247. package/docs/examples/health/get-queue-mails.md +3 -3
  248. package/docs/examples/health/get-queue-messaging.md +3 -3
  249. package/docs/examples/health/get-queue-migrations.md +3 -3
  250. package/docs/examples/health/get-queue-priority-builds.md +3 -3
  251. package/docs/examples/health/get-queue-region-manager.md +3 -3
  252. package/docs/examples/health/get-queue-stats-resources.md +3 -3
  253. package/docs/examples/health/get-queue-threats.md +13 -0
  254. package/docs/examples/health/get-queue-usage.md +3 -3
  255. package/docs/examples/health/get-queue-webhooks.md +3 -3
  256. package/docs/examples/messaging/create-apns-provider.md +10 -10
  257. package/docs/examples/messaging/create-email.md +14 -14
  258. package/docs/examples/messaging/create-fcm-provider.md +6 -6
  259. package/docs/examples/messaging/create-mailgun-provider.md +12 -12
  260. package/docs/examples/messaging/{create-msg91provider.md → create-msg-91-provider.md} +8 -8
  261. package/docs/examples/messaging/create-push.md +21 -21
  262. package/docs/examples/messaging/create-resend-provider.md +20 -0
  263. package/docs/examples/messaging/create-sendgrid-provider.md +10 -10
  264. package/docs/examples/messaging/create-sms.md +9 -9
  265. package/docs/examples/messaging/create-smtp-provider.md +16 -16
  266. package/docs/examples/messaging/create-subscriber.md +5 -5
  267. package/docs/examples/messaging/create-telesign-provider.md +8 -8
  268. package/docs/examples/messaging/create-textmagic-provider.md +8 -8
  269. package/docs/examples/messaging/create-topic.md +5 -5
  270. package/docs/examples/messaging/create-twilio-provider.md +8 -8
  271. package/docs/examples/messaging/create-vonage-provider.md +8 -8
  272. package/docs/examples/messaging/delete-provider.md +3 -3
  273. package/docs/examples/messaging/delete-subscriber.md +4 -4
  274. package/docs/examples/messaging/delete-topic.md +3 -3
  275. package/docs/examples/messaging/delete.md +3 -3
  276. package/docs/examples/messaging/get-message.md +3 -3
  277. package/docs/examples/messaging/get-provider.md +3 -3
  278. package/docs/examples/messaging/get-subscriber.md +4 -4
  279. package/docs/examples/messaging/get-topic.md +3 -3
  280. package/docs/examples/messaging/list-message-logs.md +5 -4
  281. package/docs/examples/messaging/list-messages.md +5 -4
  282. package/docs/examples/messaging/list-provider-logs.md +5 -4
  283. package/docs/examples/messaging/list-providers.md +5 -4
  284. package/docs/examples/messaging/list-subscriber-logs.md +5 -4
  285. package/docs/examples/messaging/list-subscribers.md +6 -5
  286. package/docs/examples/messaging/list-targets.md +5 -4
  287. package/docs/examples/messaging/list-topic-logs.md +5 -4
  288. package/docs/examples/messaging/list-topics.md +5 -4
  289. package/docs/examples/messaging/update-apns-provider.md +10 -10
  290. package/docs/examples/messaging/update-email.md +14 -14
  291. package/docs/examples/messaging/update-fcm-provider.md +6 -6
  292. package/docs/examples/messaging/update-mailgun-provider.md +12 -12
  293. package/docs/examples/messaging/{update-msg91provider.md → update-msg-91-provider.md} +8 -8
  294. package/docs/examples/messaging/update-push.md +21 -21
  295. package/docs/examples/messaging/update-resend-provider.md +20 -0
  296. package/docs/examples/messaging/update-sendgrid-provider.md +10 -10
  297. package/docs/examples/messaging/update-sms.md +9 -9
  298. package/docs/examples/messaging/update-smtp-provider.md +16 -16
  299. package/docs/examples/messaging/update-telesign-provider.md +8 -8
  300. package/docs/examples/messaging/update-textmagic-provider.md +8 -8
  301. package/docs/examples/messaging/update-topic.md +5 -5
  302. package/docs/examples/messaging/update-twilio-provider.md +8 -8
  303. package/docs/examples/messaging/update-vonage-provider.md +8 -8
  304. package/docs/examples/migrations/create-appwrite-migration.md +6 -6
  305. package/docs/examples/migrations/create-csv-export.md +21 -0
  306. package/docs/examples/migrations/{create-csv-migration.md → create-csv-import.md} +6 -5
  307. package/docs/examples/migrations/create-firebase-migration.md +4 -4
  308. package/docs/examples/migrations/create-n-host-migration.md +10 -10
  309. package/docs/examples/migrations/create-supabase-migration.md +9 -9
  310. package/docs/examples/migrations/delete.md +3 -3
  311. package/docs/examples/migrations/get-appwrite-report.md +6 -6
  312. package/docs/examples/migrations/get-firebase-report.md +4 -4
  313. package/docs/examples/migrations/get-n-host-report.md +10 -10
  314. package/docs/examples/migrations/get-supabase-report.md +9 -9
  315. package/docs/examples/migrations/get.md +3 -3
  316. package/docs/examples/migrations/list.md +5 -4
  317. package/docs/examples/migrations/retry.md +3 -3
  318. package/docs/examples/organizations/add-credit.md +4 -4
  319. package/docs/examples/organizations/cancel-downgrade.md +3 -3
  320. package/docs/examples/organizations/create-downgrade-feedback.md +17 -0
  321. package/docs/examples/organizations/create-invoice-payment.md +5 -5
  322. package/docs/examples/organizations/create.md +13 -12
  323. package/docs/examples/organizations/delete-backup-payment-method.md +3 -3
  324. package/docs/examples/organizations/delete-billing-address.md +3 -3
  325. package/docs/examples/organizations/delete-default-payment-method.md +3 -3
  326. package/docs/examples/organizations/delete.md +3 -3
  327. package/docs/examples/organizations/estimation-create-organization.md +8 -7
  328. package/docs/examples/organizations/estimation-delete-organization.md +3 -3
  329. package/docs/examples/organizations/estimation-update-plan.md +7 -7
  330. package/docs/examples/organizations/get-aggregation.md +6 -4
  331. package/docs/examples/organizations/get-available-credits.md +13 -0
  332. package/docs/examples/organizations/get-billing-address.md +4 -4
  333. package/docs/examples/organizations/get-credit.md +4 -4
  334. package/docs/examples/organizations/get-invoice-download.md +4 -4
  335. package/docs/examples/organizations/get-invoice-view.md +4 -4
  336. package/docs/examples/organizations/get-invoice.md +4 -4
  337. package/docs/examples/organizations/get-payment-method.md +4 -4
  338. package/docs/examples/organizations/get-plan.md +3 -3
  339. package/docs/examples/organizations/get-scopes.md +3 -3
  340. package/docs/examples/organizations/get-usage.md +5 -5
  341. package/docs/examples/organizations/list-aggregations.md +4 -4
  342. package/docs/examples/organizations/list-credits.md +4 -4
  343. package/docs/examples/organizations/list-invoices.md +4 -4
  344. package/docs/examples/organizations/list.md +4 -4
  345. package/docs/examples/organizations/set-backup-payment-method.md +4 -4
  346. package/docs/examples/organizations/set-billing-address.md +4 -4
  347. package/docs/examples/organizations/set-billing-email.md +4 -4
  348. package/docs/examples/organizations/set-billing-tax-id.md +4 -4
  349. package/docs/examples/organizations/set-default-payment-method.md +4 -4
  350. package/docs/examples/organizations/update-budget.md +5 -5
  351. package/docs/examples/organizations/update-plan.md +11 -11
  352. package/docs/examples/organizations/update-projects.md +14 -0
  353. package/docs/examples/organizations/validate-invoice.md +4 -4
  354. package/docs/examples/organizations/validate-payment.md +4 -4
  355. package/docs/examples/project/create-variable.md +5 -5
  356. package/docs/examples/project/delete-variable.md +3 -3
  357. package/docs/examples/project/get-usage.md +5 -5
  358. package/docs/examples/project/get-variable.md +3 -3
  359. package/docs/examples/project/update-variable.md +6 -6
  360. package/docs/examples/projects/create-dev-key.md +5 -5
  361. package/docs/examples/projects/{create-j-w-t.md → create-jwt.md} +5 -5
  362. package/docs/examples/projects/create-key.md +6 -6
  363. package/docs/examples/projects/create-platform.md +8 -8
  364. package/docs/examples/projects/create-smtp-test.md +12 -12
  365. package/docs/examples/projects/create-webhook.md +10 -10
  366. package/docs/examples/projects/create.md +16 -16
  367. package/docs/examples/projects/delete-dev-key.md +4 -4
  368. package/docs/examples/projects/delete-email-template.md +5 -5
  369. package/docs/examples/projects/delete-key.md +4 -4
  370. package/docs/examples/projects/delete-platform.md +4 -4
  371. package/docs/examples/projects/delete-sms-template.md +5 -5
  372. package/docs/examples/projects/delete-webhook.md +4 -4
  373. package/docs/examples/projects/delete.md +3 -3
  374. package/docs/examples/projects/get-dev-key.md +4 -4
  375. package/docs/examples/projects/get-email-template.md +5 -5
  376. package/docs/examples/projects/get-key.md +4 -4
  377. package/docs/examples/projects/get-platform.md +4 -4
  378. package/docs/examples/projects/get-sms-template.md +5 -5
  379. package/docs/examples/projects/get-webhook.md +4 -4
  380. package/docs/examples/projects/get.md +3 -3
  381. package/docs/examples/projects/list-dev-keys.md +4 -4
  382. package/docs/examples/projects/list-keys.md +4 -3
  383. package/docs/examples/projects/list-platforms.md +4 -3
  384. package/docs/examples/projects/list-webhooks.md +4 -3
  385. package/docs/examples/projects/list.md +5 -4
  386. package/docs/examples/projects/update-api-status-all.md +4 -4
  387. package/docs/examples/projects/update-api-status.md +6 -6
  388. package/docs/examples/projects/update-auth-duration.md +4 -4
  389. package/docs/examples/projects/update-auth-limit.md +4 -4
  390. package/docs/examples/projects/update-auth-password-dictionary.md +4 -4
  391. package/docs/examples/projects/update-auth-password-history.md +4 -4
  392. package/docs/examples/projects/update-auth-sessions-limit.md +4 -4
  393. package/docs/examples/projects/update-auth-status.md +5 -5
  394. package/docs/examples/projects/update-dev-key.md +6 -6
  395. package/docs/examples/projects/update-email-template.md +10 -10
  396. package/docs/examples/projects/update-key.md +7 -7
  397. package/docs/examples/projects/update-memberships-privacy.md +6 -6
  398. package/docs/examples/projects/update-mock-numbers.md +4 -4
  399. package/docs/examples/projects/{update-o-auth2.md → update-o-auth-2.md} +7 -7
  400. package/docs/examples/projects/update-personal-data-check.md +4 -4
  401. package/docs/examples/projects/update-platform.md +8 -8
  402. package/docs/examples/projects/update-service-status-all.md +4 -4
  403. package/docs/examples/projects/update-service-status.md +5 -5
  404. package/docs/examples/projects/update-session-alerts.md +4 -4
  405. package/docs/examples/projects/update-session-invalidation.md +14 -0
  406. package/docs/examples/projects/update-sms-template.md +6 -6
  407. package/docs/examples/projects/update-smtp.md +12 -12
  408. package/docs/examples/projects/update-status.md +14 -0
  409. package/docs/examples/projects/update-team.md +4 -4
  410. package/docs/examples/projects/update-webhook-signature.md +4 -4
  411. package/docs/examples/projects/update-webhook.md +11 -11
  412. package/docs/examples/projects/update.md +13 -13
  413. package/docs/examples/proxy/{create-a-p-i-rule.md → create-api-rule.md} +3 -3
  414. package/docs/examples/proxy/create-function-rule.md +5 -5
  415. package/docs/examples/proxy/create-redirect-rule.md +8 -8
  416. package/docs/examples/proxy/create-site-rule.md +5 -5
  417. package/docs/examples/proxy/delete-rule.md +3 -3
  418. package/docs/examples/proxy/get-rule.md +3 -3
  419. package/docs/examples/proxy/list-rules.md +5 -4
  420. package/docs/examples/proxy/update-rule-verification.md +3 -3
  421. package/docs/examples/sites/create-deployment.md +8 -8
  422. package/docs/examples/sites/create-duplicate-deployment.md +4 -4
  423. package/docs/examples/sites/create-template-deployment.md +10 -9
  424. package/docs/examples/sites/create-variable.md +6 -6
  425. package/docs/examples/sites/create-vcs-deployment.md +7 -7
  426. package/docs/examples/sites/create.md +21 -21
  427. package/docs/examples/sites/delete-deployment.md +4 -4
  428. package/docs/examples/sites/delete-log.md +4 -4
  429. package/docs/examples/sites/delete-variable.md +4 -4
  430. package/docs/examples/sites/delete.md +3 -3
  431. package/docs/examples/sites/get-deployment-download.md +5 -5
  432. package/docs/examples/sites/get-deployment.md +4 -4
  433. package/docs/examples/sites/get-log.md +4 -4
  434. package/docs/examples/sites/get-template.md +3 -3
  435. package/docs/examples/sites/get-usage.md +5 -5
  436. package/docs/examples/sites/get-variable.md +4 -4
  437. package/docs/examples/sites/get.md +3 -3
  438. package/docs/examples/sites/list-deployments.md +6 -5
  439. package/docs/examples/sites/list-logs.md +5 -4
  440. package/docs/examples/sites/list-templates.md +6 -6
  441. package/docs/examples/sites/list-usage.md +4 -4
  442. package/docs/examples/sites/list-variables.md +3 -3
  443. package/docs/examples/sites/list.md +5 -4
  444. package/docs/examples/sites/update-deployment-status.md +4 -4
  445. package/docs/examples/sites/update-site-deployment.md +4 -4
  446. package/docs/examples/sites/update-variable.md +7 -7
  447. package/docs/examples/sites/update.md +21 -21
  448. package/docs/examples/storage/create-bucket.md +14 -13
  449. package/docs/examples/storage/create-file.md +7 -7
  450. package/docs/examples/storage/delete-bucket.md +3 -3
  451. package/docs/examples/storage/delete-file.md +4 -4
  452. package/docs/examples/storage/get-bucket-usage.md +5 -5
  453. package/docs/examples/storage/get-bucket.md +3 -3
  454. package/docs/examples/storage/get-file-download.md +5 -5
  455. package/docs/examples/storage/get-file-preview.md +16 -16
  456. package/docs/examples/storage/get-file-view.md +5 -5
  457. package/docs/examples/storage/get-file.md +4 -4
  458. package/docs/examples/storage/get-usage.md +4 -4
  459. package/docs/examples/storage/list-buckets.md +5 -4
  460. package/docs/examples/storage/list-files.md +6 -5
  461. package/docs/examples/storage/update-bucket.md +14 -13
  462. package/docs/examples/storage/update-file.md +7 -7
  463. package/docs/examples/tablesdb/create-boolean-column.md +18 -0
  464. package/docs/examples/tablesdb/create-datetime-column.md +18 -0
  465. package/docs/examples/tablesdb/create-email-column.md +18 -0
  466. package/docs/examples/tablesdb/create-enum-column.md +19 -0
  467. package/docs/examples/tablesdb/create-float-column.md +20 -0
  468. package/docs/examples/tablesdb/create-index.md +19 -0
  469. package/docs/examples/tablesdb/create-integer-column.md +20 -0
  470. package/docs/examples/tablesdb/create-ip-column.md +18 -0
  471. package/docs/examples/tablesdb/create-line-column.md +17 -0
  472. package/docs/examples/tablesdb/create-operations.md +24 -0
  473. package/docs/examples/tablesdb/create-point-column.md +17 -0
  474. package/docs/examples/tablesdb/create-polygon-column.md +17 -0
  475. package/docs/examples/tablesdb/create-relationship-column.md +20 -0
  476. package/docs/examples/tablesdb/create-row.md +24 -0
  477. package/docs/examples/tablesdb/create-rows.md +16 -0
  478. package/docs/examples/tablesdb/create-string-column.md +20 -0
  479. package/docs/examples/tablesdb/create-table.md +20 -0
  480. package/docs/examples/tablesdb/create-transaction.md +13 -0
  481. package/docs/examples/tablesdb/create-url-column.md +18 -0
  482. package/docs/examples/tablesdb/create.md +15 -0
  483. package/docs/examples/tablesdb/decrement-row-column.md +19 -0
  484. package/docs/examples/tablesdb/delete-column.md +15 -0
  485. package/docs/examples/tablesdb/delete-index.md +15 -0
  486. package/docs/examples/tablesdb/delete-row.md +16 -0
  487. package/docs/examples/tablesdb/delete-rows.md +16 -0
  488. package/docs/examples/tablesdb/delete-table.md +14 -0
  489. package/docs/examples/tablesdb/delete-transaction.md +13 -0
  490. package/docs/examples/tablesdb/delete.md +13 -0
  491. package/docs/examples/tablesdb/get-column.md +15 -0
  492. package/docs/examples/tablesdb/get-index.md +15 -0
  493. package/docs/examples/tablesdb/get-row.md +17 -0
  494. package/docs/examples/tablesdb/get-table-usage.md +15 -0
  495. package/docs/examples/tablesdb/get-table.md +14 -0
  496. package/docs/examples/tablesdb/get-transaction.md +13 -0
  497. package/docs/examples/tablesdb/get-usage.md +14 -0
  498. package/docs/examples/tablesdb/get.md +13 -0
  499. package/docs/examples/tablesdb/increment-row-column.md +19 -0
  500. package/docs/examples/tablesdb/list-columns.md +16 -0
  501. package/docs/examples/tablesdb/list-indexes.md +16 -0
  502. package/docs/examples/tablesdb/list-row-logs.md +16 -0
  503. package/docs/examples/tablesdb/list-rows.md +17 -0
  504. package/docs/examples/tablesdb/list-table-logs.md +15 -0
  505. package/docs/examples/tablesdb/list-tables.md +16 -0
  506. package/docs/examples/tablesdb/list-transactions.md +13 -0
  507. package/docs/examples/tablesdb/list-usage.md +13 -0
  508. package/docs/examples/tablesdb/list.md +15 -0
  509. package/docs/examples/tablesdb/update-boolean-column.md +18 -0
  510. package/docs/examples/tablesdb/update-datetime-column.md +18 -0
  511. package/docs/examples/tablesdb/update-email-column.md +18 -0
  512. package/docs/examples/tablesdb/update-enum-column.md +19 -0
  513. package/docs/examples/tablesdb/update-float-column.md +20 -0
  514. package/docs/examples/tablesdb/update-integer-column.md +20 -0
  515. package/docs/examples/tablesdb/update-ip-column.md +18 -0
  516. package/docs/examples/tablesdb/update-line-column.md +18 -0
  517. package/docs/examples/tablesdb/update-point-column.md +18 -0
  518. package/docs/examples/tablesdb/update-polygon-column.md +18 -0
  519. package/docs/examples/tablesdb/update-relationship-column.md +17 -0
  520. package/docs/examples/tablesdb/update-row.md +24 -0
  521. package/docs/examples/tablesdb/update-rows.md +23 -0
  522. package/docs/examples/tablesdb/update-string-column.md +19 -0
  523. package/docs/examples/tablesdb/update-table.md +18 -0
  524. package/docs/examples/tablesdb/update-transaction.md +15 -0
  525. package/docs/examples/tablesdb/update-url-column.md +18 -0
  526. package/docs/examples/tablesdb/update.md +15 -0
  527. package/docs/examples/tablesdb/upsert-row.md +24 -0
  528. package/docs/examples/tablesdb/upsert-rows.md +16 -0
  529. package/docs/examples/teams/create-membership.md +9 -9
  530. package/docs/examples/teams/create.md +5 -5
  531. package/docs/examples/teams/delete-membership.md +4 -4
  532. package/docs/examples/teams/delete.md +3 -3
  533. package/docs/examples/teams/get-membership.md +4 -4
  534. package/docs/examples/teams/get-prefs.md +3 -3
  535. package/docs/examples/teams/get.md +3 -3
  536. package/docs/examples/teams/list-logs.md +5 -4
  537. package/docs/examples/teams/list-memberships.md +6 -5
  538. package/docs/examples/teams/list.md +5 -4
  539. package/docs/examples/teams/update-membership-status.md +6 -6
  540. package/docs/examples/teams/update-membership.md +5 -5
  541. package/docs/examples/teams/update-name.md +4 -4
  542. package/docs/examples/teams/update-prefs.md +4 -4
  543. package/docs/examples/tokens/create-file-token.md +5 -5
  544. package/docs/examples/tokens/delete.md +3 -3
  545. package/docs/examples/tokens/get.md +3 -3
  546. package/docs/examples/tokens/list.md +6 -5
  547. package/docs/examples/tokens/update.md +4 -4
  548. package/docs/examples/users/{create-m-d5user.md → create-argon-2-user.md} +6 -6
  549. package/docs/examples/users/create-bcrypt-user.md +6 -6
  550. package/docs/examples/users/{create-j-w-t.md → create-jwt.md} +5 -5
  551. package/docs/examples/users/{create-argon2user.md → create-md-5-user.md} +6 -6
  552. package/docs/examples/users/create-mfa-recovery-codes.md +3 -3
  553. package/docs/examples/users/{create-p-h-pass-user.md → create-ph-pass-user.md} +6 -6
  554. package/docs/examples/users/create-scrypt-modified-user.md +9 -9
  555. package/docs/examples/users/create-scrypt-user.md +11 -11
  556. package/docs/examples/users/create-session.md +3 -3
  557. package/docs/examples/users/{create-s-h-a-user.md → create-sha-user.md} +7 -7
  558. package/docs/examples/users/create-target.md +8 -8
  559. package/docs/examples/users/create-token.md +5 -5
  560. package/docs/examples/users/create.md +7 -7
  561. package/docs/examples/users/delete-identity.md +3 -3
  562. package/docs/examples/users/delete-mfa-authenticator.md +4 -4
  563. package/docs/examples/users/delete-session.md +4 -4
  564. package/docs/examples/users/delete-sessions.md +3 -3
  565. package/docs/examples/users/delete-target.md +4 -4
  566. package/docs/examples/users/delete.md +3 -3
  567. package/docs/examples/users/get-mfa-recovery-codes.md +3 -3
  568. package/docs/examples/users/get-prefs.md +3 -3
  569. package/docs/examples/users/get-target.md +4 -4
  570. package/docs/examples/users/get-usage.md +4 -4
  571. package/docs/examples/users/get.md +3 -3
  572. package/docs/examples/users/list-identities.md +5 -4
  573. package/docs/examples/users/list-logs.md +5 -4
  574. package/docs/examples/users/list-memberships.md +6 -5
  575. package/docs/examples/users/list-mfa-factors.md +3 -3
  576. package/docs/examples/users/list-sessions.md +4 -3
  577. package/docs/examples/users/list-targets.md +5 -4
  578. package/docs/examples/users/list.md +5 -4
  579. package/docs/examples/users/update-email-verification.md +4 -4
  580. package/docs/examples/users/update-email.md +4 -4
  581. package/docs/examples/users/update-labels.md +4 -4
  582. package/docs/examples/users/update-mfa-recovery-codes.md +3 -3
  583. package/docs/examples/users/update-mfa.md +4 -4
  584. package/docs/examples/users/update-name.md +4 -4
  585. package/docs/examples/users/update-password.md +4 -4
  586. package/docs/examples/users/update-phone-verification.md +4 -4
  587. package/docs/examples/users/update-phone.md +4 -4
  588. package/docs/examples/users/update-prefs.md +4 -4
  589. package/docs/examples/users/update-status.md +4 -4
  590. package/docs/examples/users/update-target.md +7 -7
  591. package/docs/examples/vcs/create-repository-detection.md +6 -6
  592. package/docs/examples/vcs/create-repository.md +5 -5
  593. package/docs/examples/vcs/delete-installation.md +3 -3
  594. package/docs/examples/vcs/get-installation.md +3 -3
  595. package/docs/examples/vcs/get-repository-contents.md +6 -5
  596. package/docs/examples/vcs/get-repository.md +4 -4
  597. package/docs/examples/vcs/list-installations.md +5 -4
  598. package/docs/examples/vcs/list-repositories.md +6 -5
  599. package/docs/examples/vcs/list-repository-branches.md +4 -4
  600. package/docs/examples/vcs/update-external-deployments.md +5 -5
  601. package/package.json +4 -4
  602. package/src/client.ts +42 -7
  603. package/src/enums/api-service.ts +1 -0
  604. package/src/enums/attribute-status.ts +7 -0
  605. package/src/enums/billing-plan-group.ts +5 -0
  606. package/src/enums/build-runtime.ts +2 -0
  607. package/src/enums/column-status.ts +7 -0
  608. package/src/enums/credit-card.ts +1 -1
  609. package/src/enums/database-type.ts +4 -0
  610. package/src/enums/deployment-status.ts +7 -0
  611. package/src/enums/execution-method.ts +1 -0
  612. package/src/enums/execution-status.ts +7 -0
  613. package/src/enums/execution-trigger.ts +5 -0
  614. package/src/enums/framework.ts +1 -0
  615. package/src/enums/health-antivirus-status.ts +5 -0
  616. package/src/enums/health-check-status.ts +4 -0
  617. package/src/enums/index-status.ts +7 -0
  618. package/src/enums/index-type.ts +1 -0
  619. package/src/enums/message-status.ts +7 -0
  620. package/src/enums/o-auth-provider.ts +3 -0
  621. package/src/enums/platform.ts +4 -0
  622. package/src/enums/proxy-rule-deployment-resource-type.ts +4 -0
  623. package/src/enums/proxy-rule-status.ts +6 -0
  624. package/src/enums/region.ts +3 -0
  625. package/src/enums/runtime.ts +2 -0
  626. package/src/enums/status.ts +4 -0
  627. package/src/enums/template-reference-type.ts +5 -0
  628. package/src/enums/theme.ts +4 -0
  629. package/src/enums/timezone.ts +421 -0
  630. package/src/enums/{user-usage-range.ts → usage-range.ts} +1 -1
  631. package/src/enums/{v-c-s-deployment-type.ts → vcs-reference-type.ts} +1 -1
  632. package/src/index.ts +27 -11
  633. package/src/models.ts +1925 -239
  634. package/src/operator.ts +308 -0
  635. package/src/query.ts +246 -2
  636. package/src/services/account.ts +2278 -235
  637. package/src/services/assistant.ts +29 -3
  638. package/src/services/avatars.ts +511 -52
  639. package/src/services/backups.ts +400 -42
  640. package/src/services/console.ts +499 -19
  641. package/src/services/databases.ts +3584 -430
  642. package/src/services/domains.ts +1795 -266
  643. package/src/services/functions.ts +1197 -155
  644. package/src/services/graphql.ts +56 -4
  645. package/src/services/health.ts +586 -42
  646. package/src/services/locale.ts +18 -2
  647. package/src/services/messaging.ts +3418 -386
  648. package/src/services/migrations.ts +653 -65
  649. package/src/services/organizations.ts +1411 -126
  650. package/src/services/project.ts +173 -17
  651. package/src/services/projects.ts +2808 -282
  652. package/src/services/proxy.ts +272 -26
  653. package/src/services/realtime.ts +437 -0
  654. package/src/services/sites.ts +1129 -143
  655. package/src/services/storage.ts +672 -89
  656. package/src/services/tables-db.ts +5439 -0
  657. package/src/services/teams.ts +535 -65
  658. package/src/services/tokens.ts +171 -16
  659. package/src/services/users.ts +1916 -182
  660. package/src/services/vcs.ts +373 -41
  661. package/types/client.d.ts +14 -5
  662. package/types/enums/api-service.d.ts +1 -0
  663. package/types/enums/attribute-status.d.ts +7 -0
  664. package/types/enums/billing-plan-group.d.ts +5 -0
  665. package/types/enums/build-runtime.d.ts +3 -1
  666. package/types/enums/column-status.d.ts +7 -0
  667. package/types/enums/credit-card.d.ts +1 -1
  668. package/types/enums/database-type.d.ts +4 -0
  669. package/types/enums/deployment-status.d.ts +7 -0
  670. package/types/enums/execution-method.d.ts +2 -1
  671. package/types/enums/execution-status.d.ts +7 -0
  672. package/types/enums/execution-trigger.d.ts +5 -0
  673. package/types/enums/framework.d.ts +1 -0
  674. package/types/enums/health-antivirus-status.d.ts +5 -0
  675. package/types/enums/health-check-status.d.ts +4 -0
  676. package/types/enums/index-status.d.ts +7 -0
  677. package/types/enums/index-type.d.ts +2 -1
  678. package/types/enums/message-status.d.ts +7 -0
  679. package/types/enums/o-auth-provider.d.ts +4 -1
  680. package/types/enums/platform.d.ts +4 -0
  681. package/types/enums/proxy-rule-deployment-resource-type.d.ts +4 -0
  682. package/types/enums/proxy-rule-status.d.ts +6 -0
  683. package/types/enums/region.d.ts +4 -1
  684. package/types/enums/runtime.d.ts +3 -1
  685. package/types/enums/status.d.ts +4 -0
  686. package/types/enums/template-reference-type.d.ts +5 -0
  687. package/types/enums/theme.d.ts +4 -0
  688. package/types/enums/timezone.d.ts +421 -0
  689. package/types/enums/{site-usage-range.d.ts → usage-range.d.ts} +1 -1
  690. package/types/enums/{v-c-s-deployment-type.d.ts → vcs-reference-type.d.ts} +1 -1
  691. package/types/index.d.ts +27 -11
  692. package/types/models.d.ts +1877 -422
  693. package/types/operator.d.ts +180 -0
  694. package/types/query.d.ts +198 -2
  695. package/types/services/account.d.ts +1020 -158
  696. package/types/services/assistant.d.ts +13 -2
  697. package/types/services/avatars.d.ts +263 -45
  698. package/types/services/backups.d.ts +190 -30
  699. package/types/services/console.d.ts +202 -15
  700. package/types/services/databases.d.ts +1756 -299
  701. package/types/services/domains.d.ts +971 -219
  702. package/types/services/functions.d.ts +622 -131
  703. package/types/services/graphql.d.ts +24 -2
  704. package/types/services/health.d.ts +246 -24
  705. package/types/services/locale.d.ts +2 -2
  706. package/types/services/messaging.d.ts +1670 -281
  707. package/types/services/migrations.d.ts +319 -53
  708. package/types/services/organizations.d.ts +664 -109
  709. package/types/services/project.d.ts +81 -12
  710. package/types/services/projects.d.ts +1308 -202
  711. package/types/services/proxy.d.ts +128 -19
  712. package/types/services/realtime.d.ts +118 -0
  713. package/types/services/sites.d.ts +580 -119
  714. package/types/services/storage.d.ts +362 -81
  715. package/types/services/tables-db.d.ts +2040 -0
  716. package/types/services/teams.d.ts +277 -61
  717. package/types/services/tokens.d.ts +80 -12
  718. package/types/services/users.d.ts +906 -149
  719. package/types/services/vcs.d.ts +182 -34
  720. package/docs/examples/domains/create-record-m-x.md +0 -18
  721. package/docs/examples/domains/create-record-s-r-v.md +0 -20
  722. package/docs/examples/domains/create-record-t-x-t.md +0 -17
  723. package/docs/examples/domains/update-record-a-a-a-a.md +0 -18
  724. package/docs/examples/domains/update-record-c-a-a.md +0 -18
  725. package/docs/examples/domains/update-record-c-n-a-m-e.md +0 -18
  726. package/docs/examples/domains/update-record-h-t-t-p-s.md +0 -18
  727. package/docs/examples/domains/update-record-m-x.md +0 -19
  728. package/docs/examples/domains/update-record-n-s.md +0 -18
  729. package/docs/examples/domains/update-record-s-r-v.md +0 -21
  730. package/docs/examples/domains/update-record-t-x-t.md +0 -18
  731. package/src/enums/billing-plan.ts +0 -5
  732. package/src/enums/database-usage-range.ts +0 -5
  733. package/src/enums/function-usage-range.ts +0 -5
  734. package/src/enums/site-usage-range.ts +0 -5
  735. package/src/enums/storage-usage-range.ts +0 -5
  736. package/types/enums/billing-plan.d.ts +0 -5
  737. package/types/enums/database-usage-range.d.ts +0 -5
  738. package/types/enums/function-usage-range.d.ts +0 -5
  739. package/types/enums/storage-usage-range.d.ts +0 -5
  740. package/types/enums/user-usage-range.d.ts +0 -5
  741. /package/docs/examples/health/{get-d-b.md → get-db.md} +0 -0
  742. /package/docs/examples/locale/{list-countries-e-u.md → list-countries-eu.md} +0 -0
  743. /package/src/enums/{s-m-t-p-secure.ts → smtp-secure.ts} +0 -0
  744. /package/src/enums/{v-c-s-detection-type.ts → vcs-detection-type.ts} +0 -0
  745. /package/types/enums/{s-m-t-p-secure.d.ts → smtp-secure.d.ts} +0 -0
  746. /package/types/enums/{v-c-s-detection-type.d.ts → vcs-detection-type.d.ts} +0 -0
@@ -1,13 +1,15 @@
1
1
  import { Service } from '../service';
2
2
  import { AppwriteException, Client, type Payload, UploadProgress } from '../client';
3
3
  import type { Models } from '../models';
4
+
4
5
  import { Region } from '../enums/region';
5
6
  import { Api } from '../enums/api';
6
7
  import { AuthMethod } from '../enums/auth-method';
7
8
  import { OAuthProvider } from '../enums/o-auth-provider';
8
9
  import { PlatformType } from '../enums/platform-type';
9
10
  import { ApiService } from '../enums/api-service';
10
- import { SMTPSecure } from '../enums/s-m-t-p-secure';
11
+ import { SMTPSecure } from '../enums/smtp-secure';
12
+ import { Status } from '../enums/status';
11
13
  import { EmailTemplateType } from '../enums/email-template-type';
12
14
  import { EmailTemplateLocale } from '../enums/email-template-locale';
13
15
  import { SmsTemplateType } from '../enums/sms-template-type';
@@ -23,12 +25,45 @@ export class Projects {
23
25
  /**
24
26
  * Get a list of all projects. You can use the query params to filter your results.
25
27
  *
26
- * @param {string[]} queries
27
- * @param {string} search
28
+ * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, teamId
29
+ * @param {string} params.search - Search term to filter your list results. Max length: 256 chars.
30
+ * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
31
+ * @throws {AppwriteException}
32
+ * @returns {Promise<Models.ProjectList>}
33
+ */
34
+ list(params?: { queries?: string[], search?: string, total?: boolean }): Promise<Models.ProjectList>;
35
+ /**
36
+ * Get a list of all projects. You can use the query params to filter your results.
37
+ *
38
+ * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, teamId
39
+ * @param {string} search - Search term to filter your list results. Max length: 256 chars.
40
+ * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
28
41
  * @throws {AppwriteException}
29
42
  * @returns {Promise<Models.ProjectList>}
43
+ * @deprecated Use the object parameter style method for a better developer experience.
30
44
  */
31
- list(queries?: string[], search?: string): Promise<Models.ProjectList> {
45
+ list(queries?: string[], search?: string, total?: boolean): Promise<Models.ProjectList>;
46
+ list(
47
+ paramsOrFirst?: { queries?: string[], search?: string, total?: boolean } | string[],
48
+ ...rest: [(string)?, (boolean)?]
49
+ ): Promise<Models.ProjectList> {
50
+ let params: { queries?: string[], search?: string, total?: boolean };
51
+
52
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
53
+ params = (paramsOrFirst || {}) as { queries?: string[], search?: string, total?: boolean };
54
+ } else {
55
+ params = {
56
+ queries: paramsOrFirst as string[],
57
+ search: rest[0] as string,
58
+ total: rest[1] as boolean
59
+ };
60
+ }
61
+
62
+ const queries = params.queries;
63
+ const search = params.search;
64
+ const total = params.total;
65
+
66
+
32
67
  const apiPath = '/projects';
33
68
  const payload: Payload = {};
34
69
  if (typeof queries !== 'undefined') {
@@ -37,6 +72,9 @@ export class Projects {
37
72
  if (typeof search !== 'undefined') {
38
73
  payload['search'] = search;
39
74
  }
75
+ if (typeof total !== 'undefined') {
76
+ payload['total'] = total;
77
+ }
40
78
  const uri = new URL(this.client.config.endpoint + apiPath);
41
79
 
42
80
  const apiHeaders: { [header: string]: string } = {
@@ -49,26 +87,88 @@ export class Projects {
49
87
  payload
50
88
  );
51
89
  }
90
+
91
+ /**
92
+ * Create a new project. You can create a maximum of 100 projects per account.
93
+ *
94
+ * @param {string} params.projectId - Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, and hyphen. Can't start with a special char. Max length is 36 chars.
95
+ * @param {string} params.name - Project name. Max length: 128 chars.
96
+ * @param {string} params.teamId - Team unique ID.
97
+ * @param {Region} params.region - Project Region.
98
+ * @param {string} params.description - Project description. Max length: 256 chars.
99
+ * @param {string} params.logo - Project logo.
100
+ * @param {string} params.url - Project URL.
101
+ * @param {string} params.legalName - Project legal Name. Max length: 256 chars.
102
+ * @param {string} params.legalCountry - Project legal Country. Max length: 256 chars.
103
+ * @param {string} params.legalState - Project legal State. Max length: 256 chars.
104
+ * @param {string} params.legalCity - Project legal City. Max length: 256 chars.
105
+ * @param {string} params.legalAddress - Project legal Address. Max length: 256 chars.
106
+ * @param {string} params.legalTaxId - Project legal Tax ID. Max length: 256 chars.
107
+ * @throws {AppwriteException}
108
+ * @returns {Promise<Models.Project>}
109
+ */
110
+ create(params: { projectId: string, name: string, teamId: string, region?: Region, description?: string, logo?: string, url?: string, legalName?: string, legalCountry?: string, legalState?: string, legalCity?: string, legalAddress?: string, legalTaxId?: string }): Promise<Models.Project>;
52
111
  /**
53
112
  * Create a new project. You can create a maximum of 100 projects per account.
54
113
  *
55
- * @param {string} projectId
56
- * @param {string} name
57
- * @param {string} teamId
58
- * @param {Region} region
59
- * @param {string} description
60
- * @param {string} logo
61
- * @param {string} url
62
- * @param {string} legalName
63
- * @param {string} legalCountry
64
- * @param {string} legalState
65
- * @param {string} legalCity
66
- * @param {string} legalAddress
67
- * @param {string} legalTaxId
114
+ * @param {string} projectId - Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, and hyphen. Can't start with a special char. Max length is 36 chars.
115
+ * @param {string} name - Project name. Max length: 128 chars.
116
+ * @param {string} teamId - Team unique ID.
117
+ * @param {Region} region - Project Region.
118
+ * @param {string} description - Project description. Max length: 256 chars.
119
+ * @param {string} logo - Project logo.
120
+ * @param {string} url - Project URL.
121
+ * @param {string} legalName - Project legal Name. Max length: 256 chars.
122
+ * @param {string} legalCountry - Project legal Country. Max length: 256 chars.
123
+ * @param {string} legalState - Project legal State. Max length: 256 chars.
124
+ * @param {string} legalCity - Project legal City. Max length: 256 chars.
125
+ * @param {string} legalAddress - Project legal Address. Max length: 256 chars.
126
+ * @param {string} legalTaxId - Project legal Tax ID. Max length: 256 chars.
68
127
  * @throws {AppwriteException}
69
128
  * @returns {Promise<Models.Project>}
129
+ * @deprecated Use the object parameter style method for a better developer experience.
70
130
  */
71
- create(projectId: string, name: string, teamId: string, region?: Region, description?: string, logo?: string, url?: string, legalName?: string, legalCountry?: string, legalState?: string, legalCity?: string, legalAddress?: string, legalTaxId?: string): Promise<Models.Project> {
131
+ create(projectId: string, name: string, teamId: string, region?: Region, description?: string, logo?: string, url?: string, legalName?: string, legalCountry?: string, legalState?: string, legalCity?: string, legalAddress?: string, legalTaxId?: string): Promise<Models.Project>;
132
+ create(
133
+ paramsOrFirst: { projectId: string, name: string, teamId: string, region?: Region, description?: string, logo?: string, url?: string, legalName?: string, legalCountry?: string, legalState?: string, legalCity?: string, legalAddress?: string, legalTaxId?: string } | string,
134
+ ...rest: [(string)?, (string)?, (Region)?, (string)?, (string)?, (string)?, (string)?, (string)?, (string)?, (string)?, (string)?, (string)?]
135
+ ): Promise<Models.Project> {
136
+ let params: { projectId: string, name: string, teamId: string, region?: Region, description?: string, logo?: string, url?: string, legalName?: string, legalCountry?: string, legalState?: string, legalCity?: string, legalAddress?: string, legalTaxId?: string };
137
+
138
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
139
+ params = (paramsOrFirst || {}) as { projectId: string, name: string, teamId: string, region?: Region, description?: string, logo?: string, url?: string, legalName?: string, legalCountry?: string, legalState?: string, legalCity?: string, legalAddress?: string, legalTaxId?: string };
140
+ } else {
141
+ params = {
142
+ projectId: paramsOrFirst as string,
143
+ name: rest[0] as string,
144
+ teamId: rest[1] as string,
145
+ region: rest[2] as Region,
146
+ description: rest[3] as string,
147
+ logo: rest[4] as string,
148
+ url: rest[5] as string,
149
+ legalName: rest[6] as string,
150
+ legalCountry: rest[7] as string,
151
+ legalState: rest[8] as string,
152
+ legalCity: rest[9] as string,
153
+ legalAddress: rest[10] as string,
154
+ legalTaxId: rest[11] as string
155
+ };
156
+ }
157
+
158
+ const projectId = params.projectId;
159
+ const name = params.name;
160
+ const teamId = params.teamId;
161
+ const region = params.region;
162
+ const description = params.description;
163
+ const logo = params.logo;
164
+ const url = params.url;
165
+ const legalName = params.legalName;
166
+ const legalCountry = params.legalCountry;
167
+ const legalState = params.legalState;
168
+ const legalCity = params.legalCity;
169
+ const legalAddress = params.legalAddress;
170
+ const legalTaxId = params.legalTaxId;
171
+
72
172
  if (typeof projectId === 'undefined') {
73
173
  throw new AppwriteException('Missing required parameter: "projectId"');
74
174
  }
@@ -78,6 +178,7 @@ export class Projects {
78
178
  if (typeof teamId === 'undefined') {
79
179
  throw new AppwriteException('Missing required parameter: "teamId"');
80
180
  }
181
+
81
182
  const apiPath = '/projects';
82
183
  const payload: Payload = {};
83
184
  if (typeof projectId !== 'undefined') {
@@ -132,17 +233,43 @@ export class Projects {
132
233
  payload
133
234
  );
134
235
  }
236
+
237
+ /**
238
+ * Get a project by its unique ID. This endpoint allows you to retrieve the project's details, including its name, description, team, region, and other metadata.
239
+ *
240
+ * @param {string} params.projectId - Project unique ID.
241
+ * @throws {AppwriteException}
242
+ * @returns {Promise<Models.Project>}
243
+ */
244
+ get(params: { projectId: string }): Promise<Models.Project>;
135
245
  /**
136
- * Get a project by its unique ID. This endpoint allows you to retrieve the project&#039;s details, including its name, description, team, region, and other metadata.
246
+ * Get a project by its unique ID. This endpoint allows you to retrieve the project's details, including its name, description, team, region, and other metadata.
137
247
  *
138
- * @param {string} projectId
248
+ * @param {string} projectId - Project unique ID.
139
249
  * @throws {AppwriteException}
140
250
  * @returns {Promise<Models.Project>}
251
+ * @deprecated Use the object parameter style method for a better developer experience.
141
252
  */
142
- get(projectId: string): Promise<Models.Project> {
253
+ get(projectId: string): Promise<Models.Project>;
254
+ get(
255
+ paramsOrFirst: { projectId: string } | string
256
+ ): Promise<Models.Project> {
257
+ let params: { projectId: string };
258
+
259
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
260
+ params = (paramsOrFirst || {}) as { projectId: string };
261
+ } else {
262
+ params = {
263
+ projectId: paramsOrFirst as string
264
+ };
265
+ }
266
+
267
+ const projectId = params.projectId;
268
+
143
269
  if (typeof projectId === 'undefined') {
144
270
  throw new AppwriteException('Missing required parameter: "projectId"');
145
271
  }
272
+
146
273
  const apiPath = '/projects/{projectId}'.replace('{projectId}', projectId);
147
274
  const payload: Payload = {};
148
275
  const uri = new URL(this.client.config.endpoint + apiPath);
@@ -157,30 +284,87 @@ export class Projects {
157
284
  payload
158
285
  );
159
286
  }
287
+
288
+ /**
289
+ * Update a project by its unique ID.
290
+ *
291
+ * @param {string} params.projectId - Project unique ID.
292
+ * @param {string} params.name - Project name. Max length: 128 chars.
293
+ * @param {string} params.description - Project description. Max length: 256 chars.
294
+ * @param {string} params.logo - Project logo.
295
+ * @param {string} params.url - Project URL.
296
+ * @param {string} params.legalName - Project legal name. Max length: 256 chars.
297
+ * @param {string} params.legalCountry - Project legal country. Max length: 256 chars.
298
+ * @param {string} params.legalState - Project legal state. Max length: 256 chars.
299
+ * @param {string} params.legalCity - Project legal city. Max length: 256 chars.
300
+ * @param {string} params.legalAddress - Project legal address. Max length: 256 chars.
301
+ * @param {string} params.legalTaxId - Project legal tax ID. Max length: 256 chars.
302
+ * @throws {AppwriteException}
303
+ * @returns {Promise<Models.Project>}
304
+ */
305
+ update(params: { projectId: string, name: string, description?: string, logo?: string, url?: string, legalName?: string, legalCountry?: string, legalState?: string, legalCity?: string, legalAddress?: string, legalTaxId?: string }): Promise<Models.Project>;
160
306
  /**
161
307
  * Update a project by its unique ID.
162
308
  *
163
- * @param {string} projectId
164
- * @param {string} name
165
- * @param {string} description
166
- * @param {string} logo
167
- * @param {string} url
168
- * @param {string} legalName
169
- * @param {string} legalCountry
170
- * @param {string} legalState
171
- * @param {string} legalCity
172
- * @param {string} legalAddress
173
- * @param {string} legalTaxId
309
+ * @param {string} projectId - Project unique ID.
310
+ * @param {string} name - Project name. Max length: 128 chars.
311
+ * @param {string} description - Project description. Max length: 256 chars.
312
+ * @param {string} logo - Project logo.
313
+ * @param {string} url - Project URL.
314
+ * @param {string} legalName - Project legal name. Max length: 256 chars.
315
+ * @param {string} legalCountry - Project legal country. Max length: 256 chars.
316
+ * @param {string} legalState - Project legal state. Max length: 256 chars.
317
+ * @param {string} legalCity - Project legal city. Max length: 256 chars.
318
+ * @param {string} legalAddress - Project legal address. Max length: 256 chars.
319
+ * @param {string} legalTaxId - Project legal tax ID. Max length: 256 chars.
174
320
  * @throws {AppwriteException}
175
321
  * @returns {Promise<Models.Project>}
322
+ * @deprecated Use the object parameter style method for a better developer experience.
176
323
  */
177
- update(projectId: string, name: string, description?: string, logo?: string, url?: string, legalName?: string, legalCountry?: string, legalState?: string, legalCity?: string, legalAddress?: string, legalTaxId?: string): Promise<Models.Project> {
324
+ update(projectId: string, name: string, description?: string, logo?: string, url?: string, legalName?: string, legalCountry?: string, legalState?: string, legalCity?: string, legalAddress?: string, legalTaxId?: string): Promise<Models.Project>;
325
+ update(
326
+ paramsOrFirst: { projectId: string, name: string, description?: string, logo?: string, url?: string, legalName?: string, legalCountry?: string, legalState?: string, legalCity?: string, legalAddress?: string, legalTaxId?: string } | string,
327
+ ...rest: [(string)?, (string)?, (string)?, (string)?, (string)?, (string)?, (string)?, (string)?, (string)?, (string)?]
328
+ ): Promise<Models.Project> {
329
+ let params: { projectId: string, name: string, description?: string, logo?: string, url?: string, legalName?: string, legalCountry?: string, legalState?: string, legalCity?: string, legalAddress?: string, legalTaxId?: string };
330
+
331
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
332
+ params = (paramsOrFirst || {}) as { projectId: string, name: string, description?: string, logo?: string, url?: string, legalName?: string, legalCountry?: string, legalState?: string, legalCity?: string, legalAddress?: string, legalTaxId?: string };
333
+ } else {
334
+ params = {
335
+ projectId: paramsOrFirst as string,
336
+ name: rest[0] as string,
337
+ description: rest[1] as string,
338
+ logo: rest[2] as string,
339
+ url: rest[3] as string,
340
+ legalName: rest[4] as string,
341
+ legalCountry: rest[5] as string,
342
+ legalState: rest[6] as string,
343
+ legalCity: rest[7] as string,
344
+ legalAddress: rest[8] as string,
345
+ legalTaxId: rest[9] as string
346
+ };
347
+ }
348
+
349
+ const projectId = params.projectId;
350
+ const name = params.name;
351
+ const description = params.description;
352
+ const logo = params.logo;
353
+ const url = params.url;
354
+ const legalName = params.legalName;
355
+ const legalCountry = params.legalCountry;
356
+ const legalState = params.legalState;
357
+ const legalCity = params.legalCity;
358
+ const legalAddress = params.legalAddress;
359
+ const legalTaxId = params.legalTaxId;
360
+
178
361
  if (typeof projectId === 'undefined') {
179
362
  throw new AppwriteException('Missing required parameter: "projectId"');
180
363
  }
181
364
  if (typeof name === 'undefined') {
182
365
  throw new AppwriteException('Missing required parameter: "name"');
183
366
  }
367
+
184
368
  const apiPath = '/projects/{projectId}'.replace('{projectId}', projectId);
185
369
  const payload: Payload = {};
186
370
  if (typeof name !== 'undefined') {
@@ -226,17 +410,43 @@ export class Projects {
226
410
  payload
227
411
  );
228
412
  }
413
+
414
+ /**
415
+ * Delete a project by its unique ID.
416
+ *
417
+ * @param {string} params.projectId - Project unique ID.
418
+ * @throws {AppwriteException}
419
+ * @returns {Promise<{}>}
420
+ */
421
+ delete(params: { projectId: string }): Promise<{}>;
229
422
  /**
230
423
  * Delete a project by its unique ID.
231
424
  *
232
- * @param {string} projectId
425
+ * @param {string} projectId - Project unique ID.
233
426
  * @throws {AppwriteException}
234
427
  * @returns {Promise<{}>}
428
+ * @deprecated Use the object parameter style method for a better developer experience.
235
429
  */
236
- delete(projectId: string): Promise<{}> {
430
+ delete(projectId: string): Promise<{}>;
431
+ delete(
432
+ paramsOrFirst: { projectId: string } | string
433
+ ): Promise<{}> {
434
+ let params: { projectId: string };
435
+
436
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
437
+ params = (paramsOrFirst || {}) as { projectId: string };
438
+ } else {
439
+ params = {
440
+ projectId: paramsOrFirst as string
441
+ };
442
+ }
443
+
444
+ const projectId = params.projectId;
445
+
237
446
  if (typeof projectId === 'undefined') {
238
447
  throw new AppwriteException('Missing required parameter: "projectId"');
239
448
  }
449
+
240
450
  const apiPath = '/projects/{projectId}'.replace('{projectId}', projectId);
241
451
  const payload: Payload = {};
242
452
  const uri = new URL(this.client.config.endpoint + apiPath);
@@ -252,16 +462,122 @@ export class Projects {
252
462
  payload
253
463
  );
254
464
  }
465
+
466
+ /**
467
+ * Update the status of a specific API type. Use this endpoint to enable or disable API types such as REST, GraphQL and Realtime.
468
+ *
469
+ * @param {string} params.projectId - Project unique ID.
470
+ * @param {Api} params.api - API name.
471
+ * @param {boolean} params.status - API status.
472
+ * @throws {AppwriteException}
473
+ * @returns {Promise<Models.Project>}
474
+ * @deprecated This API has been deprecated since 1.8.0. Please use `Projects.updateAPIStatus` instead.
475
+ */
476
+ updateApiStatus(params: { projectId: string, api: Api, status: boolean }): Promise<Models.Project>;
477
+ /**
478
+ * Update the status of a specific API type. Use this endpoint to enable or disable API types such as REST, GraphQL and Realtime.
479
+ *
480
+ * @param {string} projectId - Project unique ID.
481
+ * @param {Api} api - API name.
482
+ * @param {boolean} status - API status.
483
+ * @throws {AppwriteException}
484
+ * @returns {Promise<Models.Project>}
485
+ * @deprecated Use the object parameter style method for a better developer experience.
486
+ */
487
+ updateApiStatus(projectId: string, api: Api, status: boolean): Promise<Models.Project>;
488
+ updateApiStatus(
489
+ paramsOrFirst: { projectId: string, api: Api, status: boolean } | string,
490
+ ...rest: [(Api)?, (boolean)?]
491
+ ): Promise<Models.Project> {
492
+ let params: { projectId: string, api: Api, status: boolean };
493
+
494
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
495
+ params = (paramsOrFirst || {}) as { projectId: string, api: Api, status: boolean };
496
+ } else {
497
+ params = {
498
+ projectId: paramsOrFirst as string,
499
+ api: rest[0] as Api,
500
+ status: rest[1] as boolean
501
+ };
502
+ }
503
+
504
+ const projectId = params.projectId;
505
+ const api = params.api;
506
+ const status = params.status;
507
+
508
+ if (typeof projectId === 'undefined') {
509
+ throw new AppwriteException('Missing required parameter: "projectId"');
510
+ }
511
+ if (typeof api === 'undefined') {
512
+ throw new AppwriteException('Missing required parameter: "api"');
513
+ }
514
+ if (typeof status === 'undefined') {
515
+ throw new AppwriteException('Missing required parameter: "status"');
516
+ }
517
+
518
+ const apiPath = '/projects/{projectId}/api'.replace('{projectId}', projectId);
519
+ const payload: Payload = {};
520
+ if (typeof api !== 'undefined') {
521
+ payload['api'] = api;
522
+ }
523
+ if (typeof status !== 'undefined') {
524
+ payload['status'] = status;
525
+ }
526
+ const uri = new URL(this.client.config.endpoint + apiPath);
527
+
528
+ const apiHeaders: { [header: string]: string } = {
529
+ 'content-type': 'application/json',
530
+ }
531
+
532
+ return this.client.call(
533
+ 'patch',
534
+ uri,
535
+ apiHeaders,
536
+ payload
537
+ );
538
+ }
539
+
540
+ /**
541
+ * Update the status of a specific API type. Use this endpoint to enable or disable API types such as REST, GraphQL and Realtime.
542
+ *
543
+ * @param {string} params.projectId - Project unique ID.
544
+ * @param {Api} params.api - API name.
545
+ * @param {boolean} params.status - API status.
546
+ * @throws {AppwriteException}
547
+ * @returns {Promise<Models.Project>}
548
+ */
549
+ updateAPIStatus(params: { projectId: string, api: Api, status: boolean }): Promise<Models.Project>;
255
550
  /**
256
551
  * Update the status of a specific API type. Use this endpoint to enable or disable API types such as REST, GraphQL and Realtime.
257
552
  *
258
- * @param {string} projectId
259
- * @param {Api} api
260
- * @param {boolean} status
553
+ * @param {string} projectId - Project unique ID.
554
+ * @param {Api} api - API name.
555
+ * @param {boolean} status - API status.
261
556
  * @throws {AppwriteException}
262
557
  * @returns {Promise<Models.Project>}
558
+ * @deprecated Use the object parameter style method for a better developer experience.
263
559
  */
264
- updateApiStatus(projectId: string, api: Api, status: boolean): Promise<Models.Project> {
560
+ updateAPIStatus(projectId: string, api: Api, status: boolean): Promise<Models.Project>;
561
+ updateAPIStatus(
562
+ paramsOrFirst: { projectId: string, api: Api, status: boolean } | string,
563
+ ...rest: [(Api)?, (boolean)?]
564
+ ): Promise<Models.Project> {
565
+ let params: { projectId: string, api: Api, status: boolean };
566
+
567
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
568
+ params = (paramsOrFirst || {}) as { projectId: string, api: Api, status: boolean };
569
+ } else {
570
+ params = {
571
+ projectId: paramsOrFirst as string,
572
+ api: rest[0] as Api,
573
+ status: rest[1] as boolean
574
+ };
575
+ }
576
+
577
+ const projectId = params.projectId;
578
+ const api = params.api;
579
+ const status = params.status;
580
+
265
581
  if (typeof projectId === 'undefined') {
266
582
  throw new AppwriteException('Missing required parameter: "projectId"');
267
583
  }
@@ -271,6 +587,7 @@ export class Projects {
271
587
  if (typeof status === 'undefined') {
272
588
  throw new AppwriteException('Missing required parameter: "status"');
273
589
  }
590
+
274
591
  const apiPath = '/projects/{projectId}/api'.replace('{projectId}', projectId);
275
592
  const payload: Payload = {};
276
593
  if (typeof api !== 'undefined') {
@@ -292,21 +609,115 @@ export class Projects {
292
609
  payload
293
610
  );
294
611
  }
612
+
613
+ /**
614
+ * Update the status of all API types. Use this endpoint to enable or disable API types such as REST, GraphQL and Realtime all at once.
615
+ *
616
+ * @param {string} params.projectId - Project unique ID.
617
+ * @param {boolean} params.status - API status.
618
+ * @throws {AppwriteException}
619
+ * @returns {Promise<Models.Project>}
620
+ * @deprecated This API has been deprecated since 1.8.0. Please use `Projects.updateAPIStatusAll` instead.
621
+ */
622
+ updateApiStatusAll(params: { projectId: string, status: boolean }): Promise<Models.Project>;
623
+ /**
624
+ * Update the status of all API types. Use this endpoint to enable or disable API types such as REST, GraphQL and Realtime all at once.
625
+ *
626
+ * @param {string} projectId - Project unique ID.
627
+ * @param {boolean} status - API status.
628
+ * @throws {AppwriteException}
629
+ * @returns {Promise<Models.Project>}
630
+ * @deprecated Use the object parameter style method for a better developer experience.
631
+ */
632
+ updateApiStatusAll(projectId: string, status: boolean): Promise<Models.Project>;
633
+ updateApiStatusAll(
634
+ paramsOrFirst: { projectId: string, status: boolean } | string,
635
+ ...rest: [(boolean)?]
636
+ ): Promise<Models.Project> {
637
+ let params: { projectId: string, status: boolean };
638
+
639
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
640
+ params = (paramsOrFirst || {}) as { projectId: string, status: boolean };
641
+ } else {
642
+ params = {
643
+ projectId: paramsOrFirst as string,
644
+ status: rest[0] as boolean
645
+ };
646
+ }
647
+
648
+ const projectId = params.projectId;
649
+ const status = params.status;
650
+
651
+ if (typeof projectId === 'undefined') {
652
+ throw new AppwriteException('Missing required parameter: "projectId"');
653
+ }
654
+ if (typeof status === 'undefined') {
655
+ throw new AppwriteException('Missing required parameter: "status"');
656
+ }
657
+
658
+ const apiPath = '/projects/{projectId}/api/all'.replace('{projectId}', projectId);
659
+ const payload: Payload = {};
660
+ if (typeof status !== 'undefined') {
661
+ payload['status'] = status;
662
+ }
663
+ const uri = new URL(this.client.config.endpoint + apiPath);
664
+
665
+ const apiHeaders: { [header: string]: string } = {
666
+ 'content-type': 'application/json',
667
+ }
668
+
669
+ return this.client.call(
670
+ 'patch',
671
+ uri,
672
+ apiHeaders,
673
+ payload
674
+ );
675
+ }
676
+
677
+ /**
678
+ * Update the status of all API types. Use this endpoint to enable or disable API types such as REST, GraphQL and Realtime all at once.
679
+ *
680
+ * @param {string} params.projectId - Project unique ID.
681
+ * @param {boolean} params.status - API status.
682
+ * @throws {AppwriteException}
683
+ * @returns {Promise<Models.Project>}
684
+ */
685
+ updateAPIStatusAll(params: { projectId: string, status: boolean }): Promise<Models.Project>;
295
686
  /**
296
687
  * Update the status of all API types. Use this endpoint to enable or disable API types such as REST, GraphQL and Realtime all at once.
297
688
  *
298
- * @param {string} projectId
299
- * @param {boolean} status
689
+ * @param {string} projectId - Project unique ID.
690
+ * @param {boolean} status - API status.
300
691
  * @throws {AppwriteException}
301
692
  * @returns {Promise<Models.Project>}
693
+ * @deprecated Use the object parameter style method for a better developer experience.
302
694
  */
303
- updateApiStatusAll(projectId: string, status: boolean): Promise<Models.Project> {
695
+ updateAPIStatusAll(projectId: string, status: boolean): Promise<Models.Project>;
696
+ updateAPIStatusAll(
697
+ paramsOrFirst: { projectId: string, status: boolean } | string,
698
+ ...rest: [(boolean)?]
699
+ ): Promise<Models.Project> {
700
+ let params: { projectId: string, status: boolean };
701
+
702
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
703
+ params = (paramsOrFirst || {}) as { projectId: string, status: boolean };
704
+ } else {
705
+ params = {
706
+ projectId: paramsOrFirst as string,
707
+ status: rest[0] as boolean
708
+ };
709
+ }
710
+
711
+ const projectId = params.projectId;
712
+ const status = params.status;
713
+
304
714
  if (typeof projectId === 'undefined') {
305
715
  throw new AppwriteException('Missing required parameter: "projectId"');
306
716
  }
307
717
  if (typeof status === 'undefined') {
308
718
  throw new AppwriteException('Missing required parameter: "status"');
309
719
  }
720
+
310
721
  const apiPath = '/projects/{projectId}/api/all'.replace('{projectId}', projectId);
311
722
  const payload: Payload = {};
312
723
  if (typeof status !== 'undefined') {
@@ -325,21 +736,51 @@ export class Projects {
325
736
  payload
326
737
  );
327
738
  }
739
+
740
+ /**
741
+ * Update how long sessions created within a project should stay active for.
742
+ *
743
+ * @param {string} params.projectId - Project unique ID.
744
+ * @param {number} params.duration - Project session length in seconds. Max length: 31536000 seconds.
745
+ * @throws {AppwriteException}
746
+ * @returns {Promise<Models.Project>}
747
+ */
748
+ updateAuthDuration(params: { projectId: string, duration: number }): Promise<Models.Project>;
328
749
  /**
329
750
  * Update how long sessions created within a project should stay active for.
330
751
  *
331
- * @param {string} projectId
332
- * @param {number} duration
752
+ * @param {string} projectId - Project unique ID.
753
+ * @param {number} duration - Project session length in seconds. Max length: 31536000 seconds.
333
754
  * @throws {AppwriteException}
334
755
  * @returns {Promise<Models.Project>}
756
+ * @deprecated Use the object parameter style method for a better developer experience.
335
757
  */
336
- updateAuthDuration(projectId: string, duration: number): Promise<Models.Project> {
758
+ updateAuthDuration(projectId: string, duration: number): Promise<Models.Project>;
759
+ updateAuthDuration(
760
+ paramsOrFirst: { projectId: string, duration: number } | string,
761
+ ...rest: [(number)?]
762
+ ): Promise<Models.Project> {
763
+ let params: { projectId: string, duration: number };
764
+
765
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
766
+ params = (paramsOrFirst || {}) as { projectId: string, duration: number };
767
+ } else {
768
+ params = {
769
+ projectId: paramsOrFirst as string,
770
+ duration: rest[0] as number
771
+ };
772
+ }
773
+
774
+ const projectId = params.projectId;
775
+ const duration = params.duration;
776
+
337
777
  if (typeof projectId === 'undefined') {
338
778
  throw new AppwriteException('Missing required parameter: "projectId"');
339
779
  }
340
780
  if (typeof duration === 'undefined') {
341
781
  throw new AppwriteException('Missing required parameter: "duration"');
342
782
  }
783
+
343
784
  const apiPath = '/projects/{projectId}/auth/duration'.replace('{projectId}', projectId);
344
785
  const payload: Payload = {};
345
786
  if (typeof duration !== 'undefined') {
@@ -358,21 +799,51 @@ export class Projects {
358
799
  payload
359
800
  );
360
801
  }
802
+
803
+ /**
804
+ * Update the maximum number of users allowed in this project. Set to 0 for unlimited users.
805
+ *
806
+ * @param {string} params.projectId - Project unique ID.
807
+ * @param {number} params.limit - Set the max number of users allowed in this project. Use 0 for unlimited.
808
+ * @throws {AppwriteException}
809
+ * @returns {Promise<Models.Project>}
810
+ */
811
+ updateAuthLimit(params: { projectId: string, limit: number }): Promise<Models.Project>;
361
812
  /**
362
813
  * Update the maximum number of users allowed in this project. Set to 0 for unlimited users.
363
814
  *
364
- * @param {string} projectId
365
- * @param {number} limit
815
+ * @param {string} projectId - Project unique ID.
816
+ * @param {number} limit - Set the max number of users allowed in this project. Use 0 for unlimited.
366
817
  * @throws {AppwriteException}
367
818
  * @returns {Promise<Models.Project>}
819
+ * @deprecated Use the object parameter style method for a better developer experience.
368
820
  */
369
- updateAuthLimit(projectId: string, limit: number): Promise<Models.Project> {
821
+ updateAuthLimit(projectId: string, limit: number): Promise<Models.Project>;
822
+ updateAuthLimit(
823
+ paramsOrFirst: { projectId: string, limit: number } | string,
824
+ ...rest: [(number)?]
825
+ ): Promise<Models.Project> {
826
+ let params: { projectId: string, limit: number };
827
+
828
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
829
+ params = (paramsOrFirst || {}) as { projectId: string, limit: number };
830
+ } else {
831
+ params = {
832
+ projectId: paramsOrFirst as string,
833
+ limit: rest[0] as number
834
+ };
835
+ }
836
+
837
+ const projectId = params.projectId;
838
+ const limit = params.limit;
839
+
370
840
  if (typeof projectId === 'undefined') {
371
841
  throw new AppwriteException('Missing required parameter: "projectId"');
372
842
  }
373
843
  if (typeof limit === 'undefined') {
374
844
  throw new AppwriteException('Missing required parameter: "limit"');
375
845
  }
846
+
376
847
  const apiPath = '/projects/{projectId}/auth/limit'.replace('{projectId}', projectId);
377
848
  const payload: Payload = {};
378
849
  if (typeof limit !== 'undefined') {
@@ -391,21 +862,51 @@ export class Projects {
391
862
  payload
392
863
  );
393
864
  }
865
+
866
+ /**
867
+ * Update the maximum number of sessions allowed per user within the project, if the limit is hit the oldest session will be deleted to make room for new sessions.
868
+ *
869
+ * @param {string} params.projectId - Project unique ID.
870
+ * @param {number} params.limit - Set the max number of users allowed in this project. Value allowed is between 1-100. Default is 10
871
+ * @throws {AppwriteException}
872
+ * @returns {Promise<Models.Project>}
873
+ */
874
+ updateAuthSessionsLimit(params: { projectId: string, limit: number }): Promise<Models.Project>;
394
875
  /**
395
876
  * Update the maximum number of sessions allowed per user within the project, if the limit is hit the oldest session will be deleted to make room for new sessions.
396
877
  *
397
- * @param {string} projectId
398
- * @param {number} limit
878
+ * @param {string} projectId - Project unique ID.
879
+ * @param {number} limit - Set the max number of users allowed in this project. Value allowed is between 1-100. Default is 10
399
880
  * @throws {AppwriteException}
400
881
  * @returns {Promise<Models.Project>}
882
+ * @deprecated Use the object parameter style method for a better developer experience.
401
883
  */
402
- updateAuthSessionsLimit(projectId: string, limit: number): Promise<Models.Project> {
884
+ updateAuthSessionsLimit(projectId: string, limit: number): Promise<Models.Project>;
885
+ updateAuthSessionsLimit(
886
+ paramsOrFirst: { projectId: string, limit: number } | string,
887
+ ...rest: [(number)?]
888
+ ): Promise<Models.Project> {
889
+ let params: { projectId: string, limit: number };
890
+
891
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
892
+ params = (paramsOrFirst || {}) as { projectId: string, limit: number };
893
+ } else {
894
+ params = {
895
+ projectId: paramsOrFirst as string,
896
+ limit: rest[0] as number
897
+ };
898
+ }
899
+
900
+ const projectId = params.projectId;
901
+ const limit = params.limit;
902
+
403
903
  if (typeof projectId === 'undefined') {
404
904
  throw new AppwriteException('Missing required parameter: "projectId"');
405
905
  }
406
906
  if (typeof limit === 'undefined') {
407
907
  throw new AppwriteException('Missing required parameter: "limit"');
408
908
  }
909
+
409
910
  const apiPath = '/projects/{projectId}/auth/max-sessions'.replace('{projectId}', projectId);
410
911
  const payload: Payload = {};
411
912
  if (typeof limit !== 'undefined') {
@@ -424,17 +925,52 @@ export class Projects {
424
925
  payload
425
926
  );
426
927
  }
928
+
929
+ /**
930
+ * Update project membership privacy settings. Use this endpoint to control what user information is visible to other team members, such as user name, email, and MFA status.
931
+ *
932
+ * @param {string} params.projectId - Project unique ID.
933
+ * @param {boolean} params.userName - Set to true to show userName to members of a team.
934
+ * @param {boolean} params.userEmail - Set to true to show email to members of a team.
935
+ * @param {boolean} params.mfa - Set to true to show mfa to members of a team.
936
+ * @throws {AppwriteException}
937
+ * @returns {Promise<Models.Project>}
938
+ */
939
+ updateMembershipsPrivacy(params: { projectId: string, userName: boolean, userEmail: boolean, mfa: boolean }): Promise<Models.Project>;
427
940
  /**
428
941
  * Update project membership privacy settings. Use this endpoint to control what user information is visible to other team members, such as user name, email, and MFA status.
429
942
  *
430
- * @param {string} projectId
431
- * @param {boolean} userName
432
- * @param {boolean} userEmail
433
- * @param {boolean} mfa
943
+ * @param {string} projectId - Project unique ID.
944
+ * @param {boolean} userName - Set to true to show userName to members of a team.
945
+ * @param {boolean} userEmail - Set to true to show email to members of a team.
946
+ * @param {boolean} mfa - Set to true to show mfa to members of a team.
434
947
  * @throws {AppwriteException}
435
948
  * @returns {Promise<Models.Project>}
949
+ * @deprecated Use the object parameter style method for a better developer experience.
436
950
  */
437
- updateMembershipsPrivacy(projectId: string, userName: boolean, userEmail: boolean, mfa: boolean): Promise<Models.Project> {
951
+ updateMembershipsPrivacy(projectId: string, userName: boolean, userEmail: boolean, mfa: boolean): Promise<Models.Project>;
952
+ updateMembershipsPrivacy(
953
+ paramsOrFirst: { projectId: string, userName: boolean, userEmail: boolean, mfa: boolean } | string,
954
+ ...rest: [(boolean)?, (boolean)?, (boolean)?]
955
+ ): Promise<Models.Project> {
956
+ let params: { projectId: string, userName: boolean, userEmail: boolean, mfa: boolean };
957
+
958
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
959
+ params = (paramsOrFirst || {}) as { projectId: string, userName: boolean, userEmail: boolean, mfa: boolean };
960
+ } else {
961
+ params = {
962
+ projectId: paramsOrFirst as string,
963
+ userName: rest[0] as boolean,
964
+ userEmail: rest[1] as boolean,
965
+ mfa: rest[2] as boolean
966
+ };
967
+ }
968
+
969
+ const projectId = params.projectId;
970
+ const userName = params.userName;
971
+ const userEmail = params.userEmail;
972
+ const mfa = params.mfa;
973
+
438
974
  if (typeof projectId === 'undefined') {
439
975
  throw new AppwriteException('Missing required parameter: "projectId"');
440
976
  }
@@ -447,6 +983,7 @@ export class Projects {
447
983
  if (typeof mfa === 'undefined') {
448
984
  throw new AppwriteException('Missing required parameter: "mfa"');
449
985
  }
986
+
450
987
  const apiPath = '/projects/{projectId}/auth/memberships-privacy'.replace('{projectId}', projectId);
451
988
  const payload: Payload = {};
452
989
  if (typeof userName !== 'undefined') {
@@ -471,21 +1008,51 @@ export class Projects {
471
1008
  payload
472
1009
  );
473
1010
  }
1011
+
474
1012
  /**
475
1013
  * Update the list of mock phone numbers for testing. Use these numbers to bypass SMS verification in development.
476
1014
  *
477
- * @param {string} projectId
478
- * @param {object[]} numbers
1015
+ * @param {string} params.projectId - Project unique ID.
1016
+ * @param {object[]} params.numbers - An array of mock numbers and their corresponding verification codes (OTPs). Each number should be a valid E.164 formatted phone number. Maximum of 10 numbers are allowed.
479
1017
  * @throws {AppwriteException}
480
1018
  * @returns {Promise<Models.Project>}
481
1019
  */
482
- updateMockNumbers(projectId: string, numbers: object[]): Promise<Models.Project> {
1020
+ updateMockNumbers(params: { projectId: string, numbers: object[] }): Promise<Models.Project>;
1021
+ /**
1022
+ * Update the list of mock phone numbers for testing. Use these numbers to bypass SMS verification in development.
1023
+ *
1024
+ * @param {string} projectId - Project unique ID.
1025
+ * @param {object[]} numbers - An array of mock numbers and their corresponding verification codes (OTPs). Each number should be a valid E.164 formatted phone number. Maximum of 10 numbers are allowed.
1026
+ * @throws {AppwriteException}
1027
+ * @returns {Promise<Models.Project>}
1028
+ * @deprecated Use the object parameter style method for a better developer experience.
1029
+ */
1030
+ updateMockNumbers(projectId: string, numbers: object[]): Promise<Models.Project>;
1031
+ updateMockNumbers(
1032
+ paramsOrFirst: { projectId: string, numbers: object[] } | string,
1033
+ ...rest: [(object[])?]
1034
+ ): Promise<Models.Project> {
1035
+ let params: { projectId: string, numbers: object[] };
1036
+
1037
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1038
+ params = (paramsOrFirst || {}) as { projectId: string, numbers: object[] };
1039
+ } else {
1040
+ params = {
1041
+ projectId: paramsOrFirst as string,
1042
+ numbers: rest[0] as object[]
1043
+ };
1044
+ }
1045
+
1046
+ const projectId = params.projectId;
1047
+ const numbers = params.numbers;
1048
+
483
1049
  if (typeof projectId === 'undefined') {
484
1050
  throw new AppwriteException('Missing required parameter: "projectId"');
485
1051
  }
486
1052
  if (typeof numbers === 'undefined') {
487
1053
  throw new AppwriteException('Missing required parameter: "numbers"');
488
1054
  }
1055
+
489
1056
  const apiPath = '/projects/{projectId}/auth/mock-numbers'.replace('{projectId}', projectId);
490
1057
  const payload: Payload = {};
491
1058
  if (typeof numbers !== 'undefined') {
@@ -504,21 +1071,51 @@ export class Projects {
504
1071
  payload
505
1072
  );
506
1073
  }
1074
+
1075
+ /**
1076
+ * Enable or disable checking user passwords against common passwords dictionary. This helps ensure users don't use common and insecure passwords.
1077
+ *
1078
+ * @param {string} params.projectId - Project unique ID.
1079
+ * @param {boolean} params.enabled - Set whether or not to enable checking user's password against most commonly used passwords. Default is false.
1080
+ * @throws {AppwriteException}
1081
+ * @returns {Promise<Models.Project>}
1082
+ */
1083
+ updateAuthPasswordDictionary(params: { projectId: string, enabled: boolean }): Promise<Models.Project>;
507
1084
  /**
508
- * Enable or disable checking user passwords against common passwords dictionary. This helps ensure users don&#039;t use common and insecure passwords.
1085
+ * Enable or disable checking user passwords against common passwords dictionary. This helps ensure users don't use common and insecure passwords.
509
1086
  *
510
- * @param {string} projectId
511
- * @param {boolean} enabled
1087
+ * @param {string} projectId - Project unique ID.
1088
+ * @param {boolean} enabled - Set whether or not to enable checking user's password against most commonly used passwords. Default is false.
512
1089
  * @throws {AppwriteException}
513
1090
  * @returns {Promise<Models.Project>}
1091
+ * @deprecated Use the object parameter style method for a better developer experience.
514
1092
  */
515
- updateAuthPasswordDictionary(projectId: string, enabled: boolean): Promise<Models.Project> {
1093
+ updateAuthPasswordDictionary(projectId: string, enabled: boolean): Promise<Models.Project>;
1094
+ updateAuthPasswordDictionary(
1095
+ paramsOrFirst: { projectId: string, enabled: boolean } | string,
1096
+ ...rest: [(boolean)?]
1097
+ ): Promise<Models.Project> {
1098
+ let params: { projectId: string, enabled: boolean };
1099
+
1100
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1101
+ params = (paramsOrFirst || {}) as { projectId: string, enabled: boolean };
1102
+ } else {
1103
+ params = {
1104
+ projectId: paramsOrFirst as string,
1105
+ enabled: rest[0] as boolean
1106
+ };
1107
+ }
1108
+
1109
+ const projectId = params.projectId;
1110
+ const enabled = params.enabled;
1111
+
516
1112
  if (typeof projectId === 'undefined') {
517
1113
  throw new AppwriteException('Missing required parameter: "projectId"');
518
1114
  }
519
1115
  if (typeof enabled === 'undefined') {
520
1116
  throw new AppwriteException('Missing required parameter: "enabled"');
521
1117
  }
1118
+
522
1119
  const apiPath = '/projects/{projectId}/auth/password-dictionary'.replace('{projectId}', projectId);
523
1120
  const payload: Payload = {};
524
1121
  if (typeof enabled !== 'undefined') {
@@ -537,21 +1134,51 @@ export class Projects {
537
1134
  payload
538
1135
  );
539
1136
  }
1137
+
1138
+ /**
1139
+ * Update the authentication password history requirement. Use this endpoint to require new passwords to be different than the last X amount of previously used ones.
1140
+ *
1141
+ * @param {string} params.projectId - Project unique ID.
1142
+ * @param {number} params.limit - Set the max number of passwords to store in user history. User can't choose a new password that is already stored in the password history list. Max number of passwords allowed in history is20. Default value is 0
1143
+ * @throws {AppwriteException}
1144
+ * @returns {Promise<Models.Project>}
1145
+ */
1146
+ updateAuthPasswordHistory(params: { projectId: string, limit: number }): Promise<Models.Project>;
540
1147
  /**
541
1148
  * Update the authentication password history requirement. Use this endpoint to require new passwords to be different than the last X amount of previously used ones.
542
1149
  *
543
- * @param {string} projectId
544
- * @param {number} limit
1150
+ * @param {string} projectId - Project unique ID.
1151
+ * @param {number} limit - Set the max number of passwords to store in user history. User can't choose a new password that is already stored in the password history list. Max number of passwords allowed in history is20. Default value is 0
545
1152
  * @throws {AppwriteException}
546
1153
  * @returns {Promise<Models.Project>}
1154
+ * @deprecated Use the object parameter style method for a better developer experience.
547
1155
  */
548
- updateAuthPasswordHistory(projectId: string, limit: number): Promise<Models.Project> {
1156
+ updateAuthPasswordHistory(projectId: string, limit: number): Promise<Models.Project>;
1157
+ updateAuthPasswordHistory(
1158
+ paramsOrFirst: { projectId: string, limit: number } | string,
1159
+ ...rest: [(number)?]
1160
+ ): Promise<Models.Project> {
1161
+ let params: { projectId: string, limit: number };
1162
+
1163
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1164
+ params = (paramsOrFirst || {}) as { projectId: string, limit: number };
1165
+ } else {
1166
+ params = {
1167
+ projectId: paramsOrFirst as string,
1168
+ limit: rest[0] as number
1169
+ };
1170
+ }
1171
+
1172
+ const projectId = params.projectId;
1173
+ const limit = params.limit;
1174
+
549
1175
  if (typeof projectId === 'undefined') {
550
1176
  throw new AppwriteException('Missing required parameter: "projectId"');
551
1177
  }
552
1178
  if (typeof limit === 'undefined') {
553
1179
  throw new AppwriteException('Missing required parameter: "limit"');
554
1180
  }
1181
+
555
1182
  const apiPath = '/projects/{projectId}/auth/password-history'.replace('{projectId}', projectId);
556
1183
  const payload: Payload = {};
557
1184
  if (typeof limit !== 'undefined') {
@@ -570,21 +1197,51 @@ export class Projects {
570
1197
  payload
571
1198
  );
572
1199
  }
1200
+
1201
+ /**
1202
+ * Enable or disable checking user passwords against their personal data. This helps prevent users from using personal information in their passwords.
1203
+ *
1204
+ * @param {string} params.projectId - Project unique ID.
1205
+ * @param {boolean} params.enabled - Set whether or not to check a password for similarity with personal data. Default is false.
1206
+ * @throws {AppwriteException}
1207
+ * @returns {Promise<Models.Project>}
1208
+ */
1209
+ updatePersonalDataCheck(params: { projectId: string, enabled: boolean }): Promise<Models.Project>;
573
1210
  /**
574
1211
  * Enable or disable checking user passwords against their personal data. This helps prevent users from using personal information in their passwords.
575
1212
  *
576
- * @param {string} projectId
577
- * @param {boolean} enabled
1213
+ * @param {string} projectId - Project unique ID.
1214
+ * @param {boolean} enabled - Set whether or not to check a password for similarity with personal data. Default is false.
578
1215
  * @throws {AppwriteException}
579
1216
  * @returns {Promise<Models.Project>}
1217
+ * @deprecated Use the object parameter style method for a better developer experience.
580
1218
  */
581
- updatePersonalDataCheck(projectId: string, enabled: boolean): Promise<Models.Project> {
1219
+ updatePersonalDataCheck(projectId: string, enabled: boolean): Promise<Models.Project>;
1220
+ updatePersonalDataCheck(
1221
+ paramsOrFirst: { projectId: string, enabled: boolean } | string,
1222
+ ...rest: [(boolean)?]
1223
+ ): Promise<Models.Project> {
1224
+ let params: { projectId: string, enabled: boolean };
1225
+
1226
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1227
+ params = (paramsOrFirst || {}) as { projectId: string, enabled: boolean };
1228
+ } else {
1229
+ params = {
1230
+ projectId: paramsOrFirst as string,
1231
+ enabled: rest[0] as boolean
1232
+ };
1233
+ }
1234
+
1235
+ const projectId = params.projectId;
1236
+ const enabled = params.enabled;
1237
+
582
1238
  if (typeof projectId === 'undefined') {
583
1239
  throw new AppwriteException('Missing required parameter: "projectId"');
584
1240
  }
585
1241
  if (typeof enabled === 'undefined') {
586
1242
  throw new AppwriteException('Missing required parameter: "enabled"');
587
1243
  }
1244
+
588
1245
  const apiPath = '/projects/{projectId}/auth/personal-data'.replace('{projectId}', projectId);
589
1246
  const payload: Payload = {};
590
1247
  if (typeof enabled !== 'undefined') {
@@ -603,21 +1260,51 @@ export class Projects {
603
1260
  payload
604
1261
  );
605
1262
  }
1263
+
1264
+ /**
1265
+ * Enable or disable session email alerts. When enabled, users will receive email notifications when new sessions are created.
1266
+ *
1267
+ * @param {string} params.projectId - Project unique ID.
1268
+ * @param {boolean} params.alerts - Set to true to enable session emails.
1269
+ * @throws {AppwriteException}
1270
+ * @returns {Promise<Models.Project>}
1271
+ */
1272
+ updateSessionAlerts(params: { projectId: string, alerts: boolean }): Promise<Models.Project>;
606
1273
  /**
607
1274
  * Enable or disable session email alerts. When enabled, users will receive email notifications when new sessions are created.
608
1275
  *
609
- * @param {string} projectId
610
- * @param {boolean} alerts
1276
+ * @param {string} projectId - Project unique ID.
1277
+ * @param {boolean} alerts - Set to true to enable session emails.
611
1278
  * @throws {AppwriteException}
612
1279
  * @returns {Promise<Models.Project>}
1280
+ * @deprecated Use the object parameter style method for a better developer experience.
613
1281
  */
614
- updateSessionAlerts(projectId: string, alerts: boolean): Promise<Models.Project> {
1282
+ updateSessionAlerts(projectId: string, alerts: boolean): Promise<Models.Project>;
1283
+ updateSessionAlerts(
1284
+ paramsOrFirst: { projectId: string, alerts: boolean } | string,
1285
+ ...rest: [(boolean)?]
1286
+ ): Promise<Models.Project> {
1287
+ let params: { projectId: string, alerts: boolean };
1288
+
1289
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1290
+ params = (paramsOrFirst || {}) as { projectId: string, alerts: boolean };
1291
+ } else {
1292
+ params = {
1293
+ projectId: paramsOrFirst as string,
1294
+ alerts: rest[0] as boolean
1295
+ };
1296
+ }
1297
+
1298
+ const projectId = params.projectId;
1299
+ const alerts = params.alerts;
1300
+
615
1301
  if (typeof projectId === 'undefined') {
616
1302
  throw new AppwriteException('Missing required parameter: "projectId"');
617
1303
  }
618
1304
  if (typeof alerts === 'undefined') {
619
1305
  throw new AppwriteException('Missing required parameter: "alerts"');
620
1306
  }
1307
+
621
1308
  const apiPath = '/projects/{projectId}/auth/session-alerts'.replace('{projectId}', projectId);
622
1309
  const payload: Payload = {};
623
1310
  if (typeof alerts !== 'undefined') {
@@ -636,29 +1323,55 @@ export class Projects {
636
1323
  payload
637
1324
  );
638
1325
  }
1326
+
639
1327
  /**
640
- * Update the status of a specific authentication method. Use this endpoint to enable or disable different authentication methods such as email, magic urls or sms in your project.
1328
+ * Invalidate all existing sessions. An optional auth security setting for projects, and enabled by default for console project.
1329
+ *
1330
+ * @param {string} params.projectId - Project unique ID.
1331
+ * @param {boolean} params.enabled - Update authentication session invalidation status. Use this endpoint to enable or disable session invalidation on password change
1332
+ * @throws {AppwriteException}
1333
+ * @returns {Promise<Models.Project>}
1334
+ */
1335
+ updateSessionInvalidation(params: { projectId: string, enabled: boolean }): Promise<Models.Project>;
1336
+ /**
1337
+ * Invalidate all existing sessions. An optional auth security setting for projects, and enabled by default for console project.
641
1338
  *
642
- * @param {string} projectId
643
- * @param {AuthMethod} method
644
- * @param {boolean} status
1339
+ * @param {string} projectId - Project unique ID.
1340
+ * @param {boolean} enabled - Update authentication session invalidation status. Use this endpoint to enable or disable session invalidation on password change
645
1341
  * @throws {AppwriteException}
646
1342
  * @returns {Promise<Models.Project>}
1343
+ * @deprecated Use the object parameter style method for a better developer experience.
647
1344
  */
648
- updateAuthStatus(projectId: string, method: AuthMethod, status: boolean): Promise<Models.Project> {
1345
+ updateSessionInvalidation(projectId: string, enabled: boolean): Promise<Models.Project>;
1346
+ updateSessionInvalidation(
1347
+ paramsOrFirst: { projectId: string, enabled: boolean } | string,
1348
+ ...rest: [(boolean)?]
1349
+ ): Promise<Models.Project> {
1350
+ let params: { projectId: string, enabled: boolean };
1351
+
1352
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1353
+ params = (paramsOrFirst || {}) as { projectId: string, enabled: boolean };
1354
+ } else {
1355
+ params = {
1356
+ projectId: paramsOrFirst as string,
1357
+ enabled: rest[0] as boolean
1358
+ };
1359
+ }
1360
+
1361
+ const projectId = params.projectId;
1362
+ const enabled = params.enabled;
1363
+
649
1364
  if (typeof projectId === 'undefined') {
650
1365
  throw new AppwriteException('Missing required parameter: "projectId"');
651
1366
  }
652
- if (typeof method === 'undefined') {
653
- throw new AppwriteException('Missing required parameter: "method"');
654
- }
655
- if (typeof status === 'undefined') {
656
- throw new AppwriteException('Missing required parameter: "status"');
1367
+ if (typeof enabled === 'undefined') {
1368
+ throw new AppwriteException('Missing required parameter: "enabled"');
657
1369
  }
658
- const apiPath = '/projects/{projectId}/auth/{method}'.replace('{projectId}', projectId).replace('{method}', method);
1370
+
1371
+ const apiPath = '/projects/{projectId}/auth/session-invalidation'.replace('{projectId}', projectId);
659
1372
  const payload: Payload = {};
660
- if (typeof status !== 'undefined') {
661
- payload['status'] = status;
1373
+ if (typeof enabled !== 'undefined') {
1374
+ payload['enabled'] = enabled;
662
1375
  }
663
1376
  const uri = new URL(this.client.config.endpoint + apiPath);
664
1377
 
@@ -673,19 +1386,119 @@ export class Projects {
673
1386
  payload
674
1387
  );
675
1388
  }
1389
+
676
1390
  /**
677
- * List all the project\&#039;s dev keys. Dev keys are project specific and allow you to bypass rate limits and get better error logging during development.&#039;
1391
+ * Update the status of a specific authentication method. Use this endpoint to enable or disable different authentication methods such as email, magic urls or sms in your project.
678
1392
  *
679
- * @param {string} projectId
680
- * @param {string[]} queries
1393
+ * @param {string} params.projectId - Project unique ID.
1394
+ * @param {AuthMethod} params.method - Auth Method. Possible values: email-password,magic-url,email-otp,anonymous,invites,jwt,phone
1395
+ * @param {boolean} params.status - Set the status of this auth method.
681
1396
  * @throws {AppwriteException}
682
- * @returns {Promise<Models.DevKeyList>}
1397
+ * @returns {Promise<Models.Project>}
683
1398
  */
684
- listDevKeys(projectId: string, queries?: string[]): Promise<Models.DevKeyList> {
685
- if (typeof projectId === 'undefined') {
686
- throw new AppwriteException('Missing required parameter: "projectId"');
687
- }
688
- const apiPath = '/projects/{projectId}/dev-keys'.replace('{projectId}', projectId);
1399
+ updateAuthStatus(params: { projectId: string, method: AuthMethod, status: boolean }): Promise<Models.Project>;
1400
+ /**
1401
+ * Update the status of a specific authentication method. Use this endpoint to enable or disable different authentication methods such as email, magic urls or sms in your project.
1402
+ *
1403
+ * @param {string} projectId - Project unique ID.
1404
+ * @param {AuthMethod} method - Auth Method. Possible values: email-password,magic-url,email-otp,anonymous,invites,jwt,phone
1405
+ * @param {boolean} status - Set the status of this auth method.
1406
+ * @throws {AppwriteException}
1407
+ * @returns {Promise<Models.Project>}
1408
+ * @deprecated Use the object parameter style method for a better developer experience.
1409
+ */
1410
+ updateAuthStatus(projectId: string, method: AuthMethod, status: boolean): Promise<Models.Project>;
1411
+ updateAuthStatus(
1412
+ paramsOrFirst: { projectId: string, method: AuthMethod, status: boolean } | string,
1413
+ ...rest: [(AuthMethod)?, (boolean)?]
1414
+ ): Promise<Models.Project> {
1415
+ let params: { projectId: string, method: AuthMethod, status: boolean };
1416
+
1417
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1418
+ params = (paramsOrFirst || {}) as { projectId: string, method: AuthMethod, status: boolean };
1419
+ } else {
1420
+ params = {
1421
+ projectId: paramsOrFirst as string,
1422
+ method: rest[0] as AuthMethod,
1423
+ status: rest[1] as boolean
1424
+ };
1425
+ }
1426
+
1427
+ const projectId = params.projectId;
1428
+ const method = params.method;
1429
+ const status = params.status;
1430
+
1431
+ if (typeof projectId === 'undefined') {
1432
+ throw new AppwriteException('Missing required parameter: "projectId"');
1433
+ }
1434
+ if (typeof method === 'undefined') {
1435
+ throw new AppwriteException('Missing required parameter: "method"');
1436
+ }
1437
+ if (typeof status === 'undefined') {
1438
+ throw new AppwriteException('Missing required parameter: "status"');
1439
+ }
1440
+
1441
+ const apiPath = '/projects/{projectId}/auth/{method}'.replace('{projectId}', projectId).replace('{method}', method);
1442
+ const payload: Payload = {};
1443
+ if (typeof status !== 'undefined') {
1444
+ payload['status'] = status;
1445
+ }
1446
+ const uri = new URL(this.client.config.endpoint + apiPath);
1447
+
1448
+ const apiHeaders: { [header: string]: string } = {
1449
+ 'content-type': 'application/json',
1450
+ }
1451
+
1452
+ return this.client.call(
1453
+ 'patch',
1454
+ uri,
1455
+ apiHeaders,
1456
+ payload
1457
+ );
1458
+ }
1459
+
1460
+ /**
1461
+ * List all the project\'s dev keys. Dev keys are project specific and allow you to bypass rate limits and get better error logging during development.'
1462
+ *
1463
+ * @param {string} params.projectId - Project unique ID.
1464
+ * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: accessedAt, expire
1465
+ * @throws {AppwriteException}
1466
+ * @returns {Promise<Models.DevKeyList>}
1467
+ */
1468
+ listDevKeys(params: { projectId: string, queries?: string[] }): Promise<Models.DevKeyList>;
1469
+ /**
1470
+ * List all the project\'s dev keys. Dev keys are project specific and allow you to bypass rate limits and get better error logging during development.'
1471
+ *
1472
+ * @param {string} projectId - Project unique ID.
1473
+ * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: accessedAt, expire
1474
+ * @throws {AppwriteException}
1475
+ * @returns {Promise<Models.DevKeyList>}
1476
+ * @deprecated Use the object parameter style method for a better developer experience.
1477
+ */
1478
+ listDevKeys(projectId: string, queries?: string[]): Promise<Models.DevKeyList>;
1479
+ listDevKeys(
1480
+ paramsOrFirst: { projectId: string, queries?: string[] } | string,
1481
+ ...rest: [(string[])?]
1482
+ ): Promise<Models.DevKeyList> {
1483
+ let params: { projectId: string, queries?: string[] };
1484
+
1485
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1486
+ params = (paramsOrFirst || {}) as { projectId: string, queries?: string[] };
1487
+ } else {
1488
+ params = {
1489
+ projectId: paramsOrFirst as string,
1490
+ queries: rest[0] as string[]
1491
+ };
1492
+ }
1493
+
1494
+ const projectId = params.projectId;
1495
+ const queries = params.queries;
1496
+
1497
+ if (typeof projectId === 'undefined') {
1498
+ throw new AppwriteException('Missing required parameter: "projectId"');
1499
+ }
1500
+
1501
+ const apiPath = '/projects/{projectId}/dev-keys'.replace('{projectId}', projectId);
689
1502
  const payload: Payload = {};
690
1503
  if (typeof queries !== 'undefined') {
691
1504
  payload['queries'] = queries;
@@ -702,16 +1515,48 @@ export class Projects {
702
1515
  payload
703
1516
  );
704
1517
  }
1518
+
1519
+ /**
1520
+ * Create a new project dev key. Dev keys are project specific and allow you to bypass rate limits and get better error logging during development. Strictly meant for development purposes only.
1521
+ *
1522
+ * @param {string} params.projectId - Project unique ID.
1523
+ * @param {string} params.name - Key name. Max length: 128 chars.
1524
+ * @param {string} params.expire - Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format.
1525
+ * @throws {AppwriteException}
1526
+ * @returns {Promise<Models.DevKey>}
1527
+ */
1528
+ createDevKey(params: { projectId: string, name: string, expire: string }): Promise<Models.DevKey>;
705
1529
  /**
706
1530
  * Create a new project dev key. Dev keys are project specific and allow you to bypass rate limits and get better error logging during development. Strictly meant for development purposes only.
707
1531
  *
708
- * @param {string} projectId
709
- * @param {string} name
710
- * @param {string} expire
1532
+ * @param {string} projectId - Project unique ID.
1533
+ * @param {string} name - Key name. Max length: 128 chars.
1534
+ * @param {string} expire - Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format.
711
1535
  * @throws {AppwriteException}
712
1536
  * @returns {Promise<Models.DevKey>}
1537
+ * @deprecated Use the object parameter style method for a better developer experience.
713
1538
  */
714
- createDevKey(projectId: string, name: string, expire: string): Promise<Models.DevKey> {
1539
+ createDevKey(projectId: string, name: string, expire: string): Promise<Models.DevKey>;
1540
+ createDevKey(
1541
+ paramsOrFirst: { projectId: string, name: string, expire: string } | string,
1542
+ ...rest: [(string)?, (string)?]
1543
+ ): Promise<Models.DevKey> {
1544
+ let params: { projectId: string, name: string, expire: string };
1545
+
1546
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1547
+ params = (paramsOrFirst || {}) as { projectId: string, name: string, expire: string };
1548
+ } else {
1549
+ params = {
1550
+ projectId: paramsOrFirst as string,
1551
+ name: rest[0] as string,
1552
+ expire: rest[1] as string
1553
+ };
1554
+ }
1555
+
1556
+ const projectId = params.projectId;
1557
+ const name = params.name;
1558
+ const expire = params.expire;
1559
+
715
1560
  if (typeof projectId === 'undefined') {
716
1561
  throw new AppwriteException('Missing required parameter: "projectId"');
717
1562
  }
@@ -721,6 +1566,7 @@ export class Projects {
721
1566
  if (typeof expire === 'undefined') {
722
1567
  throw new AppwriteException('Missing required parameter: "expire"');
723
1568
  }
1569
+
724
1570
  const apiPath = '/projects/{projectId}/dev-keys'.replace('{projectId}', projectId);
725
1571
  const payload: Payload = {};
726
1572
  if (typeof name !== 'undefined') {
@@ -742,21 +1588,51 @@ export class Projects {
742
1588
  payload
743
1589
  );
744
1590
  }
1591
+
1592
+ /**
1593
+ * Get a project\'s dev key by its unique ID. Dev keys are project specific and allow you to bypass rate limits and get better error logging during development.
1594
+ *
1595
+ * @param {string} params.projectId - Project unique ID.
1596
+ * @param {string} params.keyId - Key unique ID.
1597
+ * @throws {AppwriteException}
1598
+ * @returns {Promise<Models.DevKey>}
1599
+ */
1600
+ getDevKey(params: { projectId: string, keyId: string }): Promise<Models.DevKey>;
745
1601
  /**
746
- * Get a project\&#039;s dev key by its unique ID. Dev keys are project specific and allow you to bypass rate limits and get better error logging during development.
1602
+ * Get a project\'s dev key by its unique ID. Dev keys are project specific and allow you to bypass rate limits and get better error logging during development.
747
1603
  *
748
- * @param {string} projectId
749
- * @param {string} keyId
1604
+ * @param {string} projectId - Project unique ID.
1605
+ * @param {string} keyId - Key unique ID.
750
1606
  * @throws {AppwriteException}
751
1607
  * @returns {Promise<Models.DevKey>}
1608
+ * @deprecated Use the object parameter style method for a better developer experience.
752
1609
  */
753
- getDevKey(projectId: string, keyId: string): Promise<Models.DevKey> {
1610
+ getDevKey(projectId: string, keyId: string): Promise<Models.DevKey>;
1611
+ getDevKey(
1612
+ paramsOrFirst: { projectId: string, keyId: string } | string,
1613
+ ...rest: [(string)?]
1614
+ ): Promise<Models.DevKey> {
1615
+ let params: { projectId: string, keyId: string };
1616
+
1617
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1618
+ params = (paramsOrFirst || {}) as { projectId: string, keyId: string };
1619
+ } else {
1620
+ params = {
1621
+ projectId: paramsOrFirst as string,
1622
+ keyId: rest[0] as string
1623
+ };
1624
+ }
1625
+
1626
+ const projectId = params.projectId;
1627
+ const keyId = params.keyId;
1628
+
754
1629
  if (typeof projectId === 'undefined') {
755
1630
  throw new AppwriteException('Missing required parameter: "projectId"');
756
1631
  }
757
1632
  if (typeof keyId === 'undefined') {
758
1633
  throw new AppwriteException('Missing required parameter: "keyId"');
759
1634
  }
1635
+
760
1636
  const apiPath = '/projects/{projectId}/dev-keys/{keyId}'.replace('{projectId}', projectId).replace('{keyId}', keyId);
761
1637
  const payload: Payload = {};
762
1638
  const uri = new URL(this.client.config.endpoint + apiPath);
@@ -771,17 +1647,52 @@ export class Projects {
771
1647
  payload
772
1648
  );
773
1649
  }
1650
+
1651
+ /**
1652
+ * Update a project\'s dev key by its unique ID. Use this endpoint to update a project\'s dev key name or expiration time.'
1653
+ *
1654
+ * @param {string} params.projectId - Project unique ID.
1655
+ * @param {string} params.keyId - Key unique ID.
1656
+ * @param {string} params.name - Key name. Max length: 128 chars.
1657
+ * @param {string} params.expire - Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format.
1658
+ * @throws {AppwriteException}
1659
+ * @returns {Promise<Models.DevKey>}
1660
+ */
1661
+ updateDevKey(params: { projectId: string, keyId: string, name: string, expire: string }): Promise<Models.DevKey>;
774
1662
  /**
775
- * Update a project\&#039;s dev key by its unique ID. Use this endpoint to update a project\&#039;s dev key name or expiration time.&#039;
1663
+ * Update a project\'s dev key by its unique ID. Use this endpoint to update a project\'s dev key name or expiration time.'
776
1664
  *
777
- * @param {string} projectId
778
- * @param {string} keyId
779
- * @param {string} name
780
- * @param {string} expire
1665
+ * @param {string} projectId - Project unique ID.
1666
+ * @param {string} keyId - Key unique ID.
1667
+ * @param {string} name - Key name. Max length: 128 chars.
1668
+ * @param {string} expire - Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format.
781
1669
  * @throws {AppwriteException}
782
1670
  * @returns {Promise<Models.DevKey>}
1671
+ * @deprecated Use the object parameter style method for a better developer experience.
783
1672
  */
784
- updateDevKey(projectId: string, keyId: string, name: string, expire: string): Promise<Models.DevKey> {
1673
+ updateDevKey(projectId: string, keyId: string, name: string, expire: string): Promise<Models.DevKey>;
1674
+ updateDevKey(
1675
+ paramsOrFirst: { projectId: string, keyId: string, name: string, expire: string } | string,
1676
+ ...rest: [(string)?, (string)?, (string)?]
1677
+ ): Promise<Models.DevKey> {
1678
+ let params: { projectId: string, keyId: string, name: string, expire: string };
1679
+
1680
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1681
+ params = (paramsOrFirst || {}) as { projectId: string, keyId: string, name: string, expire: string };
1682
+ } else {
1683
+ params = {
1684
+ projectId: paramsOrFirst as string,
1685
+ keyId: rest[0] as string,
1686
+ name: rest[1] as string,
1687
+ expire: rest[2] as string
1688
+ };
1689
+ }
1690
+
1691
+ const projectId = params.projectId;
1692
+ const keyId = params.keyId;
1693
+ const name = params.name;
1694
+ const expire = params.expire;
1695
+
785
1696
  if (typeof projectId === 'undefined') {
786
1697
  throw new AppwriteException('Missing required parameter: "projectId"');
787
1698
  }
@@ -794,6 +1705,7 @@ export class Projects {
794
1705
  if (typeof expire === 'undefined') {
795
1706
  throw new AppwriteException('Missing required parameter: "expire"');
796
1707
  }
1708
+
797
1709
  const apiPath = '/projects/{projectId}/dev-keys/{keyId}'.replace('{projectId}', projectId).replace('{keyId}', keyId);
798
1710
  const payload: Payload = {};
799
1711
  if (typeof name !== 'undefined') {
@@ -815,21 +1727,51 @@ export class Projects {
815
1727
  payload
816
1728
  );
817
1729
  }
1730
+
1731
+ /**
1732
+ * Delete a project\'s dev key by its unique ID. Once deleted, the key will no longer allow bypassing of rate limits and better logging of errors.
1733
+ *
1734
+ * @param {string} params.projectId - Project unique ID.
1735
+ * @param {string} params.keyId - Key unique ID.
1736
+ * @throws {AppwriteException}
1737
+ * @returns {Promise<{}>}
1738
+ */
1739
+ deleteDevKey(params: { projectId: string, keyId: string }): Promise<{}>;
818
1740
  /**
819
- * Delete a project\&#039;s dev key by its unique ID. Once deleted, the key will no longer allow bypassing of rate limits and better logging of errors.
1741
+ * Delete a project\'s dev key by its unique ID. Once deleted, the key will no longer allow bypassing of rate limits and better logging of errors.
820
1742
  *
821
- * @param {string} projectId
822
- * @param {string} keyId
1743
+ * @param {string} projectId - Project unique ID.
1744
+ * @param {string} keyId - Key unique ID.
823
1745
  * @throws {AppwriteException}
824
1746
  * @returns {Promise<{}>}
1747
+ * @deprecated Use the object parameter style method for a better developer experience.
825
1748
  */
826
- deleteDevKey(projectId: string, keyId: string): Promise<{}> {
1749
+ deleteDevKey(projectId: string, keyId: string): Promise<{}>;
1750
+ deleteDevKey(
1751
+ paramsOrFirst: { projectId: string, keyId: string } | string,
1752
+ ...rest: [(string)?]
1753
+ ): Promise<{}> {
1754
+ let params: { projectId: string, keyId: string };
1755
+
1756
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1757
+ params = (paramsOrFirst || {}) as { projectId: string, keyId: string };
1758
+ } else {
1759
+ params = {
1760
+ projectId: paramsOrFirst as string,
1761
+ keyId: rest[0] as string
1762
+ };
1763
+ }
1764
+
1765
+ const projectId = params.projectId;
1766
+ const keyId = params.keyId;
1767
+
827
1768
  if (typeof projectId === 'undefined') {
828
1769
  throw new AppwriteException('Missing required parameter: "projectId"');
829
1770
  }
830
1771
  if (typeof keyId === 'undefined') {
831
1772
  throw new AppwriteException('Missing required parameter: "keyId"');
832
1773
  }
1774
+
833
1775
  const apiPath = '/projects/{projectId}/dev-keys/{keyId}'.replace('{projectId}', projectId).replace('{keyId}', keyId);
834
1776
  const payload: Payload = {};
835
1777
  const uri = new URL(this.client.config.endpoint + apiPath);
@@ -845,22 +1787,55 @@ export class Projects {
845
1787
  payload
846
1788
  );
847
1789
  }
1790
+
1791
+ /**
1792
+ * Create a new JWT token. This token can be used to authenticate users with custom scopes and expiration time.
1793
+ *
1794
+ * @param {string} params.projectId - Project unique ID.
1795
+ * @param {string[]} params.scopes - List of scopes allowed for JWT key. Maximum of 100 scopes are allowed.
1796
+ * @param {number} params.duration - Time in seconds before JWT expires. Default duration is 900 seconds, and maximum is 3600 seconds.
1797
+ * @throws {AppwriteException}
1798
+ * @returns {Promise<Models.Jwt>}
1799
+ */
1800
+ createJWT(params: { projectId: string, scopes: string[], duration?: number }): Promise<Models.Jwt>;
848
1801
  /**
849
1802
  * Create a new JWT token. This token can be used to authenticate users with custom scopes and expiration time.
850
1803
  *
851
- * @param {string} projectId
852
- * @param {string[]} scopes
853
- * @param {number} duration
1804
+ * @param {string} projectId - Project unique ID.
1805
+ * @param {string[]} scopes - List of scopes allowed for JWT key. Maximum of 100 scopes are allowed.
1806
+ * @param {number} duration - Time in seconds before JWT expires. Default duration is 900 seconds, and maximum is 3600 seconds.
854
1807
  * @throws {AppwriteException}
855
1808
  * @returns {Promise<Models.Jwt>}
1809
+ * @deprecated Use the object parameter style method for a better developer experience.
856
1810
  */
857
- createJWT(projectId: string, scopes: string[], duration?: number): Promise<Models.Jwt> {
1811
+ createJWT(projectId: string, scopes: string[], duration?: number): Promise<Models.Jwt>;
1812
+ createJWT(
1813
+ paramsOrFirst: { projectId: string, scopes: string[], duration?: number } | string,
1814
+ ...rest: [(string[])?, (number)?]
1815
+ ): Promise<Models.Jwt> {
1816
+ let params: { projectId: string, scopes: string[], duration?: number };
1817
+
1818
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1819
+ params = (paramsOrFirst || {}) as { projectId: string, scopes: string[], duration?: number };
1820
+ } else {
1821
+ params = {
1822
+ projectId: paramsOrFirst as string,
1823
+ scopes: rest[0] as string[],
1824
+ duration: rest[1] as number
1825
+ };
1826
+ }
1827
+
1828
+ const projectId = params.projectId;
1829
+ const scopes = params.scopes;
1830
+ const duration = params.duration;
1831
+
858
1832
  if (typeof projectId === 'undefined') {
859
1833
  throw new AppwriteException('Missing required parameter: "projectId"');
860
1834
  }
861
1835
  if (typeof scopes === 'undefined') {
862
1836
  throw new AppwriteException('Missing required parameter: "scopes"');
863
1837
  }
1838
+
864
1839
  const apiPath = '/projects/{projectId}/jwts'.replace('{projectId}', projectId);
865
1840
  const payload: Payload = {};
866
1841
  if (typeof scopes !== 'undefined') {
@@ -882,19 +1857,53 @@ export class Projects {
882
1857
  payload
883
1858
  );
884
1859
  }
1860
+
1861
+ /**
1862
+ * Get a list of all API keys from the current project.
1863
+ *
1864
+ * @param {string} params.projectId - Project unique ID.
1865
+ * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
1866
+ * @throws {AppwriteException}
1867
+ * @returns {Promise<Models.KeyList>}
1868
+ */
1869
+ listKeys(params: { projectId: string, total?: boolean }): Promise<Models.KeyList>;
885
1870
  /**
886
1871
  * Get a list of all API keys from the current project.
887
1872
  *
888
- * @param {string} projectId
1873
+ * @param {string} projectId - Project unique ID.
1874
+ * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
889
1875
  * @throws {AppwriteException}
890
1876
  * @returns {Promise<Models.KeyList>}
1877
+ * @deprecated Use the object parameter style method for a better developer experience.
891
1878
  */
892
- listKeys(projectId: string): Promise<Models.KeyList> {
1879
+ listKeys(projectId: string, total?: boolean): Promise<Models.KeyList>;
1880
+ listKeys(
1881
+ paramsOrFirst: { projectId: string, total?: boolean } | string,
1882
+ ...rest: [(boolean)?]
1883
+ ): Promise<Models.KeyList> {
1884
+ let params: { projectId: string, total?: boolean };
1885
+
1886
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1887
+ params = (paramsOrFirst || {}) as { projectId: string, total?: boolean };
1888
+ } else {
1889
+ params = {
1890
+ projectId: paramsOrFirst as string,
1891
+ total: rest[0] as boolean
1892
+ };
1893
+ }
1894
+
1895
+ const projectId = params.projectId;
1896
+ const total = params.total;
1897
+
893
1898
  if (typeof projectId === 'undefined') {
894
1899
  throw new AppwriteException('Missing required parameter: "projectId"');
895
1900
  }
1901
+
896
1902
  const apiPath = '/projects/{projectId}/keys'.replace('{projectId}', projectId);
897
1903
  const payload: Payload = {};
1904
+ if (typeof total !== 'undefined') {
1905
+ payload['total'] = total;
1906
+ }
898
1907
  const uri = new URL(this.client.config.endpoint + apiPath);
899
1908
 
900
1909
  const apiHeaders: { [header: string]: string } = {
@@ -907,17 +1916,52 @@ export class Projects {
907
1916
  payload
908
1917
  );
909
1918
  }
1919
+
1920
+ /**
1921
+ * Create a new API key. It's recommended to have multiple API keys with strict scopes for separate functions within your project.
1922
+ *
1923
+ * @param {string} params.projectId - Project unique ID.
1924
+ * @param {string} params.name - Key name. Max length: 128 chars.
1925
+ * @param {string[]} params.scopes - Key scopes list. Maximum of 100 scopes are allowed.
1926
+ * @param {string} params.expire - Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.
1927
+ * @throws {AppwriteException}
1928
+ * @returns {Promise<Models.Key>}
1929
+ */
1930
+ createKey(params: { projectId: string, name: string, scopes?: string[], expire?: string }): Promise<Models.Key>;
910
1931
  /**
911
- * Create a new API key. It&#039;s recommended to have multiple API keys with strict scopes for separate functions within your project.
1932
+ * Create a new API key. It's recommended to have multiple API keys with strict scopes for separate functions within your project.
912
1933
  *
913
- * @param {string} projectId
914
- * @param {string} name
915
- * @param {string[]} scopes
916
- * @param {string} expire
1934
+ * @param {string} projectId - Project unique ID.
1935
+ * @param {string} name - Key name. Max length: 128 chars.
1936
+ * @param {string[]} scopes - Key scopes list. Maximum of 100 scopes are allowed.
1937
+ * @param {string} expire - Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.
917
1938
  * @throws {AppwriteException}
918
1939
  * @returns {Promise<Models.Key>}
1940
+ * @deprecated Use the object parameter style method for a better developer experience.
919
1941
  */
920
- createKey(projectId: string, name: string, scopes: string[], expire?: string): Promise<Models.Key> {
1942
+ createKey(projectId: string, name: string, scopes?: string[], expire?: string): Promise<Models.Key>;
1943
+ createKey(
1944
+ paramsOrFirst: { projectId: string, name: string, scopes?: string[], expire?: string } | string,
1945
+ ...rest: [(string)?, (string[])?, (string)?]
1946
+ ): Promise<Models.Key> {
1947
+ let params: { projectId: string, name: string, scopes?: string[], expire?: string };
1948
+
1949
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1950
+ params = (paramsOrFirst || {}) as { projectId: string, name: string, scopes?: string[], expire?: string };
1951
+ } else {
1952
+ params = {
1953
+ projectId: paramsOrFirst as string,
1954
+ name: rest[0] as string,
1955
+ scopes: rest[1] as string[],
1956
+ expire: rest[2] as string
1957
+ };
1958
+ }
1959
+
1960
+ const projectId = params.projectId;
1961
+ const name = params.name;
1962
+ const scopes = params.scopes;
1963
+ const expire = params.expire;
1964
+
921
1965
  if (typeof projectId === 'undefined') {
922
1966
  throw new AppwriteException('Missing required parameter: "projectId"');
923
1967
  }
@@ -927,6 +1971,7 @@ export class Projects {
927
1971
  if (typeof scopes === 'undefined') {
928
1972
  throw new AppwriteException('Missing required parameter: "scopes"');
929
1973
  }
1974
+
930
1975
  const apiPath = '/projects/{projectId}/keys'.replace('{projectId}', projectId);
931
1976
  const payload: Payload = {};
932
1977
  if (typeof name !== 'undefined') {
@@ -951,21 +1996,51 @@ export class Projects {
951
1996
  payload
952
1997
  );
953
1998
  }
1999
+
2000
+ /**
2001
+ * Get a key by its unique ID. This endpoint returns details about a specific API key in your project including it's scopes.
2002
+ *
2003
+ * @param {string} params.projectId - Project unique ID.
2004
+ * @param {string} params.keyId - Key unique ID.
2005
+ * @throws {AppwriteException}
2006
+ * @returns {Promise<Models.Key>}
2007
+ */
2008
+ getKey(params: { projectId: string, keyId: string }): Promise<Models.Key>;
954
2009
  /**
955
- * Get a key by its unique ID. This endpoint returns details about a specific API key in your project including it&#039;s scopes.
2010
+ * Get a key by its unique ID. This endpoint returns details about a specific API key in your project including it's scopes.
956
2011
  *
957
- * @param {string} projectId
958
- * @param {string} keyId
2012
+ * @param {string} projectId - Project unique ID.
2013
+ * @param {string} keyId - Key unique ID.
959
2014
  * @throws {AppwriteException}
960
2015
  * @returns {Promise<Models.Key>}
2016
+ * @deprecated Use the object parameter style method for a better developer experience.
961
2017
  */
962
- getKey(projectId: string, keyId: string): Promise<Models.Key> {
2018
+ getKey(projectId: string, keyId: string): Promise<Models.Key>;
2019
+ getKey(
2020
+ paramsOrFirst: { projectId: string, keyId: string } | string,
2021
+ ...rest: [(string)?]
2022
+ ): Promise<Models.Key> {
2023
+ let params: { projectId: string, keyId: string };
2024
+
2025
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
2026
+ params = (paramsOrFirst || {}) as { projectId: string, keyId: string };
2027
+ } else {
2028
+ params = {
2029
+ projectId: paramsOrFirst as string,
2030
+ keyId: rest[0] as string
2031
+ };
2032
+ }
2033
+
2034
+ const projectId = params.projectId;
2035
+ const keyId = params.keyId;
2036
+
963
2037
  if (typeof projectId === 'undefined') {
964
2038
  throw new AppwriteException('Missing required parameter: "projectId"');
965
2039
  }
966
2040
  if (typeof keyId === 'undefined') {
967
2041
  throw new AppwriteException('Missing required parameter: "keyId"');
968
2042
  }
2043
+
969
2044
  const apiPath = '/projects/{projectId}/keys/{keyId}'.replace('{projectId}', projectId).replace('{keyId}', keyId);
970
2045
  const payload: Payload = {};
971
2046
  const uri = new URL(this.client.config.endpoint + apiPath);
@@ -980,18 +2055,56 @@ export class Projects {
980
2055
  payload
981
2056
  );
982
2057
  }
2058
+
2059
+ /**
2060
+ * Update a key by its unique ID. Use this endpoint to update the name, scopes, or expiration time of an API key.
2061
+ *
2062
+ * @param {string} params.projectId - Project unique ID.
2063
+ * @param {string} params.keyId - Key unique ID.
2064
+ * @param {string} params.name - Key name. Max length: 128 chars.
2065
+ * @param {string[]} params.scopes - Key scopes list. Maximum of 100 events are allowed.
2066
+ * @param {string} params.expire - Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.
2067
+ * @throws {AppwriteException}
2068
+ * @returns {Promise<Models.Key>}
2069
+ */
2070
+ updateKey(params: { projectId: string, keyId: string, name: string, scopes?: string[], expire?: string }): Promise<Models.Key>;
983
2071
  /**
984
2072
  * Update a key by its unique ID. Use this endpoint to update the name, scopes, or expiration time of an API key.
985
2073
  *
986
- * @param {string} projectId
987
- * @param {string} keyId
988
- * @param {string} name
989
- * @param {string[]} scopes
990
- * @param {string} expire
2074
+ * @param {string} projectId - Project unique ID.
2075
+ * @param {string} keyId - Key unique ID.
2076
+ * @param {string} name - Key name. Max length: 128 chars.
2077
+ * @param {string[]} scopes - Key scopes list. Maximum of 100 events are allowed.
2078
+ * @param {string} expire - Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.
991
2079
  * @throws {AppwriteException}
992
2080
  * @returns {Promise<Models.Key>}
2081
+ * @deprecated Use the object parameter style method for a better developer experience.
993
2082
  */
994
- updateKey(projectId: string, keyId: string, name: string, scopes: string[], expire?: string): Promise<Models.Key> {
2083
+ updateKey(projectId: string, keyId: string, name: string, scopes?: string[], expire?: string): Promise<Models.Key>;
2084
+ updateKey(
2085
+ paramsOrFirst: { projectId: string, keyId: string, name: string, scopes?: string[], expire?: string } | string,
2086
+ ...rest: [(string)?, (string)?, (string[])?, (string)?]
2087
+ ): Promise<Models.Key> {
2088
+ let params: { projectId: string, keyId: string, name: string, scopes?: string[], expire?: string };
2089
+
2090
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
2091
+ params = (paramsOrFirst || {}) as { projectId: string, keyId: string, name: string, scopes?: string[], expire?: string };
2092
+ } else {
2093
+ params = {
2094
+ projectId: paramsOrFirst as string,
2095
+ keyId: rest[0] as string,
2096
+ name: rest[1] as string,
2097
+ scopes: rest[2] as string[],
2098
+ expire: rest[3] as string
2099
+ };
2100
+ }
2101
+
2102
+ const projectId = params.projectId;
2103
+ const keyId = params.keyId;
2104
+ const name = params.name;
2105
+ const scopes = params.scopes;
2106
+ const expire = params.expire;
2107
+
995
2108
  if (typeof projectId === 'undefined') {
996
2109
  throw new AppwriteException('Missing required parameter: "projectId"');
997
2110
  }
@@ -1004,6 +2117,7 @@ export class Projects {
1004
2117
  if (typeof scopes === 'undefined') {
1005
2118
  throw new AppwriteException('Missing required parameter: "scopes"');
1006
2119
  }
2120
+
1007
2121
  const apiPath = '/projects/{projectId}/keys/{keyId}'.replace('{projectId}', projectId).replace('{keyId}', keyId);
1008
2122
  const payload: Payload = {};
1009
2123
  if (typeof name !== 'undefined') {
@@ -1028,21 +2142,51 @@ export class Projects {
1028
2142
  payload
1029
2143
  );
1030
2144
  }
2145
+
2146
+ /**
2147
+ * Delete a key by its unique ID. Once deleted, the key can no longer be used to authenticate API calls.
2148
+ *
2149
+ * @param {string} params.projectId - Project unique ID.
2150
+ * @param {string} params.keyId - Key unique ID.
2151
+ * @throws {AppwriteException}
2152
+ * @returns {Promise<{}>}
2153
+ */
2154
+ deleteKey(params: { projectId: string, keyId: string }): Promise<{}>;
1031
2155
  /**
1032
2156
  * Delete a key by its unique ID. Once deleted, the key can no longer be used to authenticate API calls.
1033
2157
  *
1034
- * @param {string} projectId
1035
- * @param {string} keyId
2158
+ * @param {string} projectId - Project unique ID.
2159
+ * @param {string} keyId - Key unique ID.
1036
2160
  * @throws {AppwriteException}
1037
2161
  * @returns {Promise<{}>}
2162
+ * @deprecated Use the object parameter style method for a better developer experience.
1038
2163
  */
1039
- deleteKey(projectId: string, keyId: string): Promise<{}> {
2164
+ deleteKey(projectId: string, keyId: string): Promise<{}>;
2165
+ deleteKey(
2166
+ paramsOrFirst: { projectId: string, keyId: string } | string,
2167
+ ...rest: [(string)?]
2168
+ ): Promise<{}> {
2169
+ let params: { projectId: string, keyId: string };
2170
+
2171
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
2172
+ params = (paramsOrFirst || {}) as { projectId: string, keyId: string };
2173
+ } else {
2174
+ params = {
2175
+ projectId: paramsOrFirst as string,
2176
+ keyId: rest[0] as string
2177
+ };
2178
+ }
2179
+
2180
+ const projectId = params.projectId;
2181
+ const keyId = params.keyId;
2182
+
1040
2183
  if (typeof projectId === 'undefined') {
1041
2184
  throw new AppwriteException('Missing required parameter: "projectId"');
1042
2185
  }
1043
2186
  if (typeof keyId === 'undefined') {
1044
2187
  throw new AppwriteException('Missing required parameter: "keyId"');
1045
2188
  }
2189
+
1046
2190
  const apiPath = '/projects/{projectId}/keys/{keyId}'.replace('{projectId}', projectId).replace('{keyId}', keyId);
1047
2191
  const payload: Payload = {};
1048
2192
  const uri = new URL(this.client.config.endpoint + apiPath);
@@ -1058,24 +2202,63 @@ export class Projects {
1058
2202
  payload
1059
2203
  );
1060
2204
  }
2205
+
2206
+ /**
2207
+ * Update the OAuth2 provider configurations. Use this endpoint to set up or update the OAuth2 provider credentials or enable/disable providers.
2208
+ *
2209
+ * @param {string} params.projectId - Project unique ID.
2210
+ * @param {OAuthProvider} params.provider - Provider Name
2211
+ * @param {string} params.appId - Provider app ID. Max length: 256 chars.
2212
+ * @param {string} params.secret - Provider secret key. Max length: 512 chars.
2213
+ * @param {boolean} params.enabled - Provider status. Set to 'false' to disable new session creation.
2214
+ * @throws {AppwriteException}
2215
+ * @returns {Promise<Models.Project>}
2216
+ */
2217
+ updateOAuth2(params: { projectId: string, provider: OAuthProvider, appId?: string, secret?: string, enabled?: boolean }): Promise<Models.Project>;
1061
2218
  /**
1062
2219
  * Update the OAuth2 provider configurations. Use this endpoint to set up or update the OAuth2 provider credentials or enable/disable providers.
1063
2220
  *
1064
- * @param {string} projectId
1065
- * @param {OAuthProvider} provider
1066
- * @param {string} appId
1067
- * @param {string} secret
1068
- * @param {boolean} enabled
2221
+ * @param {string} projectId - Project unique ID.
2222
+ * @param {OAuthProvider} provider - Provider Name
2223
+ * @param {string} appId - Provider app ID. Max length: 256 chars.
2224
+ * @param {string} secret - Provider secret key. Max length: 512 chars.
2225
+ * @param {boolean} enabled - Provider status. Set to 'false' to disable new session creation.
1069
2226
  * @throws {AppwriteException}
1070
2227
  * @returns {Promise<Models.Project>}
2228
+ * @deprecated Use the object parameter style method for a better developer experience.
1071
2229
  */
1072
- updateOAuth2(projectId: string, provider: OAuthProvider, appId?: string, secret?: string, enabled?: boolean): Promise<Models.Project> {
2230
+ updateOAuth2(projectId: string, provider: OAuthProvider, appId?: string, secret?: string, enabled?: boolean): Promise<Models.Project>;
2231
+ updateOAuth2(
2232
+ paramsOrFirst: { projectId: string, provider: OAuthProvider, appId?: string, secret?: string, enabled?: boolean } | string,
2233
+ ...rest: [(OAuthProvider)?, (string)?, (string)?, (boolean)?]
2234
+ ): Promise<Models.Project> {
2235
+ let params: { projectId: string, provider: OAuthProvider, appId?: string, secret?: string, enabled?: boolean };
2236
+
2237
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
2238
+ params = (paramsOrFirst || {}) as { projectId: string, provider: OAuthProvider, appId?: string, secret?: string, enabled?: boolean };
2239
+ } else {
2240
+ params = {
2241
+ projectId: paramsOrFirst as string,
2242
+ provider: rest[0] as OAuthProvider,
2243
+ appId: rest[1] as string,
2244
+ secret: rest[2] as string,
2245
+ enabled: rest[3] as boolean
2246
+ };
2247
+ }
2248
+
2249
+ const projectId = params.projectId;
2250
+ const provider = params.provider;
2251
+ const appId = params.appId;
2252
+ const secret = params.secret;
2253
+ const enabled = params.enabled;
2254
+
1073
2255
  if (typeof projectId === 'undefined') {
1074
2256
  throw new AppwriteException('Missing required parameter: "projectId"');
1075
2257
  }
1076
2258
  if (typeof provider === 'undefined') {
1077
2259
  throw new AppwriteException('Missing required parameter: "provider"');
1078
2260
  }
2261
+
1079
2262
  const apiPath = '/projects/{projectId}/oauth2'.replace('{projectId}', projectId);
1080
2263
  const payload: Payload = {};
1081
2264
  if (typeof provider !== 'undefined') {
@@ -1103,19 +2286,53 @@ export class Projects {
1103
2286
  payload
1104
2287
  );
1105
2288
  }
2289
+
2290
+ /**
2291
+ * Get a list of all platforms in the project. This endpoint returns an array of all platforms and their configurations.
2292
+ *
2293
+ * @param {string} params.projectId - Project unique ID.
2294
+ * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
2295
+ * @throws {AppwriteException}
2296
+ * @returns {Promise<Models.PlatformList>}
2297
+ */
2298
+ listPlatforms(params: { projectId: string, total?: boolean }): Promise<Models.PlatformList>;
1106
2299
  /**
1107
2300
  * Get a list of all platforms in the project. This endpoint returns an array of all platforms and their configurations.
1108
2301
  *
1109
- * @param {string} projectId
2302
+ * @param {string} projectId - Project unique ID.
2303
+ * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
1110
2304
  * @throws {AppwriteException}
1111
2305
  * @returns {Promise<Models.PlatformList>}
2306
+ * @deprecated Use the object parameter style method for a better developer experience.
1112
2307
  */
1113
- listPlatforms(projectId: string): Promise<Models.PlatformList> {
2308
+ listPlatforms(projectId: string, total?: boolean): Promise<Models.PlatformList>;
2309
+ listPlatforms(
2310
+ paramsOrFirst: { projectId: string, total?: boolean } | string,
2311
+ ...rest: [(boolean)?]
2312
+ ): Promise<Models.PlatformList> {
2313
+ let params: { projectId: string, total?: boolean };
2314
+
2315
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
2316
+ params = (paramsOrFirst || {}) as { projectId: string, total?: boolean };
2317
+ } else {
2318
+ params = {
2319
+ projectId: paramsOrFirst as string,
2320
+ total: rest[0] as boolean
2321
+ };
2322
+ }
2323
+
2324
+ const projectId = params.projectId;
2325
+ const total = params.total;
2326
+
1114
2327
  if (typeof projectId === 'undefined') {
1115
2328
  throw new AppwriteException('Missing required parameter: "projectId"');
1116
2329
  }
2330
+
1117
2331
  const apiPath = '/projects/{projectId}/platforms'.replace('{projectId}', projectId);
1118
2332
  const payload: Payload = {};
2333
+ if (typeof total !== 'undefined') {
2334
+ payload['total'] = total;
2335
+ }
1119
2336
  const uri = new URL(this.client.config.endpoint + apiPath);
1120
2337
 
1121
2338
  const apiHeaders: { [header: string]: string } = {
@@ -1128,19 +2345,60 @@ export class Projects {
1128
2345
  payload
1129
2346
  );
1130
2347
  }
2348
+
2349
+ /**
2350
+ * Create a new platform for your project. Use this endpoint to register a new platform where your users will run your application which will interact with the Appwrite API.
2351
+ *
2352
+ * @param {string} params.projectId - Project unique ID.
2353
+ * @param {PlatformType} params.type - Platform type. Possible values are: web, flutter-web, flutter-ios, flutter-android, flutter-linux, flutter-macos, flutter-windows, apple-ios, apple-macos, apple-watchos, apple-tvos, android, unity, react-native-ios, react-native-android.
2354
+ * @param {string} params.name - Platform name. Max length: 128 chars.
2355
+ * @param {string} params.key - Package name for Android or bundle ID for iOS or macOS. Max length: 256 chars.
2356
+ * @param {string} params.store - App store or Google Play store ID. Max length: 256 chars.
2357
+ * @param {string} params.hostname - Platform client hostname. Max length: 256 chars.
2358
+ * @throws {AppwriteException}
2359
+ * @returns {Promise<Models.Platform>}
2360
+ */
2361
+ createPlatform(params: { projectId: string, type: PlatformType, name: string, key?: string, store?: string, hostname?: string }): Promise<Models.Platform>;
1131
2362
  /**
1132
2363
  * Create a new platform for your project. Use this endpoint to register a new platform where your users will run your application which will interact with the Appwrite API.
1133
2364
  *
1134
- * @param {string} projectId
1135
- * @param {PlatformType} type
1136
- * @param {string} name
1137
- * @param {string} key
1138
- * @param {string} store
1139
- * @param {string} hostname
2365
+ * @param {string} projectId - Project unique ID.
2366
+ * @param {PlatformType} type - Platform type. Possible values are: web, flutter-web, flutter-ios, flutter-android, flutter-linux, flutter-macos, flutter-windows, apple-ios, apple-macos, apple-watchos, apple-tvos, android, unity, react-native-ios, react-native-android.
2367
+ * @param {string} name - Platform name. Max length: 128 chars.
2368
+ * @param {string} key - Package name for Android or bundle ID for iOS or macOS. Max length: 256 chars.
2369
+ * @param {string} store - App store or Google Play store ID. Max length: 256 chars.
2370
+ * @param {string} hostname - Platform client hostname. Max length: 256 chars.
1140
2371
  * @throws {AppwriteException}
1141
2372
  * @returns {Promise<Models.Platform>}
2373
+ * @deprecated Use the object parameter style method for a better developer experience.
1142
2374
  */
1143
- createPlatform(projectId: string, type: PlatformType, name: string, key?: string, store?: string, hostname?: string): Promise<Models.Platform> {
2375
+ createPlatform(projectId: string, type: PlatformType, name: string, key?: string, store?: string, hostname?: string): Promise<Models.Platform>;
2376
+ createPlatform(
2377
+ paramsOrFirst: { projectId: string, type: PlatformType, name: string, key?: string, store?: string, hostname?: string } | string,
2378
+ ...rest: [(PlatformType)?, (string)?, (string)?, (string)?, (string)?]
2379
+ ): Promise<Models.Platform> {
2380
+ let params: { projectId: string, type: PlatformType, name: string, key?: string, store?: string, hostname?: string };
2381
+
2382
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
2383
+ params = (paramsOrFirst || {}) as { projectId: string, type: PlatformType, name: string, key?: string, store?: string, hostname?: string };
2384
+ } else {
2385
+ params = {
2386
+ projectId: paramsOrFirst as string,
2387
+ type: rest[0] as PlatformType,
2388
+ name: rest[1] as string,
2389
+ key: rest[2] as string,
2390
+ store: rest[3] as string,
2391
+ hostname: rest[4] as string
2392
+ };
2393
+ }
2394
+
2395
+ const projectId = params.projectId;
2396
+ const type = params.type;
2397
+ const name = params.name;
2398
+ const key = params.key;
2399
+ const store = params.store;
2400
+ const hostname = params.hostname;
2401
+
1144
2402
  if (typeof projectId === 'undefined') {
1145
2403
  throw new AppwriteException('Missing required parameter: "projectId"');
1146
2404
  }
@@ -1150,6 +2408,7 @@ export class Projects {
1150
2408
  if (typeof name === 'undefined') {
1151
2409
  throw new AppwriteException('Missing required parameter: "name"');
1152
2410
  }
2411
+
1153
2412
  const apiPath = '/projects/{projectId}/platforms'.replace('{projectId}', projectId);
1154
2413
  const payload: Payload = {};
1155
2414
  if (typeof type !== 'undefined') {
@@ -1180,21 +2439,51 @@ export class Projects {
1180
2439
  payload
1181
2440
  );
1182
2441
  }
2442
+
2443
+ /**
2444
+ * Get a platform by its unique ID. This endpoint returns the platform's details, including its name, type, and key configurations.
2445
+ *
2446
+ * @param {string} params.projectId - Project unique ID.
2447
+ * @param {string} params.platformId - Platform unique ID.
2448
+ * @throws {AppwriteException}
2449
+ * @returns {Promise<Models.Platform>}
2450
+ */
2451
+ getPlatform(params: { projectId: string, platformId: string }): Promise<Models.Platform>;
1183
2452
  /**
1184
- * Get a platform by its unique ID. This endpoint returns the platform&#039;s details, including its name, type, and key configurations.
2453
+ * Get a platform by its unique ID. This endpoint returns the platform's details, including its name, type, and key configurations.
1185
2454
  *
1186
- * @param {string} projectId
1187
- * @param {string} platformId
2455
+ * @param {string} projectId - Project unique ID.
2456
+ * @param {string} platformId - Platform unique ID.
1188
2457
  * @throws {AppwriteException}
1189
2458
  * @returns {Promise<Models.Platform>}
2459
+ * @deprecated Use the object parameter style method for a better developer experience.
1190
2460
  */
1191
- getPlatform(projectId: string, platformId: string): Promise<Models.Platform> {
2461
+ getPlatform(projectId: string, platformId: string): Promise<Models.Platform>;
2462
+ getPlatform(
2463
+ paramsOrFirst: { projectId: string, platformId: string } | string,
2464
+ ...rest: [(string)?]
2465
+ ): Promise<Models.Platform> {
2466
+ let params: { projectId: string, platformId: string };
2467
+
2468
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
2469
+ params = (paramsOrFirst || {}) as { projectId: string, platformId: string };
2470
+ } else {
2471
+ params = {
2472
+ projectId: paramsOrFirst as string,
2473
+ platformId: rest[0] as string
2474
+ };
2475
+ }
2476
+
2477
+ const projectId = params.projectId;
2478
+ const platformId = params.platformId;
2479
+
1192
2480
  if (typeof projectId === 'undefined') {
1193
2481
  throw new AppwriteException('Missing required parameter: "projectId"');
1194
2482
  }
1195
2483
  if (typeof platformId === 'undefined') {
1196
2484
  throw new AppwriteException('Missing required parameter: "platformId"');
1197
2485
  }
2486
+
1198
2487
  const apiPath = '/projects/{projectId}/platforms/{platformId}'.replace('{projectId}', projectId).replace('{platformId}', platformId);
1199
2488
  const payload: Payload = {};
1200
2489
  const uri = new URL(this.client.config.endpoint + apiPath);
@@ -1209,19 +2498,60 @@ export class Projects {
1209
2498
  payload
1210
2499
  );
1211
2500
  }
2501
+
2502
+ /**
2503
+ * Update a platform by its unique ID. Use this endpoint to update the platform's name, key, platform store ID, or hostname.
2504
+ *
2505
+ * @param {string} params.projectId - Project unique ID.
2506
+ * @param {string} params.platformId - Platform unique ID.
2507
+ * @param {string} params.name - Platform name. Max length: 128 chars.
2508
+ * @param {string} params.key - Package name for android or bundle ID for iOS. Max length: 256 chars.
2509
+ * @param {string} params.store - App store or Google Play store ID. Max length: 256 chars.
2510
+ * @param {string} params.hostname - Platform client URL. Max length: 256 chars.
2511
+ * @throws {AppwriteException}
2512
+ * @returns {Promise<Models.Platform>}
2513
+ */
2514
+ updatePlatform(params: { projectId: string, platformId: string, name: string, key?: string, store?: string, hostname?: string }): Promise<Models.Platform>;
1212
2515
  /**
1213
- * Update a platform by its unique ID. Use this endpoint to update the platform&#039;s name, key, platform store ID, or hostname.
2516
+ * Update a platform by its unique ID. Use this endpoint to update the platform's name, key, platform store ID, or hostname.
1214
2517
  *
1215
- * @param {string} projectId
1216
- * @param {string} platformId
1217
- * @param {string} name
1218
- * @param {string} key
1219
- * @param {string} store
1220
- * @param {string} hostname
2518
+ * @param {string} projectId - Project unique ID.
2519
+ * @param {string} platformId - Platform unique ID.
2520
+ * @param {string} name - Platform name. Max length: 128 chars.
2521
+ * @param {string} key - Package name for android or bundle ID for iOS. Max length: 256 chars.
2522
+ * @param {string} store - App store or Google Play store ID. Max length: 256 chars.
2523
+ * @param {string} hostname - Platform client URL. Max length: 256 chars.
1221
2524
  * @throws {AppwriteException}
1222
2525
  * @returns {Promise<Models.Platform>}
2526
+ * @deprecated Use the object parameter style method for a better developer experience.
1223
2527
  */
1224
- updatePlatform(projectId: string, platformId: string, name: string, key?: string, store?: string, hostname?: string): Promise<Models.Platform> {
2528
+ updatePlatform(projectId: string, platformId: string, name: string, key?: string, store?: string, hostname?: string): Promise<Models.Platform>;
2529
+ updatePlatform(
2530
+ paramsOrFirst: { projectId: string, platformId: string, name: string, key?: string, store?: string, hostname?: string } | string,
2531
+ ...rest: [(string)?, (string)?, (string)?, (string)?, (string)?]
2532
+ ): Promise<Models.Platform> {
2533
+ let params: { projectId: string, platformId: string, name: string, key?: string, store?: string, hostname?: string };
2534
+
2535
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
2536
+ params = (paramsOrFirst || {}) as { projectId: string, platformId: string, name: string, key?: string, store?: string, hostname?: string };
2537
+ } else {
2538
+ params = {
2539
+ projectId: paramsOrFirst as string,
2540
+ platformId: rest[0] as string,
2541
+ name: rest[1] as string,
2542
+ key: rest[2] as string,
2543
+ store: rest[3] as string,
2544
+ hostname: rest[4] as string
2545
+ };
2546
+ }
2547
+
2548
+ const projectId = params.projectId;
2549
+ const platformId = params.platformId;
2550
+ const name = params.name;
2551
+ const key = params.key;
2552
+ const store = params.store;
2553
+ const hostname = params.hostname;
2554
+
1225
2555
  if (typeof projectId === 'undefined') {
1226
2556
  throw new AppwriteException('Missing required parameter: "projectId"');
1227
2557
  }
@@ -1231,6 +2561,7 @@ export class Projects {
1231
2561
  if (typeof name === 'undefined') {
1232
2562
  throw new AppwriteException('Missing required parameter: "name"');
1233
2563
  }
2564
+
1234
2565
  const apiPath = '/projects/{projectId}/platforms/{platformId}'.replace('{projectId}', projectId).replace('{platformId}', platformId);
1235
2566
  const payload: Payload = {};
1236
2567
  if (typeof name !== 'undefined') {
@@ -1258,21 +2589,51 @@ export class Projects {
1258
2589
  payload
1259
2590
  );
1260
2591
  }
2592
+
2593
+ /**
2594
+ * Delete a platform by its unique ID. This endpoint removes the platform and all its configurations from the project.
2595
+ *
2596
+ * @param {string} params.projectId - Project unique ID.
2597
+ * @param {string} params.platformId - Platform unique ID.
2598
+ * @throws {AppwriteException}
2599
+ * @returns {Promise<{}>}
2600
+ */
2601
+ deletePlatform(params: { projectId: string, platformId: string }): Promise<{}>;
1261
2602
  /**
1262
2603
  * Delete a platform by its unique ID. This endpoint removes the platform and all its configurations from the project.
1263
2604
  *
1264
- * @param {string} projectId
1265
- * @param {string} platformId
2605
+ * @param {string} projectId - Project unique ID.
2606
+ * @param {string} platformId - Platform unique ID.
1266
2607
  * @throws {AppwriteException}
1267
2608
  * @returns {Promise<{}>}
2609
+ * @deprecated Use the object parameter style method for a better developer experience.
1268
2610
  */
1269
- deletePlatform(projectId: string, platformId: string): Promise<{}> {
2611
+ deletePlatform(projectId: string, platformId: string): Promise<{}>;
2612
+ deletePlatform(
2613
+ paramsOrFirst: { projectId: string, platformId: string } | string,
2614
+ ...rest: [(string)?]
2615
+ ): Promise<{}> {
2616
+ let params: { projectId: string, platformId: string };
2617
+
2618
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
2619
+ params = (paramsOrFirst || {}) as { projectId: string, platformId: string };
2620
+ } else {
2621
+ params = {
2622
+ projectId: paramsOrFirst as string,
2623
+ platformId: rest[0] as string
2624
+ };
2625
+ }
2626
+
2627
+ const projectId = params.projectId;
2628
+ const platformId = params.platformId;
2629
+
1270
2630
  if (typeof projectId === 'undefined') {
1271
2631
  throw new AppwriteException('Missing required parameter: "projectId"');
1272
2632
  }
1273
2633
  if (typeof platformId === 'undefined') {
1274
2634
  throw new AppwriteException('Missing required parameter: "platformId"');
1275
2635
  }
2636
+
1276
2637
  const apiPath = '/projects/{projectId}/platforms/{platformId}'.replace('{projectId}', projectId).replace('{platformId}', platformId);
1277
2638
  const payload: Payload = {};
1278
2639
  const uri = new URL(this.client.config.endpoint + apiPath);
@@ -1288,16 +2649,48 @@ export class Projects {
1288
2649
  payload
1289
2650
  );
1290
2651
  }
2652
+
1291
2653
  /**
1292
2654
  * Update the status of a specific service. Use this endpoint to enable or disable a service in your project.
1293
2655
  *
1294
- * @param {string} projectId
1295
- * @param {ApiService} service
1296
- * @param {boolean} status
2656
+ * @param {string} params.projectId - Project unique ID.
2657
+ * @param {ApiService} params.service - Service name.
2658
+ * @param {boolean} params.status - Service status.
1297
2659
  * @throws {AppwriteException}
1298
2660
  * @returns {Promise<Models.Project>}
1299
2661
  */
1300
- updateServiceStatus(projectId: string, service: ApiService, status: boolean): Promise<Models.Project> {
2662
+ updateServiceStatus(params: { projectId: string, service: ApiService, status: boolean }): Promise<Models.Project>;
2663
+ /**
2664
+ * Update the status of a specific service. Use this endpoint to enable or disable a service in your project.
2665
+ *
2666
+ * @param {string} projectId - Project unique ID.
2667
+ * @param {ApiService} service - Service name.
2668
+ * @param {boolean} status - Service status.
2669
+ * @throws {AppwriteException}
2670
+ * @returns {Promise<Models.Project>}
2671
+ * @deprecated Use the object parameter style method for a better developer experience.
2672
+ */
2673
+ updateServiceStatus(projectId: string, service: ApiService, status: boolean): Promise<Models.Project>;
2674
+ updateServiceStatus(
2675
+ paramsOrFirst: { projectId: string, service: ApiService, status: boolean } | string,
2676
+ ...rest: [(ApiService)?, (boolean)?]
2677
+ ): Promise<Models.Project> {
2678
+ let params: { projectId: string, service: ApiService, status: boolean };
2679
+
2680
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
2681
+ params = (paramsOrFirst || {}) as { projectId: string, service: ApiService, status: boolean };
2682
+ } else {
2683
+ params = {
2684
+ projectId: paramsOrFirst as string,
2685
+ service: rest[0] as ApiService,
2686
+ status: rest[1] as boolean
2687
+ };
2688
+ }
2689
+
2690
+ const projectId = params.projectId;
2691
+ const service = params.service;
2692
+ const status = params.status;
2693
+
1301
2694
  if (typeof projectId === 'undefined') {
1302
2695
  throw new AppwriteException('Missing required parameter: "projectId"');
1303
2696
  }
@@ -1307,6 +2700,7 @@ export class Projects {
1307
2700
  if (typeof status === 'undefined') {
1308
2701
  throw new AppwriteException('Missing required parameter: "status"');
1309
2702
  }
2703
+
1310
2704
  const apiPath = '/projects/{projectId}/service'.replace('{projectId}', projectId);
1311
2705
  const payload: Payload = {};
1312
2706
  if (typeof service !== 'undefined') {
@@ -1328,21 +2722,51 @@ export class Projects {
1328
2722
  payload
1329
2723
  );
1330
2724
  }
2725
+
2726
+ /**
2727
+ * Update the status of all services. Use this endpoint to enable or disable all optional services at once.
2728
+ *
2729
+ * @param {string} params.projectId - Project unique ID.
2730
+ * @param {boolean} params.status - Service status.
2731
+ * @throws {AppwriteException}
2732
+ * @returns {Promise<Models.Project>}
2733
+ */
2734
+ updateServiceStatusAll(params: { projectId: string, status: boolean }): Promise<Models.Project>;
1331
2735
  /**
1332
2736
  * Update the status of all services. Use this endpoint to enable or disable all optional services at once.
1333
2737
  *
1334
- * @param {string} projectId
1335
- * @param {boolean} status
2738
+ * @param {string} projectId - Project unique ID.
2739
+ * @param {boolean} status - Service status.
1336
2740
  * @throws {AppwriteException}
1337
2741
  * @returns {Promise<Models.Project>}
2742
+ * @deprecated Use the object parameter style method for a better developer experience.
1338
2743
  */
1339
- updateServiceStatusAll(projectId: string, status: boolean): Promise<Models.Project> {
2744
+ updateServiceStatusAll(projectId: string, status: boolean): Promise<Models.Project>;
2745
+ updateServiceStatusAll(
2746
+ paramsOrFirst: { projectId: string, status: boolean } | string,
2747
+ ...rest: [(boolean)?]
2748
+ ): Promise<Models.Project> {
2749
+ let params: { projectId: string, status: boolean };
2750
+
2751
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
2752
+ params = (paramsOrFirst || {}) as { projectId: string, status: boolean };
2753
+ } else {
2754
+ params = {
2755
+ projectId: paramsOrFirst as string,
2756
+ status: rest[0] as boolean
2757
+ };
2758
+ }
2759
+
2760
+ const projectId = params.projectId;
2761
+ const status = params.status;
2762
+
1340
2763
  if (typeof projectId === 'undefined') {
1341
2764
  throw new AppwriteException('Missing required parameter: "projectId"');
1342
2765
  }
1343
2766
  if (typeof status === 'undefined') {
1344
2767
  throw new AppwriteException('Missing required parameter: "status"');
1345
2768
  }
2769
+
1346
2770
  const apiPath = '/projects/{projectId}/service/all'.replace('{projectId}', projectId);
1347
2771
  const payload: Payload = {};
1348
2772
  if (typeof status !== 'undefined') {
@@ -1361,29 +2785,84 @@ export class Projects {
1361
2785
  payload
1362
2786
  );
1363
2787
  }
2788
+
2789
+ /**
2790
+ * Update the SMTP configuration for your project. Use this endpoint to configure your project's SMTP provider with your custom settings for sending transactional emails.
2791
+ *
2792
+ * @param {string} params.projectId - Project unique ID.
2793
+ * @param {boolean} params.enabled - Enable custom SMTP service
2794
+ * @param {string} params.senderName - Name of the email sender
2795
+ * @param {string} params.senderEmail - Email of the sender
2796
+ * @param {string} params.replyTo - Reply to email
2797
+ * @param {string} params.host - SMTP server host name
2798
+ * @param {number} params.port - SMTP server port
2799
+ * @param {string} params.username - SMTP server username
2800
+ * @param {string} params.password - SMTP server password
2801
+ * @param {SMTPSecure} params.secure - Does SMTP server use secure connection
2802
+ * @throws {AppwriteException}
2803
+ * @returns {Promise<Models.Project>}
2804
+ * @deprecated This API has been deprecated since 1.8.0. Please use `Projects.updateSMTP` instead.
2805
+ */
2806
+ updateSmtp(params: { projectId: string, enabled: boolean, senderName?: string, senderEmail?: string, replyTo?: string, host?: string, port?: number, username?: string, password?: string, secure?: SMTPSecure }): Promise<Models.Project>;
1364
2807
  /**
1365
- * Update the SMTP configuration for your project. Use this endpoint to configure your project&#039;s SMTP provider with your custom settings for sending transactional emails.
2808
+ * Update the SMTP configuration for your project. Use this endpoint to configure your project's SMTP provider with your custom settings for sending transactional emails.
1366
2809
  *
1367
- * @param {string} projectId
1368
- * @param {boolean} enabled
1369
- * @param {string} senderName
1370
- * @param {string} senderEmail
1371
- * @param {string} replyTo
1372
- * @param {string} host
1373
- * @param {number} port
1374
- * @param {string} username
1375
- * @param {string} password
1376
- * @param {SMTPSecure} secure
2810
+ * @param {string} projectId - Project unique ID.
2811
+ * @param {boolean} enabled - Enable custom SMTP service
2812
+ * @param {string} senderName - Name of the email sender
2813
+ * @param {string} senderEmail - Email of the sender
2814
+ * @param {string} replyTo - Reply to email
2815
+ * @param {string} host - SMTP server host name
2816
+ * @param {number} port - SMTP server port
2817
+ * @param {string} username - SMTP server username
2818
+ * @param {string} password - SMTP server password
2819
+ * @param {SMTPSecure} secure - Does SMTP server use secure connection
1377
2820
  * @throws {AppwriteException}
1378
2821
  * @returns {Promise<Models.Project>}
2822
+ * @deprecated Use the object parameter style method for a better developer experience.
1379
2823
  */
1380
- updateSmtp(projectId: string, enabled: boolean, senderName?: string, senderEmail?: string, replyTo?: string, host?: string, port?: number, username?: string, password?: string, secure?: SMTPSecure): Promise<Models.Project> {
2824
+ updateSmtp(projectId: string, enabled: boolean, senderName?: string, senderEmail?: string, replyTo?: string, host?: string, port?: number, username?: string, password?: string, secure?: SMTPSecure): Promise<Models.Project>;
2825
+ updateSmtp(
2826
+ paramsOrFirst: { projectId: string, enabled: boolean, senderName?: string, senderEmail?: string, replyTo?: string, host?: string, port?: number, username?: string, password?: string, secure?: SMTPSecure } | string,
2827
+ ...rest: [(boolean)?, (string)?, (string)?, (string)?, (string)?, (number)?, (string)?, (string)?, (SMTPSecure)?]
2828
+ ): Promise<Models.Project> {
2829
+ let params: { projectId: string, enabled: boolean, senderName?: string, senderEmail?: string, replyTo?: string, host?: string, port?: number, username?: string, password?: string, secure?: SMTPSecure };
2830
+
2831
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
2832
+ params = (paramsOrFirst || {}) as { projectId: string, enabled: boolean, senderName?: string, senderEmail?: string, replyTo?: string, host?: string, port?: number, username?: string, password?: string, secure?: SMTPSecure };
2833
+ } else {
2834
+ params = {
2835
+ projectId: paramsOrFirst as string,
2836
+ enabled: rest[0] as boolean,
2837
+ senderName: rest[1] as string,
2838
+ senderEmail: rest[2] as string,
2839
+ replyTo: rest[3] as string,
2840
+ host: rest[4] as string,
2841
+ port: rest[5] as number,
2842
+ username: rest[6] as string,
2843
+ password: rest[7] as string,
2844
+ secure: rest[8] as SMTPSecure
2845
+ };
2846
+ }
2847
+
2848
+ const projectId = params.projectId;
2849
+ const enabled = params.enabled;
2850
+ const senderName = params.senderName;
2851
+ const senderEmail = params.senderEmail;
2852
+ const replyTo = params.replyTo;
2853
+ const host = params.host;
2854
+ const port = params.port;
2855
+ const username = params.username;
2856
+ const password = params.password;
2857
+ const secure = params.secure;
2858
+
1381
2859
  if (typeof projectId === 'undefined') {
1382
2860
  throw new AppwriteException('Missing required parameter: "projectId"');
1383
2861
  }
1384
2862
  if (typeof enabled === 'undefined') {
1385
2863
  throw new AppwriteException('Missing required parameter: "enabled"');
1386
2864
  }
2865
+
1387
2866
  const apiPath = '/projects/{projectId}/smtp'.replace('{projectId}', projectId);
1388
2867
  const payload: Payload = {};
1389
2868
  if (typeof enabled !== 'undefined') {
@@ -1426,42 +2905,87 @@ export class Projects {
1426
2905
  payload
1427
2906
  );
1428
2907
  }
2908
+
1429
2909
  /**
1430
- * Send a test email to verify SMTP configuration.
2910
+ * Update the SMTP configuration for your project. Use this endpoint to configure your project's SMTP provider with your custom settings for sending transactional emails.
1431
2911
  *
1432
- * @param {string} projectId
1433
- * @param {string[]} emails
1434
- * @param {string} senderName
1435
- * @param {string} senderEmail
1436
- * @param {string} host
1437
- * @param {string} replyTo
1438
- * @param {number} port
1439
- * @param {string} username
1440
- * @param {string} password
1441
- * @param {SMTPSecure} secure
2912
+ * @param {string} params.projectId - Project unique ID.
2913
+ * @param {boolean} params.enabled - Enable custom SMTP service
2914
+ * @param {string} params.senderName - Name of the email sender
2915
+ * @param {string} params.senderEmail - Email of the sender
2916
+ * @param {string} params.replyTo - Reply to email
2917
+ * @param {string} params.host - SMTP server host name
2918
+ * @param {number} params.port - SMTP server port
2919
+ * @param {string} params.username - SMTP server username
2920
+ * @param {string} params.password - SMTP server password
2921
+ * @param {SMTPSecure} params.secure - Does SMTP server use secure connection
1442
2922
  * @throws {AppwriteException}
1443
- * @returns {Promise<{}>}
2923
+ * @returns {Promise<Models.Project>}
2924
+ */
2925
+ updateSMTP(params: { projectId: string, enabled: boolean, senderName?: string, senderEmail?: string, replyTo?: string, host?: string, port?: number, username?: string, password?: string, secure?: SMTPSecure }): Promise<Models.Project>;
2926
+ /**
2927
+ * Update the SMTP configuration for your project. Use this endpoint to configure your project's SMTP provider with your custom settings for sending transactional emails.
2928
+ *
2929
+ * @param {string} projectId - Project unique ID.
2930
+ * @param {boolean} enabled - Enable custom SMTP service
2931
+ * @param {string} senderName - Name of the email sender
2932
+ * @param {string} senderEmail - Email of the sender
2933
+ * @param {string} replyTo - Reply to email
2934
+ * @param {string} host - SMTP server host name
2935
+ * @param {number} port - SMTP server port
2936
+ * @param {string} username - SMTP server username
2937
+ * @param {string} password - SMTP server password
2938
+ * @param {SMTPSecure} secure - Does SMTP server use secure connection
2939
+ * @throws {AppwriteException}
2940
+ * @returns {Promise<Models.Project>}
2941
+ * @deprecated Use the object parameter style method for a better developer experience.
1444
2942
  */
1445
- createSmtpTest(projectId: string, emails: string[], senderName: string, senderEmail: string, host: string, replyTo?: string, port?: number, username?: string, password?: string, secure?: SMTPSecure): Promise<{}> {
2943
+ updateSMTP(projectId: string, enabled: boolean, senderName?: string, senderEmail?: string, replyTo?: string, host?: string, port?: number, username?: string, password?: string, secure?: SMTPSecure): Promise<Models.Project>;
2944
+ updateSMTP(
2945
+ paramsOrFirst: { projectId: string, enabled: boolean, senderName?: string, senderEmail?: string, replyTo?: string, host?: string, port?: number, username?: string, password?: string, secure?: SMTPSecure } | string,
2946
+ ...rest: [(boolean)?, (string)?, (string)?, (string)?, (string)?, (number)?, (string)?, (string)?, (SMTPSecure)?]
2947
+ ): Promise<Models.Project> {
2948
+ let params: { projectId: string, enabled: boolean, senderName?: string, senderEmail?: string, replyTo?: string, host?: string, port?: number, username?: string, password?: string, secure?: SMTPSecure };
2949
+
2950
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
2951
+ params = (paramsOrFirst || {}) as { projectId: string, enabled: boolean, senderName?: string, senderEmail?: string, replyTo?: string, host?: string, port?: number, username?: string, password?: string, secure?: SMTPSecure };
2952
+ } else {
2953
+ params = {
2954
+ projectId: paramsOrFirst as string,
2955
+ enabled: rest[0] as boolean,
2956
+ senderName: rest[1] as string,
2957
+ senderEmail: rest[2] as string,
2958
+ replyTo: rest[3] as string,
2959
+ host: rest[4] as string,
2960
+ port: rest[5] as number,
2961
+ username: rest[6] as string,
2962
+ password: rest[7] as string,
2963
+ secure: rest[8] as SMTPSecure
2964
+ };
2965
+ }
2966
+
2967
+ const projectId = params.projectId;
2968
+ const enabled = params.enabled;
2969
+ const senderName = params.senderName;
2970
+ const senderEmail = params.senderEmail;
2971
+ const replyTo = params.replyTo;
2972
+ const host = params.host;
2973
+ const port = params.port;
2974
+ const username = params.username;
2975
+ const password = params.password;
2976
+ const secure = params.secure;
2977
+
1446
2978
  if (typeof projectId === 'undefined') {
1447
2979
  throw new AppwriteException('Missing required parameter: "projectId"');
1448
2980
  }
1449
- if (typeof emails === 'undefined') {
1450
- throw new AppwriteException('Missing required parameter: "emails"');
1451
- }
1452
- if (typeof senderName === 'undefined') {
1453
- throw new AppwriteException('Missing required parameter: "senderName"');
1454
- }
1455
- if (typeof senderEmail === 'undefined') {
1456
- throw new AppwriteException('Missing required parameter: "senderEmail"');
1457
- }
1458
- if (typeof host === 'undefined') {
1459
- throw new AppwriteException('Missing required parameter: "host"');
2981
+ if (typeof enabled === 'undefined') {
2982
+ throw new AppwriteException('Missing required parameter: "enabled"');
1460
2983
  }
1461
- const apiPath = '/projects/{projectId}/smtp/tests'.replace('{projectId}', projectId);
2984
+
2985
+ const apiPath = '/projects/{projectId}/smtp'.replace('{projectId}', projectId);
1462
2986
  const payload: Payload = {};
1463
- if (typeof emails !== 'undefined') {
1464
- payload['emails'] = emails;
2987
+ if (typeof enabled !== 'undefined') {
2988
+ payload['enabled'] = enabled;
1465
2989
  }
1466
2990
  if (typeof senderName !== 'undefined') {
1467
2991
  payload['senderName'] = senderName;
@@ -1494,27 +3018,377 @@ export class Projects {
1494
3018
  }
1495
3019
 
1496
3020
  return this.client.call(
1497
- 'post',
3021
+ 'patch',
1498
3022
  uri,
1499
3023
  apiHeaders,
1500
3024
  payload
1501
3025
  );
1502
3026
  }
3027
+
1503
3028
  /**
1504
- * Update the team ID of a project allowing for it to be transferred to another team.
3029
+ * Send a test email to verify SMTP configuration.
1505
3030
  *
1506
- * @param {string} projectId
1507
- * @param {string} teamId
3031
+ * @param {string} params.projectId - Project unique ID.
3032
+ * @param {string[]} params.emails - Array of emails to send test email to. Maximum of 10 emails are allowed.
3033
+ * @param {string} params.senderName - Name of the email sender
3034
+ * @param {string} params.senderEmail - Email of the sender
3035
+ * @param {string} params.host - SMTP server host name
3036
+ * @param {string} params.replyTo - Reply to email
3037
+ * @param {number} params.port - SMTP server port
3038
+ * @param {string} params.username - SMTP server username
3039
+ * @param {string} params.password - SMTP server password
3040
+ * @param {SMTPSecure} params.secure - Does SMTP server use secure connection
1508
3041
  * @throws {AppwriteException}
1509
- * @returns {Promise<Models.Project>}
3042
+ * @returns {Promise<{}>}
3043
+ * @deprecated This API has been deprecated since 1.8.0. Please use `Projects.createSMTPTest` instead.
1510
3044
  */
1511
- updateTeam(projectId: string, teamId: string): Promise<Models.Project> {
1512
- if (typeof projectId === 'undefined') {
1513
- throw new AppwriteException('Missing required parameter: "projectId"');
3045
+ createSmtpTest(params: { projectId: string, emails: string[], senderName: string, senderEmail: string, host: string, replyTo?: string, port?: number, username?: string, password?: string, secure?: SMTPSecure }): Promise<{}>;
3046
+ /**
3047
+ * Send a test email to verify SMTP configuration.
3048
+ *
3049
+ * @param {string} projectId - Project unique ID.
3050
+ * @param {string[]} emails - Array of emails to send test email to. Maximum of 10 emails are allowed.
3051
+ * @param {string} senderName - Name of the email sender
3052
+ * @param {string} senderEmail - Email of the sender
3053
+ * @param {string} host - SMTP server host name
3054
+ * @param {string} replyTo - Reply to email
3055
+ * @param {number} port - SMTP server port
3056
+ * @param {string} username - SMTP server username
3057
+ * @param {string} password - SMTP server password
3058
+ * @param {SMTPSecure} secure - Does SMTP server use secure connection
3059
+ * @throws {AppwriteException}
3060
+ * @returns {Promise<{}>}
3061
+ * @deprecated Use the object parameter style method for a better developer experience.
3062
+ */
3063
+ createSmtpTest(projectId: string, emails: string[], senderName: string, senderEmail: string, host: string, replyTo?: string, port?: number, username?: string, password?: string, secure?: SMTPSecure): Promise<{}>;
3064
+ createSmtpTest(
3065
+ paramsOrFirst: { projectId: string, emails: string[], senderName: string, senderEmail: string, host: string, replyTo?: string, port?: number, username?: string, password?: string, secure?: SMTPSecure } | string,
3066
+ ...rest: [(string[])?, (string)?, (string)?, (string)?, (string)?, (number)?, (string)?, (string)?, (SMTPSecure)?]
3067
+ ): Promise<{}> {
3068
+ let params: { projectId: string, emails: string[], senderName: string, senderEmail: string, host: string, replyTo?: string, port?: number, username?: string, password?: string, secure?: SMTPSecure };
3069
+
3070
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
3071
+ params = (paramsOrFirst || {}) as { projectId: string, emails: string[], senderName: string, senderEmail: string, host: string, replyTo?: string, port?: number, username?: string, password?: string, secure?: SMTPSecure };
3072
+ } else {
3073
+ params = {
3074
+ projectId: paramsOrFirst as string,
3075
+ emails: rest[0] as string[],
3076
+ senderName: rest[1] as string,
3077
+ senderEmail: rest[2] as string,
3078
+ host: rest[3] as string,
3079
+ replyTo: rest[4] as string,
3080
+ port: rest[5] as number,
3081
+ username: rest[6] as string,
3082
+ password: rest[7] as string,
3083
+ secure: rest[8] as SMTPSecure
3084
+ };
3085
+ }
3086
+
3087
+ const projectId = params.projectId;
3088
+ const emails = params.emails;
3089
+ const senderName = params.senderName;
3090
+ const senderEmail = params.senderEmail;
3091
+ const host = params.host;
3092
+ const replyTo = params.replyTo;
3093
+ const port = params.port;
3094
+ const username = params.username;
3095
+ const password = params.password;
3096
+ const secure = params.secure;
3097
+
3098
+ if (typeof projectId === 'undefined') {
3099
+ throw new AppwriteException('Missing required parameter: "projectId"');
3100
+ }
3101
+ if (typeof emails === 'undefined') {
3102
+ throw new AppwriteException('Missing required parameter: "emails"');
3103
+ }
3104
+ if (typeof senderName === 'undefined') {
3105
+ throw new AppwriteException('Missing required parameter: "senderName"');
3106
+ }
3107
+ if (typeof senderEmail === 'undefined') {
3108
+ throw new AppwriteException('Missing required parameter: "senderEmail"');
3109
+ }
3110
+ if (typeof host === 'undefined') {
3111
+ throw new AppwriteException('Missing required parameter: "host"');
3112
+ }
3113
+
3114
+ const apiPath = '/projects/{projectId}/smtp/tests'.replace('{projectId}', projectId);
3115
+ const payload: Payload = {};
3116
+ if (typeof emails !== 'undefined') {
3117
+ payload['emails'] = emails;
3118
+ }
3119
+ if (typeof senderName !== 'undefined') {
3120
+ payload['senderName'] = senderName;
3121
+ }
3122
+ if (typeof senderEmail !== 'undefined') {
3123
+ payload['senderEmail'] = senderEmail;
3124
+ }
3125
+ if (typeof replyTo !== 'undefined') {
3126
+ payload['replyTo'] = replyTo;
3127
+ }
3128
+ if (typeof host !== 'undefined') {
3129
+ payload['host'] = host;
3130
+ }
3131
+ if (typeof port !== 'undefined') {
3132
+ payload['port'] = port;
3133
+ }
3134
+ if (typeof username !== 'undefined') {
3135
+ payload['username'] = username;
3136
+ }
3137
+ if (typeof password !== 'undefined') {
3138
+ payload['password'] = password;
3139
+ }
3140
+ if (typeof secure !== 'undefined') {
3141
+ payload['secure'] = secure;
3142
+ }
3143
+ const uri = new URL(this.client.config.endpoint + apiPath);
3144
+
3145
+ const apiHeaders: { [header: string]: string } = {
3146
+ 'content-type': 'application/json',
3147
+ }
3148
+
3149
+ return this.client.call(
3150
+ 'post',
3151
+ uri,
3152
+ apiHeaders,
3153
+ payload
3154
+ );
3155
+ }
3156
+
3157
+ /**
3158
+ * Send a test email to verify SMTP configuration.
3159
+ *
3160
+ * @param {string} params.projectId - Project unique ID.
3161
+ * @param {string[]} params.emails - Array of emails to send test email to. Maximum of 10 emails are allowed.
3162
+ * @param {string} params.senderName - Name of the email sender
3163
+ * @param {string} params.senderEmail - Email of the sender
3164
+ * @param {string} params.host - SMTP server host name
3165
+ * @param {string} params.replyTo - Reply to email
3166
+ * @param {number} params.port - SMTP server port
3167
+ * @param {string} params.username - SMTP server username
3168
+ * @param {string} params.password - SMTP server password
3169
+ * @param {SMTPSecure} params.secure - Does SMTP server use secure connection
3170
+ * @throws {AppwriteException}
3171
+ * @returns {Promise<{}>}
3172
+ */
3173
+ createSMTPTest(params: { projectId: string, emails: string[], senderName: string, senderEmail: string, host: string, replyTo?: string, port?: number, username?: string, password?: string, secure?: SMTPSecure }): Promise<{}>;
3174
+ /**
3175
+ * Send a test email to verify SMTP configuration.
3176
+ *
3177
+ * @param {string} projectId - Project unique ID.
3178
+ * @param {string[]} emails - Array of emails to send test email to. Maximum of 10 emails are allowed.
3179
+ * @param {string} senderName - Name of the email sender
3180
+ * @param {string} senderEmail - Email of the sender
3181
+ * @param {string} host - SMTP server host name
3182
+ * @param {string} replyTo - Reply to email
3183
+ * @param {number} port - SMTP server port
3184
+ * @param {string} username - SMTP server username
3185
+ * @param {string} password - SMTP server password
3186
+ * @param {SMTPSecure} secure - Does SMTP server use secure connection
3187
+ * @throws {AppwriteException}
3188
+ * @returns {Promise<{}>}
3189
+ * @deprecated Use the object parameter style method for a better developer experience.
3190
+ */
3191
+ createSMTPTest(projectId: string, emails: string[], senderName: string, senderEmail: string, host: string, replyTo?: string, port?: number, username?: string, password?: string, secure?: SMTPSecure): Promise<{}>;
3192
+ createSMTPTest(
3193
+ paramsOrFirst: { projectId: string, emails: string[], senderName: string, senderEmail: string, host: string, replyTo?: string, port?: number, username?: string, password?: string, secure?: SMTPSecure } | string,
3194
+ ...rest: [(string[])?, (string)?, (string)?, (string)?, (string)?, (number)?, (string)?, (string)?, (SMTPSecure)?]
3195
+ ): Promise<{}> {
3196
+ let params: { projectId: string, emails: string[], senderName: string, senderEmail: string, host: string, replyTo?: string, port?: number, username?: string, password?: string, secure?: SMTPSecure };
3197
+
3198
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
3199
+ params = (paramsOrFirst || {}) as { projectId: string, emails: string[], senderName: string, senderEmail: string, host: string, replyTo?: string, port?: number, username?: string, password?: string, secure?: SMTPSecure };
3200
+ } else {
3201
+ params = {
3202
+ projectId: paramsOrFirst as string,
3203
+ emails: rest[0] as string[],
3204
+ senderName: rest[1] as string,
3205
+ senderEmail: rest[2] as string,
3206
+ host: rest[3] as string,
3207
+ replyTo: rest[4] as string,
3208
+ port: rest[5] as number,
3209
+ username: rest[6] as string,
3210
+ password: rest[7] as string,
3211
+ secure: rest[8] as SMTPSecure
3212
+ };
3213
+ }
3214
+
3215
+ const projectId = params.projectId;
3216
+ const emails = params.emails;
3217
+ const senderName = params.senderName;
3218
+ const senderEmail = params.senderEmail;
3219
+ const host = params.host;
3220
+ const replyTo = params.replyTo;
3221
+ const port = params.port;
3222
+ const username = params.username;
3223
+ const password = params.password;
3224
+ const secure = params.secure;
3225
+
3226
+ if (typeof projectId === 'undefined') {
3227
+ throw new AppwriteException('Missing required parameter: "projectId"');
3228
+ }
3229
+ if (typeof emails === 'undefined') {
3230
+ throw new AppwriteException('Missing required parameter: "emails"');
3231
+ }
3232
+ if (typeof senderName === 'undefined') {
3233
+ throw new AppwriteException('Missing required parameter: "senderName"');
3234
+ }
3235
+ if (typeof senderEmail === 'undefined') {
3236
+ throw new AppwriteException('Missing required parameter: "senderEmail"');
3237
+ }
3238
+ if (typeof host === 'undefined') {
3239
+ throw new AppwriteException('Missing required parameter: "host"');
3240
+ }
3241
+
3242
+ const apiPath = '/projects/{projectId}/smtp/tests'.replace('{projectId}', projectId);
3243
+ const payload: Payload = {};
3244
+ if (typeof emails !== 'undefined') {
3245
+ payload['emails'] = emails;
3246
+ }
3247
+ if (typeof senderName !== 'undefined') {
3248
+ payload['senderName'] = senderName;
3249
+ }
3250
+ if (typeof senderEmail !== 'undefined') {
3251
+ payload['senderEmail'] = senderEmail;
3252
+ }
3253
+ if (typeof replyTo !== 'undefined') {
3254
+ payload['replyTo'] = replyTo;
3255
+ }
3256
+ if (typeof host !== 'undefined') {
3257
+ payload['host'] = host;
3258
+ }
3259
+ if (typeof port !== 'undefined') {
3260
+ payload['port'] = port;
3261
+ }
3262
+ if (typeof username !== 'undefined') {
3263
+ payload['username'] = username;
3264
+ }
3265
+ if (typeof password !== 'undefined') {
3266
+ payload['password'] = password;
3267
+ }
3268
+ if (typeof secure !== 'undefined') {
3269
+ payload['secure'] = secure;
3270
+ }
3271
+ const uri = new URL(this.client.config.endpoint + apiPath);
3272
+
3273
+ const apiHeaders: { [header: string]: string } = {
3274
+ 'content-type': 'application/json',
3275
+ }
3276
+
3277
+ return this.client.call(
3278
+ 'post',
3279
+ uri,
3280
+ apiHeaders,
3281
+ payload
3282
+ );
3283
+ }
3284
+
3285
+ /**
3286
+ * Update the status of a project
3287
+ *
3288
+ * @param {string} params.projectId - Project ID
3289
+ * @param {Status} params.status - New status for the project
3290
+ * @throws {AppwriteException}
3291
+ * @returns {Promise<{}>}
3292
+ */
3293
+ updateStatus(params: { projectId: string, status: Status }): Promise<{}>;
3294
+ /**
3295
+ * Update the status of a project
3296
+ *
3297
+ * @param {string} projectId - Project ID
3298
+ * @param {Status} status - New status for the project
3299
+ * @throws {AppwriteException}
3300
+ * @returns {Promise<{}>}
3301
+ * @deprecated Use the object parameter style method for a better developer experience.
3302
+ */
3303
+ updateStatus(projectId: string, status: Status): Promise<{}>;
3304
+ updateStatus(
3305
+ paramsOrFirst: { projectId: string, status: Status } | string,
3306
+ ...rest: [(Status)?]
3307
+ ): Promise<{}> {
3308
+ let params: { projectId: string, status: Status };
3309
+
3310
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
3311
+ params = (paramsOrFirst || {}) as { projectId: string, status: Status };
3312
+ } else {
3313
+ params = {
3314
+ projectId: paramsOrFirst as string,
3315
+ status: rest[0] as Status
3316
+ };
3317
+ }
3318
+
3319
+ const projectId = params.projectId;
3320
+ const status = params.status;
3321
+
3322
+ if (typeof projectId === 'undefined') {
3323
+ throw new AppwriteException('Missing required parameter: "projectId"');
3324
+ }
3325
+ if (typeof status === 'undefined') {
3326
+ throw new AppwriteException('Missing required parameter: "status"');
3327
+ }
3328
+
3329
+ const apiPath = '/projects/{projectId}/status'.replace('{projectId}', projectId);
3330
+ const payload: Payload = {};
3331
+ if (typeof status !== 'undefined') {
3332
+ payload['status'] = status;
3333
+ }
3334
+ const uri = new URL(this.client.config.endpoint + apiPath);
3335
+
3336
+ const apiHeaders: { [header: string]: string } = {
3337
+ 'content-type': 'application/json',
3338
+ }
3339
+
3340
+ return this.client.call(
3341
+ 'patch',
3342
+ uri,
3343
+ apiHeaders,
3344
+ payload
3345
+ );
3346
+ }
3347
+
3348
+ /**
3349
+ * Update the team ID of a project allowing for it to be transferred to another team.
3350
+ *
3351
+ * @param {string} params.projectId - Project unique ID.
3352
+ * @param {string} params.teamId - Team ID of the team to transfer project to.
3353
+ * @throws {AppwriteException}
3354
+ * @returns {Promise<Models.Project>}
3355
+ */
3356
+ updateTeam(params: { projectId: string, teamId: string }): Promise<Models.Project>;
3357
+ /**
3358
+ * Update the team ID of a project allowing for it to be transferred to another team.
3359
+ *
3360
+ * @param {string} projectId - Project unique ID.
3361
+ * @param {string} teamId - Team ID of the team to transfer project to.
3362
+ * @throws {AppwriteException}
3363
+ * @returns {Promise<Models.Project>}
3364
+ * @deprecated Use the object parameter style method for a better developer experience.
3365
+ */
3366
+ updateTeam(projectId: string, teamId: string): Promise<Models.Project>;
3367
+ updateTeam(
3368
+ paramsOrFirst: { projectId: string, teamId: string } | string,
3369
+ ...rest: [(string)?]
3370
+ ): Promise<Models.Project> {
3371
+ let params: { projectId: string, teamId: string };
3372
+
3373
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
3374
+ params = (paramsOrFirst || {}) as { projectId: string, teamId: string };
3375
+ } else {
3376
+ params = {
3377
+ projectId: paramsOrFirst as string,
3378
+ teamId: rest[0] as string
3379
+ };
3380
+ }
3381
+
3382
+ const projectId = params.projectId;
3383
+ const teamId = params.teamId;
3384
+
3385
+ if (typeof projectId === 'undefined') {
3386
+ throw new AppwriteException('Missing required parameter: "projectId"');
1514
3387
  }
1515
3388
  if (typeof teamId === 'undefined') {
1516
3389
  throw new AppwriteException('Missing required parameter: "teamId"');
1517
3390
  }
3391
+
1518
3392
  const apiPath = '/projects/{projectId}/team'.replace('{projectId}', projectId);
1519
3393
  const payload: Payload = {};
1520
3394
  if (typeof teamId !== 'undefined') {
@@ -1533,16 +3407,48 @@ export class Projects {
1533
3407
  payload
1534
3408
  );
1535
3409
  }
3410
+
3411
+ /**
3412
+ * Get a custom email template for the specified locale and type. This endpoint returns the template content, subject, and other configuration details.
3413
+ *
3414
+ * @param {string} params.projectId - Project unique ID.
3415
+ * @param {EmailTemplateType} params.type - Template type
3416
+ * @param {EmailTemplateLocale} params.locale - Template locale
3417
+ * @throws {AppwriteException}
3418
+ * @returns {Promise<Models.EmailTemplate>}
3419
+ */
3420
+ getEmailTemplate(params: { projectId: string, type: EmailTemplateType, locale: EmailTemplateLocale }): Promise<Models.EmailTemplate>;
1536
3421
  /**
1537
3422
  * Get a custom email template for the specified locale and type. This endpoint returns the template content, subject, and other configuration details.
1538
3423
  *
1539
- * @param {string} projectId
1540
- * @param {EmailTemplateType} type
1541
- * @param {EmailTemplateLocale} locale
3424
+ * @param {string} projectId - Project unique ID.
3425
+ * @param {EmailTemplateType} type - Template type
3426
+ * @param {EmailTemplateLocale} locale - Template locale
1542
3427
  * @throws {AppwriteException}
1543
3428
  * @returns {Promise<Models.EmailTemplate>}
3429
+ * @deprecated Use the object parameter style method for a better developer experience.
1544
3430
  */
1545
- getEmailTemplate(projectId: string, type: EmailTemplateType, locale: EmailTemplateLocale): Promise<Models.EmailTemplate> {
3431
+ getEmailTemplate(projectId: string, type: EmailTemplateType, locale: EmailTemplateLocale): Promise<Models.EmailTemplate>;
3432
+ getEmailTemplate(
3433
+ paramsOrFirst: { projectId: string, type: EmailTemplateType, locale: EmailTemplateLocale } | string,
3434
+ ...rest: [(EmailTemplateType)?, (EmailTemplateLocale)?]
3435
+ ): Promise<Models.EmailTemplate> {
3436
+ let params: { projectId: string, type: EmailTemplateType, locale: EmailTemplateLocale };
3437
+
3438
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
3439
+ params = (paramsOrFirst || {}) as { projectId: string, type: EmailTemplateType, locale: EmailTemplateLocale };
3440
+ } else {
3441
+ params = {
3442
+ projectId: paramsOrFirst as string,
3443
+ type: rest[0] as EmailTemplateType,
3444
+ locale: rest[1] as EmailTemplateLocale
3445
+ };
3446
+ }
3447
+
3448
+ const projectId = params.projectId;
3449
+ const type = params.type;
3450
+ const locale = params.locale;
3451
+
1546
3452
  if (typeof projectId === 'undefined') {
1547
3453
  throw new AppwriteException('Missing required parameter: "projectId"');
1548
3454
  }
@@ -1552,6 +3458,7 @@ export class Projects {
1552
3458
  if (typeof locale === 'undefined') {
1553
3459
  throw new AppwriteException('Missing required parameter: "locale"');
1554
3460
  }
3461
+
1555
3462
  const apiPath = '/projects/{projectId}/templates/email/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale);
1556
3463
  const payload: Payload = {};
1557
3464
  const uri = new URL(this.client.config.endpoint + apiPath);
@@ -1566,21 +3473,68 @@ export class Projects {
1566
3473
  payload
1567
3474
  );
1568
3475
  }
3476
+
1569
3477
  /**
1570
3478
  * Update a custom email template for the specified locale and type. Use this endpoint to modify the content of your email templates.
1571
3479
  *
1572
- * @param {string} projectId
1573
- * @param {EmailTemplateType} type
1574
- * @param {EmailTemplateLocale} locale
1575
- * @param {string} subject
1576
- * @param {string} message
1577
- * @param {string} senderName
1578
- * @param {string} senderEmail
1579
- * @param {string} replyTo
3480
+ * @param {string} params.projectId - Project unique ID.
3481
+ * @param {EmailTemplateType} params.type - Template type
3482
+ * @param {EmailTemplateLocale} params.locale - Template locale
3483
+ * @param {string} params.subject - Email Subject
3484
+ * @param {string} params.message - Template message
3485
+ * @param {string} params.senderName - Name of the email sender
3486
+ * @param {string} params.senderEmail - Email of the sender
3487
+ * @param {string} params.replyTo - Reply to email
1580
3488
  * @throws {AppwriteException}
1581
3489
  * @returns {Promise<Models.EmailTemplate>}
1582
3490
  */
1583
- updateEmailTemplate(projectId: string, type: EmailTemplateType, locale: EmailTemplateLocale, subject: string, message: string, senderName?: string, senderEmail?: string, replyTo?: string): Promise<Models.EmailTemplate> {
3491
+ updateEmailTemplate(params: { projectId: string, type: EmailTemplateType, locale: EmailTemplateLocale, subject: string, message: string, senderName?: string, senderEmail?: string, replyTo?: string }): Promise<Models.EmailTemplate>;
3492
+ /**
3493
+ * Update a custom email template for the specified locale and type. Use this endpoint to modify the content of your email templates.
3494
+ *
3495
+ * @param {string} projectId - Project unique ID.
3496
+ * @param {EmailTemplateType} type - Template type
3497
+ * @param {EmailTemplateLocale} locale - Template locale
3498
+ * @param {string} subject - Email Subject
3499
+ * @param {string} message - Template message
3500
+ * @param {string} senderName - Name of the email sender
3501
+ * @param {string} senderEmail - Email of the sender
3502
+ * @param {string} replyTo - Reply to email
3503
+ * @throws {AppwriteException}
3504
+ * @returns {Promise<Models.EmailTemplate>}
3505
+ * @deprecated Use the object parameter style method for a better developer experience.
3506
+ */
3507
+ updateEmailTemplate(projectId: string, type: EmailTemplateType, locale: EmailTemplateLocale, subject: string, message: string, senderName?: string, senderEmail?: string, replyTo?: string): Promise<Models.EmailTemplate>;
3508
+ updateEmailTemplate(
3509
+ paramsOrFirst: { projectId: string, type: EmailTemplateType, locale: EmailTemplateLocale, subject: string, message: string, senderName?: string, senderEmail?: string, replyTo?: string } | string,
3510
+ ...rest: [(EmailTemplateType)?, (EmailTemplateLocale)?, (string)?, (string)?, (string)?, (string)?, (string)?]
3511
+ ): Promise<Models.EmailTemplate> {
3512
+ let params: { projectId: string, type: EmailTemplateType, locale: EmailTemplateLocale, subject: string, message: string, senderName?: string, senderEmail?: string, replyTo?: string };
3513
+
3514
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
3515
+ params = (paramsOrFirst || {}) as { projectId: string, type: EmailTemplateType, locale: EmailTemplateLocale, subject: string, message: string, senderName?: string, senderEmail?: string, replyTo?: string };
3516
+ } else {
3517
+ params = {
3518
+ projectId: paramsOrFirst as string,
3519
+ type: rest[0] as EmailTemplateType,
3520
+ locale: rest[1] as EmailTemplateLocale,
3521
+ subject: rest[2] as string,
3522
+ message: rest[3] as string,
3523
+ senderName: rest[4] as string,
3524
+ senderEmail: rest[5] as string,
3525
+ replyTo: rest[6] as string
3526
+ };
3527
+ }
3528
+
3529
+ const projectId = params.projectId;
3530
+ const type = params.type;
3531
+ const locale = params.locale;
3532
+ const subject = params.subject;
3533
+ const message = params.message;
3534
+ const senderName = params.senderName;
3535
+ const senderEmail = params.senderEmail;
3536
+ const replyTo = params.replyTo;
3537
+
1584
3538
  if (typeof projectId === 'undefined') {
1585
3539
  throw new AppwriteException('Missing required parameter: "projectId"');
1586
3540
  }
@@ -1596,6 +3550,7 @@ export class Projects {
1596
3550
  if (typeof message === 'undefined') {
1597
3551
  throw new AppwriteException('Missing required parameter: "message"');
1598
3552
  }
3553
+
1599
3554
  const apiPath = '/projects/{projectId}/templates/email/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale);
1600
3555
  const payload: Payload = {};
1601
3556
  if (typeof subject !== 'undefined') {
@@ -1626,16 +3581,48 @@ export class Projects {
1626
3581
  payload
1627
3582
  );
1628
3583
  }
3584
+
1629
3585
  /**
1630
3586
  * Reset a custom email template to its default value. This endpoint removes any custom content and restores the template to its original state.
1631
3587
  *
1632
- * @param {string} projectId
1633
- * @param {EmailTemplateType} type
1634
- * @param {EmailTemplateLocale} locale
3588
+ * @param {string} params.projectId - Project unique ID.
3589
+ * @param {EmailTemplateType} params.type - Template type
3590
+ * @param {EmailTemplateLocale} params.locale - Template locale
1635
3591
  * @throws {AppwriteException}
1636
3592
  * @returns {Promise<Models.EmailTemplate>}
1637
3593
  */
1638
- deleteEmailTemplate(projectId: string, type: EmailTemplateType, locale: EmailTemplateLocale): Promise<Models.EmailTemplate> {
3594
+ deleteEmailTemplate(params: { projectId: string, type: EmailTemplateType, locale: EmailTemplateLocale }): Promise<Models.EmailTemplate>;
3595
+ /**
3596
+ * Reset a custom email template to its default value. This endpoint removes any custom content and restores the template to its original state.
3597
+ *
3598
+ * @param {string} projectId - Project unique ID.
3599
+ * @param {EmailTemplateType} type - Template type
3600
+ * @param {EmailTemplateLocale} locale - Template locale
3601
+ * @throws {AppwriteException}
3602
+ * @returns {Promise<Models.EmailTemplate>}
3603
+ * @deprecated Use the object parameter style method for a better developer experience.
3604
+ */
3605
+ deleteEmailTemplate(projectId: string, type: EmailTemplateType, locale: EmailTemplateLocale): Promise<Models.EmailTemplate>;
3606
+ deleteEmailTemplate(
3607
+ paramsOrFirst: { projectId: string, type: EmailTemplateType, locale: EmailTemplateLocale } | string,
3608
+ ...rest: [(EmailTemplateType)?, (EmailTemplateLocale)?]
3609
+ ): Promise<Models.EmailTemplate> {
3610
+ let params: { projectId: string, type: EmailTemplateType, locale: EmailTemplateLocale };
3611
+
3612
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
3613
+ params = (paramsOrFirst || {}) as { projectId: string, type: EmailTemplateType, locale: EmailTemplateLocale };
3614
+ } else {
3615
+ params = {
3616
+ projectId: paramsOrFirst as string,
3617
+ type: rest[0] as EmailTemplateType,
3618
+ locale: rest[1] as EmailTemplateLocale
3619
+ };
3620
+ }
3621
+
3622
+ const projectId = params.projectId;
3623
+ const type = params.type;
3624
+ const locale = params.locale;
3625
+
1639
3626
  if (typeof projectId === 'undefined') {
1640
3627
  throw new AppwriteException('Missing required parameter: "projectId"');
1641
3628
  }
@@ -1645,6 +3632,7 @@ export class Projects {
1645
3632
  if (typeof locale === 'undefined') {
1646
3633
  throw new AppwriteException('Missing required parameter: "locale"');
1647
3634
  }
3635
+
1648
3636
  const apiPath = '/projects/{projectId}/templates/email/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale);
1649
3637
  const payload: Payload = {};
1650
3638
  const uri = new URL(this.client.config.endpoint + apiPath);
@@ -1660,16 +3648,49 @@ export class Projects {
1660
3648
  payload
1661
3649
  );
1662
3650
  }
3651
+
3652
+ /**
3653
+ * Get a custom SMS template for the specified locale and type returning it's contents.
3654
+ *
3655
+ * @param {string} params.projectId - Project unique ID.
3656
+ * @param {SmsTemplateType} params.type - Template type
3657
+ * @param {SmsTemplateLocale} params.locale - Template locale
3658
+ * @throws {AppwriteException}
3659
+ * @returns {Promise<Models.SmsTemplate>}
3660
+ * @deprecated This API has been deprecated since 1.8.0. Please use `Projects.getSMSTemplate` instead.
3661
+ */
3662
+ getSmsTemplate(params: { projectId: string, type: SmsTemplateType, locale: SmsTemplateLocale }): Promise<Models.SmsTemplate>;
1663
3663
  /**
1664
- * Get a custom SMS template for the specified locale and type returning it&#039;s contents.
3664
+ * Get a custom SMS template for the specified locale and type returning it's contents.
1665
3665
  *
1666
- * @param {string} projectId
1667
- * @param {SmsTemplateType} type
1668
- * @param {SmsTemplateLocale} locale
3666
+ * @param {string} projectId - Project unique ID.
3667
+ * @param {SmsTemplateType} type - Template type
3668
+ * @param {SmsTemplateLocale} locale - Template locale
1669
3669
  * @throws {AppwriteException}
1670
3670
  * @returns {Promise<Models.SmsTemplate>}
3671
+ * @deprecated Use the object parameter style method for a better developer experience.
1671
3672
  */
1672
- getSmsTemplate(projectId: string, type: SmsTemplateType, locale: SmsTemplateLocale): Promise<Models.SmsTemplate> {
3673
+ getSmsTemplate(projectId: string, type: SmsTemplateType, locale: SmsTemplateLocale): Promise<Models.SmsTemplate>;
3674
+ getSmsTemplate(
3675
+ paramsOrFirst: { projectId: string, type: SmsTemplateType, locale: SmsTemplateLocale } | string,
3676
+ ...rest: [(SmsTemplateType)?, (SmsTemplateLocale)?]
3677
+ ): Promise<Models.SmsTemplate> {
3678
+ let params: { projectId: string, type: SmsTemplateType, locale: SmsTemplateLocale };
3679
+
3680
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
3681
+ params = (paramsOrFirst || {}) as { projectId: string, type: SmsTemplateType, locale: SmsTemplateLocale };
3682
+ } else {
3683
+ params = {
3684
+ projectId: paramsOrFirst as string,
3685
+ type: rest[0] as SmsTemplateType,
3686
+ locale: rest[1] as SmsTemplateLocale
3687
+ };
3688
+ }
3689
+
3690
+ const projectId = params.projectId;
3691
+ const type = params.type;
3692
+ const locale = params.locale;
3693
+
1673
3694
  if (typeof projectId === 'undefined') {
1674
3695
  throw new AppwriteException('Missing required parameter: "projectId"');
1675
3696
  }
@@ -1679,6 +3700,7 @@ export class Projects {
1679
3700
  if (typeof locale === 'undefined') {
1680
3701
  throw new AppwriteException('Missing required parameter: "locale"');
1681
3702
  }
3703
+
1682
3704
  const apiPath = '/projects/{projectId}/templates/sms/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale);
1683
3705
  const payload: Payload = {};
1684
3706
  const uri = new URL(this.client.config.endpoint + apiPath);
@@ -1693,17 +3715,119 @@ export class Projects {
1693
3715
  payload
1694
3716
  );
1695
3717
  }
3718
+
3719
+ /**
3720
+ * Get a custom SMS template for the specified locale and type returning it's contents.
3721
+ *
3722
+ * @param {string} params.projectId - Project unique ID.
3723
+ * @param {SmsTemplateType} params.type - Template type
3724
+ * @param {SmsTemplateLocale} params.locale - Template locale
3725
+ * @throws {AppwriteException}
3726
+ * @returns {Promise<Models.SmsTemplate>}
3727
+ */
3728
+ getSMSTemplate(params: { projectId: string, type: SmsTemplateType, locale: SmsTemplateLocale }): Promise<Models.SmsTemplate>;
3729
+ /**
3730
+ * Get a custom SMS template for the specified locale and type returning it's contents.
3731
+ *
3732
+ * @param {string} projectId - Project unique ID.
3733
+ * @param {SmsTemplateType} type - Template type
3734
+ * @param {SmsTemplateLocale} locale - Template locale
3735
+ * @throws {AppwriteException}
3736
+ * @returns {Promise<Models.SmsTemplate>}
3737
+ * @deprecated Use the object parameter style method for a better developer experience.
3738
+ */
3739
+ getSMSTemplate(projectId: string, type: SmsTemplateType, locale: SmsTemplateLocale): Promise<Models.SmsTemplate>;
3740
+ getSMSTemplate(
3741
+ paramsOrFirst: { projectId: string, type: SmsTemplateType, locale: SmsTemplateLocale } | string,
3742
+ ...rest: [(SmsTemplateType)?, (SmsTemplateLocale)?]
3743
+ ): Promise<Models.SmsTemplate> {
3744
+ let params: { projectId: string, type: SmsTemplateType, locale: SmsTemplateLocale };
3745
+
3746
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
3747
+ params = (paramsOrFirst || {}) as { projectId: string, type: SmsTemplateType, locale: SmsTemplateLocale };
3748
+ } else {
3749
+ params = {
3750
+ projectId: paramsOrFirst as string,
3751
+ type: rest[0] as SmsTemplateType,
3752
+ locale: rest[1] as SmsTemplateLocale
3753
+ };
3754
+ }
3755
+
3756
+ const projectId = params.projectId;
3757
+ const type = params.type;
3758
+ const locale = params.locale;
3759
+
3760
+ if (typeof projectId === 'undefined') {
3761
+ throw new AppwriteException('Missing required parameter: "projectId"');
3762
+ }
3763
+ if (typeof type === 'undefined') {
3764
+ throw new AppwriteException('Missing required parameter: "type"');
3765
+ }
3766
+ if (typeof locale === 'undefined') {
3767
+ throw new AppwriteException('Missing required parameter: "locale"');
3768
+ }
3769
+
3770
+ const apiPath = '/projects/{projectId}/templates/sms/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale);
3771
+ const payload: Payload = {};
3772
+ const uri = new URL(this.client.config.endpoint + apiPath);
3773
+
3774
+ const apiHeaders: { [header: string]: string } = {
3775
+ }
3776
+
3777
+ return this.client.call(
3778
+ 'get',
3779
+ uri,
3780
+ apiHeaders,
3781
+ payload
3782
+ );
3783
+ }
3784
+
1696
3785
  /**
1697
3786
  * Update a custom SMS template for the specified locale and type. Use this endpoint to modify the content of your SMS templates.
1698
3787
  *
1699
- * @param {string} projectId
1700
- * @param {SmsTemplateType} type
1701
- * @param {SmsTemplateLocale} locale
1702
- * @param {string} message
3788
+ * @param {string} params.projectId - Project unique ID.
3789
+ * @param {SmsTemplateType} params.type - Template type
3790
+ * @param {SmsTemplateLocale} params.locale - Template locale
3791
+ * @param {string} params.message - Template message
1703
3792
  * @throws {AppwriteException}
1704
3793
  * @returns {Promise<Models.SmsTemplate>}
3794
+ * @deprecated This API has been deprecated since 1.8.0. Please use `Projects.updateSMSTemplate` instead.
1705
3795
  */
1706
- updateSmsTemplate(projectId: string, type: SmsTemplateType, locale: SmsTemplateLocale, message: string): Promise<Models.SmsTemplate> {
3796
+ updateSmsTemplate(params: { projectId: string, type: SmsTemplateType, locale: SmsTemplateLocale, message: string }): Promise<Models.SmsTemplate>;
3797
+ /**
3798
+ * Update a custom SMS template for the specified locale and type. Use this endpoint to modify the content of your SMS templates.
3799
+ *
3800
+ * @param {string} projectId - Project unique ID.
3801
+ * @param {SmsTemplateType} type - Template type
3802
+ * @param {SmsTemplateLocale} locale - Template locale
3803
+ * @param {string} message - Template message
3804
+ * @throws {AppwriteException}
3805
+ * @returns {Promise<Models.SmsTemplate>}
3806
+ * @deprecated Use the object parameter style method for a better developer experience.
3807
+ */
3808
+ updateSmsTemplate(projectId: string, type: SmsTemplateType, locale: SmsTemplateLocale, message: string): Promise<Models.SmsTemplate>;
3809
+ updateSmsTemplate(
3810
+ paramsOrFirst: { projectId: string, type: SmsTemplateType, locale: SmsTemplateLocale, message: string } | string,
3811
+ ...rest: [(SmsTemplateType)?, (SmsTemplateLocale)?, (string)?]
3812
+ ): Promise<Models.SmsTemplate> {
3813
+ let params: { projectId: string, type: SmsTemplateType, locale: SmsTemplateLocale, message: string };
3814
+
3815
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
3816
+ params = (paramsOrFirst || {}) as { projectId: string, type: SmsTemplateType, locale: SmsTemplateLocale, message: string };
3817
+ } else {
3818
+ params = {
3819
+ projectId: paramsOrFirst as string,
3820
+ type: rest[0] as SmsTemplateType,
3821
+ locale: rest[1] as SmsTemplateLocale,
3822
+ message: rest[2] as string
3823
+ };
3824
+ }
3825
+
3826
+ const projectId = params.projectId;
3827
+ const type = params.type;
3828
+ const locale = params.locale;
3829
+ const message = params.message;
3830
+
1707
3831
  if (typeof projectId === 'undefined') {
1708
3832
  throw new AppwriteException('Missing required parameter: "projectId"');
1709
3833
  }
@@ -1716,6 +3840,7 @@ export class Projects {
1716
3840
  if (typeof message === 'undefined') {
1717
3841
  throw new AppwriteException('Missing required parameter: "message"');
1718
3842
  }
3843
+
1719
3844
  const apiPath = '/projects/{projectId}/templates/sms/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale);
1720
3845
  const payload: Payload = {};
1721
3846
  if (typeof message !== 'undefined') {
@@ -1734,16 +3859,193 @@ export class Projects {
1734
3859
  payload
1735
3860
  );
1736
3861
  }
3862
+
3863
+ /**
3864
+ * Update a custom SMS template for the specified locale and type. Use this endpoint to modify the content of your SMS templates.
3865
+ *
3866
+ * @param {string} params.projectId - Project unique ID.
3867
+ * @param {SmsTemplateType} params.type - Template type
3868
+ * @param {SmsTemplateLocale} params.locale - Template locale
3869
+ * @param {string} params.message - Template message
3870
+ * @throws {AppwriteException}
3871
+ * @returns {Promise<Models.SmsTemplate>}
3872
+ */
3873
+ updateSMSTemplate(params: { projectId: string, type: SmsTemplateType, locale: SmsTemplateLocale, message: string }): Promise<Models.SmsTemplate>;
3874
+ /**
3875
+ * Update a custom SMS template for the specified locale and type. Use this endpoint to modify the content of your SMS templates.
3876
+ *
3877
+ * @param {string} projectId - Project unique ID.
3878
+ * @param {SmsTemplateType} type - Template type
3879
+ * @param {SmsTemplateLocale} locale - Template locale
3880
+ * @param {string} message - Template message
3881
+ * @throws {AppwriteException}
3882
+ * @returns {Promise<Models.SmsTemplate>}
3883
+ * @deprecated Use the object parameter style method for a better developer experience.
3884
+ */
3885
+ updateSMSTemplate(projectId: string, type: SmsTemplateType, locale: SmsTemplateLocale, message: string): Promise<Models.SmsTemplate>;
3886
+ updateSMSTemplate(
3887
+ paramsOrFirst: { projectId: string, type: SmsTemplateType, locale: SmsTemplateLocale, message: string } | string,
3888
+ ...rest: [(SmsTemplateType)?, (SmsTemplateLocale)?, (string)?]
3889
+ ): Promise<Models.SmsTemplate> {
3890
+ let params: { projectId: string, type: SmsTemplateType, locale: SmsTemplateLocale, message: string };
3891
+
3892
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
3893
+ params = (paramsOrFirst || {}) as { projectId: string, type: SmsTemplateType, locale: SmsTemplateLocale, message: string };
3894
+ } else {
3895
+ params = {
3896
+ projectId: paramsOrFirst as string,
3897
+ type: rest[0] as SmsTemplateType,
3898
+ locale: rest[1] as SmsTemplateLocale,
3899
+ message: rest[2] as string
3900
+ };
3901
+ }
3902
+
3903
+ const projectId = params.projectId;
3904
+ const type = params.type;
3905
+ const locale = params.locale;
3906
+ const message = params.message;
3907
+
3908
+ if (typeof projectId === 'undefined') {
3909
+ throw new AppwriteException('Missing required parameter: "projectId"');
3910
+ }
3911
+ if (typeof type === 'undefined') {
3912
+ throw new AppwriteException('Missing required parameter: "type"');
3913
+ }
3914
+ if (typeof locale === 'undefined') {
3915
+ throw new AppwriteException('Missing required parameter: "locale"');
3916
+ }
3917
+ if (typeof message === 'undefined') {
3918
+ throw new AppwriteException('Missing required parameter: "message"');
3919
+ }
3920
+
3921
+ const apiPath = '/projects/{projectId}/templates/sms/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale);
3922
+ const payload: Payload = {};
3923
+ if (typeof message !== 'undefined') {
3924
+ payload['message'] = message;
3925
+ }
3926
+ const uri = new URL(this.client.config.endpoint + apiPath);
3927
+
3928
+ const apiHeaders: { [header: string]: string } = {
3929
+ 'content-type': 'application/json',
3930
+ }
3931
+
3932
+ return this.client.call(
3933
+ 'patch',
3934
+ uri,
3935
+ apiHeaders,
3936
+ payload
3937
+ );
3938
+ }
3939
+
3940
+ /**
3941
+ * Reset a custom SMS template to its default value. This endpoint removes any custom message and restores the template to its original state.
3942
+ *
3943
+ * @param {string} params.projectId - Project unique ID.
3944
+ * @param {SmsTemplateType} params.type - Template type
3945
+ * @param {SmsTemplateLocale} params.locale - Template locale
3946
+ * @throws {AppwriteException}
3947
+ * @returns {Promise<Models.SmsTemplate>}
3948
+ * @deprecated This API has been deprecated since 1.8.0. Please use `Projects.deleteSMSTemplate` instead.
3949
+ */
3950
+ deleteSmsTemplate(params: { projectId: string, type: SmsTemplateType, locale: SmsTemplateLocale }): Promise<Models.SmsTemplate>;
3951
+ /**
3952
+ * Reset a custom SMS template to its default value. This endpoint removes any custom message and restores the template to its original state.
3953
+ *
3954
+ * @param {string} projectId - Project unique ID.
3955
+ * @param {SmsTemplateType} type - Template type
3956
+ * @param {SmsTemplateLocale} locale - Template locale
3957
+ * @throws {AppwriteException}
3958
+ * @returns {Promise<Models.SmsTemplate>}
3959
+ * @deprecated Use the object parameter style method for a better developer experience.
3960
+ */
3961
+ deleteSmsTemplate(projectId: string, type: SmsTemplateType, locale: SmsTemplateLocale): Promise<Models.SmsTemplate>;
3962
+ deleteSmsTemplate(
3963
+ paramsOrFirst: { projectId: string, type: SmsTemplateType, locale: SmsTemplateLocale } | string,
3964
+ ...rest: [(SmsTemplateType)?, (SmsTemplateLocale)?]
3965
+ ): Promise<Models.SmsTemplate> {
3966
+ let params: { projectId: string, type: SmsTemplateType, locale: SmsTemplateLocale };
3967
+
3968
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
3969
+ params = (paramsOrFirst || {}) as { projectId: string, type: SmsTemplateType, locale: SmsTemplateLocale };
3970
+ } else {
3971
+ params = {
3972
+ projectId: paramsOrFirst as string,
3973
+ type: rest[0] as SmsTemplateType,
3974
+ locale: rest[1] as SmsTemplateLocale
3975
+ };
3976
+ }
3977
+
3978
+ const projectId = params.projectId;
3979
+ const type = params.type;
3980
+ const locale = params.locale;
3981
+
3982
+ if (typeof projectId === 'undefined') {
3983
+ throw new AppwriteException('Missing required parameter: "projectId"');
3984
+ }
3985
+ if (typeof type === 'undefined') {
3986
+ throw new AppwriteException('Missing required parameter: "type"');
3987
+ }
3988
+ if (typeof locale === 'undefined') {
3989
+ throw new AppwriteException('Missing required parameter: "locale"');
3990
+ }
3991
+
3992
+ const apiPath = '/projects/{projectId}/templates/sms/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale);
3993
+ const payload: Payload = {};
3994
+ const uri = new URL(this.client.config.endpoint + apiPath);
3995
+
3996
+ const apiHeaders: { [header: string]: string } = {
3997
+ 'content-type': 'application/json',
3998
+ }
3999
+
4000
+ return this.client.call(
4001
+ 'delete',
4002
+ uri,
4003
+ apiHeaders,
4004
+ payload
4005
+ );
4006
+ }
4007
+
1737
4008
  /**
1738
4009
  * Reset a custom SMS template to its default value. This endpoint removes any custom message and restores the template to its original state.
1739
4010
  *
1740
- * @param {string} projectId
1741
- * @param {SmsTemplateType} type
1742
- * @param {SmsTemplateLocale} locale
4011
+ * @param {string} params.projectId - Project unique ID.
4012
+ * @param {SmsTemplateType} params.type - Template type
4013
+ * @param {SmsTemplateLocale} params.locale - Template locale
1743
4014
  * @throws {AppwriteException}
1744
4015
  * @returns {Promise<Models.SmsTemplate>}
1745
4016
  */
1746
- deleteSmsTemplate(projectId: string, type: SmsTemplateType, locale: SmsTemplateLocale): Promise<Models.SmsTemplate> {
4017
+ deleteSMSTemplate(params: { projectId: string, type: SmsTemplateType, locale: SmsTemplateLocale }): Promise<Models.SmsTemplate>;
4018
+ /**
4019
+ * Reset a custom SMS template to its default value. This endpoint removes any custom message and restores the template to its original state.
4020
+ *
4021
+ * @param {string} projectId - Project unique ID.
4022
+ * @param {SmsTemplateType} type - Template type
4023
+ * @param {SmsTemplateLocale} locale - Template locale
4024
+ * @throws {AppwriteException}
4025
+ * @returns {Promise<Models.SmsTemplate>}
4026
+ * @deprecated Use the object parameter style method for a better developer experience.
4027
+ */
4028
+ deleteSMSTemplate(projectId: string, type: SmsTemplateType, locale: SmsTemplateLocale): Promise<Models.SmsTemplate>;
4029
+ deleteSMSTemplate(
4030
+ paramsOrFirst: { projectId: string, type: SmsTemplateType, locale: SmsTemplateLocale } | string,
4031
+ ...rest: [(SmsTemplateType)?, (SmsTemplateLocale)?]
4032
+ ): Promise<Models.SmsTemplate> {
4033
+ let params: { projectId: string, type: SmsTemplateType, locale: SmsTemplateLocale };
4034
+
4035
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
4036
+ params = (paramsOrFirst || {}) as { projectId: string, type: SmsTemplateType, locale: SmsTemplateLocale };
4037
+ } else {
4038
+ params = {
4039
+ projectId: paramsOrFirst as string,
4040
+ type: rest[0] as SmsTemplateType,
4041
+ locale: rest[1] as SmsTemplateLocale
4042
+ };
4043
+ }
4044
+
4045
+ const projectId = params.projectId;
4046
+ const type = params.type;
4047
+ const locale = params.locale;
4048
+
1747
4049
  if (typeof projectId === 'undefined') {
1748
4050
  throw new AppwriteException('Missing required parameter: "projectId"');
1749
4051
  }
@@ -1753,6 +4055,7 @@ export class Projects {
1753
4055
  if (typeof locale === 'undefined') {
1754
4056
  throw new AppwriteException('Missing required parameter: "locale"');
1755
4057
  }
4058
+
1756
4059
  const apiPath = '/projects/{projectId}/templates/sms/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale);
1757
4060
  const payload: Payload = {};
1758
4061
  const uri = new URL(this.client.config.endpoint + apiPath);
@@ -1768,19 +4071,53 @@ export class Projects {
1768
4071
  payload
1769
4072
  );
1770
4073
  }
4074
+
4075
+ /**
4076
+ * Get a list of all webhooks belonging to the project. You can use the query params to filter your results.
4077
+ *
4078
+ * @param {string} params.projectId - Project unique ID.
4079
+ * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
4080
+ * @throws {AppwriteException}
4081
+ * @returns {Promise<Models.WebhookList>}
4082
+ */
4083
+ listWebhooks(params: { projectId: string, total?: boolean }): Promise<Models.WebhookList>;
1771
4084
  /**
1772
4085
  * Get a list of all webhooks belonging to the project. You can use the query params to filter your results.
1773
4086
  *
1774
- * @param {string} projectId
4087
+ * @param {string} projectId - Project unique ID.
4088
+ * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
1775
4089
  * @throws {AppwriteException}
1776
4090
  * @returns {Promise<Models.WebhookList>}
4091
+ * @deprecated Use the object parameter style method for a better developer experience.
1777
4092
  */
1778
- listWebhooks(projectId: string): Promise<Models.WebhookList> {
4093
+ listWebhooks(projectId: string, total?: boolean): Promise<Models.WebhookList>;
4094
+ listWebhooks(
4095
+ paramsOrFirst: { projectId: string, total?: boolean } | string,
4096
+ ...rest: [(boolean)?]
4097
+ ): Promise<Models.WebhookList> {
4098
+ let params: { projectId: string, total?: boolean };
4099
+
4100
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
4101
+ params = (paramsOrFirst || {}) as { projectId: string, total?: boolean };
4102
+ } else {
4103
+ params = {
4104
+ projectId: paramsOrFirst as string,
4105
+ total: rest[0] as boolean
4106
+ };
4107
+ }
4108
+
4109
+ const projectId = params.projectId;
4110
+ const total = params.total;
4111
+
1779
4112
  if (typeof projectId === 'undefined') {
1780
4113
  throw new AppwriteException('Missing required parameter: "projectId"');
1781
4114
  }
4115
+
1782
4116
  const apiPath = '/projects/{projectId}/webhooks'.replace('{projectId}', projectId);
1783
4117
  const payload: Payload = {};
4118
+ if (typeof total !== 'undefined') {
4119
+ payload['total'] = total;
4120
+ }
1784
4121
  const uri = new URL(this.client.config.endpoint + apiPath);
1785
4122
 
1786
4123
  const apiHeaders: { [header: string]: string } = {
@@ -1793,21 +4130,68 @@ export class Projects {
1793
4130
  payload
1794
4131
  );
1795
4132
  }
4133
+
4134
+ /**
4135
+ * Create a new webhook. Use this endpoint to configure a URL that will receive events from Appwrite when specific events occur.
4136
+ *
4137
+ * @param {string} params.projectId - Project unique ID.
4138
+ * @param {string} params.name - Webhook name. Max length: 128 chars.
4139
+ * @param {string[]} params.events - Events list. Maximum of 100 events are allowed.
4140
+ * @param {string} params.url - Webhook URL.
4141
+ * @param {boolean} params.security - Certificate verification, false for disabled or true for enabled.
4142
+ * @param {boolean} params.enabled - Enable or disable a webhook.
4143
+ * @param {string} params.httpUser - Webhook HTTP user. Max length: 256 chars.
4144
+ * @param {string} params.httpPass - Webhook HTTP password. Max length: 256 chars.
4145
+ * @throws {AppwriteException}
4146
+ * @returns {Promise<Models.Webhook>}
4147
+ */
4148
+ createWebhook(params: { projectId: string, name: string, events: string[], url: string, security: boolean, enabled?: boolean, httpUser?: string, httpPass?: string }): Promise<Models.Webhook>;
1796
4149
  /**
1797
4150
  * Create a new webhook. Use this endpoint to configure a URL that will receive events from Appwrite when specific events occur.
1798
4151
  *
1799
- * @param {string} projectId
1800
- * @param {string} name
1801
- * @param {string[]} events
1802
- * @param {string} url
1803
- * @param {boolean} security
1804
- * @param {boolean} enabled
1805
- * @param {string} httpUser
1806
- * @param {string} httpPass
4152
+ * @param {string} projectId - Project unique ID.
4153
+ * @param {string} name - Webhook name. Max length: 128 chars.
4154
+ * @param {string[]} events - Events list. Maximum of 100 events are allowed.
4155
+ * @param {string} url - Webhook URL.
4156
+ * @param {boolean} security - Certificate verification, false for disabled or true for enabled.
4157
+ * @param {boolean} enabled - Enable or disable a webhook.
4158
+ * @param {string} httpUser - Webhook HTTP user. Max length: 256 chars.
4159
+ * @param {string} httpPass - Webhook HTTP password. Max length: 256 chars.
1807
4160
  * @throws {AppwriteException}
1808
4161
  * @returns {Promise<Models.Webhook>}
4162
+ * @deprecated Use the object parameter style method for a better developer experience.
1809
4163
  */
1810
- createWebhook(projectId: string, name: string, events: string[], url: string, security: boolean, enabled?: boolean, httpUser?: string, httpPass?: string): Promise<Models.Webhook> {
4164
+ createWebhook(projectId: string, name: string, events: string[], url: string, security: boolean, enabled?: boolean, httpUser?: string, httpPass?: string): Promise<Models.Webhook>;
4165
+ createWebhook(
4166
+ paramsOrFirst: { projectId: string, name: string, events: string[], url: string, security: boolean, enabled?: boolean, httpUser?: string, httpPass?: string } | string,
4167
+ ...rest: [(string)?, (string[])?, (string)?, (boolean)?, (boolean)?, (string)?, (string)?]
4168
+ ): Promise<Models.Webhook> {
4169
+ let params: { projectId: string, name: string, events: string[], url: string, security: boolean, enabled?: boolean, httpUser?: string, httpPass?: string };
4170
+
4171
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
4172
+ params = (paramsOrFirst || {}) as { projectId: string, name: string, events: string[], url: string, security: boolean, enabled?: boolean, httpUser?: string, httpPass?: string };
4173
+ } else {
4174
+ params = {
4175
+ projectId: paramsOrFirst as string,
4176
+ name: rest[0] as string,
4177
+ events: rest[1] as string[],
4178
+ url: rest[2] as string,
4179
+ security: rest[3] as boolean,
4180
+ enabled: rest[4] as boolean,
4181
+ httpUser: rest[5] as string,
4182
+ httpPass: rest[6] as string
4183
+ };
4184
+ }
4185
+
4186
+ const projectId = params.projectId;
4187
+ const name = params.name;
4188
+ const events = params.events;
4189
+ const url = params.url;
4190
+ const security = params.security;
4191
+ const enabled = params.enabled;
4192
+ const httpUser = params.httpUser;
4193
+ const httpPass = params.httpPass;
4194
+
1811
4195
  if (typeof projectId === 'undefined') {
1812
4196
  throw new AppwriteException('Missing required parameter: "projectId"');
1813
4197
  }
@@ -1823,6 +4207,7 @@ export class Projects {
1823
4207
  if (typeof security === 'undefined') {
1824
4208
  throw new AppwriteException('Missing required parameter: "security"');
1825
4209
  }
4210
+
1826
4211
  const apiPath = '/projects/{projectId}/webhooks'.replace('{projectId}', projectId);
1827
4212
  const payload: Payload = {};
1828
4213
  if (typeof name !== 'undefined') {
@@ -1859,21 +4244,51 @@ export class Projects {
1859
4244
  payload
1860
4245
  );
1861
4246
  }
4247
+
1862
4248
  /**
1863
4249
  * Get a webhook by its unique ID. This endpoint returns details about a specific webhook configured for a project.
1864
4250
  *
1865
- * @param {string} projectId
1866
- * @param {string} webhookId
4251
+ * @param {string} params.projectId - Project unique ID.
4252
+ * @param {string} params.webhookId - Webhook unique ID.
1867
4253
  * @throws {AppwriteException}
1868
4254
  * @returns {Promise<Models.Webhook>}
1869
4255
  */
1870
- getWebhook(projectId: string, webhookId: string): Promise<Models.Webhook> {
4256
+ getWebhook(params: { projectId: string, webhookId: string }): Promise<Models.Webhook>;
4257
+ /**
4258
+ * Get a webhook by its unique ID. This endpoint returns details about a specific webhook configured for a project.
4259
+ *
4260
+ * @param {string} projectId - Project unique ID.
4261
+ * @param {string} webhookId - Webhook unique ID.
4262
+ * @throws {AppwriteException}
4263
+ * @returns {Promise<Models.Webhook>}
4264
+ * @deprecated Use the object parameter style method for a better developer experience.
4265
+ */
4266
+ getWebhook(projectId: string, webhookId: string): Promise<Models.Webhook>;
4267
+ getWebhook(
4268
+ paramsOrFirst: { projectId: string, webhookId: string } | string,
4269
+ ...rest: [(string)?]
4270
+ ): Promise<Models.Webhook> {
4271
+ let params: { projectId: string, webhookId: string };
4272
+
4273
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
4274
+ params = (paramsOrFirst || {}) as { projectId: string, webhookId: string };
4275
+ } else {
4276
+ params = {
4277
+ projectId: paramsOrFirst as string,
4278
+ webhookId: rest[0] as string
4279
+ };
4280
+ }
4281
+
4282
+ const projectId = params.projectId;
4283
+ const webhookId = params.webhookId;
4284
+
1871
4285
  if (typeof projectId === 'undefined') {
1872
4286
  throw new AppwriteException('Missing required parameter: "projectId"');
1873
4287
  }
1874
4288
  if (typeof webhookId === 'undefined') {
1875
4289
  throw new AppwriteException('Missing required parameter: "webhookId"');
1876
4290
  }
4291
+
1877
4292
  const apiPath = '/projects/{projectId}/webhooks/{webhookId}'.replace('{projectId}', projectId).replace('{webhookId}', webhookId);
1878
4293
  const payload: Payload = {};
1879
4294
  const uri = new URL(this.client.config.endpoint + apiPath);
@@ -1888,22 +4303,72 @@ export class Projects {
1888
4303
  payload
1889
4304
  );
1890
4305
  }
4306
+
1891
4307
  /**
1892
4308
  * Update a webhook by its unique ID. Use this endpoint to update the URL, events, or status of an existing webhook.
1893
4309
  *
1894
- * @param {string} projectId
1895
- * @param {string} webhookId
1896
- * @param {string} name
1897
- * @param {string[]} events
1898
- * @param {string} url
1899
- * @param {boolean} security
1900
- * @param {boolean} enabled
1901
- * @param {string} httpUser
1902
- * @param {string} httpPass
4310
+ * @param {string} params.projectId - Project unique ID.
4311
+ * @param {string} params.webhookId - Webhook unique ID.
4312
+ * @param {string} params.name - Webhook name. Max length: 128 chars.
4313
+ * @param {string[]} params.events - Events list. Maximum of 100 events are allowed.
4314
+ * @param {string} params.url - Webhook URL.
4315
+ * @param {boolean} params.security - Certificate verification, false for disabled or true for enabled.
4316
+ * @param {boolean} params.enabled - Enable or disable a webhook.
4317
+ * @param {string} params.httpUser - Webhook HTTP user. Max length: 256 chars.
4318
+ * @param {string} params.httpPass - Webhook HTTP password. Max length: 256 chars.
1903
4319
  * @throws {AppwriteException}
1904
4320
  * @returns {Promise<Models.Webhook>}
1905
4321
  */
1906
- updateWebhook(projectId: string, webhookId: string, name: string, events: string[], url: string, security: boolean, enabled?: boolean, httpUser?: string, httpPass?: string): Promise<Models.Webhook> {
4322
+ updateWebhook(params: { projectId: string, webhookId: string, name: string, events: string[], url: string, security: boolean, enabled?: boolean, httpUser?: string, httpPass?: string }): Promise<Models.Webhook>;
4323
+ /**
4324
+ * Update a webhook by its unique ID. Use this endpoint to update the URL, events, or status of an existing webhook.
4325
+ *
4326
+ * @param {string} projectId - Project unique ID.
4327
+ * @param {string} webhookId - Webhook unique ID.
4328
+ * @param {string} name - Webhook name. Max length: 128 chars.
4329
+ * @param {string[]} events - Events list. Maximum of 100 events are allowed.
4330
+ * @param {string} url - Webhook URL.
4331
+ * @param {boolean} security - Certificate verification, false for disabled or true for enabled.
4332
+ * @param {boolean} enabled - Enable or disable a webhook.
4333
+ * @param {string} httpUser - Webhook HTTP user. Max length: 256 chars.
4334
+ * @param {string} httpPass - Webhook HTTP password. Max length: 256 chars.
4335
+ * @throws {AppwriteException}
4336
+ * @returns {Promise<Models.Webhook>}
4337
+ * @deprecated Use the object parameter style method for a better developer experience.
4338
+ */
4339
+ updateWebhook(projectId: string, webhookId: string, name: string, events: string[], url: string, security: boolean, enabled?: boolean, httpUser?: string, httpPass?: string): Promise<Models.Webhook>;
4340
+ updateWebhook(
4341
+ paramsOrFirst: { projectId: string, webhookId: string, name: string, events: string[], url: string, security: boolean, enabled?: boolean, httpUser?: string, httpPass?: string } | string,
4342
+ ...rest: [(string)?, (string)?, (string[])?, (string)?, (boolean)?, (boolean)?, (string)?, (string)?]
4343
+ ): Promise<Models.Webhook> {
4344
+ let params: { projectId: string, webhookId: string, name: string, events: string[], url: string, security: boolean, enabled?: boolean, httpUser?: string, httpPass?: string };
4345
+
4346
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
4347
+ params = (paramsOrFirst || {}) as { projectId: string, webhookId: string, name: string, events: string[], url: string, security: boolean, enabled?: boolean, httpUser?: string, httpPass?: string };
4348
+ } else {
4349
+ params = {
4350
+ projectId: paramsOrFirst as string,
4351
+ webhookId: rest[0] as string,
4352
+ name: rest[1] as string,
4353
+ events: rest[2] as string[],
4354
+ url: rest[3] as string,
4355
+ security: rest[4] as boolean,
4356
+ enabled: rest[5] as boolean,
4357
+ httpUser: rest[6] as string,
4358
+ httpPass: rest[7] as string
4359
+ };
4360
+ }
4361
+
4362
+ const projectId = params.projectId;
4363
+ const webhookId = params.webhookId;
4364
+ const name = params.name;
4365
+ const events = params.events;
4366
+ const url = params.url;
4367
+ const security = params.security;
4368
+ const enabled = params.enabled;
4369
+ const httpUser = params.httpUser;
4370
+ const httpPass = params.httpPass;
4371
+
1907
4372
  if (typeof projectId === 'undefined') {
1908
4373
  throw new AppwriteException('Missing required parameter: "projectId"');
1909
4374
  }
@@ -1922,6 +4387,7 @@ export class Projects {
1922
4387
  if (typeof security === 'undefined') {
1923
4388
  throw new AppwriteException('Missing required parameter: "security"');
1924
4389
  }
4390
+
1925
4391
  const apiPath = '/projects/{projectId}/webhooks/{webhookId}'.replace('{projectId}', projectId).replace('{webhookId}', webhookId);
1926
4392
  const payload: Payload = {};
1927
4393
  if (typeof name !== 'undefined') {
@@ -1958,21 +4424,51 @@ export class Projects {
1958
4424
  payload
1959
4425
  );
1960
4426
  }
4427
+
4428
+ /**
4429
+ * Delete a webhook by its unique ID. Once deleted, the webhook will no longer receive project events.
4430
+ *
4431
+ * @param {string} params.projectId - Project unique ID.
4432
+ * @param {string} params.webhookId - Webhook unique ID.
4433
+ * @throws {AppwriteException}
4434
+ * @returns {Promise<{}>}
4435
+ */
4436
+ deleteWebhook(params: { projectId: string, webhookId: string }): Promise<{}>;
1961
4437
  /**
1962
4438
  * Delete a webhook by its unique ID. Once deleted, the webhook will no longer receive project events.
1963
4439
  *
1964
- * @param {string} projectId
1965
- * @param {string} webhookId
4440
+ * @param {string} projectId - Project unique ID.
4441
+ * @param {string} webhookId - Webhook unique ID.
1966
4442
  * @throws {AppwriteException}
1967
4443
  * @returns {Promise<{}>}
4444
+ * @deprecated Use the object parameter style method for a better developer experience.
1968
4445
  */
1969
- deleteWebhook(projectId: string, webhookId: string): Promise<{}> {
4446
+ deleteWebhook(projectId: string, webhookId: string): Promise<{}>;
4447
+ deleteWebhook(
4448
+ paramsOrFirst: { projectId: string, webhookId: string } | string,
4449
+ ...rest: [(string)?]
4450
+ ): Promise<{}> {
4451
+ let params: { projectId: string, webhookId: string };
4452
+
4453
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
4454
+ params = (paramsOrFirst || {}) as { projectId: string, webhookId: string };
4455
+ } else {
4456
+ params = {
4457
+ projectId: paramsOrFirst as string,
4458
+ webhookId: rest[0] as string
4459
+ };
4460
+ }
4461
+
4462
+ const projectId = params.projectId;
4463
+ const webhookId = params.webhookId;
4464
+
1970
4465
  if (typeof projectId === 'undefined') {
1971
4466
  throw new AppwriteException('Missing required parameter: "projectId"');
1972
4467
  }
1973
4468
  if (typeof webhookId === 'undefined') {
1974
4469
  throw new AppwriteException('Missing required parameter: "webhookId"');
1975
4470
  }
4471
+
1976
4472
  const apiPath = '/projects/{projectId}/webhooks/{webhookId}'.replace('{projectId}', projectId).replace('{webhookId}', webhookId);
1977
4473
  const payload: Payload = {};
1978
4474
  const uri = new URL(this.client.config.endpoint + apiPath);
@@ -1988,21 +4484,51 @@ export class Projects {
1988
4484
  payload
1989
4485
  );
1990
4486
  }
4487
+
1991
4488
  /**
1992
4489
  * Update the webhook signature key. This endpoint can be used to regenerate the signature key used to sign and validate payload deliveries for a specific webhook.
1993
4490
  *
1994
- * @param {string} projectId
1995
- * @param {string} webhookId
4491
+ * @param {string} params.projectId - Project unique ID.
4492
+ * @param {string} params.webhookId - Webhook unique ID.
1996
4493
  * @throws {AppwriteException}
1997
4494
  * @returns {Promise<Models.Webhook>}
1998
4495
  */
1999
- updateWebhookSignature(projectId: string, webhookId: string): Promise<Models.Webhook> {
4496
+ updateWebhookSignature(params: { projectId: string, webhookId: string }): Promise<Models.Webhook>;
4497
+ /**
4498
+ * Update the webhook signature key. This endpoint can be used to regenerate the signature key used to sign and validate payload deliveries for a specific webhook.
4499
+ *
4500
+ * @param {string} projectId - Project unique ID.
4501
+ * @param {string} webhookId - Webhook unique ID.
4502
+ * @throws {AppwriteException}
4503
+ * @returns {Promise<Models.Webhook>}
4504
+ * @deprecated Use the object parameter style method for a better developer experience.
4505
+ */
4506
+ updateWebhookSignature(projectId: string, webhookId: string): Promise<Models.Webhook>;
4507
+ updateWebhookSignature(
4508
+ paramsOrFirst: { projectId: string, webhookId: string } | string,
4509
+ ...rest: [(string)?]
4510
+ ): Promise<Models.Webhook> {
4511
+ let params: { projectId: string, webhookId: string };
4512
+
4513
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
4514
+ params = (paramsOrFirst || {}) as { projectId: string, webhookId: string };
4515
+ } else {
4516
+ params = {
4517
+ projectId: paramsOrFirst as string,
4518
+ webhookId: rest[0] as string
4519
+ };
4520
+ }
4521
+
4522
+ const projectId = params.projectId;
4523
+ const webhookId = params.webhookId;
4524
+
2000
4525
  if (typeof projectId === 'undefined') {
2001
4526
  throw new AppwriteException('Missing required parameter: "projectId"');
2002
4527
  }
2003
4528
  if (typeof webhookId === 'undefined') {
2004
4529
  throw new AppwriteException('Missing required parameter: "webhookId"');
2005
4530
  }
4531
+
2006
4532
  const apiPath = '/projects/{projectId}/webhooks/{webhookId}/signature'.replace('{projectId}', projectId).replace('{webhookId}', webhookId);
2007
4533
  const payload: Payload = {};
2008
4534
  const uri = new URL(this.client.config.endpoint + apiPath);