@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,9 +1,11 @@
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 { Runtime } from '../enums/runtime';
5
- import { FunctionUsageRange } from '../enums/function-usage-range';
6
- import { VCSDeploymentType } from '../enums/v-c-s-deployment-type';
6
+ import { UsageRange } from '../enums/usage-range';
7
+ import { TemplateReferenceType } from '../enums/template-reference-type';
8
+ import { VCSReferenceType } from '../enums/vcs-reference-type';
7
9
  import { DeploymentDownloadType } from '../enums/deployment-download-type';
8
10
  import { ExecutionMethod } from '../enums/execution-method';
9
11
 
@@ -15,14 +17,47 @@ export class Functions {
15
17
  }
16
18
 
17
19
  /**
18
- * Get a list of all the project's functions. You can use the query params to filter your results.
20
+ * Get a list of all the project's functions. You can use the query params to filter your results.
21
+ *
22
+ * @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, runtime, deploymentId, schedule, scheduleNext, schedulePrevious, timeout, entrypoint, commands, installationId
23
+ * @param {string} params.search - Search term to filter your list results. Max length: 256 chars.
24
+ * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
25
+ * @throws {AppwriteException}
26
+ * @returns {Promise<Models.FunctionList>}
27
+ */
28
+ list(params?: { queries?: string[], search?: string, total?: boolean }): Promise<Models.FunctionList>;
29
+ /**
30
+ * Get a list of all the project's functions. You can use the query params to filter your results.
19
31
  *
20
- * @param {string[]} queries
21
- * @param {string} search
32
+ * @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, runtime, deploymentId, schedule, scheduleNext, schedulePrevious, timeout, entrypoint, commands, installationId
33
+ * @param {string} search - Search term to filter your list results. Max length: 256 chars.
34
+ * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
22
35
  * @throws {AppwriteException}
23
36
  * @returns {Promise<Models.FunctionList>}
37
+ * @deprecated Use the object parameter style method for a better developer experience.
24
38
  */
