node-appwrite 12.0.1 → 13.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (526) hide show
  1. package/README.md +1 -1
  2. package/dist/client.d.mts +131 -0
  3. package/dist/client.d.ts +131 -0
  4. package/dist/client.js +302 -0
  5. package/dist/client.js.map +1 -0
  6. package/dist/client.mjs +296 -0
  7. package/dist/client.mjs.map +1 -0
  8. package/dist/enums/authentication-factor.d.mts +8 -0
  9. package/dist/enums/authentication-factor.d.ts +8 -0
  10. package/dist/enums/authentication-factor.js +13 -0
  11. package/dist/enums/authentication-factor.js.map +1 -0
  12. package/dist/enums/authentication-factor.mjs +12 -0
  13. package/dist/enums/authentication-factor.mjs.map +1 -0
  14. package/dist/enums/authenticator-type.d.mts +5 -0
  15. package/dist/enums/authenticator-type.d.ts +5 -0
  16. package/dist/enums/authenticator-type.js +10 -0
  17. package/dist/enums/authenticator-type.js.map +1 -0
  18. package/dist/enums/authenticator-type.mjs +9 -0
  19. package/dist/enums/authenticator-type.mjs.map +1 -0
  20. package/dist/enums/browser.d.mts +18 -0
  21. package/dist/enums/browser.d.ts +18 -0
  22. package/dist/enums/browser.js +23 -0
  23. package/dist/enums/browser.js.map +1 -0
  24. package/dist/enums/browser.mjs +22 -0
  25. package/dist/enums/browser.mjs.map +1 -0
  26. package/dist/enums/compression.d.mts +7 -0
  27. package/dist/enums/compression.d.ts +7 -0
  28. package/dist/enums/compression.js +12 -0
  29. package/dist/enums/compression.js.map +1 -0
  30. package/dist/enums/compression.mjs +11 -0
  31. package/dist/enums/compression.mjs.map +1 -0
  32. package/dist/enums/credit-card.d.mts +20 -0
  33. package/dist/enums/credit-card.d.ts +20 -0
  34. package/dist/enums/credit-card.js +25 -0
  35. package/dist/enums/credit-card.js.map +1 -0
  36. package/dist/enums/credit-card.mjs +24 -0
  37. package/dist/enums/credit-card.mjs.map +1 -0
  38. package/dist/enums/execution-method.d.mts +10 -0
  39. package/dist/enums/execution-method.d.ts +10 -0
  40. package/dist/enums/execution-method.js +15 -0
  41. package/dist/enums/execution-method.js.map +1 -0
  42. package/dist/enums/execution-method.mjs +14 -0
  43. package/dist/enums/execution-method.mjs.map +1 -0
  44. package/dist/enums/flag.d.mts +199 -0
  45. package/dist/enums/flag.d.ts +199 -0
  46. package/dist/enums/flag.js +204 -0
  47. package/dist/enums/flag.js.map +1 -0
  48. package/dist/enums/flag.mjs +203 -0
  49. package/dist/enums/flag.mjs.map +1 -0
  50. package/dist/enums/image-format.d.mts +9 -0
  51. package/dist/enums/image-format.d.ts +9 -0
  52. package/dist/enums/image-format.js +14 -0
  53. package/dist/enums/image-format.js.map +1 -0
  54. package/dist/enums/image-format.mjs +13 -0
  55. package/dist/enums/image-format.mjs.map +1 -0
  56. package/dist/enums/image-gravity.d.mts +13 -0
  57. package/dist/enums/image-gravity.d.ts +13 -0
  58. package/dist/enums/image-gravity.js +18 -0
  59. package/dist/enums/image-gravity.js.map +1 -0
  60. package/dist/enums/image-gravity.mjs +17 -0
  61. package/dist/enums/image-gravity.mjs.map +1 -0
  62. package/dist/enums/index-type.d.mts +7 -0
  63. package/dist/enums/index-type.d.ts +7 -0
  64. package/dist/enums/index-type.js +12 -0
  65. package/dist/enums/index-type.js.map +1 -0
  66. package/dist/enums/index-type.mjs +11 -0
  67. package/dist/enums/index-type.mjs.map +1 -0
  68. package/dist/enums/messaging-provider-type.d.mts +7 -0
  69. package/dist/enums/messaging-provider-type.d.ts +7 -0
  70. package/dist/enums/messaging-provider-type.js +12 -0
  71. package/dist/enums/messaging-provider-type.js.map +1 -0
  72. package/dist/enums/messaging-provider-type.mjs +11 -0
  73. package/dist/enums/messaging-provider-type.mjs.map +1 -0
  74. package/dist/enums/name.d.mts +16 -0
  75. package/dist/enums/name.d.ts +16 -0
  76. package/dist/enums/name.js +21 -0
  77. package/dist/enums/name.js.map +1 -0
  78. package/dist/enums/name.mjs +20 -0
  79. package/dist/enums/name.mjs.map +1 -0
  80. package/dist/enums/o-auth-provider.d.mts +43 -0
  81. package/dist/enums/o-auth-provider.d.ts +43 -0
  82. package/dist/enums/o-auth-provider.js +48 -0
  83. package/dist/enums/o-auth-provider.js.map +1 -0
  84. package/dist/enums/o-auth-provider.mjs +47 -0
  85. package/dist/enums/o-auth-provider.mjs.map +1 -0
  86. package/dist/enums/password-hash.d.mts +15 -0
  87. package/dist/enums/password-hash.d.ts +15 -0
  88. package/dist/enums/password-hash.js +20 -0
  89. package/dist/enums/password-hash.js.map +1 -0
  90. package/dist/enums/password-hash.mjs +19 -0
  91. package/dist/enums/password-hash.mjs.map +1 -0
  92. package/dist/enums/relation-mutate.d.mts +7 -0
  93. package/dist/enums/relation-mutate.d.ts +7 -0
  94. package/dist/enums/relation-mutate.js +12 -0
  95. package/dist/enums/relation-mutate.js.map +1 -0
  96. package/dist/enums/relation-mutate.mjs +11 -0
  97. package/dist/enums/relation-mutate.mjs.map +1 -0
  98. package/dist/enums/relationship-type.d.mts +8 -0
  99. package/dist/enums/relationship-type.d.ts +8 -0
  100. package/dist/enums/relationship-type.js +13 -0
  101. package/dist/enums/relationship-type.js.map +1 -0
  102. package/dist/enums/relationship-type.mjs +12 -0
  103. package/dist/enums/relationship-type.mjs.map +1 -0
  104. package/dist/enums/runtime.d.mts +49 -0
  105. package/dist/enums/runtime.d.ts +49 -0
  106. package/dist/enums/runtime.js +54 -0
  107. package/dist/enums/runtime.js.map +1 -0
  108. package/dist/enums/runtime.mjs +53 -0
  109. package/dist/enums/runtime.mjs.map +1 -0
  110. package/dist/enums/smtp-encryption.d.mts +7 -0
  111. package/dist/enums/smtp-encryption.d.ts +7 -0
  112. package/dist/enums/smtp-encryption.js +12 -0
  113. package/dist/enums/smtp-encryption.js.map +1 -0
  114. package/dist/enums/smtp-encryption.mjs +11 -0
  115. package/dist/enums/smtp-encryption.mjs.map +1 -0
  116. package/dist/id.d.mts +7 -0
  117. package/dist/id.d.ts +7 -0
  118. package/dist/id.js +29 -0
  119. package/dist/id.js.map +1 -0
  120. package/dist/id.mjs +28 -0
  121. package/dist/id.mjs.map +1 -0
  122. package/dist/index.d.mts +35 -0
  123. package/dist/index.d.ts +35 -0
  124. package/dist/index.js +180 -0
  125. package/dist/index.js.map +1 -0
  126. package/dist/index.mjs +35 -0
  127. package/dist/index.mjs.map +1 -0
  128. package/dist/inputFile.d.mts +9 -0
  129. package/dist/inputFile.d.ts +9 -0
  130. package/dist/inputFile.js +23 -0
  131. package/dist/inputFile.js.map +1 -0
  132. package/dist/inputFile.mjs +22 -0
  133. package/dist/inputFile.mjs.map +1 -0
  134. package/dist/models.d.mts +2414 -0
  135. package/dist/models.d.ts +2414 -0
  136. package/dist/models.js +4 -0
  137. package/dist/models.js.map +1 -0
  138. package/dist/models.mjs +3 -0
  139. package/dist/models.mjs.map +1 -0
  140. package/dist/permission.d.mts +9 -0
  141. package/dist/permission.d.ts +9 -0
  142. package/dist/permission.js +23 -0
  143. package/dist/permission.js.map +1 -0
  144. package/dist/permission.mjs +22 -0
  145. package/dist/permission.mjs.map +1 -0
  146. package/dist/query.d.mts +35 -0
  147. package/dist/query.d.ts +35 -0
  148. package/dist/query.js +49 -0
  149. package/dist/query.js.map +1 -0
  150. package/dist/query.mjs +48 -0
  151. package/dist/query.mjs.map +1 -0
  152. package/{lib/role.js → dist/role.d.mts} +18 -48
  153. package/dist/role.d.ts +72 -0
  154. package/dist/role.js +96 -0
  155. package/dist/role.js.map +1 -0
  156. package/dist/role.mjs +95 -0
  157. package/dist/role.mjs.map +1 -0
  158. package/dist/services/account.d.mts +478 -0
  159. package/dist/services/account.d.ts +478 -0
  160. package/dist/services/account.js +1331 -0
  161. package/dist/services/account.js.map +1 -0
  162. package/dist/services/account.mjs +1330 -0
  163. package/dist/services/account.mjs.map +1 -0
  164. package/dist/services/avatars.d.mts +118 -0
  165. package/dist/services/avatars.d.ts +118 -0
  166. package/dist/services/avatars.js +297 -0
  167. package/dist/services/avatars.js.map +1 -0
  168. package/dist/services/avatars.mjs +296 -0
  169. package/dist/services/avatars.mjs.map +1 -0
  170. package/dist/services/databases.d.mts +606 -0
  171. package/dist/services/databases.d.ts +606 -0
  172. package/dist/services/databases.js +1908 -0
  173. package/dist/services/databases.js.map +1 -0
  174. package/dist/services/databases.mjs +1907 -0
  175. package/dist/services/databases.mjs.map +1 -0
  176. package/dist/services/functions.d.mts +287 -0
  177. package/dist/services/functions.d.ts +287 -0
  178. package/dist/services/functions.js +837 -0
  179. package/dist/services/functions.js.map +1 -0
  180. package/dist/services/functions.mjs +836 -0
  181. package/dist/services/functions.mjs.map +1 -0
  182. package/dist/services/graphql.d.mts +30 -0
  183. package/dist/services/graphql.d.ts +30 -0
  184. package/dist/services/graphql.js +73 -0
  185. package/dist/services/graphql.js.map +1 -0
  186. package/dist/services/graphql.mjs +72 -0
  187. package/dist/services/graphql.mjs.map +1 -0
  188. package/dist/services/health.d.mts +235 -0
  189. package/dist/services/health.d.ts +235 -0
  190. package/dist/services/health.js +584 -0
  191. package/dist/services/health.js.map +1 -0
  192. package/dist/services/health.mjs +583 -0
  193. package/dist/services/health.mjs.map +1 -0
  194. package/dist/services/locale.d.mts +84 -0
  195. package/dist/services/locale.d.ts +84 -0
  196. package/dist/services/locale.js +189 -0
  197. package/dist/services/locale.js.map +1 -0
  198. package/dist/services/locale.mjs +188 -0
  199. package/dist/services/locale.mjs.map +1 -0
  200. package/dist/services/messaging.d.mts +689 -0
  201. package/dist/services/messaging.d.ts +689 -0
  202. package/dist/services/messaging.js +2156 -0
  203. package/dist/services/messaging.js.map +1 -0
  204. package/dist/services/messaging.mjs +2155 -0
  205. package/dist/services/messaging.mjs.map +1 -0
  206. package/dist/services/storage.d.mts +193 -0
  207. package/dist/services/storage.d.ts +193 -0
  208. package/dist/services/storage.js +550 -0
  209. package/dist/services/storage.js.map +1 -0
  210. package/dist/services/storage.mjs +549 -0
  211. package/dist/services/storage.mjs.map +1 -0
  212. package/dist/services/teams.d.mts +171 -0
  213. package/dist/services/teams.d.ts +171 -0
  214. package/dist/services/teams.js +466 -0
  215. package/dist/services/teams.js.map +1 -0
  216. package/dist/services/teams.mjs +465 -0
  217. package/dist/services/teams.mjs.map +1 -0
  218. package/dist/services/users.d.mts +491 -0
  219. package/dist/services/users.d.ts +491 -0
  220. package/dist/services/users.js +1465 -0
  221. package/dist/services/users.js.map +1 -0
  222. package/dist/services/users.mjs +1464 -0
  223. package/dist/services/users.mjs.map +1 -0
  224. package/package.json +39 -5
  225. package/.github/ISSUE_TEMPLATE/bug.yaml +0 -82
  226. package/.github/ISSUE_TEMPLATE/documentation.yaml +0 -32
  227. package/.github/ISSUE_TEMPLATE/feature.yaml +0 -40
  228. package/.travis.yml +0 -25
  229. package/CHANGELOG.md +0 -1
  230. package/docs/examples/account/create-anonymous-session.md +0 -9
  231. package/docs/examples/account/create-email-password-session.md +0 -12
  232. package/docs/examples/account/create-email-token.md +0 -13
  233. package/docs/examples/account/create-j-w-t.md +0 -9
  234. package/docs/examples/account/create-magic-u-r-l-token.md +0 -14
  235. package/docs/examples/account/create-mfa-authenticator.md +0 -12
  236. package/docs/examples/account/create-mfa-challenge.md +0 -11
  237. package/docs/examples/account/create-mfa-recovery-codes.md +0 -10
  238. package/docs/examples/account/create-o-auth2token.md +0 -14
  239. package/docs/examples/account/create-phone-token.md +0 -12
  240. package/docs/examples/account/create-phone-verification.md +0 -10
  241. package/docs/examples/account/create-recovery.md +0 -13
  242. package/docs/examples/account/create-session.md +0 -12
  243. package/docs/examples/account/create-verification.md +0 -12
  244. package/docs/examples/account/create.md +0 -14
  245. package/docs/examples/account/delete-identity.md +0 -12
  246. package/docs/examples/account/delete-mfa-authenticator.md +0 -13
  247. package/docs/examples/account/delete-session.md +0 -12
  248. package/docs/examples/account/delete-sessions.md +0 -10
  249. package/docs/examples/account/get-mfa-recovery-codes.md +0 -10
  250. package/docs/examples/account/get-prefs.md +0 -10
  251. package/docs/examples/account/get-session.md +0 -12
  252. package/docs/examples/account/get.md +0 -10
  253. package/docs/examples/account/list-identities.md +0 -12
  254. package/docs/examples/account/list-logs.md +0 -12
  255. package/docs/examples/account/list-mfa-factors.md +0 -10
  256. package/docs/examples/account/list-sessions.md +0 -10
  257. package/docs/examples/account/update-email.md +0 -13
  258. package/docs/examples/account/update-m-f-a.md +0 -12
  259. package/docs/examples/account/update-magic-u-r-l-session.md +0 -12
  260. package/docs/examples/account/update-mfa-authenticator.md +0 -13
  261. package/docs/examples/account/update-mfa-challenge.md +0 -13
  262. package/docs/examples/account/update-mfa-recovery-codes.md +0 -10
  263. package/docs/examples/account/update-name.md +0 -12
  264. package/docs/examples/account/update-password.md +0 -13
  265. package/docs/examples/account/update-phone-session.md +0 -12
  266. package/docs/examples/account/update-phone-verification.md +0 -13
  267. package/docs/examples/account/update-phone.md +0 -13
  268. package/docs/examples/account/update-prefs.md +0 -12
  269. package/docs/examples/account/update-recovery.md +0 -14
  270. package/docs/examples/account/update-session.md +0 -12
  271. package/docs/examples/account/update-status.md +0 -10
  272. package/docs/examples/account/update-verification.md +0 -13
  273. package/docs/examples/avatars/get-browser.md +0 -15
  274. package/docs/examples/avatars/get-credit-card.md +0 -15
  275. package/docs/examples/avatars/get-favicon.md +0 -12
  276. package/docs/examples/avatars/get-flag.md +0 -15
  277. package/docs/examples/avatars/get-image.md +0 -14
  278. package/docs/examples/avatars/get-initials.md +0 -15
  279. package/docs/examples/avatars/get-q-r.md +0 -15
  280. package/docs/examples/databases/create-boolean-attribute.md +0 -17
  281. package/docs/examples/databases/create-collection.md +0 -17
  282. package/docs/examples/databases/create-datetime-attribute.md +0 -17
  283. package/docs/examples/databases/create-document.md +0 -16
  284. package/docs/examples/databases/create-email-attribute.md +0 -17
  285. package/docs/examples/databases/create-enum-attribute.md +0 -18
  286. package/docs/examples/databases/create-float-attribute.md +0 -19
  287. package/docs/examples/databases/create-index.md +0 -17
  288. package/docs/examples/databases/create-integer-attribute.md +0 -19
  289. package/docs/examples/databases/create-ip-attribute.md +0 -17
  290. package/docs/examples/databases/create-relationship-attribute.md +0 -19
  291. package/docs/examples/databases/create-string-attribute.md +0 -19
  292. package/docs/examples/databases/create-url-attribute.md +0 -17
  293. package/docs/examples/databases/create.md +0 -14
  294. package/docs/examples/databases/delete-attribute.md +0 -14
  295. package/docs/examples/databases/delete-collection.md +0 -13
  296. package/docs/examples/databases/delete-document.md +0 -14
  297. package/docs/examples/databases/delete-index.md +0 -14
  298. package/docs/examples/databases/delete.md +0 -12
  299. package/docs/examples/databases/get-attribute.md +0 -14
  300. package/docs/examples/databases/get-collection.md +0 -13
  301. package/docs/examples/databases/get-document.md +0 -15
  302. package/docs/examples/databases/get-index.md +0 -14
  303. package/docs/examples/databases/get.md +0 -12
  304. package/docs/examples/databases/list-attributes.md +0 -14
  305. package/docs/examples/databases/list-collections.md +0 -14
  306. package/docs/examples/databases/list-documents.md +0 -14
  307. package/docs/examples/databases/list-indexes.md +0 -14
  308. package/docs/examples/databases/list.md +0 -13
  309. package/docs/examples/databases/update-boolean-attribute.md +0 -16
  310. package/docs/examples/databases/update-collection.md +0 -17
  311. package/docs/examples/databases/update-datetime-attribute.md +0 -16
  312. package/docs/examples/databases/update-document.md +0 -16
  313. package/docs/examples/databases/update-email-attribute.md +0 -16
  314. package/docs/examples/databases/update-enum-attribute.md +0 -17
  315. package/docs/examples/databases/update-float-attribute.md +0 -18
  316. package/docs/examples/databases/update-integer-attribute.md +0 -18
  317. package/docs/examples/databases/update-ip-attribute.md +0 -16
  318. package/docs/examples/databases/update-relationship-attribute.md +0 -15
  319. package/docs/examples/databases/update-string-attribute.md +0 -16
  320. package/docs/examples/databases/update-url-attribute.md +0 -16
  321. package/docs/examples/databases/update.md +0 -14
  322. package/docs/examples/functions/create-build.md +0 -14
  323. package/docs/examples/functions/create-deployment.md +0 -17
  324. package/docs/examples/functions/create-execution.md +0 -17
  325. package/docs/examples/functions/create-variable.md +0 -14
  326. package/docs/examples/functions/create.md +0 -31
  327. package/docs/examples/functions/delete-deployment.md +0 -13
  328. package/docs/examples/functions/delete-variable.md +0 -13
  329. package/docs/examples/functions/delete.md +0 -12
  330. package/docs/examples/functions/download-deployment.md +0 -13
  331. package/docs/examples/functions/get-deployment.md +0 -13
  332. package/docs/examples/functions/get-execution.md +0 -13
  333. package/docs/examples/functions/get-variable.md +0 -13
  334. package/docs/examples/functions/get.md +0 -12
  335. package/docs/examples/functions/list-deployments.md +0 -14
  336. package/docs/examples/functions/list-executions.md +0 -14
  337. package/docs/examples/functions/list-runtimes.md +0 -10
  338. package/docs/examples/functions/list-variables.md +0 -12
  339. package/docs/examples/functions/list.md +0 -13
  340. package/docs/examples/functions/update-deployment.md +0 -13
  341. package/docs/examples/functions/update-variable.md +0 -15
  342. package/docs/examples/functions/update.md +0 -27
  343. package/docs/examples/graphql/mutation.md +0 -12
  344. package/docs/examples/graphql/query.md +0 -12
  345. package/docs/examples/health/get-antivirus.md +0 -10
  346. package/docs/examples/health/get-cache.md +0 -10
  347. package/docs/examples/health/get-certificate.md +0 -12
  348. package/docs/examples/health/get-d-b.md +0 -10
  349. package/docs/examples/health/get-failed-jobs.md +0 -13
  350. package/docs/examples/health/get-pub-sub.md +0 -10
  351. package/docs/examples/health/get-queue-builds.md +0 -12
  352. package/docs/examples/health/get-queue-certificates.md +0 -12
  353. package/docs/examples/health/get-queue-databases.md +0 -13
  354. package/docs/examples/health/get-queue-deletes.md +0 -12
  355. package/docs/examples/health/get-queue-functions.md +0 -12
  356. package/docs/examples/health/get-queue-logs.md +0 -12
  357. package/docs/examples/health/get-queue-mails.md +0 -12
  358. package/docs/examples/health/get-queue-messaging.md +0 -12
  359. package/docs/examples/health/get-queue-migrations.md +0 -12
  360. package/docs/examples/health/get-queue-usage-dump.md +0 -12
  361. package/docs/examples/health/get-queue-usage.md +0 -12
  362. package/docs/examples/health/get-queue-webhooks.md +0 -12
  363. package/docs/examples/health/get-queue.md +0 -10
  364. package/docs/examples/health/get-storage-local.md +0 -10
  365. package/docs/examples/health/get-storage.md +0 -10
  366. package/docs/examples/health/get-time.md +0 -10
  367. package/docs/examples/health/get.md +0 -10
  368. package/docs/examples/locale/get.md +0 -10
  369. package/docs/examples/locale/list-codes.md +0 -10
  370. package/docs/examples/locale/list-continents.md +0 -10
  371. package/docs/examples/locale/list-countries-e-u.md +0 -10
  372. package/docs/examples/locale/list-countries-phones.md +0 -10
  373. package/docs/examples/locale/list-countries.md +0 -10
  374. package/docs/examples/locale/list-currencies.md +0 -10
  375. package/docs/examples/locale/list-languages.md +0 -10
  376. package/docs/examples/messaging/create-apns-provider.md +0 -19
  377. package/docs/examples/messaging/create-email.md +0 -23
  378. package/docs/examples/messaging/create-fcm-provider.md +0 -15
  379. package/docs/examples/messaging/create-mailgun-provider.md +0 -21
  380. package/docs/examples/messaging/create-msg91provider.md +0 -17
  381. package/docs/examples/messaging/create-push.md +0 -27
  382. package/docs/examples/messaging/create-sendgrid-provider.md +0 -19
  383. package/docs/examples/messaging/create-sms.md +0 -18
  384. package/docs/examples/messaging/create-smtp-provider.md +0 -25
  385. package/docs/examples/messaging/create-subscriber.md +0 -14
  386. package/docs/examples/messaging/create-telesign-provider.md +0 -17
  387. package/docs/examples/messaging/create-textmagic-provider.md +0 -17
  388. package/docs/examples/messaging/create-topic.md +0 -14
  389. package/docs/examples/messaging/create-twilio-provider.md +0 -17
  390. package/docs/examples/messaging/create-vonage-provider.md +0 -17
  391. package/docs/examples/messaging/delete-provider.md +0 -12
  392. package/docs/examples/messaging/delete-subscriber.md +0 -13
  393. package/docs/examples/messaging/delete-topic.md +0 -12
  394. package/docs/examples/messaging/delete.md +0 -12
  395. package/docs/examples/messaging/get-message.md +0 -12
  396. package/docs/examples/messaging/get-provider.md +0 -12
  397. package/docs/examples/messaging/get-subscriber.md +0 -13
  398. package/docs/examples/messaging/get-topic.md +0 -12
  399. package/docs/examples/messaging/list-message-logs.md +0 -13
  400. package/docs/examples/messaging/list-messages.md +0 -13
  401. package/docs/examples/messaging/list-provider-logs.md +0 -13
  402. package/docs/examples/messaging/list-providers.md +0 -13
  403. package/docs/examples/messaging/list-subscriber-logs.md +0 -13
  404. package/docs/examples/messaging/list-subscribers.md +0 -14
  405. package/docs/examples/messaging/list-targets.md +0 -13
  406. package/docs/examples/messaging/list-topic-logs.md +0 -13
  407. package/docs/examples/messaging/list-topics.md +0 -13
  408. package/docs/examples/messaging/update-apns-provider.md +0 -19
  409. package/docs/examples/messaging/update-email.md +0 -22
  410. package/docs/examples/messaging/update-fcm-provider.md +0 -15
  411. package/docs/examples/messaging/update-mailgun-provider.md +0 -21
  412. package/docs/examples/messaging/update-msg91provider.md +0 -17
  413. package/docs/examples/messaging/update-push.md +0 -27
  414. package/docs/examples/messaging/update-sendgrid-provider.md +0 -19
  415. package/docs/examples/messaging/update-sms.md +0 -18
  416. package/docs/examples/messaging/update-smtp-provider.md +0 -25
  417. package/docs/examples/messaging/update-telesign-provider.md +0 -17
  418. package/docs/examples/messaging/update-textmagic-provider.md +0 -17
  419. package/docs/examples/messaging/update-topic.md +0 -14
  420. package/docs/examples/messaging/update-twilio-provider.md +0 -17
  421. package/docs/examples/messaging/update-vonage-provider.md +0 -17
  422. package/docs/examples/storage/create-bucket.md +0 -21
  423. package/docs/examples/storage/create-file.md +0 -16
  424. package/docs/examples/storage/delete-bucket.md +0 -12
  425. package/docs/examples/storage/delete-file.md +0 -13
  426. package/docs/examples/storage/get-bucket.md +0 -12
  427. package/docs/examples/storage/get-file-download.md +0 -13
  428. package/docs/examples/storage/get-file-preview.md +0 -24
  429. package/docs/examples/storage/get-file-view.md +0 -13
  430. package/docs/examples/storage/get-file.md +0 -13
  431. package/docs/examples/storage/list-buckets.md +0 -13
  432. package/docs/examples/storage/list-files.md +0 -14
  433. package/docs/examples/storage/update-bucket.md +0 -21
  434. package/docs/examples/storage/update-file.md +0 -15
  435. package/docs/examples/teams/create-membership.md +0 -18
  436. package/docs/examples/teams/create.md +0 -14
  437. package/docs/examples/teams/delete-membership.md +0 -13
  438. package/docs/examples/teams/delete.md +0 -12
  439. package/docs/examples/teams/get-membership.md +0 -13
  440. package/docs/examples/teams/get-prefs.md +0 -12
  441. package/docs/examples/teams/get.md +0 -12
  442. package/docs/examples/teams/list-memberships.md +0 -14
  443. package/docs/examples/teams/list.md +0 -13
  444. package/docs/examples/teams/update-membership-status.md +0 -15
  445. package/docs/examples/teams/update-membership.md +0 -14
  446. package/docs/examples/teams/update-name.md +0 -13
  447. package/docs/examples/teams/update-prefs.md +0 -13
  448. package/docs/examples/users/create-argon2user.md +0 -15
  449. package/docs/examples/users/create-bcrypt-user.md +0 -15
  450. package/docs/examples/users/create-m-d5user.md +0 -15
  451. package/docs/examples/users/create-mfa-recovery-codes.md +0 -12
  452. package/docs/examples/users/create-p-h-pass-user.md +0 -15
  453. package/docs/examples/users/create-s-h-a-user.md +0 -16
  454. package/docs/examples/users/create-scrypt-modified-user.md +0 -18
  455. package/docs/examples/users/create-scrypt-user.md +0 -20
  456. package/docs/examples/users/create-session.md +0 -12
  457. package/docs/examples/users/create-target.md +0 -17
  458. package/docs/examples/users/create-token.md +0 -14
  459. package/docs/examples/users/create.md +0 -16
  460. package/docs/examples/users/delete-identity.md +0 -12
  461. package/docs/examples/users/delete-mfa-authenticator.md +0 -13
  462. package/docs/examples/users/delete-session.md +0 -13
  463. package/docs/examples/users/delete-sessions.md +0 -12
  464. package/docs/examples/users/delete-target.md +0 -13
  465. package/docs/examples/users/delete.md +0 -12
  466. package/docs/examples/users/get-mfa-recovery-codes.md +0 -12
  467. package/docs/examples/users/get-prefs.md +0 -12
  468. package/docs/examples/users/get-target.md +0 -13
  469. package/docs/examples/users/get.md +0 -12
  470. package/docs/examples/users/list-identities.md +0 -13
  471. package/docs/examples/users/list-logs.md +0 -13
  472. package/docs/examples/users/list-memberships.md +0 -12
  473. package/docs/examples/users/list-mfa-factors.md +0 -12
  474. package/docs/examples/users/list-sessions.md +0 -12
  475. package/docs/examples/users/list-targets.md +0 -13
  476. package/docs/examples/users/list.md +0 -13
  477. package/docs/examples/users/update-email-verification.md +0 -13
  478. package/docs/examples/users/update-email.md +0 -13
  479. package/docs/examples/users/update-labels.md +0 -13
  480. package/docs/examples/users/update-mfa-recovery-codes.md +0 -12
  481. package/docs/examples/users/update-mfa.md +0 -13
  482. package/docs/examples/users/update-name.md +0 -13
  483. package/docs/examples/users/update-password.md +0 -13
  484. package/docs/examples/users/update-phone-verification.md +0 -13
  485. package/docs/examples/users/update-phone.md +0 -13
  486. package/docs/examples/users/update-prefs.md +0 -13
  487. package/docs/examples/users/update-status.md +0 -13
  488. package/docs/examples/users/update-target.md +0 -16
  489. package/index.d.ts +0 -6656
  490. package/index.js +0 -75
  491. package/lib/client.js +0 -245
  492. package/lib/enums/authentication-factor.js +0 -8
  493. package/lib/enums/authenticator-type.js +0 -5
  494. package/lib/enums/browser.js +0 -18
  495. package/lib/enums/compression.js +0 -7
  496. package/lib/enums/credit-card.js +0 -20
  497. package/lib/enums/execution-method.js +0 -10
  498. package/lib/enums/flag.js +0 -198
  499. package/lib/enums/image-format.js +0 -9
  500. package/lib/enums/image-gravity.js +0 -13
  501. package/lib/enums/index-type.js +0 -7
  502. package/lib/enums/messaging-provider-type.js +0 -7
  503. package/lib/enums/name.js +0 -17
  504. package/lib/enums/o-auth-provider.js +0 -43
  505. package/lib/enums/password-hash.js +0 -15
  506. package/lib/enums/relation-mutate.js +0 -7
  507. package/lib/enums/relationship-type.js +0 -8
  508. package/lib/enums/runtime.js +0 -48
  509. package/lib/enums/smtp-encryption.js +0 -7
  510. package/lib/exception.js +0 -10
  511. package/lib/id.js +0 -32
  512. package/lib/inputFile.js +0 -117
  513. package/lib/permission.js +0 -24
  514. package/lib/query.js +0 -90
  515. package/lib/service.js +0 -10
  516. package/lib/services/account.js +0 -1365
  517. package/lib/services/avatars.js +0 -325
  518. package/lib/services/databases.js +0 -1987
  519. package/lib/services/functions.js +0 -930
  520. package/lib/services/graphql.js +0 -74
  521. package/lib/services/health.js +0 -513
  522. package/lib/services/locale.js +0 -169
  523. package/lib/services/messaging.js +0 -2218
  524. package/lib/services/storage.js +0 -663
  525. package/lib/services/teams.js +0 -479
  526. package/lib/services/users.js +0 -1463
