node-appwrite 23.0.0 → 24.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 (350) hide show
  1. package/README.md +1 -1
  2. package/dist/client.d.mts +11 -1
  3. package/dist/client.d.ts +11 -1
  4. package/dist/client.js +18 -9
  5. package/dist/client.js.map +1 -1
  6. package/dist/client.mjs +17 -8
  7. package/dist/client.mjs.map +1 -1
  8. package/dist/enums/adapter.js +1 -1
  9. package/dist/enums/adapter.js.map +1 -1
  10. package/dist/enums/adapter.mjs +1 -1
  11. package/dist/enums/adapter.mjs.map +1 -1
  12. package/dist/enums/attribute-status.js +1 -1
  13. package/dist/enums/attribute-status.js.map +1 -1
  14. package/dist/enums/attribute-status.mjs +1 -1
  15. package/dist/enums/attribute-status.mjs.map +1 -1
  16. package/dist/enums/authentication-factor.js +1 -1
  17. package/dist/enums/authentication-factor.js.map +1 -1
  18. package/dist/enums/authentication-factor.mjs +1 -1
  19. package/dist/enums/authentication-factor.mjs.map +1 -1
  20. package/dist/enums/authenticator-type.js +1 -1
  21. package/dist/enums/authenticator-type.js.map +1 -1
  22. package/dist/enums/authenticator-type.mjs +1 -1
  23. package/dist/enums/authenticator-type.mjs.map +1 -1
  24. package/dist/enums/backup-services.js +1 -1
  25. package/dist/enums/backup-services.js.map +1 -1
  26. package/dist/enums/backup-services.mjs +1 -1
  27. package/dist/enums/backup-services.mjs.map +1 -1
  28. package/dist/enums/browser-permission.js +1 -1
  29. package/dist/enums/browser-permission.js.map +1 -1
  30. package/dist/enums/browser-permission.mjs +1 -1
  31. package/dist/enums/browser-permission.mjs.map +1 -1
  32. package/dist/enums/browser.js +1 -1
  33. package/dist/enums/browser.js.map +1 -1
  34. package/dist/enums/browser.mjs +1 -1
  35. package/dist/enums/browser.mjs.map +1 -1
  36. package/dist/enums/build-runtime.d.mts +3 -1
  37. package/dist/enums/build-runtime.d.ts +3 -1
  38. package/dist/enums/build-runtime.js +3 -1
  39. package/dist/enums/build-runtime.js.map +1 -1
  40. package/dist/enums/build-runtime.mjs +3 -1
  41. package/dist/enums/build-runtime.mjs.map +1 -1
  42. package/dist/enums/column-status.js +1 -1
  43. package/dist/enums/column-status.js.map +1 -1
  44. package/dist/enums/column-status.mjs +1 -1
  45. package/dist/enums/column-status.mjs.map +1 -1
  46. package/dist/enums/compression.js +1 -1
  47. package/dist/enums/compression.js.map +1 -1
  48. package/dist/enums/compression.mjs +1 -1
  49. package/dist/enums/compression.mjs.map +1 -1
  50. package/dist/enums/credit-card.js +1 -1
  51. package/dist/enums/credit-card.js.map +1 -1
  52. package/dist/enums/credit-card.mjs +1 -1
  53. package/dist/enums/credit-card.mjs.map +1 -1
  54. package/dist/enums/database-type.js +1 -1
  55. package/dist/enums/database-type.js.map +1 -1
  56. package/dist/enums/database-type.mjs +1 -1
  57. package/dist/enums/database-type.mjs.map +1 -1
  58. package/dist/enums/databases-index-type.js +1 -1
  59. package/dist/enums/databases-index-type.js.map +1 -1
  60. package/dist/enums/databases-index-type.mjs +1 -1
  61. package/dist/enums/databases-index-type.mjs.map +1 -1
  62. package/dist/enums/deployment-download-type.js +1 -1
  63. package/dist/enums/deployment-download-type.js.map +1 -1
  64. package/dist/enums/deployment-download-type.mjs +1 -1
  65. package/dist/enums/deployment-download-type.mjs.map +1 -1
  66. package/dist/enums/deployment-status.js +1 -1
  67. package/dist/enums/deployment-status.js.map +1 -1
  68. package/dist/enums/deployment-status.mjs +1 -1
  69. package/dist/enums/deployment-status.mjs.map +1 -1
  70. package/dist/enums/execution-method.js +1 -1
  71. package/dist/enums/execution-method.js.map +1 -1
  72. package/dist/enums/execution-method.mjs +1 -1
  73. package/dist/enums/execution-method.mjs.map +1 -1
  74. package/dist/enums/execution-status.js +1 -1
  75. package/dist/enums/execution-status.js.map +1 -1
  76. package/dist/enums/execution-status.mjs +1 -1
  77. package/dist/enums/execution-status.mjs.map +1 -1
  78. package/dist/enums/execution-trigger.js +1 -1
  79. package/dist/enums/execution-trigger.js.map +1 -1
  80. package/dist/enums/execution-trigger.mjs +1 -1
  81. package/dist/enums/execution-trigger.mjs.map +1 -1
  82. package/dist/enums/flag.js +1 -1
  83. package/dist/enums/flag.js.map +1 -1
  84. package/dist/enums/flag.mjs +1 -1
  85. package/dist/enums/flag.mjs.map +1 -1
  86. package/dist/enums/framework.js +1 -1
  87. package/dist/enums/framework.js.map +1 -1
  88. package/dist/enums/framework.mjs +1 -1
  89. package/dist/enums/framework.mjs.map +1 -1
  90. package/dist/enums/health-antivirus-status.js +1 -1
  91. package/dist/enums/health-antivirus-status.js.map +1 -1
  92. package/dist/enums/health-antivirus-status.mjs +1 -1
  93. package/dist/enums/health-antivirus-status.mjs.map +1 -1
  94. package/dist/enums/health-check-status.js +1 -1
  95. package/dist/enums/health-check-status.js.map +1 -1
  96. package/dist/enums/health-check-status.mjs +1 -1
  97. package/dist/enums/health-check-status.mjs.map +1 -1
  98. package/dist/enums/image-format.js +1 -1
  99. package/dist/enums/image-format.js.map +1 -1
  100. package/dist/enums/image-format.mjs +1 -1
  101. package/dist/enums/image-format.mjs.map +1 -1
  102. package/dist/enums/image-gravity.js +1 -1
  103. package/dist/enums/image-gravity.js.map +1 -1
  104. package/dist/enums/image-gravity.mjs +1 -1
  105. package/dist/enums/image-gravity.mjs.map +1 -1
  106. package/dist/enums/index-status.js +1 -1
  107. package/dist/enums/index-status.js.map +1 -1
  108. package/dist/enums/index-status.mjs +1 -1
  109. package/dist/enums/index-status.mjs.map +1 -1
  110. package/dist/enums/message-priority.js +1 -1
  111. package/dist/enums/message-priority.js.map +1 -1
  112. package/dist/enums/message-priority.mjs +1 -1
  113. package/dist/enums/message-priority.mjs.map +1 -1
  114. package/dist/enums/message-status.js +1 -1
  115. package/dist/enums/message-status.js.map +1 -1
  116. package/dist/enums/message-status.mjs +1 -1
  117. package/dist/enums/message-status.mjs.map +1 -1
  118. package/dist/enums/messaging-provider-type.js +1 -1
  119. package/dist/enums/messaging-provider-type.js.map +1 -1
  120. package/dist/enums/messaging-provider-type.mjs +1 -1
  121. package/dist/enums/messaging-provider-type.mjs.map +1 -1
  122. package/dist/enums/name.js +1 -1
  123. package/dist/enums/name.js.map +1 -1
  124. package/dist/enums/name.mjs +1 -1
  125. package/dist/enums/name.mjs.map +1 -1
  126. package/dist/enums/o-auth-provider.d.mts +1 -0
  127. package/dist/enums/o-auth-provider.d.ts +1 -0
  128. package/dist/enums/o-auth-provider.js +2 -1
  129. package/dist/enums/o-auth-provider.js.map +1 -1
  130. package/dist/enums/o-auth-provider.mjs +2 -1
  131. package/dist/enums/o-auth-provider.mjs.map +1 -1
  132. package/dist/enums/order-by.js +1 -1
  133. package/dist/enums/order-by.js.map +1 -1
  134. package/dist/enums/order-by.mjs +1 -1
  135. package/dist/enums/order-by.mjs.map +1 -1
  136. package/dist/enums/password-hash.js +1 -1
  137. package/dist/enums/password-hash.js.map +1 -1
  138. package/dist/enums/password-hash.mjs +1 -1
  139. package/dist/enums/password-hash.mjs.map +1 -1
  140. package/dist/enums/platform-type.d.mts +9 -0
  141. package/dist/enums/platform-type.d.ts +9 -0
  142. package/dist/enums/platform-type.js +14 -0
  143. package/dist/enums/platform-type.js.map +1 -0
  144. package/dist/enums/platform-type.mjs +13 -0
  145. package/dist/enums/platform-type.mjs.map +1 -0
  146. package/dist/enums/protocol-id.d.mts +7 -0
  147. package/dist/enums/protocol-id.d.ts +7 -0
  148. package/dist/enums/protocol-id.js +12 -0
  149. package/dist/enums/protocol-id.js.map +1 -0
  150. package/dist/enums/protocol-id.mjs +11 -0
  151. package/dist/enums/protocol-id.mjs.map +1 -0
  152. package/dist/enums/relation-mutate.js +1 -1
  153. package/dist/enums/relation-mutate.js.map +1 -1
  154. package/dist/enums/relation-mutate.mjs +1 -1
  155. package/dist/enums/relation-mutate.mjs.map +1 -1
  156. package/dist/enums/relationship-type.js +1 -1
  157. package/dist/enums/relationship-type.js.map +1 -1
  158. package/dist/enums/relationship-type.mjs +1 -1
  159. package/dist/enums/relationship-type.mjs.map +1 -1
  160. package/dist/enums/runtime.d.mts +3 -1
  161. package/dist/enums/runtime.d.ts +3 -1
  162. package/dist/enums/runtime.js +3 -1
  163. package/dist/enums/runtime.js.map +1 -1
  164. package/dist/enums/runtime.mjs +3 -1
  165. package/dist/enums/runtime.mjs.map +1 -1
  166. package/dist/enums/scopes.d.mts +4 -0
  167. package/dist/enums/scopes.d.ts +4 -0
  168. package/dist/enums/scopes.js +5 -1
  169. package/dist/enums/scopes.js.map +1 -1
  170. package/dist/enums/scopes.mjs +5 -1
  171. package/dist/enums/scopes.mjs.map +1 -1
  172. package/dist/enums/service-id.d.mts +21 -0
  173. package/dist/enums/service-id.d.ts +21 -0
  174. package/dist/enums/service-id.js +26 -0
  175. package/dist/enums/service-id.js.map +1 -0
  176. package/dist/enums/service-id.mjs +25 -0
  177. package/dist/enums/service-id.mjs.map +1 -0
  178. package/dist/enums/smtp-encryption.js +1 -1
  179. package/dist/enums/smtp-encryption.js.map +1 -1
  180. package/dist/enums/smtp-encryption.mjs +1 -1
  181. package/dist/enums/smtp-encryption.mjs.map +1 -1
  182. package/dist/enums/tables-db-index-type.js +1 -1
  183. package/dist/enums/tables-db-index-type.js.map +1 -1
  184. package/dist/enums/tables-db-index-type.mjs +1 -1
  185. package/dist/enums/tables-db-index-type.mjs.map +1 -1
  186. package/dist/enums/template-reference-type.js +1 -1
  187. package/dist/enums/template-reference-type.js.map +1 -1
  188. package/dist/enums/template-reference-type.mjs +1 -1
  189. package/dist/enums/template-reference-type.mjs.map +1 -1
  190. package/dist/enums/theme.js +1 -1
  191. package/dist/enums/theme.js.map +1 -1
  192. package/dist/enums/theme.mjs +1 -1
  193. package/dist/enums/theme.mjs.map +1 -1
  194. package/dist/enums/timezone.js +1 -1
  195. package/dist/enums/timezone.js.map +1 -1
  196. package/dist/enums/timezone.mjs +1 -1
  197. package/dist/enums/timezone.mjs.map +1 -1
  198. package/dist/enums/vcs-reference-type.js +1 -1
  199. package/dist/enums/vcs-reference-type.js.map +1 -1
  200. package/dist/enums/vcs-reference-type.mjs +1 -1
  201. package/dist/enums/vcs-reference-type.mjs.map +1 -1
  202. package/dist/id.js +1 -1
  203. package/dist/id.js.map +1 -1
  204. package/dist/id.mjs +1 -1
  205. package/dist/id.mjs.map +1 -1
  206. package/dist/index.d.mts +3 -0
  207. package/dist/index.d.ts +3 -0
  208. package/dist/index.js +84 -69
  209. package/dist/index.js.map +1 -1
  210. package/dist/index.mjs +4 -1
  211. package/dist/index.mjs.map +1 -1
  212. package/dist/inputFile.js +1 -1
  213. package/dist/inputFile.js.map +1 -1
  214. package/dist/inputFile.mjs +1 -1
  215. package/dist/inputFile.mjs.map +1 -1
  216. package/dist/models.d.mts +678 -7
  217. package/dist/models.d.ts +678 -7
  218. package/dist/models.js +1 -1
  219. package/dist/models.js.map +1 -1
  220. package/dist/models.mjs +1 -1
  221. package/dist/models.mjs.map +1 -1
  222. package/dist/operator.d.mts +1 -1
  223. package/dist/operator.d.ts +1 -1
  224. package/dist/operator.js +1 -1
  225. package/dist/operator.js.map +1 -1
  226. package/dist/operator.mjs +1 -1
  227. package/dist/operator.mjs.map +1 -1
  228. package/dist/permission.js +1 -1
  229. package/dist/permission.js.map +1 -1
  230. package/dist/permission.mjs +1 -1
  231. package/dist/permission.mjs.map +1 -1
  232. package/dist/query.d.mts +1 -1
  233. package/dist/query.d.ts +1 -1
  234. package/dist/query.js +1 -1
  235. package/dist/query.js.map +1 -1
  236. package/dist/query.mjs +1 -1
  237. package/dist/query.mjs.map +1 -1
  238. package/dist/role.js +1 -1
  239. package/dist/role.js.map +1 -1
  240. package/dist/role.mjs +1 -1
  241. package/dist/role.mjs.map +1 -1
  242. package/dist/services/account.d.mts +3 -2
  243. package/dist/services/account.d.ts +3 -2
  244. package/dist/services/account.js +1 -1
  245. package/dist/services/account.js.map +1 -1
  246. package/dist/services/account.mjs +1 -1
  247. package/dist/services/account.mjs.map +1 -1
  248. package/dist/services/activities.d.mts +1 -0
  249. package/dist/services/activities.d.ts +1 -0
  250. package/dist/services/activities.js +1 -1
  251. package/dist/services/activities.js.map +1 -1
  252. package/dist/services/activities.mjs +1 -1
  253. package/dist/services/activities.mjs.map +1 -1
  254. package/dist/services/avatars.d.mts +1 -0
  255. package/dist/services/avatars.d.ts +1 -0
  256. package/dist/services/avatars.js +1 -1
  257. package/dist/services/avatars.js.map +1 -1
  258. package/dist/services/avatars.mjs +1 -1
  259. package/dist/services/avatars.mjs.map +1 -1
  260. package/dist/services/backups.d.mts +1 -0
  261. package/dist/services/backups.d.ts +1 -0
  262. package/dist/services/backups.js +1 -1
  263. package/dist/services/backups.js.map +1 -1
  264. package/dist/services/backups.mjs +1 -1
  265. package/dist/services/backups.mjs.map +1 -1
  266. package/dist/services/databases.d.mts +7 -3
  267. package/dist/services/databases.d.ts +7 -3
  268. package/dist/services/databases.js +7 -2
  269. package/dist/services/databases.js.map +1 -1
  270. package/dist/services/databases.mjs +7 -2
  271. package/dist/services/databases.mjs.map +1 -1
  272. package/dist/services/functions.d.mts +1 -0
  273. package/dist/services/functions.d.ts +1 -0
  274. package/dist/services/functions.js +1 -1
  275. package/dist/services/functions.js.map +1 -1
  276. package/dist/services/functions.mjs +1 -1
  277. package/dist/services/functions.mjs.map +1 -1
  278. package/dist/services/graphql.d.mts +1 -0
  279. package/dist/services/graphql.d.ts +1 -0
  280. package/dist/services/graphql.js +1 -1
  281. package/dist/services/graphql.js.map +1 -1
  282. package/dist/services/graphql.mjs +1 -1
  283. package/dist/services/graphql.mjs.map +1 -1
  284. package/dist/services/health.d.mts +3 -0
  285. package/dist/services/health.d.ts +3 -0
  286. package/dist/services/health.js +1 -1
  287. package/dist/services/health.js.map +1 -1
  288. package/dist/services/health.mjs +1 -1
  289. package/dist/services/health.mjs.map +1 -1
  290. package/dist/services/locale.d.mts +1 -0
  291. package/dist/services/locale.d.ts +1 -0
  292. package/dist/services/locale.js +1 -1
  293. package/dist/services/locale.js.map +1 -1
  294. package/dist/services/locale.mjs +1 -1
  295. package/dist/services/locale.mjs.map +1 -1
  296. package/dist/services/messaging.d.mts +1 -0
  297. package/dist/services/messaging.d.ts +1 -0
  298. package/dist/services/messaging.js +1 -1
  299. package/dist/services/messaging.js.map +1 -1
  300. package/dist/services/messaging.mjs +1 -1
  301. package/dist/services/messaging.mjs.map +1 -1
  302. package/dist/services/project.d.mts +493 -0
  303. package/dist/services/project.d.ts +493 -0
  304. package/dist/services/project.js +788 -1
  305. package/dist/services/project.js.map +1 -1
  306. package/dist/services/project.mjs +788 -1
  307. package/dist/services/project.mjs.map +1 -1
  308. package/dist/services/sites.d.mts +1 -0
  309. package/dist/services/sites.d.ts +1 -0
  310. package/dist/services/sites.js +1 -1
  311. package/dist/services/sites.js.map +1 -1
  312. package/dist/services/sites.mjs +1 -1
  313. package/dist/services/sites.mjs.map +1 -1
  314. package/dist/services/storage.d.mts +1 -0
  315. package/dist/services/storage.d.ts +1 -0
  316. package/dist/services/storage.js +1 -1
  317. package/dist/services/storage.js.map +1 -1
  318. package/dist/services/storage.mjs +1 -1
  319. package/dist/services/storage.mjs.map +1 -1
  320. package/dist/services/tables-db.d.mts +7 -3
  321. package/dist/services/tables-db.d.ts +7 -3
  322. package/dist/services/tables-db.js +7 -2
  323. package/dist/services/tables-db.js.map +1 -1
  324. package/dist/services/tables-db.mjs +7 -2
  325. package/dist/services/tables-db.mjs.map +1 -1
  326. package/dist/services/teams.d.mts +1 -0
  327. package/dist/services/teams.d.ts +1 -0
  328. package/dist/services/teams.js +1 -1
  329. package/dist/services/teams.js.map +1 -1
  330. package/dist/services/teams.mjs +1 -1
  331. package/dist/services/teams.mjs.map +1 -1
  332. package/dist/services/tokens.d.mts +1 -0
  333. package/dist/services/tokens.d.ts +1 -0
  334. package/dist/services/tokens.js +1 -1
  335. package/dist/services/tokens.js.map +1 -1
  336. package/dist/services/tokens.mjs +1 -1
  337. package/dist/services/tokens.mjs.map +1 -1
  338. package/dist/services/users.d.mts +1 -0
  339. package/dist/services/users.d.ts +1 -0
  340. package/dist/services/users.js +1 -1
  341. package/dist/services/users.js.map +1 -1
  342. package/dist/services/users.mjs +1 -1
  343. package/dist/services/users.mjs.map +1 -1
  344. package/dist/services/webhooks.d.mts +33 -26
  345. package/dist/services/webhooks.d.ts +33 -26
  346. package/dist/services/webhooks.js +38 -28
  347. package/dist/services/webhooks.js.map +1 -1
  348. package/dist/services/webhooks.mjs +38 -28
  349. package/dist/services/webhooks.mjs.map +1 -1
  350. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/services/storage.ts"],"names":[],"mappings":";AAAA,SAAS,yBAA+D;AAOjE,IAAM,UAAN,MAAc;AAAA,EAGjB,YAAY,QAAgB;AACxB,SAAK,SAAS;AAAA,EAClB;AAAA,EAuBA,YACI,kBACG,MACuB;AAC1B,QAAI;AAEJ,QAAI,CAAC,iBAAkB,iBAAiB,OAAO,kBAAkB,YAAY,CAAC,MAAM,QAAQ,aAAa,GAAI;AACzG,eAAU,iBAAiB,CAAC;AAAA,IAChC,OAAO;AACH,eAAS;AAAA,QACL,SAAS;AAAA,QACT,QAAQ,KAAK,CAAC;AAAA,QACd,OAAO,KAAK,CAAC;AAAA,MACjB;AAAA,IACJ;AAEA,UAAM,UAAU,OAAO;AACvB,UAAM,SAAS,OAAO;AACtB,UAAM,QAAQ,OAAO;AAGrB,UAAM,UAAU;AAChB,UAAM,UAAmB,CAAC;AAC1B,QAAI,OAAO,YAAY,aAAa;AAChC,cAAQ,SAAS,IAAI;AAAA,IACzB;AACA,QAAI,OAAO,WAAW,aAAa;AAC/B,cAAQ,QAAQ,IAAI;AAAA,IACxB;AACA,QAAI,OAAO,UAAU,aAAa;AAC9B,cAAQ,OAAO,IAAI;AAAA,IACvB;AACA,UAAM,MAAM,IAAI,IAAI,KAAK,OAAO,OAAO,WAAW,OAAO;AAEzD,UAAM,aAA2C,CACjD;AAEA,WAAO,KAAK,OAAO;AAAA,MACf;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACJ;AAAA,EACJ;AAAA,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client';\nimport type { Models } from '../models';\n\nimport { Compression } from '../enums/compression';\nimport { ImageGravity } from '../enums/image-gravity';\nimport { ImageFormat } from '../enums/image-format';\n\nexport class Storage {\n client: Client;\n\n constructor(client: Client) {\n this.client = client;\n }\n\n /**\n * Get a list of all the storage buckets. You can use the query params to filter your results.\n *\n * @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: enabled, name, fileSecurity, maximumFileSize, encryption, antivirus, transformations\n * @param {string} params.search - Search term to filter your list results. Max length: 256 chars.\n * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.\n * @throws {AppwriteException}\n * @returns {Promise<Models.BucketList>}\n */\n listBuckets(params?: { queries?: string[], search?: string, total?: boolean }): Promise<Models.BucketList>;\n /**\n * Get a list of all the storage buckets. You can use the query params to filter your results.\n *\n * @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: enabled, name, fileSecurity, maximumFileSize, encryption, antivirus, transformations\n * @param {string} search - Search term to filter your list results. Max length: 256 chars.\n * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.\n * @throws {AppwriteException}\n * @returns {Promise<Models.BucketList>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n listBuckets(queries?: string[], search?: string, total?: boolean): Promise<Models.BucketList>;\n listBuckets(\n paramsOrFirst?: { queries?: string[], search?: string, total?: boolean } | string[],\n ...rest: [(string)?, (boolean)?] \n ): Promise<Models.BucketList> {\n let params: { queries?: string[], search?: string, total?: boolean };\n \n if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { queries?: string[], search?: string, total?: boolean };\n } else {\n params = {\n queries: paramsOrFirst as string[],\n search: rest[0] as string,\n total: rest[1] as boolean \n };\n }\n \n const queries = params.queries;\n const search = params.search;\n const total = params.total;\n\n\n const apiPath = '/storage/buckets';\n const payload: Payload = {};\n if (typeof queries !== 'undefined') {\n payload['queries'] = queries;\n }\n if (typeof search !== 'undefined') {\n payload['search'] = search;\n }\n if (typeof total !== 'undefined') {\n payload['total'] = total;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Create a new storage bucket.\n *\n * @param {string} params.bucketId - Unique 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.\n * @param {string} params.name - Bucket name\n * @param {string[]} params.permissions - An array of permission strings. By default, no user is granted with any permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).\n * @param {boolean} params.fileSecurity - Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](https://appwrite.io/docs/permissions).\n * @param {boolean} params.enabled - Is bucket enabled? When set to 'disabled', users cannot access the files in this bucket but Server SDKs with and API key can still access the bucket. No files are lost when this is toggled.\n * @param {number} params.maximumFileSize - Maximum file size allowed in bytes. Maximum allowed value is 5GB.\n * @param {string[]} params.allowedFileExtensions - Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.\n * @param {Compression} params.compression - Compression algorithm chosen for compression. Can be one of none, [gzip](https://en.wikipedia.org/wiki/Gzip), or [zstd](https://en.wikipedia.org/wiki/Zstd), For file size above 20MB compression is skipped even if it's enabled\n * @param {boolean} params.encryption - Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled\n * @param {boolean} params.antivirus - Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled\n * @param {boolean} params.transformations - Are image transformations enabled?\n * @throws {AppwriteException}\n * @returns {Promise<Models.Bucket>}\n */\n createBucket(params: { bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number, allowedFileExtensions?: string[], compression?: Compression, encryption?: boolean, antivirus?: boolean, transformations?: boolean }): Promise<Models.Bucket>;\n /**\n * Create a new storage bucket.\n *\n * @param {string} bucketId - Unique 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.\n * @param {string} name - Bucket name\n * @param {string[]} permissions - An array of permission strings. By default, no user is granted with any permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).\n * @param {boolean} fileSecurity - Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](https://appwrite.io/docs/permissions).\n * @param {boolean} enabled - Is bucket enabled? When set to 'disabled', users cannot access the files in this bucket but Server SDKs with and API key can still access the bucket. No files are lost when this is toggled.\n * @param {number} maximumFileSize - Maximum file size allowed in bytes. Maximum allowed value is 5GB.\n * @param {string[]} allowedFileExtensions - Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.\n * @param {Compression} compression - Compression algorithm chosen for compression. Can be one of none, [gzip](https://en.wikipedia.org/wiki/Gzip), or [zstd](https://en.wikipedia.org/wiki/Zstd), For file size above 20MB compression is skipped even if it's enabled\n * @param {boolean} encryption - Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled\n * @param {boolean} antivirus - Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled\n * @param {boolean} transformations - Are image transformations enabled?\n * @throws {AppwriteException}\n * @returns {Promise<Models.Bucket>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n createBucket(bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number, allowedFileExtensions?: string[], compression?: Compression, encryption?: boolean, antivirus?: boolean, transformations?: boolean): Promise<Models.Bucket>;\n createBucket(\n paramsOrFirst: { bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number, allowedFileExtensions?: string[], compression?: Compression, encryption?: boolean, antivirus?: boolean, transformations?: boolean } | string,\n ...rest: [(string)?, (string[])?, (boolean)?, (boolean)?, (number)?, (string[])?, (Compression)?, (boolean)?, (boolean)?, (boolean)?] \n ): Promise<Models.Bucket> {\n let params: { bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number, allowedFileExtensions?: string[], compression?: Compression, encryption?: boolean, antivirus?: boolean, transformations?: boolean };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number, allowedFileExtensions?: string[], compression?: Compression, encryption?: boolean, antivirus?: boolean, transformations?: boolean };\n } else {\n params = {\n bucketId: paramsOrFirst as string,\n name: rest[0] as string,\n permissions: rest[1] as string[],\n fileSecurity: rest[2] as boolean,\n enabled: rest[3] as boolean,\n maximumFileSize: rest[4] as number,\n allowedFileExtensions: rest[5] as string[],\n compression: rest[6] as Compression,\n encryption: rest[7] as boolean,\n antivirus: rest[8] as boolean,\n transformations: rest[9] as boolean \n };\n }\n \n const bucketId = params.bucketId;\n const name = params.name;\n const permissions = params.permissions;\n const fileSecurity = params.fileSecurity;\n const enabled = params.enabled;\n const maximumFileSize = params.maximumFileSize;\n const allowedFileExtensions = params.allowedFileExtensions;\n const compression = params.compression;\n const encryption = params.encryption;\n const antivirus = params.antivirus;\n const transformations = params.transformations;\n\n if (typeof bucketId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"bucketId\"');\n }\n if (typeof name === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"name\"');\n }\n\n const apiPath = '/storage/buckets';\n const payload: Payload = {};\n if (typeof bucketId !== 'undefined') {\n payload['bucketId'] = bucketId;\n }\n if (typeof name !== 'undefined') {\n payload['name'] = name;\n }\n if (typeof permissions !== 'undefined') {\n payload['permissions'] = permissions;\n }\n if (typeof fileSecurity !== 'undefined') {\n payload['fileSecurity'] = fileSecurity;\n }\n if (typeof enabled !== 'undefined') {\n payload['enabled'] = enabled;\n }\n if (typeof maximumFileSize !== 'undefined') {\n payload['maximumFileSize'] = maximumFileSize;\n }\n if (typeof allowedFileExtensions !== 'undefined') {\n payload['allowedFileExtensions'] = allowedFileExtensions;\n }\n if (typeof compression !== 'undefined') {\n payload['compression'] = compression;\n }\n if (typeof encryption !== 'undefined') {\n payload['encryption'] = encryption;\n }\n if (typeof antivirus !== 'undefined') {\n payload['antivirus'] = antivirus;\n }\n if (typeof transformations !== 'undefined') {\n payload['transformations'] = transformations;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'post',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Get a storage bucket by its unique ID. This endpoint response returns a JSON object with the storage bucket metadata.\n *\n * @param {string} params.bucketId - Bucket unique ID.\n * @throws {AppwriteException}\n * @returns {Promise<Models.Bucket>}\n */\n getBucket(params: { bucketId: string }): Promise<Models.Bucket>;\n /**\n * Get a storage bucket by its unique ID. This endpoint response returns a JSON object with the storage bucket metadata.\n *\n * @param {string} bucketId - Bucket unique ID.\n * @throws {AppwriteException}\n * @returns {Promise<Models.Bucket>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getBucket(bucketId: string): Promise<Models.Bucket>;\n getBucket(\n paramsOrFirst: { bucketId: string } | string \n ): Promise<Models.Bucket> {\n let params: { bucketId: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { bucketId: string };\n } else {\n params = {\n bucketId: paramsOrFirst as string \n };\n }\n \n const bucketId = params.bucketId;\n\n if (typeof bucketId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"bucketId\"');\n }\n\n const apiPath = '/storage/buckets/{bucketId}'.replace('{bucketId}', bucketId);\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Update a storage bucket by its unique ID.\n *\n * @param {string} params.bucketId - Bucket unique ID.\n * @param {string} params.name - Bucket name\n * @param {string[]} params.permissions - An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).\n * @param {boolean} params.fileSecurity - Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](https://appwrite.io/docs/permissions).\n * @param {boolean} params.enabled - Is bucket enabled? When set to 'disabled', users cannot access the files in this bucket but Server SDKs with and API key can still access the bucket. No files are lost when this is toggled.\n * @param {number} params.maximumFileSize - Maximum file size allowed in bytes. Maximum allowed value is 5GB.\n * @param {string[]} params.allowedFileExtensions - Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.\n * @param {Compression} params.compression - Compression algorithm chosen for compression. Can be one of none, [gzip](https://en.wikipedia.org/wiki/Gzip), or [zstd](https://en.wikipedia.org/wiki/Zstd), For file size above 20MB compression is skipped even if it's enabled\n * @param {boolean} params.encryption - Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled\n * @param {boolean} params.antivirus - Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled\n * @param {boolean} params.transformations - Are image transformations enabled?\n * @throws {AppwriteException}\n * @returns {Promise<Models.Bucket>}\n */\n updateBucket(params: { bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number, allowedFileExtensions?: string[], compression?: Compression, encryption?: boolean, antivirus?: boolean, transformations?: boolean }): Promise<Models.Bucket>;\n /**\n * Update a storage bucket by its unique ID.\n *\n * @param {string} bucketId - Bucket unique ID.\n * @param {string} name - Bucket name\n * @param {string[]} permissions - An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).\n * @param {boolean} fileSecurity - Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](https://appwrite.io/docs/permissions).\n * @param {boolean} enabled - Is bucket enabled? When set to 'disabled', users cannot access the files in this bucket but Server SDKs with and API key can still access the bucket. No files are lost when this is toggled.\n * @param {number} maximumFileSize - Maximum file size allowed in bytes. Maximum allowed value is 5GB.\n * @param {string[]} allowedFileExtensions - Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.\n * @param {Compression} compression - Compression algorithm chosen for compression. Can be one of none, [gzip](https://en.wikipedia.org/wiki/Gzip), or [zstd](https://en.wikipedia.org/wiki/Zstd), For file size above 20MB compression is skipped even if it's enabled\n * @param {boolean} encryption - Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled\n * @param {boolean} antivirus - Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled\n * @param {boolean} transformations - Are image transformations enabled?\n * @throws {AppwriteException}\n * @returns {Promise<Models.Bucket>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n updateBucket(bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number, allowedFileExtensions?: string[], compression?: Compression, encryption?: boolean, antivirus?: boolean, transformations?: boolean): Promise<Models.Bucket>;\n updateBucket(\n paramsOrFirst: { bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number, allowedFileExtensions?: string[], compression?: Compression, encryption?: boolean, antivirus?: boolean, transformations?: boolean } | string,\n ...rest: [(string)?, (string[])?, (boolean)?, (boolean)?, (number)?, (string[])?, (Compression)?, (boolean)?, (boolean)?, (boolean)?] \n ): Promise<Models.Bucket> {\n let params: { bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number, allowedFileExtensions?: string[], compression?: Compression, encryption?: boolean, antivirus?: boolean, transformations?: boolean };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number, allowedFileExtensions?: string[], compression?: Compression, encryption?: boolean, antivirus?: boolean, transformations?: boolean };\n } else {\n params = {\n bucketId: paramsOrFirst as string,\n name: rest[0] as string,\n permissions: rest[1] as string[],\n fileSecurity: rest[2] as boolean,\n enabled: rest[3] as boolean,\n maximumFileSize: rest[4] as number,\n allowedFileExtensions: rest[5] as string[],\n compression: rest[6] as Compression,\n encryption: rest[7] as boolean,\n antivirus: rest[8] as boolean,\n transformations: rest[9] as boolean \n };\n }\n \n const bucketId = params.bucketId;\n const name = params.name;\n const permissions = params.permissions;\n const fileSecurity = params.fileSecurity;\n const enabled = params.enabled;\n const maximumFileSize = params.maximumFileSize;\n const allowedFileExtensions = params.allowedFileExtensions;\n const compression = params.compression;\n const encryption = params.encryption;\n const antivirus = params.antivirus;\n const transformations = params.transformations;\n\n if (typeof bucketId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"bucketId\"');\n }\n if (typeof name === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"name\"');\n }\n\n const apiPath = '/storage/buckets/{bucketId}'.replace('{bucketId}', bucketId);\n const payload: Payload = {};\n if (typeof name !== 'undefined') {\n payload['name'] = name;\n }\n if (typeof permissions !== 'undefined') {\n payload['permissions'] = permissions;\n }\n if (typeof fileSecurity !== 'undefined') {\n payload['fileSecurity'] = fileSecurity;\n }\n if (typeof enabled !== 'undefined') {\n payload['enabled'] = enabled;\n }\n if (typeof maximumFileSize !== 'undefined') {\n payload['maximumFileSize'] = maximumFileSize;\n }\n if (typeof allowedFileExtensions !== 'undefined') {\n payload['allowedFileExtensions'] = allowedFileExtensions;\n }\n if (typeof compression !== 'undefined') {\n payload['compression'] = compression;\n }\n if (typeof encryption !== 'undefined') {\n payload['encryption'] = encryption;\n }\n if (typeof antivirus !== 'undefined') {\n payload['antivirus'] = antivirus;\n }\n if (typeof transformations !== 'undefined') {\n payload['transformations'] = transformations;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'put',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Delete a storage bucket by its unique ID.\n *\n * @param {string} params.bucketId - Bucket unique ID.\n * @throws {AppwriteException}\n * @returns {Promise<{}>}\n */\n deleteBucket(params: { bucketId: string }): Promise<{}>;\n /**\n * Delete a storage bucket by its unique ID.\n *\n * @param {string} bucketId - Bucket unique ID.\n * @throws {AppwriteException}\n * @returns {Promise<{}>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n deleteBucket(bucketId: string): Promise<{}>;\n deleteBucket(\n paramsOrFirst: { bucketId: string } | string \n ): Promise<{}> {\n let params: { bucketId: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { bucketId: string };\n } else {\n params = {\n bucketId: paramsOrFirst as string \n };\n }\n \n const bucketId = params.bucketId;\n\n if (typeof bucketId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"bucketId\"');\n }\n\n const apiPath = '/storage/buckets/{bucketId}'.replace('{bucketId}', bucketId);\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'delete',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Get a list of all the user files. You can use the query params to filter your results.\n *\n * @param {string} params.bucketId - Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).\n * @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, signature, mimeType, sizeOriginal, chunksTotal, chunksUploaded\n * @param {string} params.search - Search term to filter your list results. Max length: 256 chars.\n * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.\n * @throws {AppwriteException}\n * @returns {Promise<Models.FileList>}\n */\n listFiles(params: { bucketId: string, queries?: string[], search?: string, total?: boolean }): Promise<Models.FileList>;\n /**\n * Get a list of all the user files. You can use the query params to filter your results.\n *\n * @param {string} bucketId - Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).\n * @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, signature, mimeType, sizeOriginal, chunksTotal, chunksUploaded\n * @param {string} search - Search term to filter your list results. Max length: 256 chars.\n * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.\n * @throws {AppwriteException}\n * @returns {Promise<Models.FileList>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n listFiles(bucketId: string, queries?: string[], search?: string, total?: boolean): Promise<Models.FileList>;\n listFiles(\n paramsOrFirst: { bucketId: string, queries?: string[], search?: string, total?: boolean } | string,\n ...rest: [(string[])?, (string)?, (boolean)?] \n ): Promise<Models.FileList> {\n let params: { bucketId: string, queries?: string[], search?: string, total?: boolean };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { bucketId: string, queries?: string[], search?: string, total?: boolean };\n } else {\n params = {\n bucketId: paramsOrFirst as string,\n queries: rest[0] as string[],\n search: rest[1] as string,\n total: rest[2] as boolean \n };\n }\n \n const bucketId = params.bucketId;\n const queries = params.queries;\n const search = params.search;\n const total = params.total;\n\n if (typeof bucketId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"bucketId\"');\n }\n\n const apiPath = '/storage/buckets/{bucketId}/files'.replace('{bucketId}', bucketId);\n const payload: Payload = {};\n if (typeof queries !== 'undefined') {\n payload['queries'] = queries;\n }\n if (typeof search !== 'undefined') {\n payload['search'] = search;\n }\n if (typeof total !== 'undefined') {\n payload['total'] = total;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Create a new file. Before using this route, you should create a new bucket resource using either a [server integration](https://appwrite.io/docs/server/storage#storageCreateBucket) API or directly from your Appwrite console.\n * \n * Larger files should be uploaded using multiple requests with the [content-range](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Range) header to send a partial request with a maximum supported chunk of `5MB`. The `content-range` header values should always be in bytes.\n * \n * When the first request is sent, the server will return the **File** object, and the subsequent part request must include the file's **id** in `x-appwrite-id` header to allow the server to know that the partial upload is for the existing file and not for a new one.\n * \n * If you're creating a new file using one of the Appwrite SDKs, all the chunking logic will be managed by the SDK internally.\n * \n *\n * @param {string} params.bucketId - Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).\n * @param {string} params.fileId - File 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.\n * @param {File} params.file - Binary file. Appwrite SDKs provide helpers to handle file input. [Learn about file input](https://appwrite.io/docs/products/storage/upload-download#input-file).\n * @param {string[]} params.permissions - An array of permission strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).\n * @throws {AppwriteException}\n * @returns {Promise<Models.File>}\n */\n createFile(params: { bucketId: string, fileId: string, file: File, permissions?: string[], onProgress?: (progress: UploadProgress) => void }): Promise<Models.File>;\n /**\n * Create a new file. Before using this route, you should create a new bucket resource using either a [server integration](https://appwrite.io/docs/server/storage#storageCreateBucket) API or directly from your Appwrite console.\n * \n * Larger files should be uploaded using multiple requests with the [content-range](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Range) header to send a partial request with a maximum supported chunk of `5MB`. The `content-range` header values should always be in bytes.\n * \n * When the first request is sent, the server will return the **File** object, and the subsequent part request must include the file's **id** in `x-appwrite-id` header to allow the server to know that the partial upload is for the existing file and not for a new one.\n * \n * If you're creating a new file using one of the Appwrite SDKs, all the chunking logic will be managed by the SDK internally.\n * \n *\n * @param {string} bucketId - Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).\n * @param {string} fileId - File 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.\n * @param {File} file - Binary file. Appwrite SDKs provide helpers to handle file input. [Learn about file input](https://appwrite.io/docs/products/storage/upload-download#input-file).\n * @param {string[]} permissions - An array of permission strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).\n * @throws {AppwriteException}\n * @returns {Promise<Models.File>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n createFile(bucketId: string, fileId: string, file: File, permissions?: string[], onProgress?: (progress: UploadProgress) => void): Promise<Models.File>;\n createFile(\n paramsOrFirst: { bucketId: string, fileId: string, file: File, permissions?: string[], onProgress?: (progress: UploadProgress) => void } | string,\n ...rest: [(string)?, (File)?, (string[])?,((progress: UploadProgress) => void)?] \n ): Promise<Models.File> {\n let params: { bucketId: string, fileId: string, file: File, permissions?: string[] };\n let onProgress: ((progress: UploadProgress) => void);\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { bucketId: string, fileId: string, file: File, permissions?: string[] };\n onProgress = paramsOrFirst?.onProgress as ((progress: UploadProgress) => void);\n } else {\n params = {\n bucketId: paramsOrFirst as string,\n fileId: rest[0] as string,\n file: rest[1] as File,\n permissions: rest[2] as string[] \n };\n onProgress = rest[3] as ((progress: UploadProgress) => void);\n }\n \n const bucketId = params.bucketId;\n const fileId = params.fileId;\n const file = params.file;\n const permissions = params.permissions;\n\n if (typeof bucketId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"bucketId\"');\n }\n if (typeof fileId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"fileId\"');\n }\n if (typeof file === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"file\"');\n }\n\n const apiPath = '/storage/buckets/{bucketId}/files'.replace('{bucketId}', bucketId);\n const payload: Payload = {};\n if (typeof fileId !== 'undefined') {\n payload['fileId'] = fileId;\n }\n if (typeof file !== 'undefined') {\n payload['file'] = file;\n }\n if (typeof permissions !== 'undefined') {\n payload['permissions'] = permissions;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'multipart/form-data',\n }\n\n return this.client.chunkedUpload(\n 'post',\n uri,\n apiHeaders,\n payload,\n onProgress\n );\n }\n\n /**\n * Get a file by its unique ID. This endpoint response returns a JSON object with the file metadata.\n *\n * @param {string} params.bucketId - Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).\n * @param {string} params.fileId - File ID.\n * @throws {AppwriteException}\n * @returns {Promise<Models.File>}\n */\n getFile(params: { bucketId: string, fileId: string }): Promise<Models.File>;\n /**\n * Get a file by its unique ID. This endpoint response returns a JSON object with the file metadata.\n *\n * @param {string} bucketId - Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).\n * @param {string} fileId - File ID.\n * @throws {AppwriteException}\n * @returns {Promise<Models.File>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getFile(bucketId: string, fileId: string): Promise<Models.File>;\n getFile(\n paramsOrFirst: { bucketId: string, fileId: string } | string,\n ...rest: [(string)?] \n ): Promise<Models.File> {\n let params: { bucketId: string, fileId: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { bucketId: string, fileId: string };\n } else {\n params = {\n bucketId: paramsOrFirst as string,\n fileId: rest[0] as string \n };\n }\n \n const bucketId = params.bucketId;\n const fileId = params.fileId;\n\n if (typeof bucketId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"bucketId\"');\n }\n if (typeof fileId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"fileId\"');\n }\n\n const apiPath = '/storage/buckets/{bucketId}/files/{fileId}'.replace('{bucketId}', bucketId).replace('{fileId}', fileId);\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Update a file by its unique ID. Only users with write permissions have access to update this resource.\n *\n * @param {string} params.bucketId - Bucket unique ID.\n * @param {string} params.fileId - File ID.\n * @param {string} params.name - File name.\n * @param {string[]} params.permissions - An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).\n * @throws {AppwriteException}\n * @returns {Promise<Models.File>}\n */\n updateFile(params: { bucketId: string, fileId: string, name?: string, permissions?: string[] }): Promise<Models.File>;\n /**\n * Update a file by its unique ID. Only users with write permissions have access to update this resource.\n *\n * @param {string} bucketId - Bucket unique ID.\n * @param {string} fileId - File ID.\n * @param {string} name - File name.\n * @param {string[]} permissions - An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).\n * @throws {AppwriteException}\n * @returns {Promise<Models.File>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n updateFile(bucketId: string, fileId: string, name?: string, permissions?: string[]): Promise<Models.File>;\n updateFile(\n paramsOrFirst: { bucketId: string, fileId: string, name?: string, permissions?: string[] } | string,\n ...rest: [(string)?, (string)?, (string[])?] \n ): Promise<Models.File> {\n let params: { bucketId: string, fileId: string, name?: string, permissions?: string[] };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { bucketId: string, fileId: string, name?: string, permissions?: string[] };\n } else {\n params = {\n bucketId: paramsOrFirst as string,\n fileId: rest[0] as string,\n name: rest[1] as string,\n permissions: rest[2] as string[] \n };\n }\n \n const bucketId = params.bucketId;\n const fileId = params.fileId;\n const name = params.name;\n const permissions = params.permissions;\n\n if (typeof bucketId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"bucketId\"');\n }\n if (typeof fileId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"fileId\"');\n }\n\n const apiPath = '/storage/buckets/{bucketId}/files/{fileId}'.replace('{bucketId}', bucketId).replace('{fileId}', fileId);\n const payload: Payload = {};\n if (typeof name !== 'undefined') {\n payload['name'] = name;\n }\n if (typeof permissions !== 'undefined') {\n payload['permissions'] = permissions;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'put',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Delete a file by its unique ID. Only users with write permissions have access to delete this resource.\n *\n * @param {string} params.bucketId - Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).\n * @param {string} params.fileId - File ID.\n * @throws {AppwriteException}\n * @returns {Promise<{}>}\n */\n deleteFile(params: { bucketId: string, fileId: string }): Promise<{}>;\n /**\n * Delete a file by its unique ID. Only users with write permissions have access to delete this resource.\n *\n * @param {string} bucketId - Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).\n * @param {string} fileId - File ID.\n * @throws {AppwriteException}\n * @returns {Promise<{}>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n deleteFile(bucketId: string, fileId: string): Promise<{}>;\n deleteFile(\n paramsOrFirst: { bucketId: string, fileId: string } | string,\n ...rest: [(string)?] \n ): Promise<{}> {\n let params: { bucketId: string, fileId: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { bucketId: string, fileId: string };\n } else {\n params = {\n bucketId: paramsOrFirst as string,\n fileId: rest[0] as string \n };\n }\n \n const bucketId = params.bucketId;\n const fileId = params.fileId;\n\n if (typeof bucketId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"bucketId\"');\n }\n if (typeof fileId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"fileId\"');\n }\n\n const apiPath = '/storage/buckets/{bucketId}/files/{fileId}'.replace('{bucketId}', bucketId).replace('{fileId}', fileId);\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'delete',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Get a file 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.\n *\n * @param {string} params.bucketId - Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).\n * @param {string} params.fileId - File ID.\n * @param {string} params.token - File token for accessing this file.\n * @throws {AppwriteException}\n * @returns {Promise<ArrayBuffer>}\n */\n getFileDownload(params: { bucketId: string, fileId: string, token?: string }): Promise<ArrayBuffer>;\n /**\n * Get a file 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.\n *\n * @param {string} bucketId - Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).\n * @param {string} fileId - File ID.\n * @param {string} token - File token for accessing this file.\n * @throws {AppwriteException}\n * @returns {Promise<ArrayBuffer>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getFileDownload(bucketId: string, fileId: string, token?: string): Promise<ArrayBuffer>;\n getFileDownload(\n paramsOrFirst: { bucketId: string, fileId: string, token?: string } | string,\n ...rest: [(string)?, (string)?] \n ): Promise<ArrayBuffer> {\n let params: { bucketId: string, fileId: string, token?: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { bucketId: string, fileId: string, token?: string };\n } else {\n params = {\n bucketId: paramsOrFirst as string,\n fileId: rest[0] as string,\n token: rest[1] as string \n };\n }\n \n const bucketId = params.bucketId;\n const fileId = params.fileId;\n const token = params.token;\n\n if (typeof bucketId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"bucketId\"');\n }\n if (typeof fileId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"fileId\"');\n }\n\n const apiPath = '/storage/buckets/{bucketId}/files/{fileId}/download'.replace('{bucketId}', bucketId).replace('{fileId}', fileId);\n const payload: Payload = {};\n if (typeof token !== 'undefined') {\n payload['token'] = token;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n 'arrayBuffer'\n );\n }\n\n /**\n * Get a file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets, will return the file icon image. You can also pass query string arguments for cutting and resizing your preview image. Preview is supported only for image files smaller than 10MB.\n *\n * @param {string} params.bucketId - Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).\n * @param {string} params.fileId - File ID\n * @param {number} params.width - Resize preview image width, Pass an integer between 0 to 4000.\n * @param {number} params.height - Resize preview image height, Pass an integer between 0 to 4000.\n * @param {ImageGravity} params.gravity - Image crop gravity. Can be one of center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right\n * @param {number} params.quality - Preview image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.\n * @param {number} params.borderWidth - Preview image border in pixels. Pass an integer between 0 to 100. Defaults to 0.\n * @param {string} params.borderColor - Preview image border color. Use a valid HEX color, no # is needed for prefix.\n * @param {number} params.borderRadius - Preview image border radius in pixels. Pass an integer between 0 to 4000.\n * @param {number} params.opacity - Preview image opacity. Only works with images having an alpha channel (like png). Pass a number between 0 to 1.\n * @param {number} params.rotation - Preview image rotation in degrees. Pass an integer between -360 and 360.\n * @param {string} params.background - Preview image background color. Only works with transparent images (png). Use a valid HEX color, no # is needed for prefix.\n * @param {ImageFormat} params.output - Output format type (jpeg, jpg, png, gif and webp).\n * @param {string} params.token - File token for accessing this file.\n * @throws {AppwriteException}\n * @returns {Promise<ArrayBuffer>}\n */\n getFilePreview(params: { bucketId: string, fileId: string, width?: number, height?: number, gravity?: ImageGravity, quality?: number, borderWidth?: number, borderColor?: string, borderRadius?: number, opacity?: number, rotation?: number, background?: string, output?: ImageFormat, token?: string }): Promise<ArrayBuffer>;\n /**\n * Get a file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets, will return the file icon image. You can also pass query string arguments for cutting and resizing your preview image. Preview is supported only for image files smaller than 10MB.\n *\n * @param {string} bucketId - Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).\n * @param {string} fileId - File ID\n * @param {number} width - Resize preview image width, Pass an integer between 0 to 4000.\n * @param {number} height - Resize preview image height, Pass an integer between 0 to 4000.\n * @param {ImageGravity} gravity - Image crop gravity. Can be one of center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right\n * @param {number} quality - Preview image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.\n * @param {number} borderWidth - Preview image border in pixels. Pass an integer between 0 to 100. Defaults to 0.\n * @param {string} borderColor - Preview image border color. Use a valid HEX color, no # is needed for prefix.\n * @param {number} borderRadius - Preview image border radius in pixels. Pass an integer between 0 to 4000.\n * @param {number} opacity - Preview image opacity. Only works with images having an alpha channel (like png). Pass a number between 0 to 1.\n * @param {number} rotation - Preview image rotation in degrees. Pass an integer between -360 and 360.\n * @param {string} background - Preview image background color. Only works with transparent images (png). Use a valid HEX color, no # is needed for prefix.\n * @param {ImageFormat} output - Output format type (jpeg, jpg, png, gif and webp).\n * @param {string} token - File token for accessing this file.\n * @throws {AppwriteException}\n * @returns {Promise<ArrayBuffer>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getFilePreview(bucketId: string, fileId: string, width?: number, height?: number, gravity?: ImageGravity, quality?: number, borderWidth?: number, borderColor?: string, borderRadius?: number, opacity?: number, rotation?: number, background?: string, output?: ImageFormat, token?: string): Promise<ArrayBuffer>;\n getFilePreview(\n paramsOrFirst: { bucketId: string, fileId: string, width?: number, height?: number, gravity?: ImageGravity, quality?: number, borderWidth?: number, borderColor?: string, borderRadius?: number, opacity?: number, rotation?: number, background?: string, output?: ImageFormat, token?: string } | string,\n ...rest: [(string)?, (number)?, (number)?, (ImageGravity)?, (number)?, (number)?, (string)?, (number)?, (number)?, (number)?, (string)?, (ImageFormat)?, (string)?] \n ): Promise<ArrayBuffer> {\n let params: { bucketId: string, fileId: string, width?: number, height?: number, gravity?: ImageGravity, quality?: number, borderWidth?: number, borderColor?: string, borderRadius?: number, opacity?: number, rotation?: number, background?: string, output?: ImageFormat, token?: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { bucketId: string, fileId: string, width?: number, height?: number, gravity?: ImageGravity, quality?: number, borderWidth?: number, borderColor?: string, borderRadius?: number, opacity?: number, rotation?: number, background?: string, output?: ImageFormat, token?: string };\n } else {\n params = {\n bucketId: paramsOrFirst as string,\n fileId: rest[0] as string,\n width: rest[1] as number,\n height: rest[2] as number,\n gravity: rest[3] as ImageGravity,\n quality: rest[4] as number,\n borderWidth: rest[5] as number,\n borderColor: rest[6] as string,\n borderRadius: rest[7] as number,\n opacity: rest[8] as number,\n rotation: rest[9] as number,\n background: rest[10] as string,\n output: rest[11] as ImageFormat,\n token: rest[12] as string \n };\n }\n \n const bucketId = params.bucketId;\n const fileId = params.fileId;\n const width = params.width;\n const height = params.height;\n const gravity = params.gravity;\n const quality = params.quality;\n const borderWidth = params.borderWidth;\n const borderColor = params.borderColor;\n const borderRadius = params.borderRadius;\n const opacity = params.opacity;\n const rotation = params.rotation;\n const background = params.background;\n const output = params.output;\n const token = params.token;\n\n if (typeof bucketId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"bucketId\"');\n }\n if (typeof fileId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"fileId\"');\n }\n\n const apiPath = '/storage/buckets/{bucketId}/files/{fileId}/preview'.replace('{bucketId}', bucketId).replace('{fileId}', fileId);\n const payload: Payload = {};\n if (typeof width !== 'undefined') {\n payload['width'] = width;\n }\n if (typeof height !== 'undefined') {\n payload['height'] = height;\n }\n if (typeof gravity !== 'undefined') {\n payload['gravity'] = gravity;\n }\n if (typeof quality !== 'undefined') {\n payload['quality'] = quality;\n }\n if (typeof borderWidth !== 'undefined') {\n payload['borderWidth'] = borderWidth;\n }\n if (typeof borderColor !== 'undefined') {\n payload['borderColor'] = borderColor;\n }\n if (typeof borderRadius !== 'undefined') {\n payload['borderRadius'] = borderRadius;\n }\n if (typeof opacity !== 'undefined') {\n payload['opacity'] = opacity;\n }\n if (typeof rotation !== 'undefined') {\n payload['rotation'] = rotation;\n }\n if (typeof background !== 'undefined') {\n payload['background'] = background;\n }\n if (typeof output !== 'undefined') {\n payload['output'] = output;\n }\n if (typeof token !== 'undefined') {\n payload['token'] = token;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n 'arrayBuffer'\n );\n }\n\n /**\n * Get a file content by its unique ID. This endpoint is similar to the download method but returns with no 'Content-Disposition: attachment' header.\n *\n * @param {string} params.bucketId - Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).\n * @param {string} params.fileId - File ID.\n * @param {string} params.token - File token for accessing this file.\n * @throws {AppwriteException}\n * @returns {Promise<ArrayBuffer>}\n */\n getFileView(params: { bucketId: string, fileId: string, token?: string }): Promise<ArrayBuffer>;\n /**\n * Get a file content by its unique ID. This endpoint is similar to the download method but returns with no 'Content-Disposition: attachment' header.\n *\n * @param {string} bucketId - Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).\n * @param {string} fileId - File ID.\n * @param {string} token - File token for accessing this file.\n * @throws {AppwriteException}\n * @returns {Promise<ArrayBuffer>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getFileView(bucketId: string, fileId: string, token?: string): Promise<ArrayBuffer>;\n getFileView(\n paramsOrFirst: { bucketId: string, fileId: string, token?: string } | string,\n ...rest: [(string)?, (string)?] \n ): Promise<ArrayBuffer> {\n let params: { bucketId: string, fileId: string, token?: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { bucketId: string, fileId: string, token?: string };\n } else {\n params = {\n bucketId: paramsOrFirst as string,\n fileId: rest[0] as string,\n token: rest[1] as string \n };\n }\n \n const bucketId = params.bucketId;\n const fileId = params.fileId;\n const token = params.token;\n\n if (typeof bucketId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"bucketId\"');\n }\n if (typeof fileId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"fileId\"');\n }\n\n const apiPath = '/storage/buckets/{bucketId}/files/{fileId}/view'.replace('{bucketId}', bucketId).replace('{fileId}', fileId);\n const payload: Payload = {};\n if (typeof token !== 'undefined') {\n payload['token'] = token;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n 'arrayBuffer'\n );\n }\n}\n"]}
1
+ {"version":3,"sources":["../../src/services/storage.ts"],"names":[],"mappings":";;;AAOO,IAAM,UAAN,MAAc;AAAA,EAGjB,YAAY,MAAA,EAAgB;AACxB,IAAA,IAAA,CAAK,MAAA,GAAS,MAAA;AAA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AAA,CAAI,KAAK,MAAA,CAAO,MAAA,CAAO,WAAW,OAAO,CAAA;AAEzD,IAAA,MAAM,aAA2C,EACjD;AAEA,IAAA,OAAO,KAAK,MAAA,CAAO,IAAA;AAAA,MACf,KAAA;AAAA,MACA,GAAA;AAAA,MACA,UAAA;AAAA,MACA,OAAA;AAAA,MACA;AAAA,KACJ;AAAA,EACJ;AACJ","file":"storage.mjs","sourcesContent":["import { AppwriteException, Client, type Payload, UploadProgress } from '../client';\nimport type { Models } from '../models';\n\nimport { Compression } from '../enums/compression';\nimport { ImageGravity } from '../enums/image-gravity';\nimport { ImageFormat } from '../enums/image-format';\n\nexport class Storage {\n client: Client;\n\n constructor(client: Client) {\n this.client = client;\n }\n\n /**\n * Get a list of all the storage buckets. You can use the query params to filter your results.\n *\n * @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: enabled, name, fileSecurity, maximumFileSize, encryption, antivirus, transformations\n * @param {string} params.search - Search term to filter your list results. Max length: 256 chars.\n * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.\n * @throws {AppwriteException}\n * @returns {Promise<Models.BucketList>}\n */\n listBuckets(params?: { queries?: string[], search?: string, total?: boolean }): Promise<Models.BucketList>;\n /**\n * Get a list of all the storage buckets. You can use the query params to filter your results.\n *\n * @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: enabled, name, fileSecurity, maximumFileSize, encryption, antivirus, transformations\n * @param {string} search - Search term to filter your list results. Max length: 256 chars.\n * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.\n * @throws {AppwriteException}\n * @returns {Promise<Models.BucketList>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n listBuckets(queries?: string[], search?: string, total?: boolean): Promise<Models.BucketList>;\n listBuckets(\n paramsOrFirst?: { queries?: string[], search?: string, total?: boolean } | string[],\n ...rest: [(string)?, (boolean)?] \n ): Promise<Models.BucketList> {\n let params: { queries?: string[], search?: string, total?: boolean };\n \n if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { queries?: string[], search?: string, total?: boolean };\n } else {\n params = {\n queries: paramsOrFirst as string[],\n search: rest[0] as string,\n total: rest[1] as boolean \n };\n }\n \n const queries = params.queries;\n const search = params.search;\n const total = params.total;\n\n\n const apiPath = '/storage/buckets';\n const payload: Payload = {};\n if (typeof queries !== 'undefined') {\n payload['queries'] = queries;\n }\n if (typeof search !== 'undefined') {\n payload['search'] = search;\n }\n if (typeof total !== 'undefined') {\n payload['total'] = total;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Create a new storage bucket.\n *\n * @param {string} params.bucketId - Unique 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.\n * @param {string} params.name - Bucket name\n * @param {string[]} params.permissions - An array of permission strings. By default, no user is granted with any permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).\n * @param {boolean} params.fileSecurity - Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](https://appwrite.io/docs/permissions).\n * @param {boolean} params.enabled - Is bucket enabled? When set to 'disabled', users cannot access the files in this bucket but Server SDKs with and API key can still access the bucket. No files are lost when this is toggled.\n * @param {number} params.maximumFileSize - Maximum file size allowed in bytes. Maximum allowed value is 5GB.\n * @param {string[]} params.allowedFileExtensions - Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.\n * @param {Compression} params.compression - Compression algorithm chosen for compression. Can be one of none, [gzip](https://en.wikipedia.org/wiki/Gzip), or [zstd](https://en.wikipedia.org/wiki/Zstd), For file size above 20MB compression is skipped even if it's enabled\n * @param {boolean} params.encryption - Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled\n * @param {boolean} params.antivirus - Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled\n * @param {boolean} params.transformations - Are image transformations enabled?\n * @throws {AppwriteException}\n * @returns {Promise<Models.Bucket>}\n */\n createBucket(params: { bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number, allowedFileExtensions?: string[], compression?: Compression, encryption?: boolean, antivirus?: boolean, transformations?: boolean }): Promise<Models.Bucket>;\n /**\n * Create a new storage bucket.\n *\n * @param {string} bucketId - Unique 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.\n * @param {string} name - Bucket name\n * @param {string[]} permissions - An array of permission strings. By default, no user is granted with any permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).\n * @param {boolean} fileSecurity - Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](https://appwrite.io/docs/permissions).\n * @param {boolean} enabled - Is bucket enabled? When set to 'disabled', users cannot access the files in this bucket but Server SDKs with and API key can still access the bucket. No files are lost when this is toggled.\n * @param {number} maximumFileSize - Maximum file size allowed in bytes. Maximum allowed value is 5GB.\n * @param {string[]} allowedFileExtensions - Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.\n * @param {Compression} compression - Compression algorithm chosen for compression. Can be one of none, [gzip](https://en.wikipedia.org/wiki/Gzip), or [zstd](https://en.wikipedia.org/wiki/Zstd), For file size above 20MB compression is skipped even if it's enabled\n * @param {boolean} encryption - Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled\n * @param {boolean} antivirus - Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled\n * @param {boolean} transformations - Are image transformations enabled?\n * @throws {AppwriteException}\n * @returns {Promise<Models.Bucket>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n createBucket(bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number, allowedFileExtensions?: string[], compression?: Compression, encryption?: boolean, antivirus?: boolean, transformations?: boolean): Promise<Models.Bucket>;\n createBucket(\n paramsOrFirst: { bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number, allowedFileExtensions?: string[], compression?: Compression, encryption?: boolean, antivirus?: boolean, transformations?: boolean } | string,\n ...rest: [(string)?, (string[])?, (boolean)?, (boolean)?, (number)?, (string[])?, (Compression)?, (boolean)?, (boolean)?, (boolean)?] \n ): Promise<Models.Bucket> {\n let params: { bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number, allowedFileExtensions?: string[], compression?: Compression, encryption?: boolean, antivirus?: boolean, transformations?: boolean };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number, allowedFileExtensions?: string[], compression?: Compression, encryption?: boolean, antivirus?: boolean, transformations?: boolean };\n } else {\n params = {\n bucketId: paramsOrFirst as string,\n name: rest[0] as string,\n permissions: rest[1] as string[],\n fileSecurity: rest[2] as boolean,\n enabled: rest[3] as boolean,\n maximumFileSize: rest[4] as number,\n allowedFileExtensions: rest[5] as string[],\n compression: rest[6] as Compression,\n encryption: rest[7] as boolean,\n antivirus: rest[8] as boolean,\n transformations: rest[9] as boolean \n };\n }\n \n const bucketId = params.bucketId;\n const name = params.name;\n const permissions = params.permissions;\n const fileSecurity = params.fileSecurity;\n const enabled = params.enabled;\n const maximumFileSize = params.maximumFileSize;\n const allowedFileExtensions = params.allowedFileExtensions;\n const compression = params.compression;\n const encryption = params.encryption;\n const antivirus = params.antivirus;\n const transformations = params.transformations;\n\n if (typeof bucketId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"bucketId\"');\n }\n if (typeof name === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"name\"');\n }\n\n const apiPath = '/storage/buckets';\n const payload: Payload = {};\n if (typeof bucketId !== 'undefined') {\n payload['bucketId'] = bucketId;\n }\n if (typeof name !== 'undefined') {\n payload['name'] = name;\n }\n if (typeof permissions !== 'undefined') {\n payload['permissions'] = permissions;\n }\n if (typeof fileSecurity !== 'undefined') {\n payload['fileSecurity'] = fileSecurity;\n }\n if (typeof enabled !== 'undefined') {\n payload['enabled'] = enabled;\n }\n if (typeof maximumFileSize !== 'undefined') {\n payload['maximumFileSize'] = maximumFileSize;\n }\n if (typeof allowedFileExtensions !== 'undefined') {\n payload['allowedFileExtensions'] = allowedFileExtensions;\n }\n if (typeof compression !== 'undefined') {\n payload['compression'] = compression;\n }\n if (typeof encryption !== 'undefined') {\n payload['encryption'] = encryption;\n }\n if (typeof antivirus !== 'undefined') {\n payload['antivirus'] = antivirus;\n }\n if (typeof transformations !== 'undefined') {\n payload['transformations'] = transformations;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'post',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Get a storage bucket by its unique ID. This endpoint response returns a JSON object with the storage bucket metadata.\n *\n * @param {string} params.bucketId - Bucket unique ID.\n * @throws {AppwriteException}\n * @returns {Promise<Models.Bucket>}\n */\n getBucket(params: { bucketId: string }): Promise<Models.Bucket>;\n /**\n * Get a storage bucket by its unique ID. This endpoint response returns a JSON object with the storage bucket metadata.\n *\n * @param {string} bucketId - Bucket unique ID.\n * @throws {AppwriteException}\n * @returns {Promise<Models.Bucket>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getBucket(bucketId: string): Promise<Models.Bucket>;\n getBucket(\n paramsOrFirst: { bucketId: string } | string \n ): Promise<Models.Bucket> {\n let params: { bucketId: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { bucketId: string };\n } else {\n params = {\n bucketId: paramsOrFirst as string \n };\n }\n \n const bucketId = params.bucketId;\n\n if (typeof bucketId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"bucketId\"');\n }\n\n const apiPath = '/storage/buckets/{bucketId}'.replace('{bucketId}', bucketId);\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Update a storage bucket by its unique ID.\n *\n * @param {string} params.bucketId - Bucket unique ID.\n * @param {string} params.name - Bucket name\n * @param {string[]} params.permissions - An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).\n * @param {boolean} params.fileSecurity - Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](https://appwrite.io/docs/permissions).\n * @param {boolean} params.enabled - Is bucket enabled? When set to 'disabled', users cannot access the files in this bucket but Server SDKs with and API key can still access the bucket. No files are lost when this is toggled.\n * @param {number} params.maximumFileSize - Maximum file size allowed in bytes. Maximum allowed value is 5GB.\n * @param {string[]} params.allowedFileExtensions - Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.\n * @param {Compression} params.compression - Compression algorithm chosen for compression. Can be one of none, [gzip](https://en.wikipedia.org/wiki/Gzip), or [zstd](https://en.wikipedia.org/wiki/Zstd), For file size above 20MB compression is skipped even if it's enabled\n * @param {boolean} params.encryption - Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled\n * @param {boolean} params.antivirus - Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled\n * @param {boolean} params.transformations - Are image transformations enabled?\n * @throws {AppwriteException}\n * @returns {Promise<Models.Bucket>}\n */\n updateBucket(params: { bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number, allowedFileExtensions?: string[], compression?: Compression, encryption?: boolean, antivirus?: boolean, transformations?: boolean }): Promise<Models.Bucket>;\n /**\n * Update a storage bucket by its unique ID.\n *\n * @param {string} bucketId - Bucket unique ID.\n * @param {string} name - Bucket name\n * @param {string[]} permissions - An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).\n * @param {boolean} fileSecurity - Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](https://appwrite.io/docs/permissions).\n * @param {boolean} enabled - Is bucket enabled? When set to 'disabled', users cannot access the files in this bucket but Server SDKs with and API key can still access the bucket. No files are lost when this is toggled.\n * @param {number} maximumFileSize - Maximum file size allowed in bytes. Maximum allowed value is 5GB.\n * @param {string[]} allowedFileExtensions - Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.\n * @param {Compression} compression - Compression algorithm chosen for compression. Can be one of none, [gzip](https://en.wikipedia.org/wiki/Gzip), or [zstd](https://en.wikipedia.org/wiki/Zstd), For file size above 20MB compression is skipped even if it's enabled\n * @param {boolean} encryption - Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled\n * @param {boolean} antivirus - Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled\n * @param {boolean} transformations - Are image transformations enabled?\n * @throws {AppwriteException}\n * @returns {Promise<Models.Bucket>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n updateBucket(bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number, allowedFileExtensions?: string[], compression?: Compression, encryption?: boolean, antivirus?: boolean, transformations?: boolean): Promise<Models.Bucket>;\n updateBucket(\n paramsOrFirst: { bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number, allowedFileExtensions?: string[], compression?: Compression, encryption?: boolean, antivirus?: boolean, transformations?: boolean } | string,\n ...rest: [(string)?, (string[])?, (boolean)?, (boolean)?, (number)?, (string[])?, (Compression)?, (boolean)?, (boolean)?, (boolean)?] \n ): Promise<Models.Bucket> {\n let params: { bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number, allowedFileExtensions?: string[], compression?: Compression, encryption?: boolean, antivirus?: boolean, transformations?: boolean };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number, allowedFileExtensions?: string[], compression?: Compression, encryption?: boolean, antivirus?: boolean, transformations?: boolean };\n } else {\n params = {\n bucketId: paramsOrFirst as string,\n name: rest[0] as string,\n permissions: rest[1] as string[],\n fileSecurity: rest[2] as boolean,\n enabled: rest[3] as boolean,\n maximumFileSize: rest[4] as number,\n allowedFileExtensions: rest[5] as string[],\n compression: rest[6] as Compression,\n encryption: rest[7] as boolean,\n antivirus: rest[8] as boolean,\n transformations: rest[9] as boolean \n };\n }\n \n const bucketId = params.bucketId;\n const name = params.name;\n const permissions = params.permissions;\n const fileSecurity = params.fileSecurity;\n const enabled = params.enabled;\n const maximumFileSize = params.maximumFileSize;\n const allowedFileExtensions = params.allowedFileExtensions;\n const compression = params.compression;\n const encryption = params.encryption;\n const antivirus = params.antivirus;\n const transformations = params.transformations;\n\n if (typeof bucketId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"bucketId\"');\n }\n if (typeof name === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"name\"');\n }\n\n const apiPath = '/storage/buckets/{bucketId}'.replace('{bucketId}', bucketId);\n const payload: Payload = {};\n if (typeof name !== 'undefined') {\n payload['name'] = name;\n }\n if (typeof permissions !== 'undefined') {\n payload['permissions'] = permissions;\n }\n if (typeof fileSecurity !== 'undefined') {\n payload['fileSecurity'] = fileSecurity;\n }\n if (typeof enabled !== 'undefined') {\n payload['enabled'] = enabled;\n }\n if (typeof maximumFileSize !== 'undefined') {\n payload['maximumFileSize'] = maximumFileSize;\n }\n if (typeof allowedFileExtensions !== 'undefined') {\n payload['allowedFileExtensions'] = allowedFileExtensions;\n }\n if (typeof compression !== 'undefined') {\n payload['compression'] = compression;\n }\n if (typeof encryption !== 'undefined') {\n payload['encryption'] = encryption;\n }\n if (typeof antivirus !== 'undefined') {\n payload['antivirus'] = antivirus;\n }\n if (typeof transformations !== 'undefined') {\n payload['transformations'] = transformations;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'put',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Delete a storage bucket by its unique ID.\n *\n * @param {string} params.bucketId - Bucket unique ID.\n * @throws {AppwriteException}\n * @returns {Promise<{}>}\n */\n deleteBucket(params: { bucketId: string }): Promise<{}>;\n /**\n * Delete a storage bucket by its unique ID.\n *\n * @param {string} bucketId - Bucket unique ID.\n * @throws {AppwriteException}\n * @returns {Promise<{}>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n deleteBucket(bucketId: string): Promise<{}>;\n deleteBucket(\n paramsOrFirst: { bucketId: string } | string \n ): Promise<{}> {\n let params: { bucketId: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { bucketId: string };\n } else {\n params = {\n bucketId: paramsOrFirst as string \n };\n }\n \n const bucketId = params.bucketId;\n\n if (typeof bucketId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"bucketId\"');\n }\n\n const apiPath = '/storage/buckets/{bucketId}'.replace('{bucketId}', bucketId);\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'delete',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Get a list of all the user files. You can use the query params to filter your results.\n *\n * @param {string} params.bucketId - Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).\n * @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, signature, mimeType, sizeOriginal, chunksTotal, chunksUploaded\n * @param {string} params.search - Search term to filter your list results. Max length: 256 chars.\n * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.\n * @throws {AppwriteException}\n * @returns {Promise<Models.FileList>}\n */\n listFiles(params: { bucketId: string, queries?: string[], search?: string, total?: boolean }): Promise<Models.FileList>;\n /**\n * Get a list of all the user files. You can use the query params to filter your results.\n *\n * @param {string} bucketId - Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).\n * @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, signature, mimeType, sizeOriginal, chunksTotal, chunksUploaded\n * @param {string} search - Search term to filter your list results. Max length: 256 chars.\n * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.\n * @throws {AppwriteException}\n * @returns {Promise<Models.FileList>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n listFiles(bucketId: string, queries?: string[], search?: string, total?: boolean): Promise<Models.FileList>;\n listFiles(\n paramsOrFirst: { bucketId: string, queries?: string[], search?: string, total?: boolean } | string,\n ...rest: [(string[])?, (string)?, (boolean)?] \n ): Promise<Models.FileList> {\n let params: { bucketId: string, queries?: string[], search?: string, total?: boolean };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { bucketId: string, queries?: string[], search?: string, total?: boolean };\n } else {\n params = {\n bucketId: paramsOrFirst as string,\n queries: rest[0] as string[],\n search: rest[1] as string,\n total: rest[2] as boolean \n };\n }\n \n const bucketId = params.bucketId;\n const queries = params.queries;\n const search = params.search;\n const total = params.total;\n\n if (typeof bucketId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"bucketId\"');\n }\n\n const apiPath = '/storage/buckets/{bucketId}/files'.replace('{bucketId}', bucketId);\n const payload: Payload = {};\n if (typeof queries !== 'undefined') {\n payload['queries'] = queries;\n }\n if (typeof search !== 'undefined') {\n payload['search'] = search;\n }\n if (typeof total !== 'undefined') {\n payload['total'] = total;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Create a new file. Before using this route, you should create a new bucket resource using either a [server integration](https://appwrite.io/docs/server/storage#storageCreateBucket) API or directly from your Appwrite console.\n * \n * Larger files should be uploaded using multiple requests with the [content-range](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Range) header to send a partial request with a maximum supported chunk of `5MB`. The `content-range` header values should always be in bytes.\n * \n * When the first request is sent, the server will return the **File** object, and the subsequent part request must include the file's **id** in `x-appwrite-id` header to allow the server to know that the partial upload is for the existing file and not for a new one.\n * \n * If you're creating a new file using one of the Appwrite SDKs, all the chunking logic will be managed by the SDK internally.\n * \n *\n * @param {string} params.bucketId - Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).\n * @param {string} params.fileId - File 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.\n * @param {File} params.file - Binary file. Appwrite SDKs provide helpers to handle file input. [Learn about file input](https://appwrite.io/docs/products/storage/upload-download#input-file).\n * @param {string[]} params.permissions - An array of permission strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).\n * @throws {AppwriteException}\n * @returns {Promise<Models.File>}\n */\n createFile(params: { bucketId: string, fileId: string, file: File, permissions?: string[], onProgress?: (progress: UploadProgress) => void }): Promise<Models.File>;\n /**\n * Create a new file. Before using this route, you should create a new bucket resource using either a [server integration](https://appwrite.io/docs/server/storage#storageCreateBucket) API or directly from your Appwrite console.\n * \n * Larger files should be uploaded using multiple requests with the [content-range](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Range) header to send a partial request with a maximum supported chunk of `5MB`. The `content-range` header values should always be in bytes.\n * \n * When the first request is sent, the server will return the **File** object, and the subsequent part request must include the file's **id** in `x-appwrite-id` header to allow the server to know that the partial upload is for the existing file and not for a new one.\n * \n * If you're creating a new file using one of the Appwrite SDKs, all the chunking logic will be managed by the SDK internally.\n * \n *\n * @param {string} bucketId - Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).\n * @param {string} fileId - File 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.\n * @param {File} file - Binary file. Appwrite SDKs provide helpers to handle file input. [Learn about file input](https://appwrite.io/docs/products/storage/upload-download#input-file).\n * @param {string[]} permissions - An array of permission strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).\n * @throws {AppwriteException}\n * @returns {Promise<Models.File>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n createFile(bucketId: string, fileId: string, file: File, permissions?: string[], onProgress?: (progress: UploadProgress) => void): Promise<Models.File>;\n createFile(\n paramsOrFirst: { bucketId: string, fileId: string, file: File, permissions?: string[], onProgress?: (progress: UploadProgress) => void } | string,\n ...rest: [(string)?, (File)?, (string[])?,((progress: UploadProgress) => void)?] \n ): Promise<Models.File> {\n let params: { bucketId: string, fileId: string, file: File, permissions?: string[] };\n let onProgress: ((progress: UploadProgress) => void);\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { bucketId: string, fileId: string, file: File, permissions?: string[] };\n onProgress = paramsOrFirst?.onProgress as ((progress: UploadProgress) => void);\n } else {\n params = {\n bucketId: paramsOrFirst as string,\n fileId: rest[0] as string,\n file: rest[1] as File,\n permissions: rest[2] as string[] \n };\n onProgress = rest[3] as ((progress: UploadProgress) => void);\n }\n \n const bucketId = params.bucketId;\n const fileId = params.fileId;\n const file = params.file;\n const permissions = params.permissions;\n\n if (typeof bucketId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"bucketId\"');\n }\n if (typeof fileId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"fileId\"');\n }\n if (typeof file === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"file\"');\n }\n\n const apiPath = '/storage/buckets/{bucketId}/files'.replace('{bucketId}', bucketId);\n const payload: Payload = {};\n if (typeof fileId !== 'undefined') {\n payload['fileId'] = fileId;\n }\n if (typeof file !== 'undefined') {\n payload['file'] = file;\n }\n if (typeof permissions !== 'undefined') {\n payload['permissions'] = permissions;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'multipart/form-data',\n }\n\n return this.client.chunkedUpload(\n 'post',\n uri,\n apiHeaders,\n payload,\n onProgress\n );\n }\n\n /**\n * Get a file by its unique ID. This endpoint response returns a JSON object with the file metadata.\n *\n * @param {string} params.bucketId - Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).\n * @param {string} params.fileId - File ID.\n * @throws {AppwriteException}\n * @returns {Promise<Models.File>}\n */\n getFile(params: { bucketId: string, fileId: string }): Promise<Models.File>;\n /**\n * Get a file by its unique ID. This endpoint response returns a JSON object with the file metadata.\n *\n * @param {string} bucketId - Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).\n * @param {string} fileId - File ID.\n * @throws {AppwriteException}\n * @returns {Promise<Models.File>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getFile(bucketId: string, fileId: string): Promise<Models.File>;\n getFile(\n paramsOrFirst: { bucketId: string, fileId: string } | string,\n ...rest: [(string)?] \n ): Promise<Models.File> {\n let params: { bucketId: string, fileId: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { bucketId: string, fileId: string };\n } else {\n params = {\n bucketId: paramsOrFirst as string,\n fileId: rest[0] as string \n };\n }\n \n const bucketId = params.bucketId;\n const fileId = params.fileId;\n\n if (typeof bucketId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"bucketId\"');\n }\n if (typeof fileId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"fileId\"');\n }\n\n const apiPath = '/storage/buckets/{bucketId}/files/{fileId}'.replace('{bucketId}', bucketId).replace('{fileId}', fileId);\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Update a file by its unique ID. Only users with write permissions have access to update this resource.\n *\n * @param {string} params.bucketId - Bucket unique ID.\n * @param {string} params.fileId - File ID.\n * @param {string} params.name - File name.\n * @param {string[]} params.permissions - An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).\n * @throws {AppwriteException}\n * @returns {Promise<Models.File>}\n */\n updateFile(params: { bucketId: string, fileId: string, name?: string, permissions?: string[] }): Promise<Models.File>;\n /**\n * Update a file by its unique ID. Only users with write permissions have access to update this resource.\n *\n * @param {string} bucketId - Bucket unique ID.\n * @param {string} fileId - File ID.\n * @param {string} name - File name.\n * @param {string[]} permissions - An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).\n * @throws {AppwriteException}\n * @returns {Promise<Models.File>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n updateFile(bucketId: string, fileId: string, name?: string, permissions?: string[]): Promise<Models.File>;\n updateFile(\n paramsOrFirst: { bucketId: string, fileId: string, name?: string, permissions?: string[] } | string,\n ...rest: [(string)?, (string)?, (string[])?] \n ): Promise<Models.File> {\n let params: { bucketId: string, fileId: string, name?: string, permissions?: string[] };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { bucketId: string, fileId: string, name?: string, permissions?: string[] };\n } else {\n params = {\n bucketId: paramsOrFirst as string,\n fileId: rest[0] as string,\n name: rest[1] as string,\n permissions: rest[2] as string[] \n };\n }\n \n const bucketId = params.bucketId;\n const fileId = params.fileId;\n const name = params.name;\n const permissions = params.permissions;\n\n if (typeof bucketId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"bucketId\"');\n }\n if (typeof fileId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"fileId\"');\n }\n\n const apiPath = '/storage/buckets/{bucketId}/files/{fileId}'.replace('{bucketId}', bucketId).replace('{fileId}', fileId);\n const payload: Payload = {};\n if (typeof name !== 'undefined') {\n payload['name'] = name;\n }\n if (typeof permissions !== 'undefined') {\n payload['permissions'] = permissions;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'put',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Delete a file by its unique ID. Only users with write permissions have access to delete this resource.\n *\n * @param {string} params.bucketId - Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).\n * @param {string} params.fileId - File ID.\n * @throws {AppwriteException}\n * @returns {Promise<{}>}\n */\n deleteFile(params: { bucketId: string, fileId: string }): Promise<{}>;\n /**\n * Delete a file by its unique ID. Only users with write permissions have access to delete this resource.\n *\n * @param {string} bucketId - Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).\n * @param {string} fileId - File ID.\n * @throws {AppwriteException}\n * @returns {Promise<{}>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n deleteFile(bucketId: string, fileId: string): Promise<{}>;\n deleteFile(\n paramsOrFirst: { bucketId: string, fileId: string } | string,\n ...rest: [(string)?] \n ): Promise<{}> {\n let params: { bucketId: string, fileId: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { bucketId: string, fileId: string };\n } else {\n params = {\n bucketId: paramsOrFirst as string,\n fileId: rest[0] as string \n };\n }\n \n const bucketId = params.bucketId;\n const fileId = params.fileId;\n\n if (typeof bucketId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"bucketId\"');\n }\n if (typeof fileId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"fileId\"');\n }\n\n const apiPath = '/storage/buckets/{bucketId}/files/{fileId}'.replace('{bucketId}', bucketId).replace('{fileId}', fileId);\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'delete',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Get a file 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.\n *\n * @param {string} params.bucketId - Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).\n * @param {string} params.fileId - File ID.\n * @param {string} params.token - File token for accessing this file.\n * @throws {AppwriteException}\n * @returns {Promise<ArrayBuffer>}\n */\n getFileDownload(params: { bucketId: string, fileId: string, token?: string }): Promise<ArrayBuffer>;\n /**\n * Get a file 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.\n *\n * @param {string} bucketId - Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).\n * @param {string} fileId - File ID.\n * @param {string} token - File token for accessing this file.\n * @throws {AppwriteException}\n * @returns {Promise<ArrayBuffer>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getFileDownload(bucketId: string, fileId: string, token?: string): Promise<ArrayBuffer>;\n getFileDownload(\n paramsOrFirst: { bucketId: string, fileId: string, token?: string } | string,\n ...rest: [(string)?, (string)?] \n ): Promise<ArrayBuffer> {\n let params: { bucketId: string, fileId: string, token?: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { bucketId: string, fileId: string, token?: string };\n } else {\n params = {\n bucketId: paramsOrFirst as string,\n fileId: rest[0] as string,\n token: rest[1] as string \n };\n }\n \n const bucketId = params.bucketId;\n const fileId = params.fileId;\n const token = params.token;\n\n if (typeof bucketId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"bucketId\"');\n }\n if (typeof fileId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"fileId\"');\n }\n\n const apiPath = '/storage/buckets/{bucketId}/files/{fileId}/download'.replace('{bucketId}', bucketId).replace('{fileId}', fileId);\n const payload: Payload = {};\n if (typeof token !== 'undefined') {\n payload['token'] = token;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n 'arrayBuffer'\n );\n }\n\n /**\n * Get a file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets, will return the file icon image. You can also pass query string arguments for cutting and resizing your preview image. Preview is supported only for image files smaller than 10MB.\n *\n * @param {string} params.bucketId - Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).\n * @param {string} params.fileId - File ID\n * @param {number} params.width - Resize preview image width, Pass an integer between 0 to 4000.\n * @param {number} params.height - Resize preview image height, Pass an integer between 0 to 4000.\n * @param {ImageGravity} params.gravity - Image crop gravity. Can be one of center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right\n * @param {number} params.quality - Preview image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.\n * @param {number} params.borderWidth - Preview image border in pixels. Pass an integer between 0 to 100. Defaults to 0.\n * @param {string} params.borderColor - Preview image border color. Use a valid HEX color, no # is needed for prefix.\n * @param {number} params.borderRadius - Preview image border radius in pixels. Pass an integer between 0 to 4000.\n * @param {number} params.opacity - Preview image opacity. Only works with images having an alpha channel (like png). Pass a number between 0 to 1.\n * @param {number} params.rotation - Preview image rotation in degrees. Pass an integer between -360 and 360.\n * @param {string} params.background - Preview image background color. Only works with transparent images (png). Use a valid HEX color, no # is needed for prefix.\n * @param {ImageFormat} params.output - Output format type (jpeg, jpg, png, gif and webp).\n * @param {string} params.token - File token for accessing this file.\n * @throws {AppwriteException}\n * @returns {Promise<ArrayBuffer>}\n */\n getFilePreview(params: { bucketId: string, fileId: string, width?: number, height?: number, gravity?: ImageGravity, quality?: number, borderWidth?: number, borderColor?: string, borderRadius?: number, opacity?: number, rotation?: number, background?: string, output?: ImageFormat, token?: string }): Promise<ArrayBuffer>;\n /**\n * Get a file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets, will return the file icon image. You can also pass query string arguments for cutting and resizing your preview image. Preview is supported only for image files smaller than 10MB.\n *\n * @param {string} bucketId - Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).\n * @param {string} fileId - File ID\n * @param {number} width - Resize preview image width, Pass an integer between 0 to 4000.\n * @param {number} height - Resize preview image height, Pass an integer between 0 to 4000.\n * @param {ImageGravity} gravity - Image crop gravity. Can be one of center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right\n * @param {number} quality - Preview image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.\n * @param {number} borderWidth - Preview image border in pixels. Pass an integer between 0 to 100. Defaults to 0.\n * @param {string} borderColor - Preview image border color. Use a valid HEX color, no # is needed for prefix.\n * @param {number} borderRadius - Preview image border radius in pixels. Pass an integer between 0 to 4000.\n * @param {number} opacity - Preview image opacity. Only works with images having an alpha channel (like png). Pass a number between 0 to 1.\n * @param {number} rotation - Preview image rotation in degrees. Pass an integer between -360 and 360.\n * @param {string} background - Preview image background color. Only works with transparent images (png). Use a valid HEX color, no # is needed for prefix.\n * @param {ImageFormat} output - Output format type (jpeg, jpg, png, gif and webp).\n * @param {string} token - File token for accessing this file.\n * @throws {AppwriteException}\n * @returns {Promise<ArrayBuffer>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getFilePreview(bucketId: string, fileId: string, width?: number, height?: number, gravity?: ImageGravity, quality?: number, borderWidth?: number, borderColor?: string, borderRadius?: number, opacity?: number, rotation?: number, background?: string, output?: ImageFormat, token?: string): Promise<ArrayBuffer>;\n getFilePreview(\n paramsOrFirst: { bucketId: string, fileId: string, width?: number, height?: number, gravity?: ImageGravity, quality?: number, borderWidth?: number, borderColor?: string, borderRadius?: number, opacity?: number, rotation?: number, background?: string, output?: ImageFormat, token?: string } | string,\n ...rest: [(string)?, (number)?, (number)?, (ImageGravity)?, (number)?, (number)?, (string)?, (number)?, (number)?, (number)?, (string)?, (ImageFormat)?, (string)?] \n ): Promise<ArrayBuffer> {\n let params: { bucketId: string, fileId: string, width?: number, height?: number, gravity?: ImageGravity, quality?: number, borderWidth?: number, borderColor?: string, borderRadius?: number, opacity?: number, rotation?: number, background?: string, output?: ImageFormat, token?: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { bucketId: string, fileId: string, width?: number, height?: number, gravity?: ImageGravity, quality?: number, borderWidth?: number, borderColor?: string, borderRadius?: number, opacity?: number, rotation?: number, background?: string, output?: ImageFormat, token?: string };\n } else {\n params = {\n bucketId: paramsOrFirst as string,\n fileId: rest[0] as string,\n width: rest[1] as number,\n height: rest[2] as number,\n gravity: rest[3] as ImageGravity,\n quality: rest[4] as number,\n borderWidth: rest[5] as number,\n borderColor: rest[6] as string,\n borderRadius: rest[7] as number,\n opacity: rest[8] as number,\n rotation: rest[9] as number,\n background: rest[10] as string,\n output: rest[11] as ImageFormat,\n token: rest[12] as string \n };\n }\n \n const bucketId = params.bucketId;\n const fileId = params.fileId;\n const width = params.width;\n const height = params.height;\n const gravity = params.gravity;\n const quality = params.quality;\n const borderWidth = params.borderWidth;\n const borderColor = params.borderColor;\n const borderRadius = params.borderRadius;\n const opacity = params.opacity;\n const rotation = params.rotation;\n const background = params.background;\n const output = params.output;\n const token = params.token;\n\n if (typeof bucketId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"bucketId\"');\n }\n if (typeof fileId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"fileId\"');\n }\n\n const apiPath = '/storage/buckets/{bucketId}/files/{fileId}/preview'.replace('{bucketId}', bucketId).replace('{fileId}', fileId);\n const payload: Payload = {};\n if (typeof width !== 'undefined') {\n payload['width'] = width;\n }\n if (typeof height !== 'undefined') {\n payload['height'] = height;\n }\n if (typeof gravity !== 'undefined') {\n payload['gravity'] = gravity;\n }\n if (typeof quality !== 'undefined') {\n payload['quality'] = quality;\n }\n if (typeof borderWidth !== 'undefined') {\n payload['borderWidth'] = borderWidth;\n }\n if (typeof borderColor !== 'undefined') {\n payload['borderColor'] = borderColor;\n }\n if (typeof borderRadius !== 'undefined') {\n payload['borderRadius'] = borderRadius;\n }\n if (typeof opacity !== 'undefined') {\n payload['opacity'] = opacity;\n }\n if (typeof rotation !== 'undefined') {\n payload['rotation'] = rotation;\n }\n if (typeof background !== 'undefined') {\n payload['background'] = background;\n }\n if (typeof output !== 'undefined') {\n payload['output'] = output;\n }\n if (typeof token !== 'undefined') {\n payload['token'] = token;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n 'arrayBuffer'\n );\n }\n\n /**\n * Get a file content by its unique ID. This endpoint is similar to the download method but returns with no 'Content-Disposition: attachment' header.\n *\n * @param {string} params.bucketId - Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).\n * @param {string} params.fileId - File ID.\n * @param {string} params.token - File token for accessing this file.\n * @throws {AppwriteException}\n * @returns {Promise<ArrayBuffer>}\n */\n getFileView(params: { bucketId: string, fileId: string, token?: string }): Promise<ArrayBuffer>;\n /**\n * Get a file content by its unique ID. This endpoint is similar to the download method but returns with no 'Content-Disposition: attachment' header.\n *\n * @param {string} bucketId - Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).\n * @param {string} fileId - File ID.\n * @param {string} token - File token for accessing this file.\n * @throws {AppwriteException}\n * @returns {Promise<ArrayBuffer>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getFileView(bucketId: string, fileId: string, token?: string): Promise<ArrayBuffer>;\n getFileView(\n paramsOrFirst: { bucketId: string, fileId: string, token?: string } | string,\n ...rest: [(string)?, (string)?] \n ): Promise<ArrayBuffer> {\n let params: { bucketId: string, fileId: string, token?: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { bucketId: string, fileId: string, token?: string };\n } else {\n params = {\n bucketId: paramsOrFirst as string,\n fileId: rest[0] as string,\n token: rest[1] as string \n };\n }\n \n const bucketId = params.bucketId;\n const fileId = params.fileId;\n const token = params.token;\n\n if (typeof bucketId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"bucketId\"');\n }\n if (typeof fileId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"fileId\"');\n }\n\n const apiPath = '/storage/buckets/{bucketId}/files/{fileId}/view'.replace('{bucketId}', bucketId).replace('{fileId}', fileId);\n const payload: Payload = {};\n if (typeof token !== 'undefined') {\n payload['token'] = token;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n 'arrayBuffer'\n );\n }\n}\n"]}
@@ -12,6 +12,7 @@ import '../enums/index-status.mjs';
12
12
  import '../enums/deployment-status.mjs';
13
13
  import '../enums/execution-trigger.mjs';
14
14
  import '../enums/execution-status.mjs';
15
+ import '../enums/platform-type.mjs';
15
16
  import '../enums/health-antivirus-status.mjs';
16
17
  import '../enums/health-check-status.mjs';
17
18
  import '../enums/message-status.mjs';
@@ -356,6 +357,7 @@ declare class TablesDB {
356
357
  * @param {string[]} params.permissions - An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).
357
358
  * @param {boolean} params.rowSecurity - Enables configuring permissions for individual rows. A user needs one of row or table-level permissions to access a row. [Learn more about permissions](https://appwrite.io/docs/permissions).
358
359
  * @param {boolean} params.enabled - Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.
360
+ * @param {boolean} params.purge - When true, purge all cached list responses for this table as part of the update. Use this to force readers to see fresh data immediately instead of waiting for the cache TTL to expire.
359
361
  * @throws {AppwriteException}
360
362
  * @returns {Promise<Models.Table>}
361
363
  */
