@appwrite.io/console 1.5.2 → 1.7.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 (607) hide show
  1. package/CHANGELOG.md +9 -1
  2. package/README.md +3 -3
  3. package/dist/cjs/sdk.js +11874 -11100
  4. package/dist/cjs/sdk.js.map +1 -1
  5. package/dist/esm/sdk.js +11872 -11101
  6. package/dist/esm/sdk.js.map +1 -1
  7. package/dist/iife/sdk.js +11874 -11100
  8. package/docs/examples/account/create-anonymous-session.md +1 -1
  9. package/docs/examples/account/create-billing-address.md +1 -1
  10. package/docs/examples/account/create-email-password-session.md +1 -1
  11. package/docs/examples/account/create-email-token.md +1 -1
  12. package/docs/examples/account/create-j-w-t.md +1 -1
  13. package/docs/examples/account/create-magic-u-r-l-token.md +1 -1
  14. package/docs/examples/account/create-mfa-authenticator.md +1 -1
  15. package/docs/examples/account/create-mfa-challenge.md +1 -1
  16. package/docs/examples/account/create-mfa-recovery-codes.md +1 -1
  17. package/docs/examples/account/create-o-auth2session.md +1 -1
  18. package/docs/examples/account/create-o-auth2token.md +1 -1
  19. package/docs/examples/account/create-payment-method.md +1 -1
  20. package/docs/examples/account/create-phone-token.md +1 -1
  21. package/docs/examples/account/create-phone-verification.md +1 -1
  22. package/docs/examples/account/create-push-target.md +1 -1
  23. package/docs/examples/account/create-recovery.md +1 -1
  24. package/docs/examples/account/create-session.md +1 -1
  25. package/docs/examples/account/create-verification.md +1 -1
  26. package/docs/examples/account/create.md +1 -1
  27. package/docs/examples/account/delete-billing-address.md +1 -1
  28. package/docs/examples/account/delete-identity.md +1 -1
  29. package/docs/examples/account/delete-mfa-authenticator.md +1 -1
  30. package/docs/examples/account/delete-payment-method.md +1 -1
  31. package/docs/examples/account/delete-push-target.md +1 -1
  32. package/docs/examples/account/delete-session.md +1 -1
  33. package/docs/examples/account/delete-sessions.md +1 -1
  34. package/docs/examples/account/delete.md +1 -1
  35. package/docs/examples/account/get-billing-address.md +1 -1
  36. package/docs/examples/account/get-coupon.md +1 -1
  37. package/docs/examples/account/get-mfa-recovery-codes.md +1 -1
  38. package/docs/examples/account/get-payment-method.md +1 -1
  39. package/docs/examples/account/get-prefs.md +1 -1
  40. package/docs/examples/account/get-session.md +1 -1
  41. package/docs/examples/account/get.md +1 -1
  42. package/docs/examples/account/list-billing-addresses.md +1 -1
  43. package/docs/examples/account/list-identities.md +1 -1
  44. package/docs/examples/account/list-invoices.md +1 -1
  45. package/docs/examples/account/list-logs.md +1 -1
  46. package/docs/examples/account/list-mfa-factors.md +1 -1
  47. package/docs/examples/account/list-payment-methods.md +1 -1
  48. package/docs/examples/account/list-sessions.md +1 -1
  49. package/docs/examples/account/update-billing-address.md +1 -1
  50. package/docs/examples/account/update-email.md +1 -1
  51. package/docs/examples/account/update-m-f-a.md +1 -1
  52. package/docs/examples/account/update-magic-u-r-l-session.md +1 -1
  53. package/docs/examples/account/update-mfa-authenticator.md +1 -1
  54. package/docs/examples/account/update-mfa-challenge.md +1 -1
  55. package/docs/examples/account/update-mfa-recovery-codes.md +1 -1
  56. package/docs/examples/account/update-name.md +1 -1
  57. package/docs/examples/account/update-password.md +1 -1
  58. package/docs/examples/account/update-payment-method-mandate-options.md +1 -1
  59. package/docs/examples/account/update-payment-method-provider.md +1 -1
  60. package/docs/examples/account/update-payment-method.md +1 -1
  61. package/docs/examples/account/update-phone-session.md +1 -1
  62. package/docs/examples/account/update-phone-verification.md +1 -1
  63. package/docs/examples/account/update-phone.md +1 -1
  64. package/docs/examples/account/update-prefs.md +1 -1
  65. package/docs/examples/account/update-push-target.md +1 -1
  66. package/docs/examples/account/update-recovery.md +1 -1
  67. package/docs/examples/account/update-session.md +1 -1
  68. package/docs/examples/account/update-status.md +1 -1
  69. package/docs/examples/account/update-verification.md +1 -1
  70. package/docs/examples/assistant/chat.md +1 -1
  71. package/docs/examples/avatars/get-browser.md +2 -2
  72. package/docs/examples/avatars/get-credit-card.md +2 -2
  73. package/docs/examples/avatars/get-favicon.md +1 -1
  74. package/docs/examples/avatars/get-flag.md +2 -2
  75. package/docs/examples/avatars/get-image.md +1 -1
  76. package/docs/examples/avatars/get-initials.md +1 -1
  77. package/docs/examples/avatars/get-q-r.md +1 -1
  78. package/docs/examples/backups/create-archive.md +1 -1
  79. package/docs/examples/backups/create-policy.md +1 -1
  80. package/docs/examples/backups/create-restoration.md +1 -1
  81. package/docs/examples/backups/delete-archive.md +1 -1
  82. package/docs/examples/backups/delete-policy.md +1 -1
  83. package/docs/examples/backups/get-archive.md +1 -1
  84. package/docs/examples/backups/get-policy.md +1 -1
  85. package/docs/examples/backups/get-restoration.md +1 -1
  86. package/docs/examples/backups/list-archives.md +1 -1
  87. package/docs/examples/backups/list-policies.md +1 -1
  88. package/docs/examples/backups/list-restorations.md +1 -1
  89. package/docs/examples/backups/update-policy.md +1 -1
  90. package/docs/examples/console/create-program-membership.md +1 -1
  91. package/docs/examples/console/create-source.md +1 -1
  92. package/docs/examples/console/get-campaign.md +1 -1
  93. package/docs/examples/console/get-coupon.md +1 -1
  94. package/docs/examples/console/get-resource.md +14 -0
  95. package/docs/examples/console/plans.md +1 -1
  96. package/docs/examples/console/regions.md +1 -1
  97. package/docs/examples/console/variables.md +1 -1
  98. package/docs/examples/databases/create-boolean-attribute.md +1 -1
  99. package/docs/examples/databases/create-collection.md +1 -1
  100. package/docs/examples/databases/create-datetime-attribute.md +1 -1
  101. package/docs/examples/databases/create-document.md +4 -2
  102. package/docs/examples/databases/create-documents.md +15 -0
  103. package/docs/examples/databases/create-email-attribute.md +1 -1
  104. package/docs/examples/databases/create-enum-attribute.md +1 -1
  105. package/docs/examples/databases/create-float-attribute.md +1 -1
  106. package/docs/examples/databases/create-index.md +3 -2
  107. package/docs/examples/databases/create-integer-attribute.md +1 -1
  108. package/docs/examples/databases/create-ip-attribute.md +1 -1
  109. package/docs/examples/databases/create-relationship-attribute.md +1 -1
  110. package/docs/examples/databases/create-string-attribute.md +1 -1
  111. package/docs/examples/databases/create-url-attribute.md +1 -1
  112. package/docs/examples/databases/create.md +1 -1
  113. package/docs/examples/databases/delete-attribute.md +1 -1
  114. package/docs/examples/databases/delete-collection.md +1 -1
  115. package/docs/examples/databases/delete-document.md +1 -1
  116. package/docs/examples/databases/delete-documents.md +15 -0
  117. package/docs/examples/databases/delete-index.md +1 -1
  118. package/docs/examples/databases/delete.md +1 -1
  119. package/docs/examples/databases/get-attribute.md +1 -1
  120. package/docs/examples/databases/get-collection-usage.md +1 -1
  121. package/docs/examples/databases/get-collection.md +1 -1
  122. package/docs/examples/databases/get-database-usage.md +1 -1
  123. package/docs/examples/databases/get-document.md +1 -1
  124. package/docs/examples/databases/get-index.md +1 -1
  125. package/docs/examples/databases/get-usage.md +1 -1
  126. package/docs/examples/databases/get.md +1 -1
  127. package/docs/examples/databases/list-attributes.md +1 -1
  128. package/docs/examples/databases/list-collection-logs.md +1 -1
  129. package/docs/examples/databases/list-collections.md +1 -1
  130. package/docs/examples/databases/list-document-logs.md +1 -1
  131. package/docs/examples/databases/list-documents.md +1 -1
  132. package/docs/examples/databases/list-indexes.md +1 -1
  133. package/docs/examples/databases/list-logs.md +1 -1
  134. package/docs/examples/databases/list.md +1 -1
  135. package/docs/examples/databases/update-boolean-attribute.md +1 -1
  136. package/docs/examples/databases/update-collection.md +1 -1
  137. package/docs/examples/databases/update-datetime-attribute.md +1 -1
  138. package/docs/examples/databases/update-document.md +1 -1
  139. package/docs/examples/databases/update-documents.md +16 -0
  140. package/docs/examples/databases/update-email-attribute.md +1 -1
  141. package/docs/examples/databases/update-enum-attribute.md +1 -1
  142. package/docs/examples/databases/update-float-attribute.md +1 -1
  143. package/docs/examples/databases/update-integer-attribute.md +1 -1
  144. package/docs/examples/databases/update-ip-attribute.md +1 -1
  145. package/docs/examples/databases/update-relationship-attribute.md +1 -1
  146. package/docs/examples/databases/update-string-attribute.md +1 -1
  147. package/docs/examples/databases/update-url-attribute.md +1 -1
  148. package/docs/examples/databases/update.md +1 -1
  149. package/docs/examples/databases/upsert-documents.md +15 -0
  150. package/docs/examples/domains/create-preset-google-workspace.md +13 -0
  151. package/docs/examples/domains/create-preset-i-cloud.md +13 -0
  152. package/docs/examples/domains/create-preset-mailgun.md +13 -0
  153. package/docs/examples/domains/create-preset-outlook.md +13 -0
  154. package/docs/examples/domains/create-preset-proton-mail.md +13 -0
  155. package/docs/examples/domains/create-preset-zoho.md +13 -0
  156. package/docs/examples/domains/create-record-a-a-a-a.md +17 -0
  157. package/docs/examples/domains/create-record-a.md +17 -0
  158. package/docs/examples/domains/create-record-alias.md +17 -0
  159. package/docs/examples/domains/create-record-c-a-a.md +17 -0
  160. package/docs/examples/domains/create-record-c-n-a-m-e.md +17 -0
  161. package/docs/examples/domains/create-record-h-t-t-p-s.md +17 -0
  162. package/docs/examples/domains/create-record-m-x.md +18 -0
  163. package/docs/examples/domains/create-record-n-s.md +17 -0
  164. package/docs/examples/domains/create-record-s-r-v.md +20 -0
  165. package/docs/examples/domains/create-record-t-x-t.md +17 -0
  166. package/docs/examples/domains/create.md +14 -0
  167. package/docs/examples/domains/delete-record.md +14 -0
  168. package/docs/examples/domains/delete.md +13 -0
  169. package/docs/examples/domains/get-preset-google-workspace.md +13 -0
  170. package/docs/examples/domains/get-preset-i-cloud.md +13 -0
  171. package/docs/examples/domains/get-preset-mailgun.md +13 -0
  172. package/docs/examples/domains/get-preset-outlook.md +13 -0
  173. package/docs/examples/domains/get-preset-proton-mail.md +13 -0
  174. package/docs/examples/domains/get-preset-zoho.md +13 -0
  175. package/docs/examples/domains/get-record.md +14 -0
  176. package/docs/examples/domains/get-zone.md +13 -0
  177. package/docs/examples/domains/get.md +13 -0
  178. package/docs/examples/domains/list-records.md +14 -0
  179. package/docs/examples/domains/list.md +14 -0
  180. package/docs/examples/domains/update-nameservers.md +13 -0
  181. package/docs/examples/domains/update-record-a-a-a-a.md +18 -0
  182. package/docs/examples/domains/update-record-a.md +18 -0
  183. package/docs/examples/domains/update-record-alias.md +18 -0
  184. package/docs/examples/domains/update-record-c-a-a.md +18 -0
  185. package/docs/examples/domains/update-record-c-n-a-m-e.md +18 -0
  186. package/docs/examples/domains/update-record-h-t-t-p-s.md +18 -0
  187. package/docs/examples/domains/update-record-m-x.md +19 -0
  188. package/docs/examples/domains/update-record-n-s.md +18 -0
  189. package/docs/examples/domains/update-record-s-r-v.md +21 -0
  190. package/docs/examples/domains/update-record-t-x-t.md +18 -0
  191. package/docs/examples/domains/update-team.md +14 -0
  192. package/docs/examples/domains/update-zone.md +14 -0
  193. package/docs/examples/functions/create-deployment.md +1 -1
  194. package/docs/examples/functions/create-duplicate-deployment.md +15 -0
  195. package/docs/examples/functions/create-execution.md +1 -1
  196. package/docs/examples/functions/create-template-deployment.md +18 -0
  197. package/docs/examples/functions/create-variable.md +3 -2
  198. package/docs/examples/functions/create-vcs-deployment.md +16 -0
  199. package/docs/examples/functions/create.md +3 -3
  200. package/docs/examples/functions/delete-deployment.md +1 -1
  201. package/docs/examples/functions/delete-execution.md +1 -1
  202. package/docs/examples/functions/delete-variable.md +1 -1
  203. package/docs/examples/functions/delete.md +1 -1
  204. package/docs/examples/functions/get-deployment-download.md +4 -3
  205. package/docs/examples/functions/get-deployment.md +1 -1
  206. package/docs/examples/functions/get-execution.md +1 -1
  207. package/docs/examples/functions/get-template.md +1 -1
  208. package/docs/examples/functions/get-usage.md +2 -1
  209. package/docs/examples/functions/get-variable.md +1 -1
  210. package/docs/examples/functions/get.md +1 -1
  211. package/docs/examples/functions/list-deployments.md +1 -1
  212. package/docs/examples/functions/list-executions.md +2 -3
  213. package/docs/examples/functions/list-runtimes.md +1 -1
  214. package/docs/examples/functions/list-specifications.md +1 -1
  215. package/docs/examples/functions/list-templates.md +1 -1
  216. package/docs/examples/functions/list-usage.md +13 -0
  217. package/docs/examples/functions/list-variables.md +1 -1
  218. package/docs/examples/functions/list.md +1 -1
  219. package/docs/examples/functions/update-deployment-status.md +14 -0
  220. package/docs/examples/functions/update-function-deployment.md +14 -0
  221. package/docs/examples/functions/update-variable.md +3 -2
  222. package/docs/examples/functions/update.md +1 -1
  223. package/docs/examples/graphql/mutation.md +1 -1
  224. package/docs/examples/graphql/query.md +1 -1
  225. package/docs/examples/health/get-antivirus.md +1 -1
  226. package/docs/examples/health/get-cache.md +1 -1
  227. package/docs/examples/health/get-certificate.md +1 -1
  228. package/docs/examples/health/get-d-b.md +1 -1
  229. package/docs/examples/health/get-failed-jobs.md +1 -1
  230. package/docs/examples/health/get-pub-sub.md +1 -1
  231. package/docs/examples/health/get-queue-billing-aggregation.md +1 -1
  232. package/docs/examples/health/get-queue-builds.md +1 -1
  233. package/docs/examples/health/get-queue-certificates.md +1 -1
  234. package/docs/examples/health/get-queue-databases.md +1 -1
  235. package/docs/examples/health/get-queue-deletes.md +1 -1
  236. package/docs/examples/health/get-queue-functions.md +1 -1
  237. package/docs/examples/health/get-queue-logs.md +1 -1
  238. package/docs/examples/health/get-queue-mails.md +1 -1
  239. package/docs/examples/health/get-queue-messaging.md +1 -1
  240. package/docs/examples/health/get-queue-migrations.md +1 -1
  241. package/docs/examples/health/get-queue-priority-builds.md +1 -1
  242. package/docs/examples/health/get-queue-region-manager.md +13 -0
  243. package/docs/examples/health/get-queue-stats-resources.md +1 -1
  244. package/docs/examples/health/get-queue-usage.md +1 -1
  245. package/docs/examples/health/get-queue-webhooks.md +1 -1
  246. package/docs/examples/health/get-storage-local.md +1 -1
  247. package/docs/examples/health/get-storage.md +1 -1
  248. package/docs/examples/health/get-time.md +1 -1
  249. package/docs/examples/health/get.md +1 -1
  250. package/docs/examples/locale/get.md +1 -1
  251. package/docs/examples/locale/list-codes.md +1 -1
  252. package/docs/examples/locale/list-continents.md +1 -1
  253. package/docs/examples/locale/list-countries-e-u.md +1 -1
  254. package/docs/examples/locale/list-countries-phones.md +1 -1
  255. package/docs/examples/locale/list-countries.md +1 -1
  256. package/docs/examples/locale/list-currencies.md +1 -1
  257. package/docs/examples/locale/list-languages.md +1 -1
  258. package/docs/examples/messaging/create-apns-provider.md +1 -1
  259. package/docs/examples/messaging/create-email.md +1 -1
  260. package/docs/examples/messaging/create-fcm-provider.md +1 -1
  261. package/docs/examples/messaging/create-mailgun-provider.md +1 -1
  262. package/docs/examples/messaging/create-msg91provider.md +1 -1
  263. package/docs/examples/messaging/create-push.md +1 -1
  264. package/docs/examples/messaging/create-sendgrid-provider.md +1 -1
  265. package/docs/examples/messaging/create-sms.md +1 -1
  266. package/docs/examples/messaging/create-smtp-provider.md +1 -1
  267. package/docs/examples/messaging/create-subscriber.md +1 -1
  268. package/docs/examples/messaging/create-telesign-provider.md +1 -1
  269. package/docs/examples/messaging/create-textmagic-provider.md +1 -1
  270. package/docs/examples/messaging/create-topic.md +1 -1
  271. package/docs/examples/messaging/create-twilio-provider.md +1 -1
  272. package/docs/examples/messaging/create-vonage-provider.md +1 -1
  273. package/docs/examples/messaging/delete-provider.md +1 -1
  274. package/docs/examples/messaging/delete-subscriber.md +1 -1
  275. package/docs/examples/messaging/delete-topic.md +1 -1
  276. package/docs/examples/messaging/delete.md +1 -1
  277. package/docs/examples/messaging/get-message.md +1 -1
  278. package/docs/examples/messaging/get-provider.md +1 -1
  279. package/docs/examples/messaging/get-subscriber.md +1 -1
  280. package/docs/examples/messaging/get-topic.md +1 -1
  281. package/docs/examples/messaging/list-message-logs.md +1 -1
  282. package/docs/examples/messaging/list-messages.md +1 -1
  283. package/docs/examples/messaging/list-provider-logs.md +1 -1
  284. package/docs/examples/messaging/list-providers.md +1 -1
  285. package/docs/examples/messaging/list-subscriber-logs.md +1 -1
  286. package/docs/examples/messaging/list-subscribers.md +1 -1
  287. package/docs/examples/messaging/list-targets.md +1 -1
  288. package/docs/examples/messaging/list-topic-logs.md +1 -1
  289. package/docs/examples/messaging/list-topics.md +1 -1
  290. package/docs/examples/messaging/update-apns-provider.md +1 -1
  291. package/docs/examples/messaging/update-email.md +1 -1
  292. package/docs/examples/messaging/update-fcm-provider.md +1 -1
  293. package/docs/examples/messaging/update-mailgun-provider.md +1 -1
  294. package/docs/examples/messaging/update-msg91provider.md +1 -1
  295. package/docs/examples/messaging/update-push.md +1 -1
  296. package/docs/examples/messaging/update-sendgrid-provider.md +1 -1
  297. package/docs/examples/messaging/update-sms.md +1 -1
  298. package/docs/examples/messaging/update-smtp-provider.md +1 -1
  299. package/docs/examples/messaging/update-telesign-provider.md +1 -1
  300. package/docs/examples/messaging/update-textmagic-provider.md +1 -1
  301. package/docs/examples/messaging/update-topic.md +1 -1
  302. package/docs/examples/messaging/update-twilio-provider.md +1 -1
  303. package/docs/examples/messaging/update-vonage-provider.md +1 -1
  304. package/docs/examples/migrations/create-appwrite-migration.md +1 -1
  305. package/docs/examples/migrations/create-csv-migration.md +15 -0
  306. package/docs/examples/migrations/create-firebase-migration.md +1 -1
  307. package/docs/examples/migrations/create-n-host-migration.md +1 -1
  308. package/docs/examples/migrations/create-supabase-migration.md +1 -1
  309. package/docs/examples/migrations/delete.md +1 -1
  310. package/docs/examples/migrations/get-appwrite-report.md +1 -1
  311. package/docs/examples/migrations/get-firebase-report.md +1 -1
  312. package/docs/examples/migrations/get-n-host-report.md +1 -1
  313. package/docs/examples/migrations/get-supabase-report.md +1 -1
  314. package/docs/examples/migrations/get.md +1 -1
  315. package/docs/examples/migrations/list.md +1 -1
  316. package/docs/examples/migrations/retry.md +1 -1
  317. package/docs/examples/organizations/add-credit.md +1 -1
  318. package/docs/examples/organizations/create-invoice-payment.md +1 -1
  319. package/docs/examples/organizations/create.md +1 -1
  320. package/docs/examples/organizations/delete-backup-payment-method.md +1 -1
  321. package/docs/examples/organizations/delete-billing-address.md +1 -1
  322. package/docs/examples/organizations/delete-default-payment-method.md +1 -1
  323. package/docs/examples/organizations/delete.md +1 -1
  324. package/docs/examples/organizations/get-aggregation.md +1 -1
  325. package/docs/examples/organizations/get-billing-address.md +1 -1
  326. package/docs/examples/organizations/get-credit.md +1 -1
  327. package/docs/examples/organizations/get-invoice-download.md +1 -1
  328. package/docs/examples/organizations/get-invoice-view.md +1 -1
  329. package/docs/examples/organizations/get-invoice.md +1 -1
  330. package/docs/examples/organizations/get-payment-method.md +1 -1
  331. package/docs/examples/organizations/get-plan.md +1 -1
  332. package/docs/examples/organizations/get-scopes.md +1 -1
  333. package/docs/examples/organizations/list-aggregations.md +1 -1
  334. package/docs/examples/organizations/list-credits.md +1 -1
  335. package/docs/examples/organizations/list-invoices.md +1 -1
  336. package/docs/examples/organizations/list.md +1 -1
  337. package/docs/examples/organizations/set-backup-payment-method.md +1 -1
  338. package/docs/examples/organizations/set-billing-address.md +1 -1
  339. package/docs/examples/organizations/set-billing-email.md +1 -1
  340. package/docs/examples/organizations/set-billing-tax-id.md +1 -1
  341. package/docs/examples/organizations/set-default-payment-method.md +1 -1
  342. package/docs/examples/organizations/update-budget.md +1 -1
  343. package/docs/examples/organizations/update-plan.md +1 -1
  344. package/docs/examples/organizations/validate-invoice.md +14 -0
  345. package/docs/examples/project/create-variable.md +3 -2
  346. package/docs/examples/project/delete-variable.md +1 -1
  347. package/docs/examples/project/get-usage.md +1 -1
  348. package/docs/examples/project/get-variable.md +1 -1
  349. package/docs/examples/project/list-variables.md +1 -1
  350. package/docs/examples/project/update-variable.md +3 -2
  351. package/docs/examples/projects/create-dev-key.md +15 -0
  352. package/docs/examples/projects/create-j-w-t.md +1 -1
  353. package/docs/examples/projects/create-key.md +1 -1
  354. package/docs/examples/projects/create-platform.md +1 -1
  355. package/docs/examples/projects/create-smtp-test.md +1 -1
  356. package/docs/examples/projects/create-webhook.md +1 -1
  357. package/docs/examples/projects/create.md +2 -2
  358. package/docs/examples/projects/delete-dev-key.md +14 -0
  359. package/docs/examples/projects/delete-email-template.md +1 -1
  360. package/docs/examples/projects/delete-key.md +1 -1
  361. package/docs/examples/projects/delete-platform.md +1 -1
  362. package/docs/examples/projects/delete-sms-template.md +1 -1
  363. package/docs/examples/projects/delete-webhook.md +1 -1
  364. package/docs/examples/projects/delete.md +1 -1
  365. package/docs/examples/projects/get-dev-key.md +14 -0
  366. package/docs/examples/projects/get-email-template.md +1 -1
  367. package/docs/examples/projects/get-key.md +1 -1
  368. package/docs/examples/projects/get-platform.md +1 -1
  369. package/docs/examples/projects/get-sms-template.md +1 -1
  370. package/docs/examples/projects/get-webhook.md +1 -1
  371. package/docs/examples/projects/get.md +1 -1
  372. package/docs/examples/projects/list-dev-keys.md +14 -0
  373. package/docs/examples/projects/list-keys.md +1 -1
  374. package/docs/examples/projects/list-platforms.md +1 -1
  375. package/docs/examples/projects/list-webhooks.md +1 -1
  376. package/docs/examples/projects/list.md +1 -1
  377. package/docs/examples/projects/update-api-status-all.md +1 -1
  378. package/docs/examples/projects/update-api-status.md +1 -1
  379. package/docs/examples/projects/update-auth-duration.md +1 -1
  380. package/docs/examples/projects/update-auth-limit.md +1 -1
  381. package/docs/examples/projects/update-auth-password-dictionary.md +1 -1
  382. package/docs/examples/projects/update-auth-password-history.md +1 -1
  383. package/docs/examples/projects/update-auth-sessions-limit.md +1 -1
  384. package/docs/examples/projects/update-auth-status.md +1 -1
  385. package/docs/examples/projects/update-dev-key.md +16 -0
  386. package/docs/examples/projects/update-email-template.md +1 -1
  387. package/docs/examples/projects/update-key.md +1 -1
  388. package/docs/examples/projects/update-memberships-privacy.md +1 -1
  389. package/docs/examples/projects/update-mock-numbers.md +1 -1
  390. package/docs/examples/projects/update-o-auth2.md +1 -1
  391. package/docs/examples/projects/update-personal-data-check.md +1 -1
  392. package/docs/examples/projects/update-platform.md +1 -1
  393. package/docs/examples/projects/update-service-status-all.md +1 -1
  394. package/docs/examples/projects/update-service-status.md +1 -1
  395. package/docs/examples/projects/update-session-alerts.md +1 -1
  396. package/docs/examples/projects/update-sms-template.md +1 -1
  397. package/docs/examples/projects/update-smtp.md +1 -1
  398. package/docs/examples/projects/update-team.md +1 -1
  399. package/docs/examples/projects/update-webhook-signature.md +1 -1
  400. package/docs/examples/projects/update-webhook.md +1 -1
  401. package/docs/examples/projects/update.md +1 -1
  402. package/docs/examples/proxy/create-a-p-i-rule.md +13 -0
  403. package/docs/examples/proxy/create-function-rule.md +15 -0
  404. package/docs/examples/proxy/create-redirect-rule.md +15 -0
  405. package/docs/examples/proxy/create-site-rule.md +15 -0
  406. package/docs/examples/proxy/delete-rule.md +1 -1
  407. package/docs/examples/proxy/get-rule.md +1 -1
  408. package/docs/examples/proxy/list-rules.md +1 -1
  409. package/docs/examples/proxy/update-rule-verification.md +1 -1
  410. package/docs/examples/sites/create-deployment.md +18 -0
  411. package/docs/examples/sites/create-duplicate-deployment.md +14 -0
  412. package/docs/examples/sites/create-template-deployment.md +18 -0
  413. package/docs/examples/sites/create-variable.md +16 -0
  414. package/docs/examples/sites/create-vcs-deployment.md +16 -0
  415. package/docs/examples/sites/create.md +30 -0
  416. package/docs/examples/sites/delete-deployment.md +14 -0
  417. package/docs/examples/sites/delete-log.md +14 -0
  418. package/docs/examples/sites/delete-variable.md +14 -0
  419. package/docs/examples/sites/delete.md +13 -0
  420. package/docs/examples/sites/get-deployment-download.md +15 -0
  421. package/docs/examples/sites/get-deployment.md +14 -0
  422. package/docs/examples/sites/get-log.md +14 -0
  423. package/docs/examples/sites/get-template.md +13 -0
  424. package/docs/examples/sites/get-usage.md +14 -0
  425. package/docs/examples/sites/get-variable.md +14 -0
  426. package/docs/examples/sites/get.md +13 -0
  427. package/docs/examples/sites/list-deployments.md +15 -0
  428. package/docs/examples/sites/list-frameworks.md +11 -0
  429. package/docs/examples/sites/list-logs.md +14 -0
  430. package/docs/examples/sites/list-specifications.md +11 -0
  431. package/docs/examples/sites/list-templates.md +16 -0
  432. package/docs/examples/sites/list-usage.md +13 -0
  433. package/docs/examples/sites/list-variables.md +13 -0
  434. package/docs/examples/sites/list.md +14 -0
  435. package/docs/examples/sites/update-deployment-status.md +14 -0
  436. package/docs/examples/sites/update-site-deployment.md +14 -0
  437. package/docs/examples/sites/update-variable.md +17 -0
  438. package/docs/examples/sites/update.md +30 -0
  439. package/docs/examples/storage/create-bucket.md +1 -1
  440. package/docs/examples/storage/create-file.md +1 -1
  441. package/docs/examples/storage/delete-bucket.md +1 -1
  442. package/docs/examples/storage/delete-file.md +1 -1
  443. package/docs/examples/storage/get-bucket-usage.md +1 -1
  444. package/docs/examples/storage/get-bucket.md +1 -1
  445. package/docs/examples/storage/get-file-download.md +3 -2
  446. package/docs/examples/storage/get-file-preview.md +4 -3
  447. package/docs/examples/storage/get-file-view.md +3 -2
  448. package/docs/examples/storage/get-file.md +1 -1
  449. package/docs/examples/storage/get-usage.md +1 -1
  450. package/docs/examples/storage/list-buckets.md +1 -1
  451. package/docs/examples/storage/list-files.md +1 -1
  452. package/docs/examples/storage/update-bucket.md +1 -1
  453. package/docs/examples/storage/update-file.md +1 -1
  454. package/docs/examples/teams/create-membership.md +1 -1
  455. package/docs/examples/teams/create.md +1 -1
  456. package/docs/examples/teams/delete-membership.md +1 -1
  457. package/docs/examples/teams/delete.md +1 -1
  458. package/docs/examples/teams/get-membership.md +1 -1
  459. package/docs/examples/teams/get-prefs.md +1 -1
  460. package/docs/examples/teams/get.md +1 -1
  461. package/docs/examples/teams/list-logs.md +1 -1
  462. package/docs/examples/teams/list-memberships.md +1 -1
  463. package/docs/examples/teams/list.md +1 -1
  464. package/docs/examples/teams/update-membership-status.md +1 -1
  465. package/docs/examples/teams/update-membership.md +1 -1
  466. package/docs/examples/teams/update-name.md +1 -1
  467. package/docs/examples/teams/update-prefs.md +1 -1
  468. package/docs/examples/tokens/create-file-token.md +15 -0
  469. package/docs/examples/tokens/delete.md +13 -0
  470. package/docs/examples/tokens/get.md +13 -0
  471. package/docs/examples/tokens/list.md +15 -0
  472. package/docs/examples/tokens/update.md +14 -0
  473. package/docs/examples/users/create-argon2user.md +1 -1
  474. package/docs/examples/users/create-bcrypt-user.md +1 -1
  475. package/docs/examples/users/create-j-w-t.md +1 -1
  476. package/docs/examples/users/create-m-d5user.md +1 -1
  477. package/docs/examples/users/create-mfa-recovery-codes.md +1 -1
  478. package/docs/examples/users/create-p-h-pass-user.md +1 -1
  479. package/docs/examples/users/create-s-h-a-user.md +1 -1
  480. package/docs/examples/users/create-scrypt-modified-user.md +1 -1
  481. package/docs/examples/users/create-scrypt-user.md +1 -1
  482. package/docs/examples/users/create-session.md +1 -1
  483. package/docs/examples/users/create-target.md +1 -1
  484. package/docs/examples/users/create-token.md +1 -1
  485. package/docs/examples/users/create.md +1 -1
  486. package/docs/examples/users/delete-identity.md +1 -1
  487. package/docs/examples/users/delete-mfa-authenticator.md +1 -1
  488. package/docs/examples/users/delete-session.md +1 -1
  489. package/docs/examples/users/delete-sessions.md +1 -1
  490. package/docs/examples/users/delete-target.md +1 -1
  491. package/docs/examples/users/delete.md +1 -1
  492. package/docs/examples/users/get-mfa-recovery-codes.md +1 -1
  493. package/docs/examples/users/get-prefs.md +1 -1
  494. package/docs/examples/users/get-target.md +1 -1
  495. package/docs/examples/users/get-usage.md +1 -1
  496. package/docs/examples/users/get.md +1 -1
  497. package/docs/examples/users/list-identities.md +1 -1
  498. package/docs/examples/users/list-logs.md +1 -1
  499. package/docs/examples/users/list-memberships.md +4 -2
  500. package/docs/examples/users/list-mfa-factors.md +1 -1
  501. package/docs/examples/users/list-sessions.md +1 -1
  502. package/docs/examples/users/list-targets.md +1 -1
  503. package/docs/examples/users/list.md +1 -1
  504. package/docs/examples/users/update-email-verification.md +1 -1
  505. package/docs/examples/users/update-email.md +1 -1
  506. package/docs/examples/users/update-labels.md +1 -1
  507. package/docs/examples/users/update-mfa-recovery-codes.md +1 -1
  508. package/docs/examples/users/update-mfa.md +1 -1
  509. package/docs/examples/users/update-name.md +1 -1
  510. package/docs/examples/users/update-password.md +1 -1
  511. package/docs/examples/users/update-phone-verification.md +1 -1
  512. package/docs/examples/users/update-phone.md +1 -1
  513. package/docs/examples/users/update-prefs.md +1 -1
  514. package/docs/examples/users/update-status.md +1 -1
  515. package/docs/examples/users/update-target.md +1 -1
  516. package/docs/examples/vcs/create-repository-detection.md +3 -2
  517. package/docs/examples/vcs/create-repository.md +1 -1
  518. package/docs/examples/vcs/delete-installation.md +1 -1
  519. package/docs/examples/vcs/get-installation.md +1 -1
  520. package/docs/examples/vcs/get-repository-contents.md +1 -1
  521. package/docs/examples/vcs/get-repository.md +1 -1
  522. package/docs/examples/vcs/list-installations.md +1 -1
  523. package/docs/examples/vcs/list-repositories.md +3 -2
  524. package/docs/examples/vcs/list-repository-branches.md +1 -1
  525. package/docs/examples/vcs/update-external-deployments.md +1 -1
  526. package/package.json +1 -1
  527. package/src/client.ts +32 -5
  528. package/src/enums/adapter.ts +4 -0
  529. package/src/enums/api-service.ts +1 -0
  530. package/src/enums/build-runtime.ts +62 -0
  531. package/src/enums/console-resource-type.ts +3 -0
  532. package/src/enums/deployment-download-type.ts +4 -0
  533. package/src/enums/framework.ts +16 -0
  534. package/src/enums/image-format.ts +0 -1
  535. package/src/enums/name.ts +0 -1
  536. package/src/enums/o-auth-provider.ts +1 -0
  537. package/src/enums/region.ts +2 -1
  538. package/src/enums/runtime.ts +4 -3
  539. package/src/enums/site-usage-range.ts +5 -0
  540. package/src/enums/status-code.ts +6 -0
  541. package/src/enums/v-c-s-deployment-type.ts +5 -0
  542. package/src/enums/v-c-s-detection-type.ts +4 -0
  543. package/src/index.ts +13 -2
  544. package/src/models.ts +1171 -188
  545. package/src/services/account.ts +126 -446
  546. package/src/services/assistant.ts +2 -7
  547. package/src/services/avatars.ts +7 -28
  548. package/src/services/backups.ts +24 -90
  549. package/src/services/console.ts +48 -52
  550. package/src/services/databases.ts +241 -350
  551. package/src/services/domains.ts +1821 -0
  552. package/src/services/functions.ts +216 -248
  553. package/src/services/graphql.ts +4 -14
  554. package/src/services/health.ts +56 -206
  555. package/src/services/locale.ts +16 -64
  556. package/src/services/messaging.ts +92 -335
  557. package/src/services/migrations.ts +66 -89
  558. package/src/services/organizations.ts +84 -241
  559. package/src/services/project.ts +20 -45
  560. package/src/services/projects.ts +262 -330
  561. package/src/services/proxy.ts +129 -44
  562. package/src/services/sites.ts +1104 -0
  563. package/src/services/storage.ts +42 -105
  564. package/src/services/teams.ts +28 -104
  565. package/src/services/tokens.ts +160 -0
  566. package/src/services/users.ts +94 -313
  567. package/src/services/vcs.ts +70 -108
  568. package/types/enums/adapter.d.ts +4 -0
  569. package/types/enums/api-service.d.ts +1 -0
  570. package/types/enums/build-runtime.d.ts +62 -0
  571. package/types/enums/console-resource-type.d.ts +3 -0
  572. package/types/enums/deployment-download-type.d.ts +4 -0
  573. package/types/enums/framework.d.ts +16 -0
  574. package/types/enums/image-format.d.ts +0 -1
  575. package/types/enums/name.d.ts +0 -1
  576. package/types/enums/o-auth-provider.d.ts +1 -0
  577. package/types/enums/region.d.ts +3 -2
  578. package/types/enums/runtime.d.ts +5 -4
  579. package/types/enums/site-usage-range.d.ts +5 -0
  580. package/types/enums/status-code.d.ts +6 -0
  581. package/types/enums/v-c-s-deployment-type.d.ts +5 -0
  582. package/types/enums/v-c-s-detection-type.d.ts +4 -0
  583. package/types/index.d.ts +13 -2
  584. package/types/models.d.ts +1171 -188
  585. package/types/services/account.d.ts +4 -128
  586. package/types/services/assistant.d.ts +0 -2
  587. package/types/services/avatars.d.ts +0 -14
  588. package/types/services/backups.d.ts +0 -24
  589. package/types/services/console.d.ts +9 -13
  590. package/types/services/databases.d.ts +43 -97
  591. package/types/services/domains.d.ts +524 -0
  592. package/types/services/functions.d.ts +58 -84
  593. package/types/services/graphql.d.ts +0 -4
  594. package/types/services/health.d.ts +6 -56
  595. package/types/services/locale.d.ts +0 -16
  596. package/types/services/messaging.d.ts +0 -92
  597. package/types/services/migrations.d.ts +9 -23
  598. package/types/services/organizations.d.ts +11 -68
  599. package/types/services/project.d.ts +4 -14
  600. package/types/services/projects.d.ts +47 -91
  601. package/types/services/proxy.d.ts +31 -13
  602. package/types/services/sites.d.ts +319 -0
  603. package/types/services/storage.d.ts +6 -33
  604. package/types/services/teams.d.ts +0 -28
  605. package/types/services/tokens.d.ts +51 -0
  606. package/types/services/users.d.ts +3 -87
  607. package/types/services/vcs.d.ts +14 -31