@@ -0,0 +1,836 @@
1
+ import { AppwriteException } from '../client.mjs';
2
+
3
+ // src/services/functions.ts
4
+ var Functions = class {
5
+ constructor(client) {
6
+ this.client = client;
7
+ }
8
+ /**
9
+ * List functions
10
+ *
11
+ * Get a list of all the project's functions. You can use the query params to filter your results.
12
+ *
13
+ * @param {string[]} queries
14
+ * @param {string} search
15
+ * @throws {AppwriteException}
16
+ * @returns {Promise<Models.FunctionList>}
17
+ */
18
+ async list(queries, search) {
19
+ const apiPath = "/functions";
20
+ const payload = {};
21
+ if (typeof queries !== "undefined") {
22
+ payload["queries"] = queries;
23
+ }
24
+ if (typeof search !== "undefined") {
25
+ payload["search"] = search;
26
+ }
27
+ const uri = new URL(this.client.config.endpoint + apiPath);
28
+ const apiHeaders = {
29
+ "content-type": "application/json"
30
+ };
31
+ return await this.client.call(
32
+ "get",
33
+ uri,
34
+ apiHeaders,
35
+ payload
36
+ );
37
+ }
38
+ /**
39
+ * Create function
40
+ *
41
+ * 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.
42
+ *
43
+ * @param {string} functionId
44
+ * @param {string} name
45
+ * @param {Runtime} runtime
46
+ * @param {string[]} execute
47
+ * @param {string[]} events
48
+ * @param {string} schedule
49
+ * @param {number} timeout
50
+ * @param {boolean} enabled
51
+ * @param {boolean} logging
52
+ * @param {string} entrypoint
53
+ * @param {string} commands
54
+ * @param {string} installationId
55
+ * @param {string} providerRepositoryId
56
+ * @param {string} providerBranch
57
+ * @param {boolean} providerSilentMode
58
+ * @param {string} providerRootDirectory
59
+ * @param {string} templateRepository
60
+ * @param {string} templateOwner
61
+ * @param {string} templateRootDirectory
62
+ * @param {string} templateBranch
63
+ * @throws {AppwriteException}
64
+ * @returns {Promise<Models.Function>}
65
+ */
66
+ async create(functionId, name, runtime, execute, events, schedule, timeout, enabled, logging, entrypoint, commands, installationId, providerRepositoryId, providerBranch, providerSilentMode, providerRootDirectory, templateRepository, templateOwner, templateRootDirectory, templateBranch) {
67
+ if (typeof functionId === "undefined") {
68
+ throw new AppwriteException('Missing required parameter: "functionId"');
69
+ }
70
+ if (typeof name === "undefined") {
71
+ throw new AppwriteException('Missing required parameter: "name"');
72
+ }
73
+ if (typeof runtime === "undefined") {
74
+ throw new AppwriteException('Missing required parameter: "runtime"');
75
+ }
76
+ const apiPath = "/functions";
77
+ const payload = {};
78
+ if (typeof functionId !== "undefined") {
79
+ payload["functionId"] = functionId;
80
+ }
81
+ if (typeof name !== "undefined") {
82
+ payload["name"] = name;
83
+ }
84
+ if (typeof runtime !== "undefined") {
85
+ payload["runtime"] = runtime;
86
+ }
87
+ if (typeof execute !== "undefined") {
88
+ payload["execute"] = execute;
89
+ }
90
+ if (typeof events !== "undefined") {
91
+ payload["events"] = events;
92
+ }
93
+ if (typeof schedule !== "undefined") {
94
+ payload["schedule"] = schedule;
95
+ }
96
+ if (typeof timeout !== "undefined") {
97
+ payload["timeout"] = timeout;
98
+ }
99
+ if (typeof enabled !== "undefined") {
100
+ payload["enabled"] = enabled;
101
+ }
102
+ if (typeof logging !== "undefined") {
103
+ payload["logging"] = logging;
104
+ }
105
+ if (typeof entrypoint !== "undefined") {
106
+ payload["entrypoint"] = entrypoint;
107
+ }
108
+ if (typeof commands !== "undefined") {
109
+ payload["commands"] = commands;
110
+ }
111
+ if (typeof installationId !== "undefined") {
112
+ payload["installationId"] = installationId;
113
+ }
114
+ if (typeof providerRepositoryId !== "undefined") {
115
+ payload["providerRepositoryId"] = providerRepositoryId;
116
+ }
117
+ if (typeof providerBranch !== "undefined") {
118
+ payload["providerBranch"] = providerBranch;
119
+ }
120
+ if (typeof providerSilentMode !== "undefined") {
121
+ payload["providerSilentMode"] = providerSilentMode;
122
+ }
123
+ if (typeof providerRootDirectory !== "undefined") {
124
+ payload["providerRootDirectory"] = providerRootDirectory;
125
+ }
126
+ if (typeof templateRepository !== "undefined") {
127
+ payload["templateRepository"] = templateRepository;
128
+ }
129
+ if (typeof templateOwner !== "undefined") {
130
+ payload["templateOwner"] = templateOwner;
131
+ }
132
+ if (typeof templateRootDirectory !== "undefined") {
133
+ payload["templateRootDirectory"] = templateRootDirectory;
134
+ }
135
+ if (typeof templateBranch !== "undefined") {
136
+ payload["templateBranch"] = templateBranch;
137
+ }
138
+ const uri = new URL(this.client.config.endpoint + apiPath);
139
+ const apiHeaders = {
140
+ "content-type": "application/json"
141
+ };
142
+ return await this.client.call(
143
+ "post",
144
+ uri,
145
+ apiHeaders,
146
+ payload
147
+ );
148
+ }
149
+ /**
150
+ * List runtimes
151
+ *
152
+ * Get a list of all runtimes that are currently active on your instance.
153
+ *
154
+ * @throws {AppwriteException}
155
+ * @returns {Promise<Models.RuntimeList>}
156
+ */
157
+ async listRuntimes() {
158
+ const apiPath = "/functions/runtimes";
159
+ const payload = {};
160
+ const uri = new URL(this.client.config.endpoint + apiPath);
161
+ const apiHeaders = {
162
+ "content-type": "application/json"
163
+ };
164
+ return await this.client.call(
165
+ "get",
166
+ uri,
167
+ apiHeaders,
168
+ payload
169
+ );
170
+ }
171
+ /**
172
+ * Get function
173
+ *
174
+ * Get a function by its unique ID.
175
+ *
176
+ * @param {string} functionId
177
+ * @throws {AppwriteException}
178
+ * @returns {Promise<Models.Function>}
179
+ */
180
+ async get(functionId) {
181
+ if (typeof functionId === "undefined") {
182
+ throw new AppwriteException('Missing required parameter: "functionId"');
183
+ }
184
+ const apiPath = "/functions/{functionId}".replace("{functionId}", functionId);
185
+ const payload = {};
186
+ const uri = new URL(this.client.config.endpoint + apiPath);
187
+ const apiHeaders = {
188
+ "content-type": "application/json"
189
+ };
190
+ return await this.client.call(
191
+ "get",
192
+ uri,
193
+ apiHeaders,
194
+ payload
195
+ );
196
+ }
197
+ /**
198
+ * Update function
199
+ *
200
+ * Update function by its unique ID.
201
+ *
202
+ * @param {string} functionId
203
+ * @param {string} name
204
+ * @param {Runtime} runtime
205
+ * @param {string[]} execute
206
+ * @param {string[]} events
207
+ * @param {string} schedule
208
+ * @param {number} timeout
209
+ * @param {boolean} enabled
210
+ * @param {boolean} logging
211
+ * @param {string} entrypoint
212
+ * @param {string} commands
213
+ * @param {string} installationId
214
+ * @param {string} providerRepositoryId
215
+ * @param {string} providerBranch
216
+ * @param {boolean} providerSilentMode
217
+ * @param {string} providerRootDirectory
218
+ * @throws {AppwriteException}
219
+ * @returns {Promise<Models.Function>}
220
+ */
221
+ async update(functionId, name, runtime, execute, events, schedule, timeout, enabled, logging, entrypoint, commands, installationId, providerRepositoryId, providerBranch, providerSilentMode, providerRootDirectory) {
222
+ if (typeof functionId === "undefined") {
223
+ throw new AppwriteException('Missing required parameter: "functionId"');
224
+ }
225
+ if (typeof name === "undefined") {
226
+ throw new AppwriteException('Missing required parameter: "name"');
227
+ }
228
+ const apiPath = "/functions/{functionId}".replace("{functionId}", functionId);
229
+ const payload = {};
230
+ if (typeof name !== "undefined") {
231
+ payload["name"] = name;
232
+ }
233
+ if (typeof runtime !== "undefined") {
234
+ payload["runtime"] = runtime;
235
+ }
236
+ if (typeof execute !== "undefined") {
237
+ payload["execute"] = execute;
238
+ }
239
+ if (typeof events !== "undefined") {
240
+ payload["events"] = events;
241
+ }
242
+ if (typeof schedule !== "undefined") {
243
+ payload["schedule"] = schedule;
244
+ }
245
+ if (typeof timeout !== "undefined") {
246
+ payload["timeout"] = timeout;
247
+ }
248
+ if (typeof enabled !== "undefined") {
249
+ payload["enabled"] = enabled;
250
+ }
251
+ if (typeof logging !== "undefined") {
252
+ payload["logging"] = logging;
253
+ }
254
+ if (typeof entrypoint !== "undefined") {
255
+ payload["entrypoint"] = entrypoint;
256
+ }
257
+ if (typeof commands !== "undefined") {
258
+ payload["commands"] = commands;
259
+ }
260
+ if (typeof installationId !== "undefined") {
261
+ payload["installationId"] = installationId;
262
+ }
263
+ if (typeof providerRepositoryId !== "undefined") {
264
+ payload["providerRepositoryId"] = providerRepositoryId;
265
+ }
266
+ if (typeof providerBranch !== "undefined") {
267
+ payload["providerBranch"] = providerBranch;
268
+ }
269
+ if (typeof providerSilentMode !== "undefined") {
270
+ payload["providerSilentMode"] = providerSilentMode;
271
+ }
272
+ if (typeof providerRootDirectory !== "undefined") {
273
+ payload["providerRootDirectory"] = providerRootDirectory;
274
+ }
275
+ const uri = new URL(this.client.config.endpoint + apiPath);
276
+ const apiHeaders = {
277
+ "content-type": "application/json"
278
+ };
279
+ return await this.client.call(
280
+ "put",
281
+ uri,
282
+ apiHeaders,
283
+ payload
284
+ );
285
+ }
286
+ /**
287
+ * Delete function
288
+ *
289
+ * Delete a function by its unique ID.
290
+ *
291
+ * @param {string} functionId
292
+ * @throws {AppwriteException}
293
+ * @returns {Promise<{}>}
294
+ */
295
+ async delete(functionId) {
296
+ if (typeof functionId === "undefined") {
297
+ throw new AppwriteException('Missing required parameter: "functionId"');
298
+ }
299
+ const apiPath = "/functions/{functionId}".replace("{functionId}", functionId);
300
+ const payload = {};
301
+ const uri = new URL(this.client.config.endpoint + apiPath);
302
+ const apiHeaders = {
303
+ "content-type": "application/json"
304
+ };
305
+ return await this.client.call(
306
+ "delete",
307
+ uri,
308
+ apiHeaders,
309
+ payload
310
+ );
311
+ }
312
+ /**
313
+ * List deployments
314
+ *
315
+ * Get a list of all the project&#039;s code deployments. You can use the query params to filter your results.
316
+ *
317
+ * @param {string} functionId
318
+ * @param {string[]} queries
319
+ * @param {string} search
320
+ * @throws {AppwriteException}
321
+ * @returns {Promise<Models.DeploymentList>}
322
+ */
323
+ async listDeployments(functionId, queries, search) {
324
+ if (typeof functionId === "undefined") {
325
+ throw new AppwriteException('Missing required parameter: "functionId"');
326
+ }
327
+ const apiPath = "/functions/{functionId}/deployments".replace("{functionId}", functionId);
328
+ const payload = {};
329
+ if (typeof queries !== "undefined") {
330
+ payload["queries"] = queries;
331
+ }
332
+ if (typeof search !== "undefined") {
333
+ payload["search"] = search;
334
+ }
335
+ const uri = new URL(this.client.config.endpoint + apiPath);
336
+ const apiHeaders = {
337
+ "content-type": "application/json"
338
+ };
339
+ return await this.client.call(
340
+ "get",
341
+ uri,
342
+ apiHeaders,
343
+ payload
344
+ );
345
+ }
346
+ /**
347
+ * Create deployment
348
+ *
349
+ * Create a new function code deployment. Use this endpoint to upload a new version of your code function. To execute your newly uploaded code, you&#039;ll need to update the function&#039;s deployment to use your new deployment UID.
350
+
351
+ 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).
352
+
353
+ Use the &quot;command&quot; param to set the entrypoint used to execute your code.
354
+ *
355
+ * @param {string} functionId
356
+ * @param {File} code
357
+ * @param {boolean} activate
358
+ * @param {string} entrypoint
359
+ * @param {string} commands
360
+ * @throws {AppwriteException}
361
+ * @returns {Promise<Models.Deployment>}
362
+ */
363
+ async createDeployment(functionId, code, activate, entrypoint, commands, onProgress = (progress) => {
364
+ }) {
365
+ if (typeof functionId === "undefined") {
366
+ throw new AppwriteException('Missing required parameter: "functionId"');
367
+ }
368
+ if (typeof code === "undefined") {
369
+ throw new AppwriteException('Missing required parameter: "code"');
370
+ }
371
+ if (typeof activate === "undefined") {
372
+ throw new AppwriteException('Missing required parameter: "activate"');
373
+ }
374
+ const apiPath = "/functions/{functionId}/deployments".replace("{functionId}", functionId);
375
+ const payload = {};
376
+ if (typeof entrypoint !== "undefined") {
377
+ payload["entrypoint"] = entrypoint;
378
+ }
379
+ if (typeof commands !== "undefined") {
380
+ payload["commands"] = commands;
381
+ }
382
+ if (typeof code !== "undefined") {
383
+ payload["code"] = code;
384
+ }
385
+ if (typeof activate !== "undefined") {
386
+ payload["activate"] = activate;
387
+ }
388
+ const uri = new URL(this.client.config.endpoint + apiPath);
389
+ const apiHeaders = {
390
+ "content-type": "multipart/form-data"
391
+ };
392
+ return await this.client.chunkedUpload(
393
+ "post",
394
+ uri,
395
+ apiHeaders,
396
+ payload,
397
+ onProgress
398
+ );
399
+ }
400
+ /**
401
+ * Get deployment
402
+ *
403
+ * Get a code deployment by its unique ID.
404
+ *
405
+ * @param {string} functionId
406
+ * @param {string} deploymentId
407
+ * @throws {AppwriteException}
408
+ * @returns {Promise<Models.Deployment>}
409
+ */
410
+ async getDeployment(functionId, deploymentId) {
411
+ if (typeof functionId === "undefined") {
412
+ throw new AppwriteException('Missing required parameter: "functionId"');
413
+ }
414
+ if (typeof deploymentId === "undefined") {
415
+ throw new AppwriteException('Missing required parameter: "deploymentId"');
416
+ }
417
+ const apiPath = "/functions/{functionId}/deployments/{deploymentId}".replace("{functionId}", functionId).replace("{deploymentId}", deploymentId);
418
+ const payload = {};
419
+ const uri = new URL(this.client.config.endpoint + apiPath);
420
+ const apiHeaders = {
421
+ "content-type": "application/json"
422
+ };
423
+ return await this.client.call(
424
+ "get",
425
+ uri,
426
+ apiHeaders,
427
+ payload
428
+ );
429
+ }
430
+ /**
431
+ * Update function deployment
432
+ *
433
+ * Update the function code deployment ID using the unique function ID. Use this endpoint to switch the code deployment that should be executed by the execution endpoint.
434
+ *
435
+ * @param {string} functionId
436
+ * @param {string} deploymentId
437
+ * @throws {AppwriteException}
438
+ * @returns {Promise<Models.Function>}
439
+ */
440
+ async updateDeployment(functionId, deploymentId) {
441
+ if (typeof functionId === "undefined") {
442
+ throw new AppwriteException('Missing required parameter: "functionId"');
443
+ }
444
+ if (typeof deploymentId === "undefined") {
445
+ throw new AppwriteException('Missing required parameter: "deploymentId"');
446
+ }
447
+ const apiPath = "/functions/{functionId}/deployments/{deploymentId}".replace("{functionId}", functionId).replace("{deploymentId}", deploymentId);
448
+ const payload = {};
449
+ const uri = new URL(this.client.config.endpoint + apiPath);
450
+ const apiHeaders = {
451
+ "content-type": "application/json"
452
+ };
453
+ return await this.client.call(
454
+ "patch",
455
+ uri,
456
+ apiHeaders,
457
+ payload
458
+ );
459
+ }
460
+ /**
461
+ * Delete deployment
462
+ *
463
+ * Delete a code deployment by its unique ID.
464
+ *
465
+ * @param {string} functionId
466
+ * @param {string} deploymentId
467
+ * @throws {AppwriteException}
468
+ * @returns {Promise<{}>}
469
+ */
470
+ async deleteDeployment(functionId, deploymentId) {
471
+ if (typeof functionId === "undefined") {
472
+ throw new AppwriteException('Missing required parameter: "functionId"');
473
+ }
474
+ if (typeof deploymentId === "undefined") {
475
+ throw new AppwriteException('Missing required parameter: "deploymentId"');
476
+ }
477
+ const apiPath = "/functions/{functionId}/deployments/{deploymentId}".replace("{functionId}", functionId).replace("{deploymentId}", deploymentId);
478
+ const payload = {};
479
+ const uri = new URL(this.client.config.endpoint + apiPath);
480
+ const apiHeaders = {
481
+ "content-type": "application/json"
482
+ };
483
+ return await this.client.call(
484
+ "delete",
485
+ uri,
486
+ apiHeaders,
487
+ payload
488
+ );
489
+ }
490
+ /**
491
+ * Create build
492
+ *
493
+ * Create a new build for an Appwrite Function deployment. This endpoint can be used to retry a failed build.
494
+ *
495
+ * @param {string} functionId
496
+ * @param {string} deploymentId
497
+ * @param {string} buildId
498
+ * @throws {AppwriteException}
499
+ * @returns {Promise<{}>}
500
+ */
501
+ async createBuild(functionId, deploymentId, buildId) {
502
+ if (typeof functionId === "undefined") {
503
+ throw new AppwriteException('Missing required parameter: "functionId"');
504
+ }
505
+ if (typeof deploymentId === "undefined") {
506
+ throw new AppwriteException('Missing required parameter: "deploymentId"');
507
+ }
508
+ if (typeof buildId === "undefined") {
509
+ throw new AppwriteException('Missing required parameter: "buildId"');
510
+ }
511
+ const apiPath = "/functions/{functionId}/deployments/{deploymentId}/builds/{buildId}".replace("{functionId}", functionId).replace("{deploymentId}", deploymentId).replace("{buildId}", buildId);
512
+ const payload = {};
513
+ const uri = new URL(this.client.config.endpoint + apiPath);
514
+ const apiHeaders = {
515
+ "content-type": "application/json"
516
+ };
517
+ return await this.client.call(
518
+ "post",
519
+ uri,
520
+ apiHeaders,
521
+ payload
522
+ );
523
+ }
524
+ /**
525
+ * Download Deployment
526
+ *
527
+ * Get a Deployment&#039;s contents by its unique ID. This endpoint supports range requests for partial or streaming file download.
528
+ *
529
+ * @param {string} functionId
530
+ * @param {string} deploymentId
531
+ * @throws {AppwriteException}
532
+ * @returns {Promise<ArrayBuffer>}
533
+ */
534
+ async downloadDeployment(functionId, deploymentId) {
535
+ if (typeof functionId === "undefined") {
536
+ throw new AppwriteException('Missing required parameter: "functionId"');
537
+ }
538
+ if (typeof deploymentId === "undefined") {
539
+ throw new AppwriteException('Missing required parameter: "deploymentId"');
540
+ }
541
+ const apiPath = "/functions/{functionId}/deployments/{deploymentId}/download".replace("{functionId}", functionId).replace("{deploymentId}", deploymentId);
542
+ const payload = {};
543
+ const uri = new URL(this.client.config.endpoint + apiPath);
544
+ const apiHeaders = {
545
+ "content-type": "application/json"
546
+ };
547
+ return await this.client.call(
548
+ "get",
549
+ uri,
550
+ apiHeaders,
551
+ payload,
552
+ "arrayBuffer"
553
+ );
554
+ }
555
+ /**
556
+ * List executions
557
+ *
558
+ * Get a list of all the current user function execution logs. You can use the query params to filter your results.
559
+ *
560
+ * @param {string} functionId
561
+ * @param {string[]} queries
562
+ * @param {string} search
563
+ * @throws {AppwriteException}
564
+ * @returns {Promise<Models.ExecutionList>}
565
+ */
566
+ async listExecutions(functionId, queries, search) {
567
+ if (typeof functionId === "undefined") {
568
+ throw new AppwriteException('Missing required parameter: "functionId"');
569
+ }
570
+ const apiPath = "/functions/{functionId}/executions".replace("{functionId}", functionId);
571
+ const payload = {};
572
+ if (typeof queries !== "undefined") {
573
+ payload["queries"] = queries;
574
+ }
575
+ if (typeof search !== "undefined") {
576
+ payload["search"] = search;
577
+ }
578
+ const uri = new URL(this.client.config.endpoint + apiPath);
579
+ const apiHeaders = {
580
+ "content-type": "application/json"
581
+ };
582
+ return await this.client.call(
583
+ "get",
584
+ uri,
585
+ apiHeaders,
586
+ payload
587
+ );
588
+ }
589
+ /**
590
+ * Create execution
591
+ *
592
+ * 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.
593
+ *
594
+ * @param {string} functionId
595
+ * @param {string} body
596
+ * @param {boolean} async
597
+ * @param {string} xpath
598
+ * @param {ExecutionMethod} method
599
+ * @param {object} headers
600
+ * @throws {AppwriteException}
601
+ * @returns {Promise<Models.Execution>}
602
+ */
603
+ async createExecution(functionId, body, async, xpath, method, headers) {
604
+ if (typeof functionId === "undefined") {
605
+ throw new AppwriteException('Missing required parameter: "functionId"');
606
+ }
607
+ const apiPath = "/functions/{functionId}/executions".replace("{functionId}", functionId);
608
+ const payload = {};
609
+ if (typeof body !== "undefined") {
610
+ payload["body"] = body;
611
+ }
612
+ if (typeof async !== "undefined") {
613
+ payload["async"] = async;
614
+ }
615
+ if (typeof xpath !== "undefined") {
616
+ payload["path"] = xpath;
617
+ }
618
+ if (typeof method !== "undefined") {
619
+ payload["method"] = method;
620
+ }
621
+ if (typeof headers !== "undefined") {
622
+ payload["headers"] = headers;
623
+ }
624
+ const uri = new URL(this.client.config.endpoint + apiPath);
625
+ const apiHeaders = {
626
+ "content-type": "application/json"
627
+ };
628
+ return await this.client.call(
629
+ "post",
630
+ uri,
631
+ apiHeaders,
632
+ payload
633
+ );
634
+ }
635
+ /**
636
+ * Get execution
637
+ *
638
+ * Get a function execution log by its unique ID.
639
+ *
640
+ * @param {string} functionId
641
+ * @param {string} executionId
642
+ * @throws {AppwriteException}
643
+ * @returns {Promise<Models.Execution>}
644
+ */
645
+ async getExecution(functionId, executionId) {
646
+ if (typeof functionId === "undefined") {
647
+ throw new AppwriteException('Missing required parameter: "functionId"');
648
+ }
649
+ if (typeof executionId === "undefined") {
650
+ throw new AppwriteException('Missing required parameter: "executionId"');
651
+ }
652
+ const apiPath = "/functions/{functionId}/executions/{executionId}".replace("{functionId}", functionId).replace("{executionId}", executionId);
653
+ const payload = {};
654
+ const uri = new URL(this.client.config.endpoint + apiPath);
655
+ const apiHeaders = {
656
+ "content-type": "application/json"
657
+ };
658
+ return await this.client.call(
659
+ "get",
660
+ uri,
661
+ apiHeaders,
662
+ payload
663
+ );
664
+ }
665
+ /**
666
+ * List variables
667
+ *
668
+ * Get a list of all variables of a specific function.
669
+ *
670
+ * @param {string} functionId
671
+ * @throws {AppwriteException}
672
+ * @returns {Promise<Models.VariableList>}
673
+ */
674
+ async listVariables(functionId) {
675
+ if (typeof functionId === "undefined") {
676
+ throw new AppwriteException('Missing required parameter: "functionId"');
677
+ }
678
+ const apiPath = "/functions/{functionId}/variables".replace("{functionId}", functionId);
679
+ const payload = {};
680
+ const uri = new URL(this.client.config.endpoint + apiPath);
681
+ const apiHeaders = {
682
+ "content-type": "application/json"
683
+ };
684
+ return await this.client.call(
685
+ "get",
686
+ uri,
687
+ apiHeaders,
688
+ payload
689
+ );
690
+ }
691
+ /**
692
+ * Create variable
693
+ *
694
+ * Create a new function environment variable. These variables can be accessed in the function at runtime as environment variables.
695
+ *
696
+ * @param {string} functionId
697
+ * @param {string} key
698
+ * @param {string} value
699
+ * @throws {AppwriteException}
700
+ * @returns {Promise<Models.Variable>}
701
+ */
702
+ async createVariable(functionId, key, value) {
703
+ if (typeof functionId === "undefined") {
704
+ throw new AppwriteException('Missing required parameter: "functionId"');
705
+ }
706
+ if (typeof key === "undefined") {
707
+ throw new AppwriteException('Missing required parameter: "key"');
708
+ }
709
+ if (typeof value === "undefined") {
710
+ throw new AppwriteException('Missing required parameter: "value"');
711
+ }
712
+ const apiPath = "/functions/{functionId}/variables".replace("{functionId}", functionId);
713
+ const payload = {};
714
+ if (typeof key !== "undefined") {
715
+ payload["key"] = key;
716
+ }
717
+ if (typeof value !== "undefined") {
718
+ payload["value"] = value;
719
+ }
720
+ const uri = new URL(this.client.config.endpoint + apiPath);
721
+ const apiHeaders = {
722
+ "content-type": "application/json"
723
+ };
724
+ return await this.client.call(
725
+ "post",
726
+ uri,
727
+ apiHeaders,
728
+ payload
729
+ );
730
+ }
731
+ /**
732
+ * Get variable
733
+ *
734
+ * Get a variable by its unique ID.
735
+ *
736
+ * @param {string} functionId
737
+ * @param {string} variableId
738
+ * @throws {AppwriteException}
739
+ * @returns {Promise<Models.Variable>}
740
+ */
741
+ async getVariable(functionId, variableId) {
742
+ if (typeof functionId === "undefined") {
743
+ throw new AppwriteException('Missing required parameter: "functionId"');
744
+ }
745
+ if (typeof variableId === "undefined") {
746
+ throw new AppwriteException('Missing required parameter: "variableId"');
747
+ }
748
+ const apiPath = "/functions/{functionId}/variables/{variableId}".replace("{functionId}", functionId).replace("{variableId}", variableId);
749
+ const payload = {};
750
+ const uri = new URL(this.client.config.endpoint + apiPath);
751
+ const apiHeaders = {
752
+ "content-type": "application/json"
753
+ };
754
+ return await this.client.call(
755
+ "get",
756
+ uri,
757
+ apiHeaders,
758
+ payload
759
+ );
760
+ }
761
+ /**
762
+ * Update variable
763
+ *
764
+ * Update variable by its unique ID.
765
+ *
766
+ * @param {string} functionId
767
+ * @param {string} variableId
768
+ * @param {string} key
769
+ * @param {string} value
770
+ * @throws {AppwriteException}
771
+ * @returns {Promise<Models.Variable>}
772
+ */
773
+ async updateVariable(functionId, variableId, key, value) {
774
+ if (typeof functionId === "undefined") {
775
+ throw new AppwriteException('Missing required parameter: "functionId"');
776
+ }
777
+ if (typeof variableId === "undefined") {
778
+ throw new AppwriteException('Missing required parameter: "variableId"');
779
+ }
780
+ if (typeof key === "undefined") {
781
+ throw new AppwriteException('Missing required parameter: "key"');
782
+ }
783
+ const apiPath = "/functions/{functionId}/variables/{variableId}".replace("{functionId}", functionId).replace("{variableId}", variableId);
784
+ const payload = {};
785
+ if (typeof key !== "undefined") {
786
+ payload["key"] = key;
787
+ }
788
+ if (typeof value !== "undefined") {
789
+ payload["value"] = value;
790
+ }
791
+ const uri = new URL(this.client.config.endpoint + apiPath);
792
+ const apiHeaders = {
793
+ "content-type": "application/json"
794
+ };
795
+ return await this.client.call(
796
+ "put",
797
+ uri,
798
+ apiHeaders,
799
+ payload
800
+ );
801
+ }
802
+ /**
803
+ * Delete variable
804
+ *
805
+ * Delete a variable by its unique ID.
806
+ *
807
+ * @param {string} functionId
808
+ * @param {string} variableId
809
+ * @throws {AppwriteException}
810
+ * @returns {Promise<{}>}
811
+ */
812
+ async deleteVariable(functionId, variableId) {
813
+ if (typeof functionId === "undefined") {
814
+ throw new AppwriteException('Missing required parameter: "functionId"');
815
+ }
816
+ if (typeof variableId === "undefined") {
817
+ throw new AppwriteException('Missing required parameter: "variableId"');
818
+ }
819
+ const apiPath = "/functions/{functionId}/variables/{variableId}".replace("{functionId}", functionId).replace("{variableId}", variableId);
820
+ const payload = {};
821
+ const uri = new URL(this.client.config.endpoint + apiPath);
822
+ const apiHeaders = {
823
+ "content-type": "application/json"
824
+ };
825
+ return await this.client.call(
826
+ "delete",
827
+ uri,
828
+ apiHeaders,
829
+ payload
830
+ );
831
+ }
832
+ };
833
+
834
+ export { Functions };
835
+ //# sourceMappingURL=out.js.map
836
+ //# sourceMappingURL=functions.mjs.map