25
- list(queries?: string[], search?: string): Promise<Models.FunctionList> {
39
+ list(queries?: string[], search?: string, total?: boolean): Promise<Models.FunctionList>;
40
+ list(
41
+ paramsOrFirst?: { queries?: string[], search?: string, total?: boolean } | string[],
42
+ ...rest: [(string)?, (boolean)?]
43
+ ): Promise<Models.FunctionList> {
44
+ let params: { queries?: string[], search?: string, total?: boolean };
45
+
46
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
47
+ params = (paramsOrFirst || {}) as { queries?: string[], search?: string, total?: boolean };
48
+ } else {
49
+ params = {
50
+ queries: paramsOrFirst as string[],
51
+ search: rest[0] as string,
52
+ total: rest[1] as boolean
53
+ };
54
+ }
55
+
56
+ const queries = params.queries;
57
+ const search = params.search;
58
+ const total = params.total;
59
+
60
+
26
61
  const apiPath = '/functions';
27
62
  const payload: Payload = {};
28
63
  if (typeof queries !== 'undefined') {
@@ -31,6 +66,9 @@ export class Functions {
31
66
  if (typeof search !== 'undefined') {
32
67
  payload['search'] = search;
33
68
  }
69
+ if (typeof total !== 'undefined') {
70
+ payload['total'] = total;
71
+ }
34
72
  const uri = new URL(this.client.config.endpoint + apiPath);
35
73
 
36
74
  const apiHeaders: { [header: string]: string } = {
@@ -47,28 +85,104 @@ export class Functions {
47
85
  /**
48
86
  * Create a new function. You can pass a list of [permissions](https://appwrite.io/docs/permissions) to allow different project users or team with access to execute the function using the client API.
49
87
  *
50
- * @param {string} functionId
51
- * @param {string} name
52
- * @param {Runtime} runtime
53
- * @param {string[]} execute
54
- * @param {string[]} events
55
- * @param {string} schedule
56
- * @param {number} timeout
57
- * @param {boolean} enabled
58
- * @param {boolean} logging
59
- * @param {string} entrypoint
60
- * @param {string} commands
61
- * @param {string[]} scopes
62
- * @param {string} installationId
63
- * @param {string} providerRepositoryId
64
- * @param {string} providerBranch
65
- * @param {boolean} providerSilentMode
66
- * @param {string} providerRootDirectory
67
- * @param {string} specification
88
+ * @param {string} params.functionId - Function 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.
89
+ * @param {string} params.name - Function name. Max length: 128 chars.
90
+ * @param {Runtime} params.runtime - Execution runtime.
91
+ * @param {string[]} params.execute - An array of role strings with execution permissions. By default no user is granted with any execute permissions. [learn more about roles](https://appwrite.io/docs/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.
92
+ * @param {string[]} params.events - Events list. Maximum of 100 events are allowed.
93
+ * @param {string} params.schedule - Schedule CRON syntax.
94
+ * @param {number} params.timeout - Function maximum execution time in seconds.
95
+ * @param {boolean} params.enabled - Is function enabled? When set to 'disabled', users cannot access the function but Server SDKs with and API key can still access the function. No data is lost when this is toggled.
96
+ * @param {boolean} params.logging - When disabled, executions will exclude logs and errors, and will be slightly faster.
97
+ * @param {string} params.entrypoint - Entrypoint File. This path is relative to the "providerRootDirectory".
98
+ * @param {string} params.commands - Build Commands.
99
+ * @param {string[]} params.scopes - List of scopes allowed for API key auto-generated for every execution. Maximum of 100 scopes are allowed.
100
+ * @param {string} params.installationId - Appwrite Installation ID for VCS (Version Control System) deployment.
101
+ * @param {string} params.providerRepositoryId - Repository ID of the repo linked to the function.
102
+ * @param {string} params.providerBranch - Production branch for the repo linked to the function.
103
+ * @param {boolean} params.providerSilentMode - Is the VCS (Version Control System) connection in silent mode for the repo linked to the function? In silent mode, comments will not be made on commits and pull requests.
104
+ * @param {string} params.providerRootDirectory - Path to function code in the linked repo.
105
+ * @param {string} params.specification - Runtime specification for the function and builds.
106
+ * @throws {AppwriteException}
107
+ * @returns {Promise<Models.Function>}
108
+ */
109
+ create(params: { functionId: string, name: string, runtime: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: string[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, specification?: string }): Promise<Models.Function>;
110
+ /**
111
+ * Create a new function. You can pass a list of [permissions](https://appwrite.io/docs/permissions) to allow different project users or team with access to execute the function using the client API.
112
+ *
113
+ * @param {string} functionId - Function 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.
114
+ * @param {string} name - Function name. Max length: 128 chars.
115
+ * @param {Runtime} runtime - Execution runtime.
116
+ * @param {string[]} execute - An array of role strings with execution permissions. By default no user is granted with any execute permissions. [learn more about roles](https://appwrite.io/docs/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.
117
+ * @param {string[]} events - Events list. Maximum of 100 events are allowed.
118
+ * @param {string} schedule - Schedule CRON syntax.
119
+ * @param {number} timeout - Function maximum execution time in seconds.
120
+ * @param {boolean} enabled - Is function enabled? When set to 'disabled', users cannot access the function but Server SDKs with and API key can still access the function. No data is lost when this is toggled.
121
+ * @param {boolean} logging - When disabled, executions will exclude logs and errors, and will be slightly faster.
122
+ * @param {string} entrypoint - Entrypoint File. This path is relative to the "providerRootDirectory".
123
+ * @param {string} commands - Build Commands.
124
+ * @param {string[]} scopes - List of scopes allowed for API key auto-generated for every execution. Maximum of 100 scopes are allowed.
125
+ * @param {string} installationId - Appwrite Installation ID for VCS (Version Control System) deployment.
126
+ * @param {string} providerRepositoryId - Repository ID of the repo linked to the function.
127
+ * @param {string} providerBranch - Production branch for the repo linked to the function.
128
+ * @param {boolean} providerSilentMode - Is the VCS (Version Control System) connection in silent mode for the repo linked to the function? In silent mode, comments will not be made on commits and pull requests.
129
+ * @param {string} providerRootDirectory - Path to function code in the linked repo.
130
+ * @param {string} specification - Runtime specification for the function and builds.
68
131
  * @throws {AppwriteException}
69
132
  * @returns {Promise<Models.Function>}
133
+ * @deprecated Use the object parameter style method for a better developer experience.
70
134
  */
71
- create(functionId: string, name: string, runtime: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: string[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, specification?: string): Promise<Models.Function> {
135
+ create(functionId: string, name: string, runtime: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: string[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, specification?: string): Promise<Models.Function>;
136
+ create(
137
+ paramsOrFirst: { functionId: string, name: string, runtime: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: string[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, specification?: string } | string,
138
+ ...rest: [(string)?, (Runtime)?, (string[])?, (string[])?, (string)?, (number)?, (boolean)?, (boolean)?, (string)?, (string)?, (string[])?, (string)?, (string)?, (string)?, (boolean)?, (string)?, (string)?]
139
+ ): Promise<Models.Function> {
140
+ let params: { functionId: string, name: string, runtime: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: string[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, specification?: string };
141
+
142
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
143
+ params = (paramsOrFirst || {}) as { functionId: string, name: string, runtime: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: string[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, specification?: string };
144
+ } else {
145
+ params = {
146
+ functionId: paramsOrFirst as string,
147
+ name: rest[0] as string,
148
+ runtime: rest[1] as Runtime,
149
+ execute: rest[2] as string[],
150
+ events: rest[3] as string[],
151
+ schedule: rest[4] as string,
152
+ timeout: rest[5] as number,
153
+ enabled: rest[6] as boolean,
154
+ logging: rest[7] as boolean,
155
+ entrypoint: rest[8] as string,
156
+ commands: rest[9] as string,
157
+ scopes: rest[10] as string[],
158
+ installationId: rest[11] as string,
159
+ providerRepositoryId: rest[12] as string,
160
+ providerBranch: rest[13] as string,
161
+ providerSilentMode: rest[14] as boolean,
162
+ providerRootDirectory: rest[15] as string,
163
+ specification: rest[16] as string
164
+ };
165
+ }
166
+
167
+ const functionId = params.functionId;
168
+ const name = params.name;
169
+ const runtime = params.runtime;
170
+ const execute = params.execute;
171
+ const events = params.events;
172
+ const schedule = params.schedule;
173
+ const timeout = params.timeout;
174
+ const enabled = params.enabled;
175
+ const logging = params.logging;
176
+ const entrypoint = params.entrypoint;
177
+ const commands = params.commands;
178
+ const scopes = params.scopes;
179
+ const installationId = params.installationId;
180
+ const providerRepositoryId = params.providerRepositoryId;
181
+ const providerBranch = params.providerBranch;
182
+ const providerSilentMode = params.providerSilentMode;
183
+ const providerRootDirectory = params.providerRootDirectory;
184
+ const specification = params.specification;
185
+
72
186
  if (typeof functionId === 'undefined') {
73
187
  throw new AppwriteException('Missing required parameter: "functionId"');
74
188
  }
@@ -78,6 +192,7 @@ export class Functions {
78
192
  if (typeof runtime === 'undefined') {
79
193
  throw new AppwriteException('Missing required parameter: "runtime"');
80
194
  }
195
+
81
196
  const apiPath = '/functions';
82
197
  const payload: Payload = {};
83
198
  if (typeof functionId !== 'undefined') {
@@ -155,6 +270,7 @@ export class Functions {
155
270
  * @returns {Promise<Models.RuntimeList>}
156
271
  */
157
272
  listRuntimes(): Promise<Models.RuntimeList> {
273
+
158
274
  const apiPath = '/functions/runtimes';
159
275
  const payload: Payload = {};
160
276
  const uri = new URL(this.client.config.endpoint + apiPath);
@@ -177,6 +293,7 @@ export class Functions {
177
293
  * @returns {Promise<Models.SpecificationList>}
178
294
  */
179
295
  listSpecifications(): Promise<Models.SpecificationList> {
296
+
180
297
  const apiPath = '/functions/specifications';
181
298
  const payload: Payload = {};
182
299
  const uri = new URL(this.client.config.endpoint + apiPath);
@@ -195,14 +312,53 @@ export class Functions {
195
312
  /**
196
313
  * List available function templates. You can use template details in [createFunction](/docs/references/cloud/server-nodejs/functions#create) method.
197
314
  *
198
- * @param {string[]} runtimes
199
- * @param {string[]} useCases
200
- * @param {number} limit
201
- * @param {number} offset
315
+ * @param {string[]} params.runtimes - List of runtimes allowed for filtering function templates. Maximum of 100 runtimes are allowed.
316
+ * @param {string[]} params.useCases - List of use cases allowed for filtering function templates. Maximum of 100 use cases are allowed.
317
+ * @param {number} params.limit - Limit the number of templates returned in the response. Default limit is 25, and maximum limit is 5000.
318
+ * @param {number} params.offset - Offset the list of returned templates. Maximum offset is 5000.
319
+ * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
320
+ * @throws {AppwriteException}
321
+ * @returns {Promise<Models.TemplateFunctionList>}
322
+ */
323
+ listTemplates(params?: { runtimes?: string[], useCases?: string[], limit?: number, offset?: number, total?: boolean }): Promise<Models.TemplateFunctionList>;
324
+ /**
325
+ * List available function templates. You can use template details in [createFunction](/docs/references/cloud/server-nodejs/functions#create) method.
326
+ *
327
+ * @param {string[]} runtimes - List of runtimes allowed for filtering function templates. Maximum of 100 runtimes are allowed.
328
+ * @param {string[]} useCases - List of use cases allowed for filtering function templates. Maximum of 100 use cases are allowed.
329
+ * @param {number} limit - Limit the number of templates returned in the response. Default limit is 25, and maximum limit is 5000.
330
+ * @param {number} offset - Offset the list of returned templates. Maximum offset is 5000.
331
+ * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
202
332
  * @throws {AppwriteException}
203
333
  * @returns {Promise<Models.TemplateFunctionList>}
334
+ * @deprecated Use the object parameter style method for a better developer experience.
204
335
  */
205
- listTemplates(runtimes?: string[], useCases?: string[], limit?: number, offset?: number): Promise<Models.TemplateFunctionList> {
336
+ listTemplates(runtimes?: string[], useCases?: string[], limit?: number, offset?: number, total?: boolean): Promise<Models.TemplateFunctionList>;
337
+ listTemplates(
338
+ paramsOrFirst?: { runtimes?: string[], useCases?: string[], limit?: number, offset?: number, total?: boolean } | string[],
339
+ ...rest: [(string[])?, (number)?, (number)?, (boolean)?]
340
+ ): Promise<Models.TemplateFunctionList> {
341
+ let params: { runtimes?: string[], useCases?: string[], limit?: number, offset?: number, total?: boolean };
342
+
343
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
344
+ params = (paramsOrFirst || {}) as { runtimes?: string[], useCases?: string[], limit?: number, offset?: number, total?: boolean };
345
+ } else {
346
+ params = {
347
+ runtimes: paramsOrFirst as string[],
348
+ useCases: rest[0] as string[],
349
+ limit: rest[1] as number,
350
+ offset: rest[2] as number,
351
+ total: rest[3] as boolean
352
+ };
353
+ }
354
+
355
+ const runtimes = params.runtimes;
356
+ const useCases = params.useCases;
357
+ const limit = params.limit;
358
+ const offset = params.offset;
359
+ const total = params.total;
360
+
361
+
206
362
  const apiPath = '/functions/templates';
207
363
  const payload: Payload = {};
208
364
  if (typeof runtimes !== 'undefined') {
@@ -217,6 +373,9 @@ export class Functions {
217
373
  if (typeof offset !== 'undefined') {
218
374
  payload['offset'] = offset;
219
375
  }
376
+ if (typeof total !== 'undefined') {
377
+ payload['total'] = total;
378
+ }
220
379
  const uri = new URL(this.client.config.endpoint + apiPath);
221
380
 
222
381
  const apiHeaders: { [header: string]: string } = {
@@ -233,14 +392,39 @@ export class Functions {
233
392
  /**
234
393
  * Get a function template using ID. You can use template details in [createFunction](/docs/references/cloud/server-nodejs/functions#create) method.
235
394
  *
236
- * @param {string} templateId
395
+ * @param {string} params.templateId - Template ID.
396
+ * @throws {AppwriteException}
397
+ * @returns {Promise<Models.TemplateFunction>}
398
+ */
399
+ getTemplate(params: { templateId: string }): Promise<Models.TemplateFunction>;
400
+ /**
401
+ * Get a function template using ID. You can use template details in [createFunction](/docs/references/cloud/server-nodejs/functions#create) method.
402
+ *
403
+ * @param {string} templateId - Template ID.
237
404
  * @throws {AppwriteException}
238
405
  * @returns {Promise<Models.TemplateFunction>}
406
+ * @deprecated Use the object parameter style method for a better developer experience.
239
407
  */
240
- getTemplate(templateId: string): Promise<Models.TemplateFunction> {
408
+ getTemplate(templateId: string): Promise<Models.TemplateFunction>;
409
+ getTemplate(
410
+ paramsOrFirst: { templateId: string } | string
411
+ ): Promise<Models.TemplateFunction> {
412
+ let params: { templateId: string };
413
+
414
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
415
+ params = (paramsOrFirst || {}) as { templateId: string };
416
+ } else {
417
+ params = {
418
+ templateId: paramsOrFirst as string
419
+ };
420
+ }
421
+
422
+ const templateId = params.templateId;
423
+
241
424
  if (typeof templateId === 'undefined') {
242
425
  throw new AppwriteException('Missing required parameter: "templateId"');
243
426
  }
427
+
244
428
  const apiPath = '/functions/templates/{templateId}'.replace('{templateId}', templateId);
245
429
  const payload: Payload = {};
246
430
  const uri = new URL(this.client.config.endpoint + apiPath);
@@ -259,11 +443,36 @@ export class Functions {
259
443
  /**
260
444
  * Get usage metrics and statistics for all functions 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.
261
445
  *
262
- * @param {FunctionUsageRange} range
446
+ * @param {UsageRange} params.range - Date range.
263
447
  * @throws {AppwriteException}
264
448
  * @returns {Promise<Models.UsageFunctions>}
265
449
  */
266
- listUsage(range?: FunctionUsageRange): Promise<Models.UsageFunctions> {
450
+ listUsage(params?: { range?: UsageRange }): Promise<Models.UsageFunctions>;
451
+ /**
452
+ * Get usage metrics and statistics for all functions 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.
453
+ *
454
+ * @param {UsageRange} range - Date range.
455
+ * @throws {AppwriteException}
456
+ * @returns {Promise<Models.UsageFunctions>}
457
+ * @deprecated Use the object parameter style method for a better developer experience.
458
+ */
459
+ listUsage(range?: UsageRange): Promise<Models.UsageFunctions>;
460
+ listUsage(
461
+ paramsOrFirst?: { range?: UsageRange } | UsageRange
462
+ ): Promise<Models.UsageFunctions> {
463
+ let params: { range?: UsageRange };
464
+
465
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'range' in paramsOrFirst)) {
466
+ params = (paramsOrFirst || {}) as { range?: UsageRange };
467
+ } else {
468
+ params = {
469
+ range: paramsOrFirst as UsageRange
470
+ };
471
+ }
472
+
473
+ const range = params.range;
474
+
475
+
267
476
  const apiPath = '/functions/usage';
268
477
  const payload: Payload = {};
269
478
  if (typeof range !== 'undefined') {
@@ -285,14 +494,39 @@ export class Functions {
285
494
  /**
286
495
  * Get a function by its unique ID.
287
496
  *
288
- * @param {string} functionId
497
+ * @param {string} params.functionId - Function ID.
289
498
  * @throws {AppwriteException}
290
499
  * @returns {Promise<Models.Function>}
291
500
  */
292
- get(functionId: string): Promise<Models.Function> {
501
+ get(params: { functionId: string }): Promise<Models.Function>;
502
+ /**
503
+ * Get a function by its unique ID.
504
+ *
505
+ * @param {string} functionId - Function ID.
506
+ * @throws {AppwriteException}
507
+ * @returns {Promise<Models.Function>}
508
+ * @deprecated Use the object parameter style method for a better developer experience.
509
+ */
510
+ get(functionId: string): Promise<Models.Function>;
511
+ get(
512
+ paramsOrFirst: { functionId: string } | string
513
+ ): Promise<Models.Function> {
514
+ let params: { functionId: string };
515
+
516
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
517
+ params = (paramsOrFirst || {}) as { functionId: string };
518
+ } else {
519
+ params = {
520
+ functionId: paramsOrFirst as string
521
+ };
522
+ }
523
+
524
+ const functionId = params.functionId;
525
+
293
526
  if (typeof functionId === 'undefined') {
294
527
  throw new AppwriteException('Missing required parameter: "functionId"');
295
528
  }
529
+
296
530
  const apiPath = '/functions/{functionId}'.replace('{functionId}', functionId);
297
531
  const payload: Payload = {};
298
532
  const uri = new URL(this.client.config.endpoint + apiPath);
@@ -311,34 +545,111 @@ export class Functions {
311
545
  /**
312
546
  * Update function by its unique ID.
313
547
  *
314
- * @param {string} functionId
315
- * @param {string} name
316
- * @param {Runtime} runtime
317
- * @param {string[]} execute
318
- * @param {string[]} events
319
- * @param {string} schedule
320
- * @param {number} timeout
321
- * @param {boolean} enabled
322
- * @param {boolean} logging
323
- * @param {string} entrypoint
324
- * @param {string} commands
325
- * @param {string[]} scopes
326
- * @param {string} installationId
327
- * @param {string} providerRepositoryId
328
- * @param {string} providerBranch
329
- * @param {boolean} providerSilentMode
330
- * @param {string} providerRootDirectory
331
- * @param {string} specification
548
+ * @param {string} params.functionId - Function ID.
549
+ * @param {string} params.name - Function name. Max length: 128 chars.
550
+ * @param {Runtime} params.runtime - Execution runtime.
551
+ * @param {string[]} params.execute - An array of role strings with execution permissions. By default no user is granted with any execute permissions. [learn more about roles](https://appwrite.io/docs/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.
552
+ * @param {string[]} params.events - Events list. Maximum of 100 events are allowed.
553
+ * @param {string} params.schedule - Schedule CRON syntax.
554
+ * @param {number} params.timeout - Maximum execution time in seconds.
555
+ * @param {boolean} params.enabled - Is function enabled? When set to 'disabled', users cannot access the function but Server SDKs with and API key can still access the function. No data is lost when this is toggled.
556
+ * @param {boolean} params.logging - When disabled, executions will exclude logs and errors, and will be slightly faster.
557
+ * @param {string} params.entrypoint - Entrypoint File. This path is relative to the "providerRootDirectory".
558
+ * @param {string} params.commands - Build Commands.
559
+ * @param {string[]} params.scopes - List of scopes allowed for API Key auto-generated for every execution. Maximum of 100 scopes are allowed.
560
+ * @param {string} params.installationId - Appwrite Installation ID for VCS (Version Controle System) deployment.
561
+ * @param {string} params.providerRepositoryId - Repository ID of the repo linked to the function
562
+ * @param {string} params.providerBranch - Production branch for the repo linked to the function
563
+ * @param {boolean} params.providerSilentMode - Is the VCS (Version Control System) connection in silent mode for the repo linked to the function? In silent mode, comments will not be made on commits and pull requests.
564
+ * @param {string} params.providerRootDirectory - Path to function code in the linked repo.
565
+ * @param {string} params.specification - Runtime specification for the function and builds.
566
+ * @throws {AppwriteException}
567
+ * @returns {Promise<Models.Function>}
568
+ */
569
+ update(params: { functionId: string, name: string, runtime?: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: string[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, specification?: string }): Promise<Models.Function>;
570
+ /**
571
+ * Update function by its unique ID.
572
+ *
573
+ * @param {string} functionId - Function ID.
574
+ * @param {string} name - Function name. Max length: 128 chars.
575
+ * @param {Runtime} runtime - Execution runtime.
576
+ * @param {string[]} execute - An array of role strings with execution permissions. By default no user is granted with any execute permissions. [learn more about roles](https://appwrite.io/docs/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.
577
+ * @param {string[]} events - Events list. Maximum of 100 events are allowed.
578
+ * @param {string} schedule - Schedule CRON syntax.
579
+ * @param {number} timeout - Maximum execution time in seconds.
580
+ * @param {boolean} enabled - Is function enabled? When set to 'disabled', users cannot access the function but Server SDKs with and API key can still access the function. No data is lost when this is toggled.
581
+ * @param {boolean} logging - When disabled, executions will exclude logs and errors, and will be slightly faster.
582
+ * @param {string} entrypoint - Entrypoint File. This path is relative to the "providerRootDirectory".
583
+ * @param {string} commands - Build Commands.
584
+ * @param {string[]} scopes - List of scopes allowed for API Key auto-generated for every execution. Maximum of 100 scopes are allowed.
585
+ * @param {string} installationId - Appwrite Installation ID for VCS (Version Controle System) deployment.
586
+ * @param {string} providerRepositoryId - Repository ID of the repo linked to the function
587
+ * @param {string} providerBranch - Production branch for the repo linked to the function
588
+ * @param {boolean} providerSilentMode - Is the VCS (Version Control System) connection in silent mode for the repo linked to the function? In silent mode, comments will not be made on commits and pull requests.
589
+ * @param {string} providerRootDirectory - Path to function code in the linked repo.
590
+ * @param {string} specification - Runtime specification for the function and builds.
332
591
  * @throws {AppwriteException}
333
592
  * @returns {Promise<Models.Function>}
593
+ * @deprecated Use the object parameter style method for a better developer experience.
334
594
  */
335
- update(functionId: string, name: string, runtime?: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: string[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, specification?: string): Promise<Models.Function> {
595
+ update(functionId: string, name: string, runtime?: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: string[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, specification?: string): Promise<Models.Function>;
596
+ update(
597
+ paramsOrFirst: { functionId: string, name: string, runtime?: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: string[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, specification?: string } | string,
598
+ ...rest: [(string)?, (Runtime)?, (string[])?, (string[])?, (string)?, (number)?, (boolean)?, (boolean)?, (string)?, (string)?, (string[])?, (string)?, (string)?, (string)?, (boolean)?, (string)?, (string)?]
599
+ ): Promise<Models.Function> {
600
+ let params: { functionId: string, name: string, runtime?: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: string[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, specification?: string };
601
+
602
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
603
+ params = (paramsOrFirst || {}) as { functionId: string, name: string, runtime?: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: string[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, specification?: string };
604
+ } else {
605
+ params = {
606
+ functionId: paramsOrFirst as string,
607
+ name: rest[0] as string,
608
+ runtime: rest[1] as Runtime,
609
+ execute: rest[2] as string[],
610
+ events: rest[3] as string[],
611
+ schedule: rest[4] as string,
612
+ timeout: rest[5] as number,
613
+ enabled: rest[6] as boolean,
614
+ logging: rest[7] as boolean,
615
+ entrypoint: rest[8] as string,
616
+ commands: rest[9] as string,
617
+ scopes: rest[10] as string[],
618
+ installationId: rest[11] as string,
619
+ providerRepositoryId: rest[12] as string,
620
+ providerBranch: rest[13] as string,
621
+ providerSilentMode: rest[14] as boolean,
622
+ providerRootDirectory: rest[15] as string,
623
+ specification: rest[16] as string
624
+ };
625
+ }
626
+
627
+ const functionId = params.functionId;
628
+ const name = params.name;
629
+ const runtime = params.runtime;
630
+ const execute = params.execute;
631
+ const events = params.events;
632
+ const schedule = params.schedule;
633
+ const timeout = params.timeout;
634
+ const enabled = params.enabled;
635
+ const logging = params.logging;
636
+ const entrypoint = params.entrypoint;
637
+ const commands = params.commands;
638
+ const scopes = params.scopes;
639
+ const installationId = params.installationId;
640
+ const providerRepositoryId = params.providerRepositoryId;
641
+ const providerBranch = params.providerBranch;
642
+ const providerSilentMode = params.providerSilentMode;
643
+ const providerRootDirectory = params.providerRootDirectory;
644
+ const specification = params.specification;
645
+
336
646
  if (typeof functionId === 'undefined') {
337
647
  throw new AppwriteException('Missing required parameter: "functionId"');
338
648
  }
339
649
  if (typeof name === 'undefined') {
340
650
  throw new AppwriteException('Missing required parameter: "name"');
341
651
  }
652
+
342
653
  const apiPath = '/functions/{functionId}'.replace('{functionId}', functionId);
343
654
  const payload: Payload = {};
344
655
  if (typeof name !== 'undefined') {
@@ -409,14 +720,39 @@ export class Functions {
409
720
  /**
410
721
  * Delete a function by its unique ID.
411
722
  *
412
- * @param {string} functionId
723
+ * @param {string} params.functionId - Function ID.
413
724
  * @throws {AppwriteException}
414
725
  * @returns {Promise<{}>}
415
726
  */
416
- delete(functionId: string): Promise<{}> {
727
+ delete(params: { functionId: string }): Promise<{}>;
728
+ /**
729
+ * Delete a function by its unique ID.
730
+ *
731
+ * @param {string} functionId - Function ID.
732
+ * @throws {AppwriteException}
733
+ * @returns {Promise<{}>}
734
+ * @deprecated Use the object parameter style method for a better developer experience.
735
+ */
736
+ delete(functionId: string): Promise<{}>;
737
+ delete(
738
+ paramsOrFirst: { functionId: string } | string
739
+ ): Promise<{}> {
740
+ let params: { functionId: string };
741
+
742
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
743
+ params = (paramsOrFirst || {}) as { functionId: string };
744
+ } else {
745
+ params = {
746
+ functionId: paramsOrFirst as string
747
+ };
748
+ }
749
+
750
+ const functionId = params.functionId;
751
+
417
752
  if (typeof functionId === 'undefined') {
418
753
  throw new AppwriteException('Missing required parameter: "functionId"');
419
754
  }
755
+
420
756
  const apiPath = '/functions/{functionId}'.replace('{functionId}', functionId);
421
757
  const payload: Payload = {};
422
758
  const uri = new URL(this.client.config.endpoint + apiPath);
@@ -436,18 +772,47 @@ export class Functions {
436
772
  /**
437
773
  * Update the function active deployment. Use this endpoint to switch the code deployment that should be used when visitor opens your function.
438
774
  *
439
- * @param {string} functionId
440
- * @param {string} deploymentId
775
+ * @param {string} params.functionId - Function ID.
776
+ * @param {string} params.deploymentId - Deployment ID.
441
777
  * @throws {AppwriteException}
442
778
  * @returns {Promise<Models.Function>}
443
779
  */
444
- updateFunctionDeployment(functionId: string, deploymentId: string): Promise<Models.Function> {
780
+ updateFunctionDeployment(params: { functionId: string, deploymentId: string }): Promise<Models.Function>;
781
+ /**
782
+ * Update the function active deployment. Use this endpoint to switch the code deployment that should be used when visitor opens your function.
783
+ *
784
+ * @param {string} functionId - Function ID.
785
+ * @param {string} deploymentId - Deployment ID.
786
+ * @throws {AppwriteException}
787
+ * @returns {Promise<Models.Function>}
788
+ * @deprecated Use the object parameter style method for a better developer experience.
789
+ */
790
+ updateFunctionDeployment(functionId: string, deploymentId: string): Promise<Models.Function>;
791
+ updateFunctionDeployment(
792
+ paramsOrFirst: { functionId: string, deploymentId: string } | string,
793
+ ...rest: [(string)?]
794
+ ): Promise<Models.Function> {
795
+ let params: { functionId: string, deploymentId: string };
796
+
797
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
798
+ params = (paramsOrFirst || {}) as { functionId: string, deploymentId: string };
799
+ } else {
800
+ params = {
801
+ functionId: paramsOrFirst as string,
802
+ deploymentId: rest[0] as string
803
+ };
804
+ }
805
+
806
+ const functionId = params.functionId;
807
+ const deploymentId = params.deploymentId;
808
+
445
809
  if (typeof functionId === 'undefined') {
446
810
  throw new AppwriteException('Missing required parameter: "functionId"');
447
811
  }
448
812
  if (typeof deploymentId === 'undefined') {
449
813
  throw new AppwriteException('Missing required parameter: "deploymentId"');
450
814
  }
815
+
451
816
  const apiPath = '/functions/{functionId}/deployment'.replace('{functionId}', functionId);
452
817
  const payload: Payload = {};
453
818
  if (typeof deploymentId !== 'undefined') {
@@ -468,18 +833,54 @@ export class Functions {
468
833
  }
469
834
 
470
835
  /**
471
- * Get a list of all the function&#039;s code deployments. You can use the query params to filter your results.
836
+ * Get a list of all the function's code deployments. You can use the query params to filter your results.
472
837
  *
473
- * @param {string} functionId
474
- * @param {string[]} queries
475
- * @param {string} search
838
+ * @param {string} params.functionId - Function 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.
476
842
  * @throws {AppwriteException}
477
843
  * @returns {Promise<Models.DeploymentList>}
478
844
  */
479
- listDeployments(functionId: string, queries?: string[], search?: string): Promise<Models.DeploymentList> {
845
+ listDeployments(params: { functionId: string, queries?: string[], search?: string, total?: boolean }): Promise<Models.DeploymentList>;
846
+ /**
847
+ * Get a list of all the function's code deployments. You can use the query params to filter your results.
848
+ *
849
+ * @param {string} functionId - Function 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.
853
+ * @throws {AppwriteException}
854
+ * @returns {Promise<Models.DeploymentList>}
855
+ * @deprecated Use the object parameter style method for a better developer experience.
856
+ */
857
+ listDeployments(functionId: string, queries?: string[], search?: string, total?: boolean): Promise<Models.DeploymentList>;
858
+ listDeployments(
859
+ paramsOrFirst: { functionId: string, queries?: string[], search?: string, total?: boolean } | string,
860
+ ...rest: [(string[])?, (string)?, (boolean)?]
861
+ ): Promise<Models.DeploymentList> {
862
+ let params: { functionId: string, queries?: string[], search?: string, total?: boolean };
863
+
864
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
865
+ params = (paramsOrFirst || {}) as { functionId: string, queries?: string[], search?: string, total?: boolean };
866
+ } else {
867
+ params = {
868
+ functionId: 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 functionId = params.functionId;
876
+ const queries = params.queries;
877
+ const search = params.search;
878
+ const total = params.total;
879
+
480
880
  if (typeof functionId === 'undefined') {
481
881
  throw new AppwriteException('Missing required parameter: "functionId"');
482
882
  }
883
+
483
884
  const apiPath = '/functions/{functionId}/deployments'.replace('{functionId}', functionId);
484
885
  const payload: Payload = {};
485
886
  if (typeof queries !== 'undefined') {
@@ -488,6 +889,9 @@ export class Functions {
488
889
  if (typeof search !== 'undefined') {
489
890
  payload['search'] = search;
490
891
  }
892
+ if (typeof total !== 'undefined') {
893
+ payload['total'] = total;
894
+ }
491
895
  const uri = new URL(this.client.config.endpoint + apiPath);
492
896
 
493
897
  const apiHeaders: { [header: string]: string } = {
@@ -502,21 +906,65 @@ export class Functions {
502
906
  }
503
907
 
504
908
  /**
505
- * Create a new function code deployment. Use this endpoint to upload a new version of your code function. To execute your newly uploaded code, you&#039;ll need to update the function&#039;s deployment to use your new deployment UID.
909
+ * Create a new function code deployment. Use this endpoint to upload a new version of your code function. To execute your newly uploaded code, you'll need to update the function's deployment to use your new deployment UID.
910
+ *
911
+ * This endpoint accepts a tar.gz file compressed with your code. Make sure to include any dependencies your code has within the compressed file. You can learn more about code packaging in the [Appwrite Cloud Functions tutorial](https://appwrite.io/docs/functions).
912
+ *
913
+ * Use the "command" param to set the entrypoint used to execute your code.
914
+ *
915
+ * @param {string} params.functionId - Function ID.
916
+ * @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.
917
+ * @param {boolean} params.activate - Automatically activate the deployment when it is finished building.
918
+ * @param {string} params.entrypoint - Entrypoint File.
919
+ * @param {string} params.commands - Build Commands.
920
+ * @throws {AppwriteException}
921
+ * @returns {Promise<Models.Deployment>}
922
+ */
923
+ createDeployment(params: { functionId: string, code: File, activate: boolean, entrypoint?: string, commands?: string , onProgress?: (progress: UploadProgress) => void }): Promise<Models.Deployment>;
924
+ /**
925
+ * Create a new function code deployment. Use this endpoint to upload a new version of your code function. To execute your newly uploaded code, you'll need to update the function's deployment to use your new deployment UID.
506
926
  *
507
927
  * This endpoint accepts a tar.gz file compressed with your code. Make sure to include any dependencies your code has within the compressed file. You can learn more about code packaging in the [Appwrite Cloud Functions tutorial](https://appwrite.io/docs/functions).
508
928
  *
509
- * Use the &quot;command&quot; param to set the entrypoint used to execute your code.
929
+ * Use the "command" param to set the entrypoint used to execute your code.
510
930
  *
511
- * @param {string} functionId
512
- * @param {File} code
513
- * @param {boolean} activate
514
- * @param {string} entrypoint
515
- * @param {string} commands
931
+ * @param {string} functionId - Function ID.
932
+ * @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.
933
+ * @param {boolean} activate - Automatically activate the deployment when it is finished building.
934
+ * @param {string} entrypoint - Entrypoint File.
935
+ * @param {string} commands - Build Commands.
516
936
  * @throws {AppwriteException}
517
937
  * @returns {Promise<Models.Deployment>}
938
+ * @deprecated Use the object parameter style method for a better developer experience.
518
939
  */
519
- createDeployment(functionId: string, code: File, activate: boolean, entrypoint?: string, commands?: string, onProgress = (progress: UploadProgress) => {}): Promise<Models.Deployment> {
940
+ createDeployment(functionId: string, code: File, activate: boolean, entrypoint?: string, commands?: string, onProgress?: (progress: UploadProgress) => void): Promise<Models.Deployment>;
941
+ createDeployment(
942
+ paramsOrFirst: { functionId: string, code: File, activate: boolean, entrypoint?: string, commands?: string, onProgress?: (progress: UploadProgress) => void } | string,
943
+ ...rest: [(File)?, (boolean)?, (string)?, (string)?,((progress: UploadProgress) => void)?]
944
+ ): Promise<Models.Deployment> {
945
+ let params: { functionId: string, code: File, activate: boolean, entrypoint?: string, commands?: string };
946
+ let onProgress: ((progress: UploadProgress) => void);
947
+
948
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
949
+ params = (paramsOrFirst || {}) as { functionId: string, code: File, activate: boolean, entrypoint?: string, commands?: string };
950
+ onProgress = paramsOrFirst?.onProgress as ((progress: UploadProgress) => void);
951
+ } else {
952
+ params = {
953
+ functionId: paramsOrFirst as string,
954
+ code: rest[0] as File,
955
+ activate: rest[1] as boolean,
956
+ entrypoint: rest[2] as string,
957
+ commands: rest[3] as string
958
+ };
959
+ onProgress = rest[4] as ((progress: UploadProgress) => void);
960
+ }
961
+
962
+ const functionId = params.functionId;
963
+ const code = params.code;
964
+ const activate = params.activate;
965
+ const entrypoint = params.entrypoint;
966
+ const commands = params.commands;
967
+
520
968
  if (typeof functionId === 'undefined') {
521
969
  throw new AppwriteException('Missing required parameter: "functionId"');
522
970
  }
@@ -526,6 +974,7 @@ export class Functions {
526
974
  if (typeof activate === 'undefined') {
527
975
  throw new AppwriteException('Missing required parameter: "activate"');
528
976
  }
977
+
529
978
  const apiPath = '/functions/{functionId}/deployments'.replace('{functionId}', functionId);
530
979
  const payload: Payload = {};
531
980
  if (typeof entrypoint !== 'undefined') {
@@ -556,21 +1005,53 @@ export class Functions {
556
1005
  }
557
1006
 
558
1007
  /**
559
- * Create a new build for an existing function deployment. This endpoint allows you to rebuild a deployment with the updated function configuration, including its entrypoint and build commands 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.
1008
+ * Create a new build for an existing function deployment. This endpoint allows you to rebuild a deployment with the updated function configuration, including its entrypoint and build commands 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.
1009
+ *
1010
+ * @param {string} params.functionId - Function ID.
1011
+ * @param {string} params.deploymentId - Deployment ID.
1012
+ * @param {string} params.buildId - Build unique ID.
1013
+ * @throws {AppwriteException}
1014
+ * @returns {Promise<Models.Deployment>}
1015
+ */
1016
+ createDuplicateDeployment(params: { functionId: string, deploymentId: string, buildId?: string }): Promise<Models.Deployment>;
1017
+ /**
1018
+ * Create a new build for an existing function deployment. This endpoint allows you to rebuild a deployment with the updated function configuration, including its entrypoint and build commands 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.
560
1019
  *
561
- * @param {string} functionId
562
- * @param {string} deploymentId
563
- * @param {string} buildId
1020
+ * @param {string} functionId - Function ID.
1021
+ * @param {string} deploymentId - Deployment ID.
1022
+ * @param {string} buildId - Build unique ID.
564
1023
  * @throws {AppwriteException}
565
1024
  * @returns {Promise<Models.Deployment>}
1025
+ * @deprecated Use the object parameter style method for a better developer experience.
566
1026
  */
567
- createDuplicateDeployment(functionId: string, deploymentId: string, buildId?: string): Promise<Models.Deployment> {
1027
+ createDuplicateDeployment(functionId: string, deploymentId: string, buildId?: string): Promise<Models.Deployment>;
1028
+ createDuplicateDeployment(
1029
+ paramsOrFirst: { functionId: string, deploymentId: string, buildId?: string } | string,
1030
+ ...rest: [(string)?, (string)?]
1031
+ ): Promise<Models.Deployment> {
1032
+ let params: { functionId: string, deploymentId: string, buildId?: string };
1033
+
1034
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1035
+ params = (paramsOrFirst || {}) as { functionId: string, deploymentId: string, buildId?: string };
1036
+ } else {
1037
+ params = {
1038
+ functionId: paramsOrFirst as string,
1039
+ deploymentId: rest[0] as string,
1040
+ buildId: rest[1] as string
1041
+ };
1042
+ }
1043
+
1044
+ const functionId = params.functionId;
1045
+ const deploymentId = params.deploymentId;
1046
+ const buildId = params.buildId;
1047
+
568
1048
  if (typeof functionId === 'undefined') {
569
1049
  throw new AppwriteException('Missing required parameter: "functionId"');
570
1050
  }
571
1051
  if (typeof deploymentId === 'undefined') {
572
1052
  throw new AppwriteException('Missing required parameter: "deploymentId"');
573
1053
  }
1054
+
574
1055
  const apiPath = '/functions/{functionId}/deployments/duplicate'.replace('{functionId}', functionId);
575
1056
  const payload: Payload = {};
576
1057
  if (typeof deploymentId !== 'undefined') {
@@ -596,18 +1077,64 @@ export class Functions {
596
1077
  /**
597
1078
  * Create a deployment based on a template.
598
1079
  *
599
- * Use this endpoint with combination of [listTemplates](https://appwrite.io/docs/server/functions#listTemplates) to find the template details.
1080
+ * Use this endpoint with combination of [listTemplates](https://appwrite.io/docs/products/functions/templates) to find the template details.
1081
+ *
1082
+ * @param {string} params.functionId - Function ID.
1083
+ * @param {string} params.repository - Repository name of the template.
1084
+ * @param {string} params.owner - The name of the owner of the template.
1085
+ * @param {string} params.rootDirectory - Path to function code in the template repo.
1086
+ * @param {TemplateReferenceType} params.type - Type for the reference provided. Can be commit, branch, or tag
1087
+ * @param {string} params.reference - Reference value, can be a commit hash, branch name, or release tag
1088
+ * @param {boolean} params.activate - Automatically activate the deployment when it is finished building.
1089
+ * @throws {AppwriteException}
1090
+ * @returns {Promise<Models.Deployment>}
1091
+ */
1092
+ createTemplateDeployment(params: { functionId: string, repository: string, owner: string, rootDirectory: string, type: TemplateReferenceType, reference: string, activate?: boolean }): Promise<Models.Deployment>;
1093
+ /**
1094
+ * Create a deployment based on a template.
1095
+ *
1096
+ * Use this endpoint with combination of [listTemplates](https://appwrite.io/docs/products/functions/templates) to find the template details.
600
1097
  *
601
- * @param {string} functionId
602
- * @param {string} repository
603
- * @param {string} owner
604
- * @param {string} rootDirectory
605
- * @param {string} version
606
- * @param {boolean} activate
1098
+ * @param {string} functionId - Function ID.
1099
+ * @param {string} repository - Repository name of the template.
1100
+ * @param {string} owner - The name of the owner of the template.
1101
+ * @param {string} rootDirectory - Path to function code in the template repo.
1102
+ * @param {TemplateReferenceType} type - Type for the reference provided. Can be commit, branch, or tag
1103
+ * @param {string} reference - Reference value, can be a commit hash, branch name, or release tag
1104
+ * @param {boolean} activate - Automatically activate the deployment when it is finished building.
607
1105
  * @throws {AppwriteException}
608
1106
  * @returns {Promise<Models.Deployment>}
1107
+ * @deprecated Use the object parameter style method for a better developer experience.
609
1108
  */
610
- createTemplateDeployment(functionId: string, repository: string, owner: string, rootDirectory: string, version: string, activate?: boolean): Promise<Models.Deployment> {
1109
+ createTemplateDeployment(functionId: string, repository: string, owner: string, rootDirectory: string, type: TemplateReferenceType, reference: string, activate?: boolean): Promise<Models.Deployment>;
1110
+ createTemplateDeployment(
1111
+ paramsOrFirst: { functionId: string, repository: string, owner: string, rootDirectory: string, type: TemplateReferenceType, reference: string, activate?: boolean } | string,
1112
+ ...rest: [(string)?, (string)?, (string)?, (TemplateReferenceType)?, (string)?, (boolean)?]
1113
+ ): Promise<Models.Deployment> {
1114
+ let params: { functionId: string, repository: string, owner: string, rootDirectory: string, type: TemplateReferenceType, reference: string, activate?: boolean };
1115
+
1116
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1117
+ params = (paramsOrFirst || {}) as { functionId: string, repository: string, owner: string, rootDirectory: string, type: TemplateReferenceType, reference: string, activate?: boolean };
1118
+ } else {
1119
+ params = {
1120
+ functionId: paramsOrFirst as string,
1121
+ repository: rest[0] as string,
1122
+ owner: rest[1] as string,
1123
+ rootDirectory: rest[2] as string,
1124
+ type: rest[3] as TemplateReferenceType,
1125
+ reference: rest[4] as string,
1126
+ activate: rest[5] as boolean
1127
+ };
1128
+ }
1129
+
1130
+ const functionId = params.functionId;
1131
+ const repository = params.repository;
1132
+ const owner = params.owner;
1133
+ const rootDirectory = params.rootDirectory;
1134
+ const type = params.type;
1135
+ const reference = params.reference;
1136
+ const activate = params.activate;
1137
+
611
1138
  if (typeof functionId === 'undefined') {
612
1139
  throw new AppwriteException('Missing required parameter: "functionId"');
613
1140
  }
@@ -620,9 +1147,13 @@ export class Functions {
620
1147
  if (typeof rootDirectory === 'undefined') {
621
1148
  throw new AppwriteException('Missing required parameter: "rootDirectory"');
622
1149
  }
623
- if (typeof version === 'undefined') {
624
- throw new AppwriteException('Missing required parameter: "version"');
1150
+ if (typeof type === 'undefined') {
1151
+ throw new AppwriteException('Missing required parameter: "type"');
1152
+ }
1153
+ if (typeof reference === 'undefined') {
1154
+ throw new AppwriteException('Missing required parameter: "reference"');
625
1155
  }
1156
+
626
1157
  const apiPath = '/functions/{functionId}/deployments/template'.replace('{functionId}', functionId);
627
1158
  const payload: Payload = {};
628
1159
  if (typeof repository !== 'undefined') {
@@ -634,8 +1165,11 @@ export class Functions {
634
1165
  if (typeof rootDirectory !== 'undefined') {
635
1166
  payload['rootDirectory'] = rootDirectory;
636
1167
  }
637
- if (typeof version !== 'undefined') {
638
- payload['version'] = version;
1168
+ if (typeof type !== 'undefined') {
1169
+ payload['type'] = type;
1170
+ }
1171
+ if (typeof reference !== 'undefined') {
1172
+ payload['reference'] = reference;
639
1173
  }
640
1174
  if (typeof activate !== 'undefined') {
641
1175
  payload['activate'] = activate;
@@ -659,14 +1193,50 @@ export class Functions {
659
1193
  *
660
1194
  * This endpoint lets you create deployment from a branch, commit, or a tag.
661
1195
  *
662
- * @param {string} functionId
663
- * @param {VCSDeploymentType} type
664
- * @param {string} reference
665
- * @param {boolean} activate
1196
+ * @param {string} params.functionId - Function ID.
1197
+ * @param {VCSReferenceType} params.type - Type of reference passed. Allowed values are: branch, commit
1198
+ * @param {string} params.reference - VCS reference to create deployment from. Depending on type this can be: branch name, commit hash
1199
+ * @param {boolean} params.activate - Automatically activate the deployment when it is finished building.
666
1200
  * @throws {AppwriteException}
667
1201
  * @returns {Promise<Models.Deployment>}
668
1202
  */
669
- createVcsDeployment(functionId: string, type: VCSDeploymentType, reference: string, activate?: boolean): Promise<Models.Deployment> {
1203
+ createVcsDeployment(params: { functionId: string, type: VCSReferenceType, reference: string, activate?: boolean }): Promise<Models.Deployment>;
1204
+ /**
1205
+ * Create a deployment when a function is connected to VCS.
1206
+ *
1207
+ * This endpoint lets you create deployment from a branch, commit, or a tag.
1208
+ *
1209
+ * @param {string} functionId - Function ID.
1210
+ * @param {VCSReferenceType} type - Type of reference passed. Allowed values are: branch, commit
1211
+ * @param {string} reference - VCS reference to create deployment from. Depending on type this can be: branch name, commit hash
1212
+ * @param {boolean} activate - Automatically activate the deployment when it is finished building.
1213
+ * @throws {AppwriteException}
1214
+ * @returns {Promise<Models.Deployment>}
1215
+ * @deprecated Use the object parameter style method for a better developer experience.
1216
+ */
1217
+ createVcsDeployment(functionId: string, type: VCSReferenceType, reference: string, activate?: boolean): Promise<Models.Deployment>;
1218
+ createVcsDeployment(
1219
+ paramsOrFirst: { functionId: string, type: VCSReferenceType, reference: string, activate?: boolean } | string,
1220
+ ...rest: [(VCSReferenceType)?, (string)?, (boolean)?]
1221
+ ): Promise<Models.Deployment> {
1222
+ let params: { functionId: string, type: VCSReferenceType, reference: string, activate?: boolean };
1223
+
1224
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1225
+ params = (paramsOrFirst || {}) as { functionId: string, type: VCSReferenceType, reference: string, activate?: boolean };
1226
+ } else {
1227
+ params = {
1228
+ functionId: paramsOrFirst as string,
1229
+ type: rest[0] as VCSReferenceType,
1230
+ reference: rest[1] as string,
1231
+ activate: rest[2] as boolean
1232
+ };
1233
+ }
1234
+
1235
+ const functionId = params.functionId;
1236
+ const type = params.type;
1237
+ const reference = params.reference;
1238
+ const activate = params.activate;
1239
+
670
1240
  if (typeof functionId === 'undefined') {
671
1241
  throw new AppwriteException('Missing required parameter: "functionId"');
672
1242
  }
@@ -676,6 +1246,7 @@ export class Functions {
676
1246
  if (typeof reference === 'undefined') {
677
1247
  throw new AppwriteException('Missing required parameter: "reference"');
678
1248
  }
1249
+
679
1250
  const apiPath = '/functions/{functionId}/deployments/vcs'.replace('{functionId}', functionId);
680
1251
  const payload: Payload = {};
681
1252
  if (typeof type !== 'undefined') {
@@ -704,18 +1275,47 @@ export class Functions {
704
1275
  /**
705
1276
  * Get a function deployment by its unique ID.
706
1277
  *
707
- * @param {string} functionId
708
- * @param {string} deploymentId
1278
+ * @param {string} params.functionId - Function ID.
1279
+ * @param {string} params.deploymentId - Deployment ID.
709
1280
  * @throws {AppwriteException}
710
1281
  * @returns {Promise<Models.Deployment>}
711
1282
  */
712
- getDeployment(functionId: string, deploymentId: string): Promise<Models.Deployment> {
1283
+ getDeployment(params: { functionId: string, deploymentId: string }): Promise<Models.Deployment>;
1284
+ /**
1285
+ * Get a function deployment by its unique ID.
1286
+ *
1287
+ * @param {string} functionId - Function ID.
1288
+ * @param {string} deploymentId - Deployment ID.
1289
+ * @throws {AppwriteException}
1290
+ * @returns {Promise<Models.Deployment>}
1291
+ * @deprecated Use the object parameter style method for a better developer experience.
1292
+ */
1293
+ getDeployment(functionId: string, deploymentId: string): Promise<Models.Deployment>;
1294
+ getDeployment(
1295
+ paramsOrFirst: { functionId: string, deploymentId: string } | string,
1296
+ ...rest: [(string)?]
1297
+ ): Promise<Models.Deployment> {
1298
+ let params: { functionId: string, deploymentId: string };
1299
+
1300
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1301
+ params = (paramsOrFirst || {}) as { functionId: string, deploymentId: string };
1302
+ } else {
1303
+ params = {
1304
+ functionId: paramsOrFirst as string,
1305
+ deploymentId: rest[0] as string
1306
+ };
1307
+ }
1308
+
1309
+ const functionId = params.functionId;
1310
+ const deploymentId = params.deploymentId;
1311
+
713
1312
  if (typeof functionId === 'undefined') {
714
1313
  throw new AppwriteException('Missing required parameter: "functionId"');
715
1314
  }
716
1315
  if (typeof deploymentId === 'undefined') {
717
1316
  throw new AppwriteException('Missing required parameter: "deploymentId"');
718
1317
  }
1318
+
719
1319
  const apiPath = '/functions/{functionId}/deployments/{deploymentId}'.replace('{functionId}', functionId).replace('{deploymentId}', deploymentId);
720
1320
  const payload: Payload = {};
721
1321
  const uri = new URL(this.client.config.endpoint + apiPath);
@@ -734,18 +1334,47 @@ export class Functions {
734
1334
  /**
735
1335
  * Delete a code deployment by its unique ID.
736
1336
  *
737
- * @param {string} functionId
738
- * @param {string} deploymentId
1337
+ * @param {string} params.functionId - Function ID.
1338
+ * @param {string} params.deploymentId - Deployment ID.
739
1339
  * @throws {AppwriteException}
740
1340
  * @returns {Promise<{}>}
741
1341
  */
742
- deleteDeployment(functionId: string, deploymentId: string): Promise<{}> {
1342
+ deleteDeployment(params: { functionId: string, deploymentId: string }): Promise<{}>;
1343
+ /**
1344
+ * Delete a code deployment by its unique ID.
1345
+ *
1346
+ * @param {string} functionId - Function ID.
1347
+ * @param {string} deploymentId - Deployment ID.
1348
+ * @throws {AppwriteException}
1349
+ * @returns {Promise<{}>}
1350
+ * @deprecated Use the object parameter style method for a better developer experience.
1351
+ */
1352
+ deleteDeployment(functionId: string, deploymentId: string): Promise<{}>;
1353
+ deleteDeployment(
1354
+ paramsOrFirst: { functionId: string, deploymentId: string } | string,
1355
+ ...rest: [(string)?]
1356
+ ): Promise<{}> {
1357
+ let params: { functionId: string, deploymentId: string };
1358
+
1359
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1360
+ params = (paramsOrFirst || {}) as { functionId: string, deploymentId: string };
1361
+ } else {
1362
+ params = {
1363
+ functionId: paramsOrFirst as string,
1364
+ deploymentId: rest[0] as string
1365
+ };
1366
+ }
1367
+
1368
+ const functionId = params.functionId;
1369
+ const deploymentId = params.deploymentId;
1370
+
743
1371
  if (typeof functionId === 'undefined') {
744
1372
  throw new AppwriteException('Missing required parameter: "functionId"');
745
1373
  }
746
1374
  if (typeof deploymentId === 'undefined') {
747
1375
  throw new AppwriteException('Missing required parameter: "deploymentId"');
748
1376
  }
1377
+
749
1378
  const apiPath = '/functions/{functionId}/deployments/{deploymentId}'.replace('{functionId}', functionId).replace('{deploymentId}', deploymentId);
750
1379
  const payload: Payload = {};
751
1380
  const uri = new URL(this.client.config.endpoint + apiPath);
@@ -763,21 +1392,53 @@ export class Functions {
763
1392
  }
764
1393
 
765
1394
  /**
766
- * Get a function 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.
1395
+ * Get a function 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.
767
1396
  *
768
- * @param {string} functionId
769
- * @param {string} deploymentId
770
- * @param {DeploymentDownloadType} type
1397
+ * @param {string} params.functionId - Function ID.
1398
+ * @param {string} params.deploymentId - Deployment ID.
1399
+ * @param {DeploymentDownloadType} params.type - Deployment file to download. Can be: "source", "output".
771
1400
  * @throws {AppwriteException}
772
1401
  * @returns {string}
773
1402
  */
774
- getDeploymentDownload(functionId: string, deploymentId: string, type?: DeploymentDownloadType): string {
1403
+ getDeploymentDownload(params: { functionId: string, deploymentId: string, type?: DeploymentDownloadType }): string;
1404
+ /**
1405
+ * Get a function 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.
1406
+ *
1407
+ * @param {string} functionId - Function ID.
1408
+ * @param {string} deploymentId - Deployment ID.
1409
+ * @param {DeploymentDownloadType} type - Deployment file to download. Can be: "source", "output".
1410
+ * @throws {AppwriteException}
1411
+ * @returns {string}
1412
+ * @deprecated Use the object parameter style method for a better developer experience.
1413
+ */
1414
+ getDeploymentDownload(functionId: string, deploymentId: string, type?: DeploymentDownloadType): string;
1415
+ getDeploymentDownload(
1416
+ paramsOrFirst: { functionId: string, deploymentId: string, type?: DeploymentDownloadType } | string,
1417
+ ...rest: [(string)?, (DeploymentDownloadType)?]
1418
+ ): string {
1419
+ let params: { functionId: string, deploymentId: string, type?: DeploymentDownloadType };
1420
+
1421
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1422
+ params = (paramsOrFirst || {}) as { functionId: string, deploymentId: string, type?: DeploymentDownloadType };
1423
+ } else {
1424
+ params = {
1425
+ functionId: paramsOrFirst as string,
1426
+ deploymentId: rest[0] as string,
1427
+ type: rest[1] as DeploymentDownloadType
1428
+ };
1429
+ }
1430
+
1431
+ const functionId = params.functionId;
1432
+ const deploymentId = params.deploymentId;
1433
+ const type = params.type;
1434
+
775
1435
  if (typeof functionId === 'undefined') {
776
1436
  throw new AppwriteException('Missing required parameter: "functionId"');
777
1437
  }
778
1438
  if (typeof deploymentId === 'undefined') {
779
1439
  throw new AppwriteException('Missing required parameter: "deploymentId"');
780
1440
  }
1441
+
781
1442
  const apiPath = '/functions/{functionId}/deployments/{deploymentId}/download'.replace('{functionId}', functionId).replace('{deploymentId}', deploymentId);
782
1443
  const payload: Payload = {};
783
1444
  if (typeof type !== 'undefined') {
@@ -798,20 +1459,49 @@ export class Functions {
798
1459
  }
799
1460
 
800
1461
  /**
801
- * Cancel an ongoing function 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.
1462
+ * Cancel an ongoing function 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.
802
1463
  *
803
- * @param {string} functionId
804
- * @param {string} deploymentId
1464
+ * @param {string} params.functionId - Function ID.
1465
+ * @param {string} params.deploymentId - Deployment ID.
805
1466
  * @throws {AppwriteException}
806
1467
  * @returns {Promise<Models.Deployment>}
807
1468
  */
808
- updateDeploymentStatus(functionId: string, deploymentId: string): Promise<Models.Deployment> {
1469
+ updateDeploymentStatus(params: { functionId: string, deploymentId: string }): Promise<Models.Deployment>;
1470
+ /**
1471
+ * Cancel an ongoing function 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.
1472
+ *
1473
+ * @param {string} functionId - Function ID.
1474
+ * @param {string} deploymentId - Deployment ID.
1475
+ * @throws {AppwriteException}
1476
+ * @returns {Promise<Models.Deployment>}
1477
+ * @deprecated Use the object parameter style method for a better developer experience.
1478
+ */
1479
+ updateDeploymentStatus(functionId: string, deploymentId: string): Promise<Models.Deployment>;
1480
+ updateDeploymentStatus(
1481
+ paramsOrFirst: { functionId: string, deploymentId: string } | string,
1482
+ ...rest: [(string)?]
1483
+ ): Promise<Models.Deployment> {
1484
+ let params: { functionId: string, deploymentId: string };
1485
+
1486
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1487
+ params = (paramsOrFirst || {}) as { functionId: string, deploymentId: string };
1488
+ } else {
1489
+ params = {
1490
+ functionId: paramsOrFirst as string,
1491
+ deploymentId: rest[0] as string
1492
+ };
1493
+ }
1494
+
1495
+ const functionId = params.functionId;
1496
+ const deploymentId = params.deploymentId;
1497
+
809
1498
  if (typeof functionId === 'undefined') {
810
1499
  throw new AppwriteException('Missing required parameter: "functionId"');
811
1500
  }
812
1501
  if (typeof deploymentId === 'undefined') {
813
1502
  throw new AppwriteException('Missing required parameter: "deploymentId"');
814
1503
  }
1504
+
815
1505
  const apiPath = '/functions/{functionId}/deployments/{deploymentId}/status'.replace('{functionId}', functionId).replace('{deploymentId}', deploymentId);
816
1506
  const payload: Payload = {};
817
1507
  const uri = new URL(this.client.config.endpoint + apiPath);
@@ -831,20 +1521,56 @@ export class Functions {
831
1521
  /**
832
1522
  * Get a list of all the current user function execution logs. You can use the query params to filter your results.
833
1523
  *
834
- * @param {string} functionId
835
- * @param {string[]} queries
1524
+ * @param {string} params.functionId - Function ID.
1525
+ * @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
1526
+ * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
836
1527
  * @throws {AppwriteException}
837
1528
  * @returns {Promise<Models.ExecutionList>}
838
1529
  */
839
- listExecutions(functionId: string, queries?: string[]): Promise<Models.ExecutionList> {
1530
+ listExecutions(params: { functionId: string, queries?: string[], total?: boolean }): Promise<Models.ExecutionList>;
1531
+ /**
1532
+ * Get a list of all the current user function execution logs. You can use the query params to filter your results.
1533
+ *
1534
+ * @param {string} functionId - Function ID.
1535
+ * @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
1536
+ * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
1537
+ * @throws {AppwriteException}
1538
+ * @returns {Promise<Models.ExecutionList>}
1539
+ * @deprecated Use the object parameter style method for a better developer experience.
1540
+ */
1541
+ listExecutions(functionId: string, queries?: string[], total?: boolean): Promise<Models.ExecutionList>;
1542
+ listExecutions(
1543
+ paramsOrFirst: { functionId: string, queries?: string[], total?: boolean } | string,
1544
+ ...rest: [(string[])?, (boolean)?]
1545
+ ): Promise<Models.ExecutionList> {
1546
+ let params: { functionId: string, queries?: string[], total?: boolean };
1547
+
1548
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1549
+ params = (paramsOrFirst || {}) as { functionId: string, queries?: string[], total?: boolean };
1550
+ } else {
1551
+ params = {
1552
+ functionId: paramsOrFirst as string,
1553
+ queries: rest[0] as string[],
1554
+ total: rest[1] as boolean
1555
+ };
1556
+ }
1557
+
1558
+ const functionId = params.functionId;
1559
+ const queries = params.queries;
1560
+ const total = params.total;
1561
+
840
1562
  if (typeof functionId === 'undefined') {
841
1563
  throw new AppwriteException('Missing required parameter: "functionId"');
842
1564
  }
1565
+
843
1566
  const apiPath = '/functions/{functionId}/executions'.replace('{functionId}', functionId);
844
1567
  const payload: Payload = {};
845
1568
  if (typeof queries !== 'undefined') {
846
1569
  payload['queries'] = queries;
847
1570
  }
1571
+ if (typeof total !== 'undefined') {
1572
+ payload['total'] = total;
1573
+ }
848
1574
  const uri = new URL(this.client.config.endpoint + apiPath);
849
1575
 
850
1576
  const apiHeaders: { [header: string]: string } = {
@@ -861,20 +1587,64 @@ export class Functions {
861
1587
  /**
862
1588
  * Trigger a function execution. The returned object will return you the current execution status. You can ping the `Get Execution` endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously.
863
1589
  *
864
- * @param {string} functionId
865
- * @param {string} body
866
- * @param {boolean} async
867
- * @param {string} xpath
868
- * @param {ExecutionMethod} method
869
- * @param {object} headers
870
- * @param {string} scheduledAt
1590
+ * @param {string} params.functionId - Function ID.
1591
+ * @param {string} params.body - HTTP body of execution. Default value is empty string.
1592
+ * @param {boolean} params.async - Execute code in the background. Default value is false.
1593
+ * @param {string} params.xpath - HTTP path of execution. Path can include query params. Default value is /
1594
+ * @param {ExecutionMethod} params.method - HTTP method of execution. Default value is POST.
1595
+ * @param {object} params.headers - HTTP headers of execution. Defaults to empty.
1596
+ * @param {string} params.scheduledAt - Scheduled execution time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future with precision in minutes.
1597
+ * @throws {AppwriteException}
1598
+ * @returns {Promise<Models.Execution>}
1599
+ */
1600
+ createExecution(params: { functionId: string, body?: string, async?: boolean, xpath?: string, method?: ExecutionMethod, headers?: object, scheduledAt?: string }): Promise<Models.Execution>;
1601
+ /**
1602
+ * Trigger a function execution. The returned object will return you the current execution status. You can ping the `Get Execution` endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously.
1603
+ *
1604
+ * @param {string} functionId - Function ID.
1605
+ * @param {string} body - HTTP body of execution. Default value is empty string.
1606
+ * @param {boolean} async - Execute code in the background. Default value is false.
1607
+ * @param {string} xpath - HTTP path of execution. Path can include query params. Default value is /
1608
+ * @param {ExecutionMethod} method - HTTP method of execution. Default value is POST.
1609
+ * @param {object} headers - HTTP headers of execution. Defaults to empty.
1610
+ * @param {string} scheduledAt - Scheduled execution time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future with precision in minutes.
871
1611
  * @throws {AppwriteException}
872
1612
  * @returns {Promise<Models.Execution>}
1613
+ * @deprecated Use the object parameter style method for a better developer experience.
873
1614
  */
874
- createExecution(functionId: string, body?: string, async?: boolean, xpath?: string, method?: ExecutionMethod, headers?: object, scheduledAt?: string): Promise<Models.Execution> {
1615
+ createExecution(functionId: string, body?: string, async?: boolean, xpath?: string, method?: ExecutionMethod, headers?: object, scheduledAt?: string): Promise<Models.Execution>;
1616
+ createExecution(
1617
+ paramsOrFirst: { functionId: string, body?: string, async?: boolean, xpath?: string, method?: ExecutionMethod, headers?: object, scheduledAt?: string } | string,
1618
+ ...rest: [(string)?, (boolean)?, (string)?, (ExecutionMethod)?, (object)?, (string)?]
1619
+ ): Promise<Models.Execution> {
1620
+ let params: { functionId: string, body?: string, async?: boolean, xpath?: string, method?: ExecutionMethod, headers?: object, scheduledAt?: string };
1621
+
1622
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1623
+ params = (paramsOrFirst || {}) as { functionId: string, body?: string, async?: boolean, xpath?: string, method?: ExecutionMethod, headers?: object, scheduledAt?: string };
1624
+ } else {
1625
+ params = {
1626
+ functionId: paramsOrFirst as string,
1627
+ body: rest[0] as string,
1628
+ async: rest[1] as boolean,
1629
+ xpath: rest[2] as string,
1630
+ method: rest[3] as ExecutionMethod,
1631
+ headers: rest[4] as object,
1632
+ scheduledAt: rest[5] as string
1633
+ };
1634
+ }
1635
+
1636
+ const functionId = params.functionId;
1637
+ const body = params.body;
1638
+ const async = params.async;
1639
+ const xpath = params.xpath;
1640
+ const method = params.method;
1641
+ const headers = params.headers;
1642
+ const scheduledAt = params.scheduledAt;
1643
+
875
1644
  if (typeof functionId === 'undefined') {
876
1645
  throw new AppwriteException('Missing required parameter: "functionId"');
877
1646
  }
1647
+
878
1648
  const apiPath = '/functions/{functionId}/executions'.replace('{functionId}', functionId);
879
1649
  const payload: Payload = {};
880
1650
  if (typeof body !== 'undefined') {
@@ -912,18 +1682,47 @@ export class Functions {
912
1682
  /**
913
1683
  * Get a function execution log by its unique ID.
914
1684
  *
915
- * @param {string} functionId
916
- * @param {string} executionId
1685
+ * @param {string} params.functionId - Function ID.
1686
+ * @param {string} params.executionId - Execution ID.
1687
+ * @throws {AppwriteException}
1688
+ * @returns {Promise<Models.Execution>}
1689
+ */
1690
+ getExecution(params: { functionId: string, executionId: string }): Promise<Models.Execution>;
1691
+ /**
1692
+ * Get a function execution log by its unique ID.
1693
+ *
1694
+ * @param {string} functionId - Function ID.
1695
+ * @param {string} executionId - Execution ID.
917
1696
  * @throws {AppwriteException}
918
1697
  * @returns {Promise<Models.Execution>}
1698
+ * @deprecated Use the object parameter style method for a better developer experience.
919
1699
  */
920
- getExecution(functionId: string, executionId: string): Promise<Models.Execution> {
1700
+ getExecution(functionId: string, executionId: string): Promise<Models.Execution>;
1701
+ getExecution(
1702
+ paramsOrFirst: { functionId: string, executionId: string } | string,
1703
+ ...rest: [(string)?]
1704
+ ): Promise<Models.Execution> {
1705
+ let params: { functionId: string, executionId: string };
1706
+
1707
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1708
+ params = (paramsOrFirst || {}) as { functionId: string, executionId: string };
1709
+ } else {
1710
+ params = {
1711
+ functionId: paramsOrFirst as string,
1712
+ executionId: rest[0] as string
1713
+ };
1714
+ }
1715
+
1716
+ const functionId = params.functionId;
1717
+ const executionId = params.executionId;
1718
+
921
1719
  if (typeof functionId === 'undefined') {
922
1720
  throw new AppwriteException('Missing required parameter: "functionId"');
923
1721
  }
924
1722
  if (typeof executionId === 'undefined') {
925
1723
  throw new AppwriteException('Missing required parameter: "executionId"');
926
1724
  }
1725
+
927
1726
  const apiPath = '/functions/{functionId}/executions/{executionId}'.replace('{functionId}', functionId).replace('{executionId}', executionId);
928
1727
  const payload: Payload = {};
929
1728
  const uri = new URL(this.client.config.endpoint + apiPath);
@@ -942,18 +1741,47 @@ export class Functions {
942
1741
  /**
943
1742
  * Delete a function execution by its unique ID.
944
1743
  *
945
- * @param {string} functionId
946
- * @param {string} executionId
1744
+ * @param {string} params.functionId - Function ID.
1745
+ * @param {string} params.executionId - Execution ID.
947
1746
  * @throws {AppwriteException}
948
1747
  * @returns {Promise<{}>}
949
1748
  */
950
- deleteExecution(functionId: string, executionId: string): Promise<{}> {
1749
+ deleteExecution(params: { functionId: string, executionId: string }): Promise<{}>;
1750
+ /**
1751
+ * Delete a function execution by its unique ID.
1752
+ *
1753
+ * @param {string} functionId - Function ID.
1754
+ * @param {string} executionId - Execution ID.
1755
+ * @throws {AppwriteException}
1756
+ * @returns {Promise<{}>}
1757
+ * @deprecated Use the object parameter style method for a better developer experience.
1758
+ */
1759
+ deleteExecution(functionId: string, executionId: string): Promise<{}>;
1760
+ deleteExecution(
1761
+ paramsOrFirst: { functionId: string, executionId: string } | string,
1762
+ ...rest: [(string)?]
1763
+ ): Promise<{}> {
1764
+ let params: { functionId: string, executionId: string };
1765
+
1766
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1767
+ params = (paramsOrFirst || {}) as { functionId: string, executionId: string };
1768
+ } else {
1769
+ params = {
1770
+ functionId: paramsOrFirst as string,
1771
+ executionId: rest[0] as string
1772
+ };
1773
+ }
1774
+
1775
+ const functionId = params.functionId;
1776
+ const executionId = params.executionId;
1777
+
951
1778
  if (typeof functionId === 'undefined') {
952
1779
  throw new AppwriteException('Missing required parameter: "functionId"');
953
1780
  }
954
1781
  if (typeof executionId === 'undefined') {
955
1782
  throw new AppwriteException('Missing required parameter: "executionId"');
956
1783
  }
1784
+
957
1785
  const apiPath = '/functions/{functionId}/executions/{executionId}'.replace('{functionId}', functionId).replace('{executionId}', executionId);
958
1786
  const payload: Payload = {};
959
1787
  const uri = new URL(this.client.config.endpoint + apiPath);
@@ -973,15 +1801,44 @@ export class Functions {
973
1801
  /**
974
1802
  * Get usage metrics and statistics for a for a specific function. 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.
975
1803
  *
976
- * @param {string} functionId
977
- * @param {FunctionUsageRange} range
1804
+ * @param {string} params.functionId - Function ID.
1805
+ * @param {UsageRange} params.range - Date range.
1806
+ * @throws {AppwriteException}
1807
+ * @returns {Promise<Models.UsageFunction>}
1808
+ */
1809
+ getUsage(params: { functionId: string, range?: UsageRange }): Promise<Models.UsageFunction>;
1810
+ /**
1811
+ * Get usage metrics and statistics for a for a specific function. 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.
1812
+ *
1813
+ * @param {string} functionId - Function ID.
1814
+ * @param {UsageRange} range - Date range.
978
1815
  * @throws {AppwriteException}
979
1816
  * @returns {Promise<Models.UsageFunction>}
1817
+ * @deprecated Use the object parameter style method for a better developer experience.
980
1818
  */
981
- getUsage(functionId: string, range?: FunctionUsageRange): Promise<Models.UsageFunction> {
1819
+ getUsage(functionId: string, range?: UsageRange): Promise<Models.UsageFunction>;
1820
+ getUsage(
1821
+ paramsOrFirst: { functionId: string, range?: UsageRange } | string,
1822
+ ...rest: [(UsageRange)?]
1823
+ ): Promise<Models.UsageFunction> {
1824
+ let params: { functionId: string, range?: UsageRange };
1825
+
1826
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1827
+ params = (paramsOrFirst || {}) as { functionId: string, range?: UsageRange };
1828
+ } else {
1829
+ params = {
1830
+ functionId: paramsOrFirst as string,
1831
+ range: rest[0] as UsageRange
1832
+ };
1833
+ }
1834
+
1835
+ const functionId = params.functionId;
1836
+ const range = params.range;
1837
+
982
1838
  if (typeof functionId === 'undefined') {
983
1839
  throw new AppwriteException('Missing required parameter: "functionId"');
984
1840
  }
1841
+
985
1842
  const apiPath = '/functions/{functionId}/usage'.replace('{functionId}', functionId);
986
1843
  const payload: Payload = {};
987
1844
  if (typeof range !== 'undefined') {
@@ -1003,14 +1860,39 @@ export class Functions {
1003
1860
  /**
1004
1861
  * Get a list of all variables of a specific function.
1005
1862
  *
1006
- * @param {string} functionId
1863
+ * @param {string} params.functionId - Function unique ID.
1864
+ * @throws {AppwriteException}
1865
+ * @returns {Promise<Models.VariableList>}
1866
+ */
1867
+ listVariables(params: { functionId: string }): Promise<Models.VariableList>;
1868
+ /**
1869
+ * Get a list of all variables of a specific function.
1870
+ *
1871
+ * @param {string} functionId - Function unique ID.
1007
1872
  * @throws {AppwriteException}
1008
1873
  * @returns {Promise<Models.VariableList>}
1874
+ * @deprecated Use the object parameter style method for a better developer experience.
1009
1875
  */
1010
- listVariables(functionId: string): Promise<Models.VariableList> {
1876
+ listVariables(functionId: string): Promise<Models.VariableList>;
1877
+ listVariables(
1878
+ paramsOrFirst: { functionId: string } | string
1879
+ ): Promise<Models.VariableList> {
1880
+ let params: { functionId: string };
1881
+
1882
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1883
+ params = (paramsOrFirst || {}) as { functionId: string };
1884
+ } else {
1885
+ params = {
1886
+ functionId: paramsOrFirst as string
1887
+ };
1888
+ }
1889
+
1890
+ const functionId = params.functionId;
1891
+
1011
1892
  if (typeof functionId === 'undefined') {
1012
1893
  throw new AppwriteException('Missing required parameter: "functionId"');
1013
1894
  }
1895
+
1014
1896
  const apiPath = '/functions/{functionId}/variables'.replace('{functionId}', functionId);
1015
1897
  const payload: Payload = {};
1016
1898
  const uri = new URL(this.client.config.endpoint + apiPath);
@@ -1029,14 +1911,48 @@ export class Functions {
1029
1911
  /**
1030
1912
  * Create a new function environment variable. These variables can be accessed in the function at runtime as environment variables.
1031
1913
  *
1032
- * @param {string} functionId
1033
- * @param {string} key
1034
- * @param {string} value
1035
- * @param {boolean} secret
1914
+ * @param {string} params.functionId - Function unique ID.
1915
+ * @param {string} params.key - Variable key. Max length: 255 chars.
1916
+ * @param {string} params.value - Variable value. Max length: 8192 chars.
1917
+ * @param {boolean} params.secret - Secret variables can be updated or deleted, but only functions can read them during build and runtime.
1036
1918
  * @throws {AppwriteException}
1037
1919
  * @returns {Promise<Models.Variable>}
1038
1920
  */
1039
- createVariable(functionId: string, key: string, value: string, secret?: boolean): Promise<Models.Variable> {
1921
+ createVariable(params: { functionId: string, key: string, value: string, secret?: boolean }): Promise<Models.Variable>;
1922
+ /**
1923
+ * Create a new function environment variable. These variables can be accessed in the function at runtime as environment variables.
1924
+ *
1925
+ * @param {string} functionId - Function unique ID.
1926
+ * @param {string} key - Variable key. Max length: 255 chars.
1927
+ * @param {string} value - Variable value. Max length: 8192 chars.
1928
+ * @param {boolean} secret - Secret variables can be updated or deleted, but only functions can read them during build and runtime.
1929
+ * @throws {AppwriteException}
1930
+ * @returns {Promise<Models.Variable>}
1931
+ * @deprecated Use the object parameter style method for a better developer experience.
1932
+ */
1933
+ createVariable(functionId: string, key: string, value: string, secret?: boolean): Promise<Models.Variable>;
1934
+ createVariable(
1935
+ paramsOrFirst: { functionId: string, key: string, value: string, secret?: boolean } | string,
1936
+ ...rest: [(string)?, (string)?, (boolean)?]
1937
+ ): Promise<Models.Variable> {
1938
+ let params: { functionId: string, key: string, value: string, secret?: boolean };
1939
+
1940
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1941
+ params = (paramsOrFirst || {}) as { functionId: string, key: string, value: string, secret?: boolean };
1942
+ } else {
1943
+ params = {
1944
+ functionId: paramsOrFirst as string,
1945
+ key: rest[0] as string,
1946
+ value: rest[1] as string,
1947
+ secret: rest[2] as boolean
1948
+ };
1949
+ }
1950
+
1951
+ const functionId = params.functionId;
1952
+ const key = params.key;
1953
+ const value = params.value;
1954
+ const secret = params.secret;
1955
+
1040
1956
  if (typeof functionId === 'undefined') {
1041
1957
  throw new AppwriteException('Missing required parameter: "functionId"');
1042
1958
  }
@@ -1046,6 +1962,7 @@ export class Functions {
1046
1962
  if (typeof value === 'undefined') {
1047
1963
  throw new AppwriteException('Missing required parameter: "value"');
1048
1964
  }
1965
+
1049
1966
  const apiPath = '/functions/{functionId}/variables'.replace('{functionId}', functionId);
1050
1967
  const payload: Payload = {};
1051
1968
  if (typeof key !== 'undefined') {
@@ -1074,18 +1991,47 @@ export class Functions {
1074
1991
  /**
1075
1992
  * Get a variable by its unique ID.
1076
1993
  *
1077
- * @param {string} functionId
1078
- * @param {string} variableId
1994
+ * @param {string} params.functionId - Function unique ID.
1995
+ * @param {string} params.variableId - Variable unique ID.
1996
+ * @throws {AppwriteException}
1997
+ * @returns {Promise<Models.Variable>}
1998
+ */
1999
+ getVariable(params: { functionId: string, variableId: string }): Promise<Models.Variable>;
2000
+ /**
2001
+ * Get a variable by its unique ID.
2002
+ *
2003
+ * @param {string} functionId - Function unique ID.
2004
+ * @param {string} variableId - Variable unique ID.
1079
2005
  * @throws {AppwriteException}
1080
2006
  * @returns {Promise<Models.Variable>}
2007
+ * @deprecated Use the object parameter style method for a better developer experience.
1081
2008
  */
1082
- getVariable(functionId: string, variableId: string): Promise<Models.Variable> {
2009
+ getVariable(functionId: string, variableId: string): Promise<Models.Variable>;
2010
+ getVariable(
2011
+ paramsOrFirst: { functionId: string, variableId: string } | string,
2012
+ ...rest: [(string)?]
2013
+ ): Promise<Models.Variable> {
2014
+ let params: { functionId: string, variableId: string };
2015
+
2016
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
2017
+ params = (paramsOrFirst || {}) as { functionId: string, variableId: string };
2018
+ } else {
2019
+ params = {
2020
+ functionId: paramsOrFirst as string,
2021
+ variableId: rest[0] as string
2022
+ };
2023
+ }
2024
+
2025
+ const functionId = params.functionId;
2026
+ const variableId = params.variableId;
2027
+
1083
2028
  if (typeof functionId === 'undefined') {
1084
2029
  throw new AppwriteException('Missing required parameter: "functionId"');
1085
2030
  }
1086
2031
  if (typeof variableId === 'undefined') {
1087
2032
  throw new AppwriteException('Missing required parameter: "variableId"');
1088
2033
  }
2034
+
1089
2035
  const apiPath = '/functions/{functionId}/variables/{variableId}'.replace('{functionId}', functionId).replace('{variableId}', variableId);
1090
2036
  const payload: Payload = {};
1091
2037
  const uri = new URL(this.client.config.endpoint + apiPath);
@@ -1104,15 +2050,52 @@ export class Functions {
1104
2050
  /**
1105
2051
  * Update variable by its unique ID.
1106
2052
  *
1107
- * @param {string} functionId
1108
- * @param {string} variableId
1109
- * @param {string} key
1110
- * @param {string} value
1111
- * @param {boolean} secret
2053
+ * @param {string} params.functionId - Function unique ID.
2054
+ * @param {string} params.variableId - Variable unique ID.
2055
+ * @param {string} params.key - Variable key. Max length: 255 chars.
2056
+ * @param {string} params.value - Variable value. Max length: 8192 chars.
2057
+ * @param {boolean} params.secret - Secret variables can be updated or deleted, but only functions can read them during build and runtime.
2058
+ * @throws {AppwriteException}
2059
+ * @returns {Promise<Models.Variable>}
2060
+ */
2061
+ updateVariable(params: { functionId: string, variableId: string, key: string, value?: string, secret?: boolean }): Promise<Models.Variable>;
2062
+ /**
2063
+ * Update variable by its unique ID.
2064
+ *
2065
+ * @param {string} functionId - Function unique ID.
2066
+ * @param {string} variableId - Variable unique ID.
2067
+ * @param {string} key - Variable key. Max length: 255 chars.
2068
+ * @param {string} value - Variable value. Max length: 8192 chars.
2069
+ * @param {boolean} secret - Secret variables can be updated or deleted, but only functions can read them during build and runtime.
1112
2070
  * @throws {AppwriteException}
1113
2071
  * @returns {Promise<Models.Variable>}
2072
+ * @deprecated Use the object parameter style method for a better developer experience.
1114
2073
  */
1115
- updateVariable(functionId: string, variableId: string, key: string, value?: string, secret?: boolean): Promise<Models.Variable> {
2074
+ updateVariable(functionId: string, variableId: string, key: string, value?: string, secret?: boolean): Promise<Models.Variable>;
2075
+ updateVariable(
2076
+ paramsOrFirst: { functionId: string, variableId: string, key: string, value?: string, secret?: boolean } | string,
2077
+ ...rest: [(string)?, (string)?, (string)?, (boolean)?]
2078
+ ): Promise<Models.Variable> {
2079
+ let params: { functionId: string, variableId: string, key: string, value?: string, secret?: boolean };
2080
+
2081
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
2082
+ params = (paramsOrFirst || {}) as { functionId: string, variableId: string, key: string, value?: string, secret?: boolean };
2083
+ } else {
2084
+ params = {
2085
+ functionId: paramsOrFirst as string,
2086
+ variableId: rest[0] as string,
2087
+ key: rest[1] as string,
2088
+ value: rest[2] as string,
2089
+ secret: rest[3] as boolean
2090
+ };
2091
+ }
2092
+
2093
+ const functionId = params.functionId;
2094
+ const variableId = params.variableId;
2095
+ const key = params.key;
2096
+ const value = params.value;
2097
+ const secret = params.secret;
2098
+
1116
2099
  if (typeof functionId === 'undefined') {
1117
2100
  throw new AppwriteException('Missing required parameter: "functionId"');
1118
2101
  }
@@ -1122,6 +2105,7 @@ export class Functions {
1122
2105
  if (typeof key === 'undefined') {
1123
2106
  throw new AppwriteException('Missing required parameter: "key"');
1124
2107
  }
2108
+
1125
2109
  const apiPath = '/functions/{functionId}/variables/{variableId}'.replace('{functionId}', functionId).replace('{variableId}', variableId);
1126
2110
  const payload: Payload = {};
1127
2111
  if (typeof key !== 'undefined') {
@@ -1150,18 +2134,47 @@ export class Functions {
1150
2134
  /**
1151
2135
  * Delete a variable by its unique ID.
1152
2136
  *
1153
- * @param {string} functionId
1154
- * @param {string} variableId
2137
+ * @param {string} params.functionId - Function unique ID.
2138
+ * @param {string} params.variableId - Variable unique ID.
2139
+ * @throws {AppwriteException}
2140
+ * @returns {Promise<{}>}
2141
+ */
2142
+ deleteVariable(params: { functionId: string, variableId: string }): Promise<{}>;
2143
+ /**
2144
+ * Delete a variable by its unique ID.
2145
+ *
2146
+ * @param {string} functionId - Function unique ID.
2147
+ * @param {string} variableId - Variable unique ID.
1155
2148
  * @throws {AppwriteException}
1156
2149
  * @returns {Promise<{}>}
2150
+ * @deprecated Use the object parameter style method for a better developer experience.
1157
2151
  */
1158
- deleteVariable(functionId: string, variableId: string): Promise<{}> {
2152
+ deleteVariable(functionId: string, variableId: string): Promise<{}>;
2153
+ deleteVariable(
2154
+ paramsOrFirst: { functionId: string, variableId: string } | string,
2155
+ ...rest: [(string)?]
2156
+ ): Promise<{}> {
2157
+ let params: { functionId: string, variableId: string };
2158
+
2159
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
2160
+ params = (paramsOrFirst || {}) as { functionId: string, variableId: string };
2161
+ } else {
2162
+ params = {
2163
+ functionId: paramsOrFirst as string,
2164
+ variableId: rest[0] as string
2165
+ };
2166
+ }
2167
+
2168
+ const functionId = params.functionId;
2169
+ const variableId = params.variableId;
2170
+
1159
2171
  if (typeof functionId === 'undefined') {
1160
2172
  throw new AppwriteException('Missing required parameter: "functionId"');
1161
2173
  }
1162
2174
  if (typeof variableId === 'undefined') {
1163
2175
  throw new AppwriteException('Missing required parameter: "variableId"');
1164
2176
  }
2177
+
1165
2178
  const apiPath = '/functions/{functionId}/variables/{variableId}'.replace('{functionId}', functionId).replace('{variableId}', variableId);
1166
2179
  const payload: Payload = {};
1167
2180
  const uri = new URL(this.client.config.endpoint + apiPath);