@@ -366,6 +368,7 @@ declare class TablesDB {
366
368
  permissions?: string[];
367
369
  rowSecurity?: boolean;
368
370
  enabled?: boolean;
371
+ purge?: boolean;
369
372
  }): Promise<Models.Table>;
370
373
  /**
371
374
  * Update a table by its unique ID.
@@ -376,11 +379,12 @@ declare class TablesDB {
376
379
  * @param {string[]} permissions - An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).
377
380
  * @param {boolean} rowSecurity - Enables configuring permissions for individual rows. A user needs one of row or table-level permissions to access a row. [Learn more about permissions](https://appwrite.io/docs/permissions).
378
381
  * @param {boolean} enabled - Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.
382
+ * @param {boolean} purge - When true, purge all cached list responses for this table as part of the update. Use this to force readers to see fresh data immediately instead of waiting for the cache TTL to expire.
379
383
  * @throws {AppwriteException}
380
384
  * @returns {Promise<Models.Table>}
381
385
  * @deprecated Use the object parameter style method for a better developer experience.
382
386
  */
383
- updateTable(databaseId: string, tableId: string, name?: string, permissions?: string[], rowSecurity?: boolean, enabled?: boolean): Promise<Models.Table>;
387
+ updateTable(databaseId: string, tableId: string, name?: string, permissions?: string[], rowSecurity?: boolean, enabled?: boolean, purge?: boolean): Promise<Models.Table>;
384
388
  /**
385
389
  * Delete a table by its unique ID. Only users with write permissions have access to delete this resource.
386
390
  *
@@ -1863,7 +1867,7 @@ declare class TablesDB {
1863
1867
  * @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.
1864
1868
  * @param {string} params.transactionId - Transaction ID to read uncommitted changes within the transaction.
1865
1869
  * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
1866
- * @param {number} params.ttl - TTL (seconds) for cached responses when caching is enabled for select queries. Must be between 0 and 86400 (24 hours).
1870
+ * @param {number} params.ttl - TTL (seconds) for caching list responses. Responses are stored in an in-memory key-value cache, keyed per project, table, schema version (columns and indexes), caller authorization roles, and the exact query — so users with different permissions never share cached entries. Schema changes invalidate cached entries automatically; row writes do not, so choose a TTL you are comfortable serving as stale data. Set to 0 to disable caching. Must be between 0 and 86400 (24 hours).
1867
1871
  * @throws {AppwriteException}
1868
1872
  * @returns {Promise<Models.RowList<Row>>}
1869
1873
  */
