@appwrite.io/console 8.1.0 → 8.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (898) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/sdk.js +1 -1
  3. package/dist/cjs/sdk.js.map +1 -0
  4. package/dist/esm/sdk.js +29705 -0
  5. package/dist/esm/sdk.js.map +1 -0
  6. package/dist/iife/sdk.js +33515 -0
  7. package/package.json +5 -1
  8. package/types/channel.d.ts +74 -0
  9. package/types/client.d.ts +302 -0
  10. package/types/enums/adapter.d.ts +4 -0
  11. package/types/enums/api-service.d.ts +15 -0
  12. package/types/enums/api.d.ts +5 -0
  13. package/types/enums/appwrite-migration-resource.d.ts +27 -0
  14. package/types/enums/attribute-status.d.ts +7 -0
  15. package/types/enums/auth-method.d.ts +9 -0
  16. package/types/enums/authentication-factor.d.ts +6 -0
  17. package/types/enums/authenticator-type.d.ts +3 -0
  18. package/types/enums/backup-services.d.ts +8 -0
  19. package/types/enums/billing-plan-group.d.ts +5 -0
  20. package/types/enums/browser-permission.d.ts +22 -0
  21. package/types/enums/browser.d.ts +16 -0
  22. package/types/enums/build-runtime.d.ts +88 -0
  23. package/types/enums/column-status.d.ts +7 -0
  24. package/types/enums/compression.d.ts +5 -0
  25. package/types/enums/console-resource-type.d.ts +3 -0
  26. package/types/enums/credit-card.d.ts +19 -0
  27. package/types/enums/database-type.d.ts +6 -0
  28. package/types/enums/databases-index-type.d.ts +6 -0
  29. package/types/enums/deployment-download-type.d.ts +4 -0
  30. package/types/enums/deployment-status.d.ts +8 -0
  31. package/types/enums/domain-purchase-status.d.ts +6 -0
  32. package/types/enums/domain-transfer-status-enum.d.ts +10 -0
  33. package/types/enums/email-template-locale.d.ts +133 -0
  34. package/types/enums/email-template-type.d.ts +9 -0
  35. package/types/enums/execution-method.d.ts +9 -0
  36. package/types/enums/execution-status.d.ts +7 -0
  37. package/types/enums/execution-trigger.d.ts +5 -0
  38. package/types/enums/filter-type.d.ts +4 -0
  39. package/types/enums/firebase-migration-resource.d.ts +12 -0
  40. package/types/enums/flag.d.ts +197 -0
  41. package/types/enums/framework.d.ts +17 -0
  42. package/types/enums/frameworks.d.ts +17 -0
  43. package/types/enums/health-antivirus-status.d.ts +5 -0
  44. package/types/enums/health-check-status.d.ts +4 -0
  45. package/types/enums/image-format.d.ts +9 -0
  46. package/types/enums/image-gravity.d.ts +11 -0
  47. package/types/enums/index-status.d.ts +7 -0
  48. package/types/enums/message-priority.d.ts +4 -0
  49. package/types/enums/message-status.d.ts +7 -0
  50. package/types/enums/messaging-provider-type.d.ts +5 -0
  51. package/types/enums/n-host-migration-resource.d.ts +13 -0
  52. package/types/enums/name.d.ts +15 -0
  53. package/types/enums/o-auth-provider.d.ts +41 -0
  54. package/types/enums/order-by.d.ts +4 -0
  55. package/types/enums/password-hash.d.ts +13 -0
  56. package/types/enums/platform-type.d.ts +17 -0
  57. package/types/enums/platform.d.ts +4 -0
  58. package/types/enums/project-usage-range.d.ts +4 -0
  59. package/types/enums/proxy-resource-type.d.ts +4 -0
  60. package/types/enums/proxy-rule-deployment-resource-type.d.ts +4 -0
  61. package/types/enums/proxy-rule-status.d.ts +6 -0
  62. package/types/enums/region.d.ts +8 -0
  63. package/types/enums/registration-type.d.ts +6 -0
  64. package/types/enums/relation-mutate.d.ts +5 -0
  65. package/types/enums/relationship-type.d.ts +6 -0
  66. package/types/enums/resource-type.d.ts +6 -0
  67. package/types/enums/runtime.d.ts +88 -0
  68. package/types/enums/runtimes.d.ts +88 -0
  69. package/types/enums/scopes.d.ts +81 -0
  70. package/types/enums/sms-template-locale.d.ts +133 -0
  71. package/types/enums/sms-template-type.d.ts +6 -0
  72. package/types/enums/smtp-encryption.d.ts +5 -0
  73. package/types/enums/smtp-secure.d.ts +4 -0
  74. package/types/enums/status-code.d.ts +6 -0
  75. package/types/enums/status.d.ts +3 -0
  76. package/types/enums/supabase-migration-resource.d.ts +13 -0
  77. package/types/enums/tables-db-index-type.d.ts +6 -0
  78. package/types/enums/template-reference-type.d.ts +5 -0
  79. package/types/enums/theme.d.ts +4 -0
  80. package/types/enums/timezone.d.ts +421 -0
  81. package/types/enums/usage-range.d.ts +5 -0
  82. package/types/enums/use-cases.d.ts +16 -0
  83. package/types/enums/vcs-detection-type.d.ts +4 -0
  84. package/types/enums/vcs-reference-type.d.ts +5 -0
  85. package/types/id.d.ts +20 -0
  86. package/{src/index.ts → types/index.d.ts} +1 -1
  87. package/{src/models.ts → types/models.d.ts} +268 -518
  88. package/types/operator.d.ts +180 -0
  89. package/{src/permission.ts → types/permission.d.ts} +6 -20
  90. package/types/query.d.ts +442 -0
  91. package/{src/role.ts → types/role.d.ts} +28 -58
  92. package/types/service.d.ts +11 -0
  93. package/types/services/account.d.ts +1536 -0
  94. package/types/services/activities.d.ts +46 -0
  95. package/types/services/assistant.d.ts +24 -0
  96. package/{src/services/avatars.ts → types/services/avatars.d.ts} +91 -525
  97. package/types/services/backups.d.ts +277 -0
  98. package/types/services/console.d.ts +248 -0
  99. package/types/services/databases.d.ts +2435 -0
  100. package/types/services/domains.d.ts +1527 -0
  101. package/types/services/functions.d.ts +842 -0
  102. package/types/services/graphql.d.ts +43 -0
  103. package/types/services/health.d.ts +475 -0
  104. package/types/services/locale.d.ts +64 -0
  105. package/types/services/messaging.d.ts +1989 -0
  106. package/types/services/migrations.d.ts +417 -0
  107. package/types/services/organizations.d.ts +1009 -0
  108. package/types/services/project.d.ts +148 -0
  109. package/types/services/projects.d.ts +1626 -0
  110. package/types/services/proxy.d.ts +190 -0
  111. package/types/services/realtime.d.ts +134 -0
  112. package/types/services/sites.d.ts +800 -0
  113. package/types/services/storage.d.ts +467 -0
  114. package/types/services/tables-db.d.ts +2352 -0
  115. package/types/services/teams.d.ts +366 -0
  116. package/types/services/tokens.d.ts +119 -0
  117. package/types/services/users.d.ts +1208 -0
  118. package/types/services/vcs.d.ts +252 -0
  119. package/types/services/webhooks.d.ts +165 -0
  120. package/.github/workflows/autoclose.yml +0 -11
  121. package/.github/workflows/publish.yml +0 -43
  122. package/CHANGELOG.md +0 -169
  123. package/docs/examples/account/create-anonymous-session.md +0 -13
  124. package/docs/examples/account/create-billing-address.md +0 -20
  125. package/docs/examples/account/create-email-password-session.md +0 -16
  126. package/docs/examples/account/create-email-token.md +0 -17
  127. package/docs/examples/account/create-email-verification.md +0 -15
  128. package/docs/examples/account/create-jwt.md +0 -15
  129. package/docs/examples/account/create-key.md +0 -17
  130. package/docs/examples/account/create-magic-url-token.md +0 -18
  131. package/docs/examples/account/create-mfa-authenticator.md +0 -15
  132. package/docs/examples/account/create-mfa-challenge.md +0 -15
  133. package/docs/examples/account/create-mfa-recovery-codes.md +0 -13
  134. package/docs/examples/account/create-o-auth-2-session.md +0 -17
  135. package/docs/examples/account/create-o-auth-2-token.md +0 -17
  136. package/docs/examples/account/create-payment-method.md +0 -13
  137. package/docs/examples/account/create-phone-token.md +0 -16
  138. package/docs/examples/account/create-phone-verification.md +0 -13
  139. package/docs/examples/account/create-push-target.md +0 -17
  140. package/docs/examples/account/create-recovery.md +0 -16
  141. package/docs/examples/account/create-session.md +0 -16
  142. package/docs/examples/account/create-verification.md +0 -15
  143. package/docs/examples/account/create.md +0 -18
  144. package/docs/examples/account/delete-billing-address.md +0 -15
  145. package/docs/examples/account/delete-identity.md +0 -15
  146. package/docs/examples/account/delete-key.md +0 -15
  147. package/docs/examples/account/delete-mfa-authenticator.md +0 -15
  148. package/docs/examples/account/delete-payment-method.md +0 -15
  149. package/docs/examples/account/delete-push-target.md +0 -15
  150. package/docs/examples/account/delete-session.md +0 -15
  151. package/docs/examples/account/delete-sessions.md +0 -13
  152. package/docs/examples/account/delete.md +0 -13
  153. package/docs/examples/account/get-billing-address.md +0 -15
  154. package/docs/examples/account/get-coupon.md +0 -15
  155. package/docs/examples/account/get-key.md +0 -15
  156. package/docs/examples/account/get-mfa-recovery-codes.md +0 -13
  157. package/docs/examples/account/get-payment-method.md +0 -15
  158. package/docs/examples/account/get-prefs.md +0 -13
  159. package/docs/examples/account/get-session.md +0 -15
  160. package/docs/examples/account/get.md +0 -13
  161. package/docs/examples/account/list-billing-addresses.md +0 -15
  162. package/docs/examples/account/list-identities.md +0 -16
  163. package/docs/examples/account/list-invoices.md +0 -15
  164. package/docs/examples/account/list-keys.md +0 -15
  165. package/docs/examples/account/list-logs.md +0 -16
  166. package/docs/examples/account/list-mfa-factors.md +0 -13
  167. package/docs/examples/account/list-payment-methods.md +0 -15
  168. package/docs/examples/account/list-sessions.md +0 -13
  169. package/docs/examples/account/update-billing-address.md +0 -21
  170. package/docs/examples/account/update-email-verification.md +0 -16
  171. package/docs/examples/account/update-email.md +0 -16
  172. package/docs/examples/account/update-key.md +0 -18
  173. package/docs/examples/account/update-magic-url-session.md +0 -16
  174. package/docs/examples/account/update-mfa-authenticator.md +0 -16
  175. package/docs/examples/account/update-mfa-challenge.md +0 -16
  176. package/docs/examples/account/update-mfa-recovery-codes.md +0 -13
  177. package/docs/examples/account/update-mfa.md +0 -15
  178. package/docs/examples/account/update-name.md +0 -15
  179. package/docs/examples/account/update-password.md +0 -16
  180. package/docs/examples/account/update-payment-method-mandate-options.md +0 -15
  181. package/docs/examples/account/update-payment-method-provider.md +0 -18
  182. package/docs/examples/account/update-payment-method.md +0 -18
  183. package/docs/examples/account/update-phone-session.md +0 -16
  184. package/docs/examples/account/update-phone-verification.md +0 -16
  185. package/docs/examples/account/update-phone.md +0 -16
  186. package/docs/examples/account/update-prefs.md +0 -19
  187. package/docs/examples/account/update-push-target.md +0 -16
  188. package/docs/examples/account/update-recovery.md +0 -17
  189. package/docs/examples/account/update-session.md +0 -15
  190. package/docs/examples/account/update-status.md +0 -13
  191. package/docs/examples/account/update-verification.md +0 -16
  192. package/docs/examples/activities/get-event.md +0 -15
  193. package/docs/examples/activities/list-events.md +0 -15
  194. package/docs/examples/assistant/chat.md +0 -15
  195. package/docs/examples/avatars/get-browser.md +0 -18
  196. package/docs/examples/avatars/get-credit-card.md +0 -18
  197. package/docs/examples/avatars/get-favicon.md +0 -15
  198. package/docs/examples/avatars/get-flag.md +0 -18
  199. package/docs/examples/avatars/get-image.md +0 -17
  200. package/docs/examples/avatars/get-initials.md +0 -18
  201. package/docs/examples/avatars/get-qr.md +0 -18
  202. package/docs/examples/avatars/get-screenshot.md +0 -37
  203. package/docs/examples/backups/create-archive.md +0 -16
  204. package/docs/examples/backups/create-policy.md +0 -21
  205. package/docs/examples/backups/create-restoration.md +0 -18
  206. package/docs/examples/backups/delete-archive.md +0 -15
  207. package/docs/examples/backups/delete-policy.md +0 -15
  208. package/docs/examples/backups/get-archive.md +0 -15
  209. package/docs/examples/backups/get-policy.md +0 -15
  210. package/docs/examples/backups/get-restoration.md +0 -15
  211. package/docs/examples/backups/list-archives.md +0 -15
  212. package/docs/examples/backups/list-policies.md +0 -15
  213. package/docs/examples/backups/list-restorations.md +0 -15
  214. package/docs/examples/backups/update-policy.md +0 -19
  215. package/docs/examples/console/create-program-membership.md +0 -15
  216. package/docs/examples/console/create-source.md +0 -19
  217. package/docs/examples/console/get-campaign.md +0 -15
  218. package/docs/examples/console/get-coupon.md +0 -15
  219. package/docs/examples/console/get-plan.md +0 -15
  220. package/docs/examples/console/get-plans.md +0 -15
  221. package/docs/examples/console/get-program.md +0 -15
  222. package/docs/examples/console/get-resource.md +0 -16
  223. package/docs/examples/console/list-regions.md +0 -13
  224. package/docs/examples/console/suggest-columns.md +0 -19
  225. package/docs/examples/console/suggest-indexes.md +0 -18
  226. package/docs/examples/console/variables.md +0 -13
  227. package/docs/examples/databases/create-boolean-attribute.md +0 -20
  228. package/docs/examples/databases/create-collection.md +0 -22
  229. package/docs/examples/databases/create-datetime-attribute.md +0 -20
  230. package/docs/examples/databases/create-document.md +0 -26
  231. package/docs/examples/databases/create-documents.md +0 -18
  232. package/docs/examples/databases/create-email-attribute.md +0 -20
  233. package/docs/examples/databases/create-enum-attribute.md +0 -21
  234. package/docs/examples/databases/create-float-attribute.md +0 -22
  235. package/docs/examples/databases/create-index.md +0 -21
  236. package/docs/examples/databases/create-integer-attribute.md +0 -22
  237. package/docs/examples/databases/create-ip-attribute.md +0 -20
  238. package/docs/examples/databases/create-line-attribute.md +0 -19
  239. package/docs/examples/databases/create-longtext-attribute.md +0 -21
  240. package/docs/examples/databases/create-mediumtext-attribute.md +0 -21
  241. package/docs/examples/databases/create-operations.md +0 -26
  242. package/docs/examples/databases/create-point-attribute.md +0 -19
  243. package/docs/examples/databases/create-polygon-attribute.md +0 -19
  244. package/docs/examples/databases/create-relationship-attribute.md +0 -22
  245. package/docs/examples/databases/create-string-attribute.md +0 -22
  246. package/docs/examples/databases/create-text-attribute.md +0 -21
  247. package/docs/examples/databases/create-transaction.md +0 -15
  248. package/docs/examples/databases/create-url-attribute.md +0 -20
  249. package/docs/examples/databases/create-varchar-attribute.md +0 -22
  250. package/docs/examples/databases/create.md +0 -17
  251. package/docs/examples/databases/decrement-document-attribute.md +0 -21
  252. package/docs/examples/databases/delete-attribute.md +0 -17
  253. package/docs/examples/databases/delete-collection.md +0 -16
  254. package/docs/examples/databases/delete-document.md +0 -18
  255. package/docs/examples/databases/delete-documents.md +0 -18
  256. package/docs/examples/databases/delete-index.md +0 -17
  257. package/docs/examples/databases/delete-transaction.md +0 -15
  258. package/docs/examples/databases/delete.md +0 -15
  259. package/docs/examples/databases/get-attribute.md +0 -17
  260. package/docs/examples/databases/get-collection-usage.md +0 -17
  261. package/docs/examples/databases/get-collection.md +0 -16
  262. package/docs/examples/databases/get-document.md +0 -19
  263. package/docs/examples/databases/get-index.md +0 -17
  264. package/docs/examples/databases/get-transaction.md +0 -15
  265. package/docs/examples/databases/get-usage.md +0 -16
  266. package/docs/examples/databases/get.md +0 -15
  267. package/docs/examples/databases/increment-document-attribute.md +0 -21
  268. package/docs/examples/databases/list-attributes.md +0 -18
  269. package/docs/examples/databases/list-collection-logs.md +0 -17
  270. package/docs/examples/databases/list-collections.md +0 -18
  271. package/docs/examples/databases/list-document-logs.md +0 -18
  272. package/docs/examples/databases/list-documents.md +0 -20
  273. package/docs/examples/databases/list-indexes.md +0 -18
  274. package/docs/examples/databases/list-logs.md +0 -16
  275. package/docs/examples/databases/list-transactions.md +0 -15
  276. package/docs/examples/databases/list-usage.md +0 -15
  277. package/docs/examples/databases/list.md +0 -17
  278. package/docs/examples/databases/update-boolean-attribute.md +0 -20
  279. package/docs/examples/databases/update-collection.md +0 -20
  280. package/docs/examples/databases/update-datetime-attribute.md +0 -20
  281. package/docs/examples/databases/update-document.md +0 -26
  282. package/docs/examples/databases/update-documents.md +0 -25
  283. package/docs/examples/databases/update-email-attribute.md +0 -20
  284. package/docs/examples/databases/update-enum-attribute.md +0 -21
  285. package/docs/examples/databases/update-float-attribute.md +0 -22
  286. package/docs/examples/databases/update-integer-attribute.md +0 -22
  287. package/docs/examples/databases/update-ip-attribute.md +0 -20
  288. package/docs/examples/databases/update-line-attribute.md +0 -20
  289. package/docs/examples/databases/update-longtext-attribute.md +0 -20
  290. package/docs/examples/databases/update-mediumtext-attribute.md +0 -20
  291. package/docs/examples/databases/update-point-attribute.md +0 -20
  292. package/docs/examples/databases/update-polygon-attribute.md +0 -20
  293. package/docs/examples/databases/update-relationship-attribute.md +0 -19
  294. package/docs/examples/databases/update-string-attribute.md +0 -21
  295. package/docs/examples/databases/update-text-attribute.md +0 -20
  296. package/docs/examples/databases/update-transaction.md +0 -17
  297. package/docs/examples/databases/update-url-attribute.md +0 -20
  298. package/docs/examples/databases/update-varchar-attribute.md +0 -21
  299. package/docs/examples/databases/update.md +0 -17
  300. package/docs/examples/databases/upsert-document.md +0 -26
  301. package/docs/examples/databases/upsert-documents.md +0 -18
  302. package/docs/examples/domains/create-preset-google-workspace.md +0 -15
  303. package/docs/examples/domains/create-preset-i-cloud.md +0 -15
  304. package/docs/examples/domains/create-preset-mailgun.md +0 -15
  305. package/docs/examples/domains/create-preset-outlook.md +0 -15
  306. package/docs/examples/domains/create-preset-proton-mail.md +0 -15
  307. package/docs/examples/domains/create-preset-zoho.md +0 -15
  308. package/docs/examples/domains/create-purchase.md +0 -26
  309. package/docs/examples/domains/create-record-a.md +0 -19
  310. package/docs/examples/domains/create-record-aaaa.md +0 -19
  311. package/docs/examples/domains/create-record-alias.md +0 -19
  312. package/docs/examples/domains/create-record-caa.md +0 -19
  313. package/docs/examples/domains/create-record-cname.md +0 -19
  314. package/docs/examples/domains/create-record-https.md +0 -19
  315. package/docs/examples/domains/create-record-mx.md +0 -20
  316. package/docs/examples/domains/create-record-ns.md +0 -19
  317. package/docs/examples/domains/create-record-srv.md +0 -22
  318. package/docs/examples/domains/create-record-txt.md +0 -19
  319. package/docs/examples/domains/create-transfer-in.md +0 -19
  320. package/docs/examples/domains/create-transfer-out.md +0 -16
  321. package/docs/examples/domains/create.md +0 -16
  322. package/docs/examples/domains/delete-record.md +0 -16
  323. package/docs/examples/domains/delete.md +0 -15
  324. package/docs/examples/domains/get-preset-google-workspace.md +0 -15
  325. package/docs/examples/domains/get-preset-i-cloud.md +0 -15
  326. package/docs/examples/domains/get-preset-mailgun.md +0 -15
  327. package/docs/examples/domains/get-preset-outlook.md +0 -15
  328. package/docs/examples/domains/get-preset-proton-mail.md +0 -15
  329. package/docs/examples/domains/get-preset-zoho.md +0 -15
  330. package/docs/examples/domains/get-price.md +0 -17
  331. package/docs/examples/domains/get-record.md +0 -16
  332. package/docs/examples/domains/get-transfer-status.md +0 -15
  333. package/docs/examples/domains/get-zone.md +0 -15
  334. package/docs/examples/domains/get.md +0 -15
  335. package/docs/examples/domains/list-records.md +0 -16
  336. package/docs/examples/domains/list-suggestions.md +0 -20
  337. package/docs/examples/domains/list.md +0 -16
  338. package/docs/examples/domains/update-auto-renewal.md +0 -16
  339. package/docs/examples/domains/update-nameservers.md +0 -15
  340. package/docs/examples/domains/update-purchase.md +0 -16
  341. package/docs/examples/domains/update-record-a.md +0 -20
  342. package/docs/examples/domains/update-record-aaaa.md +0 -20
  343. package/docs/examples/domains/update-record-alias.md +0 -20
  344. package/docs/examples/domains/update-record-caa.md +0 -20
  345. package/docs/examples/domains/update-record-cname.md +0 -20
  346. package/docs/examples/domains/update-record-https.md +0 -20
  347. package/docs/examples/domains/update-record-mx.md +0 -21
  348. package/docs/examples/domains/update-record-ns.md +0 -20
  349. package/docs/examples/domains/update-record-srv.md +0 -23
  350. package/docs/examples/domains/update-record-txt.md +0 -20
  351. package/docs/examples/domains/update-team.md +0 -16
  352. package/docs/examples/domains/update-transfer-in.md +0 -16
  353. package/docs/examples/domains/update-zone.md +0 -16
  354. package/docs/examples/functions/create-deployment.md +0 -19
  355. package/docs/examples/functions/create-duplicate-deployment.md +0 -17
  356. package/docs/examples/functions/create-execution.md +0 -21
  357. package/docs/examples/functions/create-template-deployment.md +0 -21
  358. package/docs/examples/functions/create-variable.md +0 -18
  359. package/docs/examples/functions/create-vcs-deployment.md +0 -18
  360. package/docs/examples/functions/create.md +0 -34
  361. package/docs/examples/functions/delete-deployment.md +0 -16
  362. package/docs/examples/functions/delete-execution.md +0 -16
  363. package/docs/examples/functions/delete-variable.md +0 -16
  364. package/docs/examples/functions/delete.md +0 -15
  365. package/docs/examples/functions/get-deployment-download.md +0 -17
  366. package/docs/examples/functions/get-deployment.md +0 -16
  367. package/docs/examples/functions/get-execution.md +0 -16
  368. package/docs/examples/functions/get-template.md +0 -15
  369. package/docs/examples/functions/get-usage.md +0 -16
  370. package/docs/examples/functions/get-variable.md +0 -16
  371. package/docs/examples/functions/get.md +0 -15
  372. package/docs/examples/functions/list-deployments.md +0 -18
  373. package/docs/examples/functions/list-executions.md +0 -17
  374. package/docs/examples/functions/list-runtimes.md +0 -13
  375. package/docs/examples/functions/list-specifications.md +0 -13
  376. package/docs/examples/functions/list-templates.md +0 -19
  377. package/docs/examples/functions/list-usage.md +0 -15
  378. package/docs/examples/functions/list-variables.md +0 -15
  379. package/docs/examples/functions/list.md +0 -17
  380. package/docs/examples/functions/update-deployment-status.md +0 -16
  381. package/docs/examples/functions/update-function-deployment.md +0 -16
  382. package/docs/examples/functions/update-variable.md +0 -19
  383. package/docs/examples/functions/update.md +0 -34
  384. package/docs/examples/graphql/mutation.md +0 -15
  385. package/docs/examples/graphql/query.md +0 -15
  386. package/docs/examples/health/get-antivirus.md +0 -13
  387. package/docs/examples/health/get-cache.md +0 -13
  388. package/docs/examples/health/get-certificate.md +0 -15
  389. package/docs/examples/health/get-console-pausing.md +0 -16
  390. package/docs/examples/health/get-db.md +0 -13
  391. package/docs/examples/health/get-failed-jobs.md +0 -16
  392. package/docs/examples/health/get-pub-sub.md +0 -13
  393. package/docs/examples/health/get-queue-audits.md +0 -15
  394. package/docs/examples/health/get-queue-billing-project-aggregation.md +0 -15
  395. package/docs/examples/health/get-queue-billing-team-aggregation.md +0 -15
  396. package/docs/examples/health/get-queue-builds.md +0 -15
  397. package/docs/examples/health/get-queue-certificates.md +0 -15
  398. package/docs/examples/health/get-queue-databases.md +0 -16
  399. package/docs/examples/health/get-queue-deletes.md +0 -15
  400. package/docs/examples/health/get-queue-functions.md +0 -15
  401. package/docs/examples/health/get-queue-logs.md +0 -15
  402. package/docs/examples/health/get-queue-mails.md +0 -15
  403. package/docs/examples/health/get-queue-messaging.md +0 -15
  404. package/docs/examples/health/get-queue-migrations.md +0 -15
  405. package/docs/examples/health/get-queue-priority-builds.md +0 -15
  406. package/docs/examples/health/get-queue-region-manager.md +0 -15
  407. package/docs/examples/health/get-queue-stats-resources.md +0 -15
  408. package/docs/examples/health/get-queue-threats.md +0 -15
  409. package/docs/examples/health/get-queue-usage.md +0 -15
  410. package/docs/examples/health/get-queue-webhooks.md +0 -15
  411. package/docs/examples/health/get-storage-local.md +0 -13
  412. package/docs/examples/health/get-storage.md +0 -13
  413. package/docs/examples/health/get-time.md +0 -13
  414. package/docs/examples/health/get.md +0 -13
  415. package/docs/examples/locale/get.md +0 -13
  416. package/docs/examples/locale/list-codes.md +0 -13
  417. package/docs/examples/locale/list-continents.md +0 -13
  418. package/docs/examples/locale/list-countries-eu.md +0 -13
  419. package/docs/examples/locale/list-countries-phones.md +0 -13
  420. package/docs/examples/locale/list-countries.md +0 -13
  421. package/docs/examples/locale/list-currencies.md +0 -13
  422. package/docs/examples/locale/list-languages.md +0 -13
  423. package/docs/examples/messaging/create-apns-provider.md +0 -22
  424. package/docs/examples/messaging/create-email.md +0 -26
  425. package/docs/examples/messaging/create-fcm-provider.md +0 -18
  426. package/docs/examples/messaging/create-mailgun-provider.md +0 -24
  427. package/docs/examples/messaging/create-msg-91-provider.md +0 -20
  428. package/docs/examples/messaging/create-push.md +0 -33
  429. package/docs/examples/messaging/create-resend-provider.md +0 -22
  430. package/docs/examples/messaging/create-sendgrid-provider.md +0 -22
  431. package/docs/examples/messaging/create-sms.md +0 -21
  432. package/docs/examples/messaging/create-smtp-provider.md +0 -28
  433. package/docs/examples/messaging/create-subscriber.md +0 -17
  434. package/docs/examples/messaging/create-telesign-provider.md +0 -20
  435. package/docs/examples/messaging/create-textmagic-provider.md +0 -20
  436. package/docs/examples/messaging/create-topic.md +0 -17
  437. package/docs/examples/messaging/create-twilio-provider.md +0 -20
  438. package/docs/examples/messaging/create-vonage-provider.md +0 -20
  439. package/docs/examples/messaging/delete-provider.md +0 -15
  440. package/docs/examples/messaging/delete-subscriber.md +0 -16
  441. package/docs/examples/messaging/delete-topic.md +0 -15
  442. package/docs/examples/messaging/delete.md +0 -15
  443. package/docs/examples/messaging/get-message.md +0 -15
  444. package/docs/examples/messaging/get-provider.md +0 -15
  445. package/docs/examples/messaging/get-subscriber.md +0 -16
  446. package/docs/examples/messaging/get-topic.md +0 -15
  447. package/docs/examples/messaging/list-message-logs.md +0 -17
  448. package/docs/examples/messaging/list-messages.md +0 -17
  449. package/docs/examples/messaging/list-provider-logs.md +0 -17
  450. package/docs/examples/messaging/list-providers.md +0 -17
  451. package/docs/examples/messaging/list-subscriber-logs.md +0 -17
  452. package/docs/examples/messaging/list-subscribers.md +0 -18
  453. package/docs/examples/messaging/list-targets.md +0 -17
  454. package/docs/examples/messaging/list-topic-logs.md +0 -17
  455. package/docs/examples/messaging/list-topics.md +0 -17
  456. package/docs/examples/messaging/update-apns-provider.md +0 -22
  457. package/docs/examples/messaging/update-email.md +0 -26
  458. package/docs/examples/messaging/update-fcm-provider.md +0 -18
  459. package/docs/examples/messaging/update-mailgun-provider.md +0 -24
  460. package/docs/examples/messaging/update-msg-91-provider.md +0 -20
  461. package/docs/examples/messaging/update-push.md +0 -33
  462. package/docs/examples/messaging/update-resend-provider.md +0 -22
  463. package/docs/examples/messaging/update-sendgrid-provider.md +0 -22
  464. package/docs/examples/messaging/update-sms.md +0 -21
  465. package/docs/examples/messaging/update-smtp-provider.md +0 -28
  466. package/docs/examples/messaging/update-telesign-provider.md +0 -20
  467. package/docs/examples/messaging/update-textmagic-provider.md +0 -20
  468. package/docs/examples/messaging/update-topic.md +0 -17
  469. package/docs/examples/messaging/update-twilio-provider.md +0 -20
  470. package/docs/examples/messaging/update-vonage-provider.md +0 -20
  471. package/docs/examples/migrations/create-appwrite-migration.md +0 -18
  472. package/docs/examples/migrations/create-csv-export.md +0 -23
  473. package/docs/examples/migrations/create-csv-import.md +0 -18
  474. package/docs/examples/migrations/create-firebase-migration.md +0 -16
  475. package/docs/examples/migrations/create-n-host-migration.md +0 -22
  476. package/docs/examples/migrations/create-supabase-migration.md +0 -21
  477. package/docs/examples/migrations/delete.md +0 -15
  478. package/docs/examples/migrations/get-appwrite-report.md +0 -18
  479. package/docs/examples/migrations/get-firebase-report.md +0 -16
  480. package/docs/examples/migrations/get-n-host-report.md +0 -22
  481. package/docs/examples/migrations/get-supabase-report.md +0 -21
  482. package/docs/examples/migrations/get.md +0 -15
  483. package/docs/examples/migrations/list.md +0 -17
  484. package/docs/examples/migrations/retry.md +0 -15
  485. package/docs/examples/organizations/add-credit.md +0 -16
  486. package/docs/examples/organizations/cancel-downgrade.md +0 -15
  487. package/docs/examples/organizations/create-downgrade-feedback.md +0 -19
  488. package/docs/examples/organizations/create-invoice-payment.md +0 -17
  489. package/docs/examples/organizations/create-key.md +0 -18
  490. package/docs/examples/organizations/create.md +0 -24
  491. package/docs/examples/organizations/delete-backup-payment-method.md +0 -15
  492. package/docs/examples/organizations/delete-billing-address.md +0 -15
  493. package/docs/examples/organizations/delete-default-payment-method.md +0 -15
  494. package/docs/examples/organizations/delete-key.md +0 -16
  495. package/docs/examples/organizations/delete.md +0 -15
  496. package/docs/examples/organizations/estimation-create-organization.md +0 -19
  497. package/docs/examples/organizations/estimation-delete-organization.md +0 -15
  498. package/docs/examples/organizations/estimation-update-plan.md +0 -18
  499. package/docs/examples/organizations/get-aggregation.md +0 -18
  500. package/docs/examples/organizations/get-available-credits.md +0 -15
  501. package/docs/examples/organizations/get-billing-address.md +0 -16
  502. package/docs/examples/organizations/get-credit.md +0 -16
  503. package/docs/examples/organizations/get-invoice-download.md +0 -16
  504. package/docs/examples/organizations/get-invoice-view.md +0 -16
  505. package/docs/examples/organizations/get-invoice.md +0 -16
  506. package/docs/examples/organizations/get-key.md +0 -16
  507. package/docs/examples/organizations/get-payment-method.md +0 -16
  508. package/docs/examples/organizations/get-plan.md +0 -15
  509. package/docs/examples/organizations/get-scopes.md +0 -16
  510. package/docs/examples/organizations/get-usage.md +0 -17
  511. package/docs/examples/organizations/list-aggregations.md +0 -16
  512. package/docs/examples/organizations/list-credits.md +0 -16
  513. package/docs/examples/organizations/list-invoices.md +0 -16
  514. package/docs/examples/organizations/list-keys.md +0 -16
  515. package/docs/examples/organizations/list-regions.md +0 -15
  516. package/docs/examples/organizations/list.md +0 -16
  517. package/docs/examples/organizations/set-backup-payment-method.md +0 -16
  518. package/docs/examples/organizations/set-billing-address.md +0 -16
  519. package/docs/examples/organizations/set-billing-email.md +0 -16
  520. package/docs/examples/organizations/set-billing-tax-id.md +0 -16
  521. package/docs/examples/organizations/set-default-payment-method.md +0 -16
  522. package/docs/examples/organizations/update-budget.md +0 -17
  523. package/docs/examples/organizations/update-key.md +0 -19
  524. package/docs/examples/organizations/update-plan.md +0 -22
  525. package/docs/examples/organizations/validate-invoice.md +0 -16
  526. package/docs/examples/organizations/validate-payment.md +0 -16
  527. package/docs/examples/project/create-variable.md +0 -18
  528. package/docs/examples/project/delete-variable.md +0 -15
  529. package/docs/examples/project/get-usage.md +0 -17
  530. package/docs/examples/project/get-variable.md +0 -15
  531. package/docs/examples/project/list-variables.md +0 -16
  532. package/docs/examples/project/update-variable.md +0 -18
  533. package/docs/examples/projects/create-dev-key.md +0 -17
  534. package/docs/examples/projects/create-jwt.md +0 -17
  535. package/docs/examples/projects/create-key.md +0 -19
  536. package/docs/examples/projects/create-platform.md +0 -20
  537. package/docs/examples/projects/create-schedule.md +0 -20
  538. package/docs/examples/projects/create-smtp-test.md +0 -24
  539. package/docs/examples/projects/create.md +0 -27
  540. package/docs/examples/projects/delete-dev-key.md +0 -16
  541. package/docs/examples/projects/delete-email-template.md +0 -17
  542. package/docs/examples/projects/delete-key.md +0 -16
  543. package/docs/examples/projects/delete-platform.md +0 -16
  544. package/docs/examples/projects/delete-sms-template.md +0 -17
  545. package/docs/examples/projects/delete.md +0 -15
  546. package/docs/examples/projects/get-dev-key.md +0 -16
  547. package/docs/examples/projects/get-email-template.md +0 -17
  548. package/docs/examples/projects/get-key.md +0 -16
  549. package/docs/examples/projects/get-platform.md +0 -16
  550. package/docs/examples/projects/get-schedule.md +0 -16
  551. package/docs/examples/projects/get-sms-template.md +0 -17
  552. package/docs/examples/projects/get.md +0 -15
  553. package/docs/examples/projects/list-dev-keys.md +0 -16
  554. package/docs/examples/projects/list-keys.md +0 -17
  555. package/docs/examples/projects/list-platforms.md +0 -16
  556. package/docs/examples/projects/list-schedules.md +0 -17
  557. package/docs/examples/projects/list.md +0 -17
  558. package/docs/examples/projects/update-api-status-all.md +0 -16
  559. package/docs/examples/projects/update-api-status.md +0 -17
  560. package/docs/examples/projects/update-auth-duration.md +0 -16
  561. package/docs/examples/projects/update-auth-limit.md +0 -16
  562. package/docs/examples/projects/update-auth-password-dictionary.md +0 -16
  563. package/docs/examples/projects/update-auth-password-history.md +0 -16
  564. package/docs/examples/projects/update-auth-sessions-limit.md +0 -16
  565. package/docs/examples/projects/update-auth-status.md +0 -17
  566. package/docs/examples/projects/update-console-access.md +0 -15
  567. package/docs/examples/projects/update-dev-key.md +0 -18
  568. package/docs/examples/projects/update-email-template.md +0 -22
  569. package/docs/examples/projects/update-key.md +0 -19
  570. package/docs/examples/projects/update-labels.md +0 -16
  571. package/docs/examples/projects/update-memberships-privacy.md +0 -18
  572. package/docs/examples/projects/update-mock-numbers.md +0 -16
  573. package/docs/examples/projects/update-o-auth-2.md +0 -19
  574. package/docs/examples/projects/update-personal-data-check.md +0 -16
  575. package/docs/examples/projects/update-platform.md +0 -20
  576. package/docs/examples/projects/update-service-status-all.md +0 -16
  577. package/docs/examples/projects/update-service-status.md +0 -17
  578. package/docs/examples/projects/update-session-alerts.md +0 -16
  579. package/docs/examples/projects/update-session-invalidation.md +0 -16
  580. package/docs/examples/projects/update-sms-template.md +0 -18
  581. package/docs/examples/projects/update-smtp.md +0 -24
  582. package/docs/examples/projects/update-status.md +0 -16
  583. package/docs/examples/projects/update-team.md +0 -16
  584. package/docs/examples/projects/update.md +0 -25
  585. package/docs/examples/proxy/create-api-rule.md +0 -15
  586. package/docs/examples/proxy/create-function-rule.md +0 -17
  587. package/docs/examples/proxy/create-redirect-rule.md +0 -19
  588. package/docs/examples/proxy/create-site-rule.md +0 -17
  589. package/docs/examples/proxy/delete-rule.md +0 -15
  590. package/docs/examples/proxy/get-rule.md +0 -15
  591. package/docs/examples/proxy/list-rules.md +0 -17
  592. package/docs/examples/proxy/update-rule-verification.md +0 -15
  593. package/docs/examples/sites/create-deployment.md +0 -20
  594. package/docs/examples/sites/create-duplicate-deployment.md +0 -16
  595. package/docs/examples/sites/create-template-deployment.md +0 -21
  596. package/docs/examples/sites/create-variable.md +0 -18
  597. package/docs/examples/sites/create-vcs-deployment.md +0 -18
  598. package/docs/examples/sites/create.md +0 -35
  599. package/docs/examples/sites/delete-deployment.md +0 -16
  600. package/docs/examples/sites/delete-log.md +0 -16
  601. package/docs/examples/sites/delete-variable.md +0 -16
  602. package/docs/examples/sites/delete.md +0 -15
  603. package/docs/examples/sites/get-deployment-download.md +0 -17
  604. package/docs/examples/sites/get-deployment.md +0 -16
  605. package/docs/examples/sites/get-log.md +0 -16
  606. package/docs/examples/sites/get-template.md +0 -15
  607. package/docs/examples/sites/get-usage.md +0 -16
  608. package/docs/examples/sites/get-variable.md +0 -16
  609. package/docs/examples/sites/get.md +0 -15
  610. package/docs/examples/sites/list-deployments.md +0 -18
  611. package/docs/examples/sites/list-frameworks.md +0 -13
  612. package/docs/examples/sites/list-logs.md +0 -17
  613. package/docs/examples/sites/list-specifications.md +0 -13
  614. package/docs/examples/sites/list-templates.md +0 -18
  615. package/docs/examples/sites/list-usage.md +0 -15
  616. package/docs/examples/sites/list-variables.md +0 -15
  617. package/docs/examples/sites/list.md +0 -17
  618. package/docs/examples/sites/update-deployment-status.md +0 -16
  619. package/docs/examples/sites/update-site-deployment.md +0 -16
  620. package/docs/examples/sites/update-variable.md +0 -19
  621. package/docs/examples/sites/update.md +0 -35
  622. package/docs/examples/storage/create-bucket.md +0 -25
  623. package/docs/examples/storage/create-file.md +0 -18
  624. package/docs/examples/storage/delete-bucket.md +0 -15
  625. package/docs/examples/storage/delete-file.md +0 -16
  626. package/docs/examples/storage/get-bucket-usage.md +0 -16
  627. package/docs/examples/storage/get-bucket.md +0 -15
  628. package/docs/examples/storage/get-file-download.md +0 -17
  629. package/docs/examples/storage/get-file-preview.md +0 -28
  630. package/docs/examples/storage/get-file-view.md +0 -17
  631. package/docs/examples/storage/get-file.md +0 -16
  632. package/docs/examples/storage/get-usage.md +0 -15
  633. package/docs/examples/storage/list-buckets.md +0 -17
  634. package/docs/examples/storage/list-files.md +0 -18
  635. package/docs/examples/storage/update-bucket.md +0 -25
  636. package/docs/examples/storage/update-file.md +0 -18
  637. package/docs/examples/tablesdb/create-boolean-column.md +0 -20
  638. package/docs/examples/tablesdb/create-datetime-column.md +0 -20
  639. package/docs/examples/tablesdb/create-email-column.md +0 -20
  640. package/docs/examples/tablesdb/create-enum-column.md +0 -21
  641. package/docs/examples/tablesdb/create-float-column.md +0 -22
  642. package/docs/examples/tablesdb/create-index.md +0 -21
  643. package/docs/examples/tablesdb/create-integer-column.md +0 -22
  644. package/docs/examples/tablesdb/create-ip-column.md +0 -20
  645. package/docs/examples/tablesdb/create-line-column.md +0 -19
  646. package/docs/examples/tablesdb/create-longtext-column.md +0 -21
  647. package/docs/examples/tablesdb/create-mediumtext-column.md +0 -21
  648. package/docs/examples/tablesdb/create-operations.md +0 -26
  649. package/docs/examples/tablesdb/create-point-column.md +0 -19
  650. package/docs/examples/tablesdb/create-polygon-column.md +0 -19
  651. package/docs/examples/tablesdb/create-relationship-column.md +0 -22
  652. package/docs/examples/tablesdb/create-row.md +0 -26
  653. package/docs/examples/tablesdb/create-rows.md +0 -18
  654. package/docs/examples/tablesdb/create-string-column.md +0 -22
  655. package/docs/examples/tablesdb/create-table.md +0 -22
  656. package/docs/examples/tablesdb/create-text-column.md +0 -21
  657. package/docs/examples/tablesdb/create-transaction.md +0 -15
  658. package/docs/examples/tablesdb/create-url-column.md +0 -20
  659. package/docs/examples/tablesdb/create-varchar-column.md +0 -22
  660. package/docs/examples/tablesdb/create.md +0 -17
  661. package/docs/examples/tablesdb/decrement-row-column.md +0 -21
  662. package/docs/examples/tablesdb/delete-column.md +0 -17
  663. package/docs/examples/tablesdb/delete-index.md +0 -17
  664. package/docs/examples/tablesdb/delete-row.md +0 -18
  665. package/docs/examples/tablesdb/delete-rows.md +0 -18
  666. package/docs/examples/tablesdb/delete-table.md +0 -16
  667. package/docs/examples/tablesdb/delete-transaction.md +0 -15
  668. package/docs/examples/tablesdb/delete.md +0 -15
  669. package/docs/examples/tablesdb/get-column.md +0 -17
  670. package/docs/examples/tablesdb/get-index.md +0 -17
  671. package/docs/examples/tablesdb/get-row.md +0 -19
  672. package/docs/examples/tablesdb/get-table-usage.md +0 -17
  673. package/docs/examples/tablesdb/get-table.md +0 -16
  674. package/docs/examples/tablesdb/get-transaction.md +0 -15
  675. package/docs/examples/tablesdb/get-usage.md +0 -16
  676. package/docs/examples/tablesdb/get.md +0 -15
  677. package/docs/examples/tablesdb/increment-row-column.md +0 -21
  678. package/docs/examples/tablesdb/list-columns.md +0 -18
  679. package/docs/examples/tablesdb/list-indexes.md +0 -18
  680. package/docs/examples/tablesdb/list-row-logs.md +0 -18
  681. package/docs/examples/tablesdb/list-rows.md +0 -20
  682. package/docs/examples/tablesdb/list-table-logs.md +0 -17
  683. package/docs/examples/tablesdb/list-tables.md +0 -18
  684. package/docs/examples/tablesdb/list-transactions.md +0 -15
  685. package/docs/examples/tablesdb/list-usage.md +0 -15
  686. package/docs/examples/tablesdb/list.md +0 -17
  687. package/docs/examples/tablesdb/update-boolean-column.md +0 -20
  688. package/docs/examples/tablesdb/update-datetime-column.md +0 -20
  689. package/docs/examples/tablesdb/update-email-column.md +0 -20
  690. package/docs/examples/tablesdb/update-enum-column.md +0 -21
  691. package/docs/examples/tablesdb/update-float-column.md +0 -22
  692. package/docs/examples/tablesdb/update-integer-column.md +0 -22
  693. package/docs/examples/tablesdb/update-ip-column.md +0 -20
  694. package/docs/examples/tablesdb/update-line-column.md +0 -20
  695. package/docs/examples/tablesdb/update-longtext-column.md +0 -20
  696. package/docs/examples/tablesdb/update-mediumtext-column.md +0 -20
  697. package/docs/examples/tablesdb/update-point-column.md +0 -20
  698. package/docs/examples/tablesdb/update-polygon-column.md +0 -20
  699. package/docs/examples/tablesdb/update-relationship-column.md +0 -19
  700. package/docs/examples/tablesdb/update-row.md +0 -26
  701. package/docs/examples/tablesdb/update-rows.md +0 -25
  702. package/docs/examples/tablesdb/update-string-column.md +0 -21
  703. package/docs/examples/tablesdb/update-table.md +0 -20
  704. package/docs/examples/tablesdb/update-text-column.md +0 -20
  705. package/docs/examples/tablesdb/update-transaction.md +0 -17
  706. package/docs/examples/tablesdb/update-url-column.md +0 -20
  707. package/docs/examples/tablesdb/update-varchar-column.md +0 -21
  708. package/docs/examples/tablesdb/update.md +0 -17
  709. package/docs/examples/tablesdb/upsert-row.md +0 -26
  710. package/docs/examples/tablesdb/upsert-rows.md +0 -18
  711. package/docs/examples/teams/create-membership.md +0 -21
  712. package/docs/examples/teams/create.md +0 -17
  713. package/docs/examples/teams/delete-membership.md +0 -16
  714. package/docs/examples/teams/delete.md +0 -15
  715. package/docs/examples/teams/get-membership.md +0 -16
  716. package/docs/examples/teams/get-prefs.md +0 -15
  717. package/docs/examples/teams/get.md +0 -15
  718. package/docs/examples/teams/list-logs.md +0 -17
  719. package/docs/examples/teams/list-memberships.md +0 -18
  720. package/docs/examples/teams/list.md +0 -17
  721. package/docs/examples/teams/update-membership-status.md +0 -18
  722. package/docs/examples/teams/update-membership.md +0 -17
  723. package/docs/examples/teams/update-name.md +0 -16
  724. package/docs/examples/teams/update-prefs.md +0 -16
  725. package/docs/examples/tokens/create-file-token.md +0 -17
  726. package/docs/examples/tokens/delete.md +0 -15
  727. package/docs/examples/tokens/get.md +0 -15
  728. package/docs/examples/tokens/list.md +0 -18
  729. package/docs/examples/tokens/update.md +0 -16
  730. package/docs/examples/users/create-argon-2-user.md +0 -18
  731. package/docs/examples/users/create-bcrypt-user.md +0 -18
  732. package/docs/examples/users/create-jwt.md +0 -17
  733. package/docs/examples/users/create-md-5-user.md +0 -18
  734. package/docs/examples/users/create-mfa-recovery-codes.md +0 -15
  735. package/docs/examples/users/create-ph-pass-user.md +0 -18
  736. package/docs/examples/users/create-scrypt-modified-user.md +0 -21
  737. package/docs/examples/users/create-scrypt-user.md +0 -23
  738. package/docs/examples/users/create-session.md +0 -15
  739. package/docs/examples/users/create-sha-user.md +0 -19
  740. package/docs/examples/users/create-target.md +0 -20
  741. package/docs/examples/users/create-token.md +0 -17
  742. package/docs/examples/users/create.md +0 -19
  743. package/docs/examples/users/delete-identity.md +0 -15
  744. package/docs/examples/users/delete-mfa-authenticator.md +0 -16
  745. package/docs/examples/users/delete-session.md +0 -16
  746. package/docs/examples/users/delete-sessions.md +0 -15
  747. package/docs/examples/users/delete-target.md +0 -16
  748. package/docs/examples/users/delete.md +0 -15
  749. package/docs/examples/users/get-mfa-recovery-codes.md +0 -15
  750. package/docs/examples/users/get-prefs.md +0 -15
  751. package/docs/examples/users/get-target.md +0 -16
  752. package/docs/examples/users/get-usage.md +0 -15
  753. package/docs/examples/users/get.md +0 -15
  754. package/docs/examples/users/list-identities.md +0 -17
  755. package/docs/examples/users/list-logs.md +0 -17
  756. package/docs/examples/users/list-memberships.md +0 -18
  757. package/docs/examples/users/list-mfa-factors.md +0 -15
  758. package/docs/examples/users/list-sessions.md +0 -16
  759. package/docs/examples/users/list-targets.md +0 -17
  760. package/docs/examples/users/list.md +0 -17
  761. package/docs/examples/users/update-email-verification.md +0 -16
  762. package/docs/examples/users/update-email.md +0 -16
  763. package/docs/examples/users/update-impersonator.md +0 -16
  764. package/docs/examples/users/update-labels.md +0 -16
  765. package/docs/examples/users/update-mfa-recovery-codes.md +0 -15
  766. package/docs/examples/users/update-mfa.md +0 -16
  767. package/docs/examples/users/update-name.md +0 -16
  768. package/docs/examples/users/update-password.md +0 -16
  769. package/docs/examples/users/update-phone-verification.md +0 -16
  770. package/docs/examples/users/update-phone.md +0 -16
  771. package/docs/examples/users/update-prefs.md +0 -16
  772. package/docs/examples/users/update-status.md +0 -16
  773. package/docs/examples/users/update-target.md +0 -19
  774. package/docs/examples/vcs/create-repository-detection.md +0 -18
  775. package/docs/examples/vcs/create-repository.md +0 -17
  776. package/docs/examples/vcs/delete-installation.md +0 -15
  777. package/docs/examples/vcs/get-installation.md +0 -15
  778. package/docs/examples/vcs/get-repository-contents.md +0 -18
  779. package/docs/examples/vcs/get-repository.md +0 -16
  780. package/docs/examples/vcs/list-installations.md +0 -17
  781. package/docs/examples/vcs/list-repositories.md +0 -18
  782. package/docs/examples/vcs/list-repository-branches.md +0 -16
  783. package/docs/examples/vcs/update-external-deployments.md +0 -17
  784. package/docs/examples/webhooks/create.md +0 -22
  785. package/docs/examples/webhooks/delete.md +0 -15
  786. package/docs/examples/webhooks/get.md +0 -15
  787. package/docs/examples/webhooks/list.md +0 -16
  788. package/docs/examples/webhooks/update-signature.md +0 -15
  789. package/docs/examples/webhooks/update.md +0 -22
  790. package/rollup.config.js +0 -44
  791. package/src/channel.ts +0 -158
  792. package/src/client.ts +0 -1085
  793. package/src/enums/adapter.ts +0 -4
  794. package/src/enums/api-service.ts +0 -15
  795. package/src/enums/api.ts +0 -5
  796. package/src/enums/appwrite-migration-resource.ts +0 -27
  797. package/src/enums/attribute-status.ts +0 -7
  798. package/src/enums/auth-method.ts +0 -9
  799. package/src/enums/authentication-factor.ts +0 -6
  800. package/src/enums/authenticator-type.ts +0 -3
  801. package/src/enums/backup-services.ts +0 -8
  802. package/src/enums/billing-plan-group.ts +0 -5
  803. package/src/enums/browser-permission.ts +0 -22
  804. package/src/enums/browser.ts +0 -16
  805. package/src/enums/build-runtime.ts +0 -88
  806. package/src/enums/column-status.ts +0 -7
  807. package/src/enums/compression.ts +0 -5
  808. package/src/enums/console-resource-type.ts +0 -3
  809. package/src/enums/credit-card.ts +0 -19
  810. package/src/enums/database-type.ts +0 -6
  811. package/src/enums/databases-index-type.ts +0 -6
  812. package/src/enums/deployment-download-type.ts +0 -4
  813. package/src/enums/deployment-status.ts +0 -8
  814. package/src/enums/domain-purchase-status.ts +0 -6
  815. package/src/enums/domain-transfer-status-enum.ts +0 -10
  816. package/src/enums/email-template-locale.ts +0 -133
  817. package/src/enums/email-template-type.ts +0 -9
  818. package/src/enums/execution-method.ts +0 -9
  819. package/src/enums/execution-status.ts +0 -7
  820. package/src/enums/execution-trigger.ts +0 -5
  821. package/src/enums/filter-type.ts +0 -4
  822. package/src/enums/firebase-migration-resource.ts +0 -12
  823. package/src/enums/flag.ts +0 -197
  824. package/src/enums/framework.ts +0 -17
  825. package/src/enums/frameworks.ts +0 -17
  826. package/src/enums/health-antivirus-status.ts +0 -5
  827. package/src/enums/health-check-status.ts +0 -4
  828. package/src/enums/image-format.ts +0 -9
  829. package/src/enums/image-gravity.ts +0 -11
  830. package/src/enums/index-status.ts +0 -7
  831. package/src/enums/message-priority.ts +0 -4
  832. package/src/enums/message-status.ts +0 -7
  833. package/src/enums/messaging-provider-type.ts +0 -5
  834. package/src/enums/n-host-migration-resource.ts +0 -13
  835. package/src/enums/name.ts +0 -15
  836. package/src/enums/o-auth-provider.ts +0 -41
  837. package/src/enums/order-by.ts +0 -4
  838. package/src/enums/password-hash.ts +0 -13
  839. package/src/enums/platform-type.ts +0 -17
  840. package/src/enums/platform.ts +0 -4
  841. package/src/enums/project-usage-range.ts +0 -4
  842. package/src/enums/proxy-resource-type.ts +0 -4
  843. package/src/enums/proxy-rule-deployment-resource-type.ts +0 -4
  844. package/src/enums/proxy-rule-status.ts +0 -6
  845. package/src/enums/region.ts +0 -8
  846. package/src/enums/registration-type.ts +0 -6
  847. package/src/enums/relation-mutate.ts +0 -5
  848. package/src/enums/relationship-type.ts +0 -6
  849. package/src/enums/resource-type.ts +0 -6
  850. package/src/enums/runtime.ts +0 -88
  851. package/src/enums/runtimes.ts +0 -88
  852. package/src/enums/scopes.ts +0 -81
  853. package/src/enums/sms-template-locale.ts +0 -133
  854. package/src/enums/sms-template-type.ts +0 -6
  855. package/src/enums/smtp-encryption.ts +0 -5
  856. package/src/enums/smtp-secure.ts +0 -4
  857. package/src/enums/status-code.ts +0 -6
  858. package/src/enums/status.ts +0 -3
  859. package/src/enums/supabase-migration-resource.ts +0 -13
  860. package/src/enums/tables-db-index-type.ts +0 -6
  861. package/src/enums/template-reference-type.ts +0 -5
  862. package/src/enums/theme.ts +0 -4
  863. package/src/enums/timezone.ts +0 -421
  864. package/src/enums/usage-range.ts +0 -5
  865. package/src/enums/use-cases.ts +0 -16
  866. package/src/enums/vcs-detection-type.ts +0 -4
  867. package/src/enums/vcs-reference-type.ts +0 -5
  868. package/src/id.ts +0 -47
  869. package/src/operator.ts +0 -308
  870. package/src/query.ts +0 -576
  871. package/src/service.ts +0 -30
  872. package/src/services/account.ts +0 -4293
  873. package/src/services/activities.ts +0 -116
  874. package/src/services/assistant.ts +0 -67
  875. package/src/services/backups.ts +0 -754
  876. package/src/services/console.ts +0 -678
  877. package/src/services/databases.ts +0 -6376
  878. package/src/services/domains.ts +0 -4064
  879. package/src/services/functions.ts +0 -2224
  880. package/src/services/graphql.ts +0 -124
  881. package/src/services/health.ts +0 -1296
  882. package/src/services/locale.ts +0 -198
  883. package/src/services/messaging.ts +0 -5194
  884. package/src/services/migrations.ts +0 -1207
  885. package/src/services/organizations.ts +0 -2742
  886. package/src/services/project.ts +0 -404
  887. package/src/services/projects.ts +0 -4431
  888. package/src/services/proxy.ts +0 -532
  889. package/src/services/realtime.ts +0 -537
  890. package/src/services/sites.ts +0 -2131
  891. package/src/services/storage.ts +0 -1196
  892. package/src/services/tables-db.ts +0 -6256
  893. package/src/services/teams.ts +0 -959
  894. package/src/services/tokens.ts +0 -315
  895. package/src/services/users.ts +0 -3324
  896. package/src/services/vcs.ts +0 -676
  897. package/src/services/webhooks.ts +0 -451
  898. package/tsconfig.json +0 -24
