@appwrite.io/console 1.10.0 → 2.1.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 (745) hide show
  1. package/.github/workflows/publish.yml +9 -8
  2. package/CHANGELOG.md +10 -0
  3. package/LICENSE +1 -1
  4. package/README.md +4 -4
  5. package/dist/cjs/sdk.js +15258 -6062
  6. package/dist/cjs/sdk.js.map +1 -1
  7. package/dist/esm/sdk.js +15256 -6063
  8. package/dist/esm/sdk.js.map +1 -1
  9. package/dist/iife/sdk.js +15258 -6062
  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 +15 -8
  101. package/docs/examples/databases/create-documents.md +6 -5
  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 +3 -3
  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 +4 -4
  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 -6
  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 +71 -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 +1692 -238
  634. package/src/operator.ts +308 -0
  635. package/src/query.ts +246 -2
  636. package/src/services/account.ts +2205 -223
  637. package/src/services/assistant.ts +29 -3
  638. package/src/services/avatars.ts +486 -33
  639. package/src/services/backups.ts +389 -42
  640. package/src/services/console.ts +492 -19
  641. package/src/services/databases.ts +3521 -431
  642. package/src/services/domains.ts +1684 -197
  643. package/src/services/functions.ts +1162 -149
  644. package/src/services/graphql.ts +55 -4
  645. package/src/services/health.ts +560 -41
  646. package/src/services/locale.ts +9 -0
  647. package/src/services/messaging.ts +3367 -380
  648. package/src/services/migrations.ts +641 -65
  649. package/src/services/organizations.ts +1323 -128
  650. package/src/services/project.ts +168 -17
  651. package/src/services/projects.ts +2742 -266
  652. package/src/services/proxy.ts +265 -26
  653. package/src/services/realtime.ts +437 -0
  654. package/src/services/sites.ts +1098 -140
  655. package/src/services/storage.ts +651 -82
  656. package/src/services/tables-db.ts +5439 -0
  657. package/src/services/teams.ts +512 -55
  658. package/src/services/tokens.ts +167 -16
  659. package/src/services/users.ts +1873 -181
  660. package/src/services/vcs.ts +359 -39
  661. package/types/client.d.ts +33 -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 +1664 -245
  693. package/types/operator.d.ts +180 -0
  694. package/types/query.d.ts +198 -2
  695. package/types/services/account.d.ts +985 -123
  696. package/types/services/assistant.d.ts +13 -2
  697. package/types/services/avatars.d.ts +244 -26
  698. package/types/services/backups.d.ts +190 -30
  699. package/types/services/console.d.ts +201 -14
  700. package/types/services/databases.d.ts +1731 -284
  701. package/types/services/domains.d.ts +904 -152
  702. package/types/services/functions.d.ts +616 -125
  703. package/types/services/graphql.d.ts +24 -2
  704. package/types/services/health.d.ts +245 -23
  705. package/types/services/messaging.d.ts +1660 -271
  706. package/types/services/migrations.d.ts +319 -53
  707. package/types/services/organizations.d.ts +635 -97
  708. package/types/services/project.d.ts +81 -12
  709. package/types/services/projects.d.ts +1308 -202
  710. package/types/services/proxy.d.ts +128 -19
  711. package/types/services/realtime.d.ts +118 -0
  712. package/types/services/sites.d.ts +577 -116
  713. package/types/services/storage.d.ts +354 -73
  714. package/types/services/tables-db.d.ts +2040 -0
  715. package/types/services/teams.d.ts +260 -44
  716. package/types/services/tokens.d.ts +80 -12
  717. package/types/services/users.d.ts +881 -124
  718. package/types/services/vcs.d.ts +179 -31
  719. package/docs/examples/domains/create-record-m-x.md +0 -18
  720. package/docs/examples/domains/create-record-s-r-v.md +0 -20
  721. package/docs/examples/domains/create-record-t-x-t.md +0 -17
  722. package/docs/examples/domains/update-record-a-a-a-a.md +0 -18
  723. package/docs/examples/domains/update-record-c-a-a.md +0 -18
  724. package/docs/examples/domains/update-record-c-n-a-m-e.md +0 -18
  725. package/docs/examples/domains/update-record-h-t-t-p-s.md +0 -18
  726. package/docs/examples/domains/update-record-m-x.md +0 -19
  727. package/docs/examples/domains/update-record-n-s.md +0 -18
  728. package/docs/examples/domains/update-record-s-r-v.md +0 -21
  729. package/docs/examples/domains/update-record-t-x-t.md +0 -18
  730. package/src/enums/billing-plan.ts +0 -5
  731. package/src/enums/database-usage-range.ts +0 -5
  732. package/src/enums/function-usage-range.ts +0 -5
  733. package/src/enums/site-usage-range.ts +0 -5
  734. package/src/enums/storage-usage-range.ts +0 -5
  735. package/types/enums/billing-plan.d.ts +0 -5
  736. package/types/enums/database-usage-range.d.ts +0 -5
  737. package/types/enums/function-usage-range.d.ts +0 -5
  738. package/types/enums/storage-usage-range.d.ts +0 -5
  739. package/types/enums/user-usage-range.d.ts +0 -5
  740. /package/docs/examples/health/{get-d-b.md → get-db.md} +0 -0
  741. /package/docs/examples/locale/{list-countries-e-u.md → list-countries-eu.md} +0 -0
  742. /package/src/enums/{s-m-t-p-secure.ts → smtp-secure.ts} +0 -0
  743. /package/src/enums/{v-c-s-detection-type.ts → vcs-detection-type.ts} +0 -0
  744. /package/types/enums/{s-m-t-p-secure.d.ts → smtp-secure.d.ts} +0 -0
  745. /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 } = {
@@ -53,23 +91,84 @@ export class Projects {
53
91
  /**
54
92
  * Create a new project. You can create a maximum of 100 projects per account.
55
93
  *
56
- * @param {string} projectId
57
- * @param {string} name
58
- * @param {string} teamId
59
- * @param {Region} region
60
- * @param {string} description
61
- * @param {string} logo
62
- * @param {string} url
63
- * @param {string} legalName
64
- * @param {string} legalCountry
65
- * @param {string} legalState
66
- * @param {string} legalCity
67
- * @param {string} legalAddress
68
- * @param {string} legalTaxId
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>;
111
+ /**
112
+ * Create a new project. You can create a maximum of 100 projects per account.
113
+ *
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.
69
127
  * @throws {AppwriteException}
70
128
  * @returns {Promise<Models.Project>}
129
+ * @deprecated Use the object parameter style method for a better developer experience.
71
130
  */
72
- 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
+
73
172
  if (typeof projectId === 'undefined') {
74
173
  throw new AppwriteException('Missing required parameter: "projectId"');
75
174
  }
@@ -79,6 +178,7 @@ export class Projects {
79
178
  if (typeof teamId === 'undefined') {
80
179
  throw new AppwriteException('Missing required parameter: "teamId"');
81
180
  }
181
+
82
182
  const apiPath = '/projects';
83
183
  const payload: Payload = {};
84
184
  if (typeof projectId !== 'undefined') {
@@ -135,16 +235,41 @@ export class Projects {
135
235
  }
136
236
 
137
237
  /**
138
- * 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.
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>;
245
+ /**
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.
139
247
  *
140
- * @param {string} projectId
248
+ * @param {string} projectId - Project unique ID.
141
249
  * @throws {AppwriteException}
142
250
  * @returns {Promise<Models.Project>}
251
+ * @deprecated Use the object parameter style method for a better developer experience.
143
252
  */
144
- 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
+
145
269
  if (typeof projectId === 'undefined') {
146
270
  throw new AppwriteException('Missing required parameter: "projectId"');
147
271
  }
272
+
148
273
  const apiPath = '/projects/{projectId}'.replace('{projectId}', projectId);
149
274
  const payload: Payload = {};
150
275
  const uri = new URL(this.client.config.endpoint + apiPath);
@@ -163,27 +288,83 @@ export class Projects {
163
288
  /**
164
289
  * Update a project by its unique ID.
165
290
  *
166
- * @param {string} projectId
167
- * @param {string} name
168
- * @param {string} description
169
- * @param {string} logo
170
- * @param {string} url
171
- * @param {string} legalName
172
- * @param {string} legalCountry
173
- * @param {string} legalState
174
- * @param {string} legalCity
175
- * @param {string} legalAddress
176
- * @param {string} legalTaxId
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>;
306
+ /**
307
+ * Update a project by its unique ID.
308
+ *
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.
177
320
  * @throws {AppwriteException}
178
321
  * @returns {Promise<Models.Project>}
322
+ * @deprecated Use the object parameter style method for a better developer experience.
179
323
  */
180
- 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
+
181
361
  if (typeof projectId === 'undefined') {
182
362
  throw new AppwriteException('Missing required parameter: "projectId"');
183
363
  }
184
364
  if (typeof name === 'undefined') {
185
365
  throw new AppwriteException('Missing required parameter: "name"');
186
366
  }
367
+
187
368
  const apiPath = '/projects/{projectId}'.replace('{projectId}', projectId);
188
369
  const payload: Payload = {};
189
370
  if (typeof name !== 'undefined') {
@@ -233,14 +414,39 @@ export class Projects {
233
414
  /**
234
415
  * Delete a project by its unique ID.
235
416
  *
236
- * @param {string} projectId
417
+ * @param {string} params.projectId - Project unique ID.
418
+ * @throws {AppwriteException}
419
+ * @returns {Promise<{}>}
420
+ */
421
+ delete(params: { projectId: string }): Promise<{}>;
422
+ /**
423
+ * Delete a project by its unique ID.
424
+ *
425
+ * @param {string} projectId - Project unique ID.
237
426
  * @throws {AppwriteException}
238
427
  * @returns {Promise<{}>}
428
+ * @deprecated Use the object parameter style method for a better developer experience.
239
429
  */
240
- 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
+
241
446
  if (typeof projectId === 'undefined') {
242
447
  throw new AppwriteException('Missing required parameter: "projectId"');
243
448
  }
449
+
244
450
  const apiPath = '/projects/{projectId}'.replace('{projectId}', projectId);
245
451
  const payload: Payload = {};
246
452
  const uri = new URL(this.client.config.endpoint + apiPath);
@@ -260,13 +466,118 @@ export class Projects {
260
466
  /**
261
467
  * Update the status of a specific API type. Use this endpoint to enable or disable API types such as REST, GraphQL and Realtime.
262
468
  *
263
- * @param {string} projectId
264
- * @param {Api} api
265
- * @param {boolean} status
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>;
550
+ /**
551
+ * Update the status of a specific API type. Use this endpoint to enable or disable API types such as REST, GraphQL and Realtime.
552
+ *
553
+ * @param {string} projectId - Project unique ID.
554
+ * @param {Api} api - API name.
555
+ * @param {boolean} status - API status.
266
556
  * @throws {AppwriteException}
267
557
  * @returns {Promise<Models.Project>}
558
+ * @deprecated Use the object parameter style method for a better developer experience.
268
559
  */
269
- 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
+
270
581
  if (typeof projectId === 'undefined') {
271
582
  throw new AppwriteException('Missing required parameter: "projectId"');
272
583
  }
@@ -276,6 +587,7 @@ export class Projects {
276
587
  if (typeof status === 'undefined') {
277
588
  throw new AppwriteException('Missing required parameter: "status"');
278
589
  }
590
+
279
591
  const apiPath = '/projects/{projectId}/api'.replace('{projectId}', projectId);
280
592
  const payload: Payload = {};
281
593
  if (typeof api !== 'undefined') {
@@ -301,18 +613,111 @@ export class Projects {
301
613
  /**
302
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.
303
615
  *
304
- * @param {string} projectId
305
- * @param {boolean} status
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>;
686
+ /**
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.
688
+ *
689
+ * @param {string} projectId - Project unique ID.
690
+ * @param {boolean} status - API status.
306
691
  * @throws {AppwriteException}
307
692
  * @returns {Promise<Models.Project>}
693
+ * @deprecated Use the object parameter style method for a better developer experience.
308
694
  */
309
- 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
+
310
714
  if (typeof projectId === 'undefined') {
311
715
  throw new AppwriteException('Missing required parameter: "projectId"');
312
716
  }
313
717
  if (typeof status === 'undefined') {
314
718
  throw new AppwriteException('Missing required parameter: "status"');
315
719
  }
720
+
316
721
  const apiPath = '/projects/{projectId}/api/all'.replace('{projectId}', projectId);
317
722
  const payload: Payload = {};
318
723
  if (typeof status !== 'undefined') {
@@ -335,18 +740,47 @@ export class Projects {
335
740
  /**
336
741
  * Update how long sessions created within a project should stay active for.
337
742
  *
338
- * @param {string} projectId
339
- * @param {number} duration
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>;
749
+ /**
750
+ * Update how long sessions created within a project should stay active for.
751
+ *
752
+ * @param {string} projectId - Project unique ID.
753
+ * @param {number} duration - Project session length in seconds. Max length: 31536000 seconds.
340
754
  * @throws {AppwriteException}
341
755
  * @returns {Promise<Models.Project>}
756
+ * @deprecated Use the object parameter style method for a better developer experience.
342
757
  */
343
- 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
+
344
777
  if (typeof projectId === 'undefined') {
345
778
  throw new AppwriteException('Missing required parameter: "projectId"');
346
779
  }
347
780
  if (typeof duration === 'undefined') {
348
781
  throw new AppwriteException('Missing required parameter: "duration"');
349
782
  }
783
+
350
784
  const apiPath = '/projects/{projectId}/auth/duration'.replace('{projectId}', projectId);
351
785
  const payload: Payload = {};
352
786
  if (typeof duration !== 'undefined') {
@@ -369,18 +803,47 @@ export class Projects {
369
803
  /**
370
804
  * Update the maximum number of users allowed in this project. Set to 0 for unlimited users.
371
805
  *
372
- * @param {string} projectId
373
- * @param {number} limit
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>;
812
+ /**
813
+ * Update the maximum number of users allowed in this project. Set to 0 for unlimited users.
814
+ *
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.
374
817
  * @throws {AppwriteException}
375
818
  * @returns {Promise<Models.Project>}
819
+ * @deprecated Use the object parameter style method for a better developer experience.
376
820
  */
377
- 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
+
378
840
  if (typeof projectId === 'undefined') {
379
841
  throw new AppwriteException('Missing required parameter: "projectId"');
380
842
  }
381
843
  if (typeof limit === 'undefined') {
382
844
  throw new AppwriteException('Missing required parameter: "limit"');
383
845
  }
846
+
384
847
  const apiPath = '/projects/{projectId}/auth/limit'.replace('{projectId}', projectId);
385
848
  const payload: Payload = {};
386
849
  if (typeof limit !== 'undefined') {
@@ -403,18 +866,47 @@ export class Projects {
403
866
  /**
404
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.
405
868
  *
406
- * @param {string} projectId
407
- * @param {number} limit
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>;
875
+ /**
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.
877
+ *
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
408
880
  * @throws {AppwriteException}
409
881
  * @returns {Promise<Models.Project>}
882
+ * @deprecated Use the object parameter style method for a better developer experience.
410
883
  */
411
- 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
+
412
903
  if (typeof projectId === 'undefined') {
413
904
  throw new AppwriteException('Missing required parameter: "projectId"');
414
905
  }
415
906
  if (typeof limit === 'undefined') {
416
907
  throw new AppwriteException('Missing required parameter: "limit"');
417
908
  }
909
+
418
910
  const apiPath = '/projects/{projectId}/auth/max-sessions'.replace('{projectId}', projectId);
419
911
  const payload: Payload = {};
420
912
  if (typeof limit !== 'undefined') {
@@ -437,14 +929,48 @@ export class Projects {
437
929
  /**
438
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.
439
931
  *
440
- * @param {string} projectId
441
- * @param {boolean} userName
442
- * @param {boolean} userEmail
443
- * @param {boolean} mfa
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>;
940
+ /**
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.
942
+ *
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.
444
947
  * @throws {AppwriteException}
445
948
  * @returns {Promise<Models.Project>}
949
+ * @deprecated Use the object parameter style method for a better developer experience.
446
950
  */
447
- 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
+
448
974
  if (typeof projectId === 'undefined') {
449
975
  throw new AppwriteException('Missing required parameter: "projectId"');
450
976
  }
@@ -457,6 +983,7 @@ export class Projects {
457
983
  if (typeof mfa === 'undefined') {
458
984
  throw new AppwriteException('Missing required parameter: "mfa"');
459
985
  }
986
+
460
987
  const apiPath = '/projects/{projectId}/auth/memberships-privacy'.replace('{projectId}', projectId);
461
988
  const payload: Payload = {};
462
989
  if (typeof userName !== 'undefined') {
@@ -485,18 +1012,47 @@ export class Projects {
485
1012
  /**
486
1013
  * Update the list of mock phone numbers for testing. Use these numbers to bypass SMS verification in development.
487
1014
  *
488
- * @param {string} projectId
489
- * @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.
1017
+ * @throws {AppwriteException}
1018
+ * @returns {Promise<Models.Project>}
1019
+ */
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.
490
1026
  * @throws {AppwriteException}
491
1027
  * @returns {Promise<Models.Project>}
1028
+ * @deprecated Use the object parameter style method for a better developer experience.
492
1029
  */
493
- updateMockNumbers(projectId: string, numbers: object[]): Promise<Models.Project> {
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
+
494
1049
  if (typeof projectId === 'undefined') {
495
1050
  throw new AppwriteException('Missing required parameter: "projectId"');
496
1051
  }
497
1052
  if (typeof numbers === 'undefined') {
498
1053
  throw new AppwriteException('Missing required parameter: "numbers"');
499
1054
  }
1055
+
500
1056
  const apiPath = '/projects/{projectId}/auth/mock-numbers'.replace('{projectId}', projectId);
501
1057
  const payload: Payload = {};
502
1058
  if (typeof numbers !== 'undefined') {
@@ -517,20 +1073,49 @@ export class Projects {
517
1073
  }
518
1074
 
519
1075
  /**
520
- * Enable or disable checking user passwords against common passwords dictionary. This helps ensure users don&#039;t use common and insecure passwords.
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>;
1084
+ /**
1085
+ * Enable or disable checking user passwords against common passwords dictionary. This helps ensure users don't use common and insecure passwords.
521
1086
  *
522
- * @param {string} projectId
523
- * @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.
524
1089
  * @throws {AppwriteException}
525
1090
  * @returns {Promise<Models.Project>}
1091
+ * @deprecated Use the object parameter style method for a better developer experience.
526
1092
  */
527
- 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
+
528
1112
  if (typeof projectId === 'undefined') {
529
1113
  throw new AppwriteException('Missing required parameter: "projectId"');
530
1114
  }
531
1115
  if (typeof enabled === 'undefined') {
532
1116
  throw new AppwriteException('Missing required parameter: "enabled"');
533
1117
  }
1118
+
534
1119
  const apiPath = '/projects/{projectId}/auth/password-dictionary'.replace('{projectId}', projectId);
535
1120
  const payload: Payload = {};
536
1121
  if (typeof enabled !== 'undefined') {
@@ -553,18 +1138,47 @@ export class Projects {
553
1138
  /**
554
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.
555
1140
  *
556
- * @param {string} projectId
557
- * @param {number} limit
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>;
1147
+ /**
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.
1149
+ *
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
558
1152
  * @throws {AppwriteException}
559
1153
  * @returns {Promise<Models.Project>}
1154
+ * @deprecated Use the object parameter style method for a better developer experience.
560
1155
  */
561
- 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
+
562
1175
  if (typeof projectId === 'undefined') {
563
1176
  throw new AppwriteException('Missing required parameter: "projectId"');
564
1177
  }
565
1178
  if (typeof limit === 'undefined') {
566
1179
  throw new AppwriteException('Missing required parameter: "limit"');
567
1180
  }
1181
+
568
1182
  const apiPath = '/projects/{projectId}/auth/password-history'.replace('{projectId}', projectId);
569
1183
  const payload: Payload = {};
570
1184
  if (typeof limit !== 'undefined') {
@@ -587,18 +1201,47 @@ export class Projects {
587
1201
  /**
588
1202
  * Enable or disable checking user passwords against their personal data. This helps prevent users from using personal information in their passwords.
589
1203
  *
590
- * @param {string} projectId
591
- * @param {boolean} enabled
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>;
1210
+ /**
1211
+ * Enable or disable checking user passwords against their personal data. This helps prevent users from using personal information in their passwords.
1212
+ *
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.
592
1215
  * @throws {AppwriteException}
593
1216
  * @returns {Promise<Models.Project>}
1217
+ * @deprecated Use the object parameter style method for a better developer experience.
594
1218
  */
595
- 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
+
596
1238
  if (typeof projectId === 'undefined') {
597
1239
  throw new AppwriteException('Missing required parameter: "projectId"');
598
1240
  }
599
1241
  if (typeof enabled === 'undefined') {
600
1242
  throw new AppwriteException('Missing required parameter: "enabled"');
601
1243
  }
1244
+
602
1245
  const apiPath = '/projects/{projectId}/auth/personal-data'.replace('{projectId}', projectId);
603
1246
  const payload: Payload = {};
604
1247
  if (typeof enabled !== 'undefined') {
@@ -621,18 +1264,47 @@ export class Projects {
621
1264
  /**
622
1265
  * Enable or disable session email alerts. When enabled, users will receive email notifications when new sessions are created.
623
1266
  *
624
- * @param {string} projectId
625
- * @param {boolean} alerts
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>;
1273
+ /**
1274
+ * Enable or disable session email alerts. When enabled, users will receive email notifications when new sessions are created.
1275
+ *
1276
+ * @param {string} projectId - Project unique ID.
1277
+ * @param {boolean} alerts - Set to true to enable session emails.
626
1278
  * @throws {AppwriteException}
627
1279
  * @returns {Promise<Models.Project>}
1280
+ * @deprecated Use the object parameter style method for a better developer experience.
628
1281
  */
629
- 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
+
630
1301
  if (typeof projectId === 'undefined') {
631
1302
  throw new AppwriteException('Missing required parameter: "projectId"');
632
1303
  }
633
1304
  if (typeof alerts === 'undefined') {
634
1305
  throw new AppwriteException('Missing required parameter: "alerts"');
635
1306
  }
1307
+
636
1308
  const apiPath = '/projects/{projectId}/auth/session-alerts'.replace('{projectId}', projectId);
637
1309
  const payload: Payload = {};
638
1310
  if (typeof alerts !== 'undefined') {
@@ -653,28 +1325,53 @@ export class Projects {
653
1325
  }
654
1326
 
655
1327
  /**
656
- * 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.
657
1338
  *
658
- * @param {string} projectId
659
- * @param {AuthMethod} method
660
- * @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
661
1341
  * @throws {AppwriteException}
662
1342
  * @returns {Promise<Models.Project>}
1343
+ * @deprecated Use the object parameter style method for a better developer experience.
663
1344
  */
664
- 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
+
665
1364
  if (typeof projectId === 'undefined') {
666
1365
  throw new AppwriteException('Missing required parameter: "projectId"');
667
1366
  }
668
- if (typeof method === 'undefined') {
669
- throw new AppwriteException('Missing required parameter: "method"');
670
- }
671
- if (typeof status === 'undefined') {
672
- throw new AppwriteException('Missing required parameter: "status"');
1367
+ if (typeof enabled === 'undefined') {
1368
+ throw new AppwriteException('Missing required parameter: "enabled"');
673
1369
  }
674
- const apiPath = '/projects/{projectId}/auth/{method}'.replace('{projectId}', projectId).replace('{method}', method);
1370
+
1371
+ const apiPath = '/projects/{projectId}/auth/session-invalidation'.replace('{projectId}', projectId);
675
1372
  const payload: Payload = {};
676
- if (typeof status !== 'undefined') {
677
- payload['status'] = status;
1373
+ if (typeof enabled !== 'undefined') {
1374
+ payload['enabled'] = enabled;
678
1375
  }
679
1376
  const uri = new URL(this.client.config.endpoint + apiPath);
680
1377
 
@@ -691,21 +1388,120 @@ export class Projects {
691
1388
  }
692
1389
 
693
1390
  /**
694
- * 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.
695
1392
  *
696
- * @param {string} projectId
697
- * @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.
698
1396
  * @throws {AppwriteException}
699
- * @returns {Promise<Models.DevKeyList>}
1397
+ * @returns {Promise<Models.Project>}
1398
+ */
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.
700
1409
  */
701
- listDevKeys(projectId: string, queries?: string[]): Promise<Models.DevKeyList> {
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
+
702
1431
  if (typeof projectId === 'undefined') {
703
1432
  throw new AppwriteException('Missing required parameter: "projectId"');
704
1433
  }
705
- const apiPath = '/projects/{projectId}/dev-keys'.replace('{projectId}', projectId);
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);
706
1442
  const payload: Payload = {};
707
- if (typeof queries !== 'undefined') {
708
- payload['queries'] = queries;
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);
1502
+ const payload: Payload = {};
1503
+ if (typeof queries !== 'undefined') {
1504
+ payload['queries'] = queries;
709
1505
  }
710
1506
  const uri = new URL(this.client.config.endpoint + apiPath);
711
1507
 
@@ -723,13 +1519,44 @@ export class Projects {
723
1519
  /**
724
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.
725
1521
  *
726
- * @param {string} projectId
727
- * @param {string} name
728
- * @param {string} expire
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>;
1529
+ /**
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.
1531
+ *
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.
729
1535
  * @throws {AppwriteException}
730
1536
  * @returns {Promise<Models.DevKey>}
1537
+ * @deprecated Use the object parameter style method for a better developer experience.
731
1538
  */
732
- 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
+
733
1560
  if (typeof projectId === 'undefined') {
734
1561
  throw new AppwriteException('Missing required parameter: "projectId"');
735
1562
  }
@@ -739,6 +1566,7 @@ export class Projects {
739
1566
  if (typeof expire === 'undefined') {
740
1567
  throw new AppwriteException('Missing required parameter: "expire"');
741
1568
  }
1569
+
742
1570
  const apiPath = '/projects/{projectId}/dev-keys'.replace('{projectId}', projectId);
743
1571
  const payload: Payload = {};
744
1572
  if (typeof name !== 'undefined') {
@@ -762,20 +1590,49 @@ export class Projects {
762
1590
  }
763
1591
 
764
1592
  /**
765
- * 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.
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>;
1601
+ /**
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.
766
1603
  *
767
- * @param {string} projectId
768
- * @param {string} keyId
1604
+ * @param {string} projectId - Project unique ID.
1605
+ * @param {string} keyId - Key unique ID.
769
1606
  * @throws {AppwriteException}
770
1607
  * @returns {Promise<Models.DevKey>}
1608
+ * @deprecated Use the object parameter style method for a better developer experience.
771
1609
  */
772
- 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
+
773
1629
  if (typeof projectId === 'undefined') {
774
1630
  throw new AppwriteException('Missing required parameter: "projectId"');
775
1631
  }
776
1632
  if (typeof keyId === 'undefined') {
777
1633
  throw new AppwriteException('Missing required parameter: "keyId"');
778
1634
  }
1635
+
779
1636
  const apiPath = '/projects/{projectId}/dev-keys/{keyId}'.replace('{projectId}', projectId).replace('{keyId}', keyId);
780
1637
  const payload: Payload = {};
781
1638
  const uri = new URL(this.client.config.endpoint + apiPath);
@@ -792,16 +1649,50 @@ export class Projects {
792
1649
  }
793
1650
 
794
1651
  /**
795
- * 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;
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.'
796
1653
  *
797
- * @param {string} projectId
798
- * @param {string} keyId
799
- * @param {string} name
800
- * @param {string} expire
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.
801
1658
  * @throws {AppwriteException}
802
1659
  * @returns {Promise<Models.DevKey>}
803
1660
  */
804
- updateDevKey(projectId: string, keyId: string, name: string, expire: string): Promise<Models.DevKey> {
1661
+ updateDevKey(params: { projectId: string, keyId: string, name: string, expire: string }): Promise<Models.DevKey>;
1662
+ /**
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.'
1664
+ *
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.
1669
+ * @throws {AppwriteException}
1670
+ * @returns {Promise<Models.DevKey>}
1671
+ * @deprecated Use the object parameter style method for a better developer experience.
1672
+ */
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
+
805
1696
  if (typeof projectId === 'undefined') {
806
1697
  throw new AppwriteException('Missing required parameter: "projectId"');
807
1698
  }
@@ -814,6 +1705,7 @@ export class Projects {
814
1705
  if (typeof expire === 'undefined') {
815
1706
  throw new AppwriteException('Missing required parameter: "expire"');
816
1707
  }
1708
+
817
1709
  const apiPath = '/projects/{projectId}/dev-keys/{keyId}'.replace('{projectId}', projectId).replace('{keyId}', keyId);
818
1710
  const payload: Payload = {};
819
1711
  if (typeof name !== 'undefined') {
@@ -837,20 +1729,49 @@ export class Projects {
837
1729
  }
838
1730
 
839
1731
  /**
840
- * 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.
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<{}>;
1740
+ /**
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.
841
1742
  *
842
- * @param {string} projectId
843
- * @param {string} keyId
1743
+ * @param {string} projectId - Project unique ID.
1744
+ * @param {string} keyId - Key unique ID.
844
1745
  * @throws {AppwriteException}
845
1746
  * @returns {Promise<{}>}
1747
+ * @deprecated Use the object parameter style method for a better developer experience.
846
1748
  */
847
- 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
+
848
1768
  if (typeof projectId === 'undefined') {
849
1769
  throw new AppwriteException('Missing required parameter: "projectId"');
850
1770
  }
851
1771
  if (typeof keyId === 'undefined') {
852
1772
  throw new AppwriteException('Missing required parameter: "keyId"');
853
1773
  }
1774
+
854
1775
  const apiPath = '/projects/{projectId}/dev-keys/{keyId}'.replace('{projectId}', projectId).replace('{keyId}', keyId);
855
1776
  const payload: Payload = {};
856
1777
  const uri = new URL(this.client.config.endpoint + apiPath);
@@ -870,19 +1791,51 @@ export class Projects {
870
1791
  /**
871
1792
  * Create a new JWT token. This token can be used to authenticate users with custom scopes and expiration time.
872
1793
  *
873
- * @param {string} projectId
874
- * @param {string[]} scopes
875
- * @param {number} duration
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>;
1801
+ /**
1802
+ * Create a new JWT token. This token can be used to authenticate users with custom scopes and expiration time.
1803
+ *
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.
876
1807
  * @throws {AppwriteException}
877
1808
  * @returns {Promise<Models.Jwt>}
1809
+ * @deprecated Use the object parameter style method for a better developer experience.
878
1810
  */
879
- 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
+
880
1832
  if (typeof projectId === 'undefined') {
881
1833
  throw new AppwriteException('Missing required parameter: "projectId"');
882
1834
  }
883
1835
  if (typeof scopes === 'undefined') {
884
1836
  throw new AppwriteException('Missing required parameter: "scopes"');
885
1837
  }
1838
+
886
1839
  const apiPath = '/projects/{projectId}/jwts'.replace('{projectId}', projectId);
887
1840
  const payload: Payload = {};
888
1841
  if (typeof scopes !== 'undefined') {
@@ -908,16 +1861,49 @@ export class Projects {
908
1861
  /**
909
1862
  * Get a list of all API keys from the current project.
910
1863
  *
911
- * @param {string} projectId
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>;
1870
+ /**
1871
+ * Get a list of all API keys from the current project.
1872
+ *
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.
912
1875
  * @throws {AppwriteException}
913
1876
  * @returns {Promise<Models.KeyList>}
1877
+ * @deprecated Use the object parameter style method for a better developer experience.
914
1878
  */
915
- 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
+
916
1898
  if (typeof projectId === 'undefined') {
917
1899
  throw new AppwriteException('Missing required parameter: "projectId"');
918
1900
  }
1901
+
919
1902
  const apiPath = '/projects/{projectId}/keys'.replace('{projectId}', projectId);
920
1903
  const payload: Payload = {};
1904
+ if (typeof total !== 'undefined') {
1905
+ payload['total'] = total;
1906
+ }
921
1907
  const uri = new URL(this.client.config.endpoint + apiPath);
922
1908
 
923
1909
  const apiHeaders: { [header: string]: string } = {
@@ -932,16 +1918,50 @@ export class Projects {
932
1918
  }
933
1919
 
934
1920
  /**
935
- * Create a new API key. It&#039;s recommended to have multiple API keys with strict scopes for separate functions within your project.
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>;
1931
+ /**
1932
+ * Create a new API key. It's recommended to have multiple API keys with strict scopes for separate functions within your project.
936
1933
  *
937
- * @param {string} projectId
938
- * @param {string} name
939
- * @param {string[]} scopes
940
- * @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.
941
1938
  * @throws {AppwriteException}
942
1939
  * @returns {Promise<Models.Key>}
1940
+ * @deprecated Use the object parameter style method for a better developer experience.
943
1941
  */
944
- 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
+
945
1965
  if (typeof projectId === 'undefined') {
946
1966
  throw new AppwriteException('Missing required parameter: "projectId"');
947
1967
  }
@@ -951,6 +1971,7 @@ export class Projects {
951
1971
  if (typeof scopes === 'undefined') {
952
1972
  throw new AppwriteException('Missing required parameter: "scopes"');
953
1973
  }
1974
+
954
1975
  const apiPath = '/projects/{projectId}/keys'.replace('{projectId}', projectId);
955
1976
  const payload: Payload = {};
956
1977
  if (typeof name !== 'undefined') {
@@ -977,20 +1998,49 @@ export class Projects {
977
1998
  }
978
1999
 
979
2000
  /**
980
- * Get a key by its unique ID. This endpoint returns details about a specific API key in your project including it&#039;s scopes.
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>;
2009
+ /**
2010
+ * Get a key by its unique ID. This endpoint returns details about a specific API key in your project including it's scopes.
981
2011
  *
982
- * @param {string} projectId
983
- * @param {string} keyId
2012
+ * @param {string} projectId - Project unique ID.
2013
+ * @param {string} keyId - Key unique ID.
984
2014
  * @throws {AppwriteException}
985
2015
  * @returns {Promise<Models.Key>}
2016
+ * @deprecated Use the object parameter style method for a better developer experience.
986
2017
  */
987
- 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
+
988
2037
  if (typeof projectId === 'undefined') {
989
2038
  throw new AppwriteException('Missing required parameter: "projectId"');
990
2039
  }
991
2040
  if (typeof keyId === 'undefined') {
992
2041
  throw new AppwriteException('Missing required parameter: "keyId"');
993
2042
  }
2043
+
994
2044
  const apiPath = '/projects/{projectId}/keys/{keyId}'.replace('{projectId}', projectId).replace('{keyId}', keyId);
995
2045
  const payload: Payload = {};
996
2046
  const uri = new URL(this.client.config.endpoint + apiPath);
@@ -1009,15 +2059,52 @@ export class Projects {
1009
2059
  /**
1010
2060
  * Update a key by its unique ID. Use this endpoint to update the name, scopes, or expiration time of an API key.
1011
2061
  *
1012
- * @param {string} projectId
1013
- * @param {string} keyId
1014
- * @param {string} name
1015
- * @param {string[]} scopes
1016
- * @param {string} expire
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>;
2071
+ /**
2072
+ * Update a key by its unique ID. Use this endpoint to update the name, scopes, or expiration time of an API key.
2073
+ *
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.
1017
2079
  * @throws {AppwriteException}
1018
2080
  * @returns {Promise<Models.Key>}
2081
+ * @deprecated Use the object parameter style method for a better developer experience.
1019
2082
  */
1020
- 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
+
1021
2108
  if (typeof projectId === 'undefined') {
1022
2109
  throw new AppwriteException('Missing required parameter: "projectId"');
1023
2110
  }
@@ -1030,6 +2117,7 @@ export class Projects {
1030
2117
  if (typeof scopes === 'undefined') {
1031
2118
  throw new AppwriteException('Missing required parameter: "scopes"');
1032
2119
  }
2120
+
1033
2121
  const apiPath = '/projects/{projectId}/keys/{keyId}'.replace('{projectId}', projectId).replace('{keyId}', keyId);
1034
2122
  const payload: Payload = {};
1035
2123
  if (typeof name !== 'undefined') {
@@ -1058,18 +2146,47 @@ export class Projects {
1058
2146
  /**
1059
2147
  * Delete a key by its unique ID. Once deleted, the key can no longer be used to authenticate API calls.
1060
2148
  *
1061
- * @param {string} projectId
1062
- * @param {string} keyId
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<{}>;
2155
+ /**
2156
+ * Delete a key by its unique ID. Once deleted, the key can no longer be used to authenticate API calls.
2157
+ *
2158
+ * @param {string} projectId - Project unique ID.
2159
+ * @param {string} keyId - Key unique ID.
1063
2160
  * @throws {AppwriteException}
1064
2161
  * @returns {Promise<{}>}
2162
+ * @deprecated Use the object parameter style method for a better developer experience.
1065
2163
  */
1066
- 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
+
1067
2183
  if (typeof projectId === 'undefined') {
1068
2184
  throw new AppwriteException('Missing required parameter: "projectId"');
1069
2185
  }
1070
2186
  if (typeof keyId === 'undefined') {
1071
2187
  throw new AppwriteException('Missing required parameter: "keyId"');
1072
2188
  }
2189
+
1073
2190
  const apiPath = '/projects/{projectId}/keys/{keyId}'.replace('{projectId}', projectId).replace('{keyId}', keyId);
1074
2191
  const payload: Payload = {};
1075
2192
  const uri = new URL(this.client.config.endpoint + apiPath);
@@ -1089,21 +2206,59 @@ export class Projects {
1089
2206
  /**
1090
2207
  * Update the OAuth2 provider configurations. Use this endpoint to set up or update the OAuth2 provider credentials or enable/disable providers.
1091
2208
  *
1092
- * @param {string} projectId
1093
- * @param {OAuthProvider} provider
1094
- * @param {string} appId
1095
- * @param {string} secret
1096
- * @param {boolean} enabled
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>;
2218
+ /**
2219
+ * Update the OAuth2 provider configurations. Use this endpoint to set up or update the OAuth2 provider credentials or enable/disable providers.
2220
+ *
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.
1097
2226
  * @throws {AppwriteException}
1098
2227
  * @returns {Promise<Models.Project>}
2228
+ * @deprecated Use the object parameter style method for a better developer experience.
1099
2229
  */
1100
- 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
+
1101
2255
  if (typeof projectId === 'undefined') {
1102
2256
  throw new AppwriteException('Missing required parameter: "projectId"');
1103
2257
  }
1104
2258
  if (typeof provider === 'undefined') {
1105
2259
  throw new AppwriteException('Missing required parameter: "provider"');
1106
2260
  }
2261
+
1107
2262
  const apiPath = '/projects/{projectId}/oauth2'.replace('{projectId}', projectId);
1108
2263
  const payload: Payload = {};
1109
2264
  if (typeof provider !== 'undefined') {
@@ -1135,16 +2290,49 @@ export class Projects {
1135
2290
  /**
1136
2291
  * Get a list of all platforms in the project. This endpoint returns an array of all platforms and their configurations.
1137
2292
  *
1138
- * @param {string} projectId
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>;
2299
+ /**
2300
+ * Get a list of all platforms in the project. This endpoint returns an array of all platforms and their configurations.
2301
+ *
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.
1139
2304
  * @throws {AppwriteException}
1140
2305
  * @returns {Promise<Models.PlatformList>}
2306
+ * @deprecated Use the object parameter style method for a better developer experience.
1141
2307
  */
1142
- 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
+
1143
2327
  if (typeof projectId === 'undefined') {
1144
2328
  throw new AppwriteException('Missing required parameter: "projectId"');
1145
2329
  }
2330
+
1146
2331
  const apiPath = '/projects/{projectId}/platforms'.replace('{projectId}', projectId);
1147
2332
  const payload: Payload = {};
2333
+ if (typeof total !== 'undefined') {
2334
+ payload['total'] = total;
2335
+ }
1148
2336
  const uri = new URL(this.client.config.endpoint + apiPath);
1149
2337
 
1150
2338
  const apiHeaders: { [header: string]: string } = {
@@ -1161,16 +2349,56 @@ export class Projects {
1161
2349
  /**
1162
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.
1163
2351
  *
1164
- * @param {string} projectId
1165
- * @param {PlatformType} type
1166
- * @param {string} name
1167
- * @param {string} key
1168
- * @param {string} store
1169
- * @param {string} hostname
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>;
2362
+ /**
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.
2364
+ *
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.
1170
2371
  * @throws {AppwriteException}
1171
2372
  * @returns {Promise<Models.Platform>}
2373
+ * @deprecated Use the object parameter style method for a better developer experience.
1172
2374
  */
1173
- 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
+
1174
2402
  if (typeof projectId === 'undefined') {
1175
2403
  throw new AppwriteException('Missing required parameter: "projectId"');
1176
2404
  }
@@ -1180,6 +2408,7 @@ export class Projects {
1180
2408
  if (typeof name === 'undefined') {
1181
2409
  throw new AppwriteException('Missing required parameter: "name"');
1182
2410
  }
2411
+
1183
2412
  const apiPath = '/projects/{projectId}/platforms'.replace('{projectId}', projectId);
1184
2413
  const payload: Payload = {};
1185
2414
  if (typeof type !== 'undefined') {
@@ -1212,20 +2441,49 @@ export class Projects {
1212
2441
  }
1213
2442
 
1214
2443
  /**
1215
- * Get a platform by its unique ID. This endpoint returns the platform&#039;s details, including its name, type, and key configurations.
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>;
2452
+ /**
2453
+ * Get a platform by its unique ID. This endpoint returns the platform's details, including its name, type, and key configurations.
1216
2454
  *
1217
- * @param {string} projectId
1218
- * @param {string} platformId
2455
+ * @param {string} projectId - Project unique ID.
2456
+ * @param {string} platformId - Platform unique ID.
1219
2457
  * @throws {AppwriteException}
1220
2458
  * @returns {Promise<Models.Platform>}
2459
+ * @deprecated Use the object parameter style method for a better developer experience.
1221
2460
  */
1222
- 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
+
1223
2480
  if (typeof projectId === 'undefined') {
1224
2481
  throw new AppwriteException('Missing required parameter: "projectId"');
1225
2482
  }
1226
2483
  if (typeof platformId === 'undefined') {
1227
2484
  throw new AppwriteException('Missing required parameter: "platformId"');
1228
2485
  }
2486
+
1229
2487
  const apiPath = '/projects/{projectId}/platforms/{platformId}'.replace('{projectId}', projectId).replace('{platformId}', platformId);
1230
2488
  const payload: Payload = {};
1231
2489
  const uri = new URL(this.client.config.endpoint + apiPath);
@@ -1242,18 +2500,58 @@ export class Projects {
1242
2500
  }
1243
2501
 
1244
2502
  /**
1245
- * Update a platform by its unique ID. Use this endpoint to update the platform&#039;s name, key, platform store ID, or hostname.
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>;
2515
+ /**
2516
+ * Update a platform by its unique ID. Use this endpoint to update the platform's name, key, platform store ID, or hostname.
1246
2517
  *
1247
- * @param {string} projectId
1248
- * @param {string} platformId
1249
- * @param {string} name
1250
- * @param {string} key
1251
- * @param {string} store
1252
- * @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.
1253
2524
  * @throws {AppwriteException}
1254
2525
  * @returns {Promise<Models.Platform>}
2526
+ * @deprecated Use the object parameter style method for a better developer experience.
1255
2527
  */
1256
- 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
+
1257
2555
  if (typeof projectId === 'undefined') {
1258
2556
  throw new AppwriteException('Missing required parameter: "projectId"');
1259
2557
  }
@@ -1263,6 +2561,7 @@ export class Projects {
1263
2561
  if (typeof name === 'undefined') {
1264
2562
  throw new AppwriteException('Missing required parameter: "name"');
1265
2563
  }
2564
+
1266
2565
  const apiPath = '/projects/{projectId}/platforms/{platformId}'.replace('{projectId}', projectId).replace('{platformId}', platformId);
1267
2566
  const payload: Payload = {};
1268
2567
  if (typeof name !== 'undefined') {
@@ -1294,18 +2593,47 @@ export class Projects {
1294
2593
  /**
1295
2594
  * Delete a platform by its unique ID. This endpoint removes the platform and all its configurations from the project.
1296
2595
  *
1297
- * @param {string} projectId
1298
- * @param {string} platformId
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<{}>;
2602
+ /**
2603
+ * Delete a platform by its unique ID. This endpoint removes the platform and all its configurations from the project.
2604
+ *
2605
+ * @param {string} projectId - Project unique ID.
2606
+ * @param {string} platformId - Platform unique ID.
1299
2607
  * @throws {AppwriteException}
1300
2608
  * @returns {Promise<{}>}
2609
+ * @deprecated Use the object parameter style method for a better developer experience.
1301
2610
  */
1302
- 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
+
1303
2630
  if (typeof projectId === 'undefined') {
1304
2631
  throw new AppwriteException('Missing required parameter: "projectId"');
1305
2632
  }
1306
2633
  if (typeof platformId === 'undefined') {
1307
2634
  throw new AppwriteException('Missing required parameter: "platformId"');
1308
2635
  }
2636
+
1309
2637
  const apiPath = '/projects/{projectId}/platforms/{platformId}'.replace('{projectId}', projectId).replace('{platformId}', platformId);
1310
2638
  const payload: Payload = {};
1311
2639
  const uri = new URL(this.client.config.endpoint + apiPath);
@@ -1325,13 +2653,44 @@ export class Projects {
1325
2653
  /**
1326
2654
  * Update the status of a specific service. Use this endpoint to enable or disable a service in your project.
1327
2655
  *
1328
- * @param {string} projectId
1329
- * @param {ApiService} service
1330
- * @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.
2659
+ * @throws {AppwriteException}
2660
+ * @returns {Promise<Models.Project>}
2661
+ */
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.
1331
2669
  * @throws {AppwriteException}
1332
2670
  * @returns {Promise<Models.Project>}
2671
+ * @deprecated Use the object parameter style method for a better developer experience.
1333
2672
  */
1334
- updateServiceStatus(projectId: string, service: ApiService, status: boolean): Promise<Models.Project> {
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
+
1335
2694
  if (typeof projectId === 'undefined') {
1336
2695
  throw new AppwriteException('Missing required parameter: "projectId"');
1337
2696
  }
@@ -1341,6 +2700,7 @@ export class Projects {
1341
2700
  if (typeof status === 'undefined') {
1342
2701
  throw new AppwriteException('Missing required parameter: "status"');
1343
2702
  }
2703
+
1344
2704
  const apiPath = '/projects/{projectId}/service'.replace('{projectId}', projectId);
1345
2705
  const payload: Payload = {};
1346
2706
  if (typeof service !== 'undefined') {
@@ -1366,18 +2726,47 @@ export class Projects {
1366
2726
  /**
1367
2727
  * Update the status of all services. Use this endpoint to enable or disable all optional services at once.
1368
2728
  *
1369
- * @param {string} projectId
1370
- * @param {boolean} status
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>;
2735
+ /**
2736
+ * Update the status of all services. Use this endpoint to enable or disable all optional services at once.
2737
+ *
2738
+ * @param {string} projectId - Project unique ID.
2739
+ * @param {boolean} status - Service status.
1371
2740
  * @throws {AppwriteException}
1372
2741
  * @returns {Promise<Models.Project>}
2742
+ * @deprecated Use the object parameter style method for a better developer experience.
1373
2743
  */
1374
- 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
+
1375
2763
  if (typeof projectId === 'undefined') {
1376
2764
  throw new AppwriteException('Missing required parameter: "projectId"');
1377
2765
  }
1378
2766
  if (typeof status === 'undefined') {
1379
2767
  throw new AppwriteException('Missing required parameter: "status"');
1380
2768
  }
2769
+
1381
2770
  const apiPath = '/projects/{projectId}/service/all'.replace('{projectId}', projectId);
1382
2771
  const payload: Payload = {};
1383
2772
  if (typeof status !== 'undefined') {
@@ -1398,28 +2787,201 @@ export class Projects {
1398
2787
  }
1399
2788
 
1400
2789
  /**
1401
- * 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.
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>;
2807
+ /**
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.
2809
+ *
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
2820
+ * @throws {AppwriteException}
2821
+ * @returns {Promise<Models.Project>}
2822
+ * @deprecated Use the object parameter style method for a better developer experience.
2823
+ */
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
+
2859
+ if (typeof projectId === 'undefined') {
2860
+ throw new AppwriteException('Missing required parameter: "projectId"');
2861
+ }
2862
+ if (typeof enabled === 'undefined') {
2863
+ throw new AppwriteException('Missing required parameter: "enabled"');
2864
+ }
2865
+
2866
+ const apiPath = '/projects/{projectId}/smtp'.replace('{projectId}', projectId);
2867
+ const payload: Payload = {};
2868
+ if (typeof enabled !== 'undefined') {
2869
+ payload['enabled'] = enabled;
2870
+ }
2871
+ if (typeof senderName !== 'undefined') {
2872
+ payload['senderName'] = senderName;
2873
+ }
2874
+ if (typeof senderEmail !== 'undefined') {
2875
+ payload['senderEmail'] = senderEmail;
2876
+ }
2877
+ if (typeof replyTo !== 'undefined') {
2878
+ payload['replyTo'] = replyTo;
2879
+ }
2880
+ if (typeof host !== 'undefined') {
2881
+ payload['host'] = host;
2882
+ }
2883
+ if (typeof port !== 'undefined') {
2884
+ payload['port'] = port;
2885
+ }
2886
+ if (typeof username !== 'undefined') {
2887
+ payload['username'] = username;
2888
+ }
2889
+ if (typeof password !== 'undefined') {
2890
+ payload['password'] = password;
2891
+ }
2892
+ if (typeof secure !== 'undefined') {
2893
+ payload['secure'] = secure;
2894
+ }
2895
+ const uri = new URL(this.client.config.endpoint + apiPath);
2896
+
2897
+ const apiHeaders: { [header: string]: string } = {
2898
+ 'content-type': 'application/json',
2899
+ }
2900
+
2901
+ return this.client.call(
2902
+ 'patch',
2903
+ uri,
2904
+ apiHeaders,
2905
+ payload
2906
+ );
2907
+ }
2908
+
2909
+ /**
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.
2911
+ *
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
2922
+ * @throws {AppwriteException}
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.
1402
2928
  *
1403
- * @param {string} projectId
1404
- * @param {boolean} enabled
1405
- * @param {string} senderName
1406
- * @param {string} senderEmail
1407
- * @param {string} replyTo
1408
- * @param {string} host
1409
- * @param {number} port
1410
- * @param {string} username
1411
- * @param {string} password
1412
- * @param {SMTPSecure} secure
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
1413
2939
  * @throws {AppwriteException}
1414
2940
  * @returns {Promise<Models.Project>}
2941
+ * @deprecated Use the object parameter style method for a better developer experience.
1415
2942
  */
1416
- updateSmtp(projectId: string, enabled: boolean, senderName?: string, senderEmail?: string, replyTo?: string, host?: string, port?: number, username?: string, password?: string, secure?: SMTPSecure): Promise<Models.Project> {
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
+
1417
2978
  if (typeof projectId === 'undefined') {
1418
2979
  throw new AppwriteException('Missing required parameter: "projectId"');
1419
2980
  }
1420
2981
  if (typeof enabled === 'undefined') {
1421
2982
  throw new AppwriteException('Missing required parameter: "enabled"');
1422
2983
  }
2984
+
1423
2985
  const apiPath = '/projects/{projectId}/smtp'.replace('{projectId}', projectId);
1424
2986
  const payload: Payload = {};
1425
2987
  if (typeof enabled !== 'undefined') {
@@ -1466,20 +3028,73 @@ export class Projects {
1466
3028
  /**
1467
3029
  * Send a test email to verify SMTP configuration.
1468
3030
  *
1469
- * @param {string} projectId
1470
- * @param {string[]} emails
1471
- * @param {string} senderName
1472
- * @param {string} senderEmail
1473
- * @param {string} host
1474
- * @param {string} replyTo
1475
- * @param {number} port
1476
- * @param {string} username
1477
- * @param {string} password
1478
- * @param {SMTPSecure} secure
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
1479
3041
  * @throws {AppwriteException}
1480
3042
  * @returns {Promise<{}>}
3043
+ * @deprecated This API has been deprecated since 1.8.0. Please use `Projects.createSMTPTest` instead.
1481
3044
  */
1482
- createSmtpTest(projectId: string, emails: string[], senderName: string, senderEmail: string, host: string, replyTo?: string, port?: number, username?: string, password?: string, secure?: SMTPSecure): Promise<{}> {
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
+
1483
3098
  if (typeof projectId === 'undefined') {
1484
3099
  throw new AppwriteException('Missing required parameter: "projectId"');
1485
3100
  }
@@ -1495,6 +3110,7 @@ export class Projects {
1495
3110
  if (typeof host === 'undefined') {
1496
3111
  throw new AppwriteException('Missing required parameter: "host"');
1497
3112
  }
3113
+
1498
3114
  const apiPath = '/projects/{projectId}/smtp/tests'.replace('{projectId}', projectId);
1499
3115
  const payload: Payload = {};
1500
3116
  if (typeof emails !== 'undefined') {
@@ -1539,20 +3155,240 @@ export class Projects {
1539
3155
  }
1540
3156
 
1541
3157
  /**
1542
- * Update the team ID of a project allowing for it to be transferred to another team.
3158
+ * Send a test email to verify SMTP configuration.
1543
3159
  *
1544
- * @param {string} projectId
1545
- * @param {string} teamId
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
1546
3170
  * @throws {AppwriteException}
1547
- * @returns {Promise<Models.Project>}
3171
+ * @returns {Promise<{}>}
1548
3172
  */
1549
- updateTeam(projectId: string, teamId: string): Promise<Models.Project> {
1550
- if (typeof projectId === 'undefined') {
1551
- throw new AppwriteException('Missing required parameter: "projectId"');
1552
- }
1553
- if (typeof teamId === 'undefined') {
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"');
3387
+ }
3388
+ if (typeof teamId === 'undefined') {
1554
3389
  throw new AppwriteException('Missing required parameter: "teamId"');
1555
3390
  }
3391
+
1556
3392
  const apiPath = '/projects/{projectId}/team'.replace('{projectId}', projectId);
1557
3393
  const payload: Payload = {};
1558
3394
  if (typeof teamId !== 'undefined') {
@@ -1575,13 +3411,44 @@ export class Projects {
1575
3411
  /**
1576
3412
  * Get a custom email template for the specified locale and type. This endpoint returns the template content, subject, and other configuration details.
1577
3413
  *
1578
- * @param {string} projectId
1579
- * @param {EmailTemplateType} type
1580
- * @param {EmailTemplateLocale} locale
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>;
3421
+ /**
3422
+ * Get a custom email template for the specified locale and type. This endpoint returns the template content, subject, and other configuration details.
3423
+ *
3424
+ * @param {string} projectId - Project unique ID.
3425
+ * @param {EmailTemplateType} type - Template type
3426
+ * @param {EmailTemplateLocale} locale - Template locale
1581
3427
  * @throws {AppwriteException}
1582
3428
  * @returns {Promise<Models.EmailTemplate>}
3429
+ * @deprecated Use the object parameter style method for a better developer experience.
1583
3430
  */
1584
- 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
+
1585
3452
  if (typeof projectId === 'undefined') {
1586
3453
  throw new AppwriteException('Missing required parameter: "projectId"');
1587
3454
  }
@@ -1591,6 +3458,7 @@ export class Projects {
1591
3458
  if (typeof locale === 'undefined') {
1592
3459
  throw new AppwriteException('Missing required parameter: "locale"');
1593
3460
  }
3461
+
1594
3462
  const apiPath = '/projects/{projectId}/templates/email/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale);
1595
3463
  const payload: Payload = {};
1596
3464
  const uri = new URL(this.client.config.endpoint + apiPath);
@@ -1609,18 +3477,64 @@ export class Projects {
1609
3477
  /**
1610
3478
  * Update a custom email template for the specified locale and type. Use this endpoint to modify the content of your email templates.
1611
3479
  *
1612
- * @param {string} projectId
1613
- * @param {EmailTemplateType} type
1614
- * @param {EmailTemplateLocale} locale
1615
- * @param {string} subject
1616
- * @param {string} message
1617
- * @param {string} senderName
1618
- * @param {string} senderEmail
1619
- * @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
1620
3488
  * @throws {AppwriteException}
1621
3489
  * @returns {Promise<Models.EmailTemplate>}
1622
3490
  */
1623
- 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
+
1624
3538
  if (typeof projectId === 'undefined') {
1625
3539
  throw new AppwriteException('Missing required parameter: "projectId"');
1626
3540
  }
@@ -1636,6 +3550,7 @@ export class Projects {
1636
3550
  if (typeof message === 'undefined') {
1637
3551
  throw new AppwriteException('Missing required parameter: "message"');
1638
3552
  }
3553
+
1639
3554
  const apiPath = '/projects/{projectId}/templates/email/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale);
1640
3555
  const payload: Payload = {};
1641
3556
  if (typeof subject !== 'undefined') {
@@ -1670,13 +3585,44 @@ export class Projects {
1670
3585
  /**
1671
3586
  * Reset a custom email template to its default value. This endpoint removes any custom content and restores the template to its original state.
1672
3587
  *
1673
- * @param {string} projectId
1674
- * @param {EmailTemplateType} type
1675
- * @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
1676
3591
  * @throws {AppwriteException}
1677
3592
  * @returns {Promise<Models.EmailTemplate>}
1678
3593
  */
1679
- 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
+
1680
3626
  if (typeof projectId === 'undefined') {
1681
3627
  throw new AppwriteException('Missing required parameter: "projectId"');
1682
3628
  }
@@ -1686,6 +3632,7 @@ export class Projects {
1686
3632
  if (typeof locale === 'undefined') {
1687
3633
  throw new AppwriteException('Missing required parameter: "locale"');
1688
3634
  }
3635
+
1689
3636
  const apiPath = '/projects/{projectId}/templates/email/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale);
1690
3637
  const payload: Payload = {};
1691
3638
  const uri = new URL(this.client.config.endpoint + apiPath);
@@ -1703,15 +3650,113 @@ export class Projects {
1703
3650
  }
1704
3651
 
1705
3652
  /**
1706
- * Get a custom SMS template for the specified locale and type returning it&#039;s contents.
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>;
3663
+ /**
3664
+ * Get a custom SMS template for the specified locale and type returning it's contents.
3665
+ *
3666
+ * @param {string} projectId - Project unique ID.
3667
+ * @param {SmsTemplateType} type - Template type
3668
+ * @param {SmsTemplateLocale} locale - Template locale
3669
+ * @throws {AppwriteException}
3670
+ * @returns {Promise<Models.SmsTemplate>}
3671
+ * @deprecated Use the object parameter style method for a better developer experience.
3672
+ */
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
+
3694
+ if (typeof projectId === 'undefined') {
3695
+ throw new AppwriteException('Missing required parameter: "projectId"');
3696
+ }
3697
+ if (typeof type === 'undefined') {
3698
+ throw new AppwriteException('Missing required parameter: "type"');
3699
+ }
3700
+ if (typeof locale === 'undefined') {
3701
+ throw new AppwriteException('Missing required parameter: "locale"');
3702
+ }
3703
+
3704
+ const apiPath = '/projects/{projectId}/templates/sms/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale);
3705
+ const payload: Payload = {};
3706
+ const uri = new URL(this.client.config.endpoint + apiPath);
3707
+
3708
+ const apiHeaders: { [header: string]: string } = {
3709
+ }
3710
+
3711
+ return this.client.call(
3712
+ 'get',
3713
+ uri,
3714
+ apiHeaders,
3715
+ payload
3716
+ );
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.
1707
3731
  *
1708
- * @param {string} projectId
1709
- * @param {SmsTemplateType} type
1710
- * @param {SmsTemplateLocale} locale
3732
+ * @param {string} projectId - Project unique ID.
3733
+ * @param {SmsTemplateType} type - Template type
3734
+ * @param {SmsTemplateLocale} locale - Template locale
1711
3735
  * @throws {AppwriteException}
1712
3736
  * @returns {Promise<Models.SmsTemplate>}
3737
+ * @deprecated Use the object parameter style method for a better developer experience.
1713
3738
  */
1714
- getSmsTemplate(projectId: string, type: SmsTemplateType, locale: SmsTemplateLocale): Promise<Models.SmsTemplate> {
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
+
1715
3760
  if (typeof projectId === 'undefined') {
1716
3761
  throw new AppwriteException('Missing required parameter: "projectId"');
1717
3762
  }
@@ -1721,6 +3766,7 @@ export class Projects {
1721
3766
  if (typeof locale === 'undefined') {
1722
3767
  throw new AppwriteException('Missing required parameter: "locale"');
1723
3768
  }
3769
+
1724
3770
  const apiPath = '/projects/{projectId}/templates/sms/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale);
1725
3771
  const payload: Payload = {};
1726
3772
  const uri = new URL(this.client.config.endpoint + apiPath);
@@ -1739,14 +3785,126 @@ export class Projects {
1739
3785
  /**
1740
3786
  * Update a custom SMS template for the specified locale and type. Use this endpoint to modify the content of your SMS templates.
1741
3787
  *
1742
- * @param {string} projectId
1743
- * @param {SmsTemplateType} type
1744
- * @param {SmsTemplateLocale} locale
1745
- * @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
3792
+ * @throws {AppwriteException}
3793
+ * @returns {Promise<Models.SmsTemplate>}
3794
+ * @deprecated This API has been deprecated since 1.8.0. Please use `Projects.updateSMSTemplate` instead.
3795
+ */
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
+
3831
+ if (typeof projectId === 'undefined') {
3832
+ throw new AppwriteException('Missing required parameter: "projectId"');
3833
+ }
3834
+ if (typeof type === 'undefined') {
3835
+ throw new AppwriteException('Missing required parameter: "type"');
3836
+ }
3837
+ if (typeof locale === 'undefined') {
3838
+ throw new AppwriteException('Missing required parameter: "locale"');
3839
+ }
3840
+ if (typeof message === 'undefined') {
3841
+ throw new AppwriteException('Missing required parameter: "message"');
3842
+ }
3843
+
3844
+ const apiPath = '/projects/{projectId}/templates/sms/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale);
3845
+ const payload: Payload = {};
3846
+ if (typeof message !== 'undefined') {
3847
+ payload['message'] = message;
3848
+ }
3849
+ const uri = new URL(this.client.config.endpoint + apiPath);
3850
+
3851
+ const apiHeaders: { [header: string]: string } = {
3852
+ 'content-type': 'application/json',
3853
+ }
3854
+
3855
+ return this.client.call(
3856
+ 'patch',
3857
+ uri,
3858
+ apiHeaders,
3859
+ payload
3860
+ );
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
1746
3870
  * @throws {AppwriteException}
1747
3871
  * @returns {Promise<Models.SmsTemplate>}
1748
3872
  */
1749
- updateSmsTemplate(projectId: string, type: SmsTemplateType, locale: SmsTemplateLocale, message: string): Promise<Models.SmsTemplate> {
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
+
1750
3908
  if (typeof projectId === 'undefined') {
1751
3909
  throw new AppwriteException('Missing required parameter: "projectId"');
1752
3910
  }
@@ -1759,6 +3917,7 @@ export class Projects {
1759
3917
  if (typeof message === 'undefined') {
1760
3918
  throw new AppwriteException('Missing required parameter: "message"');
1761
3919
  }
3920
+
1762
3921
  const apiPath = '/projects/{projectId}/templates/sms/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale);
1763
3922
  const payload: Payload = {};
1764
3923
  if (typeof message !== 'undefined') {
@@ -1781,13 +3940,112 @@ export class Projects {
1781
3940
  /**
1782
3941
  * Reset a custom SMS template to its default value. This endpoint removes any custom message and restores the template to its original state.
1783
3942
  *
1784
- * @param {string} projectId
1785
- * @param {SmsTemplateType} type
1786
- * @param {SmsTemplateLocale} locale
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
+
4008
+ /**
4009
+ * Reset a custom SMS template to its default value. This endpoint removes any custom message and restores the template to its original state.
4010
+ *
4011
+ * @param {string} params.projectId - Project unique ID.
4012
+ * @param {SmsTemplateType} params.type - Template type
4013
+ * @param {SmsTemplateLocale} params.locale - Template locale
1787
4014
  * @throws {AppwriteException}
1788
4015
  * @returns {Promise<Models.SmsTemplate>}
1789
4016
  */
1790
- 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
+
1791
4049
  if (typeof projectId === 'undefined') {
1792
4050
  throw new AppwriteException('Missing required parameter: "projectId"');
1793
4051
  }
@@ -1797,6 +4055,7 @@ export class Projects {
1797
4055
  if (typeof locale === 'undefined') {
1798
4056
  throw new AppwriteException('Missing required parameter: "locale"');
1799
4057
  }
4058
+
1800
4059
  const apiPath = '/projects/{projectId}/templates/sms/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale);
1801
4060
  const payload: Payload = {};
1802
4061
  const uri = new URL(this.client.config.endpoint + apiPath);
@@ -1816,16 +4075,49 @@ export class Projects {
1816
4075
  /**
1817
4076
  * Get a list of all webhooks belonging to the project. You can use the query params to filter your results.
1818
4077
  *
1819
- * @param {string} projectId
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>;
4084
+ /**
4085
+ * Get a list of all webhooks belonging to the project. You can use the query params to filter your results.
4086
+ *
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.
1820
4089
  * @throws {AppwriteException}
1821
4090
  * @returns {Promise<Models.WebhookList>}
4091
+ * @deprecated Use the object parameter style method for a better developer experience.
1822
4092
  */
1823
- 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
+
1824
4112
  if (typeof projectId === 'undefined') {
1825
4113
  throw new AppwriteException('Missing required parameter: "projectId"');
1826
4114
  }
4115
+
1827
4116
  const apiPath = '/projects/{projectId}/webhooks'.replace('{projectId}', projectId);
1828
4117
  const payload: Payload = {};
4118
+ if (typeof total !== 'undefined') {
4119
+ payload['total'] = total;
4120
+ }
1829
4121
  const uri = new URL(this.client.config.endpoint + apiPath);
1830
4122
 
1831
4123
  const apiHeaders: { [header: string]: string } = {
@@ -1842,18 +4134,64 @@ export class Projects {
1842
4134
  /**
1843
4135
  * Create a new webhook. Use this endpoint to configure a URL that will receive events from Appwrite when specific events occur.
1844
4136
  *
1845
- * @param {string} projectId
1846
- * @param {string} name
1847
- * @param {string[]} events
1848
- * @param {string} url
1849
- * @param {boolean} security
1850
- * @param {boolean} enabled
1851
- * @param {string} httpUser
1852
- * @param {string} httpPass
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.
1853
4145
  * @throws {AppwriteException}
1854
4146
  * @returns {Promise<Models.Webhook>}
1855
4147
  */
1856
- createWebhook(projectId: string, name: string, events: string[], url: string, security: boolean, enabled?: boolean, httpUser?: string, httpPass?: string): Promise<Models.Webhook> {
4148
+ createWebhook(params: { projectId: string, name: string, events: string[], url: string, security: boolean, enabled?: boolean, httpUser?: string, httpPass?: string }): Promise<Models.Webhook>;
4149
+ /**
4150
+ * Create a new webhook. Use this endpoint to configure a URL that will receive events from Appwrite when specific events occur.
4151
+ *
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.
4160
+ * @throws {AppwriteException}
4161
+ * @returns {Promise<Models.Webhook>}
4162
+ * @deprecated Use the object parameter style method for a better developer experience.
4163
+ */
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
+
1857
4195
  if (typeof projectId === 'undefined') {
1858
4196
  throw new AppwriteException('Missing required parameter: "projectId"');
1859
4197
  }
@@ -1869,6 +4207,7 @@ export class Projects {
1869
4207
  if (typeof security === 'undefined') {
1870
4208
  throw new AppwriteException('Missing required parameter: "security"');
1871
4209
  }
4210
+
1872
4211
  const apiPath = '/projects/{projectId}/webhooks'.replace('{projectId}', projectId);
1873
4212
  const payload: Payload = {};
1874
4213
  if (typeof name !== 'undefined') {
@@ -1909,18 +4248,47 @@ export class Projects {
1909
4248
  /**
1910
4249
  * Get a webhook by its unique ID. This endpoint returns details about a specific webhook configured for a project.
1911
4250
  *
1912
- * @param {string} projectId
1913
- * @param {string} webhookId
4251
+ * @param {string} params.projectId - Project unique ID.
4252
+ * @param {string} params.webhookId - Webhook unique ID.
1914
4253
  * @throws {AppwriteException}
1915
4254
  * @returns {Promise<Models.Webhook>}
1916
4255
  */
1917
- 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
+
1918
4285
  if (typeof projectId === 'undefined') {
1919
4286
  throw new AppwriteException('Missing required parameter: "projectId"');
1920
4287
  }
1921
4288
  if (typeof webhookId === 'undefined') {
1922
4289
  throw new AppwriteException('Missing required parameter: "webhookId"');
1923
4290
  }
4291
+
1924
4292
  const apiPath = '/projects/{projectId}/webhooks/{webhookId}'.replace('{projectId}', projectId).replace('{webhookId}', webhookId);
1925
4293
  const payload: Payload = {};
1926
4294
  const uri = new URL(this.client.config.endpoint + apiPath);
@@ -1939,19 +4307,68 @@ export class Projects {
1939
4307
  /**
1940
4308
  * Update a webhook by its unique ID. Use this endpoint to update the URL, events, or status of an existing webhook.
1941
4309
  *
1942
- * @param {string} projectId
1943
- * @param {string} webhookId
1944
- * @param {string} name
1945
- * @param {string[]} events
1946
- * @param {string} url
1947
- * @param {boolean} security
1948
- * @param {boolean} enabled
1949
- * @param {string} httpUser
1950
- * @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.
4319
+ * @throws {AppwriteException}
4320
+ * @returns {Promise<Models.Webhook>}
4321
+ */
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.
1951
4335
  * @throws {AppwriteException}
1952
4336
  * @returns {Promise<Models.Webhook>}
4337
+ * @deprecated Use the object parameter style method for a better developer experience.
1953
4338
  */
1954
- updateWebhook(projectId: string, webhookId: string, name: string, events: string[], url: string, security: boolean, enabled?: boolean, httpUser?: string, httpPass?: string): Promise<Models.Webhook> {
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
+
1955
4372
  if (typeof projectId === 'undefined') {
1956
4373
  throw new AppwriteException('Missing required parameter: "projectId"');
1957
4374
  }
@@ -1970,6 +4387,7 @@ export class Projects {
1970
4387
  if (typeof security === 'undefined') {
1971
4388
  throw new AppwriteException('Missing required parameter: "security"');
1972
4389
  }
4390
+
1973
4391
  const apiPath = '/projects/{projectId}/webhooks/{webhookId}'.replace('{projectId}', projectId).replace('{webhookId}', webhookId);
1974
4392
  const payload: Payload = {};
1975
4393
  if (typeof name !== 'undefined') {
@@ -2010,18 +4428,47 @@ export class Projects {
2010
4428
  /**
2011
4429
  * Delete a webhook by its unique ID. Once deleted, the webhook will no longer receive project events.
2012
4430
  *
2013
- * @param {string} projectId
2014
- * @param {string} webhookId
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<{}>;
4437
+ /**
4438
+ * Delete a webhook by its unique ID. Once deleted, the webhook will no longer receive project events.
4439
+ *
4440
+ * @param {string} projectId - Project unique ID.
4441
+ * @param {string} webhookId - Webhook unique ID.
2015
4442
  * @throws {AppwriteException}
2016
4443
  * @returns {Promise<{}>}
4444
+ * @deprecated Use the object parameter style method for a better developer experience.
2017
4445
  */
2018
- 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
+
2019
4465
  if (typeof projectId === 'undefined') {
2020
4466
  throw new AppwriteException('Missing required parameter: "projectId"');
2021
4467
  }
2022
4468
  if (typeof webhookId === 'undefined') {
2023
4469
  throw new AppwriteException('Missing required parameter: "webhookId"');
2024
4470
  }
4471
+
2025
4472
  const apiPath = '/projects/{projectId}/webhooks/{webhookId}'.replace('{projectId}', projectId).replace('{webhookId}', webhookId);
2026
4473
  const payload: Payload = {};
2027
4474
  const uri = new URL(this.client.config.endpoint + apiPath);
@@ -2041,18 +4488,47 @@ export class Projects {
2041
4488
  /**
2042
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.
2043
4490
  *
2044
- * @param {string} projectId
2045
- * @param {string} webhookId
4491
+ * @param {string} params.projectId - Project unique ID.
4492
+ * @param {string} params.webhookId - Webhook unique ID.
4493
+ * @throws {AppwriteException}
4494
+ * @returns {Promise<Models.Webhook>}
4495
+ */
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.
2046
4502
  * @throws {AppwriteException}
2047
4503
  * @returns {Promise<Models.Webhook>}
4504
+ * @deprecated Use the object parameter style method for a better developer experience.
2048
4505
  */
2049
- updateWebhookSignature(projectId: string, webhookId: string): Promise<Models.Webhook> {
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
+
2050
4525
  if (typeof projectId === 'undefined') {
2051
4526
  throw new AppwriteException('Missing required parameter: "projectId"');
2052
4527
  }
2053
4528
  if (typeof webhookId === 'undefined') {
2054
4529
  throw new AppwriteException('Missing required parameter: "webhookId"');
2055
4530
  }
4531
+
2056
4532
  const apiPath = '/projects/{projectId}/webhooks/{webhookId}/signature'.replace('{projectId}', projectId).replace('{webhookId}', webhookId);
2057
4533
  const payload: Payload = {};
2058
4534
  const uri = new URL(this.client.config.endpoint + apiPath);