@@ -1883,7 +1887,7 @@ declare class TablesDB {
1883
1887
  * @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.
1884
1888
  * @param {string} transactionId - Transaction ID to read uncommitted changes within the transaction.
1885
1889
  * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
1886
- * @param {number} ttl - TTL (seconds) for cached responses when caching is enabled for select queries. Must be between 0 and 86400 (24 hours).
1890
+ * @param {number} ttl - TTL (seconds) for caching list responses. Responses are stored in an in-memory key-value cache, keyed per project, table, schema version (columns and indexes), caller authorization roles, and the exact query — so users with different permissions never share cached entries. Schema changes invalidate cached entries automatically; row writes do not, so choose a TTL you are comfortable serving as stale data. Set to 0 to disable caching. Must be between 0 and 86400 (24 hours).
1887
1891
  * @throws {AppwriteException}
1888
1892
  * @returns {Promise<Models.RowList<Row>>}
1889
1893
  * @deprecated Use the object parameter style method for a better developer experience.
@@ -12,6 +12,7 @@ import '../enums/index-status.js';
12
12
  import '../enums/deployment-status.js';
13
13
  import '../enums/execution-trigger.js';
14
14
  import '../enums/execution-status.js';
15
+ import '../enums/platform-type.js';
15
16
  import '../enums/health-antivirus-status.js';
16
17
  import '../enums/health-check-status.js';
17
18
  import '../enums/message-status.js';
@@ -356,6 +357,7 @@ declare class TablesDB {
356
357
  * @param {string[]} params.permissions - An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).
357
358
  * @param {boolean} params.rowSecurity - Enables configuring permissions for individual rows. A user needs one of row or table-level permissions to access a row. [Learn more about permissions](https://appwrite.io/docs/permissions).
358
359
  * @param {boolean} params.enabled - Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.
360
+ * @param {boolean} params.purge - When true, purge all cached list responses for this table as part of the update. Use this to force readers to see fresh data immediately instead of waiting for the cache TTL to expire.
359
361
  * @throws {AppwriteException}
360
362
  * @returns {Promise<Models.Table>}
361
363
  */
@@ -366,6 +368,7 @@ declare class TablesDB {
366
368
  permissions?: string[];
367
369
  rowSecurity?: boolean;
368
370
  enabled?: boolean;
371
+ purge?: boolean;
369
372
  }): Promise<Models.Table>;
370
373
  /**
371
374
  * Update a table by its unique ID.
@@ -376,11 +379,12 @@ declare class TablesDB {
376
379
  * @param {string[]} permissions - An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).
377
380
  * @param {boolean} rowSecurity - Enables configuring permissions for individual rows. A user needs one of row or table-level permissions to access a row. [Learn more about permissions](https://appwrite.io/docs/permissions).
378
381
  * @param {boolean} enabled - Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.
382
+ * @param {boolean} purge - When true, purge all cached list responses for this table as part of the update. Use this to force readers to see fresh data immediately instead of waiting for the cache TTL to expire.
379
383
  * @throws {AppwriteException}
380
384
  * @returns {Promise<Models.Table>}
381
385
  * @deprecated Use the object parameter style method for a better developer experience.
382
386
  */
383
- updateTable(databaseId: string, tableId: string, name?: string, permissions?: string[], rowSecurity?: boolean, enabled?: boolean): Promise<Models.Table>;
387
+ updateTable(databaseId: string, tableId: string, name?: string, permissions?: string[], rowSecurity?: boolean, enabled?: boolean, purge?: boolean): Promise<Models.Table>;
384
388
  /**
385
389
  * Delete a table by its unique ID. Only users with write permissions have access to delete this resource.
386
390
  *
@@ -1863,7 +1867,7 @@ declare class TablesDB {
1863
1867
  * @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.
1864
1868
  * @param {string} params.transactionId - Transaction ID to read uncommitted changes within the transaction.
1865
1869
  * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
1866
- * @param {number} params.ttl - TTL (seconds) for cached responses when caching is enabled for select queries. Must be between 0 and 86400 (24 hours).
1870
+ * @param {number} params.ttl - TTL (seconds) for caching list responses. Responses are stored in an in-memory key-value cache, keyed per project, table, schema version (columns and indexes), caller authorization roles, and the exact query — so users with different permissions never share cached entries. Schema changes invalidate cached entries automatically; row writes do not, so choose a TTL you are comfortable serving as stale data. Set to 0 to disable caching. Must be between 0 and 86400 (24 hours).
1867
1871
  * @throws {AppwriteException}
1868
1872
  * @returns {Promise<Models.RowList<Row>>}
1869
1873
  */
@@ -1883,7 +1887,7 @@ declare class TablesDB {
1883
1887
  * @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.
1884
1888
  * @param {string} transactionId - Transaction ID to read uncommitted changes within the transaction.
1885
1889
  * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
1886
- * @param {number} ttl - TTL (seconds) for cached responses when caching is enabled for select queries. Must be between 0 and 86400 (24 hours).
1890
+ * @param {number} ttl - TTL (seconds) for caching list responses. Responses are stored in an in-memory key-value cache, keyed per project, table, schema version (columns and indexes), caller authorization roles, and the exact query — so users with different permissions never share cached entries. Schema changes invalidate cached entries automatically; row writes do not, so choose a TTL you are comfortable serving as stale data. Set to 0 to disable caching. Must be between 0 and 86400 (24 hours).
1887
1891
  * @throws {AppwriteException}
1888
1892
  * @returns {Promise<Models.RowList<Row>>}
1889
1893
  * @deprecated Use the object parameter style method for a better developer experience.
@@ -481,7 +481,8 @@ class TablesDB {
481
481
  name: rest[1],
482
482
  permissions: rest[2],
483
483
  rowSecurity: rest[3],
484
- enabled: rest[4]
484
+ enabled: rest[4],
485
+ purge: rest[5]
485
486
  };
486
487
  }
487
488
  const databaseId = params.databaseId;
@@ -490,6 +491,7 @@ class TablesDB {
490
491
  const permissions = params.permissions;
491
492
  const rowSecurity = params.rowSecurity;
492
493
  const enabled = params.enabled;
494
+ const purge = params.purge;
493
495
  if (typeof databaseId === "undefined") {
494
496
  throw new client.AppwriteException('Missing required parameter: "databaseId"');
495
497
  }
@@ -510,6 +512,9 @@ class TablesDB {
510
512
  if (typeof enabled !== "undefined") {
511
513
  payload["enabled"] = enabled;
512
514
  }
515
+ if (typeof purge !== "undefined") {
516
+ payload["purge"] = purge;
517
+ }
513
518
  const uri = new URL(this.client.config.endpoint + apiPath);
514
519
  const apiHeaders = {
515
520
  "content-type": "application/json"
@@ -3438,5 +3443,5 @@ class TablesDB {
3438
3443
  }
3439
3444
 
3440
3445
  exports.TablesDB = TablesDB;
3441
- //# sourceMappingURL=out.js.map
3446
+ //# sourceMappingURL=tables-db.js.map
3442
3447
  //# sourceMappingURL=tables-db.js.map