@@ -1,2224 +0,0 @@
1
- import { Service } from '../service';
2
- import { AppwriteException, Client, type Payload, UploadProgress } from '../client';
3
- import type { Models } from '../models';
4
-
5
- import { Runtime } from '../enums/runtime';
6
- import { Scopes } from '../enums/scopes';
7
- import { Runtimes } from '../enums/runtimes';
8
- import { UseCases } from '../enums/use-cases';
9
- import { UsageRange } from '../enums/usage-range';
10
- import { TemplateReferenceType } from '../enums/template-reference-type';
11
- import { VCSReferenceType } from '../enums/vcs-reference-type';
12
- import { DeploymentDownloadType } from '../enums/deployment-download-type';
13
- import { ExecutionMethod } from '../enums/execution-method';
14
-
15
- export class Functions {
16
- client: Client;
17
-
18
- constructor(client: Client) {
19
- this.client = client;
20
- }
21
-
22
- /**
23
- * Get a list of all the project's functions. You can use the query params to filter your results.
24
- *
25
- * @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
26
- * @param {string} params.search - Search term to filter your list results. Max length: 256 chars.
27
- * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
28
- * @throws {AppwriteException}
29
- * @returns {Promise<Models.FunctionList>}
30
- */
31
- list(params?: { queries?: string[], search?: string, total?: boolean }): Promise<Models.FunctionList>;
32
- /**
33
- * Get a list of all the project's functions. You can use the query params to filter your results.
34
- *
35
- * @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
36
- * @param {string} search - Search term to filter your list results. Max length: 256 chars.
37
- * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
38
- * @throws {AppwriteException}
39
- * @returns {Promise<Models.FunctionList>}
40
- * @deprecated Use the object parameter style method for a better developer experience.
41
- */
42
- list(queries?: string[], search?: string, total?: boolean): Promise<Models.FunctionList>;
43
- list(
44
- paramsOrFirst?: { queries?: string[], search?: string, total?: boolean } | string[],
45
- ...rest: [(string)?, (boolean)?]
46
- ): Promise<Models.FunctionList> {
47
- let params: { queries?: string[], search?: string, total?: boolean };
48
-
49
- if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
50
- params = (paramsOrFirst || {}) as { queries?: string[], search?: string, total?: boolean };
51
- } else {
52
- params = {
53
- queries: paramsOrFirst as string[],
54
- search: rest[0] as string,
55
- total: rest[1] as boolean
56
- };
57
- }
58
-
59
- const queries = params.queries;
60
- const search = params.search;
61
- const total = params.total;
62
-
63
-
64
- const apiPath = '/functions';
65
- const payload: Payload = {};
66
- if (typeof queries !== 'undefined') {
67
- payload['queries'] = queries;
68
- }
69
- if (typeof search !== 'undefined') {
70
- payload['search'] = search;
71
- }
72
- if (typeof total !== 'undefined') {
73
- payload['total'] = total;
74
- }
75
- const uri = new URL(this.client.config.endpoint + apiPath);
76
-
77
- const apiHeaders: { [header: string]: string } = {
78
- }
79
-
80
- return this.client.call(
81
- 'get',
82
- uri,
83
- apiHeaders,
84
- payload
85
- );
86
- }
87
-
88
- /**
89
- * 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.
90
- *
91
- * @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.
92
- * @param {string} params.name - Function name. Max length: 128 chars.
93
- * @param {Runtime} params.runtime - Execution runtime.
94
- * @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.
95
- * @param {string[]} params.events - Events list. Maximum of 100 events are allowed.
96
- * @param {string} params.schedule - Schedule CRON syntax.
97
- * @param {number} params.timeout - Function maximum execution time in seconds.
98
- * @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.
99
- * @param {boolean} params.logging - When disabled, executions will exclude logs and errors, and will be slightly faster.
100
- * @param {string} params.entrypoint - Entrypoint File. This path is relative to the "providerRootDirectory".
101
- * @param {string} params.commands - Build Commands.
102
- * @param {Scopes[]} params.scopes - List of scopes allowed for API key auto-generated for every execution. Maximum of 100 scopes are allowed.
103
- * @param {string} params.installationId - Appwrite Installation ID for VCS (Version Control System) deployment.
104
- * @param {string} params.providerRepositoryId - Repository ID of the repo linked to the function.
105
- * @param {string} params.providerBranch - Production branch for the repo linked to the function.
106
- * @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.
107
- * @param {string} params.providerRootDirectory - Path to function code in the linked repo.
108
- * @param {string} params.buildSpecification - Build specification for the function deployments.
109
- * @param {string} params.runtimeSpecification - Runtime specification for the function executions.
110
- * @param {number} params.deploymentRetention - Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.
111
- * @throws {AppwriteException}
112
- * @returns {Promise<Models.Function>}
113
- */
114
- 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?: Scopes[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, buildSpecification?: string, runtimeSpecification?: string, deploymentRetention?: number }): Promise<Models.Function>;
115
- /**
116
- * 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.
117
- *
118
- * @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.
119
- * @param {string} name - Function name. Max length: 128 chars.
120
- * @param {Runtime} runtime - Execution runtime.
121
- * @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.
122
- * @param {string[]} events - Events list. Maximum of 100 events are allowed.
123
- * @param {string} schedule - Schedule CRON syntax.
124
- * @param {number} timeout - Function maximum execution time in seconds.
125
- * @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.
126
- * @param {boolean} logging - When disabled, executions will exclude logs and errors, and will be slightly faster.
127
- * @param {string} entrypoint - Entrypoint File. This path is relative to the "providerRootDirectory".
128
- * @param {string} commands - Build Commands.
129
- * @param {Scopes[]} scopes - List of scopes allowed for API key auto-generated for every execution. Maximum of 100 scopes are allowed.
130
- * @param {string} installationId - Appwrite Installation ID for VCS (Version Control System) deployment.
131
- * @param {string} providerRepositoryId - Repository ID of the repo linked to the function.
132
- * @param {string} providerBranch - Production branch for the repo linked to the function.
133
- * @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.
134
- * @param {string} providerRootDirectory - Path to function code in the linked repo.
135
- * @param {string} buildSpecification - Build specification for the function deployments.
136
- * @param {string} runtimeSpecification - Runtime specification for the function executions.
137
- * @param {number} deploymentRetention - Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.
138
- * @throws {AppwriteException}
139
- * @returns {Promise<Models.Function>}
140
- * @deprecated Use the object parameter style method for a better developer experience.
141
- */
142
- create(functionId: string, name: string, runtime: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: Scopes[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, buildSpecification?: string, runtimeSpecification?: string, deploymentRetention?: number): Promise<Models.Function>;
143
- create(
144
- paramsOrFirst: { functionId: string, name: string, runtime: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: Scopes[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, buildSpecification?: string, runtimeSpecification?: string, deploymentRetention?: number } | string,
145
- ...rest: [(string)?, (Runtime)?, (string[])?, (string[])?, (string)?, (number)?, (boolean)?, (boolean)?, (string)?, (string)?, (Scopes[])?, (string)?, (string)?, (string)?, (boolean)?, (string)?, (string)?, (string)?, (number)?]
146
- ): Promise<Models.Function> {
147
- 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?: Scopes[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, buildSpecification?: string, runtimeSpecification?: string, deploymentRetention?: number };
148
-
149
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
150
- 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?: Scopes[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, buildSpecification?: string, runtimeSpecification?: string, deploymentRetention?: number };
151
- } else {
152
- params = {
153
- functionId: paramsOrFirst as string,
154
- name: rest[0] as string,
155
- runtime: rest[1] as Runtime,
156
- execute: rest[2] as string[],
157
- events: rest[3] as string[],
158
- schedule: rest[4] as string,
159
- timeout: rest[5] as number,
160
- enabled: rest[6] as boolean,
161
- logging: rest[7] as boolean,
162
- entrypoint: rest[8] as string,
163
- commands: rest[9] as string,
164
- scopes: rest[10] as Scopes[],
165
- installationId: rest[11] as string,
166
- providerRepositoryId: rest[12] as string,
167
- providerBranch: rest[13] as string,
168
- providerSilentMode: rest[14] as boolean,
169
- providerRootDirectory: rest[15] as string,
170
- buildSpecification: rest[16] as string,
171
- runtimeSpecification: rest[17] as string,
172
- deploymentRetention: rest[18] as number
173
- };
174
- }
175
-
176
- const functionId = params.functionId;
177
- const name = params.name;
178
- const runtime = params.runtime;
179
- const execute = params.execute;
180
- const events = params.events;
181
- const schedule = params.schedule;
182
- const timeout = params.timeout;
183
- const enabled = params.enabled;
184
- const logging = params.logging;
185
- const entrypoint = params.entrypoint;
186
- const commands = params.commands;
187
- const scopes = params.scopes;
188
- const installationId = params.installationId;
189
- const providerRepositoryId = params.providerRepositoryId;
190
- const providerBranch = params.providerBranch;
191
- const providerSilentMode = params.providerSilentMode;
192
- const providerRootDirectory = params.providerRootDirectory;
193
- const buildSpecification = params.buildSpecification;
194
- const runtimeSpecification = params.runtimeSpecification;
195
- const deploymentRetention = params.deploymentRetention;
196
-
197
- if (typeof functionId === 'undefined') {
198
- throw new AppwriteException('Missing required parameter: "functionId"');
199
- }
200
- if (typeof name === 'undefined') {
201
- throw new AppwriteException('Missing required parameter: "name"');
202
- }
203
- if (typeof runtime === 'undefined') {
204
- throw new AppwriteException('Missing required parameter: "runtime"');
205
- }
206
-
207
- const apiPath = '/functions';
208
- const payload: Payload = {};
209
- if (typeof functionId !== 'undefined') {
210
- payload['functionId'] = functionId;
211
- }
212
- if (typeof name !== 'undefined') {
213
- payload['name'] = name;
214
- }
215
- if (typeof runtime !== 'undefined') {
216
- payload['runtime'] = runtime;
217
- }
218
- if (typeof execute !== 'undefined') {
219
- payload['execute'] = execute;
220
- }
221
- if (typeof events !== 'undefined') {
222
- payload['events'] = events;
223
- }
224
- if (typeof schedule !== 'undefined') {
225
- payload['schedule'] = schedule;
226
- }
227
- if (typeof timeout !== 'undefined') {
228
- payload['timeout'] = timeout;
229
- }
230
- if (typeof enabled !== 'undefined') {
231
- payload['enabled'] = enabled;
232
- }
233
- if (typeof logging !== 'undefined') {
234
- payload['logging'] = logging;
235
- }
236
- if (typeof entrypoint !== 'undefined') {
237
- payload['entrypoint'] = entrypoint;
238
- }
239
- if (typeof commands !== 'undefined') {
240
- payload['commands'] = commands;
241
- }
242
- if (typeof scopes !== 'undefined') {
243
- payload['scopes'] = scopes;
244
- }
245
- if (typeof installationId !== 'undefined') {
246
- payload['installationId'] = installationId;
247
- }
248
- if (typeof providerRepositoryId !== 'undefined') {
249
- payload['providerRepositoryId'] = providerRepositoryId;
250
- }
251
- if (typeof providerBranch !== 'undefined') {
252
- payload['providerBranch'] = providerBranch;
253
- }
254
- if (typeof providerSilentMode !== 'undefined') {
255
- payload['providerSilentMode'] = providerSilentMode;
256
- }
257
- if (typeof providerRootDirectory !== 'undefined') {
258
- payload['providerRootDirectory'] = providerRootDirectory;
259
- }
260
- if (typeof buildSpecification !== 'undefined') {
261
- payload['buildSpecification'] = buildSpecification;
262
- }
263
- if (typeof runtimeSpecification !== 'undefined') {
264
- payload['runtimeSpecification'] = runtimeSpecification;
265
- }
266
- if (typeof deploymentRetention !== 'undefined') {
267
- payload['deploymentRetention'] = deploymentRetention;
268
- }
269
- const uri = new URL(this.client.config.endpoint + apiPath);
270
-
271
- const apiHeaders: { [header: string]: string } = {
272
- 'content-type': 'application/json',
273
- }
274
-
275
- return this.client.call(
276
- 'post',
277
- uri,
278
- apiHeaders,
279
- payload
280
- );
281
- }
282
-
283
- /**
284
- * Get a list of all runtimes that are currently active on your instance.
285
- *
286
- * @throws {AppwriteException}
287
- * @returns {Promise<Models.RuntimeList>}
288
- */
289
- listRuntimes(): Promise<Models.RuntimeList> {
290
-
291
- const apiPath = '/functions/runtimes';
292
- const payload: Payload = {};
293
- const uri = new URL(this.client.config.endpoint + apiPath);
294
-
295
- const apiHeaders: { [header: string]: string } = {
296
- }
297
-
298
- return this.client.call(
299
- 'get',
300
- uri,
301
- apiHeaders,
302
- payload
303
- );
304
- }
305
-
306
- /**
307
- * List allowed function specifications for this instance.
308
- *
309
- * @throws {AppwriteException}
310
- * @returns {Promise<Models.SpecificationList>}
311
- */
312
- listSpecifications(): Promise<Models.SpecificationList> {
313
-
314
- const apiPath = '/functions/specifications';
315
- const payload: Payload = {};
316
- const uri = new URL(this.client.config.endpoint + apiPath);
317
-
318
- const apiHeaders: { [header: string]: string } = {
319
- }
320
-
321
- return this.client.call(
322
- 'get',
323
- uri,
324
- apiHeaders,
325
- payload
326
- );
327
- }
328
-
329
- /**
330
- * List available function templates. You can use template details in [createFunction](/docs/references/cloud/server-nodejs/functions#create) method.
331
- *
332
- * @param {Runtimes[]} params.runtimes - List of runtimes allowed for filtering function templates. Maximum of 100 runtimes are allowed.
333
- * @param {UseCases[]} params.useCases - List of use cases allowed for filtering function templates. Maximum of 100 use cases are allowed.
334
- * @param {number} params.limit - Limit the number of templates returned in the response. Default limit is 25, and maximum limit is 5000.
335
- * @param {number} params.offset - Offset the list of returned templates. Maximum offset is 5000.
336
- * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
337
- * @throws {AppwriteException}
338
- * @returns {Promise<Models.TemplateFunctionList>}
339
- */
340
- listTemplates(params?: { runtimes?: Runtimes[], useCases?: UseCases[], limit?: number, offset?: number, total?: boolean }): Promise<Models.TemplateFunctionList>;
341
- /**
342
- * List available function templates. You can use template details in [createFunction](/docs/references/cloud/server-nodejs/functions#create) method.
343
- *
344
- * @param {Runtimes[]} runtimes - List of runtimes allowed for filtering function templates. Maximum of 100 runtimes are allowed.
345
- * @param {UseCases[]} useCases - List of use cases allowed for filtering function templates. Maximum of 100 use cases are allowed.
346
- * @param {number} limit - Limit the number of templates returned in the response. Default limit is 25, and maximum limit is 5000.
347
- * @param {number} offset - Offset the list of returned templates. Maximum offset is 5000.
348
- * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
349
- * @throws {AppwriteException}
350
- * @returns {Promise<Models.TemplateFunctionList>}
351
- * @deprecated Use the object parameter style method for a better developer experience.
352
- */
353
- listTemplates(runtimes?: Runtimes[], useCases?: UseCases[], limit?: number, offset?: number, total?: boolean): Promise<Models.TemplateFunctionList>;
354
- listTemplates(
355
- paramsOrFirst?: { runtimes?: Runtimes[], useCases?: UseCases[], limit?: number, offset?: number, total?: boolean } | Runtimes[],
356
- ...rest: [(UseCases[])?, (number)?, (number)?, (boolean)?]
357
- ): Promise<Models.TemplateFunctionList> {
358
- let params: { runtimes?: Runtimes[], useCases?: UseCases[], limit?: number, offset?: number, total?: boolean };
359
-
360
- if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('runtimes' in paramsOrFirst || 'useCases' in paramsOrFirst || 'limit' in paramsOrFirst || 'offset' in paramsOrFirst || 'total' in paramsOrFirst))) {
361
- params = (paramsOrFirst || {}) as { runtimes?: Runtimes[], useCases?: UseCases[], limit?: number, offset?: number, total?: boolean };
362
- } else {
363
- params = {
364
- runtimes: paramsOrFirst as Runtimes[],
365
- useCases: rest[0] as UseCases[],
366
- limit: rest[1] as number,
367
- offset: rest[2] as number,
368
- total: rest[3] as boolean
369
- };
370
- }
371
-
372
- const runtimes = params.runtimes;
373
- const useCases = params.useCases;
374
- const limit = params.limit;
375
- const offset = params.offset;
376
- const total = params.total;
377
-
378
-
379
- const apiPath = '/functions/templates';
380
- const payload: Payload = {};
381
- if (typeof runtimes !== 'undefined') {
382
- payload['runtimes'] = runtimes;
383
- }
384
- if (typeof useCases !== 'undefined') {
385
- payload['useCases'] = useCases;
386
- }
387
- if (typeof limit !== 'undefined') {
388
- payload['limit'] = limit;
389
- }
390
- if (typeof offset !== 'undefined') {
391
- payload['offset'] = offset;
392
- }
393
- if (typeof total !== 'undefined') {
394
- payload['total'] = total;
395
- }
396
- const uri = new URL(this.client.config.endpoint + apiPath);
397
-
398
- const apiHeaders: { [header: string]: string } = {
399
- }
400
-
401
- return this.client.call(
402
- 'get',
403
- uri,
404
- apiHeaders,
405
- payload
406
- );
407
- }
408
-
409
- /**
410
- * Get a function template using ID. You can use template details in [createFunction](/docs/references/cloud/server-nodejs/functions#create) method.
411
- *
412
- * @param {string} params.templateId - Template ID.
413
- * @throws {AppwriteException}
414
- * @returns {Promise<Models.TemplateFunction>}
415
- */
416
- getTemplate(params: { templateId: string }): Promise<Models.TemplateFunction>;
417
- /**
418
- * Get a function template using ID. You can use template details in [createFunction](/docs/references/cloud/server-nodejs/functions#create) method.
419
- *
420
- * @param {string} templateId - Template ID.
421
- * @throws {AppwriteException}
422
- * @returns {Promise<Models.TemplateFunction>}
423
- * @deprecated Use the object parameter style method for a better developer experience.
424
- */
425
- getTemplate(templateId: string): Promise<Models.TemplateFunction>;
426
- getTemplate(
427
- paramsOrFirst: { templateId: string } | string
428
- ): Promise<Models.TemplateFunction> {
429
- let params: { templateId: string };
430
-
431
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
432
- params = (paramsOrFirst || {}) as { templateId: string };
433
- } else {
434
- params = {
435
- templateId: paramsOrFirst as string
436
- };
437
- }
438
-
439
- const templateId = params.templateId;
440
-
441
- if (typeof templateId === 'undefined') {
442
- throw new AppwriteException('Missing required parameter: "templateId"');
443
- }
444
-
445
- const apiPath = '/functions/templates/{templateId}'.replace('{templateId}', templateId);
446
- const payload: Payload = {};
447
- const uri = new URL(this.client.config.endpoint + apiPath);
448
-
449
- const apiHeaders: { [header: string]: string } = {
450
- }
451
-
452
- return this.client.call(
453
- 'get',
454
- uri,
455
- apiHeaders,
456
- payload
457
- );
458
- }
459
-
460
- /**
461
- * 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.
462
- *
463
- * @param {UsageRange} params.range - Date range.
464
- * @throws {AppwriteException}
465
- * @returns {Promise<Models.UsageFunctions>}
466
- */
467
- listUsage(params?: { range?: UsageRange }): Promise<Models.UsageFunctions>;
468
- /**
469
- * 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.
470
- *
471
- * @param {UsageRange} range - Date range.
472
- * @throws {AppwriteException}
473
- * @returns {Promise<Models.UsageFunctions>}
474
- * @deprecated Use the object parameter style method for a better developer experience.
475
- */
476
- listUsage(range?: UsageRange): Promise<Models.UsageFunctions>;
477
- listUsage(
478
- paramsOrFirst?: { range?: UsageRange } | UsageRange
479
- ): Promise<Models.UsageFunctions> {
480
- let params: { range?: UsageRange };
481
-
482
- if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('range' in paramsOrFirst))) {
483
- params = (paramsOrFirst || {}) as { range?: UsageRange };
484
- } else {
485
- params = {
486
- range: paramsOrFirst as UsageRange
487
- };
488
- }
489
-
490
- const range = params.range;
491
-
492
-
493
- const apiPath = '/functions/usage';
494
- const payload: Payload = {};
495
- if (typeof range !== 'undefined') {
496
- payload['range'] = range;
497
- }
498
- const uri = new URL(this.client.config.endpoint + apiPath);
499
-
500
- const apiHeaders: { [header: string]: string } = {
501
- }
502
-
503
- return this.client.call(
504
- 'get',
505
- uri,
506
- apiHeaders,
507
- payload
508
- );
509
- }
510
-
511
- /**
512
- * Get a function by its unique ID.
513
- *
514
- * @param {string} params.functionId - Function ID.
515
- * @throws {AppwriteException}
516
- * @returns {Promise<Models.Function>}
517
- */
518
- get(params: { functionId: string }): Promise<Models.Function>;
519
- /**
520
- * Get a function by its unique ID.
521
- *
522
- * @param {string} functionId - Function ID.
523
- * @throws {AppwriteException}
524
- * @returns {Promise<Models.Function>}
525
- * @deprecated Use the object parameter style method for a better developer experience.
526
- */
527
- get(functionId: string): Promise<Models.Function>;
528
- get(
529
- paramsOrFirst: { functionId: string } | string
530
- ): Promise<Models.Function> {
531
- let params: { functionId: string };
532
-
533
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
534
- params = (paramsOrFirst || {}) as { functionId: string };
535
- } else {
536
- params = {
537
- functionId: paramsOrFirst as string
538
- };
539
- }
540
-
541
- const functionId = params.functionId;
542
-
543
- if (typeof functionId === 'undefined') {
544
- throw new AppwriteException('Missing required parameter: "functionId"');
545
- }
546
-
547
- const apiPath = '/functions/{functionId}'.replace('{functionId}', functionId);
548
- const payload: Payload = {};
549
- const uri = new URL(this.client.config.endpoint + apiPath);
550
-
551
- const apiHeaders: { [header: string]: string } = {
552
- }
553
-
554
- return this.client.call(
555
- 'get',
556
- uri,
557
- apiHeaders,
558
- payload
559
- );
560
- }
561
-
562
- /**
563
- * Update function by its unique ID.
564
- *
565
- * @param {string} params.functionId - Function ID.
566
- * @param {string} params.name - Function name. Max length: 128 chars.
567
- * @param {Runtime} params.runtime - Execution runtime.
568
- * @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.
569
- * @param {string[]} params.events - Events list. Maximum of 100 events are allowed.
570
- * @param {string} params.schedule - Schedule CRON syntax.
571
- * @param {number} params.timeout - Maximum execution time in seconds.
572
- * @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.
573
- * @param {boolean} params.logging - When disabled, executions will exclude logs and errors, and will be slightly faster.
574
- * @param {string} params.entrypoint - Entrypoint File. This path is relative to the "providerRootDirectory".
575
- * @param {string} params.commands - Build Commands.
576
- * @param {Scopes[]} params.scopes - List of scopes allowed for API Key auto-generated for every execution. Maximum of 100 scopes are allowed.
577
- * @param {string} params.installationId - Appwrite Installation ID for VCS (Version Controle System) deployment.
578
- * @param {string} params.providerRepositoryId - Repository ID of the repo linked to the function
579
- * @param {string} params.providerBranch - Production branch for the repo linked to the function
580
- * @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.
581
- * @param {string} params.providerRootDirectory - Path to function code in the linked repo.
582
- * @param {string} params.buildSpecification - Build specification for the function deployments.
583
- * @param {string} params.runtimeSpecification - Runtime specification for the function executions.
584
- * @param {number} params.deploymentRetention - Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.
585
- * @throws {AppwriteException}
586
- * @returns {Promise<Models.Function>}
587
- */
588
- 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?: Scopes[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, buildSpecification?: string, runtimeSpecification?: string, deploymentRetention?: number }): Promise<Models.Function>;
589
- /**
590
- * Update function by its unique ID.
591
- *
592
- * @param {string} functionId - Function ID.
593
- * @param {string} name - Function name. Max length: 128 chars.
594
- * @param {Runtime} runtime - Execution runtime.
595
- * @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.
596
- * @param {string[]} events - Events list. Maximum of 100 events are allowed.
597
- * @param {string} schedule - Schedule CRON syntax.
598
- * @param {number} timeout - Maximum execution time in seconds.
599
- * @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.
600
- * @param {boolean} logging - When disabled, executions will exclude logs and errors, and will be slightly faster.
601
- * @param {string} entrypoint - Entrypoint File. This path is relative to the "providerRootDirectory".
602
- * @param {string} commands - Build Commands.
603
- * @param {Scopes[]} scopes - List of scopes allowed for API Key auto-generated for every execution. Maximum of 100 scopes are allowed.
604
- * @param {string} installationId - Appwrite Installation ID for VCS (Version Controle System) deployment.
605
- * @param {string} providerRepositoryId - Repository ID of the repo linked to the function
606
- * @param {string} providerBranch - Production branch for the repo linked to the function
607
- * @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.
608
- * @param {string} providerRootDirectory - Path to function code in the linked repo.
609
- * @param {string} buildSpecification - Build specification for the function deployments.
610
- * @param {string} runtimeSpecification - Runtime specification for the function executions.
611
- * @param {number} deploymentRetention - Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.
612
- * @throws {AppwriteException}
613
- * @returns {Promise<Models.Function>}
614
- * @deprecated Use the object parameter style method for a better developer experience.
615
- */
616
- update(functionId: string, name: string, runtime?: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: Scopes[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, buildSpecification?: string, runtimeSpecification?: string, deploymentRetention?: number): Promise<Models.Function>;
617
- update(
618
- paramsOrFirst: { functionId: string, name: string, runtime?: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: Scopes[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, buildSpecification?: string, runtimeSpecification?: string, deploymentRetention?: number } | string,
619
- ...rest: [(string)?, (Runtime)?, (string[])?, (string[])?, (string)?, (number)?, (boolean)?, (boolean)?, (string)?, (string)?, (Scopes[])?, (string)?, (string)?, (string)?, (boolean)?, (string)?, (string)?, (string)?, (number)?]
620
- ): Promise<Models.Function> {
621
- 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?: Scopes[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, buildSpecification?: string, runtimeSpecification?: string, deploymentRetention?: number };
622
-
623
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
624
- 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?: Scopes[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, buildSpecification?: string, runtimeSpecification?: string, deploymentRetention?: number };
625
- } else {
626
- params = {
627
- functionId: paramsOrFirst as string,
628
- name: rest[0] as string,
629
- runtime: rest[1] as Runtime,
630
- execute: rest[2] as string[],
631
- events: rest[3] as string[],
632
- schedule: rest[4] as string,
633
- timeout: rest[5] as number,
634
- enabled: rest[6] as boolean,
635
- logging: rest[7] as boolean,
636
- entrypoint: rest[8] as string,
637
- commands: rest[9] as string,
638
- scopes: rest[10] as Scopes[],
639
- installationId: rest[11] as string,
640
- providerRepositoryId: rest[12] as string,
641
- providerBranch: rest[13] as string,
642
- providerSilentMode: rest[14] as boolean,
643
- providerRootDirectory: rest[15] as string,
644
- buildSpecification: rest[16] as string,
645
- runtimeSpecification: rest[17] as string,
646
- deploymentRetention: rest[18] as number
647
- };
648
- }
649
-
650
- const functionId = params.functionId;
651
- const name = params.name;
652
- const runtime = params.runtime;
653
- const execute = params.execute;
654
- const events = params.events;
655
- const schedule = params.schedule;
656
- const timeout = params.timeout;
657
- const enabled = params.enabled;
658
- const logging = params.logging;
659
- const entrypoint = params.entrypoint;
660
- const commands = params.commands;
661
- const scopes = params.scopes;
662
- const installationId = params.installationId;
663
- const providerRepositoryId = params.providerRepositoryId;
664
- const providerBranch = params.providerBranch;
665
- const providerSilentMode = params.providerSilentMode;
666
- const providerRootDirectory = params.providerRootDirectory;
667
- const buildSpecification = params.buildSpecification;
668
- const runtimeSpecification = params.runtimeSpecification;
669
- const deploymentRetention = params.deploymentRetention;
670
-
671
- if (typeof functionId === 'undefined') {
672
- throw new AppwriteException('Missing required parameter: "functionId"');
673
- }
674
- if (typeof name === 'undefined') {
675
- throw new AppwriteException('Missing required parameter: "name"');
676
- }
677
-
678
- const apiPath = '/functions/{functionId}'.replace('{functionId}', functionId);
679
- const payload: Payload = {};
680
- if (typeof name !== 'undefined') {
681
- payload['name'] = name;
682
- }
683
- if (typeof runtime !== 'undefined') {
684
- payload['runtime'] = runtime;
685
- }
686
- if (typeof execute !== 'undefined') {
687
- payload['execute'] = execute;
688
- }
689
- if (typeof events !== 'undefined') {
690
- payload['events'] = events;
691
- }
692
- if (typeof schedule !== 'undefined') {
693
- payload['schedule'] = schedule;
694
- }
695
- if (typeof timeout !== 'undefined') {
696
- payload['timeout'] = timeout;
697
- }
698
- if (typeof enabled !== 'undefined') {
699
- payload['enabled'] = enabled;
700
- }
701
- if (typeof logging !== 'undefined') {
702
- payload['logging'] = logging;
703
- }
704
- if (typeof entrypoint !== 'undefined') {
705
- payload['entrypoint'] = entrypoint;
706
- }
707
- if (typeof commands !== 'undefined') {
708
- payload['commands'] = commands;
709
- }
710
- if (typeof scopes !== 'undefined') {
711
- payload['scopes'] = scopes;
712
- }
713
- if (typeof installationId !== 'undefined') {
714
- payload['installationId'] = installationId;
715
- }
716
- if (typeof providerRepositoryId !== 'undefined') {
717
- payload['providerRepositoryId'] = providerRepositoryId;
718
- }
719
- if (typeof providerBranch !== 'undefined') {
720
- payload['providerBranch'] = providerBranch;
721
- }
722
- if (typeof providerSilentMode !== 'undefined') {
723
- payload['providerSilentMode'] = providerSilentMode;
724
- }
725
- if (typeof providerRootDirectory !== 'undefined') {
726
- payload['providerRootDirectory'] = providerRootDirectory;
727
- }
728
- if (typeof buildSpecification !== 'undefined') {
729
- payload['buildSpecification'] = buildSpecification;
730
- }
731
- if (typeof runtimeSpecification !== 'undefined') {
732
- payload['runtimeSpecification'] = runtimeSpecification;
733
- }
734
- if (typeof deploymentRetention !== 'undefined') {
735
- payload['deploymentRetention'] = deploymentRetention;
736
- }
737
- const uri = new URL(this.client.config.endpoint + apiPath);
738
-
739
- const apiHeaders: { [header: string]: string } = {
740
- 'content-type': 'application/json',
741
- }
742
-
743
- return this.client.call(
744
- 'put',
745
- uri,
746
- apiHeaders,
747
- payload
748
- );
749
- }
750
-
751
- /**
752
- * Delete a function by its unique ID.
753
- *
754
- * @param {string} params.functionId - Function ID.
755
- * @throws {AppwriteException}
756
- * @returns {Promise<{}>}
757
- */
758
- delete(params: { functionId: string }): Promise<{}>;
759
- /**
760
- * Delete a function by its unique ID.
761
- *
762
- * @param {string} functionId - Function ID.
763
- * @throws {AppwriteException}
764
- * @returns {Promise<{}>}
765
- * @deprecated Use the object parameter style method for a better developer experience.
766
- */
767
- delete(functionId: string): Promise<{}>;
768
- delete(
769
- paramsOrFirst: { functionId: string } | string
770
- ): Promise<{}> {
771
- let params: { functionId: string };
772
-
773
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
774
- params = (paramsOrFirst || {}) as { functionId: string };
775
- } else {
776
- params = {
777
- functionId: paramsOrFirst as string
778
- };
779
- }
780
-
781
- const functionId = params.functionId;
782
-
783
- if (typeof functionId === 'undefined') {
784
- throw new AppwriteException('Missing required parameter: "functionId"');
785
- }
786
-
787
- const apiPath = '/functions/{functionId}'.replace('{functionId}', functionId);
788
- const payload: Payload = {};
789
- const uri = new URL(this.client.config.endpoint + apiPath);
790
-
791
- const apiHeaders: { [header: string]: string } = {
792
- 'content-type': 'application/json',
793
- }
794
-
795
- return this.client.call(
796
- 'delete',
797
- uri,
798
- apiHeaders,
799
- payload
800
- );
801
- }
802
-
803
- /**
804
- * Update the function active deployment. Use this endpoint to switch the code deployment that should be used when visitor opens your function.
805
- *
806
- * @param {string} params.functionId - Function ID.
807
- * @param {string} params.deploymentId - Deployment ID.
808
- * @throws {AppwriteException}
809
- * @returns {Promise<Models.Function>}
810
- */
811
- updateFunctionDeployment(params: { functionId: string, deploymentId: string }): Promise<Models.Function>;
812
- /**
813
- * Update the function active deployment. Use this endpoint to switch the code deployment that should be used when visitor opens your function.
814
- *
815
- * @param {string} functionId - Function ID.
816
- * @param {string} deploymentId - Deployment ID.
817
- * @throws {AppwriteException}
818
- * @returns {Promise<Models.Function>}
819
- * @deprecated Use the object parameter style method for a better developer experience.
820
- */
821
- updateFunctionDeployment(functionId: string, deploymentId: string): Promise<Models.Function>;
822
- updateFunctionDeployment(
823
- paramsOrFirst: { functionId: string, deploymentId: string } | string,
824
- ...rest: [(string)?]
825
- ): Promise<Models.Function> {
826
- let params: { functionId: string, deploymentId: string };
827
-
828
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
829
- params = (paramsOrFirst || {}) as { functionId: string, deploymentId: string };
830
- } else {
831
- params = {
832
- functionId: paramsOrFirst as string,
833
- deploymentId: rest[0] as string
834
- };
835
- }
836
-
837
- const functionId = params.functionId;
838
- const deploymentId = params.deploymentId;
839
-
840
- if (typeof functionId === 'undefined') {
841
- throw new AppwriteException('Missing required parameter: "functionId"');
842
- }
843
- if (typeof deploymentId === 'undefined') {
844
- throw new AppwriteException('Missing required parameter: "deploymentId"');
845
- }
846
-
847
- const apiPath = '/functions/{functionId}/deployment'.replace('{functionId}', functionId);
848
- const payload: Payload = {};
849
- if (typeof deploymentId !== 'undefined') {
850
- payload['deploymentId'] = deploymentId;
851
- }
852
- const uri = new URL(this.client.config.endpoint + apiPath);
853
-
854
- const apiHeaders: { [header: string]: string } = {
855
- 'content-type': 'application/json',
856
- }
857
-
858
- return this.client.call(
859
- 'patch',
860
- uri,
861
- apiHeaders,
862
- payload
863
- );
864
- }
865
-
866
- /**
867
- * Get a list of all the function's code deployments. You can use the query params to filter your results.
868
- *
869
- * @param {string} params.functionId - Function ID.
870
- * @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
871
- * @param {string} params.search - Search term to filter your list results. Max length: 256 chars.
872
- * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
873
- * @throws {AppwriteException}
874
- * @returns {Promise<Models.DeploymentList>}
875
- */
876
- listDeployments(params: { functionId: string, queries?: string[], search?: string, total?: boolean }): Promise<Models.DeploymentList>;
877
- /**
878
- * Get a list of all the function's code deployments. You can use the query params to filter your results.
879
- *
880
- * @param {string} functionId - Function ID.
881
- * @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
882
- * @param {string} search - Search term to filter your list results. Max length: 256 chars.
883
- * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
884
- * @throws {AppwriteException}
885
- * @returns {Promise<Models.DeploymentList>}
886
- * @deprecated Use the object parameter style method for a better developer experience.
887
- */
888
- listDeployments(functionId: string, queries?: string[], search?: string, total?: boolean): Promise<Models.DeploymentList>;
889
- listDeployments(
890
- paramsOrFirst: { functionId: string, queries?: string[], search?: string, total?: boolean } | string,
891
- ...rest: [(string[])?, (string)?, (boolean)?]
892
- ): Promise<Models.DeploymentList> {
893
- let params: { functionId: string, queries?: string[], search?: string, total?: boolean };
894
-
895
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
896
- params = (paramsOrFirst || {}) as { functionId: string, queries?: string[], search?: string, total?: boolean };
897
- } else {
898
- params = {
899
- functionId: paramsOrFirst as string,
900
- queries: rest[0] as string[],
901
- search: rest[1] as string,
902
- total: rest[2] as boolean
903
- };
904
- }
905
-
906
- const functionId = params.functionId;
907
- const queries = params.queries;
908
- const search = params.search;
909
- const total = params.total;
910
-
911
- if (typeof functionId === 'undefined') {
912
- throw new AppwriteException('Missing required parameter: "functionId"');
913
- }
914
-
915
- const apiPath = '/functions/{functionId}/deployments'.replace('{functionId}', functionId);
916
- const payload: Payload = {};
917
- if (typeof queries !== 'undefined') {
918
- payload['queries'] = queries;
919
- }
920
- if (typeof search !== 'undefined') {
921
- payload['search'] = search;
922
- }
923
- if (typeof total !== 'undefined') {
924
- payload['total'] = total;
925
- }
926
- const uri = new URL(this.client.config.endpoint + apiPath);
927
-
928
- const apiHeaders: { [header: string]: string } = {
929
- }
930
-
931
- return this.client.call(
932
- 'get',
933
- uri,
934
- apiHeaders,
935
- payload
936
- );
937
- }
938
-
939
- /**
940
- * 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.
941
- *
942
- * 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).
943
- *
944
- * Use the "command" param to set the entrypoint used to execute your code.
945
- *
946
- * @param {string} params.functionId - Function ID.
947
- * @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.
948
- * @param {boolean} params.activate - Automatically activate the deployment when it is finished building.
949
- * @param {string} params.entrypoint - Entrypoint File.
950
- * @param {string} params.commands - Build Commands.
951
- * @throws {AppwriteException}
952
- * @returns {Promise<Models.Deployment>}
953
- */
954
- createDeployment(params: { functionId: string, code: File, activate: boolean, entrypoint?: string, commands?: string, onProgress?: (progress: UploadProgress) => void }): Promise<Models.Deployment>;
955
- /**
956
- * 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.
957
- *
958
- * 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).
959
- *
960
- * Use the "command" param to set the entrypoint used to execute your code.
961
- *
962
- * @param {string} functionId - Function ID.
963
- * @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.
964
- * @param {boolean} activate - Automatically activate the deployment when it is finished building.
965
- * @param {string} entrypoint - Entrypoint File.
966
- * @param {string} commands - Build Commands.
967
- * @throws {AppwriteException}
968
- * @returns {Promise<Models.Deployment>}
969
- * @deprecated Use the object parameter style method for a better developer experience.
970
- */
971
- createDeployment(functionId: string, code: File, activate: boolean, entrypoint?: string, commands?: string, onProgress?: (progress: UploadProgress) => void): Promise<Models.Deployment>;
972
- createDeployment(
973
- paramsOrFirst: { functionId: string, code: File, activate: boolean, entrypoint?: string, commands?: string, onProgress?: (progress: UploadProgress) => void } | string,
974
- ...rest: [(File)?, (boolean)?, (string)?, (string)?,((progress: UploadProgress) => void)?]
975
- ): Promise<Models.Deployment> {
976
- let params: { functionId: string, code: File, activate: boolean, entrypoint?: string, commands?: string };
977
- let onProgress: ((progress: UploadProgress) => void);
978
-
979
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
980
- params = (paramsOrFirst || {}) as { functionId: string, code: File, activate: boolean, entrypoint?: string, commands?: string };
981
- onProgress = paramsOrFirst?.onProgress as ((progress: UploadProgress) => void);
982
- } else {
983
- params = {
984
- functionId: paramsOrFirst as string,
985
- code: rest[0] as File,
986
- activate: rest[1] as boolean,
987
- entrypoint: rest[2] as string,
988
- commands: rest[3] as string
989
- };
990
- onProgress = rest[4] as ((progress: UploadProgress) => void);
991
- }
992
-
993
- const functionId = params.functionId;
994
- const code = params.code;
995
- const activate = params.activate;
996
- const entrypoint = params.entrypoint;
997
- const commands = params.commands;
998
-
999
- if (typeof functionId === 'undefined') {
1000
- throw new AppwriteException('Missing required parameter: "functionId"');
1001
- }
1002
- if (typeof code === 'undefined') {
1003
- throw new AppwriteException('Missing required parameter: "code"');
1004
- }
1005
- if (typeof activate === 'undefined') {
1006
- throw new AppwriteException('Missing required parameter: "activate"');
1007
- }
1008
-
1009
- const apiPath = '/functions/{functionId}/deployments'.replace('{functionId}', functionId);
1010
- const payload: Payload = {};
1011
- if (typeof entrypoint !== 'undefined') {
1012
- payload['entrypoint'] = entrypoint;
1013
- }
1014
- if (typeof commands !== 'undefined') {
1015
- payload['commands'] = commands;
1016
- }
1017
- if (typeof code !== 'undefined') {
1018
- payload['code'] = code;
1019
- }
1020
- if (typeof activate !== 'undefined') {
1021
- payload['activate'] = activate;
1022
- }
1023
- const uri = new URL(this.client.config.endpoint + apiPath);
1024
-
1025
- const apiHeaders: { [header: string]: string } = {
1026
- 'content-type': 'multipart/form-data',
1027
- }
1028
-
1029
- return this.client.chunkedUpload(
1030
- 'post',
1031
- uri,
1032
- apiHeaders,
1033
- payload,
1034
- onProgress
1035
- );
1036
- }
1037
-
1038
- /**
1039
- * 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.
1040
- *
1041
- * @param {string} params.functionId - Function ID.
1042
- * @param {string} params.deploymentId - Deployment ID.
1043
- * @param {string} params.buildId - Build unique ID.
1044
- * @throws {AppwriteException}
1045
- * @returns {Promise<Models.Deployment>}
1046
- */
1047
- createDuplicateDeployment(params: { functionId: string, deploymentId: string, buildId?: string }): Promise<Models.Deployment>;
1048
- /**
1049
- * 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.
1050
- *
1051
- * @param {string} functionId - Function ID.
1052
- * @param {string} deploymentId - Deployment ID.
1053
- * @param {string} buildId - Build unique ID.
1054
- * @throws {AppwriteException}
1055
- * @returns {Promise<Models.Deployment>}
1056
- * @deprecated Use the object parameter style method for a better developer experience.
1057
- */
1058
- createDuplicateDeployment(functionId: string, deploymentId: string, buildId?: string): Promise<Models.Deployment>;
1059
- createDuplicateDeployment(
1060
- paramsOrFirst: { functionId: string, deploymentId: string, buildId?: string } | string,
1061
- ...rest: [(string)?, (string)?]
1062
- ): Promise<Models.Deployment> {
1063
- let params: { functionId: string, deploymentId: string, buildId?: string };
1064
-
1065
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1066
- params = (paramsOrFirst || {}) as { functionId: string, deploymentId: string, buildId?: string };
1067
- } else {
1068
- params = {
1069
- functionId: paramsOrFirst as string,
1070
- deploymentId: rest[0] as string,
1071
- buildId: rest[1] as string
1072
- };
1073
- }
1074
-
1075
- const functionId = params.functionId;
1076
- const deploymentId = params.deploymentId;
1077
- const buildId = params.buildId;
1078
-
1079
- if (typeof functionId === 'undefined') {
1080
- throw new AppwriteException('Missing required parameter: "functionId"');
1081
- }
1082
- if (typeof deploymentId === 'undefined') {
1083
- throw new AppwriteException('Missing required parameter: "deploymentId"');
1084
- }
1085
-
1086
- const apiPath = '/functions/{functionId}/deployments/duplicate'.replace('{functionId}', functionId);
1087
- const payload: Payload = {};
1088
- if (typeof deploymentId !== 'undefined') {
1089
- payload['deploymentId'] = deploymentId;
1090
- }
1091
- if (typeof buildId !== 'undefined') {
1092
- payload['buildId'] = buildId;
1093
- }
1094
- const uri = new URL(this.client.config.endpoint + apiPath);
1095
-
1096
- const apiHeaders: { [header: string]: string } = {
1097
- 'content-type': 'application/json',
1098
- }
1099
-
1100
- return this.client.call(
1101
- 'post',
1102
- uri,
1103
- apiHeaders,
1104
- payload
1105
- );
1106
- }
1107
-
1108
- /**
1109
- * Create a deployment based on a template.
1110
- *
1111
- * Use this endpoint with combination of [listTemplates](https://appwrite.io/docs/products/functions/templates) to find the template details.
1112
- *
1113
- * @param {string} params.functionId - Function ID.
1114
- * @param {string} params.repository - Repository name of the template.
1115
- * @param {string} params.owner - The name of the owner of the template.
1116
- * @param {string} params.rootDirectory - Path to function code in the template repo.
1117
- * @param {TemplateReferenceType} params.type - Type for the reference provided. Can be commit, branch, or tag
1118
- * @param {string} params.reference - Reference value, can be a commit hash, branch name, or release tag
1119
- * @param {boolean} params.activate - Automatically activate the deployment when it is finished building.
1120
- * @throws {AppwriteException}
1121
- * @returns {Promise<Models.Deployment>}
1122
- */
1123
- createTemplateDeployment(params: { functionId: string, repository: string, owner: string, rootDirectory: string, type: TemplateReferenceType, reference: string, activate?: boolean }): Promise<Models.Deployment>;
1124
- /**
1125
- * Create a deployment based on a template.
1126
- *
1127
- * Use this endpoint with combination of [listTemplates](https://appwrite.io/docs/products/functions/templates) to find the template details.
1128
- *
1129
- * @param {string} functionId - Function ID.
1130
- * @param {string} repository - Repository name of the template.
1131
- * @param {string} owner - The name of the owner of the template.
1132
- * @param {string} rootDirectory - Path to function code in the template repo.
1133
- * @param {TemplateReferenceType} type - Type for the reference provided. Can be commit, branch, or tag
1134
- * @param {string} reference - Reference value, can be a commit hash, branch name, or release tag
1135
- * @param {boolean} activate - Automatically activate the deployment when it is finished building.
1136
- * @throws {AppwriteException}
1137
- * @returns {Promise<Models.Deployment>}
1138
- * @deprecated Use the object parameter style method for a better developer experience.
1139
- */
1140
- createTemplateDeployment(functionId: string, repository: string, owner: string, rootDirectory: string, type: TemplateReferenceType, reference: string, activate?: boolean): Promise<Models.Deployment>;
1141
- createTemplateDeployment(
1142
- paramsOrFirst: { functionId: string, repository: string, owner: string, rootDirectory: string, type: TemplateReferenceType, reference: string, activate?: boolean } | string,
1143
- ...rest: [(string)?, (string)?, (string)?, (TemplateReferenceType)?, (string)?, (boolean)?]
1144
- ): Promise<Models.Deployment> {
1145
- let params: { functionId: string, repository: string, owner: string, rootDirectory: string, type: TemplateReferenceType, reference: string, activate?: boolean };
1146
-
1147
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1148
- params = (paramsOrFirst || {}) as { functionId: string, repository: string, owner: string, rootDirectory: string, type: TemplateReferenceType, reference: string, activate?: boolean };
1149
- } else {
1150
- params = {
1151
- functionId: paramsOrFirst as string,
1152
- repository: rest[0] as string,
1153
- owner: rest[1] as string,
1154
- rootDirectory: rest[2] as string,
1155
- type: rest[3] as TemplateReferenceType,
1156
- reference: rest[4] as string,
1157
- activate: rest[5] as boolean
1158
- };
1159
- }
1160
-
1161
- const functionId = params.functionId;
1162
- const repository = params.repository;
1163
- const owner = params.owner;
1164
- const rootDirectory = params.rootDirectory;
1165
- const type = params.type;
1166
- const reference = params.reference;
1167
- const activate = params.activate;
1168
-
1169
- if (typeof functionId === 'undefined') {
1170
- throw new AppwriteException('Missing required parameter: "functionId"');
1171
- }
1172
- if (typeof repository === 'undefined') {
1173
- throw new AppwriteException('Missing required parameter: "repository"');
1174
- }
1175
- if (typeof owner === 'undefined') {
1176
- throw new AppwriteException('Missing required parameter: "owner"');
1177
- }
1178
- if (typeof rootDirectory === 'undefined') {
1179
- throw new AppwriteException('Missing required parameter: "rootDirectory"');
1180
- }
1181
- if (typeof type === 'undefined') {
1182
- throw new AppwriteException('Missing required parameter: "type"');
1183
- }
1184
- if (typeof reference === 'undefined') {
1185
- throw new AppwriteException('Missing required parameter: "reference"');
1186
- }
1187
-
1188
- const apiPath = '/functions/{functionId}/deployments/template'.replace('{functionId}', functionId);
1189
- const payload: Payload = {};
1190
- if (typeof repository !== 'undefined') {
1191
- payload['repository'] = repository;
1192
- }
1193
- if (typeof owner !== 'undefined') {
1194
- payload['owner'] = owner;
1195
- }
1196
- if (typeof rootDirectory !== 'undefined') {
1197
- payload['rootDirectory'] = rootDirectory;
1198
- }
1199
- if (typeof type !== 'undefined') {
1200
- payload['type'] = type;
1201
- }
1202
- if (typeof reference !== 'undefined') {
1203
- payload['reference'] = reference;
1204
- }
1205
- if (typeof activate !== 'undefined') {
1206
- payload['activate'] = activate;
1207
- }
1208
- const uri = new URL(this.client.config.endpoint + apiPath);
1209
-
1210
- const apiHeaders: { [header: string]: string } = {
1211
- 'content-type': 'application/json',
1212
- }
1213
-
1214
- return this.client.call(
1215
- 'post',
1216
- uri,
1217
- apiHeaders,
1218
- payload
1219
- );
1220
- }
1221
-
1222
- /**
1223
- * Create a deployment when a function is connected to VCS.
1224
- *
1225
- * This endpoint lets you create deployment from a branch, commit, or a tag.
1226
- *
1227
- * @param {string} params.functionId - Function ID.
1228
- * @param {VCSReferenceType} params.type - Type of reference passed. Allowed values are: branch, commit
1229
- * @param {string} params.reference - VCS reference to create deployment from. Depending on type this can be: branch name, commit hash
1230
- * @param {boolean} params.activate - Automatically activate the deployment when it is finished building.
1231
- * @throws {AppwriteException}
1232
- * @returns {Promise<Models.Deployment>}
1233
- */
1234
- createVcsDeployment(params: { functionId: string, type: VCSReferenceType, reference: string, activate?: boolean }): Promise<Models.Deployment>;
1235
- /**
1236
- * Create a deployment when a function is connected to VCS.
1237
- *
1238
- * This endpoint lets you create deployment from a branch, commit, or a tag.
1239
- *
1240
- * @param {string} functionId - Function ID.
1241
- * @param {VCSReferenceType} type - Type of reference passed. Allowed values are: branch, commit
1242
- * @param {string} reference - VCS reference to create deployment from. Depending on type this can be: branch name, commit hash
1243
- * @param {boolean} activate - Automatically activate the deployment when it is finished building.
1244
- * @throws {AppwriteException}
1245
- * @returns {Promise<Models.Deployment>}
1246
- * @deprecated Use the object parameter style method for a better developer experience.
1247
- */
1248
- createVcsDeployment(functionId: string, type: VCSReferenceType, reference: string, activate?: boolean): Promise<Models.Deployment>;
1249
- createVcsDeployment(
1250
- paramsOrFirst: { functionId: string, type: VCSReferenceType, reference: string, activate?: boolean } | string,
1251
- ...rest: [(VCSReferenceType)?, (string)?, (boolean)?]
1252
- ): Promise<Models.Deployment> {
1253
- let params: { functionId: string, type: VCSReferenceType, reference: string, activate?: boolean };
1254
-
1255
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1256
- params = (paramsOrFirst || {}) as { functionId: string, type: VCSReferenceType, reference: string, activate?: boolean };
1257
- } else {
1258
- params = {
1259
- functionId: paramsOrFirst as string,
1260
- type: rest[0] as VCSReferenceType,
1261
- reference: rest[1] as string,
1262
- activate: rest[2] as boolean
1263
- };
1264
- }
1265
-
1266
- const functionId = params.functionId;
1267
- const type = params.type;
1268
- const reference = params.reference;
1269
- const activate = params.activate;
1270
-
1271
- if (typeof functionId === 'undefined') {
1272
- throw new AppwriteException('Missing required parameter: "functionId"');
1273
- }
1274
- if (typeof type === 'undefined') {
1275
- throw new AppwriteException('Missing required parameter: "type"');
1276
- }
1277
- if (typeof reference === 'undefined') {
1278
- throw new AppwriteException('Missing required parameter: "reference"');
1279
- }
1280
-
1281
- const apiPath = '/functions/{functionId}/deployments/vcs'.replace('{functionId}', functionId);
1282
- const payload: Payload = {};
1283
- if (typeof type !== 'undefined') {
1284
- payload['type'] = type;
1285
- }
1286
- if (typeof reference !== 'undefined') {
1287
- payload['reference'] = reference;
1288
- }
1289
- if (typeof activate !== 'undefined') {
1290
- payload['activate'] = activate;
1291
- }
1292
- const uri = new URL(this.client.config.endpoint + apiPath);
1293
-
1294
- const apiHeaders: { [header: string]: string } = {
1295
- 'content-type': 'application/json',
1296
- }
1297
-
1298
- return this.client.call(
1299
- 'post',
1300
- uri,
1301
- apiHeaders,
1302
- payload
1303
- );
1304
- }
1305
-
1306
- /**
1307
- * Get a function deployment by its unique ID.
1308
- *
1309
- * @param {string} params.functionId - Function ID.
1310
- * @param {string} params.deploymentId - Deployment ID.
1311
- * @throws {AppwriteException}
1312
- * @returns {Promise<Models.Deployment>}
1313
- */
1314
- getDeployment(params: { functionId: string, deploymentId: string }): Promise<Models.Deployment>;
1315
- /**
1316
- * Get a function deployment by its unique ID.
1317
- *
1318
- * @param {string} functionId - Function ID.
1319
- * @param {string} deploymentId - Deployment ID.
1320
- * @throws {AppwriteException}
1321
- * @returns {Promise<Models.Deployment>}
1322
- * @deprecated Use the object parameter style method for a better developer experience.
1323
- */
1324
- getDeployment(functionId: string, deploymentId: string): Promise<Models.Deployment>;
1325
- getDeployment(
1326
- paramsOrFirst: { functionId: string, deploymentId: string } | string,
1327
- ...rest: [(string)?]
1328
- ): Promise<Models.Deployment> {
1329
- let params: { functionId: string, deploymentId: string };
1330
-
1331
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1332
- params = (paramsOrFirst || {}) as { functionId: string, deploymentId: string };
1333
- } else {
1334
- params = {
1335
- functionId: paramsOrFirst as string,
1336
- deploymentId: rest[0] as string
1337
- };
1338
- }
1339
-
1340
- const functionId = params.functionId;
1341
- const deploymentId = params.deploymentId;
1342
-
1343
- if (typeof functionId === 'undefined') {
1344
- throw new AppwriteException('Missing required parameter: "functionId"');
1345
- }
1346
- if (typeof deploymentId === 'undefined') {
1347
- throw new AppwriteException('Missing required parameter: "deploymentId"');
1348
- }
1349
-
1350
- const apiPath = '/functions/{functionId}/deployments/{deploymentId}'.replace('{functionId}', functionId).replace('{deploymentId}', deploymentId);
1351
- const payload: Payload = {};
1352
- const uri = new URL(this.client.config.endpoint + apiPath);
1353
-
1354
- const apiHeaders: { [header: string]: string } = {
1355
- }
1356
-
1357
- return this.client.call(
1358
- 'get',
1359
- uri,
1360
- apiHeaders,
1361
- payload
1362
- );
1363
- }
1364
-
1365
- /**
1366
- * Delete a code deployment by its unique ID.
1367
- *
1368
- * @param {string} params.functionId - Function ID.
1369
- * @param {string} params.deploymentId - Deployment ID.
1370
- * @throws {AppwriteException}
1371
- * @returns {Promise<{}>}
1372
- */
1373
- deleteDeployment(params: { functionId: string, deploymentId: string }): Promise<{}>;
1374
- /**
1375
- * Delete a code deployment by its unique ID.
1376
- *
1377
- * @param {string} functionId - Function ID.
1378
- * @param {string} deploymentId - Deployment ID.
1379
- * @throws {AppwriteException}
1380
- * @returns {Promise<{}>}
1381
- * @deprecated Use the object parameter style method for a better developer experience.
1382
- */
1383
- deleteDeployment(functionId: string, deploymentId: string): Promise<{}>;
1384
- deleteDeployment(
1385
- paramsOrFirst: { functionId: string, deploymentId: string } | string,
1386
- ...rest: [(string)?]
1387
- ): Promise<{}> {
1388
- let params: { functionId: string, deploymentId: string };
1389
-
1390
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1391
- params = (paramsOrFirst || {}) as { functionId: string, deploymentId: string };
1392
- } else {
1393
- params = {
1394
- functionId: paramsOrFirst as string,
1395
- deploymentId: rest[0] as string
1396
- };
1397
- }
1398
-
1399
- const functionId = params.functionId;
1400
- const deploymentId = params.deploymentId;
1401
-
1402
- if (typeof functionId === 'undefined') {
1403
- throw new AppwriteException('Missing required parameter: "functionId"');
1404
- }
1405
- if (typeof deploymentId === 'undefined') {
1406
- throw new AppwriteException('Missing required parameter: "deploymentId"');
1407
- }
1408
-
1409
- const apiPath = '/functions/{functionId}/deployments/{deploymentId}'.replace('{functionId}', functionId).replace('{deploymentId}', deploymentId);
1410
- const payload: Payload = {};
1411
- const uri = new URL(this.client.config.endpoint + apiPath);
1412
-
1413
- const apiHeaders: { [header: string]: string } = {
1414
- 'content-type': 'application/json',
1415
- }
1416
-
1417
- return this.client.call(
1418
- 'delete',
1419
- uri,
1420
- apiHeaders,
1421
- payload
1422
- );
1423
- }
1424
-
1425
- /**
1426
- * 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.
1427
- *
1428
- * @param {string} params.functionId - Function ID.
1429
- * @param {string} params.deploymentId - Deployment ID.
1430
- * @param {DeploymentDownloadType} params.type - Deployment file to download. Can be: "source", "output".
1431
- * @throws {AppwriteException}
1432
- * @returns {string}
1433
- */
1434
- getDeploymentDownload(params: { functionId: string, deploymentId: string, type?: DeploymentDownloadType }): string;
1435
- /**
1436
- * 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.
1437
- *
1438
- * @param {string} functionId - Function ID.
1439
- * @param {string} deploymentId - Deployment ID.
1440
- * @param {DeploymentDownloadType} type - Deployment file to download. Can be: "source", "output".
1441
- * @throws {AppwriteException}
1442
- * @returns {string}
1443
- * @deprecated Use the object parameter style method for a better developer experience.
1444
- */
1445
- getDeploymentDownload(functionId: string, deploymentId: string, type?: DeploymentDownloadType): string;
1446
- getDeploymentDownload(
1447
- paramsOrFirst: { functionId: string, deploymentId: string, type?: DeploymentDownloadType } | string,
1448
- ...rest: [(string)?, (DeploymentDownloadType)?]
1449
- ): string {
1450
- let params: { functionId: string, deploymentId: string, type?: DeploymentDownloadType };
1451
-
1452
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1453
- params = (paramsOrFirst || {}) as { functionId: string, deploymentId: string, type?: DeploymentDownloadType };
1454
- } else {
1455
- params = {
1456
- functionId: paramsOrFirst as string,
1457
- deploymentId: rest[0] as string,
1458
- type: rest[1] as DeploymentDownloadType
1459
- };
1460
- }
1461
-
1462
- const functionId = params.functionId;
1463
- const deploymentId = params.deploymentId;
1464
- const type = params.type;
1465
-
1466
- if (typeof functionId === 'undefined') {
1467
- throw new AppwriteException('Missing required parameter: "functionId"');
1468
- }
1469
- if (typeof deploymentId === 'undefined') {
1470
- throw new AppwriteException('Missing required parameter: "deploymentId"');
1471
- }
1472
-
1473
- const apiPath = '/functions/{functionId}/deployments/{deploymentId}/download'.replace('{functionId}', functionId).replace('{deploymentId}', deploymentId);
1474
- const payload: Payload = {};
1475
- if (typeof type !== 'undefined') {
1476
- payload['type'] = type;
1477
- }
1478
- const uri = new URL(this.client.config.endpoint + apiPath);
1479
-
1480
- const apiHeaders: { [header: string]: string } = {
1481
- }
1482
-
1483
- payload['project'] = this.client.config.project;
1484
-
1485
- for (const [key, value] of Object.entries(Service.flatten(payload))) {
1486
- uri.searchParams.append(key, value);
1487
- }
1488
-
1489
- return uri.toString();
1490
- }
1491
-
1492
- /**
1493
- * 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.
1494
- *
1495
- * @param {string} params.functionId - Function ID.
1496
- * @param {string} params.deploymentId - Deployment ID.
1497
- * @throws {AppwriteException}
1498
- * @returns {Promise<Models.Deployment>}
1499
- */
1500
- updateDeploymentStatus(params: { functionId: string, deploymentId: string }): Promise<Models.Deployment>;
1501
- /**
1502
- * 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.
1503
- *
1504
- * @param {string} functionId - Function ID.
1505
- * @param {string} deploymentId - Deployment ID.
1506
- * @throws {AppwriteException}
1507
- * @returns {Promise<Models.Deployment>}
1508
- * @deprecated Use the object parameter style method for a better developer experience.
1509
- */
1510
- updateDeploymentStatus(functionId: string, deploymentId: string): Promise<Models.Deployment>;
1511
- updateDeploymentStatus(
1512
- paramsOrFirst: { functionId: string, deploymentId: string } | string,
1513
- ...rest: [(string)?]
1514
- ): Promise<Models.Deployment> {
1515
- let params: { functionId: string, deploymentId: string };
1516
-
1517
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1518
- params = (paramsOrFirst || {}) as { functionId: string, deploymentId: string };
1519
- } else {
1520
- params = {
1521
- functionId: paramsOrFirst as string,
1522
- deploymentId: rest[0] as string
1523
- };
1524
- }
1525
-
1526
- const functionId = params.functionId;
1527
- const deploymentId = params.deploymentId;
1528
-
1529
- if (typeof functionId === 'undefined') {
1530
- throw new AppwriteException('Missing required parameter: "functionId"');
1531
- }
1532
- if (typeof deploymentId === 'undefined') {
1533
- throw new AppwriteException('Missing required parameter: "deploymentId"');
1534
- }
1535
-
1536
- const apiPath = '/functions/{functionId}/deployments/{deploymentId}/status'.replace('{functionId}', functionId).replace('{deploymentId}', deploymentId);
1537
- const payload: Payload = {};
1538
- const uri = new URL(this.client.config.endpoint + apiPath);
1539
-
1540
- const apiHeaders: { [header: string]: string } = {
1541
- 'content-type': 'application/json',
1542
- }
1543
-
1544
- return this.client.call(
1545
- 'patch',
1546
- uri,
1547
- apiHeaders,
1548
- payload
1549
- );
1550
- }
1551
-
1552
- /**
1553
- * Get a list of all the current user function execution logs. You can use the query params to filter your results.
1554
- *
1555
- * @param {string} params.functionId - Function ID.
1556
- * @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
1557
- * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
1558
- * @throws {AppwriteException}
1559
- * @returns {Promise<Models.ExecutionList>}
1560
- */
1561
- listExecutions(params: { functionId: string, queries?: string[], total?: boolean }): Promise<Models.ExecutionList>;
1562
- /**
1563
- * Get a list of all the current user function execution logs. You can use the query params to filter your results.
1564
- *
1565
- * @param {string} functionId - Function ID.
1566
- * @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
1567
- * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
1568
- * @throws {AppwriteException}
1569
- * @returns {Promise<Models.ExecutionList>}
1570
- * @deprecated Use the object parameter style method for a better developer experience.
1571
- */
1572
- listExecutions(functionId: string, queries?: string[], total?: boolean): Promise<Models.ExecutionList>;
1573
- listExecutions(
1574
- paramsOrFirst: { functionId: string, queries?: string[], total?: boolean } | string,
1575
- ...rest: [(string[])?, (boolean)?]
1576
- ): Promise<Models.ExecutionList> {
1577
- let params: { functionId: string, queries?: string[], total?: boolean };
1578
-
1579
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1580
- params = (paramsOrFirst || {}) as { functionId: string, queries?: string[], total?: boolean };
1581
- } else {
1582
- params = {
1583
- functionId: paramsOrFirst as string,
1584
- queries: rest[0] as string[],
1585
- total: rest[1] as boolean
1586
- };
1587
- }
1588
-
1589
- const functionId = params.functionId;
1590
- const queries = params.queries;
1591
- const total = params.total;
1592
-
1593
- if (typeof functionId === 'undefined') {
1594
- throw new AppwriteException('Missing required parameter: "functionId"');
1595
- }
1596
-
1597
- const apiPath = '/functions/{functionId}/executions'.replace('{functionId}', functionId);
1598
- const payload: Payload = {};
1599
- if (typeof queries !== 'undefined') {
1600
- payload['queries'] = queries;
1601
- }
1602
- if (typeof total !== 'undefined') {
1603
- payload['total'] = total;
1604
- }
1605
- const uri = new URL(this.client.config.endpoint + apiPath);
1606
-
1607
- const apiHeaders: { [header: string]: string } = {
1608
- }
1609
-
1610
- return this.client.call(
1611
- 'get',
1612
- uri,
1613
- apiHeaders,
1614
- payload
1615
- );
1616
- }
1617
-
1618
- /**
1619
- * 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.
1620
- *
1621
- * @param {string} params.functionId - Function ID.
1622
- * @param {string} params.body - HTTP body of execution. Default value is empty string.
1623
- * @param {boolean} params.async - Execute code in the background. Default value is false.
1624
- * @param {string} params.xpath - HTTP path of execution. Path can include query params. Default value is /
1625
- * @param {ExecutionMethod} params.method - HTTP method of execution. Default value is POST.
1626
- * @param {object} params.headers - HTTP headers of execution. Defaults to empty.
1627
- * @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.
1628
- * @throws {AppwriteException}
1629
- * @returns {Promise<Models.Execution>}
1630
- */
1631
- createExecution(params: { functionId: string, body?: string, async?: boolean, xpath?: string, method?: ExecutionMethod, headers?: object, scheduledAt?: string }): Promise<Models.Execution>;
1632
- /**
1633
- * 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.
1634
- *
1635
- * @param {string} functionId - Function ID.
1636
- * @param {string} body - HTTP body of execution. Default value is empty string.
1637
- * @param {boolean} async - Execute code in the background. Default value is false.
1638
- * @param {string} xpath - HTTP path of execution. Path can include query params. Default value is /
1639
- * @param {ExecutionMethod} method - HTTP method of execution. Default value is POST.
1640
- * @param {object} headers - HTTP headers of execution. Defaults to empty.
1641
- * @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.
1642
- * @throws {AppwriteException}
1643
- * @returns {Promise<Models.Execution>}
1644
- * @deprecated Use the object parameter style method for a better developer experience.
1645
- */
1646
- createExecution(functionId: string, body?: string, async?: boolean, xpath?: string, method?: ExecutionMethod, headers?: object, scheduledAt?: string): Promise<Models.Execution>;
1647
- createExecution(
1648
- paramsOrFirst: { functionId: string, body?: string, async?: boolean, xpath?: string, method?: ExecutionMethod, headers?: object, scheduledAt?: string } | string,
1649
- ...rest: [(string)?, (boolean)?, (string)?, (ExecutionMethod)?, (object)?, (string)?]
1650
- ): Promise<Models.Execution> {
1651
- let params: { functionId: string, body?: string, async?: boolean, xpath?: string, method?: ExecutionMethod, headers?: object, scheduledAt?: string };
1652
-
1653
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1654
- params = (paramsOrFirst || {}) as { functionId: string, body?: string, async?: boolean, xpath?: string, method?: ExecutionMethod, headers?: object, scheduledAt?: string };
1655
- } else {
1656
- params = {
1657
- functionId: paramsOrFirst as string,
1658
- body: rest[0] as string,
1659
- async: rest[1] as boolean,
1660
- xpath: rest[2] as string,
1661
- method: rest[3] as ExecutionMethod,
1662
- headers: rest[4] as object,
1663
- scheduledAt: rest[5] as string
1664
- };
1665
- }
1666
-
1667
- const functionId = params.functionId;
1668
- const body = params.body;
1669
- const async = params.async;
1670
- const xpath = params.xpath;
1671
- const method = params.method;
1672
- const headers = params.headers;
1673
- const scheduledAt = params.scheduledAt;
1674
-
1675
- if (typeof functionId === 'undefined') {
1676
- throw new AppwriteException('Missing required parameter: "functionId"');
1677
- }
1678
-
1679
- const apiPath = '/functions/{functionId}/executions'.replace('{functionId}', functionId);
1680
- const payload: Payload = {};
1681
- if (typeof body !== 'undefined') {
1682
- payload['body'] = body;
1683
- }
1684
- if (typeof async !== 'undefined') {
1685
- payload['async'] = async;
1686
- }
1687
- if (typeof xpath !== 'undefined') {
1688
- payload['path'] = xpath;
1689
- }
1690
- if (typeof method !== 'undefined') {
1691
- payload['method'] = method;
1692
- }
1693
- if (typeof headers !== 'undefined') {
1694
- payload['headers'] = headers;
1695
- }
1696
- if (typeof scheduledAt !== 'undefined') {
1697
- payload['scheduledAt'] = scheduledAt;
1698
- }
1699
- const uri = new URL(this.client.config.endpoint + apiPath);
1700
-
1701
- const apiHeaders: { [header: string]: string } = {
1702
- 'content-type': 'application/json',
1703
- }
1704
-
1705
- return this.client.call(
1706
- 'post',
1707
- uri,
1708
- apiHeaders,
1709
- payload
1710
- );
1711
- }
1712
-
1713
- /**
1714
- * Get a function execution log by its unique ID.
1715
- *
1716
- * @param {string} params.functionId - Function ID.
1717
- * @param {string} params.executionId - Execution ID.
1718
- * @throws {AppwriteException}
1719
- * @returns {Promise<Models.Execution>}
1720
- */
1721
- getExecution(params: { functionId: string, executionId: string }): Promise<Models.Execution>;
1722
- /**
1723
- * Get a function execution log by its unique ID.
1724
- *
1725
- * @param {string} functionId - Function ID.
1726
- * @param {string} executionId - Execution ID.
1727
- * @throws {AppwriteException}
1728
- * @returns {Promise<Models.Execution>}
1729
- * @deprecated Use the object parameter style method for a better developer experience.
1730
- */
1731
- getExecution(functionId: string, executionId: string): Promise<Models.Execution>;
1732
- getExecution(
1733
- paramsOrFirst: { functionId: string, executionId: string } | string,
1734
- ...rest: [(string)?]
1735
- ): Promise<Models.Execution> {
1736
- let params: { functionId: string, executionId: string };
1737
-
1738
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1739
- params = (paramsOrFirst || {}) as { functionId: string, executionId: string };
1740
- } else {
1741
- params = {
1742
- functionId: paramsOrFirst as string,
1743
- executionId: rest[0] as string
1744
- };
1745
- }
1746
-
1747
- const functionId = params.functionId;
1748
- const executionId = params.executionId;
1749
-
1750
- if (typeof functionId === 'undefined') {
1751
- throw new AppwriteException('Missing required parameter: "functionId"');
1752
- }
1753
- if (typeof executionId === 'undefined') {
1754
- throw new AppwriteException('Missing required parameter: "executionId"');
1755
- }
1756
-
1757
- const apiPath = '/functions/{functionId}/executions/{executionId}'.replace('{functionId}', functionId).replace('{executionId}', executionId);
1758
- const payload: Payload = {};
1759
- const uri = new URL(this.client.config.endpoint + apiPath);
1760
-
1761
- const apiHeaders: { [header: string]: string } = {
1762
- }
1763
-
1764
- return this.client.call(
1765
- 'get',
1766
- uri,
1767
- apiHeaders,
1768
- payload
1769
- );
1770
- }
1771
-
1772
- /**
1773
- * Delete a function execution by its unique ID.
1774
- *
1775
- * @param {string} params.functionId - Function ID.
1776
- * @param {string} params.executionId - Execution ID.
1777
- * @throws {AppwriteException}
1778
- * @returns {Promise<{}>}
1779
- */
1780
- deleteExecution(params: { functionId: string, executionId: string }): Promise<{}>;
1781
- /**
1782
- * Delete a function execution by its unique ID.
1783
- *
1784
- * @param {string} functionId - Function ID.
1785
- * @param {string} executionId - Execution ID.
1786
- * @throws {AppwriteException}
1787
- * @returns {Promise<{}>}
1788
- * @deprecated Use the object parameter style method for a better developer experience.
1789
- */
1790
- deleteExecution(functionId: string, executionId: string): Promise<{}>;
1791
- deleteExecution(
1792
- paramsOrFirst: { functionId: string, executionId: string } | string,
1793
- ...rest: [(string)?]
1794
- ): Promise<{}> {
1795
- let params: { functionId: string, executionId: string };
1796
-
1797
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1798
- params = (paramsOrFirst || {}) as { functionId: string, executionId: string };
1799
- } else {
1800
- params = {
1801
- functionId: paramsOrFirst as string,
1802
- executionId: rest[0] as string
1803
- };
1804
- }
1805
-
1806
- const functionId = params.functionId;
1807
- const executionId = params.executionId;
1808
-
1809
- if (typeof functionId === 'undefined') {
1810
- throw new AppwriteException('Missing required parameter: "functionId"');
1811
- }
1812
- if (typeof executionId === 'undefined') {
1813
- throw new AppwriteException('Missing required parameter: "executionId"');
1814
- }
1815
-
1816
- const apiPath = '/functions/{functionId}/executions/{executionId}'.replace('{functionId}', functionId).replace('{executionId}', executionId);
1817
- const payload: Payload = {};
1818
- const uri = new URL(this.client.config.endpoint + apiPath);
1819
-
1820
- const apiHeaders: { [header: string]: string } = {
1821
- 'content-type': 'application/json',
1822
- }
1823
-
1824
- return this.client.call(
1825
- 'delete',
1826
- uri,
1827
- apiHeaders,
1828
- payload
1829
- );
1830
- }
1831
-
1832
- /**
1833
- * 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.
1834
- *
1835
- * @param {string} params.functionId - Function ID.
1836
- * @param {UsageRange} params.range - Date range.
1837
- * @throws {AppwriteException}
1838
- * @returns {Promise<Models.UsageFunction>}
1839
- */
1840
- getUsage(params: { functionId: string, range?: UsageRange }): Promise<Models.UsageFunction>;
1841
- /**
1842
- * 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.
1843
- *
1844
- * @param {string} functionId - Function ID.
1845
- * @param {UsageRange} range - Date range.
1846
- * @throws {AppwriteException}
1847
- * @returns {Promise<Models.UsageFunction>}
1848
- * @deprecated Use the object parameter style method for a better developer experience.
1849
- */
1850
- getUsage(functionId: string, range?: UsageRange): Promise<Models.UsageFunction>;
1851
- getUsage(
1852
- paramsOrFirst: { functionId: string, range?: UsageRange } | string,
1853
- ...rest: [(UsageRange)?]
1854
- ): Promise<Models.UsageFunction> {
1855
- let params: { functionId: string, range?: UsageRange };
1856
-
1857
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1858
- params = (paramsOrFirst || {}) as { functionId: string, range?: UsageRange };
1859
- } else {
1860
- params = {
1861
- functionId: paramsOrFirst as string,
1862
- range: rest[0] as UsageRange
1863
- };
1864
- }
1865
-
1866
- const functionId = params.functionId;
1867
- const range = params.range;
1868
-
1869
- if (typeof functionId === 'undefined') {
1870
- throw new AppwriteException('Missing required parameter: "functionId"');
1871
- }
1872
-
1873
- const apiPath = '/functions/{functionId}/usage'.replace('{functionId}', functionId);
1874
- const payload: Payload = {};
1875
- if (typeof range !== 'undefined') {
1876
- payload['range'] = range;
1877
- }
1878
- const uri = new URL(this.client.config.endpoint + apiPath);
1879
-
1880
- const apiHeaders: { [header: string]: string } = {
1881
- }
1882
-
1883
- return this.client.call(
1884
- 'get',
1885
- uri,
1886
- apiHeaders,
1887
- payload
1888
- );
1889
- }
1890
-
1891
- /**
1892
- * Get a list of all variables of a specific function.
1893
- *
1894
- * @param {string} params.functionId - Function unique ID.
1895
- * @throws {AppwriteException}
1896
- * @returns {Promise<Models.VariableList>}
1897
- */
1898
- listVariables(params: { functionId: string }): Promise<Models.VariableList>;
1899
- /**
1900
- * Get a list of all variables of a specific function.
1901
- *
1902
- * @param {string} functionId - Function unique ID.
1903
- * @throws {AppwriteException}
1904
- * @returns {Promise<Models.VariableList>}
1905
- * @deprecated Use the object parameter style method for a better developer experience.
1906
- */
1907
- listVariables(functionId: string): Promise<Models.VariableList>;
1908
- listVariables(
1909
- paramsOrFirst: { functionId: string } | string
1910
- ): Promise<Models.VariableList> {
1911
- let params: { functionId: string };
1912
-
1913
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1914
- params = (paramsOrFirst || {}) as { functionId: string };
1915
- } else {
1916
- params = {
1917
- functionId: paramsOrFirst as string
1918
- };
1919
- }
1920
-
1921
- const functionId = params.functionId;
1922
-
1923
- if (typeof functionId === 'undefined') {
1924
- throw new AppwriteException('Missing required parameter: "functionId"');
1925
- }
1926
-
1927
- const apiPath = '/functions/{functionId}/variables'.replace('{functionId}', functionId);
1928
- const payload: Payload = {};
1929
- const uri = new URL(this.client.config.endpoint + apiPath);
1930
-
1931
- const apiHeaders: { [header: string]: string } = {
1932
- }
1933
-
1934
- return this.client.call(
1935
- 'get',
1936
- uri,
1937
- apiHeaders,
1938
- payload
1939
- );
1940
- }
1941
-
1942
- /**
1943
- * Create a new function environment variable. These variables can be accessed in the function at runtime as environment variables.
1944
- *
1945
- * @param {string} params.functionId - Function unique ID.
1946
- * @param {string} params.key - Variable key. Max length: 255 chars.
1947
- * @param {string} params.value - Variable value. Max length: 8192 chars.
1948
- * @param {boolean} params.secret - Secret variables can be updated or deleted, but only functions can read them during build and runtime.
1949
- * @throws {AppwriteException}
1950
- * @returns {Promise<Models.Variable>}
1951
- */
1952
- createVariable(params: { functionId: string, key: string, value: string, secret?: boolean }): Promise<Models.Variable>;
1953
- /**
1954
- * Create a new function environment variable. These variables can be accessed in the function at runtime as environment variables.
1955
- *
1956
- * @param {string} functionId - Function unique ID.
1957
- * @param {string} key - Variable key. Max length: 255 chars.
1958
- * @param {string} value - Variable value. Max length: 8192 chars.
1959
- * @param {boolean} secret - Secret variables can be updated or deleted, but only functions can read them during build and runtime.
1960
- * @throws {AppwriteException}
1961
- * @returns {Promise<Models.Variable>}
1962
- * @deprecated Use the object parameter style method for a better developer experience.
1963
- */
1964
- createVariable(functionId: string, key: string, value: string, secret?: boolean): Promise<Models.Variable>;
1965
- createVariable(
1966
- paramsOrFirst: { functionId: string, key: string, value: string, secret?: boolean } | string,
1967
- ...rest: [(string)?, (string)?, (boolean)?]
1968
- ): Promise<Models.Variable> {
1969
- let params: { functionId: string, key: string, value: string, secret?: boolean };
1970
-
1971
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1972
- params = (paramsOrFirst || {}) as { functionId: string, key: string, value: string, secret?: boolean };
1973
- } else {
1974
- params = {
1975
- functionId: paramsOrFirst as string,
1976
- key: rest[0] as string,
1977
- value: rest[1] as string,
1978
- secret: rest[2] as boolean
1979
- };
1980
- }
1981
-
1982
- const functionId = params.functionId;
1983
- const key = params.key;
1984
- const value = params.value;
1985
- const secret = params.secret;
1986
-
1987
- if (typeof functionId === 'undefined') {
1988
- throw new AppwriteException('Missing required parameter: "functionId"');
1989
- }
1990
- if (typeof key === 'undefined') {
1991
- throw new AppwriteException('Missing required parameter: "key"');
1992
- }
1993
- if (typeof value === 'undefined') {
1994
- throw new AppwriteException('Missing required parameter: "value"');
1995
- }
1996
-
1997
- const apiPath = '/functions/{functionId}/variables'.replace('{functionId}', functionId);
1998
- const payload: Payload = {};
1999
- if (typeof key !== 'undefined') {
2000
- payload['key'] = key;
2001
- }
2002
- if (typeof value !== 'undefined') {
2003
- payload['value'] = value;
2004
- }
2005
- if (typeof secret !== 'undefined') {
2006
- payload['secret'] = secret;
2007
- }
2008
- const uri = new URL(this.client.config.endpoint + apiPath);
2009
-
2010
- const apiHeaders: { [header: string]: string } = {
2011
- 'content-type': 'application/json',
2012
- }
2013
-
2014
- return this.client.call(
2015
- 'post',
2016
- uri,
2017
- apiHeaders,
2018
- payload
2019
- );
2020
- }
2021
-
2022
- /**
2023
- * Get a variable by its unique ID.
2024
- *
2025
- * @param {string} params.functionId - Function unique ID.
2026
- * @param {string} params.variableId - Variable unique ID.
2027
- * @throws {AppwriteException}
2028
- * @returns {Promise<Models.Variable>}
2029
- */
2030
- getVariable(params: { functionId: string, variableId: string }): Promise<Models.Variable>;
2031
- /**
2032
- * Get a variable by its unique ID.
2033
- *
2034
- * @param {string} functionId - Function unique ID.
2035
- * @param {string} variableId - Variable unique ID.
2036
- * @throws {AppwriteException}
2037
- * @returns {Promise<Models.Variable>}
2038
- * @deprecated Use the object parameter style method for a better developer experience.
2039
- */
2040
- getVariable(functionId: string, variableId: string): Promise<Models.Variable>;
2041
- getVariable(
2042
- paramsOrFirst: { functionId: string, variableId: string } | string,
2043
- ...rest: [(string)?]
2044
- ): Promise<Models.Variable> {
2045
- let params: { functionId: string, variableId: string };
2046
-
2047
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
2048
- params = (paramsOrFirst || {}) as { functionId: string, variableId: string };
2049
- } else {
2050
- params = {
2051
- functionId: paramsOrFirst as string,
2052
- variableId: rest[0] as string
2053
- };
2054
- }
2055
-
2056
- const functionId = params.functionId;
2057
- const variableId = params.variableId;
2058
-
2059
- if (typeof functionId === 'undefined') {
2060
- throw new AppwriteException('Missing required parameter: "functionId"');
2061
- }
2062
- if (typeof variableId === 'undefined') {
2063
- throw new AppwriteException('Missing required parameter: "variableId"');
2064
- }
2065
-
2066
- const apiPath = '/functions/{functionId}/variables/{variableId}'.replace('{functionId}', functionId).replace('{variableId}', variableId);
2067
- const payload: Payload = {};
2068
- const uri = new URL(this.client.config.endpoint + apiPath);
2069
-
2070
- const apiHeaders: { [header: string]: string } = {
2071
- }
2072
-
2073
- return this.client.call(
2074
- 'get',
2075
- uri,
2076
- apiHeaders,
2077
- payload
2078
- );
2079
- }
2080
-
2081
- /**
2082
- * Update variable by its unique ID.
2083
- *
2084
- * @param {string} params.functionId - Function unique ID.
2085
- * @param {string} params.variableId - Variable unique ID.
2086
- * @param {string} params.key - Variable key. Max length: 255 chars.
2087
- * @param {string} params.value - Variable value. Max length: 8192 chars.
2088
- * @param {boolean} params.secret - Secret variables can be updated or deleted, but only functions can read them during build and runtime.
2089
- * @throws {AppwriteException}
2090
- * @returns {Promise<Models.Variable>}
2091
- */
2092
- updateVariable(params: { functionId: string, variableId: string, key: string, value?: string, secret?: boolean }): Promise<Models.Variable>;
2093
- /**
2094
- * Update variable by its unique ID.
2095
- *
2096
- * @param {string} functionId - Function unique ID.
2097
- * @param {string} variableId - Variable unique ID.
2098
- * @param {string} key - Variable key. Max length: 255 chars.
2099
- * @param {string} value - Variable value. Max length: 8192 chars.
2100
- * @param {boolean} secret - Secret variables can be updated or deleted, but only functions can read them during build and runtime.
2101
- * @throws {AppwriteException}
2102
- * @returns {Promise<Models.Variable>}
2103
- * @deprecated Use the object parameter style method for a better developer experience.
2104
- */
2105
- updateVariable(functionId: string, variableId: string, key: string, value?: string, secret?: boolean): Promise<Models.Variable>;
2106
- updateVariable(
2107
- paramsOrFirst: { functionId: string, variableId: string, key: string, value?: string, secret?: boolean } | string,
2108
- ...rest: [(string)?, (string)?, (string)?, (boolean)?]
2109
- ): Promise<Models.Variable> {
2110
- let params: { functionId: string, variableId: string, key: string, value?: string, secret?: boolean };
2111
-
2112
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
2113
- params = (paramsOrFirst || {}) as { functionId: string, variableId: string, key: string, value?: string, secret?: boolean };
2114
- } else {
2115
- params = {
2116
- functionId: paramsOrFirst as string,
2117
- variableId: rest[0] as string,
2118
- key: rest[1] as string,
2119
- value: rest[2] as string,
2120
- secret: rest[3] as boolean
2121
- };
2122
- }
2123
-
2124
- const functionId = params.functionId;
2125
- const variableId = params.variableId;
2126
- const key = params.key;
2127
- const value = params.value;
2128
- const secret = params.secret;
2129
-
2130
- if (typeof functionId === 'undefined') {
2131
- throw new AppwriteException('Missing required parameter: "functionId"');
2132
- }
2133
- if (typeof variableId === 'undefined') {
2134
- throw new AppwriteException('Missing required parameter: "variableId"');
2135
- }
2136
- if (typeof key === 'undefined') {
2137
- throw new AppwriteException('Missing required parameter: "key"');
2138
- }
2139
-
2140
- const apiPath = '/functions/{functionId}/variables/{variableId}'.replace('{functionId}', functionId).replace('{variableId}', variableId);
2141
- const payload: Payload = {};
2142
- if (typeof key !== 'undefined') {
2143
- payload['key'] = key;
2144
- }
2145
- if (typeof value !== 'undefined') {
2146
- payload['value'] = value;
2147
- }
2148
- if (typeof secret !== 'undefined') {
2149
- payload['secret'] = secret;
2150
- }
2151
- const uri = new URL(this.client.config.endpoint + apiPath);
2152
-
2153
- const apiHeaders: { [header: string]: string } = {
2154
- 'content-type': 'application/json',
2155
- }
2156
-
2157
- return this.client.call(
2158
- 'put',
2159
- uri,
2160
- apiHeaders,
2161
- payload
2162
- );
2163
- }
2164
-
2165
- /**
2166
- * Delete a variable by its unique ID.
2167
- *
2168
- * @param {string} params.functionId - Function unique ID.
2169
- * @param {string} params.variableId - Variable unique ID.
2170
- * @throws {AppwriteException}
2171
- * @returns {Promise<{}>}
2172
- */
2173
- deleteVariable(params: { functionId: string, variableId: string }): Promise<{}>;
2174
- /**
2175
- * Delete a variable by its unique ID.
2176
- *
2177
- * @param {string} functionId - Function unique ID.
2178
- * @param {string} variableId - Variable unique ID.
2179
- * @throws {AppwriteException}
2180
- * @returns {Promise<{}>}
2181
- * @deprecated Use the object parameter style method for a better developer experience.
2182
- */
2183
- deleteVariable(functionId: string, variableId: string): Promise<{}>;
2184
- deleteVariable(
2185
- paramsOrFirst: { functionId: string, variableId: string } | string,
2186
- ...rest: [(string)?]
2187
- ): Promise<{}> {
2188
- let params: { functionId: string, variableId: string };
2189
-
2190
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
2191
- params = (paramsOrFirst || {}) as { functionId: string, variableId: string };
2192
- } else {
2193
- params = {
2194
- functionId: paramsOrFirst as string,
2195
- variableId: rest[0] as string
2196
- };
2197
- }
2198
-
2199
- const functionId = params.functionId;
2200
- const variableId = params.variableId;
2201
-
2202
- if (typeof functionId === 'undefined') {
2203
- throw new AppwriteException('Missing required parameter: "functionId"');
2204
- }
2205
- if (typeof variableId === 'undefined') {
2206
- throw new AppwriteException('Missing required parameter: "variableId"');
2207
- }
2208
-
2209
- const apiPath = '/functions/{functionId}/variables/{variableId}'.replace('{functionId}', functionId).replace('{variableId}', variableId);
2210
- const payload: Payload = {};
2211
- const uri = new URL(this.client.config.endpoint + apiPath);
2212
-
2213
- const apiHeaders: { [header: string]: string } = {
2214
- 'content-type': 'application/json',
2215
- }
2216
-
2217
- return this.client.call(
2218
- 'delete',
2219
- uri,
2220
- apiHeaders,
2221
- payload
2222
- );
2223
- }
2224
- }