@@ -14,8 +14,6 @@ export class Databases {
14
14
  }
15
15
 
16
16
  /**
17
- * List databases
18
- *
19
17
  * Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.
20
18
  *
21
19
  * @param {string[]} queries
@@ -23,7 +21,7 @@ export class Databases {
23
21
  * @throws {AppwriteException}
24
22
  * @returns {Promise<Models.DatabaseList>}
25
23
  */
26
- async list(queries?: string[], search?: string): Promise<Models.DatabaseList> {
24
+ list(queries?: string[], search?: string): Promise<Models.DatabaseList> {
27
25
  const apiPath = '/databases';
28
26
  const payload: Payload = {};
29
27
  if (typeof queries !== 'undefined') {
@@ -35,13 +33,9 @@ export class Databases {
35
33
  const uri = new URL(this.client.config.endpoint + apiPath);
36
34
 
37
35
  const apiHeaders: { [header: string]: string } = {
38
- 'content-type': 'application/json',
39
36
  }
40
37
 
41
- payload['project'] = this.client.config.project;
42
-
43
-
44
- return await this.client.call(
38
+ return this.client.call(
45
39
  'get',
46
40
  uri,
47
41
  apiHeaders,
@@ -49,8 +43,6 @@ export class Databases {
49
43
  );
50
44
  }
51
45
  /**
52
- * Create database
53
- *
54
46
  * Create a new Database.
55
47
 
56
48
  *
@@ -60,7 +52,7 @@ export class Databases {
60
52
  * @throws {AppwriteException}
61
53
  * @returns {Promise<Models.Database>}
62
54
  */
63
- async create(databaseId: string, name: string, enabled?: boolean): Promise<Models.Database> {
55
+ create(databaseId: string, name: string, enabled?: boolean): Promise<Models.Database> {
64
56
  if (typeof databaseId === 'undefined') {
65
57
  throw new AppwriteException('Missing required parameter: "databaseId"');
66
58
  }
@@ -84,10 +76,7 @@ export class Databases {
84
76
  'content-type': 'application/json',
85
77
  }
86
78
 
87
- payload['project'] = this.client.config.project;
88
-
89
-
90
- return await this.client.call(
79
+ return this.client.call(
91
80
  'post',
92
81
  uri,
93
82
  apiHeaders,
@@ -95,15 +84,13 @@ export class Databases {
95
84
  );
96
85
  }
97
86
  /**
98
- * Get databases usage stats
99
- *
100
87
  * Get usage metrics and statistics for all databases in the project. You can view the total number of databases, collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.
101
88
  *
102
89
  * @param {DatabaseUsageRange} range
103
90
  * @throws {AppwriteException}
104
91
  * @returns {Promise<Models.UsageDatabases>}
105
92
  */
106
- async getUsage(range?: DatabaseUsageRange): Promise<Models.UsageDatabases> {
93
+ getUsage(range?: DatabaseUsageRange): Promise<Models.UsageDatabases> {
107
94
  const apiPath = '/databases/usage';
108
95
  const payload: Payload = {};
109
96
  if (typeof range !== 'undefined') {
@@ -112,13 +99,9 @@ export class Databases {
112
99
  const uri = new URL(this.client.config.endpoint + apiPath);
113
100
 
114
101
  const apiHeaders: { [header: string]: string } = {
115
- 'content-type': 'application/json',
116
102
  }
117
103
 
118
- payload['project'] = this.client.config.project;
119
-
120
-
121
- return await this.client.call(
104
+ return this.client.call(
122
105
  'get',
123
106
  uri,
124
107
  apiHeaders,
@@ -126,15 +109,13 @@ export class Databases {
126
109
  );
127
110
  }
128
111
  /**
129
- * Get database
130
- *
131
112
  * Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.
132
113
  *
133
114
  * @param {string} databaseId
134
115
  * @throws {AppwriteException}
135
116
  * @returns {Promise<Models.Database>}
136
117
  */
137
- async get(databaseId: string): Promise<Models.Database> {
118
+ get(databaseId: string): Promise<Models.Database> {
138
119
  if (typeof databaseId === 'undefined') {
139
120
  throw new AppwriteException('Missing required parameter: "databaseId"');
140
121
  }
@@ -143,13 +124,9 @@ export class Databases {
143
124
  const uri = new URL(this.client.config.endpoint + apiPath);
144
125
 
145
126
  const apiHeaders: { [header: string]: string } = {
146
- 'content-type': 'application/json',
147
127
  }
148
128
 
149
- payload['project'] = this.client.config.project;
150
-
151
-
152
- return await this.client.call(
129
+ return this.client.call(
153
130
  'get',
154
131
  uri,
155
132
  apiHeaders,
@@ -157,8 +134,6 @@ export class Databases {
157
134
  );
158
135
  }
159
136
  /**
160
- * Update database
161
- *
162
137
  * Update a database by its unique ID.
163
138
  *
164
139
  * @param {string} databaseId
@@ -167,7 +142,7 @@ export class Databases {
167
142
  * @throws {AppwriteException}
168
143
  * @returns {Promise<Models.Database>}
169
144
  */
170
- async update(databaseId: string, name: string, enabled?: boolean): Promise<Models.Database> {
145
+ update(databaseId: string, name: string, enabled?: boolean): Promise<Models.Database> {
171
146
  if (typeof databaseId === 'undefined') {
172
147
  throw new AppwriteException('Missing required parameter: "databaseId"');
173
148
  }
@@ -188,10 +163,7 @@ export class Databases {
188
163
  'content-type': 'application/json',
189
164
  }
190
165
 
191
- payload['project'] = this.client.config.project;
192
-
193
-
194
- return await this.client.call(
166
+ return this.client.call(
195
167
  'put',
196
168
  uri,
197
169
  apiHeaders,
@@ -199,15 +171,13 @@ export class Databases {
199
171
  );
200
172
  }
201
173
  /**
202
- * Delete database
203
- *
204
174
  * Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.
205
175
  *
206
176
  * @param {string} databaseId
207
177
  * @throws {AppwriteException}
208
178
  * @returns {Promise<{}>}
209
179
  */
210
- async delete(databaseId: string): Promise<{}> {
180
+ delete(databaseId: string): Promise<{}> {
211
181
  if (typeof databaseId === 'undefined') {
212
182
  throw new AppwriteException('Missing required parameter: "databaseId"');
213
183
  }
@@ -219,10 +189,7 @@ export class Databases {
219
189
  'content-type': 'application/json',
220
190
  }
221
191
 
222
- payload['project'] = this.client.config.project;
223
-
224
-
225
- return await this.client.call(
192
+ return this.client.call(
226
193
  'delete',
227
194
  uri,
228
195
  apiHeaders,
@@ -230,8 +197,6 @@ export class Databases {
230
197
  );
231
198
  }
232
199
  /**
233
- * List collections
234
- *
235
200
  * Get a list of all collections that belong to the provided databaseId. You can use the search parameter to filter your results.
236
201
  *
237
202
  * @param {string} databaseId
@@ -240,7 +205,7 @@ export class Databases {
240
205
  * @throws {AppwriteException}
241
206
  * @returns {Promise<Models.CollectionList>}
242
207
  */
243
- async listCollections(databaseId: string, queries?: string[], search?: string): Promise<Models.CollectionList> {
208
+ listCollections(databaseId: string, queries?: string[], search?: string): Promise<Models.CollectionList> {
244
209
  if (typeof databaseId === 'undefined') {
245
210
  throw new AppwriteException('Missing required parameter: "databaseId"');
246
211
  }
@@ -255,13 +220,9 @@ export class Databases {
255
220
  const uri = new URL(this.client.config.endpoint + apiPath);
256
221
 
257
222
  const apiHeaders: { [header: string]: string } = {
258
- 'content-type': 'application/json',
259
223
  }
260
224
 
261
- payload['project'] = this.client.config.project;
262
-
263
-
264
- return await this.client.call(
225
+ return this.client.call(
265
226
  'get',
266
227
  uri,
267
228
  apiHeaders,
@@ -269,8 +230,6 @@ export class Databases {
269
230
  );
270
231
  }
271
232
  /**
272
- * Create collection
273
- *
274
233
  * Create a new Collection. Before using this route, you should create a new database resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console.
275
234
  *
276
235
  * @param {string} databaseId
@@ -282,7 +241,7 @@ export class Databases {
282
241
  * @throws {AppwriteException}
283
242
  * @returns {Promise<Models.Collection>}
284
243
  */
285
- async createCollection(databaseId: string, collectionId: string, name: string, permissions?: string[], documentSecurity?: boolean, enabled?: boolean): Promise<Models.Collection> {
244
+ createCollection(databaseId: string, collectionId: string, name: string, permissions?: string[], documentSecurity?: boolean, enabled?: boolean): Promise<Models.Collection> {
286
245
  if (typeof databaseId === 'undefined') {
287
246
  throw new AppwriteException('Missing required parameter: "databaseId"');
288
247
  }
@@ -315,10 +274,7 @@ export class Databases {
315
274
  'content-type': 'application/json',
316
275
  }
317
276
 
318
- payload['project'] = this.client.config.project;
319
-
320
-
321
- return await this.client.call(
277
+ return this.client.call(
322
278
  'post',
323
279
  uri,
324
280
  apiHeaders,
@@ -326,8 +282,6 @@ export class Databases {
326
282
  );
327
283
  }
328
284
  /**
329
- * Get collection
330
- *
331
285
  * Get a collection by its unique ID. This endpoint response returns a JSON object with the collection metadata.
332
286
  *
333
287
  * @param {string} databaseId
@@ -335,7 +289,7 @@ export class Databases {
335
289
  * @throws {AppwriteException}
336
290
  * @returns {Promise<Models.Collection>}
337
291
  */
338
- async getCollection(databaseId: string, collectionId: string): Promise<Models.Collection> {
292
+ getCollection(databaseId: string, collectionId: string): Promise<Models.Collection> {
339
293
  if (typeof databaseId === 'undefined') {
340
294
  throw new AppwriteException('Missing required parameter: "databaseId"');
341
295
  }
@@ -347,13 +301,9 @@ export class Databases {
347
301
  const uri = new URL(this.client.config.endpoint + apiPath);
348
302
 
349
303
  const apiHeaders: { [header: string]: string } = {
350
- 'content-type': 'application/json',
351
304
  }
352
305
 
353
- payload['project'] = this.client.config.project;
354
-
355
-
356
- return await this.client.call(
306
+ return this.client.call(
357
307
  'get',
358
308
  uri,
359
309
  apiHeaders,
@@ -361,8 +311,6 @@ export class Databases {
361
311
  );
362
312
  }
363
313
  /**
364
- * Update collection
365
- *
366
314
  * Update a collection by its unique ID.
367
315
  *
368
316
  * @param {string} databaseId
@@ -374,7 +322,7 @@ export class Databases {
374
322
  * @throws {AppwriteException}
375
323
  * @returns {Promise<Models.Collection>}
376
324
  */
377
- async updateCollection(databaseId: string, collectionId: string, name: string, permissions?: string[], documentSecurity?: boolean, enabled?: boolean): Promise<Models.Collection> {
325
+ updateCollection(databaseId: string, collectionId: string, name: string, permissions?: string[], documentSecurity?: boolean, enabled?: boolean): Promise<Models.Collection> {
378
326
  if (typeof databaseId === 'undefined') {
379
327
  throw new AppwriteException('Missing required parameter: "databaseId"');
380
328
  }
@@ -404,10 +352,7 @@ export class Databases {
404
352
  'content-type': 'application/json',
405
353
  }
406
354
 
407
- payload['project'] = this.client.config.project;
408
-
409
-
410
- return await this.client.call(
355
+ return this.client.call(
411
356
  'put',
412
357
  uri,
413
358
  apiHeaders,
@@ -415,8 +360,6 @@ export class Databases {
415
360
  );
416
361
  }
417
362
  /**
418
- * Delete collection
419
- *
420
363
  * Delete a collection by its unique ID. Only users with write permissions have access to delete this resource.
421
364
  *
422
365
  * @param {string} databaseId
@@ -424,7 +367,7 @@ export class Databases {
424
367
  * @throws {AppwriteException}
425
368
  * @returns {Promise<{}>}
426
369
  */
427
- async deleteCollection(databaseId: string, collectionId: string): Promise<{}> {
370
+ deleteCollection(databaseId: string, collectionId: string): Promise<{}> {
428
371
  if (typeof databaseId === 'undefined') {
429
372
  throw new AppwriteException('Missing required parameter: "databaseId"');
430
373
  }
@@ -439,10 +382,7 @@ export class Databases {
439
382
  'content-type': 'application/json',
440
383
  }
441
384
 
442
- payload['project'] = this.client.config.project;
443
-
444
-
445
- return await this.client.call(
385
+ return this.client.call(
446
386
  'delete',
447
387
  uri,
448
388
  apiHeaders,
@@ -450,8 +390,6 @@ export class Databases {
450
390
  );
451
391
  }
452
392
  /**
453
- * List attributes
454
- *
455
393
  * List attributes in the collection.
456
394
  *
457
395
  * @param {string} databaseId
@@ -460,7 +398,7 @@ export class Databases {
460
398
  * @throws {AppwriteException}
461
399
  * @returns {Promise<Models.AttributeList>}
462
400
  */
463
- async listAttributes(databaseId: string, collectionId: string, queries?: string[]): Promise<Models.AttributeList> {
401
+ listAttributes(databaseId: string, collectionId: string, queries?: string[]): Promise<Models.AttributeList> {
464
402
  if (typeof databaseId === 'undefined') {
465
403
  throw new AppwriteException('Missing required parameter: "databaseId"');
466
404
  }
@@ -475,13 +413,9 @@ export class Databases {
475
413
  const uri = new URL(this.client.config.endpoint + apiPath);
476
414
 
477
415
  const apiHeaders: { [header: string]: string } = {
478
- 'content-type': 'application/json',
479
416
  }
480
417
 
481
- payload['project'] = this.client.config.project;
482
-
483
-
484
- return await this.client.call(
418
+ return this.client.call(
485
419
  'get',
486
420
  uri,
487
421
  apiHeaders,
@@ -489,8 +423,6 @@ export class Databases {
489
423
  );
490
424
  }
491
425
  /**
492
- * Create boolean attribute
493
- *
494
426
  * Create a boolean attribute.
495
427
 
496
428
  *
@@ -503,7 +435,7 @@ export class Databases {
503
435
  * @throws {AppwriteException}
504
436
  * @returns {Promise<Models.AttributeBoolean>}
505
437
  */
506
- async createBooleanAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: boolean, array?: boolean): Promise<Models.AttributeBoolean> {
438
+ createBooleanAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: boolean, array?: boolean): Promise<Models.AttributeBoolean> {
507
439
  if (typeof databaseId === 'undefined') {
508
440
  throw new AppwriteException('Missing required parameter: "databaseId"');
509
441
  }
@@ -536,10 +468,7 @@ export class Databases {
536
468
  'content-type': 'application/json',
537
469
  }
538
470
 
539
- payload['project'] = this.client.config.project;
540
-
541
-
542
- return await this.client.call(
471
+ return this.client.call(
543
472
  'post',
544
473
  uri,
545
474
  apiHeaders,
@@ -547,8 +476,6 @@ export class Databases {
547
476
  );
548
477
  }
549
478
  /**
550
- * Update boolean attribute
551
- *
552
479
  * Update a boolean attribute. Changing the `default` value will not update already existing documents.
553
480
  *
554
481
  * @param {string} databaseId
@@ -560,7 +487,7 @@ export class Databases {
560
487
  * @throws {AppwriteException}
561
488
  * @returns {Promise<Models.AttributeBoolean>}
562
489
  */
563
- async updateBooleanAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: boolean, newKey?: string): Promise<Models.AttributeBoolean> {
490
+ updateBooleanAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: boolean, newKey?: string): Promise<Models.AttributeBoolean> {
564
491
  if (typeof databaseId === 'undefined') {
565
492
  throw new AppwriteException('Missing required parameter: "databaseId"');
566
493
  }
@@ -593,10 +520,7 @@ export class Databases {
593
520
  'content-type': 'application/json',
594
521
  }
595
522
 
596
- payload['project'] = this.client.config.project;
597
-
598
-
599
- return await this.client.call(
523
+ return this.client.call(
600
524
  'patch',
601
525
  uri,
602
526
  apiHeaders,
@@ -604,8 +528,6 @@ export class Databases {
604
528
  );
605
529
  }
606
530
  /**
607
- * Create datetime attribute
608
- *
609
531
  * Create a date time attribute according to the ISO 8601 standard.
610
532
  *
611
533
  * @param {string} databaseId
@@ -617,7 +539,7 @@ export class Databases {
617
539
  * @throws {AppwriteException}
618
540
  * @returns {Promise<Models.AttributeDatetime>}
619
541
  */
620
- async createDatetimeAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean): Promise<Models.AttributeDatetime> {
542
+ createDatetimeAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean): Promise<Models.AttributeDatetime> {
621
543
  if (typeof databaseId === 'undefined') {
622
544
  throw new AppwriteException('Missing required parameter: "databaseId"');
623
545
  }
@@ -650,10 +572,7 @@ export class Databases {
650
572
  'content-type': 'application/json',
651
573
  }
652
574
 
653
- payload['project'] = this.client.config.project;
654
-
655
-
656
- return await this.client.call(
575
+ return this.client.call(
657
576
  'post',
658
577
  uri,
659
578
  apiHeaders,
@@ -661,8 +580,6 @@ export class Databases {
661
580
  );
662
581
  }
663
582
  /**
664
- * Update dateTime attribute
665
- *
666
583
  * Update a date time attribute. Changing the `default` value will not update already existing documents.
667
584
  *
668
585
  * @param {string} databaseId
@@ -674,7 +591,7 @@ export class Databases {
674
591
  * @throws {AppwriteException}
675
592
  * @returns {Promise<Models.AttributeDatetime>}
676
593
  */
677
- async updateDatetimeAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, newKey?: string): Promise<Models.AttributeDatetime> {
594
+ updateDatetimeAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, newKey?: string): Promise<Models.AttributeDatetime> {
678
595
  if (typeof databaseId === 'undefined') {
679
596
  throw new AppwriteException('Missing required parameter: "databaseId"');
680
597
  }
@@ -707,10 +624,7 @@ export class Databases {
707
624
  'content-type': 'application/json',
708
625
  }
709
626
 
710
- payload['project'] = this.client.config.project;
711
-
712
-
713
- return await this.client.call(
627
+ return this.client.call(
714
628
  'patch',
715
629
  uri,
716
630
  apiHeaders,
@@ -718,8 +632,6 @@ export class Databases {
718
632
  );
719
633
  }
720
634
  /**
721
- * Create email attribute
722
- *
723
635
  * Create an email attribute.
724
636
 
725
637
  *
@@ -732,7 +644,7 @@ export class Databases {
732
644
  * @throws {AppwriteException}
733
645
  * @returns {Promise<Models.AttributeEmail>}
734
646
  */
735
- async createEmailAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean): Promise<Models.AttributeEmail> {
647
+ createEmailAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean): Promise<Models.AttributeEmail> {
736
648
  if (typeof databaseId === 'undefined') {
737
649
  throw new AppwriteException('Missing required parameter: "databaseId"');
738
650
  }
@@ -765,10 +677,7 @@ export class Databases {
765
677
  'content-type': 'application/json',
766
678
  }
767
679
 
768
- payload['project'] = this.client.config.project;
769
-
770
-
771
- return await this.client.call(
680
+ return this.client.call(
772
681
  'post',
773
682
  uri,
774
683
  apiHeaders,
@@ -776,8 +685,6 @@ export class Databases {
776
685
  );
777
686
  }
778
687
  /**
779
- * Update email attribute
780
- *
781
688
  * Update an email attribute. Changing the `default` value will not update already existing documents.
782
689
 
783
690
  *
@@ -790,7 +697,7 @@ export class Databases {
790
697
  * @throws {AppwriteException}
791
698
  * @returns {Promise<Models.AttributeEmail>}
792
699
  */
793
- async updateEmailAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, newKey?: string): Promise<Models.AttributeEmail> {
700
+ updateEmailAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, newKey?: string): Promise<Models.AttributeEmail> {
794
701
  if (typeof databaseId === 'undefined') {
795
702
  throw new AppwriteException('Missing required parameter: "databaseId"');
796
703
  }
@@ -823,10 +730,7 @@ export class Databases {
823
730
  'content-type': 'application/json',
824
731
  }
825
732
 
826
- payload['project'] = this.client.config.project;
827
-
828
-
829
- return await this.client.call(
733
+ return this.client.call(
830
734
  'patch',
831
735
  uri,
832
736
  apiHeaders,
@@ -834,8 +738,6 @@ export class Databases {
834
738
  );
835
739
  }
836
740
  /**
837
- * Create enum attribute
838
- *
839
741
  * Create an enumeration attribute. The `elements` param acts as a white-list of accepted values for this attribute.
840
742
 
841
743
  *
@@ -849,7 +751,7 @@ export class Databases {
849
751
  * @throws {AppwriteException}
850
752
  * @returns {Promise<Models.AttributeEnum>}
851
753
  */
852
- async createEnumAttribute(databaseId: string, collectionId: string, key: string, elements: string[], required: boolean, xdefault?: string, array?: boolean): Promise<Models.AttributeEnum> {
754
+ createEnumAttribute(databaseId: string, collectionId: string, key: string, elements: string[], required: boolean, xdefault?: string, array?: boolean): Promise<Models.AttributeEnum> {
853
755
  if (typeof databaseId === 'undefined') {
854
756
  throw new AppwriteException('Missing required parameter: "databaseId"');
855
757
  }
@@ -888,10 +790,7 @@ export class Databases {
888
790
  'content-type': 'application/json',
889
791
  }
890
792
 
891
- payload['project'] = this.client.config.project;
892
-
893
-
894
- return await this.client.call(
793
+ return this.client.call(
895
794
  'post',
896
795
  uri,
897
796
  apiHeaders,
@@ -899,8 +798,6 @@ export class Databases {
899
798
  );
900
799
  }
901
800
  /**
902
- * Update enum attribute
903
- *
904
801
  * Update an enum attribute. Changing the `default` value will not update already existing documents.
905
802
 
906
803
  *
@@ -914,7 +811,7 @@ export class Databases {
914
811
  * @throws {AppwriteException}
915
812
  * @returns {Promise<Models.AttributeEnum>}
916
813
  */
917
- async updateEnumAttribute(databaseId: string, collectionId: string, key: string, elements: string[], required: boolean, xdefault?: string, newKey?: string): Promise<Models.AttributeEnum> {
814
+ updateEnumAttribute(databaseId: string, collectionId: string, key: string, elements: string[], required: boolean, xdefault?: string, newKey?: string): Promise<Models.AttributeEnum> {
918
815
  if (typeof databaseId === 'undefined') {
919
816
  throw new AppwriteException('Missing required parameter: "databaseId"');
920
817
  }
@@ -953,10 +850,7 @@ export class Databases {
953
850
  'content-type': 'application/json',
954
851
  }
955
852
 
956
- payload['project'] = this.client.config.project;
957
-
958
-
959
- return await this.client.call(
853
+ return this.client.call(
960
854
  'patch',
961
855
  uri,
962
856
  apiHeaders,
@@ -964,8 +858,6 @@ export class Databases {
964
858
  );
965
859
  }
966
860
  /**
967
- * Create float attribute
968
- *
969
861
  * Create a float attribute. Optionally, minimum and maximum values can be provided.
970
862
 
971
863
  *
@@ -980,7 +872,7 @@ export class Databases {
980
872
  * @throws {AppwriteException}
981
873
  * @returns {Promise<Models.AttributeFloat>}
982
874
  */
983
- async createFloatAttribute(databaseId: string, collectionId: string, key: string, required: boolean, min?: number, max?: number, xdefault?: number, array?: boolean): Promise<Models.AttributeFloat> {
875
+ createFloatAttribute(databaseId: string, collectionId: string, key: string, required: boolean, min?: number, max?: number, xdefault?: number, array?: boolean): Promise<Models.AttributeFloat> {
984
876
  if (typeof databaseId === 'undefined') {
985
877
  throw new AppwriteException('Missing required parameter: "databaseId"');
986
878
  }
@@ -1019,10 +911,7 @@ export class Databases {
1019
911
  'content-type': 'application/json',
1020
912
  }
1021
913
 
1022
- payload['project'] = this.client.config.project;
1023
-
1024
-
1025
- return await this.client.call(
914
+ return this.client.call(
1026
915
  'post',
1027
916
  uri,
1028
917
  apiHeaders,
@@ -1030,8 +919,6 @@ export class Databases {
1030
919
  );
1031
920
  }
1032
921
  /**
1033
- * Update float attribute
1034
- *
1035
922
  * Update a float attribute. Changing the `default` value will not update already existing documents.
1036
923
 
1037
924
  *
@@ -1046,7 +933,7 @@ export class Databases {
1046
933
  * @throws {AppwriteException}
1047
934
  * @returns {Promise<Models.AttributeFloat>}
1048
935
  */
1049
- async updateFloatAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: number, min?: number, max?: number, newKey?: string): Promise<Models.AttributeFloat> {
936
+ updateFloatAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: number, min?: number, max?: number, newKey?: string): Promise<Models.AttributeFloat> {
1050
937
  if (typeof databaseId === 'undefined') {
1051
938
  throw new AppwriteException('Missing required parameter: "databaseId"');
1052
939
  }
@@ -1085,10 +972,7 @@ export class Databases {
1085
972
  'content-type': 'application/json',
1086
973
  }
1087
974
 
1088
- payload['project'] = this.client.config.project;
1089
-
1090
-
1091
- return await this.client.call(
975
+ return this.client.call(
1092
976
  'patch',
1093
977
  uri,
1094
978
  apiHeaders,
@@ -1096,8 +980,6 @@ export class Databases {
1096
980
  );
1097
981
  }
1098
982
  /**
1099
- * Create integer attribute
1100
- *
1101
983
  * Create an integer attribute. Optionally, minimum and maximum values can be provided.
1102
984
 
1103
985
  *
@@ -1112,7 +994,7 @@ export class Databases {
1112
994
  * @throws {AppwriteException}
1113
995
  * @returns {Promise<Models.AttributeInteger>}
1114
996
  */
1115
- async createIntegerAttribute(databaseId: string, collectionId: string, key: string, required: boolean, min?: number, max?: number, xdefault?: number, array?: boolean): Promise<Models.AttributeInteger> {
997
+ createIntegerAttribute(databaseId: string, collectionId: string, key: string, required: boolean, min?: number, max?: number, xdefault?: number, array?: boolean): Promise<Models.AttributeInteger> {
1116
998
  if (typeof databaseId === 'undefined') {
1117
999
  throw new AppwriteException('Missing required parameter: "databaseId"');
1118
1000
  }
@@ -1151,10 +1033,7 @@ export class Databases {
1151
1033
  'content-type': 'application/json',
1152
1034
  }
1153
1035
 
1154
- payload['project'] = this.client.config.project;
1155
-
1156
-
1157
- return await this.client.call(
1036
+ return this.client.call(
1158
1037
  'post',
1159
1038
  uri,
1160
1039
  apiHeaders,
@@ -1162,8 +1041,6 @@ export class Databases {
1162
1041
  );
1163
1042
  }
1164
1043
  /**
1165
- * Update integer attribute
1166
- *
1167
1044
  * Update an integer attribute. Changing the `default` value will not update already existing documents.
1168
1045
 
1169
1046
  *
@@ -1178,7 +1055,7 @@ export class Databases {
1178
1055
  * @throws {AppwriteException}
1179
1056
  * @returns {Promise<Models.AttributeInteger>}
1180
1057
  */
1181
- async updateIntegerAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: number, min?: number, max?: number, newKey?: string): Promise<Models.AttributeInteger> {
1058
+ updateIntegerAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: number, min?: number, max?: number, newKey?: string): Promise<Models.AttributeInteger> {
1182
1059
  if (typeof databaseId === 'undefined') {
1183
1060
  throw new AppwriteException('Missing required parameter: "databaseId"');
1184
1061
  }
@@ -1217,10 +1094,7 @@ export class Databases {
1217
1094
  'content-type': 'application/json',
1218
1095
  }
1219
1096
 
1220
- payload['project'] = this.client.config.project;
1221
-
1222
-
1223
- return await this.client.call(
1097
+ return this.client.call(
1224
1098
  'patch',
1225
1099
  uri,
1226
1100
  apiHeaders,
@@ -1228,8 +1102,6 @@ export class Databases {
1228
1102
  );
1229
1103
  }
1230
1104
  /**
1231
- * Create IP address attribute
1232
- *
1233
1105
  * Create IP address attribute.
1234
1106
 
1235
1107
  *
@@ -1242,7 +1114,7 @@ export class Databases {
1242
1114
  * @throws {AppwriteException}
1243
1115
  * @returns {Promise<Models.AttributeIp>}
1244
1116
  */
1245
- async createIpAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean): Promise<Models.AttributeIp> {
1117
+ createIpAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean): Promise<Models.AttributeIp> {
1246
1118
  if (typeof databaseId === 'undefined') {
1247
1119
  throw new AppwriteException('Missing required parameter: "databaseId"');
1248
1120
  }
@@ -1275,10 +1147,7 @@ export class Databases {
1275
1147
  'content-type': 'application/json',
1276
1148
  }
1277
1149
 
1278
- payload['project'] = this.client.config.project;
1279
-
1280
-
1281
- return await this.client.call(
1150
+ return this.client.call(
1282
1151
  'post',
1283
1152
  uri,
1284
1153
  apiHeaders,
@@ -1286,8 +1155,6 @@ export class Databases {
1286
1155
  );
1287
1156
  }
1288
1157
  /**
1289
- * Update IP address attribute
1290
- *
1291
1158
  * Update an ip attribute. Changing the `default` value will not update already existing documents.
1292
1159
 
1293
1160
  *
@@ -1300,7 +1167,7 @@ export class Databases {
1300
1167
  * @throws {AppwriteException}
1301
1168
  * @returns {Promise<Models.AttributeIp>}
1302
1169
  */
1303
- async updateIpAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, newKey?: string): Promise<Models.AttributeIp> {
1170
+ updateIpAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, newKey?: string): Promise<Models.AttributeIp> {
1304
1171
  if (typeof databaseId === 'undefined') {
1305
1172
  throw new AppwriteException('Missing required parameter: "databaseId"');
1306
1173
  }
@@ -1333,10 +1200,7 @@ export class Databases {
1333
1200
  'content-type': 'application/json',
1334
1201
  }
1335
1202
 
1336
- payload['project'] = this.client.config.project;
1337
-
1338
-
1339
- return await this.client.call(
1203
+ return this.client.call(
1340
1204
  'patch',
1341
1205
  uri,
1342
1206
  apiHeaders,
@@ -1344,8 +1208,6 @@ export class Databases {
1344
1208
  );
1345
1209
  }
1346
1210
  /**
1347
- * Create relationship attribute
1348
- *
1349
1211
  * Create relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes).
1350
1212
 
1351
1213
  *
@@ -1360,7 +1222,7 @@ export class Databases {
1360
1222
  * @throws {AppwriteException}
1361
1223
  * @returns {Promise<Models.AttributeRelationship>}
1362
1224
  */
1363
- async createRelationshipAttribute(databaseId: string, collectionId: string, relatedCollectionId: string, type: RelationshipType, twoWay?: boolean, key?: string, twoWayKey?: string, onDelete?: RelationMutate): Promise<Models.AttributeRelationship> {
1225
+ createRelationshipAttribute(databaseId: string, collectionId: string, relatedCollectionId: string, type: RelationshipType, twoWay?: boolean, key?: string, twoWayKey?: string, onDelete?: RelationMutate): Promise<Models.AttributeRelationship> {
1364
1226
  if (typeof databaseId === 'undefined') {
1365
1227
  throw new AppwriteException('Missing required parameter: "databaseId"');
1366
1228
  }
@@ -1399,10 +1261,7 @@ export class Databases {
1399
1261
  'content-type': 'application/json',
1400
1262
  }
1401
1263
 
1402
- payload['project'] = this.client.config.project;
1403
-
1404
-
1405
- return await this.client.call(
1264
+ return this.client.call(
1406
1265
  'post',
1407
1266
  uri,
1408
1267
  apiHeaders,
@@ -1410,8 +1269,6 @@ export class Databases {
1410
1269
  );
1411
1270
  }
1412
1271
  /**
1413
- * Create string attribute
1414
- *
1415
1272
  * Create a string attribute.
1416
1273
 
1417
1274
  *
@@ -1426,7 +1283,7 @@ export class Databases {
1426
1283
  * @throws {AppwriteException}
1427
1284
  * @returns {Promise<Models.AttributeString>}
1428
1285
  */
1429
- async createStringAttribute(databaseId: string, collectionId: string, key: string, size: number, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean): Promise<Models.AttributeString> {
1286
+ createStringAttribute(databaseId: string, collectionId: string, key: string, size: number, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean): Promise<Models.AttributeString> {
1430
1287
  if (typeof databaseId === 'undefined') {
1431
1288
  throw new AppwriteException('Missing required parameter: "databaseId"');
1432
1289
  }
@@ -1468,10 +1325,7 @@ export class Databases {
1468
1325
  'content-type': 'application/json',
1469
1326
  }
1470
1327
 
1471
- payload['project'] = this.client.config.project;
1472
-
1473
-
1474
- return await this.client.call(
1328
+ return this.client.call(
1475
1329
  'post',
1476
1330
  uri,
1477
1331
  apiHeaders,
@@ -1479,8 +1333,6 @@ export class Databases {
1479
1333
  );
1480
1334
  }
1481
1335
  /**
1482
- * Update string attribute
1483
- *
1484
1336
  * Update a string attribute. Changing the `default` value will not update already existing documents.
1485
1337
 
1486
1338
  *
@@ -1494,7 +1346,7 @@ export class Databases {
1494
1346
  * @throws {AppwriteException}
1495
1347
  * @returns {Promise<Models.AttributeString>}
1496
1348
  */
1497
- async updateStringAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, size?: number, newKey?: string): Promise<Models.AttributeString> {
1349
+ updateStringAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, size?: number, newKey?: string): Promise<Models.AttributeString> {
1498
1350
  if (typeof databaseId === 'undefined') {
1499
1351
  throw new AppwriteException('Missing required parameter: "databaseId"');
1500
1352
  }
@@ -1530,10 +1382,7 @@ export class Databases {
1530
1382
  'content-type': 'application/json',
1531
1383
  }
1532
1384
 
1533
- payload['project'] = this.client.config.project;
1534
-
1535
-
1536
- return await this.client.call(
1385
+ return this.client.call(
1537
1386
  'patch',
1538
1387
  uri,
1539
1388
  apiHeaders,
@@ -1541,8 +1390,6 @@ export class Databases {
1541
1390
  );
1542
1391
  }
1543
1392
  /**
1544
- * Create URL attribute
1545
- *
1546
1393
  * Create a URL attribute.
1547
1394
 
1548
1395
  *
@@ -1555,7 +1402,7 @@ export class Databases {
1555
1402
  * @throws {AppwriteException}
1556
1403
  * @returns {Promise<Models.AttributeUrl>}
1557
1404
  */
1558
- async createUrlAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean): Promise<Models.AttributeUrl> {
1405
+ createUrlAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean): Promise<Models.AttributeUrl> {
1559
1406
  if (typeof databaseId === 'undefined') {
1560
1407
  throw new AppwriteException('Missing required parameter: "databaseId"');
1561
1408
  }
@@ -1588,10 +1435,7 @@ export class Databases {
1588
1435
  'content-type': 'application/json',
1589
1436
  }
1590
1437
 
1591
- payload['project'] = this.client.config.project;
1592
-
1593
-
1594
- return await this.client.call(
1438
+ return this.client.call(
1595
1439
  'post',
1596
1440
  uri,
1597
1441
  apiHeaders,
@@ -1599,8 +1443,6 @@ export class Databases {
1599
1443
  );
1600
1444
  }
1601
1445
  /**
1602
- * Update URL attribute
1603
- *
1604
1446
  * Update an url attribute. Changing the `default` value will not update already existing documents.
1605
1447
 
1606
1448
  *
@@ -1613,7 +1455,7 @@ export class Databases {
1613
1455
  * @throws {AppwriteException}
1614
1456
  * @returns {Promise<Models.AttributeUrl>}
1615
1457
  */
1616
- async updateUrlAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, newKey?: string): Promise<Models.AttributeUrl> {
1458
+ updateUrlAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, newKey?: string): Promise<Models.AttributeUrl> {
1617
1459
  if (typeof databaseId === 'undefined') {
1618
1460
  throw new AppwriteException('Missing required parameter: "databaseId"');
1619
1461
  }
@@ -1646,10 +1488,7 @@ export class Databases {
1646
1488
  'content-type': 'application/json',
1647
1489
  }
1648
1490
 
1649
- payload['project'] = this.client.config.project;
1650
-
1651
-
1652
- return await this.client.call(
1491
+ return this.client.call(
1653
1492
  'patch',
1654
1493
  uri,
1655
1494
  apiHeaders,
@@ -1657,8 +1496,6 @@ export class Databases {
1657
1496
  );
1658
1497
  }
1659
1498
  /**
1660
- * Get attribute
1661
- *
1662
1499
  * Get attribute by ID.
1663
1500
  *
1664
1501
  * @param {string} databaseId
@@ -1667,7 +1504,7 @@ export class Databases {
1667
1504
  * @throws {AppwriteException}
1668
1505
  * @returns {Promise<{}>}
1669
1506
  */
1670
- async getAttribute(databaseId: string, collectionId: string, key: string): Promise<{}> {
1507
+ getAttribute(databaseId: string, collectionId: string, key: string): Promise<{}> {
1671
1508
  if (typeof databaseId === 'undefined') {
1672
1509
  throw new AppwriteException('Missing required parameter: "databaseId"');
1673
1510
  }
@@ -1682,13 +1519,9 @@ export class Databases {
1682
1519
  const uri = new URL(this.client.config.endpoint + apiPath);
1683
1520
 
1684
1521
  const apiHeaders: { [header: string]: string } = {
1685
- 'content-type': 'application/json',
1686
1522
  }
1687
1523
 
1688
- payload['project'] = this.client.config.project;
1689
-
1690
-
1691
- return await this.client.call(
1524
+ return this.client.call(
1692
1525
  'get',
1693
1526
  uri,
1694
1527
  apiHeaders,
@@ -1696,8 +1529,6 @@ export class Databases {
1696
1529
  );
1697
1530
  }
1698
1531
  /**
1699
- * Delete attribute
1700
- *
1701
1532
  * Deletes an attribute.
1702
1533
  *
1703
1534
  * @param {string} databaseId
@@ -1706,7 +1537,7 @@ export class Databases {
1706
1537
  * @throws {AppwriteException}
1707
1538
  * @returns {Promise<{}>}
1708
1539
  */
1709
- async deleteAttribute(databaseId: string, collectionId: string, key: string): Promise<{}> {
1540
+ deleteAttribute(databaseId: string, collectionId: string, key: string): Promise<{}> {
1710
1541
  if (typeof databaseId === 'undefined') {
1711
1542
  throw new AppwriteException('Missing required parameter: "databaseId"');
1712
1543
  }
@@ -1724,10 +1555,7 @@ export class Databases {
1724
1555
  'content-type': 'application/json',
1725
1556
  }
1726
1557
 
1727
- payload['project'] = this.client.config.project;
1728
-
1729
-
1730
- return await this.client.call(
1558
+ return this.client.call(
1731
1559
  'delete',
1732
1560
  uri,
1733
1561
  apiHeaders,
@@ -1735,8 +1563,6 @@ export class Databases {
1735
1563
  );
1736
1564
  }
1737
1565
  /**
1738
- * Update relationship attribute
1739
- *
1740
1566
  * Update relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes).
1741
1567
 
1742
1568
  *
@@ -1748,7 +1574,7 @@ export class Databases {
1748
1574
  * @throws {AppwriteException}
1749
1575
  * @returns {Promise<Models.AttributeRelationship>}
1750
1576
  */
1751
- async updateRelationshipAttribute(databaseId: string, collectionId: string, key: string, onDelete?: RelationMutate, newKey?: string): Promise<Models.AttributeRelationship> {
1577
+ updateRelationshipAttribute(databaseId: string, collectionId: string, key: string, onDelete?: RelationMutate, newKey?: string): Promise<Models.AttributeRelationship> {
1752
1578
  if (typeof databaseId === 'undefined') {
1753
1579
  throw new AppwriteException('Missing required parameter: "databaseId"');
1754
1580
  }
@@ -1772,10 +1598,7 @@ export class Databases {
1772
1598
  'content-type': 'application/json',
1773
1599
  }
1774
1600
 
1775
- payload['project'] = this.client.config.project;
1776
-
1777
-
1778
- return await this.client.call(
1601
+ return this.client.call(
1779
1602
  'patch',
1780
1603
  uri,
1781
1604
  apiHeaders,
@@ -1783,8 +1606,6 @@ export class Databases {
1783
1606
  );
1784
1607
  }
1785
1608
  /**
1786
- * List documents
1787
- *
1788
1609
  * Get a list of all the user&#039;s documents in a given collection. You can use the query params to filter your results.
1789
1610
  *
1790
1611
  * @param {string} databaseId
@@ -1793,7 +1614,7 @@ export class Databases {
1793
1614
  * @throws {AppwriteException}
1794
1615
  * @returns {Promise<Models.DocumentList<Document>>}
1795
1616
  */
1796
- async listDocuments<Document extends Models.Document>(databaseId: string, collectionId: string, queries?: string[]): Promise<Models.DocumentList<Document>> {
1617
+ listDocuments<Document extends Models.Document>(databaseId: string, collectionId: string, queries?: string[]): Promise<Models.DocumentList<Document>> {
1797
1618
  if (typeof databaseId === 'undefined') {
1798
1619
  throw new AppwriteException('Missing required parameter: "databaseId"');
1799
1620
  }
@@ -1808,13 +1629,9 @@ export class Databases {
1808
1629
  const uri = new URL(this.client.config.endpoint + apiPath);
1809
1630
 
1810
1631
  const apiHeaders: { [header: string]: string } = {
1811
- 'content-type': 'application/json',
1812
1632
  }
1813
1633
 
1814
- payload['project'] = this.client.config.project;
1815
-
1816
-
1817
- return await this.client.call(
1634
+ return this.client.call(
1818
1635
  'get',
1819
1636
  uri,
1820
1637
  apiHeaders,
@@ -1822,10 +1639,7 @@ export class Databases {
1822
1639
  );
1823
1640
  }
1824
1641
  /**
1825
- * Create document
1826
- *
1827
1642
  * Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console.
1828
-
1829
1643
  *
1830
1644
  * @param {string} databaseId
1831
1645
  * @param {string} collectionId
@@ -1835,7 +1649,7 @@ export class Databases {
1835
1649
  * @throws {AppwriteException}
1836
1650
  * @returns {Promise<Document>}
1837
1651
  */
1838
- async createDocument<Document extends Models.Document>(databaseId: string, collectionId: string, documentId: string, data: Omit<Document, keyof Models.Document>, permissions?: string[]): Promise<Document> {
1652
+ createDocument<Document extends Models.Document>(databaseId: string, collectionId: string, documentId: string, data: Omit<Document, keyof Models.Document>, permissions?: string[]): Promise<Document> {
1839
1653
  if (typeof databaseId === 'undefined') {
1840
1654
  throw new AppwriteException('Missing required parameter: "databaseId"');
1841
1655
  }
@@ -1865,10 +1679,44 @@ export class Databases {
1865
1679
  'content-type': 'application/json',
1866
1680
  }
1867
1681
 
1868
- payload['project'] = this.client.config.project;
1682
+ return this.client.call(
1683
+ 'post',
1684
+ uri,
1685
+ apiHeaders,
1686
+ payload
1687
+ );
1688
+ }
1689
+ /**
1690
+ * Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console.
1691
+ *
1692
+ * @param {string} databaseId
1693
+ * @param {string} collectionId
1694
+ * @param {object[]} documents
1695
+ * @throws {AppwriteException}
1696
+ * @returns {Promise<Models.DocumentList<Document>>}
1697
+ */
1698
+ createDocuments<Document extends Models.Document>(databaseId: string, collectionId: string, documents: object[]): Promise<Models.DocumentList<Document>> {
1699
+ if (typeof databaseId === 'undefined') {
1700
+ throw new AppwriteException('Missing required parameter: "databaseId"');
1701
+ }
1702
+ if (typeof collectionId === 'undefined') {
1703
+ throw new AppwriteException('Missing required parameter: "collectionId"');
1704
+ }
1705
+ if (typeof documents === 'undefined') {
1706
+ throw new AppwriteException('Missing required parameter: "documents"');
1707
+ }
1708
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
1709
+ const payload: Payload = {};
1710
+ if (typeof documents !== 'undefined') {
1711
+ payload['documents'] = documents;
1712
+ }
1713
+ const uri = new URL(this.client.config.endpoint + apiPath);
1869
1714
 
1715
+ const apiHeaders: { [header: string]: string } = {
1716
+ 'content-type': 'application/json',
1717
+ }
1870
1718
 
1871
- return await this.client.call(
1719
+ return this.client.call(
1872
1720
  'post',
1873
1721
  uri,
1874
1722
  apiHeaders,
@@ -1876,8 +1724,113 @@ export class Databases {
1876
1724
  );
1877
1725
  }
1878
1726
  /**
1879
- * Get document
1727
+ * Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console.
1728
+
1729
+ *
1730
+ * @param {string} databaseId
1731
+ * @param {string} collectionId
1732
+ * @param {object[]} documents
1733
+ * @throws {AppwriteException}
1734
+ * @returns {Promise<Models.DocumentList<Document>>}
1735
+ */
1736
+ upsertDocuments<Document extends Models.Document>(databaseId: string, collectionId: string, documents?: object[]): Promise<Models.DocumentList<Document>> {
1737
+ if (typeof databaseId === 'undefined') {
1738
+ throw new AppwriteException('Missing required parameter: "databaseId"');
1739
+ }
1740
+ if (typeof collectionId === 'undefined') {
1741
+ throw new AppwriteException('Missing required parameter: "collectionId"');
1742
+ }
1743
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
1744
+ const payload: Payload = {};
1745
+ if (typeof documents !== 'undefined') {
1746
+ payload['documents'] = documents;
1747
+ }
1748
+ const uri = new URL(this.client.config.endpoint + apiPath);
1749
+
1750
+ const apiHeaders: { [header: string]: string } = {
1751
+ 'content-type': 'application/json',
1752
+ }
1753
+
1754
+ return this.client.call(
1755
+ 'put',
1756
+ uri,
1757
+ apiHeaders,
1758
+ payload
1759
+ );
1760
+ }
1761
+ /**
1762
+ * Update all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated.
1763
+ *
1764
+ * @param {string} databaseId
1765
+ * @param {string} collectionId
1766
+ * @param {object} data
1767
+ * @param {string[]} queries
1768
+ * @throws {AppwriteException}
1769
+ * @returns {Promise<Models.DocumentList<Document>>}
1770
+ */
1771
+ updateDocuments<Document extends Models.Document>(databaseId: string, collectionId: string, data?: object, queries?: string[]): Promise<Models.DocumentList<Document>> {
1772
+ if (typeof databaseId === 'undefined') {
1773
+ throw new AppwriteException('Missing required parameter: "databaseId"');
1774
+ }
1775
+ if (typeof collectionId === 'undefined') {
1776
+ throw new AppwriteException('Missing required parameter: "collectionId"');
1777
+ }
1778
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
1779
+ const payload: Payload = {};
1780
+ if (typeof data !== 'undefined') {
1781
+ payload['data'] = data;
1782
+ }
1783
+ if (typeof queries !== 'undefined') {
1784
+ payload['queries'] = queries;
1785
+ }
1786
+ const uri = new URL(this.client.config.endpoint + apiPath);
1787
+
1788
+ const apiHeaders: { [header: string]: string } = {
1789
+ 'content-type': 'application/json',
1790
+ }
1791
+
1792
+ return this.client.call(
1793
+ 'patch',
1794
+ uri,
1795
+ apiHeaders,
1796
+ payload
1797
+ );
1798
+ }
1799
+ /**
1800
+ * Bulk delete documents using queries, if no queries are passed then all documents are deleted.
1880
1801
  *
1802
+ * @param {string} databaseId
1803
+ * @param {string} collectionId
1804
+ * @param {string[]} queries
1805
+ * @throws {AppwriteException}
1806
+ * @returns {Promise<Models.DocumentList<Document>>}
1807
+ */
1808
+ deleteDocuments<Document extends Models.Document>(databaseId: string, collectionId: string, queries?: string[]): Promise<Models.DocumentList<Document>> {
1809
+ if (typeof databaseId === 'undefined') {
1810
+ throw new AppwriteException('Missing required parameter: "databaseId"');
1811
+ }
1812
+ if (typeof collectionId === 'undefined') {
1813
+ throw new AppwriteException('Missing required parameter: "collectionId"');
1814
+ }
1815
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
1816
+ const payload: Payload = {};
1817
+ if (typeof queries !== 'undefined') {
1818
+ payload['queries'] = queries;
1819
+ }
1820
+ const uri = new URL(this.client.config.endpoint + apiPath);
1821
+
1822
+ const apiHeaders: { [header: string]: string } = {
1823
+ 'content-type': 'application/json',
1824
+ }
1825
+
1826
+ return this.client.call(
1827
+ 'delete',
1828
+ uri,
1829
+ apiHeaders,
1830
+ payload
1831
+ );
1832
+ }
1833
+ /**
1881
1834
  * Get a document by its unique ID. This endpoint response returns a JSON object with the document data.
1882
1835
  *
1883
1836
  * @param {string} databaseId
@@ -1887,7 +1840,7 @@ export class Databases {
1887
1840
  * @throws {AppwriteException}
1888
1841
  * @returns {Promise<Document>}
1889
1842
  */
1890
- async getDocument<Document extends Models.Document>(databaseId: string, collectionId: string, documentId: string, queries?: string[]): Promise<Document> {
1843
+ getDocument<Document extends Models.Document>(databaseId: string, collectionId: string, documentId: string, queries?: string[]): Promise<Document> {
1891
1844
  if (typeof databaseId === 'undefined') {
1892
1845
  throw new AppwriteException('Missing required parameter: "databaseId"');
1893
1846
  }
@@ -1905,13 +1858,9 @@ export class Databases {
1905
1858
  const uri = new URL(this.client.config.endpoint + apiPath);
1906
1859
 
1907
1860
  const apiHeaders: { [header: string]: string } = {
1908
- 'content-type': 'application/json',
1909
1861
  }
1910
1862
 
1911
- payload['project'] = this.client.config.project;
1912
-
1913
-
1914
- return await this.client.call(
1863
+ return this.client.call(
1915
1864
  'get',
1916
1865
  uri,
1917
1866
  apiHeaders,
@@ -1919,8 +1868,6 @@ export class Databases {
1919
1868
  );
1920
1869
  }
1921
1870
  /**
1922
- * Update document
1923
- *
1924
1871
  * Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.
1925
1872
  *
1926
1873
  * @param {string} databaseId
@@ -1931,7 +1878,7 @@ export class Databases {
1931
1878
  * @throws {AppwriteException}
1932
1879
  * @returns {Promise<Document>}
1933
1880
  */
1934
- async updateDocument<Document extends Models.Document>(databaseId: string, collectionId: string, documentId: string, data?: Partial<Omit<Document, keyof Models.Document>>, permissions?: string[]): Promise<Document> {
1881
+ updateDocument<Document extends Models.Document>(databaseId: string, collectionId: string, documentId: string, data?: Partial<Omit<Document, keyof Models.Document>>, permissions?: string[]): Promise<Document> {
1935
1882
  if (typeof databaseId === 'undefined') {
1936
1883
  throw new AppwriteException('Missing required parameter: "databaseId"');
1937
1884
  }
@@ -1955,10 +1902,7 @@ export class Databases {
1955
1902
  'content-type': 'application/json',
1956
1903
  }
1957
1904
 
1958
- payload['project'] = this.client.config.project;
1959
-
1960
-
1961
- return await this.client.call(
1905
+ return this.client.call(
1962
1906
  'patch',
1963
1907
  uri,
1964
1908
  apiHeaders,
@@ -1966,8 +1910,6 @@ export class Databases {
1966
1910
  );
1967
1911
  }
1968
1912
  /**
1969
- * Delete document
1970
- *
1971
1913
  * Delete a document by its unique ID.
1972
1914
  *
1973
1915
  * @param {string} databaseId
@@ -1976,7 +1918,7 @@ export class Databases {
1976
1918
  * @throws {AppwriteException}
1977
1919
  * @returns {Promise<{}>}
1978
1920
  */
1979
- async deleteDocument(databaseId: string, collectionId: string, documentId: string): Promise<{}> {
1921
+ deleteDocument(databaseId: string, collectionId: string, documentId: string): Promise<{}> {
1980
1922
  if (typeof databaseId === 'undefined') {
1981
1923
  throw new AppwriteException('Missing required parameter: "databaseId"');
1982
1924
  }
@@ -1994,10 +1936,7 @@ export class Databases {
1994
1936
  'content-type': 'application/json',
1995
1937
  }
1996
1938
 
1997
- payload['project'] = this.client.config.project;
1998
-
1999
-
2000
- return await this.client.call(
1939
+ return this.client.call(
2001
1940
  'delete',
2002
1941
  uri,
2003
1942
  apiHeaders,
@@ -2005,8 +1944,6 @@ export class Databases {
2005
1944
  );
2006
1945
  }
2007
1946
  /**
2008
- * List document logs
2009
- *
2010
1947
  * Get the document activity logs list by its unique ID.
2011
1948
  *
2012
1949
  * @param {string} databaseId
@@ -2016,7 +1953,7 @@ export class Databases {
2016
1953
  * @throws {AppwriteException}
2017
1954
  * @returns {Promise<Models.LogList>}
2018
1955
  */
2019
- async listDocumentLogs(databaseId: string, collectionId: string, documentId: string, queries?: string[]): Promise<Models.LogList> {
1956
+ listDocumentLogs(databaseId: string, collectionId: string, documentId: string, queries?: string[]): Promise<Models.LogList> {
2020
1957
  if (typeof databaseId === 'undefined') {
2021
1958
  throw new AppwriteException('Missing required parameter: "databaseId"');
2022
1959
  }
@@ -2034,13 +1971,9 @@ export class Databases {
2034
1971
  const uri = new URL(this.client.config.endpoint + apiPath);
2035
1972
 
2036
1973
  const apiHeaders: { [header: string]: string } = {
2037
- 'content-type': 'application/json',
2038
1974
  }
2039
1975
 
2040
- payload['project'] = this.client.config.project;
2041
-
2042
-
2043
- return await this.client.call(
1976
+ return this.client.call(
2044
1977
  'get',
2045
1978
  uri,
2046
1979
  apiHeaders,
@@ -2048,8 +1981,6 @@ export class Databases {
2048
1981
  );
2049
1982
  }
2050
1983
  /**
2051
- * List indexes
2052
- *
2053
1984
  * List indexes in the collection.
2054
1985
  *
2055
1986
  * @param {string} databaseId
@@ -2058,7 +1989,7 @@ export class Databases {
2058
1989
  * @throws {AppwriteException}
2059
1990
  * @returns {Promise<Models.IndexList>}
2060
1991
  */
2061
- async listIndexes(databaseId: string, collectionId: string, queries?: string[]): Promise<Models.IndexList> {
1992
+ listIndexes(databaseId: string, collectionId: string, queries?: string[]): Promise<Models.IndexList> {
2062
1993
  if (typeof databaseId === 'undefined') {
2063
1994
  throw new AppwriteException('Missing required parameter: "databaseId"');
2064
1995
  }
@@ -2073,13 +2004,9 @@ export class Databases {
2073
2004
  const uri = new URL(this.client.config.endpoint + apiPath);
2074
2005
 
2075
2006
  const apiHeaders: { [header: string]: string } = {
2076
- 'content-type': 'application/json',
2077
2007
  }
2078
2008
 
2079
- payload['project'] = this.client.config.project;
2080
-
2081
-
2082
- return await this.client.call(
2009
+ return this.client.call(
2083
2010
  'get',
2084
2011
  uri,
2085
2012
  apiHeaders,
@@ -2087,8 +2014,6 @@ export class Databases {
2087
2014
  );
2088
2015
  }
2089
2016
  /**
2090
- * Create index
2091
- *
2092
2017
  * Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.
2093
2018
  Attributes can be `key`, `fulltext`, and `unique`.
2094
2019
  *
@@ -2098,10 +2023,11 @@ Attributes can be `key`, `fulltext`, and `unique`.
2098
2023
  * @param {IndexType} type
2099
2024
  * @param {string[]} attributes
2100
2025
  * @param {string[]} orders
2026
+ * @param {number[]} lengths
2101
2027
  * @throws {AppwriteException}
2102
2028
  * @returns {Promise<Models.Index>}
2103
2029
  */
2104
- async createIndex(databaseId: string, collectionId: string, key: string, type: IndexType, attributes: string[], orders?: string[]): Promise<Models.Index> {
2030
+ createIndex(databaseId: string, collectionId: string, key: string, type: IndexType, attributes: string[], orders?: string[], lengths?: number[]): Promise<Models.Index> {
2105
2031
  if (typeof databaseId === 'undefined') {
2106
2032
  throw new AppwriteException('Missing required parameter: "databaseId"');
2107
2033
  }
@@ -2131,16 +2057,16 @@ Attributes can be `key`, `fulltext`, and `unique`.
2131
2057
  if (typeof orders !== 'undefined') {
2132
2058
  payload['orders'] = orders;
2133
2059
  }
2060
+ if (typeof lengths !== 'undefined') {
2061
+ payload['lengths'] = lengths;
2062
+ }
2134
2063
  const uri = new URL(this.client.config.endpoint + apiPath);
2135
2064
 
2136
2065
  const apiHeaders: { [header: string]: string } = {
2137
2066
  'content-type': 'application/json',
2138
2067
  }
2139
2068
 
2140
- payload['project'] = this.client.config.project;
2141
-
2142
-
2143
- return await this.client.call(
2069
+ return this.client.call(
2144
2070
  'post',
2145
2071
  uri,
2146
2072
  apiHeaders,
@@ -2148,8 +2074,6 @@ Attributes can be `key`, `fulltext`, and `unique`.
2148
2074
  );
2149
2075
  }
2150
2076
  /**
2151
- * Get index
2152
- *
2153
2077
  * Get index by ID.
2154
2078
  *
2155
2079
  * @param {string} databaseId
@@ -2158,7 +2082,7 @@ Attributes can be `key`, `fulltext`, and `unique`.
2158
2082
  * @throws {AppwriteException}
2159
2083
  * @returns {Promise<Models.Index>}
2160
2084
  */
2161
- async getIndex(databaseId: string, collectionId: string, key: string): Promise<Models.Index> {
2085
+ getIndex(databaseId: string, collectionId: string, key: string): Promise<Models.Index> {
2162
2086
  if (typeof databaseId === 'undefined') {
2163
2087
  throw new AppwriteException('Missing required parameter: "databaseId"');
2164
2088
  }
@@ -2173,13 +2097,9 @@ Attributes can be `key`, `fulltext`, and `unique`.
2173
2097
  const uri = new URL(this.client.config.endpoint + apiPath);
2174
2098
 
2175
2099
  const apiHeaders: { [header: string]: string } = {
2176
- 'content-type': 'application/json',
2177
2100
  }
2178
2101
 
2179
- payload['project'] = this.client.config.project;
2180
-
2181
-
2182
- return await this.client.call(
2102
+ return this.client.call(
2183
2103
  'get',
2184
2104
  uri,
2185
2105
  apiHeaders,
@@ -2187,8 +2107,6 @@ Attributes can be `key`, `fulltext`, and `unique`.
2187
2107
  );
2188
2108
  }
2189
2109
  /**
2190
- * Delete index
2191
- *
2192
2110
  * Delete an index.
2193
2111
  *
2194
2112
  * @param {string} databaseId
@@ -2197,7 +2115,7 @@ Attributes can be `key`, `fulltext`, and `unique`.
2197
2115
  * @throws {AppwriteException}
2198
2116
  * @returns {Promise<{}>}
2199
2117
  */
2200
- async deleteIndex(databaseId: string, collectionId: string, key: string): Promise<{}> {
2118
+ deleteIndex(databaseId: string, collectionId: string, key: string): Promise<{}> {
2201
2119
  if (typeof databaseId === 'undefined') {
2202
2120
  throw new AppwriteException('Missing required parameter: "databaseId"');
2203
2121
  }
@@ -2215,10 +2133,7 @@ Attributes can be `key`, `fulltext`, and `unique`.
2215
2133
  'content-type': 'application/json',
2216
2134
  }
2217
2135
 
2218
- payload['project'] = this.client.config.project;
2219
-
2220
-
2221
- return await this.client.call(
2136
+ return this.client.call(
2222
2137
  'delete',
2223
2138
  uri,
2224
2139
  apiHeaders,
@@ -2226,8 +2141,6 @@ Attributes can be `key`, `fulltext`, and `unique`.
2226
2141
  );
2227
2142
  }
2228
2143
  /**
2229
- * List collection logs
2230
- *
2231
2144
  * Get the collection activity logs list by its unique ID.
2232
2145
  *
2233
2146
  * @param {string} databaseId
@@ -2236,7 +2149,7 @@ Attributes can be `key`, `fulltext`, and `unique`.
2236
2149
  * @throws {AppwriteException}
2237
2150
  * @returns {Promise<Models.LogList>}
2238
2151
  */
2239
- async listCollectionLogs(databaseId: string, collectionId: string, queries?: string[]): Promise<Models.LogList> {
2152
+ listCollectionLogs(databaseId: string, collectionId: string, queries?: string[]): Promise<Models.LogList> {
2240
2153
  if (typeof databaseId === 'undefined') {
2241
2154
  throw new AppwriteException('Missing required parameter: "databaseId"');
2242
2155
  }
@@ -2251,13 +2164,9 @@ Attributes can be `key`, `fulltext`, and `unique`.
2251
2164
  const uri = new URL(this.client.config.endpoint + apiPath);
2252
2165
 
2253
2166
  const apiHeaders: { [header: string]: string } = {
2254
- 'content-type': 'application/json',
2255
2167
  }
2256
2168
 
2257
- payload['project'] = this.client.config.project;
2258
-
2259
-
2260
- return await this.client.call(
2169
+ return this.client.call(
2261
2170
  'get',
2262
2171
  uri,
2263
2172
  apiHeaders,
@@ -2265,8 +2174,6 @@ Attributes can be `key`, `fulltext`, and `unique`.
2265
2174
  );
2266
2175
  }
2267
2176
  /**
2268
- * Get collection usage stats
2269
- *
2270
2177
  * Get usage metrics and statistics for a collection. Returning the total number of documents. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.
2271
2178
  *
2272
2179
  * @param {string} databaseId
@@ -2275,7 +2182,7 @@ Attributes can be `key`, `fulltext`, and `unique`.
2275
2182
  * @throws {AppwriteException}
2276
2183
  * @returns {Promise<Models.UsageCollection>}
2277
2184
  */
2278
- async getCollectionUsage(databaseId: string, collectionId: string, range?: DatabaseUsageRange): Promise<Models.UsageCollection> {
2185
+ getCollectionUsage(databaseId: string, collectionId: string, range?: DatabaseUsageRange): Promise<Models.UsageCollection> {
2279
2186
  if (typeof databaseId === 'undefined') {
2280
2187
  throw new AppwriteException('Missing required parameter: "databaseId"');
2281
2188
  }
@@ -2290,13 +2197,9 @@ Attributes can be `key`, `fulltext`, and `unique`.
2290
2197
  const uri = new URL(this.client.config.endpoint + apiPath);
2291
2198
 
2292
2199
  const apiHeaders: { [header: string]: string } = {
2293
- 'content-type': 'application/json',
2294
2200
  }
2295
2201
 
2296
- payload['project'] = this.client.config.project;
2297
-
2298
-
2299
- return await this.client.call(
2202
+ return this.client.call(
2300
2203
  'get',
2301
2204
  uri,
2302
2205
  apiHeaders,
@@ -2304,8 +2207,6 @@ Attributes can be `key`, `fulltext`, and `unique`.
2304
2207
  );
2305
2208
  }
2306
2209
  /**
2307
- * List database logs
2308
- *
2309
2210
  * Get the database activity logs list by its unique ID.
2310
2211
  *
2311
2212
  * @param {string} databaseId
@@ -2313,7 +2214,7 @@ Attributes can be `key`, `fulltext`, and `unique`.
2313
2214
  * @throws {AppwriteException}
2314
2215
  * @returns {Promise<Models.LogList>}
2315
2216
  */
2316
- async listLogs(databaseId: string, queries?: string[]): Promise<Models.LogList> {
2217
+ listLogs(databaseId: string, queries?: string[]): Promise<Models.LogList> {
2317
2218
  if (typeof databaseId === 'undefined') {
2318
2219
  throw new AppwriteException('Missing required parameter: "databaseId"');
2319
2220
  }
@@ -2325,13 +2226,9 @@ Attributes can be `key`, `fulltext`, and `unique`.
2325
2226
  const uri = new URL(this.client.config.endpoint + apiPath);
2326
2227
 
2327
2228
  const apiHeaders: { [header: string]: string } = {
2328
- 'content-type': 'application/json',
2329
2229
  }
2330
2230
 
2331
- payload['project'] = this.client.config.project;
2332
-
2333
-
2334
- return await this.client.call(
2231
+ return this.client.call(
2335
2232
  'get',
2336
2233
  uri,
2337
2234
  apiHeaders,
@@ -2339,8 +2236,6 @@ Attributes can be `key`, `fulltext`, and `unique`.
2339
2236
  );
2340
2237
  }
2341
2238
  /**
2342
- * Get database usage stats
2343
- *
2344
2239
  * Get usage metrics and statistics for a database. You can view the total number of collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.
2345
2240
  *
2346
2241
  * @param {string} databaseId
@@ -2348,7 +2243,7 @@ Attributes can be `key`, `fulltext`, and `unique`.
2348
2243
  * @throws {AppwriteException}
2349
2244
  * @returns {Promise<Models.UsageDatabase>}
2350
2245
  */
2351
- async getDatabaseUsage(databaseId: string, range?: DatabaseUsageRange): Promise<Models.UsageDatabase> {
2246
+ getDatabaseUsage(databaseId: string, range?: DatabaseUsageRange): Promise<Models.UsageDatabase> {
2352
2247
  if (typeof databaseId === 'undefined') {
2353
2248
  throw new AppwriteException('Missing required parameter: "databaseId"');
2354
2249
  }
@@ -2360,13 +2255,9 @@ Attributes can be `key`, `fulltext`, and `unique`.
2360
2255
  const uri = new URL(this.client.config.endpoint + apiPath);
2361
2256
 
2362
2257
  const apiHeaders: { [header: string]: string } = {
2363
- 'content-type': 'application/json',
2364
2258
  }
2365
2259
 
2366
- payload['project'] = this.client.config.project;
2367
-
2368
-
2369
- return await this.client.call(
2260
+ return this.client.call(
2370
2261
  'get',
2371
2262
  uri,
2372
2263
  apiHeaders,