@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,11 +1,13 @@
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 { Framework } from '../enums/framework';
5
6
  import { BuildRuntime } from '../enums/build-runtime';
6
7
  import { Adapter } from '../enums/adapter';
7
- import { SiteUsageRange } from '../enums/site-usage-range';
8
- import { VCSDeploymentType } from '../enums/v-c-s-deployment-type';
8
+ import { UsageRange } from '../enums/usage-range';
9
+ import { TemplateReferenceType } from '../enums/template-reference-type';
10
+ import { VCSReferenceType } from '../enums/vcs-reference-type';
9
11
  import { DeploymentDownloadType } from '../enums/deployment-download-type';
10
12
 
11
13
  export class Sites {
@@ -16,14 +18,47 @@ export class Sites {
16
18
  }
17
19
 
18
20
  /**
19
- * Get a list of all the project's sites. You can use the query params to filter your results.
21
+ * Get a list of all the project's sites. You can use the query params to filter your results.
22
+ *
23
+ * @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, enabled, framework, deploymentId, buildCommand, installCommand, outputDirectory, installationId
24
+ * @param {string} params.search - Search term to filter your list results. Max length: 256 chars.
25
+ * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
26
+ * @throws {AppwriteException}
27
+ * @returns {Promise<Models.SiteList>}
28
+ */
29
+ list(params?: { queries?: string[], search?: string, total?: boolean }): Promise<Models.SiteList>;
30
+ /**
31
+ * Get a list of all the project's sites. You can use the query params to filter your results.
20
32
  *
21
- * @param {string[]} queries
22
- * @param {string} search
33
+ * @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, enabled, framework, deploymentId, buildCommand, installCommand, outputDirectory, installationId
34
+ * @param {string} search - Search term to filter your list results. Max length: 256 chars.
35
+ * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
23
36
  * @throws {AppwriteException}
24
37
  * @returns {Promise<Models.SiteList>}
38
+ * @deprecated Use the object parameter style method for a better developer experience.
25
39
  */
26
- list(queries?: string[], search?: string): Promise<Models.SiteList> {
40
+ list(queries?: string[], search?: string, total?: boolean): Promise<Models.SiteList>;
41
+ list(
42
+ paramsOrFirst?: { queries?: string[], search?: string, total?: boolean } | string[],
43
+ ...rest: [(string)?, (boolean)?]
44
+ ): Promise<Models.SiteList> {
45
+ let params: { queries?: string[], search?: string, total?: boolean };
46
+
47
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
48
+ params = (paramsOrFirst || {}) as { queries?: string[], search?: string, total?: boolean };
49
+ } else {
50
+ params = {
51
+ queries: paramsOrFirst as string[],
52
+ search: rest[0] as string,
53
+ total: rest[1] as boolean
54
+ };
55
+ }
56
+
57
+ const queries = params.queries;
58
+ const search = params.search;
59
+ const total = params.total;
60
+
61
+
27
62
  const apiPath = '/sites';
28
63
  const payload: Payload = {};
29
64
  if (typeof queries !== 'undefined') {
@@ -32,6 +67,9 @@ export class Sites {
32
67
  if (typeof search !== 'undefined') {
33
68
  payload['search'] = search;
34
69
  }
70
+ if (typeof total !== 'undefined') {
71
+ payload['total'] = total;
72
+ }
35
73
  const uri = new URL(this.client.config.endpoint + apiPath);
36
74
 
37
75
  const apiHeaders: { [header: string]: string } = {
@@ -48,28 +86,104 @@ export class Sites {
48
86
  /**
49
87
  * Create a new site.
50
88
  *
51
- * @param {string} siteId
52
- * @param {string} name
53
- * @param {Framework} framework
54
- * @param {BuildRuntime} buildRuntime
55
- * @param {boolean} enabled
56
- * @param {boolean} logging
57
- * @param {number} timeout
58
- * @param {string} installCommand
59
- * @param {string} buildCommand
60
- * @param {string} outputDirectory
61
- * @param {Adapter} adapter
62
- * @param {string} installationId
63
- * @param {string} fallbackFile
64
- * @param {string} providerRepositoryId
65
- * @param {string} providerBranch
66
- * @param {boolean} providerSilentMode
67
- * @param {string} providerRootDirectory
68
- * @param {string} specification
89
+ * @param {string} params.siteId - Site ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
90
+ * @param {string} params.name - Site name. Max length: 128 chars.
91
+ * @param {Framework} params.framework - Sites framework.
92
+ * @param {BuildRuntime} params.buildRuntime - Runtime to use during build step.
93
+ * @param {boolean} params.enabled - Is site enabled? When set to 'disabled', users cannot access the site but Server SDKs with and API key can still access the site. No data is lost when this is toggled.
94
+ * @param {boolean} params.logging - When disabled, request logs will exclude logs and errors, and site responses will be slightly faster.
95
+ * @param {number} params.timeout - Maximum request time in seconds.
96
+ * @param {string} params.installCommand - Install Command.
97
+ * @param {string} params.buildCommand - Build Command.
98
+ * @param {string} params.outputDirectory - Output Directory for site.
99
+ * @param {Adapter} params.adapter - Framework adapter defining rendering strategy. Allowed values are: static, ssr
100
+ * @param {string} params.installationId - Appwrite Installation ID for VCS (Version Control System) deployment.
101
+ * @param {string} params.fallbackFile - Fallback file for single page application sites.
102
+ * @param {string} params.providerRepositoryId - Repository ID of the repo linked to the site.
103
+ * @param {string} params.providerBranch - Production branch for the repo linked to the site.
104
+ * @param {boolean} params.providerSilentMode - Is the VCS (Version Control System) connection in silent mode for the repo linked to the site? In silent mode, comments will not be made on commits and pull requests.
105
+ * @param {string} params.providerRootDirectory - Path to site code in the linked repo.
106
+ * @param {string} params.specification - Framework specification for the site and builds.
107
+ * @throws {AppwriteException}
108
+ * @returns {Promise<Models.Site>}
109
+ */
110
+ create(params: { siteId: string, name: string, framework: Framework, buildRuntime: BuildRuntime, enabled?: boolean, logging?: boolean, timeout?: number, installCommand?: string, buildCommand?: string, outputDirectory?: string, adapter?: Adapter, installationId?: string, fallbackFile?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, specification?: string }): Promise<Models.Site>;
111
+ /**
112
+ * Create a new site.
113
+ *
114
+ * @param {string} siteId - Site ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
115
+ * @param {string} name - Site name. Max length: 128 chars.
116
+ * @param {Framework} framework - Sites framework.
117
+ * @param {BuildRuntime} buildRuntime - Runtime to use during build step.
118
+ * @param {boolean} enabled - Is site enabled? When set to 'disabled', users cannot access the site but Server SDKs with and API key can still access the site. No data is lost when this is toggled.
119
+ * @param {boolean} logging - When disabled, request logs will exclude logs and errors, and site responses will be slightly faster.
120
+ * @param {number} timeout - Maximum request time in seconds.
121
+ * @param {string} installCommand - Install Command.
122
+ * @param {string} buildCommand - Build Command.
123
+ * @param {string} outputDirectory - Output Directory for site.
124
+ * @param {Adapter} adapter - Framework adapter defining rendering strategy. Allowed values are: static, ssr
125
+ * @param {string} installationId - Appwrite Installation ID for VCS (Version Control System) deployment.
126
+ * @param {string} fallbackFile - Fallback file for single page application sites.
127
+ * @param {string} providerRepositoryId - Repository ID of the repo linked to the site.
128
+ * @param {string} providerBranch - Production branch for the repo linked to the site.
129
+ * @param {boolean} providerSilentMode - Is the VCS (Version Control System) connection in silent mode for the repo linked to the site? In silent mode, comments will not be made on commits and pull requests.
130
+ * @param {string} providerRootDirectory - Path to site code in the linked repo.
131
+ * @param {string} specification - Framework specification for the site and builds.
69
132
  * @throws {AppwriteException}
70
133
  * @returns {Promise<Models.Site>}
134
+ * @deprecated Use the object parameter style method for a better developer experience.
71
135
  */
72
- create(siteId: string, name: string, framework: Framework, buildRuntime: BuildRuntime, enabled?: boolean, logging?: boolean, timeout?: number, installCommand?: string, buildCommand?: string, outputDirectory?: string, adapter?: Adapter, installationId?: string, fallbackFile?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, specification?: string): Promise<Models.Site> {
136
+ create(siteId: string, name: string, framework: Framework, buildRuntime: BuildRuntime, enabled?: boolean, logging?: boolean, timeout?: number, installCommand?: string, buildCommand?: string, outputDirectory?: string, adapter?: Adapter, installationId?: string, fallbackFile?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, specification?: string): Promise<Models.Site>;
137
+ create(
138
+ paramsOrFirst: { siteId: string, name: string, framework: Framework, buildRuntime: BuildRuntime, enabled?: boolean, logging?: boolean, timeout?: number, installCommand?: string, buildCommand?: string, outputDirectory?: string, adapter?: Adapter, installationId?: string, fallbackFile?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, specification?: string } | string,
139
+ ...rest: [(string)?, (Framework)?, (BuildRuntime)?, (boolean)?, (boolean)?, (number)?, (string)?, (string)?, (string)?, (Adapter)?, (string)?, (string)?, (string)?, (string)?, (boolean)?, (string)?, (string)?]
140
+ ): Promise<Models.Site> {
141
+ let params: { siteId: string, name: string, framework: Framework, buildRuntime: BuildRuntime, enabled?: boolean, logging?: boolean, timeout?: number, installCommand?: string, buildCommand?: string, outputDirectory?: string, adapter?: Adapter, installationId?: string, fallbackFile?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, specification?: string };
142
+
143
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
144
+ params = (paramsOrFirst || {}) as { siteId: string, name: string, framework: Framework, buildRuntime: BuildRuntime, enabled?: boolean, logging?: boolean, timeout?: number, installCommand?: string, buildCommand?: string, outputDirectory?: string, adapter?: Adapter, installationId?: string, fallbackFile?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, specification?: string };
145
+ } else {
146
+ params = {
147
+ siteId: paramsOrFirst as string,
148
+ name: rest[0] as string,
149
+ framework: rest[1] as Framework,
150
+ buildRuntime: rest[2] as BuildRuntime,
151
+ enabled: rest[3] as boolean,
152
+ logging: rest[4] as boolean,
153
+ timeout: rest[5] as number,
154
+ installCommand: rest[6] as string,
155
+ buildCommand: rest[7] as string,
156
+ outputDirectory: rest[8] as string,
157
+ adapter: rest[9] as Adapter,
158
+ installationId: rest[10] as string,
159
+ fallbackFile: rest[11] as string,
160
+ providerRepositoryId: rest[12] as string,
161
+ providerBranch: rest[13] as string,
162
+ providerSilentMode: rest[14] as boolean,
163
+ providerRootDirectory: rest[15] as string,
164
+ specification: rest[16] as string
165
+ };
166
+ }
167
+
168
+ const siteId = params.siteId;
169
+ const name = params.name;
170
+ const framework = params.framework;
171
+ const buildRuntime = params.buildRuntime;
172
+ const enabled = params.enabled;
173
+ const logging = params.logging;
174
+ const timeout = params.timeout;
175
+ const installCommand = params.installCommand;
176
+ const buildCommand = params.buildCommand;
177
+ const outputDirectory = params.outputDirectory;
178
+ const adapter = params.adapter;
179
+ const installationId = params.installationId;
180
+ const fallbackFile = params.fallbackFile;
181
+ const providerRepositoryId = params.providerRepositoryId;
182
+ const providerBranch = params.providerBranch;
183
+ const providerSilentMode = params.providerSilentMode;
184
+ const providerRootDirectory = params.providerRootDirectory;
185
+ const specification = params.specification;
186
+
73
187
  if (typeof siteId === 'undefined') {
74
188
  throw new AppwriteException('Missing required parameter: "siteId"');
75
189
  }
@@ -82,6 +196,7 @@ export class Sites {
82
196
  if (typeof buildRuntime === 'undefined') {
83
197
  throw new AppwriteException('Missing required parameter: "buildRuntime"');
84
198
  }
199
+
85
200
  const apiPath = '/sites';
86
201
  const payload: Payload = {};
87
202
  if (typeof siteId !== 'undefined') {
@@ -159,6 +274,7 @@ export class Sites {
159
274
  * @returns {Promise<Models.FrameworkList>}
160
275
  */
161
276
  listFrameworks(): Promise<Models.FrameworkList> {
277
+
162
278
  const apiPath = '/sites/frameworks';
163
279
  const payload: Payload = {};
164
280
  const uri = new URL(this.client.config.endpoint + apiPath);
@@ -181,6 +297,7 @@ export class Sites {
181
297
  * @returns {Promise<Models.SpecificationList>}
182
298
  */
183
299
  listSpecifications(): Promise<Models.SpecificationList> {
300
+
184
301
  const apiPath = '/sites/specifications';
185
302
  const payload: Payload = {};
186
303
  const uri = new URL(this.client.config.endpoint + apiPath);
@@ -199,14 +316,49 @@ export class Sites {
199
316
  /**
200
317
  * List available site templates. You can use template details in [createSite](/docs/references/cloud/server-nodejs/sites#create) method.
201
318
  *
202
- * @param {string[]} frameworks
203
- * @param {string[]} useCases
204
- * @param {number} limit
205
- * @param {number} offset
319
+ * @param {string[]} params.frameworks - List of frameworks allowed for filtering site templates. Maximum of 100 frameworks are allowed.
320
+ * @param {string[]} params.useCases - List of use cases allowed for filtering site templates. Maximum of 100 use cases are allowed.
321
+ * @param {number} params.limit - Limit the number of templates returned in the response. Default limit is 25, and maximum limit is 5000.
322
+ * @param {number} params.offset - Offset the list of returned templates. Maximum offset is 5000.
206
323
  * @throws {AppwriteException}
207
324
  * @returns {Promise<Models.TemplateSiteList>}
208
325
  */
209
- listTemplates(frameworks?: string[], useCases?: string[], limit?: number, offset?: number): Promise<Models.TemplateSiteList> {
326
+ listTemplates(params?: { frameworks?: string[], useCases?: string[], limit?: number, offset?: number }): Promise<Models.TemplateSiteList>;
327
+ /**
328
+ * List available site templates. You can use template details in [createSite](/docs/references/cloud/server-nodejs/sites#create) method.
329
+ *
330
+ * @param {string[]} frameworks - List of frameworks allowed for filtering site templates. Maximum of 100 frameworks are allowed.
331
+ * @param {string[]} useCases - List of use cases allowed for filtering site templates. Maximum of 100 use cases are allowed.
332
+ * @param {number} limit - Limit the number of templates returned in the response. Default limit is 25, and maximum limit is 5000.
333
+ * @param {number} offset - Offset the list of returned templates. Maximum offset is 5000.
334
+ * @throws {AppwriteException}
335
+ * @returns {Promise<Models.TemplateSiteList>}
336
+ * @deprecated Use the object parameter style method for a better developer experience.
337
+ */
338
+ listTemplates(frameworks?: string[], useCases?: string[], limit?: number, offset?: number): Promise<Models.TemplateSiteList>;
339
+ listTemplates(
340
+ paramsOrFirst?: { frameworks?: string[], useCases?: string[], limit?: number, offset?: number } | string[],
341
+ ...rest: [(string[])?, (number)?, (number)?]
342
+ ): Promise<Models.TemplateSiteList> {
343
+ let params: { frameworks?: string[], useCases?: string[], limit?: number, offset?: number };
344
+
345
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
346
+ params = (paramsOrFirst || {}) as { frameworks?: string[], useCases?: string[], limit?: number, offset?: number };
347
+ } else {
348
+ params = {
349
+ frameworks: paramsOrFirst as string[],
350
+ useCases: rest[0] as string[],
351
+ limit: rest[1] as number,
352
+ offset: rest[2] as number
353
+ };
354
+ }
355
+
356
+ const frameworks = params.frameworks;
357
+ const useCases = params.useCases;
358
+ const limit = params.limit;
359
+ const offset = params.offset;
360
+
361
+
210
362
  const apiPath = '/sites/templates';
211
363
  const payload: Payload = {};
212
364
  if (typeof frameworks !== 'undefined') {
@@ -237,14 +389,39 @@ export class Sites {
237
389
  /**
238
390
  * Get a site template using ID. You can use template details in [createSite](/docs/references/cloud/server-nodejs/sites#create) method.
239
391
  *
240
- * @param {string} templateId
392
+ * @param {string} params.templateId - Template ID.
393
+ * @throws {AppwriteException}
394
+ * @returns {Promise<Models.TemplateSite>}
395
+ */
396
+ getTemplate(params: { templateId: string }): Promise<Models.TemplateSite>;
397
+ /**
398
+ * Get a site template using ID. You can use template details in [createSite](/docs/references/cloud/server-nodejs/sites#create) method.
399
+ *
400
+ * @param {string} templateId - Template ID.
241
401
  * @throws {AppwriteException}
242
402
  * @returns {Promise<Models.TemplateSite>}
403
+ * @deprecated Use the object parameter style method for a better developer experience.
243
404
  */
244
- getTemplate(templateId: string): Promise<Models.TemplateSite> {
405
+ getTemplate(templateId: string): Promise<Models.TemplateSite>;
406
+ getTemplate(
407
+ paramsOrFirst: { templateId: string } | string
408
+ ): Promise<Models.TemplateSite> {
409
+ let params: { templateId: string };
410
+
411
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
412
+ params = (paramsOrFirst || {}) as { templateId: string };
413
+ } else {
414
+ params = {
415
+ templateId: paramsOrFirst as string
416
+ };
417
+ }
418
+
419
+ const templateId = params.templateId;
420
+
245
421
  if (typeof templateId === 'undefined') {
246
422
  throw new AppwriteException('Missing required parameter: "templateId"');
247
423
  }
424
+
248
425
  const apiPath = '/sites/templates/{templateId}'.replace('{templateId}', templateId);
249
426
  const payload: Payload = {};
250
427
  const uri = new URL(this.client.config.endpoint + apiPath);
@@ -263,11 +440,36 @@ export class Sites {
263
440
  /**
264
441
  * Get usage metrics and statistics for all sites in the project. View statistics including total deployments, builds, logs, storage usage, and compute time. The response includes both current totals and historical data for each metric. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, defaults to 30 days.
265
442
  *
266
- * @param {SiteUsageRange} range
443
+ * @param {UsageRange} params.range - Date range.
444
+ * @throws {AppwriteException}
445
+ * @returns {Promise<Models.UsageSites>}
446
+ */
447
+ listUsage(params?: { range?: UsageRange }): Promise<Models.UsageSites>;
448
+ /**
449
+ * Get usage metrics and statistics for all sites in the project. View statistics including total deployments, builds, logs, storage usage, and compute time. The response includes both current totals and historical data for each metric. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, defaults to 30 days.
450
+ *
451
+ * @param {UsageRange} range - Date range.
267
452
  * @throws {AppwriteException}
268
453
  * @returns {Promise<Models.UsageSites>}
454
+ * @deprecated Use the object parameter style method for a better developer experience.
269
455
  */
270
- listUsage(range?: SiteUsageRange): Promise<Models.UsageSites> {
456
+ listUsage(range?: UsageRange): Promise<Models.UsageSites>;
457
+ listUsage(
458
+ paramsOrFirst?: { range?: UsageRange } | UsageRange
459
+ ): Promise<Models.UsageSites> {
460
+ let params: { range?: UsageRange };
461
+
462
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'range' in paramsOrFirst)) {
463
+ params = (paramsOrFirst || {}) as { range?: UsageRange };
464
+ } else {
465
+ params = {
466
+ range: paramsOrFirst as UsageRange
467
+ };
468
+ }
469
+
470
+ const range = params.range;
471
+
472
+
271
473
  const apiPath = '/sites/usage';
272
474
  const payload: Payload = {};
273
475
  if (typeof range !== 'undefined') {
@@ -289,14 +491,39 @@ export class Sites {
289
491
  /**
290
492
  * Get a site by its unique ID.
291
493
  *
292
- * @param {string} siteId
494
+ * @param {string} params.siteId - Site ID.
293
495
  * @throws {AppwriteException}
294
496
  * @returns {Promise<Models.Site>}
295
497
  */
296
- get(siteId: string): Promise<Models.Site> {
498
+ get(params: { siteId: string }): Promise<Models.Site>;
499
+ /**
500
+ * Get a site by its unique ID.
501
+ *
502
+ * @param {string} siteId - Site ID.
503
+ * @throws {AppwriteException}
504
+ * @returns {Promise<Models.Site>}
505
+ * @deprecated Use the object parameter style method for a better developer experience.
506
+ */
507
+ get(siteId: string): Promise<Models.Site>;
508
+ get(
509
+ paramsOrFirst: { siteId: string } | string
510
+ ): Promise<Models.Site> {
511
+ let params: { siteId: string };
512
+
513
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
514
+ params = (paramsOrFirst || {}) as { siteId: string };
515
+ } else {
516
+ params = {
517
+ siteId: paramsOrFirst as string
518
+ };
519
+ }
520
+
521
+ const siteId = params.siteId;
522
+
297
523
  if (typeof siteId === 'undefined') {
298
524
  throw new AppwriteException('Missing required parameter: "siteId"');
299
525
  }
526
+
300
527
  const apiPath = '/sites/{siteId}'.replace('{siteId}', siteId);
301
528
  const payload: Payload = {};
302
529
  const uri = new URL(this.client.config.endpoint + apiPath);
@@ -315,28 +542,104 @@ export class Sites {
315
542
  /**
316
543
  * Update site by its unique ID.
317
544
  *
318
- * @param {string} siteId
319
- * @param {string} name
320
- * @param {Framework} framework
321
- * @param {boolean} enabled
322
- * @param {boolean} logging
323
- * @param {number} timeout
324
- * @param {string} installCommand
325
- * @param {string} buildCommand
326
- * @param {string} outputDirectory
327
- * @param {BuildRuntime} buildRuntime
328
- * @param {Adapter} adapter
329
- * @param {string} fallbackFile
330
- * @param {string} installationId
331
- * @param {string} providerRepositoryId
332
- * @param {string} providerBranch
333
- * @param {boolean} providerSilentMode
334
- * @param {string} providerRootDirectory
335
- * @param {string} specification
545
+ * @param {string} params.siteId - Site ID.
546
+ * @param {string} params.name - Site name. Max length: 128 chars.
547
+ * @param {Framework} params.framework - Sites framework.
548
+ * @param {boolean} params.enabled - Is site enabled? When set to 'disabled', users cannot access the site but Server SDKs with and API key can still access the site. No data is lost when this is toggled.
549
+ * @param {boolean} params.logging - When disabled, request logs will exclude logs and errors, and site responses will be slightly faster.
550
+ * @param {number} params.timeout - Maximum request time in seconds.
551
+ * @param {string} params.installCommand - Install Command.
552
+ * @param {string} params.buildCommand - Build Command.
553
+ * @param {string} params.outputDirectory - Output Directory for site.
554
+ * @param {BuildRuntime} params.buildRuntime - Runtime to use during build step.
555
+ * @param {Adapter} params.adapter - Framework adapter defining rendering strategy. Allowed values are: static, ssr
556
+ * @param {string} params.fallbackFile - Fallback file for single page application sites.
557
+ * @param {string} params.installationId - Appwrite Installation ID for VCS (Version Control System) deployment.
558
+ * @param {string} params.providerRepositoryId - Repository ID of the repo linked to the site.
559
+ * @param {string} params.providerBranch - Production branch for the repo linked to the site.
560
+ * @param {boolean} params.providerSilentMode - Is the VCS (Version Control System) connection in silent mode for the repo linked to the site? In silent mode, comments will not be made on commits and pull requests.
561
+ * @param {string} params.providerRootDirectory - Path to site code in the linked repo.
562
+ * @param {string} params.specification - Framework specification for the site and builds.
336
563
  * @throws {AppwriteException}
337
564
  * @returns {Promise<Models.Site>}
338
565
  */
339
- update(siteId: string, name: string, framework: Framework, enabled?: boolean, logging?: boolean, timeout?: number, installCommand?: string, buildCommand?: string, outputDirectory?: string, buildRuntime?: BuildRuntime, adapter?: Adapter, fallbackFile?: string, installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, specification?: string): Promise<Models.Site> {
566
+ update(params: { siteId: string, name: string, framework: Framework, enabled?: boolean, logging?: boolean, timeout?: number, installCommand?: string, buildCommand?: string, outputDirectory?: string, buildRuntime?: BuildRuntime, adapter?: Adapter, fallbackFile?: string, installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, specification?: string }): Promise<Models.Site>;
567
+ /**
568
+ * Update site by its unique ID.
569
+ *
570
+ * @param {string} siteId - Site ID.
571
+ * @param {string} name - Site name. Max length: 128 chars.
572
+ * @param {Framework} framework - Sites framework.
573
+ * @param {boolean} enabled - Is site enabled? When set to 'disabled', users cannot access the site but Server SDKs with and API key can still access the site. No data is lost when this is toggled.
574
+ * @param {boolean} logging - When disabled, request logs will exclude logs and errors, and site responses will be slightly faster.
575
+ * @param {number} timeout - Maximum request time in seconds.
576
+ * @param {string} installCommand - Install Command.
577
+ * @param {string} buildCommand - Build Command.
578
+ * @param {string} outputDirectory - Output Directory for site.
579
+ * @param {BuildRuntime} buildRuntime - Runtime to use during build step.
580
+ * @param {Adapter} adapter - Framework adapter defining rendering strategy. Allowed values are: static, ssr
581
+ * @param {string} fallbackFile - Fallback file for single page application sites.
582
+ * @param {string} installationId - Appwrite Installation ID for VCS (Version Control System) deployment.
583
+ * @param {string} providerRepositoryId - Repository ID of the repo linked to the site.
584
+ * @param {string} providerBranch - Production branch for the repo linked to the site.
585
+ * @param {boolean} providerSilentMode - Is the VCS (Version Control System) connection in silent mode for the repo linked to the site? In silent mode, comments will not be made on commits and pull requests.
586
+ * @param {string} providerRootDirectory - Path to site code in the linked repo.
587
+ * @param {string} specification - Framework specification for the site and builds.
588
+ * @throws {AppwriteException}
589
+ * @returns {Promise<Models.Site>}
590
+ * @deprecated Use the object parameter style method for a better developer experience.
591
+ */
592
+ update(siteId: string, name: string, framework: Framework, enabled?: boolean, logging?: boolean, timeout?: number, installCommand?: string, buildCommand?: string, outputDirectory?: string, buildRuntime?: BuildRuntime, adapter?: Adapter, fallbackFile?: string, installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, specification?: string): Promise<Models.Site>;
593
+ update(
594
+ paramsOrFirst: { siteId: string, name: string, framework: Framework, enabled?: boolean, logging?: boolean, timeout?: number, installCommand?: string, buildCommand?: string, outputDirectory?: string, buildRuntime?: BuildRuntime, adapter?: Adapter, fallbackFile?: string, installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, specification?: string } | string,
595
+ ...rest: [(string)?, (Framework)?, (boolean)?, (boolean)?, (number)?, (string)?, (string)?, (string)?, (BuildRuntime)?, (Adapter)?, (string)?, (string)?, (string)?, (string)?, (boolean)?, (string)?, (string)?]
596
+ ): Promise<Models.Site> {
597
+ let params: { siteId: string, name: string, framework: Framework, enabled?: boolean, logging?: boolean, timeout?: number, installCommand?: string, buildCommand?: string, outputDirectory?: string, buildRuntime?: BuildRuntime, adapter?: Adapter, fallbackFile?: string, installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, specification?: string };
598
+
599
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
600
+ params = (paramsOrFirst || {}) as { siteId: string, name: string, framework: Framework, enabled?: boolean, logging?: boolean, timeout?: number, installCommand?: string, buildCommand?: string, outputDirectory?: string, buildRuntime?: BuildRuntime, adapter?: Adapter, fallbackFile?: string, installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, specification?: string };
601
+ } else {
602
+ params = {
603
+ siteId: paramsOrFirst as string,
604
+ name: rest[0] as string,
605
+ framework: rest[1] as Framework,
606
+ enabled: rest[2] as boolean,
607
+ logging: rest[3] as boolean,
608
+ timeout: rest[4] as number,
609
+ installCommand: rest[5] as string,
610
+ buildCommand: rest[6] as string,
611
+ outputDirectory: rest[7] as string,
612
+ buildRuntime: rest[8] as BuildRuntime,
613
+ adapter: rest[9] as Adapter,
614
+ fallbackFile: rest[10] as string,
615
+ installationId: rest[11] as string,
616
+ providerRepositoryId: rest[12] as string,
617
+ providerBranch: rest[13] as string,
618
+ providerSilentMode: rest[14] as boolean,
619
+ providerRootDirectory: rest[15] as string,
620
+ specification: rest[16] as string
621
+ };
622
+ }
623
+
624
+ const siteId = params.siteId;
625
+ const name = params.name;
626
+ const framework = params.framework;
627
+ const enabled = params.enabled;
628
+ const logging = params.logging;
629
+ const timeout = params.timeout;
630
+ const installCommand = params.installCommand;
631
+ const buildCommand = params.buildCommand;
632
+ const outputDirectory = params.outputDirectory;
633
+ const buildRuntime = params.buildRuntime;
634
+ const adapter = params.adapter;
635
+ const fallbackFile = params.fallbackFile;
636
+ const installationId = params.installationId;
637
+ const providerRepositoryId = params.providerRepositoryId;
638
+ const providerBranch = params.providerBranch;
639
+ const providerSilentMode = params.providerSilentMode;
640
+ const providerRootDirectory = params.providerRootDirectory;
641
+ const specification = params.specification;
642
+
340
643
  if (typeof siteId === 'undefined') {
341
644
  throw new AppwriteException('Missing required parameter: "siteId"');
342
645
  }
@@ -346,6 +649,7 @@ export class Sites {
346
649
  if (typeof framework === 'undefined') {
347
650
  throw new AppwriteException('Missing required parameter: "framework"');
348
651
  }
652
+
349
653
  const apiPath = '/sites/{siteId}'.replace('{siteId}', siteId);
350
654
  const payload: Payload = {};
351
655
  if (typeof name !== 'undefined') {
@@ -416,14 +720,39 @@ export class Sites {
416
720
  /**
417
721
  * Delete a site by its unique ID.
418
722
  *
419
- * @param {string} siteId
723
+ * @param {string} params.siteId - Site ID.
724
+ * @throws {AppwriteException}
725
+ * @returns {Promise<{}>}
726
+ */
727
+ delete(params: { siteId: string }): Promise<{}>;
728
+ /**
729
+ * Delete a site by its unique ID.
730
+ *
731
+ * @param {string} siteId - Site ID.
420
732
  * @throws {AppwriteException}
421
733
  * @returns {Promise<{}>}
734
+ * @deprecated Use the object parameter style method for a better developer experience.
422
735
  */
423
- delete(siteId: string): Promise<{}> {
736
+ delete(siteId: string): Promise<{}>;
737
+ delete(
738
+ paramsOrFirst: { siteId: string } | string
739
+ ): Promise<{}> {
740
+ let params: { siteId: string };
741
+
742
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
743
+ params = (paramsOrFirst || {}) as { siteId: string };
744
+ } else {
745
+ params = {
746
+ siteId: paramsOrFirst as string
747
+ };
748
+ }
749
+
750
+ const siteId = params.siteId;
751
+
424
752
  if (typeof siteId === 'undefined') {
425
753
  throw new AppwriteException('Missing required parameter: "siteId"');
426
754
  }
755
+
427
756
  const apiPath = '/sites/{siteId}'.replace('{siteId}', siteId);
428
757
  const payload: Payload = {};
429
758
  const uri = new URL(this.client.config.endpoint + apiPath);
@@ -443,18 +772,47 @@ export class Sites {
443
772
  /**
444
773
  * Update the site active deployment. Use this endpoint to switch the code deployment that should be used when visitor opens your site.
445
774
  *
446
- * @param {string} siteId
447
- * @param {string} deploymentId
775
+ * @param {string} params.siteId - Site ID.
776
+ * @param {string} params.deploymentId - Deployment ID.
777
+ * @throws {AppwriteException}
778
+ * @returns {Promise<Models.Site>}
779
+ */
780
+ updateSiteDeployment(params: { siteId: string, deploymentId: string }): Promise<Models.Site>;
781
+ /**
782
+ * Update the site active deployment. Use this endpoint to switch the code deployment that should be used when visitor opens your site.
783
+ *
784
+ * @param {string} siteId - Site ID.
785
+ * @param {string} deploymentId - Deployment ID.
448
786
  * @throws {AppwriteException}
449
787
  * @returns {Promise<Models.Site>}
788
+ * @deprecated Use the object parameter style method for a better developer experience.
450
789
  */
451
- updateSiteDeployment(siteId: string, deploymentId: string): Promise<Models.Site> {
790
+ updateSiteDeployment(siteId: string, deploymentId: string): Promise<Models.Site>;
791
+ updateSiteDeployment(
792
+ paramsOrFirst: { siteId: string, deploymentId: string } | string,
793
+ ...rest: [(string)?]
794
+ ): Promise<Models.Site> {
795
+ let params: { siteId: string, deploymentId: string };
796
+
797
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
798
+ params = (paramsOrFirst || {}) as { siteId: string, deploymentId: string };
799
+ } else {
800
+ params = {
801
+ siteId: paramsOrFirst as string,
802
+ deploymentId: rest[0] as string
803
+ };
804
+ }
805
+
806
+ const siteId = params.siteId;
807
+ const deploymentId = params.deploymentId;
808
+
452
809
  if (typeof siteId === 'undefined') {
453
810
  throw new AppwriteException('Missing required parameter: "siteId"');
454
811
  }
455
812
  if (typeof deploymentId === 'undefined') {
456
813
  throw new AppwriteException('Missing required parameter: "deploymentId"');
457
814
  }
815
+
458
816
  const apiPath = '/sites/{siteId}/deployment'.replace('{siteId}', siteId);
459
817
  const payload: Payload = {};
460
818
  if (typeof deploymentId !== 'undefined') {
@@ -475,18 +833,54 @@ export class Sites {
475
833
  }
476
834
 
477
835
  /**
478
- * Get a list of all the site&#039;s code deployments. You can use the query params to filter your results.
836
+ * Get a list of all the site's code deployments. You can use the query params to filter your results.
837
+ *
838
+ * @param {string} params.siteId - Site ID.
839
+ * @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: buildSize, sourceSize, totalSize, buildDuration, status, activate, type
840
+ * @param {string} params.search - Search term to filter your list results. Max length: 256 chars.
841
+ * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
842
+ * @throws {AppwriteException}
843
+ * @returns {Promise<Models.DeploymentList>}
844
+ */
845
+ listDeployments(params: { siteId: string, queries?: string[], search?: string, total?: boolean }): Promise<Models.DeploymentList>;
846
+ /**
847
+ * Get a list of all the site's code deployments. You can use the query params to filter your results.
479
848
  *
480
- * @param {string} siteId
481
- * @param {string[]} queries
482
- * @param {string} search
849
+ * @param {string} siteId - Site ID.
850
+ * @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: buildSize, sourceSize, totalSize, buildDuration, status, activate, type
851
+ * @param {string} search - Search term to filter your list results. Max length: 256 chars.
852
+ * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
483
853
  * @throws {AppwriteException}
484
854
  * @returns {Promise<Models.DeploymentList>}
855
+ * @deprecated Use the object parameter style method for a better developer experience.
485
856
  */
486
- listDeployments(siteId: string, queries?: string[], search?: string): Promise<Models.DeploymentList> {
857
+ listDeployments(siteId: string, queries?: string[], search?: string, total?: boolean): Promise<Models.DeploymentList>;
858
+ listDeployments(
859
+ paramsOrFirst: { siteId: string, queries?: string[], search?: string, total?: boolean } | string,
860
+ ...rest: [(string[])?, (string)?, (boolean)?]
861
+ ): Promise<Models.DeploymentList> {
862
+ let params: { siteId: string, queries?: string[], search?: string, total?: boolean };
863
+
864
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
865
+ params = (paramsOrFirst || {}) as { siteId: string, queries?: string[], search?: string, total?: boolean };
866
+ } else {
867
+ params = {
868
+ siteId: paramsOrFirst as string,
869
+ queries: rest[0] as string[],
870
+ search: rest[1] as string,
871
+ total: rest[2] as boolean
872
+ };
873
+ }
874
+
875
+ const siteId = params.siteId;
876
+ const queries = params.queries;
877
+ const search = params.search;
878
+ const total = params.total;
879
+
487
880
  if (typeof siteId === 'undefined') {
488
881
  throw new AppwriteException('Missing required parameter: "siteId"');
489
882
  }
883
+
490
884
  const apiPath = '/sites/{siteId}/deployments'.replace('{siteId}', siteId);
491
885
  const payload: Payload = {};
492
886
  if (typeof queries !== 'undefined') {
@@ -495,6 +889,9 @@ export class Sites {
495
889
  if (typeof search !== 'undefined') {
496
890
  payload['search'] = search;
497
891
  }
892
+ if (typeof total !== 'undefined') {
893
+ payload['total'] = total;
894
+ }
498
895
  const uri = new URL(this.client.config.endpoint + apiPath);
499
896
 
500
897
  const apiHeaders: { [header: string]: string } = {
@@ -509,18 +906,61 @@ export class Sites {
509
906
  }
510
907
 
511
908
  /**
512
- * Create a new site code deployment. Use this endpoint to upload a new version of your site code. To activate your newly uploaded code, you&#039;ll need to update the function&#039;s deployment to use your new deployment ID.
909
+ * Create a new site code deployment. Use this endpoint to upload a new version of your site code. To activate your newly uploaded code, you'll need to update the site's deployment to use your new deployment ID.
513
910
  *
514
- * @param {string} siteId
515
- * @param {File} code
516
- * @param {boolean} activate
517
- * @param {string} installCommand
518
- * @param {string} buildCommand
519
- * @param {string} outputDirectory
911
+ * @param {string} params.siteId - Site ID.
912
+ * @param {File} params.code - Gzip file with your code package. When used with the Appwrite CLI, pass the path to your code directory, and the CLI will automatically package your code. Use a path that is within the current directory.
913
+ * @param {boolean} params.activate - Automatically activate the deployment when it is finished building.
914
+ * @param {string} params.installCommand - Install Commands.
915
+ * @param {string} params.buildCommand - Build Commands.
916
+ * @param {string} params.outputDirectory - Output Directory.
520
917
  * @throws {AppwriteException}
521
918
  * @returns {Promise<Models.Deployment>}
522
919
  */
523
- createDeployment(siteId: string, code: File, activate: boolean, installCommand?: string, buildCommand?: string, outputDirectory?: string, onProgress = (progress: UploadProgress) => {}): Promise<Models.Deployment> {
920
+ createDeployment(params: { siteId: string, code: File, activate: boolean, installCommand?: string, buildCommand?: string, outputDirectory?: string , onProgress?: (progress: UploadProgress) => void }): Promise<Models.Deployment>;
921
+ /**
922
+ * Create a new site code deployment. Use this endpoint to upload a new version of your site code. To activate your newly uploaded code, you'll need to update the site's deployment to use your new deployment ID.
923
+ *
924
+ * @param {string} siteId - Site ID.
925
+ * @param {File} code - Gzip file with your code package. When used with the Appwrite CLI, pass the path to your code directory, and the CLI will automatically package your code. Use a path that is within the current directory.
926
+ * @param {boolean} activate - Automatically activate the deployment when it is finished building.
927
+ * @param {string} installCommand - Install Commands.
928
+ * @param {string} buildCommand - Build Commands.
929
+ * @param {string} outputDirectory - Output Directory.
930
+ * @throws {AppwriteException}
931
+ * @returns {Promise<Models.Deployment>}
932
+ * @deprecated Use the object parameter style method for a better developer experience.
933
+ */
934
+ createDeployment(siteId: string, code: File, activate: boolean, installCommand?: string, buildCommand?: string, outputDirectory?: string, onProgress?: (progress: UploadProgress) => void): Promise<Models.Deployment>;
935
+ createDeployment(
936
+ paramsOrFirst: { siteId: string, code: File, activate: boolean, installCommand?: string, buildCommand?: string, outputDirectory?: string, onProgress?: (progress: UploadProgress) => void } | string,
937
+ ...rest: [(File)?, (boolean)?, (string)?, (string)?, (string)?,((progress: UploadProgress) => void)?]
938
+ ): Promise<Models.Deployment> {
939
+ let params: { siteId: string, code: File, activate: boolean, installCommand?: string, buildCommand?: string, outputDirectory?: string };
940
+ let onProgress: ((progress: UploadProgress) => void);
941
+
942
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
943
+ params = (paramsOrFirst || {}) as { siteId: string, code: File, activate: boolean, installCommand?: string, buildCommand?: string, outputDirectory?: string };
944
+ onProgress = paramsOrFirst?.onProgress as ((progress: UploadProgress) => void);
945
+ } else {
946
+ params = {
947
+ siteId: paramsOrFirst as string,
948
+ code: rest[0] as File,
949
+ activate: rest[1] as boolean,
950
+ installCommand: rest[2] as string,
951
+ buildCommand: rest[3] as string,
952
+ outputDirectory: rest[4] as string
953
+ };
954
+ onProgress = rest[5] as ((progress: UploadProgress) => void);
955
+ }
956
+
957
+ const siteId = params.siteId;
958
+ const code = params.code;
959
+ const activate = params.activate;
960
+ const installCommand = params.installCommand;
961
+ const buildCommand = params.buildCommand;
962
+ const outputDirectory = params.outputDirectory;
963
+
524
964
  if (typeof siteId === 'undefined') {
525
965
  throw new AppwriteException('Missing required parameter: "siteId"');
526
966
  }
@@ -530,6 +970,7 @@ export class Sites {
530
970
  if (typeof activate === 'undefined') {
531
971
  throw new AppwriteException('Missing required parameter: "activate"');
532
972
  }
973
+
533
974
  const apiPath = '/sites/{siteId}/deployments'.replace('{siteId}', siteId);
534
975
  const payload: Payload = {};
535
976
  if (typeof installCommand !== 'undefined') {
@@ -563,20 +1004,49 @@ export class Sites {
563
1004
  }
564
1005
 
565
1006
  /**
566
- * Create a new build for an existing site deployment. This endpoint allows you to rebuild a deployment with the updated site configuration, including its commands and output directory if they have been modified. The build process will be queued and executed asynchronously. The original deployment&#039;s code will be preserved and used for the new build.
1007
+ * Create a new build for an existing site deployment. This endpoint allows you to rebuild a deployment with the updated site configuration, including its commands and output directory if they have been modified. The build process will be queued and executed asynchronously. The original deployment's code will be preserved and used for the new build.
567
1008
  *
568
- * @param {string} siteId
569
- * @param {string} deploymentId
1009
+ * @param {string} params.siteId - Site ID.
1010
+ * @param {string} params.deploymentId - Deployment ID.
570
1011
  * @throws {AppwriteException}
571
1012
  * @returns {Promise<Models.Deployment>}
572
1013
  */
573
- createDuplicateDeployment(siteId: string, deploymentId: string): Promise<Models.Deployment> {
1014
+ createDuplicateDeployment(params: { siteId: string, deploymentId: string }): Promise<Models.Deployment>;
1015
+ /**
1016
+ * Create a new build for an existing site deployment. This endpoint allows you to rebuild a deployment with the updated site configuration, including its commands and output directory if they have been modified. The build process will be queued and executed asynchronously. The original deployment's code will be preserved and used for the new build.
1017
+ *
1018
+ * @param {string} siteId - Site ID.
1019
+ * @param {string} deploymentId - Deployment ID.
1020
+ * @throws {AppwriteException}
1021
+ * @returns {Promise<Models.Deployment>}
1022
+ * @deprecated Use the object parameter style method for a better developer experience.
1023
+ */
1024
+ createDuplicateDeployment(siteId: string, deploymentId: string): Promise<Models.Deployment>;
1025
+ createDuplicateDeployment(
1026
+ paramsOrFirst: { siteId: string, deploymentId: string } | string,
1027
+ ...rest: [(string)?]
1028
+ ): Promise<Models.Deployment> {
1029
+ let params: { siteId: string, deploymentId: string };
1030
+
1031
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1032
+ params = (paramsOrFirst || {}) as { siteId: string, deploymentId: string };
1033
+ } else {
1034
+ params = {
1035
+ siteId: paramsOrFirst as string,
1036
+ deploymentId: rest[0] as string
1037
+ };
1038
+ }
1039
+
1040
+ const siteId = params.siteId;
1041
+ const deploymentId = params.deploymentId;
1042
+
574
1043
  if (typeof siteId === 'undefined') {
575
1044
  throw new AppwriteException('Missing required parameter: "siteId"');
576
1045
  }
577
1046
  if (typeof deploymentId === 'undefined') {
578
1047
  throw new AppwriteException('Missing required parameter: "deploymentId"');
579
1048
  }
1049
+
580
1050
  const apiPath = '/sites/{siteId}/deployments/duplicate'.replace('{siteId}', siteId);
581
1051
  const payload: Payload = {};
582
1052
  if (typeof deploymentId !== 'undefined') {
@@ -599,18 +1069,64 @@ export class Sites {
599
1069
  /**
600
1070
  * Create a deployment based on a template.
601
1071
  *
602
- * Use this endpoint with combination of [listTemplates](https://appwrite.io/docs/server/sites#listTemplates) to find the template details.
1072
+ * Use this endpoint with combination of [listTemplates](https://appwrite.io/docs/products/sites/templates) to find the template details.
1073
+ *
1074
+ * @param {string} params.siteId - Site ID.
1075
+ * @param {string} params.repository - Repository name of the template.
1076
+ * @param {string} params.owner - The name of the owner of the template.
1077
+ * @param {string} params.rootDirectory - Path to site code in the template repo.
1078
+ * @param {TemplateReferenceType} params.type - Type for the reference provided. Can be commit, branch, or tag
1079
+ * @param {string} params.reference - Reference value, can be a commit hash, branch name, or release tag
1080
+ * @param {boolean} params.activate - Automatically activate the deployment when it is finished building.
1081
+ * @throws {AppwriteException}
1082
+ * @returns {Promise<Models.Deployment>}
1083
+ */
1084
+ createTemplateDeployment(params: { siteId: string, repository: string, owner: string, rootDirectory: string, type: TemplateReferenceType, reference: string, activate?: boolean }): Promise<Models.Deployment>;
1085
+ /**
1086
+ * Create a deployment based on a template.
1087
+ *
1088
+ * Use this endpoint with combination of [listTemplates](https://appwrite.io/docs/products/sites/templates) to find the template details.
603
1089
  *
604
- * @param {string} siteId
605
- * @param {string} repository
606
- * @param {string} owner
607
- * @param {string} rootDirectory
608
- * @param {string} version
609
- * @param {boolean} activate
1090
+ * @param {string} siteId - Site ID.
1091
+ * @param {string} repository - Repository name of the template.
1092
+ * @param {string} owner - The name of the owner of the template.
1093
+ * @param {string} rootDirectory - Path to site code in the template repo.
1094
+ * @param {TemplateReferenceType} type - Type for the reference provided. Can be commit, branch, or tag
1095
+ * @param {string} reference - Reference value, can be a commit hash, branch name, or release tag
1096
+ * @param {boolean} activate - Automatically activate the deployment when it is finished building.
610
1097
  * @throws {AppwriteException}
611
1098
  * @returns {Promise<Models.Deployment>}
1099
+ * @deprecated Use the object parameter style method for a better developer experience.
612
1100
  */
613
- createTemplateDeployment(siteId: string, repository: string, owner: string, rootDirectory: string, version: string, activate?: boolean): Promise<Models.Deployment> {
1101
+ createTemplateDeployment(siteId: string, repository: string, owner: string, rootDirectory: string, type: TemplateReferenceType, reference: string, activate?: boolean): Promise<Models.Deployment>;
1102
+ createTemplateDeployment(
1103
+ paramsOrFirst: { siteId: string, repository: string, owner: string, rootDirectory: string, type: TemplateReferenceType, reference: string, activate?: boolean } | string,
1104
+ ...rest: [(string)?, (string)?, (string)?, (TemplateReferenceType)?, (string)?, (boolean)?]
1105
+ ): Promise<Models.Deployment> {
1106
+ let params: { siteId: string, repository: string, owner: string, rootDirectory: string, type: TemplateReferenceType, reference: string, activate?: boolean };
1107
+
1108
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1109
+ params = (paramsOrFirst || {}) as { siteId: string, repository: string, owner: string, rootDirectory: string, type: TemplateReferenceType, reference: string, activate?: boolean };
1110
+ } else {
1111
+ params = {
1112
+ siteId: paramsOrFirst as string,
1113
+ repository: rest[0] as string,
1114
+ owner: rest[1] as string,
1115
+ rootDirectory: rest[2] as string,
1116
+ type: rest[3] as TemplateReferenceType,
1117
+ reference: rest[4] as string,
1118
+ activate: rest[5] as boolean
1119
+ };
1120
+ }
1121
+
1122
+ const siteId = params.siteId;
1123
+ const repository = params.repository;
1124
+ const owner = params.owner;
1125
+ const rootDirectory = params.rootDirectory;
1126
+ const type = params.type;
1127
+ const reference = params.reference;
1128
+ const activate = params.activate;
1129
+
614
1130
  if (typeof siteId === 'undefined') {
615
1131
  throw new AppwriteException('Missing required parameter: "siteId"');
616
1132
  }
@@ -623,9 +1139,13 @@ export class Sites {
623
1139
  if (typeof rootDirectory === 'undefined') {
624
1140
  throw new AppwriteException('Missing required parameter: "rootDirectory"');
625
1141
  }
626
- if (typeof version === 'undefined') {
627
- throw new AppwriteException('Missing required parameter: "version"');
1142
+ if (typeof type === 'undefined') {
1143
+ throw new AppwriteException('Missing required parameter: "type"');
628
1144
  }
1145
+ if (typeof reference === 'undefined') {
1146
+ throw new AppwriteException('Missing required parameter: "reference"');
1147
+ }
1148
+
629
1149
  const apiPath = '/sites/{siteId}/deployments/template'.replace('{siteId}', siteId);
630
1150
  const payload: Payload = {};
631
1151
  if (typeof repository !== 'undefined') {
@@ -637,8 +1157,11 @@ export class Sites {
637
1157
  if (typeof rootDirectory !== 'undefined') {
638
1158
  payload['rootDirectory'] = rootDirectory;
639
1159
  }
640
- if (typeof version !== 'undefined') {
641
- payload['version'] = version;
1160
+ if (typeof type !== 'undefined') {
1161
+ payload['type'] = type;
1162
+ }
1163
+ if (typeof reference !== 'undefined') {
1164
+ payload['reference'] = reference;
642
1165
  }
643
1166
  if (typeof activate !== 'undefined') {
644
1167
  payload['activate'] = activate;
@@ -662,14 +1185,50 @@ export class Sites {
662
1185
  *
663
1186
  * This endpoint lets you create deployment from a branch, commit, or a tag.
664
1187
  *
665
- * @param {string} siteId
666
- * @param {VCSDeploymentType} type
667
- * @param {string} reference
668
- * @param {boolean} activate
1188
+ * @param {string} params.siteId - Site ID.
1189
+ * @param {VCSReferenceType} params.type - Type of reference passed. Allowed values are: branch, commit
1190
+ * @param {string} params.reference - VCS reference to create deployment from. Depending on type this can be: branch name, commit hash
1191
+ * @param {boolean} params.activate - Automatically activate the deployment when it is finished building.
669
1192
  * @throws {AppwriteException}
670
1193
  * @returns {Promise<Models.Deployment>}
671
1194
  */
672
- createVcsDeployment(siteId: string, type: VCSDeploymentType, reference: string, activate?: boolean): Promise<Models.Deployment> {
1195
+ createVcsDeployment(params: { siteId: string, type: VCSReferenceType, reference: string, activate?: boolean }): Promise<Models.Deployment>;
1196
+ /**
1197
+ * Create a deployment when a site is connected to VCS.
1198
+ *
1199
+ * This endpoint lets you create deployment from a branch, commit, or a tag.
1200
+ *
1201
+ * @param {string} siteId - Site ID.
1202
+ * @param {VCSReferenceType} type - Type of reference passed. Allowed values are: branch, commit
1203
+ * @param {string} reference - VCS reference to create deployment from. Depending on type this can be: branch name, commit hash
1204
+ * @param {boolean} activate - Automatically activate the deployment when it is finished building.
1205
+ * @throws {AppwriteException}
1206
+ * @returns {Promise<Models.Deployment>}
1207
+ * @deprecated Use the object parameter style method for a better developer experience.
1208
+ */
1209
+ createVcsDeployment(siteId: string, type: VCSReferenceType, reference: string, activate?: boolean): Promise<Models.Deployment>;
1210
+ createVcsDeployment(
1211
+ paramsOrFirst: { siteId: string, type: VCSReferenceType, reference: string, activate?: boolean } | string,
1212
+ ...rest: [(VCSReferenceType)?, (string)?, (boolean)?]
1213
+ ): Promise<Models.Deployment> {
1214
+ let params: { siteId: string, type: VCSReferenceType, reference: string, activate?: boolean };
1215
+
1216
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1217
+ params = (paramsOrFirst || {}) as { siteId: string, type: VCSReferenceType, reference: string, activate?: boolean };
1218
+ } else {
1219
+ params = {
1220
+ siteId: paramsOrFirst as string,
1221
+ type: rest[0] as VCSReferenceType,
1222
+ reference: rest[1] as string,
1223
+ activate: rest[2] as boolean
1224
+ };
1225
+ }
1226
+
1227
+ const siteId = params.siteId;
1228
+ const type = params.type;
1229
+ const reference = params.reference;
1230
+ const activate = params.activate;
1231
+
673
1232
  if (typeof siteId === 'undefined') {
674
1233
  throw new AppwriteException('Missing required parameter: "siteId"');
675
1234
  }
@@ -679,6 +1238,7 @@ export class Sites {
679
1238
  if (typeof reference === 'undefined') {
680
1239
  throw new AppwriteException('Missing required parameter: "reference"');
681
1240
  }
1241
+
682
1242
  const apiPath = '/sites/{siteId}/deployments/vcs'.replace('{siteId}', siteId);
683
1243
  const payload: Payload = {};
684
1244
  if (typeof type !== 'undefined') {
@@ -707,18 +1267,47 @@ export class Sites {
707
1267
  /**
708
1268
  * Get a site deployment by its unique ID.
709
1269
  *
710
- * @param {string} siteId
711
- * @param {string} deploymentId
1270
+ * @param {string} params.siteId - Site ID.
1271
+ * @param {string} params.deploymentId - Deployment ID.
1272
+ * @throws {AppwriteException}
1273
+ * @returns {Promise<Models.Deployment>}
1274
+ */
1275
+ getDeployment(params: { siteId: string, deploymentId: string }): Promise<Models.Deployment>;
1276
+ /**
1277
+ * Get a site deployment by its unique ID.
1278
+ *
1279
+ * @param {string} siteId - Site ID.
1280
+ * @param {string} deploymentId - Deployment ID.
712
1281
  * @throws {AppwriteException}
713
1282
  * @returns {Promise<Models.Deployment>}
1283
+ * @deprecated Use the object parameter style method for a better developer experience.
714
1284
  */
715
- getDeployment(siteId: string, deploymentId: string): Promise<Models.Deployment> {
1285
+ getDeployment(siteId: string, deploymentId: string): Promise<Models.Deployment>;
1286
+ getDeployment(
1287
+ paramsOrFirst: { siteId: string, deploymentId: string } | string,
1288
+ ...rest: [(string)?]
1289
+ ): Promise<Models.Deployment> {
1290
+ let params: { siteId: string, deploymentId: string };
1291
+
1292
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1293
+ params = (paramsOrFirst || {}) as { siteId: string, deploymentId: string };
1294
+ } else {
1295
+ params = {
1296
+ siteId: paramsOrFirst as string,
1297
+ deploymentId: rest[0] as string
1298
+ };
1299
+ }
1300
+
1301
+ const siteId = params.siteId;
1302
+ const deploymentId = params.deploymentId;
1303
+
716
1304
  if (typeof siteId === 'undefined') {
717
1305
  throw new AppwriteException('Missing required parameter: "siteId"');
718
1306
  }
719
1307
  if (typeof deploymentId === 'undefined') {
720
1308
  throw new AppwriteException('Missing required parameter: "deploymentId"');
721
1309
  }
1310
+
722
1311
  const apiPath = '/sites/{siteId}/deployments/{deploymentId}'.replace('{siteId}', siteId).replace('{deploymentId}', deploymentId);
723
1312
  const payload: Payload = {};
724
1313
  const uri = new URL(this.client.config.endpoint + apiPath);
@@ -737,18 +1326,47 @@ export class Sites {
737
1326
  /**
738
1327
  * Delete a site deployment by its unique ID.
739
1328
  *
740
- * @param {string} siteId
741
- * @param {string} deploymentId
1329
+ * @param {string} params.siteId - Site ID.
1330
+ * @param {string} params.deploymentId - Deployment ID.
1331
+ * @throws {AppwriteException}
1332
+ * @returns {Promise<{}>}
1333
+ */
1334
+ deleteDeployment(params: { siteId: string, deploymentId: string }): Promise<{}>;
1335
+ /**
1336
+ * Delete a site deployment by its unique ID.
1337
+ *
1338
+ * @param {string} siteId - Site ID.
1339
+ * @param {string} deploymentId - Deployment ID.
742
1340
  * @throws {AppwriteException}
743
1341
  * @returns {Promise<{}>}
1342
+ * @deprecated Use the object parameter style method for a better developer experience.
744
1343
  */
745
- deleteDeployment(siteId: string, deploymentId: string): Promise<{}> {
1344
+ deleteDeployment(siteId: string, deploymentId: string): Promise<{}>;
1345
+ deleteDeployment(
1346
+ paramsOrFirst: { siteId: string, deploymentId: string } | string,
1347
+ ...rest: [(string)?]
1348
+ ): Promise<{}> {
1349
+ let params: { siteId: string, deploymentId: string };
1350
+
1351
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1352
+ params = (paramsOrFirst || {}) as { siteId: string, deploymentId: string };
1353
+ } else {
1354
+ params = {
1355
+ siteId: paramsOrFirst as string,
1356
+ deploymentId: rest[0] as string
1357
+ };
1358
+ }
1359
+
1360
+ const siteId = params.siteId;
1361
+ const deploymentId = params.deploymentId;
1362
+
746
1363
  if (typeof siteId === 'undefined') {
747
1364
  throw new AppwriteException('Missing required parameter: "siteId"');
748
1365
  }
749
1366
  if (typeof deploymentId === 'undefined') {
750
1367
  throw new AppwriteException('Missing required parameter: "deploymentId"');
751
1368
  }
1369
+
752
1370
  const apiPath = '/sites/{siteId}/deployments/{deploymentId}'.replace('{siteId}', siteId).replace('{deploymentId}', deploymentId);
753
1371
  const payload: Payload = {};
754
1372
  const uri = new URL(this.client.config.endpoint + apiPath);
@@ -766,21 +1384,53 @@ export class Sites {
766
1384
  }
767
1385
 
768
1386
  /**
769
- * Get a site deployment content by its unique ID. The endpoint response return with a &#039;Content-Disposition: attachment&#039; header that tells the browser to start downloading the file to user downloads directory.
1387
+ * Get a site deployment content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.
1388
+ *
1389
+ * @param {string} params.siteId - Site ID.
1390
+ * @param {string} params.deploymentId - Deployment ID.
1391
+ * @param {DeploymentDownloadType} params.type - Deployment file to download. Can be: "source", "output".
1392
+ * @throws {AppwriteException}
1393
+ * @returns {string}
1394
+ */
1395
+ getDeploymentDownload(params: { siteId: string, deploymentId: string, type?: DeploymentDownloadType }): string;
1396
+ /**
1397
+ * Get a site deployment content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.
770
1398
  *
771
- * @param {string} siteId
772
- * @param {string} deploymentId
773
- * @param {DeploymentDownloadType} type
1399
+ * @param {string} siteId - Site ID.
1400
+ * @param {string} deploymentId - Deployment ID.
1401
+ * @param {DeploymentDownloadType} type - Deployment file to download. Can be: "source", "output".
774
1402
  * @throws {AppwriteException}
775
1403
  * @returns {string}
1404
+ * @deprecated Use the object parameter style method for a better developer experience.
776
1405
  */
777
- getDeploymentDownload(siteId: string, deploymentId: string, type?: DeploymentDownloadType): string {
1406
+ getDeploymentDownload(siteId: string, deploymentId: string, type?: DeploymentDownloadType): string;
1407
+ getDeploymentDownload(
1408
+ paramsOrFirst: { siteId: string, deploymentId: string, type?: DeploymentDownloadType } | string,
1409
+ ...rest: [(string)?, (DeploymentDownloadType)?]
1410
+ ): string {
1411
+ let params: { siteId: string, deploymentId: string, type?: DeploymentDownloadType };
1412
+
1413
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1414
+ params = (paramsOrFirst || {}) as { siteId: string, deploymentId: string, type?: DeploymentDownloadType };
1415
+ } else {
1416
+ params = {
1417
+ siteId: paramsOrFirst as string,
1418
+ deploymentId: rest[0] as string,
1419
+ type: rest[1] as DeploymentDownloadType
1420
+ };
1421
+ }
1422
+
1423
+ const siteId = params.siteId;
1424
+ const deploymentId = params.deploymentId;
1425
+ const type = params.type;
1426
+
778
1427
  if (typeof siteId === 'undefined') {
779
1428
  throw new AppwriteException('Missing required parameter: "siteId"');
780
1429
  }
781
1430
  if (typeof deploymentId === 'undefined') {
782
1431
  throw new AppwriteException('Missing required parameter: "deploymentId"');
783
1432
  }
1433
+
784
1434
  const apiPath = '/sites/{siteId}/deployments/{deploymentId}/download'.replace('{siteId}', siteId).replace('{deploymentId}', deploymentId);
785
1435
  const payload: Payload = {};
786
1436
  if (typeof type !== 'undefined') {
@@ -801,20 +1451,49 @@ export class Sites {
801
1451
  }
802
1452
 
803
1453
  /**
804
- * Cancel an ongoing site deployment build. If the build is already in progress, it will be stopped and marked as canceled. If the build hasn&#039;t started yet, it will be marked as canceled without executing. You cannot cancel builds that have already completed (status &#039;ready&#039;) or failed. The response includes the final build status and details.
1454
+ * Cancel an ongoing site deployment build. If the build is already in progress, it will be stopped and marked as canceled. If the build hasn't started yet, it will be marked as canceled without executing. You cannot cancel builds that have already completed (status 'ready') or failed. The response includes the final build status and details.
1455
+ *
1456
+ * @param {string} params.siteId - Site ID.
1457
+ * @param {string} params.deploymentId - Deployment ID.
1458
+ * @throws {AppwriteException}
1459
+ * @returns {Promise<Models.Deployment>}
1460
+ */
1461
+ updateDeploymentStatus(params: { siteId: string, deploymentId: string }): Promise<Models.Deployment>;
1462
+ /**
1463
+ * Cancel an ongoing site deployment build. If the build is already in progress, it will be stopped and marked as canceled. If the build hasn't started yet, it will be marked as canceled without executing. You cannot cancel builds that have already completed (status 'ready') or failed. The response includes the final build status and details.
805
1464
  *
806
- * @param {string} siteId
807
- * @param {string} deploymentId
1465
+ * @param {string} siteId - Site ID.
1466
+ * @param {string} deploymentId - Deployment ID.
808
1467
  * @throws {AppwriteException}
809
1468
  * @returns {Promise<Models.Deployment>}
1469
+ * @deprecated Use the object parameter style method for a better developer experience.
810
1470
  */
811
- updateDeploymentStatus(siteId: string, deploymentId: string): Promise<Models.Deployment> {
1471
+ updateDeploymentStatus(siteId: string, deploymentId: string): Promise<Models.Deployment>;
1472
+ updateDeploymentStatus(
1473
+ paramsOrFirst: { siteId: string, deploymentId: string } | string,
1474
+ ...rest: [(string)?]
1475
+ ): Promise<Models.Deployment> {
1476
+ let params: { siteId: string, deploymentId: string };
1477
+
1478
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1479
+ params = (paramsOrFirst || {}) as { siteId: string, deploymentId: string };
1480
+ } else {
1481
+ params = {
1482
+ siteId: paramsOrFirst as string,
1483
+ deploymentId: rest[0] as string
1484
+ };
1485
+ }
1486
+
1487
+ const siteId = params.siteId;
1488
+ const deploymentId = params.deploymentId;
1489
+
812
1490
  if (typeof siteId === 'undefined') {
813
1491
  throw new AppwriteException('Missing required parameter: "siteId"');
814
1492
  }
815
1493
  if (typeof deploymentId === 'undefined') {
816
1494
  throw new AppwriteException('Missing required parameter: "deploymentId"');
817
1495
  }
1496
+
818
1497
  const apiPath = '/sites/{siteId}/deployments/{deploymentId}/status'.replace('{siteId}', siteId).replace('{deploymentId}', deploymentId);
819
1498
  const payload: Payload = {};
820
1499
  const uri = new URL(this.client.config.endpoint + apiPath);
@@ -834,20 +1513,56 @@ export class Sites {
834
1513
  /**
835
1514
  * Get a list of all site logs. You can use the query params to filter your results.
836
1515
  *
837
- * @param {string} siteId
838
- * @param {string[]} queries
1516
+ * @param {string} params.siteId - Site ID.
1517
+ * @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: trigger, status, responseStatusCode, duration, requestMethod, requestPath, deploymentId
1518
+ * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
839
1519
  * @throws {AppwriteException}
840
1520
  * @returns {Promise<Models.ExecutionList>}
841
1521
  */
842
- listLogs(siteId: string, queries?: string[]): Promise<Models.ExecutionList> {
1522
+ listLogs(params: { siteId: string, queries?: string[], total?: boolean }): Promise<Models.ExecutionList>;
1523
+ /**
1524
+ * Get a list of all site logs. You can use the query params to filter your results.
1525
+ *
1526
+ * @param {string} siteId - Site ID.
1527
+ * @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: trigger, status, responseStatusCode, duration, requestMethod, requestPath, deploymentId
1528
+ * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
1529
+ * @throws {AppwriteException}
1530
+ * @returns {Promise<Models.ExecutionList>}
1531
+ * @deprecated Use the object parameter style method for a better developer experience.
1532
+ */
1533
+ listLogs(siteId: string, queries?: string[], total?: boolean): Promise<Models.ExecutionList>;
1534
+ listLogs(
1535
+ paramsOrFirst: { siteId: string, queries?: string[], total?: boolean } | string,
1536
+ ...rest: [(string[])?, (boolean)?]
1537
+ ): Promise<Models.ExecutionList> {
1538
+ let params: { siteId: string, queries?: string[], total?: boolean };
1539
+
1540
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1541
+ params = (paramsOrFirst || {}) as { siteId: string, queries?: string[], total?: boolean };
1542
+ } else {
1543
+ params = {
1544
+ siteId: paramsOrFirst as string,
1545
+ queries: rest[0] as string[],
1546
+ total: rest[1] as boolean
1547
+ };
1548
+ }
1549
+
1550
+ const siteId = params.siteId;
1551
+ const queries = params.queries;
1552
+ const total = params.total;
1553
+
843
1554
  if (typeof siteId === 'undefined') {
844
1555
  throw new AppwriteException('Missing required parameter: "siteId"');
845
1556
  }
1557
+
846
1558
  const apiPath = '/sites/{siteId}/logs'.replace('{siteId}', siteId);
847
1559
  const payload: Payload = {};
848
1560
  if (typeof queries !== 'undefined') {
849
1561
  payload['queries'] = queries;
850
1562
  }
1563
+ if (typeof total !== 'undefined') {
1564
+ payload['total'] = total;
1565
+ }
851
1566
  const uri = new URL(this.client.config.endpoint + apiPath);
852
1567
 
853
1568
  const apiHeaders: { [header: string]: string } = {
@@ -864,18 +1579,47 @@ export class Sites {
864
1579
  /**
865
1580
  * Get a site request log by its unique ID.
866
1581
  *
867
- * @param {string} siteId
868
- * @param {string} logId
1582
+ * @param {string} params.siteId - Site ID.
1583
+ * @param {string} params.logId - Log ID.
869
1584
  * @throws {AppwriteException}
870
1585
  * @returns {Promise<Models.Execution>}
871
1586
  */
872
- getLog(siteId: string, logId: string): Promise<Models.Execution> {
1587
+ getLog(params: { siteId: string, logId: string }): Promise<Models.Execution>;
1588
+ /**
1589
+ * Get a site request log by its unique ID.
1590
+ *
1591
+ * @param {string} siteId - Site ID.
1592
+ * @param {string} logId - Log ID.
1593
+ * @throws {AppwriteException}
1594
+ * @returns {Promise<Models.Execution>}
1595
+ * @deprecated Use the object parameter style method for a better developer experience.
1596
+ */
1597
+ getLog(siteId: string, logId: string): Promise<Models.Execution>;
1598
+ getLog(
1599
+ paramsOrFirst: { siteId: string, logId: string } | string,
1600
+ ...rest: [(string)?]
1601
+ ): Promise<Models.Execution> {
1602
+ let params: { siteId: string, logId: string };
1603
+
1604
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1605
+ params = (paramsOrFirst || {}) as { siteId: string, logId: string };
1606
+ } else {
1607
+ params = {
1608
+ siteId: paramsOrFirst as string,
1609
+ logId: rest[0] as string
1610
+ };
1611
+ }
1612
+
1613
+ const siteId = params.siteId;
1614
+ const logId = params.logId;
1615
+
873
1616
  if (typeof siteId === 'undefined') {
874
1617
  throw new AppwriteException('Missing required parameter: "siteId"');
875
1618
  }
876
1619
  if (typeof logId === 'undefined') {
877
1620
  throw new AppwriteException('Missing required parameter: "logId"');
878
1621
  }
1622
+
879
1623
  const apiPath = '/sites/{siteId}/logs/{logId}'.replace('{siteId}', siteId).replace('{logId}', logId);
880
1624
  const payload: Payload = {};
881
1625
  const uri = new URL(this.client.config.endpoint + apiPath);
@@ -894,18 +1638,47 @@ export class Sites {
894
1638
  /**
895
1639
  * Delete a site log by its unique ID.
896
1640
  *
897
- * @param {string} siteId
898
- * @param {string} logId
1641
+ * @param {string} params.siteId - Site ID.
1642
+ * @param {string} params.logId - Log ID.
899
1643
  * @throws {AppwriteException}
900
1644
  * @returns {Promise<{}>}
901
1645
  */
902
- deleteLog(siteId: string, logId: string): Promise<{}> {
1646
+ deleteLog(params: { siteId: string, logId: string }): Promise<{}>;
1647
+ /**
1648
+ * Delete a site log by its unique ID.
1649
+ *
1650
+ * @param {string} siteId - Site ID.
1651
+ * @param {string} logId - Log ID.
1652
+ * @throws {AppwriteException}
1653
+ * @returns {Promise<{}>}
1654
+ * @deprecated Use the object parameter style method for a better developer experience.
1655
+ */
1656
+ deleteLog(siteId: string, logId: string): Promise<{}>;
1657
+ deleteLog(
1658
+ paramsOrFirst: { siteId: string, logId: string } | string,
1659
+ ...rest: [(string)?]
1660
+ ): Promise<{}> {
1661
+ let params: { siteId: string, logId: string };
1662
+
1663
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1664
+ params = (paramsOrFirst || {}) as { siteId: string, logId: string };
1665
+ } else {
1666
+ params = {
1667
+ siteId: paramsOrFirst as string,
1668
+ logId: rest[0] as string
1669
+ };
1670
+ }
1671
+
1672
+ const siteId = params.siteId;
1673
+ const logId = params.logId;
1674
+
903
1675
  if (typeof siteId === 'undefined') {
904
1676
  throw new AppwriteException('Missing required parameter: "siteId"');
905
1677
  }
906
1678
  if (typeof logId === 'undefined') {
907
1679
  throw new AppwriteException('Missing required parameter: "logId"');
908
1680
  }
1681
+
909
1682
  const apiPath = '/sites/{siteId}/logs/{logId}'.replace('{siteId}', siteId).replace('{logId}', logId);
910
1683
  const payload: Payload = {};
911
1684
  const uri = new URL(this.client.config.endpoint + apiPath);
@@ -925,15 +1698,44 @@ export class Sites {
925
1698
  /**
926
1699
  * Get usage metrics and statistics for a for a specific site. View statistics including total deployments, builds, executions, storage usage, and compute time. The response includes both current totals and historical data for each metric. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, defaults to 30 days.
927
1700
  *
928
- * @param {string} siteId
929
- * @param {SiteUsageRange} range
1701
+ * @param {string} params.siteId - Site ID.
1702
+ * @param {UsageRange} params.range - Date range.
1703
+ * @throws {AppwriteException}
1704
+ * @returns {Promise<Models.UsageSite>}
1705
+ */
1706
+ getUsage(params: { siteId: string, range?: UsageRange }): Promise<Models.UsageSite>;
1707
+ /**
1708
+ * Get usage metrics and statistics for a for a specific site. View statistics including total deployments, builds, executions, storage usage, and compute time. The response includes both current totals and historical data for each metric. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, defaults to 30 days.
1709
+ *
1710
+ * @param {string} siteId - Site ID.
1711
+ * @param {UsageRange} range - Date range.
930
1712
  * @throws {AppwriteException}
931
1713
  * @returns {Promise<Models.UsageSite>}
1714
+ * @deprecated Use the object parameter style method for a better developer experience.
932
1715
  */
933
- getUsage(siteId: string, range?: SiteUsageRange): Promise<Models.UsageSite> {
1716
+ getUsage(siteId: string, range?: UsageRange): Promise<Models.UsageSite>;
1717
+ getUsage(
1718
+ paramsOrFirst: { siteId: string, range?: UsageRange } | string,
1719
+ ...rest: [(UsageRange)?]
1720
+ ): Promise<Models.UsageSite> {
1721
+ let params: { siteId: string, range?: UsageRange };
1722
+
1723
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1724
+ params = (paramsOrFirst || {}) as { siteId: string, range?: UsageRange };
1725
+ } else {
1726
+ params = {
1727
+ siteId: paramsOrFirst as string,
1728
+ range: rest[0] as UsageRange
1729
+ };
1730
+ }
1731
+
1732
+ const siteId = params.siteId;
1733
+ const range = params.range;
1734
+
934
1735
  if (typeof siteId === 'undefined') {
935
1736
  throw new AppwriteException('Missing required parameter: "siteId"');
936
1737
  }
1738
+
937
1739
  const apiPath = '/sites/{siteId}/usage'.replace('{siteId}', siteId);
938
1740
  const payload: Payload = {};
939
1741
  if (typeof range !== 'undefined') {
@@ -955,14 +1757,39 @@ export class Sites {
955
1757
  /**
956
1758
  * Get a list of all variables of a specific site.
957
1759
  *
958
- * @param {string} siteId
1760
+ * @param {string} params.siteId - Site unique ID.
1761
+ * @throws {AppwriteException}
1762
+ * @returns {Promise<Models.VariableList>}
1763
+ */
1764
+ listVariables(params: { siteId: string }): Promise<Models.VariableList>;
1765
+ /**
1766
+ * Get a list of all variables of a specific site.
1767
+ *
1768
+ * @param {string} siteId - Site unique ID.
959
1769
  * @throws {AppwriteException}
960
1770
  * @returns {Promise<Models.VariableList>}
1771
+ * @deprecated Use the object parameter style method for a better developer experience.
961
1772
  */
962
- listVariables(siteId: string): Promise<Models.VariableList> {
1773
+ listVariables(siteId: string): Promise<Models.VariableList>;
1774
+ listVariables(
1775
+ paramsOrFirst: { siteId: string } | string
1776
+ ): Promise<Models.VariableList> {
1777
+ let params: { siteId: string };
1778
+
1779
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1780
+ params = (paramsOrFirst || {}) as { siteId: string };
1781
+ } else {
1782
+ params = {
1783
+ siteId: paramsOrFirst as string
1784
+ };
1785
+ }
1786
+
1787
+ const siteId = params.siteId;
1788
+
963
1789
  if (typeof siteId === 'undefined') {
964
1790
  throw new AppwriteException('Missing required parameter: "siteId"');
965
1791
  }
1792
+
966
1793
  const apiPath = '/sites/{siteId}/variables'.replace('{siteId}', siteId);
967
1794
  const payload: Payload = {};
968
1795
  const uri = new URL(this.client.config.endpoint + apiPath);
@@ -981,14 +1808,48 @@ export class Sites {
981
1808
  /**
982
1809
  * Create a new site variable. These variables can be accessed during build and runtime (server-side rendering) as environment variables.
983
1810
  *
984
- * @param {string} siteId
985
- * @param {string} key
986
- * @param {string} value
987
- * @param {boolean} secret
1811
+ * @param {string} params.siteId - Site unique ID.
1812
+ * @param {string} params.key - Variable key. Max length: 255 chars.
1813
+ * @param {string} params.value - Variable value. Max length: 8192 chars.
1814
+ * @param {boolean} params.secret - Secret variables can be updated or deleted, but only sites can read them during build and runtime.
1815
+ * @throws {AppwriteException}
1816
+ * @returns {Promise<Models.Variable>}
1817
+ */
1818
+ createVariable(params: { siteId: string, key: string, value: string, secret?: boolean }): Promise<Models.Variable>;
1819
+ /**
1820
+ * Create a new site variable. These variables can be accessed during build and runtime (server-side rendering) as environment variables.
1821
+ *
1822
+ * @param {string} siteId - Site unique ID.
1823
+ * @param {string} key - Variable key. Max length: 255 chars.
1824
+ * @param {string} value - Variable value. Max length: 8192 chars.
1825
+ * @param {boolean} secret - Secret variables can be updated or deleted, but only sites can read them during build and runtime.
988
1826
  * @throws {AppwriteException}
989
1827
  * @returns {Promise<Models.Variable>}
1828
+ * @deprecated Use the object parameter style method for a better developer experience.
990
1829
  */
991
- createVariable(siteId: string, key: string, value: string, secret?: boolean): Promise<Models.Variable> {
1830
+ createVariable(siteId: string, key: string, value: string, secret?: boolean): Promise<Models.Variable>;
1831
+ createVariable(
1832
+ paramsOrFirst: { siteId: string, key: string, value: string, secret?: boolean } | string,
1833
+ ...rest: [(string)?, (string)?, (boolean)?]
1834
+ ): Promise<Models.Variable> {
1835
+ let params: { siteId: string, key: string, value: string, secret?: boolean };
1836
+
1837
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1838
+ params = (paramsOrFirst || {}) as { siteId: string, key: string, value: string, secret?: boolean };
1839
+ } else {
1840
+ params = {
1841
+ siteId: paramsOrFirst as string,
1842
+ key: rest[0] as string,
1843
+ value: rest[1] as string,
1844
+ secret: rest[2] as boolean
1845
+ };
1846
+ }
1847
+
1848
+ const siteId = params.siteId;
1849
+ const key = params.key;
1850
+ const value = params.value;
1851
+ const secret = params.secret;
1852
+
992
1853
  if (typeof siteId === 'undefined') {
993
1854
  throw new AppwriteException('Missing required parameter: "siteId"');
994
1855
  }
@@ -998,6 +1859,7 @@ export class Sites {
998
1859
  if (typeof value === 'undefined') {
999
1860
  throw new AppwriteException('Missing required parameter: "value"');
1000
1861
  }
1862
+
1001
1863
  const apiPath = '/sites/{siteId}/variables'.replace('{siteId}', siteId);
1002
1864
  const payload: Payload = {};
1003
1865
  if (typeof key !== 'undefined') {
@@ -1026,18 +1888,47 @@ export class Sites {
1026
1888
  /**
1027
1889
  * Get a variable by its unique ID.
1028
1890
  *
1029
- * @param {string} siteId
1030
- * @param {string} variableId
1891
+ * @param {string} params.siteId - Site unique ID.
1892
+ * @param {string} params.variableId - Variable unique ID.
1031
1893
  * @throws {AppwriteException}
1032
1894
  * @returns {Promise<Models.Variable>}
1033
1895
  */
1034
- getVariable(siteId: string, variableId: string): Promise<Models.Variable> {
1896
+ getVariable(params: { siteId: string, variableId: string }): Promise<Models.Variable>;
1897
+ /**
1898
+ * Get a variable by its unique ID.
1899
+ *
1900
+ * @param {string} siteId - Site unique ID.
1901
+ * @param {string} variableId - Variable unique ID.
1902
+ * @throws {AppwriteException}
1903
+ * @returns {Promise<Models.Variable>}
1904
+ * @deprecated Use the object parameter style method for a better developer experience.
1905
+ */
1906
+ getVariable(siteId: string, variableId: string): Promise<Models.Variable>;
1907
+ getVariable(
1908
+ paramsOrFirst: { siteId: string, variableId: string } | string,
1909
+ ...rest: [(string)?]
1910
+ ): Promise<Models.Variable> {
1911
+ let params: { siteId: string, variableId: string };
1912
+
1913
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1914
+ params = (paramsOrFirst || {}) as { siteId: string, variableId: string };
1915
+ } else {
1916
+ params = {
1917
+ siteId: paramsOrFirst as string,
1918
+ variableId: rest[0] as string
1919
+ };
1920
+ }
1921
+
1922
+ const siteId = params.siteId;
1923
+ const variableId = params.variableId;
1924
+
1035
1925
  if (typeof siteId === 'undefined') {
1036
1926
  throw new AppwriteException('Missing required parameter: "siteId"');
1037
1927
  }
1038
1928
  if (typeof variableId === 'undefined') {
1039
1929
  throw new AppwriteException('Missing required parameter: "variableId"');
1040
1930
  }
1931
+
1041
1932
  const apiPath = '/sites/{siteId}/variables/{variableId}'.replace('{siteId}', siteId).replace('{variableId}', variableId);
1042
1933
  const payload: Payload = {};
1043
1934
  const uri = new URL(this.client.config.endpoint + apiPath);
@@ -1056,15 +1947,52 @@ export class Sites {
1056
1947
  /**
1057
1948
  * Update variable by its unique ID.
1058
1949
  *
1059
- * @param {string} siteId
1060
- * @param {string} variableId
1061
- * @param {string} key
1062
- * @param {string} value
1063
- * @param {boolean} secret
1950
+ * @param {string} params.siteId - Site unique ID.
1951
+ * @param {string} params.variableId - Variable unique ID.
1952
+ * @param {string} params.key - Variable key. Max length: 255 chars.
1953
+ * @param {string} params.value - Variable value. Max length: 8192 chars.
1954
+ * @param {boolean} params.secret - Secret variables can be updated or deleted, but only sites can read them during build and runtime.
1955
+ * @throws {AppwriteException}
1956
+ * @returns {Promise<Models.Variable>}
1957
+ */
1958
+ updateVariable(params: { siteId: string, variableId: string, key: string, value?: string, secret?: boolean }): Promise<Models.Variable>;
1959
+ /**
1960
+ * Update variable by its unique ID.
1961
+ *
1962
+ * @param {string} siteId - Site unique ID.
1963
+ * @param {string} variableId - Variable unique ID.
1964
+ * @param {string} key - Variable key. Max length: 255 chars.
1965
+ * @param {string} value - Variable value. Max length: 8192 chars.
1966
+ * @param {boolean} secret - Secret variables can be updated or deleted, but only sites can read them during build and runtime.
1064
1967
  * @throws {AppwriteException}
1065
1968
  * @returns {Promise<Models.Variable>}
1969
+ * @deprecated Use the object parameter style method for a better developer experience.
1066
1970
  */
1067
- updateVariable(siteId: string, variableId: string, key: string, value?: string, secret?: boolean): Promise<Models.Variable> {
1971
+ updateVariable(siteId: string, variableId: string, key: string, value?: string, secret?: boolean): Promise<Models.Variable>;
1972
+ updateVariable(
1973
+ paramsOrFirst: { siteId: string, variableId: string, key: string, value?: string, secret?: boolean } | string,
1974
+ ...rest: [(string)?, (string)?, (string)?, (boolean)?]
1975
+ ): Promise<Models.Variable> {
1976
+ let params: { siteId: string, variableId: string, key: string, value?: string, secret?: boolean };
1977
+
1978
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1979
+ params = (paramsOrFirst || {}) as { siteId: string, variableId: string, key: string, value?: string, secret?: boolean };
1980
+ } else {
1981
+ params = {
1982
+ siteId: paramsOrFirst as string,
1983
+ variableId: rest[0] as string,
1984
+ key: rest[1] as string,
1985
+ value: rest[2] as string,
1986
+ secret: rest[3] as boolean
1987
+ };
1988
+ }
1989
+
1990
+ const siteId = params.siteId;
1991
+ const variableId = params.variableId;
1992
+ const key = params.key;
1993
+ const value = params.value;
1994
+ const secret = params.secret;
1995
+
1068
1996
  if (typeof siteId === 'undefined') {
1069
1997
  throw new AppwriteException('Missing required parameter: "siteId"');
1070
1998
  }
@@ -1074,6 +2002,7 @@ export class Sites {
1074
2002
  if (typeof key === 'undefined') {
1075
2003
  throw new AppwriteException('Missing required parameter: "key"');
1076
2004
  }
2005
+
1077
2006
  const apiPath = '/sites/{siteId}/variables/{variableId}'.replace('{siteId}', siteId).replace('{variableId}', variableId);
1078
2007
  const payload: Payload = {};
1079
2008
  if (typeof key !== 'undefined') {
@@ -1102,18 +2031,47 @@ export class Sites {
1102
2031
  /**
1103
2032
  * Delete a variable by its unique ID.
1104
2033
  *
1105
- * @param {string} siteId
1106
- * @param {string} variableId
2034
+ * @param {string} params.siteId - Site unique ID.
2035
+ * @param {string} params.variableId - Variable unique ID.
1107
2036
  * @throws {AppwriteException}
1108
2037
  * @returns {Promise<{}>}
1109
2038
  */
1110
- deleteVariable(siteId: string, variableId: string): Promise<{}> {
2039
+ deleteVariable(params: { siteId: string, variableId: string }): Promise<{}>;
2040
+ /**
2041
+ * Delete a variable by its unique ID.
2042
+ *
2043
+ * @param {string} siteId - Site unique ID.
2044
+ * @param {string} variableId - Variable unique ID.
2045
+ * @throws {AppwriteException}
2046
+ * @returns {Promise<{}>}
2047
+ * @deprecated Use the object parameter style method for a better developer experience.
2048
+ */
2049
+ deleteVariable(siteId: string, variableId: string): Promise<{}>;
2050
+ deleteVariable(
2051
+ paramsOrFirst: { siteId: string, variableId: string } | string,
2052
+ ...rest: [(string)?]
2053
+ ): Promise<{}> {
2054
+ let params: { siteId: string, variableId: string };
2055
+
2056
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
2057
+ params = (paramsOrFirst || {}) as { siteId: string, variableId: string };
2058
+ } else {
2059
+ params = {
2060
+ siteId: paramsOrFirst as string,
2061
+ variableId: rest[0] as string
2062
+ };
2063
+ }
2064
+
2065
+ const siteId = params.siteId;
2066
+ const variableId = params.variableId;
2067
+
1111
2068
  if (typeof siteId === 'undefined') {
1112
2069
  throw new AppwriteException('Missing required parameter: "siteId"');
1113
2070
  }
1114
2071
  if (typeof variableId === 'undefined') {
1115
2072
  throw new AppwriteException('Missing required parameter: "variableId"');
1116
2073
  }
2074
+
1117
2075
  const apiPath = '/sites/{siteId}/variables/{variableId}'.replace('{siteId}', siteId).replace('{variableId}', variableId);
1118
2076
  const payload: Payload = {};
1119
2077
  const uri = new URL(this.client.config.endpoint + apiPath);