appwrite-cli 8.2.2 → 9.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (529) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +5 -5
  3. package/docs/examples/account/create-anonymous-session.md +1 -1
  4. package/docs/examples/account/create-email-password-session.md +3 -3
  5. package/docs/examples/account/create-email-token.md +3 -4
  6. package/docs/examples/account/create-jwt.md +1 -0
  7. package/docs/examples/account/create-magic-url-token.md +3 -0
  8. package/docs/examples/account/create-mfa-authenticator.md +2 -2
  9. package/docs/examples/account/create-mfa-challenge.md +2 -2
  10. package/docs/examples/account/create-mfa-recovery-codes.md +1 -1
  11. package/docs/examples/account/create-o-auth-2-session.md +2 -0
  12. package/docs/examples/account/create-o-auth-2-token.md +2 -0
  13. package/docs/examples/account/create-phone-token.md +3 -3
  14. package/docs/examples/account/create-phone-verification.md +1 -1
  15. package/docs/examples/account/create-push-target.md +3 -4
  16. package/docs/examples/account/create-recovery.md +3 -3
  17. package/docs/examples/account/create-session.md +3 -3
  18. package/docs/examples/account/create-verification.md +2 -2
  19. package/docs/examples/account/create.md +3 -4
  20. package/docs/examples/account/delete-identity.md +2 -2
  21. package/docs/examples/account/delete-mfa-authenticator.md +2 -2
  22. package/docs/examples/account/delete-push-target.md +2 -2
  23. package/docs/examples/account/delete-session.md +2 -2
  24. package/docs/examples/account/delete-sessions.md +1 -1
  25. package/docs/examples/account/get-mfa-recovery-codes.md +1 -1
  26. package/docs/examples/account/get-prefs.md +1 -1
  27. package/docs/examples/account/get-session.md +2 -2
  28. package/docs/examples/account/list-identities.md +1 -2
  29. package/docs/examples/account/list-logs.md +1 -2
  30. package/docs/examples/account/list-mfa-factors.md +1 -1
  31. package/docs/examples/account/list-sessions.md +1 -1
  32. package/docs/examples/account/update-email.md +3 -3
  33. package/docs/examples/account/update-magic-url-session.md +3 -0
  34. package/docs/examples/account/update-mfa-authenticator.md +3 -3
  35. package/docs/examples/account/update-mfa-challenge.md +3 -3
  36. package/docs/examples/account/update-mfa-recovery-codes.md +1 -1
  37. package/docs/examples/account/update-mfa.md +2 -0
  38. package/docs/examples/account/update-name.md +2 -2
  39. package/docs/examples/account/update-password.md +2 -3
  40. package/docs/examples/account/update-phone-session.md +3 -3
  41. package/docs/examples/account/update-phone-verification.md +3 -3
  42. package/docs/examples/account/update-phone.md +3 -3
  43. package/docs/examples/account/update-prefs.md +2 -2
  44. package/docs/examples/account/update-push-target.md +3 -3
  45. package/docs/examples/account/update-recovery.md +4 -4
  46. package/docs/examples/account/update-session.md +2 -2
  47. package/docs/examples/account/update-status.md +1 -1
  48. package/docs/examples/account/update-verification.md +3 -3
  49. package/docs/examples/avatars/get-browser.md +2 -5
  50. package/docs/examples/avatars/get-credit-card.md +2 -5
  51. package/docs/examples/avatars/get-favicon.md +2 -2
  52. package/docs/examples/avatars/get-flag.md +2 -5
  53. package/docs/examples/avatars/get-image.md +2 -4
  54. package/docs/examples/avatars/get-initials.md +1 -5
  55. package/docs/examples/avatars/get-qr.md +2 -0
  56. package/docs/examples/console/get-resource.md +3 -3
  57. package/docs/examples/databases/create-boolean-attribute.md +5 -7
  58. package/docs/examples/databases/create-collection.md +4 -7
  59. package/docs/examples/databases/create-datetime-attribute.md +5 -7
  60. package/docs/examples/databases/create-document.md +5 -6
  61. package/docs/examples/databases/create-documents.md +4 -4
  62. package/docs/examples/databases/create-email-attribute.md +5 -7
  63. package/docs/examples/databases/create-enum-attribute.md +6 -8
  64. package/docs/examples/databases/create-float-attribute.md +5 -9
  65. package/docs/examples/databases/create-index.md +6 -8
  66. package/docs/examples/databases/create-integer-attribute.md +5 -9
  67. package/docs/examples/databases/create-ip-attribute.md +5 -7
  68. package/docs/examples/databases/create-relationship-attribute.md +5 -9
  69. package/docs/examples/databases/create-string-attribute.md +6 -9
  70. package/docs/examples/databases/create-url-attribute.md +5 -7
  71. package/docs/examples/databases/create.md +2 -3
  72. package/docs/examples/databases/decrement-document-attribute.md +5 -0
  73. package/docs/examples/databases/delete-attribute.md +4 -4
  74. package/docs/examples/databases/delete-collection.md +3 -3
  75. package/docs/examples/databases/delete-document.md +4 -4
  76. package/docs/examples/databases/delete-documents.md +3 -4
  77. package/docs/examples/databases/delete-index.md +4 -4
  78. package/docs/examples/databases/delete.md +1 -1
  79. package/docs/examples/databases/get-attribute.md +4 -4
  80. package/docs/examples/databases/get-collection-usage.md +3 -4
  81. package/docs/examples/databases/get-collection.md +3 -3
  82. package/docs/examples/databases/get-document.md +4 -5
  83. package/docs/examples/databases/get-index.md +4 -4
  84. package/docs/examples/databases/get-usage.md +2 -2
  85. package/docs/examples/databases/get.md +1 -1
  86. package/docs/examples/databases/increment-document-attribute.md +5 -0
  87. package/docs/examples/databases/list-attributes.md +3 -4
  88. package/docs/examples/databases/list-collection-logs.md +3 -4
  89. package/docs/examples/databases/list-collections.md +2 -4
  90. package/docs/examples/databases/list-document-logs.md +4 -5
  91. package/docs/examples/databases/list-documents.md +3 -4
  92. package/docs/examples/databases/list-indexes.md +3 -4
  93. package/docs/examples/databases/list-logs.md +2 -3
  94. package/docs/examples/databases/list-usage.md +1 -0
  95. package/docs/examples/databases/list.md +1 -3
  96. package/docs/examples/databases/update-boolean-attribute.md +6 -7
  97. package/docs/examples/databases/update-collection.md +4 -7
  98. package/docs/examples/databases/update-datetime-attribute.md +6 -7
  99. package/docs/examples/databases/update-document.md +4 -6
  100. package/docs/examples/databases/update-documents.md +3 -5
  101. package/docs/examples/databases/update-email-attribute.md +6 -7
  102. package/docs/examples/databases/update-enum-attribute.md +7 -8
  103. package/docs/examples/databases/update-float-attribute.md +6 -9
  104. package/docs/examples/databases/update-integer-attribute.md +6 -9
  105. package/docs/examples/databases/update-ip-attribute.md +6 -7
  106. package/docs/examples/databases/update-relationship-attribute.md +4 -6
  107. package/docs/examples/databases/update-string-attribute.md +6 -8
  108. package/docs/examples/databases/update-url-attribute.md +6 -7
  109. package/docs/examples/databases/update.md +2 -3
  110. package/docs/examples/databases/upsert-document.md +5 -6
  111. package/docs/examples/databases/upsert-documents.md +4 -4
  112. package/docs/examples/functions/create-deployment.md +4 -6
  113. package/docs/examples/functions/create-duplicate-deployment.md +3 -4
  114. package/docs/examples/functions/create-execution.md +2 -8
  115. package/docs/examples/functions/create-template-deployment.md +6 -7
  116. package/docs/examples/functions/create-variable.md +4 -5
  117. package/docs/examples/functions/create-vcs-deployment.md +4 -5
  118. package/docs/examples/functions/create.md +3 -18
  119. package/docs/examples/functions/delete-deployment.md +3 -3
  120. package/docs/examples/functions/delete-execution.md +3 -3
  121. package/docs/examples/functions/delete-variable.md +3 -3
  122. package/docs/examples/functions/delete.md +1 -1
  123. package/docs/examples/functions/get-deployment-download.md +3 -4
  124. package/docs/examples/functions/get-deployment.md +3 -3
  125. package/docs/examples/functions/get-execution.md +3 -3
  126. package/docs/examples/functions/get-template.md +2 -2
  127. package/docs/examples/functions/get-usage.md +2 -3
  128. package/docs/examples/functions/get-variable.md +3 -3
  129. package/docs/examples/functions/get.md +1 -1
  130. package/docs/examples/functions/list-deployments.md +2 -4
  131. package/docs/examples/functions/list-executions.md +2 -3
  132. package/docs/examples/functions/list-runtimes.md +1 -1
  133. package/docs/examples/functions/list-specifications.md +1 -1
  134. package/docs/examples/functions/list-templates.md +1 -5
  135. package/docs/examples/functions/list-usage.md +1 -2
  136. package/docs/examples/functions/list-variables.md +2 -2
  137. package/docs/examples/functions/list.md +1 -3
  138. package/docs/examples/functions/update-deployment-status.md +3 -3
  139. package/docs/examples/functions/update-function-deployment.md +3 -3
  140. package/docs/examples/functions/update-variable.md +4 -6
  141. package/docs/examples/functions/update.md +2 -18
  142. package/docs/examples/graphql/mutation.md +1 -1
  143. package/docs/examples/graphql/query.md +1 -1
  144. package/docs/examples/health/get-antivirus.md +1 -1
  145. package/docs/examples/health/get-cache.md +1 -1
  146. package/docs/examples/health/get-certificate.md +1 -2
  147. package/docs/examples/health/get-db.md +1 -0
  148. package/docs/examples/health/get-failed-jobs.md +2 -3
  149. package/docs/examples/health/get-pub-sub.md +1 -1
  150. package/docs/examples/health/get-queue-builds.md +1 -2
  151. package/docs/examples/health/get-queue-certificates.md +1 -2
  152. package/docs/examples/health/get-queue-databases.md +1 -3
  153. package/docs/examples/health/get-queue-deletes.md +1 -2
  154. package/docs/examples/health/get-queue-functions.md +1 -2
  155. package/docs/examples/health/get-queue-logs.md +1 -2
  156. package/docs/examples/health/get-queue-mails.md +1 -2
  157. package/docs/examples/health/get-queue-messaging.md +1 -2
  158. package/docs/examples/health/get-queue-migrations.md +1 -2
  159. package/docs/examples/health/get-queue-stats-resources.md +1 -2
  160. package/docs/examples/health/get-queue-usage.md +1 -2
  161. package/docs/examples/health/get-queue-webhooks.md +1 -2
  162. package/docs/examples/health/get-storage-local.md +1 -1
  163. package/docs/examples/health/get-storage.md +1 -1
  164. package/docs/examples/health/get-time.md +1 -1
  165. package/docs/examples/locale/list-codes.md +1 -1
  166. package/docs/examples/locale/list-continents.md +1 -1
  167. package/docs/examples/locale/list-countries-eu.md +1 -0
  168. package/docs/examples/locale/list-countries-phones.md +1 -1
  169. package/docs/examples/locale/list-countries.md +1 -1
  170. package/docs/examples/locale/list-currencies.md +1 -1
  171. package/docs/examples/locale/list-languages.md +1 -1
  172. package/docs/examples/messaging/create-apns-provider.md +3 -9
  173. package/docs/examples/messaging/create-email.md +4 -13
  174. package/docs/examples/messaging/create-fcm-provider.md +3 -5
  175. package/docs/examples/messaging/create-mailgun-provider.md +3 -11
  176. package/docs/examples/messaging/create-msg-91-provider.md +3 -0
  177. package/docs/examples/messaging/create-push.md +2 -20
  178. package/docs/examples/messaging/create-sendgrid-provider.md +3 -9
  179. package/docs/examples/messaging/create-sms.md +3 -8
  180. package/docs/examples/messaging/create-smtp-provider.md +4 -15
  181. package/docs/examples/messaging/create-subscriber.md +4 -4
  182. package/docs/examples/messaging/create-telesign-provider.md +3 -7
  183. package/docs/examples/messaging/create-textmagic-provider.md +3 -7
  184. package/docs/examples/messaging/create-topic.md +3 -4
  185. package/docs/examples/messaging/create-twilio-provider.md +3 -7
  186. package/docs/examples/messaging/create-vonage-provider.md +3 -7
  187. package/docs/examples/messaging/delete-provider.md +2 -2
  188. package/docs/examples/messaging/delete-subscriber.md +3 -3
  189. package/docs/examples/messaging/delete-topic.md +2 -2
  190. package/docs/examples/messaging/delete.md +1 -1
  191. package/docs/examples/messaging/get-message.md +2 -2
  192. package/docs/examples/messaging/get-provider.md +2 -2
  193. package/docs/examples/messaging/get-subscriber.md +3 -3
  194. package/docs/examples/messaging/get-topic.md +2 -2
  195. package/docs/examples/messaging/list-message-logs.md +2 -3
  196. package/docs/examples/messaging/list-messages.md +1 -3
  197. package/docs/examples/messaging/list-provider-logs.md +2 -3
  198. package/docs/examples/messaging/list-providers.md +1 -3
  199. package/docs/examples/messaging/list-subscriber-logs.md +2 -3
  200. package/docs/examples/messaging/list-subscribers.md +2 -4
  201. package/docs/examples/messaging/list-targets.md +2 -3
  202. package/docs/examples/messaging/list-topic-logs.md +2 -3
  203. package/docs/examples/messaging/list-topics.md +1 -3
  204. package/docs/examples/messaging/update-apns-provider.md +2 -9
  205. package/docs/examples/messaging/update-email.md +2 -13
  206. package/docs/examples/messaging/update-fcm-provider.md +2 -5
  207. package/docs/examples/messaging/update-mailgun-provider.md +2 -11
  208. package/docs/examples/messaging/update-msg-91-provider.md +2 -0
  209. package/docs/examples/messaging/update-push.md +2 -20
  210. package/docs/examples/messaging/update-sendgrid-provider.md +2 -9
  211. package/docs/examples/messaging/update-sms.md +2 -8
  212. package/docs/examples/messaging/update-smtp-provider.md +2 -15
  213. package/docs/examples/messaging/update-telesign-provider.md +2 -7
  214. package/docs/examples/messaging/update-textmagic-provider.md +2 -7
  215. package/docs/examples/messaging/update-topic.md +2 -4
  216. package/docs/examples/messaging/update-twilio-provider.md +2 -7
  217. package/docs/examples/messaging/update-vonage-provider.md +2 -7
  218. package/docs/examples/migrations/create-appwrite-migration.md +5 -5
  219. package/docs/examples/migrations/create-csv-migration.md +4 -4
  220. package/docs/examples/migrations/create-firebase-migration.md +3 -3
  221. package/docs/examples/migrations/create-n-host-migration.md +8 -9
  222. package/docs/examples/migrations/create-supabase-migration.md +7 -8
  223. package/docs/examples/migrations/delete.md +1 -1
  224. package/docs/examples/migrations/get-appwrite-report.md +5 -5
  225. package/docs/examples/migrations/get-firebase-report.md +3 -3
  226. package/docs/examples/migrations/get-n-host-report.md +8 -9
  227. package/docs/examples/migrations/get-supabase-report.md +7 -8
  228. package/docs/examples/migrations/get.md +1 -1
  229. package/docs/examples/migrations/list.md +1 -3
  230. package/docs/examples/migrations/retry.md +1 -1
  231. package/docs/examples/project/create-variable.md +3 -4
  232. package/docs/examples/project/delete-variable.md +2 -2
  233. package/docs/examples/project/get-usage.md +3 -4
  234. package/docs/examples/project/get-variable.md +2 -2
  235. package/docs/examples/project/list-variables.md +1 -1
  236. package/docs/examples/project/update-variable.md +3 -5
  237. package/docs/examples/projects/create-dev-key.md +4 -4
  238. package/docs/examples/projects/create-jwt.md +3 -0
  239. package/docs/examples/projects/create-key.md +4 -5
  240. package/docs/examples/projects/create-platform.md +4 -7
  241. package/docs/examples/projects/create-smtp-test.md +6 -11
  242. package/docs/examples/projects/create-webhook.md +6 -9
  243. package/docs/examples/projects/create.md +3 -13
  244. package/docs/examples/projects/delete-dev-key.md +3 -3
  245. package/docs/examples/projects/delete-email-template.md +4 -4
  246. package/docs/examples/projects/delete-key.md +3 -3
  247. package/docs/examples/projects/delete-platform.md +3 -3
  248. package/docs/examples/projects/delete-sms-template.md +4 -4
  249. package/docs/examples/projects/delete-webhook.md +3 -3
  250. package/docs/examples/projects/delete.md +1 -1
  251. package/docs/examples/projects/get-dev-key.md +3 -3
  252. package/docs/examples/projects/get-email-template.md +4 -4
  253. package/docs/examples/projects/get-key.md +3 -3
  254. package/docs/examples/projects/get-platform.md +3 -3
  255. package/docs/examples/projects/get-sms-template.md +4 -4
  256. package/docs/examples/projects/get-webhook.md +3 -3
  257. package/docs/examples/projects/get.md +1 -1
  258. package/docs/examples/projects/list-dev-keys.md +2 -3
  259. package/docs/examples/projects/list-keys.md +2 -2
  260. package/docs/examples/projects/list-platforms.md +2 -2
  261. package/docs/examples/projects/list-webhooks.md +2 -2
  262. package/docs/examples/projects/list.md +1 -3
  263. package/docs/examples/projects/update-api-status-all.md +3 -3
  264. package/docs/examples/projects/update-api-status.md +4 -4
  265. package/docs/examples/projects/update-auth-duration.md +3 -3
  266. package/docs/examples/projects/update-auth-limit.md +3 -3
  267. package/docs/examples/projects/update-auth-password-dictionary.md +3 -3
  268. package/docs/examples/projects/update-auth-password-history.md +3 -3
  269. package/docs/examples/projects/update-auth-sessions-limit.md +3 -3
  270. package/docs/examples/projects/update-auth-status.md +4 -4
  271. package/docs/examples/projects/update-dev-key.md +5 -5
  272. package/docs/examples/projects/update-email-template.md +6 -9
  273. package/docs/examples/projects/update-key.md +5 -6
  274. package/docs/examples/projects/update-memberships-privacy.md +5 -5
  275. package/docs/examples/projects/update-mock-numbers.md +3 -3
  276. package/docs/examples/projects/update-o-auth-2.md +3 -0
  277. package/docs/examples/projects/update-personal-data-check.md +3 -3
  278. package/docs/examples/projects/update-platform.md +4 -7
  279. package/docs/examples/projects/update-service-status-all.md +3 -3
  280. package/docs/examples/projects/update-service-status.md +4 -4
  281. package/docs/examples/projects/update-session-alerts.md +3 -3
  282. package/docs/examples/projects/update-session-invalidation.md +3 -0
  283. package/docs/examples/projects/update-sms-template.md +5 -5
  284. package/docs/examples/projects/update-smtp.md +3 -11
  285. package/docs/examples/projects/update-team.md +3 -3
  286. package/docs/examples/projects/update-webhook-signature.md +3 -3
  287. package/docs/examples/projects/update-webhook.md +7 -10
  288. package/docs/examples/projects/update.md +2 -11
  289. package/docs/examples/proxy/create-api-rule.md +2 -0
  290. package/docs/examples/proxy/create-function-rule.md +3 -4
  291. package/docs/examples/proxy/create-redirect-rule.md +6 -6
  292. package/docs/examples/proxy/create-site-rule.md +3 -4
  293. package/docs/examples/proxy/delete-rule.md +2 -2
  294. package/docs/examples/proxy/get-rule.md +2 -2
  295. package/docs/examples/proxy/list-rules.md +1 -3
  296. package/docs/examples/proxy/update-rule-verification.md +2 -2
  297. package/docs/examples/sites/create-deployment.md +4 -7
  298. package/docs/examples/sites/create-duplicate-deployment.md +3 -3
  299. package/docs/examples/sites/create-template-deployment.md +6 -7
  300. package/docs/examples/sites/create-variable.md +4 -5
  301. package/docs/examples/sites/create-vcs-deployment.md +4 -5
  302. package/docs/examples/sites/create.md +4 -18
  303. package/docs/examples/sites/delete-deployment.md +3 -3
  304. package/docs/examples/sites/delete-log.md +3 -3
  305. package/docs/examples/sites/delete-variable.md +3 -3
  306. package/docs/examples/sites/delete.md +1 -1
  307. package/docs/examples/sites/get-deployment-download.md +3 -4
  308. package/docs/examples/sites/get-deployment.md +3 -3
  309. package/docs/examples/sites/get-log.md +3 -3
  310. package/docs/examples/sites/get-template.md +2 -2
  311. package/docs/examples/sites/get-usage.md +2 -3
  312. package/docs/examples/sites/get-variable.md +3 -3
  313. package/docs/examples/sites/get.md +1 -1
  314. package/docs/examples/sites/list-deployments.md +2 -4
  315. package/docs/examples/sites/list-frameworks.md +1 -1
  316. package/docs/examples/sites/list-logs.md +2 -3
  317. package/docs/examples/sites/list-specifications.md +1 -1
  318. package/docs/examples/sites/list-templates.md +1 -5
  319. package/docs/examples/sites/list-usage.md +1 -2
  320. package/docs/examples/sites/list-variables.md +2 -2
  321. package/docs/examples/sites/list.md +1 -3
  322. package/docs/examples/sites/update-deployment-status.md +3 -3
  323. package/docs/examples/sites/update-site-deployment.md +3 -3
  324. package/docs/examples/sites/update-variable.md +4 -6
  325. package/docs/examples/sites/update.md +3 -18
  326. package/docs/examples/storage/create-bucket.md +3 -11
  327. package/docs/examples/storage/create-file.md +4 -5
  328. package/docs/examples/storage/delete-bucket.md +2 -2
  329. package/docs/examples/storage/delete-file.md +3 -3
  330. package/docs/examples/storage/get-bucket-usage.md +2 -3
  331. package/docs/examples/storage/get-bucket.md +2 -2
  332. package/docs/examples/storage/get-file-download.md +3 -4
  333. package/docs/examples/storage/get-file-preview.md +3 -15
  334. package/docs/examples/storage/get-file-view.md +3 -4
  335. package/docs/examples/storage/get-file.md +3 -3
  336. package/docs/examples/storage/get-usage.md +1 -2
  337. package/docs/examples/storage/list-buckets.md +1 -3
  338. package/docs/examples/storage/list-files.md +2 -4
  339. package/docs/examples/storage/update-bucket.md +3 -11
  340. package/docs/examples/storage/update-file.md +3 -5
  341. package/docs/examples/tablesdb/create-boolean-column.md +5 -0
  342. package/docs/examples/tablesdb/create-datetime-column.md +5 -0
  343. package/docs/examples/tablesdb/create-email-column.md +5 -0
  344. package/docs/examples/tablesdb/create-enum-column.md +6 -0
  345. package/docs/examples/tablesdb/create-float-column.md +5 -0
  346. package/docs/examples/tablesdb/create-index.md +6 -0
  347. package/docs/examples/tablesdb/create-integer-column.md +5 -0
  348. package/docs/examples/tablesdb/create-ip-column.md +5 -0
  349. package/docs/examples/tablesdb/create-relationship-column.md +5 -0
  350. package/docs/examples/tablesdb/create-row.md +5 -0
  351. package/docs/examples/tablesdb/create-rows.md +4 -0
  352. package/docs/examples/tablesdb/create-string-column.md +6 -0
  353. package/docs/examples/tablesdb/create-table.md +4 -0
  354. package/docs/examples/tablesdb/create-url-column.md +5 -0
  355. package/docs/examples/tablesdb/create.md +3 -0
  356. package/docs/examples/tablesdb/decrement-row-column.md +5 -0
  357. package/docs/examples/tablesdb/delete-column.md +4 -0
  358. package/docs/examples/tablesdb/delete-index.md +4 -0
  359. package/docs/examples/tablesdb/delete-row.md +4 -0
  360. package/docs/examples/tablesdb/delete-rows.md +3 -0
  361. package/docs/examples/tablesdb/delete-table.md +3 -0
  362. package/docs/examples/tablesdb/delete.md +2 -0
  363. package/docs/examples/tablesdb/get-column.md +4 -0
  364. package/docs/examples/tablesdb/get-index.md +4 -0
  365. package/docs/examples/tablesdb/get-row.md +4 -0
  366. package/docs/examples/tablesdb/get-table-usage.md +3 -0
  367. package/docs/examples/tablesdb/get-table.md +3 -0
  368. package/docs/examples/tablesdb/get-usage.md +2 -0
  369. package/docs/examples/tablesdb/get.md +2 -0
  370. package/docs/examples/tablesdb/increment-row-column.md +5 -0
  371. package/docs/examples/tablesdb/list-columns.md +3 -0
  372. package/docs/examples/tablesdb/list-indexes.md +3 -0
  373. package/docs/examples/tablesdb/list-row-logs.md +4 -0
  374. package/docs/examples/tablesdb/list-rows.md +3 -0
  375. package/docs/examples/tablesdb/list-table-logs.md +3 -0
  376. package/docs/examples/tablesdb/list-tables.md +2 -0
  377. package/docs/examples/tablesdb/list-usage.md +1 -0
  378. package/docs/examples/tablesdb/list.md +1 -0
  379. package/docs/examples/tablesdb/update-boolean-column.md +6 -0
  380. package/docs/examples/tablesdb/update-datetime-column.md +6 -0
  381. package/docs/examples/tablesdb/update-email-column.md +6 -0
  382. package/docs/examples/tablesdb/update-enum-column.md +7 -0
  383. package/docs/examples/tablesdb/update-float-column.md +6 -0
  384. package/docs/examples/tablesdb/update-integer-column.md +6 -0
  385. package/docs/examples/tablesdb/update-ip-column.md +6 -0
  386. package/docs/examples/tablesdb/update-relationship-column.md +4 -0
  387. package/docs/examples/tablesdb/update-row.md +4 -0
  388. package/docs/examples/tablesdb/update-rows.md +3 -0
  389. package/docs/examples/tablesdb/update-string-column.md +6 -0
  390. package/docs/examples/tablesdb/update-table.md +4 -0
  391. package/docs/examples/tablesdb/update-url-column.md +6 -0
  392. package/docs/examples/tablesdb/update.md +3 -0
  393. package/docs/examples/tablesdb/upsert-row.md +4 -0
  394. package/docs/examples/tablesdb/upsert-rows.md +4 -0
  395. package/docs/examples/teams/create-membership.md +3 -8
  396. package/docs/examples/teams/create.md +2 -3
  397. package/docs/examples/teams/delete-membership.md +3 -3
  398. package/docs/examples/teams/delete.md +1 -1
  399. package/docs/examples/teams/get-membership.md +3 -3
  400. package/docs/examples/teams/get-prefs.md +2 -2
  401. package/docs/examples/teams/get.md +1 -1
  402. package/docs/examples/teams/list-logs.md +2 -3
  403. package/docs/examples/teams/list-memberships.md +2 -4
  404. package/docs/examples/teams/list.md +1 -3
  405. package/docs/examples/teams/update-membership-status.md +5 -5
  406. package/docs/examples/teams/update-membership.md +4 -4
  407. package/docs/examples/teams/update-name.md +3 -3
  408. package/docs/examples/teams/update-prefs.md +3 -3
  409. package/docs/examples/tokens/create-file-token.md +3 -4
  410. package/docs/examples/tokens/delete.md +1 -1
  411. package/docs/examples/tokens/get.md +1 -1
  412. package/docs/examples/tokens/list.md +2 -3
  413. package/docs/examples/tokens/update.md +1 -2
  414. package/docs/examples/users/create-argon-2-user.md +4 -0
  415. package/docs/examples/users/create-bcrypt-user.md +4 -5
  416. package/docs/examples/users/create-jwt.md +2 -0
  417. package/docs/examples/users/create-md-5-user.md +4 -0
  418. package/docs/examples/users/create-mfa-recovery-codes.md +2 -2
  419. package/docs/examples/users/create-ph-pass-user.md +4 -0
  420. package/docs/examples/users/create-scrypt-modified-user.md +7 -8
  421. package/docs/examples/users/create-scrypt-user.md +9 -10
  422. package/docs/examples/users/create-session.md +2 -2
  423. package/docs/examples/users/create-sha-user.md +4 -0
  424. package/docs/examples/users/create-target.md +5 -7
  425. package/docs/examples/users/create-token.md +2 -4
  426. package/docs/examples/users/create.md +1 -5
  427. package/docs/examples/users/delete-identity.md +2 -2
  428. package/docs/examples/users/delete-mfa-authenticator.md +3 -3
  429. package/docs/examples/users/delete-session.md +3 -3
  430. package/docs/examples/users/delete-sessions.md +2 -2
  431. package/docs/examples/users/delete-target.md +3 -3
  432. package/docs/examples/users/delete.md +1 -1
  433. package/docs/examples/users/get-mfa-recovery-codes.md +2 -2
  434. package/docs/examples/users/get-prefs.md +2 -2
  435. package/docs/examples/users/get-target.md +3 -3
  436. package/docs/examples/users/get-usage.md +1 -2
  437. package/docs/examples/users/get.md +1 -1
  438. package/docs/examples/users/list-identities.md +1 -3
  439. package/docs/examples/users/list-logs.md +2 -3
  440. package/docs/examples/users/list-memberships.md +2 -4
  441. package/docs/examples/users/list-mfa-factors.md +2 -2
  442. package/docs/examples/users/list-sessions.md +2 -2
  443. package/docs/examples/users/list-targets.md +2 -3
  444. package/docs/examples/users/list.md +1 -3
  445. package/docs/examples/users/update-email-verification.md +3 -3
  446. package/docs/examples/users/update-email.md +3 -3
  447. package/docs/examples/users/update-labels.md +3 -3
  448. package/docs/examples/users/update-mfa-recovery-codes.md +2 -2
  449. package/docs/examples/users/update-mfa.md +3 -3
  450. package/docs/examples/users/update-name.md +3 -3
  451. package/docs/examples/users/update-password.md +3 -3
  452. package/docs/examples/users/update-phone-verification.md +3 -3
  453. package/docs/examples/users/update-phone.md +3 -3
  454. package/docs/examples/users/update-prefs.md +3 -3
  455. package/docs/examples/users/update-status.md +3 -3
  456. package/docs/examples/users/update-target.md +3 -6
  457. package/docs/examples/vcs/create-repository-detection.md +4 -5
  458. package/docs/examples/vcs/create-repository.md +4 -4
  459. package/docs/examples/vcs/delete-installation.md +2 -2
  460. package/docs/examples/vcs/get-installation.md +2 -2
  461. package/docs/examples/vcs/get-repository-contents.md +3 -5
  462. package/docs/examples/vcs/get-repository.md +3 -3
  463. package/docs/examples/vcs/list-installations.md +1 -3
  464. package/docs/examples/vcs/list-repositories.md +3 -4
  465. package/docs/examples/vcs/list-repository-branches.md +3 -3
  466. package/docs/examples/vcs/update-external-deployments.md +4 -4
  467. package/index.js +40 -0
  468. package/install.ps1 +2 -2
  469. package/install.sh +1 -1
  470. package/lib/client.js +3 -8
  471. package/lib/commands/account.js +55 -103
  472. package/lib/commands/avatars.js +1 -8
  473. package/lib/commands/console.js +1 -3
  474. package/lib/commands/databases.js +279 -226
  475. package/lib/commands/functions.js +3 -33
  476. package/lib/commands/graphql.js +1 -3
  477. package/lib/commands/health.js +1 -23
  478. package/lib/commands/init.js +1 -1
  479. package/lib/commands/locale.js +1 -9
  480. package/lib/commands/messaging.js +41 -87
  481. package/lib/commands/migrations.js +7 -15
  482. package/lib/commands/project.js +1 -7
  483. package/lib/commands/projects.js +77 -86
  484. package/lib/commands/proxy.js +1 -9
  485. package/lib/commands/pull.js +62 -1
  486. package/lib/commands/push.js +163 -8
  487. package/lib/commands/run.js +1 -1
  488. package/lib/commands/sites.js +3 -32
  489. package/lib/commands/storage.js +3 -18
  490. package/lib/commands/tables-db.js +2896 -0
  491. package/lib/commands/teams.js +1 -15
  492. package/lib/commands/tokens.js +1 -6
  493. package/lib/commands/types.js +7 -9
  494. package/lib/commands/update.js +218 -0
  495. package/lib/commands/users.js +34 -77
  496. package/lib/commands/vcs.js +2 -12
  497. package/lib/config.js +99 -14
  498. package/lib/parser.js +2 -1
  499. package/lib/questions.js +32 -7
  500. package/lib/type-generation/languages/dart.js +13 -13
  501. package/lib/type-generation/languages/java.js +13 -13
  502. package/lib/type-generation/languages/javascript.js +14 -14
  503. package/lib/type-generation/languages/kotlin.js +11 -10
  504. package/lib/type-generation/languages/php.js +15 -14
  505. package/lib/type-generation/languages/swift.js +13 -13
  506. package/lib/type-generation/languages/typescript.js +8 -8
  507. package/lib/utils.js +39 -2
  508. package/package.json +1 -1
  509. package/scoop/{appwrite.json → appwrite.config.json} +3 -3
  510. package/docs/examples/account/create-j-w-t.md +0 -1
  511. package/docs/examples/account/create-magic-u-r-l-token.md +0 -5
  512. package/docs/examples/account/create-o-auth2session.md +0 -5
  513. package/docs/examples/account/create-o-auth2token.md +0 -5
  514. package/docs/examples/account/update-m-f-a.md +0 -2
  515. package/docs/examples/account/update-magic-u-r-l-session.md +0 -3
  516. package/docs/examples/avatars/get-q-r.md +0 -5
  517. package/docs/examples/databases/get-database-usage.md +0 -3
  518. package/docs/examples/health/get-d-b.md +0 -1
  519. package/docs/examples/locale/list-countries-e-u.md +0 -1
  520. package/docs/examples/messaging/create-msg91provider.md +0 -7
  521. package/docs/examples/messaging/update-msg91provider.md +0 -7
  522. package/docs/examples/projects/create-j-w-t.md +0 -4
  523. package/docs/examples/projects/update-o-auth2.md +0 -6
  524. package/docs/examples/proxy/create-a-p-i-rule.md +0 -2
  525. package/docs/examples/users/create-argon2user.md +0 -5
  526. package/docs/examples/users/create-j-w-t.md +0 -4
  527. package/docs/examples/users/create-m-d5user.md +0 -5
  528. package/docs/examples/users/create-p-h-pass-user.md +0 -5
  529. package/docs/examples/users/create-s-h-a-user.md +0 -6
@@ -7,7 +7,7 @@ const libClient = require('../client.js');
7
7
  const { getAllFiles, showConsoleLink } = require('../utils.js');
8
8
  const { Command } = require('commander');
9
9
  const { sdkForProject, sdkForConsole } = require('../sdks')
10
- const { parse, actionRunner, parseInteger, parseBool, commandDescriptions, success, log } = require('../parser')
10
+ const { parse, actionRunner, parseInteger, parseBool, commandDescriptions, success, log, warn } = require('../parser')
11
11
  const { localConfig, globalConfig } = require("../config");
12
12
  const { File } = require('undici');
13
13
  const { ReadableStream } = require('stream/web');
@@ -79,7 +79,6 @@ const databasesList = async ({queries,search,parseOutput = true, overrideForCli
79
79
  return response;
80
80
 
81
81
  }
82
-
83
82
  /**
84
83
  * @typedef {Object} DatabasesCreateRequestParams
85
84
  * @property {string} databaseId Unique Id. Choose a custom ID or generate a random ID with 'ID.unique()'. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
@@ -121,19 +120,18 @@ const databasesCreate = async ({databaseId,name,enabled,parseOutput = true, over
121
120
  return response;
122
121
 
123
122
  }
124
-
125
123
  /**
126
- * @typedef {Object} DatabasesGetUsageRequestParams
127
- * @property {DatabaseUsageRange} range 'Date range.
124
+ * @typedef {Object} DatabasesListUsageRequestParams
125
+ * @property {UsageRange} range Date range.
128
126
  * @property {boolean} overrideForCli
129
127
  * @property {boolean} parseOutput
130
128
  * @property {libClient | undefined} sdk
131
129
  */
132
130
 
133
131
  /**
134
- * @param {DatabasesGetUsageRequestParams} params
132
+ * @param {DatabasesListUsageRequestParams} params
135
133
  */
136
- const databasesGetUsage = async ({range,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
134
+ const databasesListUsage = async ({range,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => {
137
135
  let client = !sdk ? await sdkForProject() :
138
136
  sdk;
139
137
  let apiPath = '/databases/usage';
@@ -148,13 +146,16 @@ const databasesGetUsage = async ({range,parseOutput = true, overrideForCli = fal
148
146
  }, payload);
149
147
 
150
148
  if (parseOutput) {
151
- parse(response)
149
+ if(console) {
150
+ showConsoleLink('databases', 'listUsage');
151
+ } else {
152
+ parse(response)
153
+ }
152
154
  }
153
155
 
154
156
  return response;
155
157
 
156
158
  }
157
-
158
159
  /**
159
160
  * @typedef {Object} DatabasesGetRequestParams
160
161
  * @property {string} databaseId Database ID.
@@ -188,7 +189,6 @@ const databasesGet = async ({databaseId,parseOutput = true, overrideForCli = fal
188
189
  return response;
189
190
 
190
191
  }
191
-
192
192
  /**
193
193
  * @typedef {Object} DatabasesUpdateRequestParams
194
194
  * @property {string} databaseId Database ID.
@@ -227,7 +227,6 @@ const databasesUpdate = async ({databaseId,name,enabled,parseOutput = true, over
227
227
  return response;
228
228
 
229
229
  }
230
-
231
230
  /**
232
231
  * @typedef {Object} DatabasesDeleteRequestParams
233
232
  * @property {string} databaseId Database ID.
@@ -258,7 +257,6 @@ const databasesDelete = async ({databaseId,parseOutput = true, overrideForCli =
258
257
  return response;
259
258
 
260
259
  }
261
-
262
260
  /**
263
261
  * @typedef {Object} DatabasesListCollectionsRequestParams
264
262
  * @property {string} databaseId Database ID.
@@ -300,7 +298,6 @@ const databasesListCollections = async ({databaseId,queries,search,parseOutput =
300
298
  return response;
301
299
 
302
300
  }
303
-
304
301
  /**
305
302
  * @typedef {Object} DatabasesCreateCollectionRequestParams
306
303
  * @property {string} databaseId Database ID.
@@ -352,7 +349,6 @@ const databasesCreateCollection = async ({databaseId,collectionId,name,permissio
352
349
  return response;
353
350
 
354
351
  }
355
-
356
352
  /**
357
353
  * @typedef {Object} DatabasesGetCollectionRequestParams
358
354
  * @property {string} databaseId Database ID.
@@ -387,7 +383,6 @@ const databasesGetCollection = async ({databaseId,collectionId,parseOutput = tru
387
383
  return response;
388
384
 
389
385
  }
390
-
391
386
  /**
392
387
  * @typedef {Object} DatabasesUpdateCollectionRequestParams
393
388
  * @property {string} databaseId Database ID.
@@ -436,7 +431,6 @@ const databasesUpdateCollection = async ({databaseId,collectionId,name,permissio
436
431
  return response;
437
432
 
438
433
  }
439
-
440
434
  /**
441
435
  * @typedef {Object} DatabasesDeleteCollectionRequestParams
442
436
  * @property {string} databaseId Database ID.
@@ -468,11 +462,10 @@ const databasesDeleteCollection = async ({databaseId,collectionId,parseOutput =
468
462
  return response;
469
463
 
470
464
  }
471
-
472
465
  /**
473
466
  * @typedef {Object} DatabasesListAttributesRequestParams
474
467
  * @property {string} databaseId Database ID.
475
- * @property {string} collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
468
+ * @property {string} collectionId Collection ID.
476
469
  * @property {string[]} queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, size, required, array, status, error
477
470
  * @property {boolean} overrideForCli
478
471
  * @property {boolean} parseOutput
@@ -507,11 +500,10 @@ const databasesListAttributes = async ({databaseId,collectionId,queries,parseOut
507
500
  return response;
508
501
 
509
502
  }
510
-
511
503
  /**
512
504
  * @typedef {Object} DatabasesCreateBooleanAttributeRequestParams
513
505
  * @property {string} databaseId Database ID.
514
- * @property {string} collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
506
+ * @property {string} collectionId Collection ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
515
507
  * @property {string} key Attribute Key.
516
508
  * @property {boolean} required Is attribute required?
517
509
  * @property {boolean} xdefault Default value for attribute when not provided. Cannot be set when attribute is required.
@@ -555,11 +547,10 @@ const databasesCreateBooleanAttribute = async ({databaseId,collectionId,key,requ
555
547
  return response;
556
548
 
557
549
  }
558
-
559
550
  /**
560
551
  * @typedef {Object} DatabasesUpdateBooleanAttributeRequestParams
561
552
  * @property {string} databaseId Database ID.
562
- * @property {string} collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
553
+ * @property {string} collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#createCollection).
563
554
  * @property {string} key Attribute Key.
564
555
  * @property {boolean} required Is attribute required?
565
556
  * @property {boolean} xdefault Default value for attribute when not provided. Cannot be set when attribute is required.
@@ -600,11 +591,10 @@ const databasesUpdateBooleanAttribute = async ({databaseId,collectionId,key,requ
600
591
  return response;
601
592
 
602
593
  }
603
-
604
594
  /**
605
595
  * @typedef {Object} DatabasesCreateDatetimeAttributeRequestParams
606
596
  * @property {string} databaseId Database ID.
607
- * @property {string} collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
597
+ * @property {string} collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#createCollection).
608
598
  * @property {string} key Attribute Key.
609
599
  * @property {boolean} required Is attribute required?
610
600
  * @property {string} xdefault Default value for the attribute in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Cannot be set when attribute is required.
@@ -648,11 +638,10 @@ const databasesCreateDatetimeAttribute = async ({databaseId,collectionId,key,req
648
638
  return response;
649
639
 
650
640
  }
651
-
652
641
  /**
653
642
  * @typedef {Object} DatabasesUpdateDatetimeAttributeRequestParams
654
643
  * @property {string} databaseId Database ID.
655
- * @property {string} collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
644
+ * @property {string} collectionId Collection ID.
656
645
  * @property {string} key Attribute Key.
657
646
  * @property {boolean} required Is attribute required?
658
647
  * @property {string} xdefault Default value for attribute when not provided. Cannot be set when attribute is required.
@@ -693,11 +682,10 @@ const databasesUpdateDatetimeAttribute = async ({databaseId,collectionId,key,req
693
682
  return response;
694
683
 
695
684
  }
696
-
697
685
  /**
698
686
  * @typedef {Object} DatabasesCreateEmailAttributeRequestParams
699
687
  * @property {string} databaseId Database ID.
700
- * @property {string} collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
688
+ * @property {string} collectionId Collection ID.
701
689
  * @property {string} key Attribute Key.
702
690
  * @property {boolean} required Is attribute required?
703
691
  * @property {string} xdefault Default value for attribute when not provided. Cannot be set when attribute is required.
@@ -741,15 +729,14 @@ const databasesCreateEmailAttribute = async ({databaseId,collectionId,key,requir
741
729
  return response;
742
730
 
743
731
  }
744
-
745
732
  /**
746
733
  * @typedef {Object} DatabasesUpdateEmailAttributeRequestParams
747
734
  * @property {string} databaseId Database ID.
748
- * @property {string} collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
735
+ * @property {string} collectionId Collection ID.
749
736
  * @property {string} key Attribute Key.
750
737
  * @property {boolean} required Is attribute required?
751
738
  * @property {string} xdefault Default value for attribute when not provided. Cannot be set when attribute is required.
752
- * @property {string} newKey New attribute key.
739
+ * @property {string} newKey New Attribute Key.
753
740
  * @property {boolean} overrideForCli
754
741
  * @property {boolean} parseOutput
755
742
  * @property {libClient | undefined} sdk
@@ -786,13 +773,12 @@ const databasesUpdateEmailAttribute = async ({databaseId,collectionId,key,requir
786
773
  return response;
787
774
 
788
775
  }
789
-
790
776
  /**
791
777
  * @typedef {Object} DatabasesCreateEnumAttributeRequestParams
792
778
  * @property {string} databaseId Database ID.
793
- * @property {string} collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
779
+ * @property {string} collectionId Collection ID.
794
780
  * @property {string} key Attribute Key.
795
- * @property {string[]} elements Array of elements in enumerated type. Uses length of longest element to determine size. Maximum of 100 elements are allowed, each 255 characters long.
781
+ * @property {string[]} elements Array of enum values.
796
782
  * @property {boolean} required Is attribute required?
797
783
  * @property {string} xdefault Default value for attribute when not provided. Cannot be set when attribute is required.
798
784
  * @property {boolean} array Is attribute an array?
@@ -839,16 +825,15 @@ const databasesCreateEnumAttribute = async ({databaseId,collectionId,key,element
839
825
  return response;
840
826
 
841
827
  }
842
-
843
828
  /**
844
829
  * @typedef {Object} DatabasesUpdateEnumAttributeRequestParams
845
830
  * @property {string} databaseId Database ID.
846
- * @property {string} collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
831
+ * @property {string} collectionId Collection ID.
847
832
  * @property {string} key Attribute Key.
848
- * @property {string[]} elements Array of elements in enumerated type. Uses length of longest element to determine size. Maximum of 100 elements are allowed, each 255 characters long.
833
+ * @property {string[]} elements Updated list of enum values.
849
834
  * @property {boolean} required Is attribute required?
850
835
  * @property {string} xdefault Default value for attribute when not provided. Cannot be set when attribute is required.
851
- * @property {string} newKey New attribute key.
836
+ * @property {string} newKey New Attribute Key.
852
837
  * @property {boolean} overrideForCli
853
838
  * @property {boolean} parseOutput
854
839
  * @property {libClient | undefined} sdk
@@ -889,16 +874,15 @@ const databasesUpdateEnumAttribute = async ({databaseId,collectionId,key,element
889
874
  return response;
890
875
 
891
876
  }
892
-
893
877
  /**
894
878
  * @typedef {Object} DatabasesCreateFloatAttributeRequestParams
895
879
  * @property {string} databaseId Database ID.
896
- * @property {string} collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
880
+ * @property {string} collectionId Collection ID.
897
881
  * @property {string} key Attribute Key.
898
882
  * @property {boolean} required Is attribute required?
899
- * @property {number} min Minimum value to enforce on new documents
900
- * @property {number} max Maximum value to enforce on new documents
901
- * @property {number} xdefault Default value for attribute when not provided. Cannot be set when attribute is required.
883
+ * @property {number} min Minimum value.
884
+ * @property {number} max Maximum value.
885
+ * @property {number} xdefault Default value. Cannot be set when required.
902
886
  * @property {boolean} array Is attribute an array?
903
887
  * @property {boolean} overrideForCli
904
888
  * @property {boolean} parseOutput
@@ -945,17 +929,16 @@ const databasesCreateFloatAttribute = async ({databaseId,collectionId,key,requir
945
929
  return response;
946
930
 
947
931
  }
948
-
949
932
  /**
950
933
  * @typedef {Object} DatabasesUpdateFloatAttributeRequestParams
951
934
  * @property {string} databaseId Database ID.
952
- * @property {string} collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
935
+ * @property {string} collectionId Collection ID.
953
936
  * @property {string} key Attribute Key.
954
937
  * @property {boolean} required Is attribute required?
955
- * @property {number} xdefault Default value for attribute when not provided. Cannot be set when attribute is required.
956
- * @property {number} min Minimum value to enforce on new documents
957
- * @property {number} max Maximum value to enforce on new documents
958
- * @property {string} newKey New attribute key.
938
+ * @property {number} xdefault Default value. Cannot be set when required.
939
+ * @property {number} min Minimum value.
940
+ * @property {number} max Maximum value.
941
+ * @property {string} newKey New Attribute Key.
959
942
  * @property {boolean} overrideForCli
960
943
  * @property {boolean} parseOutput
961
944
  * @property {libClient | undefined} sdk
@@ -998,16 +981,15 @@ const databasesUpdateFloatAttribute = async ({databaseId,collectionId,key,requir
998
981
  return response;
999
982
 
1000
983
  }
1001
-
1002
984
  /**
1003
985
  * @typedef {Object} DatabasesCreateIntegerAttributeRequestParams
1004
986
  * @property {string} databaseId Database ID.
1005
- * @property {string} collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
987
+ * @property {string} collectionId Collection ID.
1006
988
  * @property {string} key Attribute Key.
1007
989
  * @property {boolean} required Is attribute required?
1008
- * @property {number} min Minimum value to enforce on new documents
1009
- * @property {number} max Maximum value to enforce on new documents
1010
- * @property {number} xdefault Default value for attribute when not provided. Cannot be set when attribute is required.
990
+ * @property {number} min Minimum value
991
+ * @property {number} max Maximum value
992
+ * @property {number} xdefault Default value. Cannot be set when attribute is required.
1011
993
  * @property {boolean} array Is attribute an array?
1012
994
  * @property {boolean} overrideForCli
1013
995
  * @property {boolean} parseOutput
@@ -1054,17 +1036,16 @@ const databasesCreateIntegerAttribute = async ({databaseId,collectionId,key,requ
1054
1036
  return response;
1055
1037
 
1056
1038
  }
1057
-
1058
1039
  /**
1059
1040
  * @typedef {Object} DatabasesUpdateIntegerAttributeRequestParams
1060
1041
  * @property {string} databaseId Database ID.
1061
- * @property {string} collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
1042
+ * @property {string} collectionId Collection ID.
1062
1043
  * @property {string} key Attribute Key.
1063
1044
  * @property {boolean} required Is attribute required?
1064
- * @property {number} xdefault Default value for attribute when not provided. Cannot be set when attribute is required.
1065
- * @property {number} min Minimum value to enforce on new documents
1066
- * @property {number} max Maximum value to enforce on new documents
1067
- * @property {string} newKey New attribute key.
1045
+ * @property {number} xdefault Default value. Cannot be set when attribute is required.
1046
+ * @property {number} min Minimum value
1047
+ * @property {number} max Maximum value
1048
+ * @property {string} newKey New Attribute Key.
1068
1049
  * @property {boolean} overrideForCli
1069
1050
  * @property {boolean} parseOutput
1070
1051
  * @property {libClient | undefined} sdk
@@ -1107,14 +1088,13 @@ const databasesUpdateIntegerAttribute = async ({databaseId,collectionId,key,requ
1107
1088
  return response;
1108
1089
 
1109
1090
  }
1110
-
1111
1091
  /**
1112
1092
  * @typedef {Object} DatabasesCreateIpAttributeRequestParams
1113
1093
  * @property {string} databaseId Database ID.
1114
- * @property {string} collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
1094
+ * @property {string} collectionId Collection ID.
1115
1095
  * @property {string} key Attribute Key.
1116
1096
  * @property {boolean} required Is attribute required?
1117
- * @property {string} xdefault Default value for attribute when not provided. Cannot be set when attribute is required.
1097
+ * @property {string} xdefault Default value. Cannot be set when attribute is required.
1118
1098
  * @property {boolean} array Is attribute an array?
1119
1099
  * @property {boolean} overrideForCli
1120
1100
  * @property {boolean} parseOutput
@@ -1155,15 +1135,14 @@ const databasesCreateIpAttribute = async ({databaseId,collectionId,key,required,
1155
1135
  return response;
1156
1136
 
1157
1137
  }
1158
-
1159
1138
  /**
1160
1139
  * @typedef {Object} DatabasesUpdateIpAttributeRequestParams
1161
1140
  * @property {string} databaseId Database ID.
1162
- * @property {string} collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
1141
+ * @property {string} collectionId Collection ID.
1163
1142
  * @property {string} key Attribute Key.
1164
1143
  * @property {boolean} required Is attribute required?
1165
- * @property {string} xdefault Default value for attribute when not provided. Cannot be set when attribute is required.
1166
- * @property {string} newKey New attribute key.
1144
+ * @property {string} xdefault Default value. Cannot be set when attribute is required.
1145
+ * @property {string} newKey New Attribute Key.
1167
1146
  * @property {boolean} overrideForCli
1168
1147
  * @property {boolean} parseOutput
1169
1148
  * @property {libClient | undefined} sdk
@@ -1200,12 +1179,11 @@ const databasesUpdateIpAttribute = async ({databaseId,collectionId,key,required,
1200
1179
  return response;
1201
1180
 
1202
1181
  }
1203
-
1204
1182
  /**
1205
1183
  * @typedef {Object} DatabasesCreateRelationshipAttributeRequestParams
1206
1184
  * @property {string} databaseId Database ID.
1207
- * @property {string} collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
1208
- * @property {string} relatedCollectionId Related Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
1185
+ * @property {string} collectionId Collection ID.
1186
+ * @property {string} relatedCollectionId Related Collection ID.
1209
1187
  * @property {RelationshipType} type Relation type
1210
1188
  * @property {boolean} twoWay Is Two Way?
1211
1189
  * @property {string} key Attribute Key.
@@ -1256,11 +1234,10 @@ const databasesCreateRelationshipAttribute = async ({databaseId,collectionId,rel
1256
1234
  return response;
1257
1235
 
1258
1236
  }
1259
-
1260
1237
  /**
1261
1238
  * @typedef {Object} DatabasesCreateStringAttributeRequestParams
1262
1239
  * @property {string} databaseId Database ID.
1263
- * @property {string} collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
1240
+ * @property {string} collectionId Collection ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
1264
1241
  * @property {string} key Attribute Key.
1265
1242
  * @property {number} size Attribute size for text attributes, in number of characters.
1266
1243
  * @property {boolean} required Is attribute required?
@@ -1312,16 +1289,15 @@ const databasesCreateStringAttribute = async ({databaseId,collectionId,key,size,
1312
1289
  return response;
1313
1290
 
1314
1291
  }
1315
-
1316
1292
  /**
1317
1293
  * @typedef {Object} DatabasesUpdateStringAttributeRequestParams
1318
1294
  * @property {string} databaseId Database ID.
1319
- * @property {string} collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
1295
+ * @property {string} collectionId Collection ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
1320
1296
  * @property {string} key Attribute Key.
1321
1297
  * @property {boolean} required Is attribute required?
1322
1298
  * @property {string} xdefault Default value for attribute when not provided. Cannot be set when attribute is required.
1323
1299
  * @property {number} size Maximum size of the string attribute.
1324
- * @property {string} newKey New attribute key.
1300
+ * @property {string} newKey New Attribute Key.
1325
1301
  * @property {boolean} overrideForCli
1326
1302
  * @property {boolean} parseOutput
1327
1303
  * @property {libClient | undefined} sdk
@@ -1361,11 +1337,10 @@ const databasesUpdateStringAttribute = async ({databaseId,collectionId,key,requi
1361
1337
  return response;
1362
1338
 
1363
1339
  }
1364
-
1365
1340
  /**
1366
1341
  * @typedef {Object} DatabasesCreateUrlAttributeRequestParams
1367
1342
  * @property {string} databaseId Database ID.
1368
- * @property {string} collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
1343
+ * @property {string} collectionId Collection ID.
1369
1344
  * @property {string} key Attribute Key.
1370
1345
  * @property {boolean} required Is attribute required?
1371
1346
  * @property {string} xdefault Default value for attribute when not provided. Cannot be set when attribute is required.
@@ -1409,15 +1384,14 @@ const databasesCreateUrlAttribute = async ({databaseId,collectionId,key,required
1409
1384
  return response;
1410
1385
 
1411
1386
  }
1412
-
1413
1387
  /**
1414
1388
  * @typedef {Object} DatabasesUpdateUrlAttributeRequestParams
1415
1389
  * @property {string} databaseId Database ID.
1416
- * @property {string} collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
1390
+ * @property {string} collectionId Collection ID.
1417
1391
  * @property {string} key Attribute Key.
1418
1392
  * @property {boolean} required Is attribute required?
1419
1393
  * @property {string} xdefault Default value for attribute when not provided. Cannot be set when attribute is required.
1420
- * @property {string} newKey New attribute key.
1394
+ * @property {string} newKey New Attribute Key.
1421
1395
  * @property {boolean} overrideForCli
1422
1396
  * @property {boolean} parseOutput
1423
1397
  * @property {libClient | undefined} sdk
@@ -1454,11 +1428,10 @@ const databasesUpdateUrlAttribute = async ({databaseId,collectionId,key,required
1454
1428
  return response;
1455
1429
 
1456
1430
  }
1457
-
1458
1431
  /**
1459
1432
  * @typedef {Object} DatabasesGetAttributeRequestParams
1460
1433
  * @property {string} databaseId Database ID.
1461
- * @property {string} collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
1434
+ * @property {string} collectionId Collection ID.
1462
1435
  * @property {string} key Attribute Key.
1463
1436
  * @property {boolean} overrideForCli
1464
1437
  * @property {boolean} parseOutput
@@ -1486,11 +1459,10 @@ const databasesGetAttribute = async ({databaseId,collectionId,key,parseOutput =
1486
1459
  return response;
1487
1460
 
1488
1461
  }
1489
-
1490
1462
  /**
1491
1463
  * @typedef {Object} DatabasesDeleteAttributeRequestParams
1492
1464
  * @property {string} databaseId Database ID.
1493
- * @property {string} collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
1465
+ * @property {string} collectionId Collection ID.
1494
1466
  * @property {string} key Attribute Key.
1495
1467
  * @property {boolean} overrideForCli
1496
1468
  * @property {boolean} parseOutput
@@ -1519,14 +1491,13 @@ const databasesDeleteAttribute = async ({databaseId,collectionId,key,parseOutput
1519
1491
  return response;
1520
1492
 
1521
1493
  }
1522
-
1523
1494
  /**
1524
1495
  * @typedef {Object} DatabasesUpdateRelationshipAttributeRequestParams
1525
1496
  * @property {string} databaseId Database ID.
1526
- * @property {string} collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
1497
+ * @property {string} collectionId Collection ID.
1527
1498
  * @property {string} key Attribute Key.
1528
1499
  * @property {RelationMutate} onDelete Constraints option
1529
- * @property {string} newKey New attribute key.
1500
+ * @property {string} newKey New Attribute Key.
1530
1501
  * @property {boolean} overrideForCli
1531
1502
  * @property {boolean} parseOutput
1532
1503
  * @property {libClient | undefined} sdk
@@ -1560,7 +1531,6 @@ const databasesUpdateRelationshipAttribute = async ({databaseId,collectionId,key
1560
1531
  return response;
1561
1532
 
1562
1533
  }
1563
-
1564
1534
  /**
1565
1535
  * @typedef {Object} DatabasesListDocumentsRequestParams
1566
1536
  * @property {string} databaseId Database ID.
@@ -1599,7 +1569,6 @@ const databasesListDocuments = async ({databaseId,collectionId,queries,parseOutp
1599
1569
  return response;
1600
1570
 
1601
1571
  }
1602
-
1603
1572
  /**
1604
1573
  * @typedef {Object} DatabasesCreateDocumentRequestParams
1605
1574
  * @property {string} databaseId Database ID.
@@ -1644,7 +1613,6 @@ const databasesCreateDocument = async ({databaseId,collectionId,documentId,data,
1644
1613
  return response;
1645
1614
 
1646
1615
  }
1647
-
1648
1616
  /**
1649
1617
  * @typedef {Object} DatabasesCreateDocumentsRequestParams
1650
1618
  * @property {string} databaseId Database ID.
@@ -1681,7 +1649,6 @@ const databasesCreateDocuments = async ({databaseId,collectionId,documents,parse
1681
1649
  return response;
1682
1650
 
1683
1651
  }
1684
-
1685
1652
  /**
1686
1653
  * @typedef {Object} DatabasesUpsertDocumentsRequestParams
1687
1654
  * @property {string} databaseId Database ID.
@@ -1718,7 +1685,6 @@ const databasesUpsertDocuments = async ({databaseId,collectionId,documents,parse
1718
1685
  return response;
1719
1686
 
1720
1687
  }
1721
-
1722
1688
  /**
1723
1689
  * @typedef {Object} DatabasesUpdateDocumentsRequestParams
1724
1690
  * @property {string} databaseId Database ID.
@@ -1759,7 +1725,6 @@ const databasesUpdateDocuments = async ({databaseId,collectionId,data,queries,pa
1759
1725
  return response;
1760
1726
 
1761
1727
  }
1762
-
1763
1728
  /**
1764
1729
  * @typedef {Object} DatabasesDeleteDocumentsRequestParams
1765
1730
  * @property {string} databaseId Database ID.
@@ -1796,7 +1761,6 @@ const databasesDeleteDocuments = async ({databaseId,collectionId,queries,parseOu
1796
1761
  return response;
1797
1762
 
1798
1763
  }
1799
-
1800
1764
  /**
1801
1765
  * @typedef {Object} DatabasesGetDocumentRequestParams
1802
1766
  * @property {string} databaseId Database ID.
@@ -1836,7 +1800,6 @@ const databasesGetDocument = async ({databaseId,collectionId,documentId,queries,
1836
1800
  return response;
1837
1801
 
1838
1802
  }
1839
-
1840
1803
  /**
1841
1804
  * @typedef {Object} DatabasesUpsertDocumentRequestParams
1842
1805
  * @property {string} databaseId Database ID.
@@ -1878,7 +1841,6 @@ const databasesUpsertDocument = async ({databaseId,collectionId,documentId,data,
1878
1841
  return response;
1879
1842
 
1880
1843
  }
1881
-
1882
1844
  /**
1883
1845
  * @typedef {Object} DatabasesUpdateDocumentRequestParams
1884
1846
  * @property {string} databaseId Database ID.
@@ -1920,7 +1882,6 @@ const databasesUpdateDocument = async ({databaseId,collectionId,documentId,data,
1920
1882
  return response;
1921
1883
 
1922
1884
  }
1923
-
1924
1885
  /**
1925
1886
  * @typedef {Object} DatabasesDeleteDocumentRequestParams
1926
1887
  * @property {string} databaseId Database ID.
@@ -1953,7 +1914,6 @@ const databasesDeleteDocument = async ({databaseId,collectionId,documentId,parse
1953
1914
  return response;
1954
1915
 
1955
1916
  }
1956
-
1957
1917
  /**
1958
1918
  * @typedef {Object} DatabasesListDocumentLogsRequestParams
1959
1919
  * @property {string} databaseId Database ID.
@@ -1989,7 +1949,88 @@ const databasesListDocumentLogs = async ({databaseId,collectionId,documentId,que
1989
1949
  return response;
1990
1950
 
1991
1951
  }
1952
+ /**
1953
+ * @typedef {Object} DatabasesDecrementDocumentAttributeRequestParams
1954
+ * @property {string} databaseId Database ID.
1955
+ * @property {string} collectionId Collection ID.
1956
+ * @property {string} documentId Document ID.
1957
+ * @property {string} attribute Attribute key.
1958
+ * @property {number} value Value to increment the attribute by. The value must be a number.
1959
+ * @property {number} min Minimum value for the attribute. If the current value is lesser than this value, an exception will be thrown.
1960
+ * @property {boolean} overrideForCli
1961
+ * @property {boolean} parseOutput
1962
+ * @property {libClient | undefined} sdk
1963
+ */
1992
1964
 
1965
+ /**
1966
+ * @param {DatabasesDecrementDocumentAttributeRequestParams} params
1967
+ */
1968
+ const databasesDecrementDocumentAttribute = async ({databaseId,collectionId,documentId,attribute,value,min,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
1969
+ let client = !sdk ? await sdkForProject() :
1970
+ sdk;
1971
+ let apiPath = '/databases/{databaseId}/collections/{collectionId}/documents/{documentId}/{attribute}/decrement'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{documentId}', documentId).replace('{attribute}', attribute);
1972
+ let payload = {};
1973
+ if (typeof value !== 'undefined') {
1974
+ payload['value'] = value;
1975
+ }
1976
+ if (typeof min !== 'undefined') {
1977
+ payload['min'] = min;
1978
+ }
1979
+
1980
+ let response = undefined;
1981
+
1982
+ response = await client.call('patch', apiPath, {
1983
+ 'content-type': 'application/json',
1984
+ }, payload);
1985
+
1986
+ if (parseOutput) {
1987
+ parse(response)
1988
+ }
1989
+
1990
+ return response;
1991
+
1992
+ }
1993
+ /**
1994
+ * @typedef {Object} DatabasesIncrementDocumentAttributeRequestParams
1995
+ * @property {string} databaseId Database ID.
1996
+ * @property {string} collectionId Collection ID.
1997
+ * @property {string} documentId Document ID.
1998
+ * @property {string} attribute Attribute key.
1999
+ * @property {number} value Value to increment the attribute by. The value must be a number.
2000
+ * @property {number} max Maximum value for the attribute. If the current value is greater than this value, an error will be thrown.
2001
+ * @property {boolean} overrideForCli
2002
+ * @property {boolean} parseOutput
2003
+ * @property {libClient | undefined} sdk
2004
+ */
2005
+
2006
+ /**
2007
+ * @param {DatabasesIncrementDocumentAttributeRequestParams} params
2008
+ */
2009
+ const databasesIncrementDocumentAttribute = async ({databaseId,collectionId,documentId,attribute,value,max,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
2010
+ let client = !sdk ? await sdkForProject() :
2011
+ sdk;
2012
+ let apiPath = '/databases/{databaseId}/collections/{collectionId}/documents/{documentId}/{attribute}/increment'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{documentId}', documentId).replace('{attribute}', attribute);
2013
+ let payload = {};
2014
+ if (typeof value !== 'undefined') {
2015
+ payload['value'] = value;
2016
+ }
2017
+ if (typeof max !== 'undefined') {
2018
+ payload['max'] = max;
2019
+ }
2020
+
2021
+ let response = undefined;
2022
+
2023
+ response = await client.call('patch', apiPath, {
2024
+ 'content-type': 'application/json',
2025
+ }, payload);
2026
+
2027
+ if (parseOutput) {
2028
+ parse(response)
2029
+ }
2030
+
2031
+ return response;
2032
+
2033
+ }
1993
2034
  /**
1994
2035
  * @typedef {Object} DatabasesListIndexesRequestParams
1995
2036
  * @property {string} databaseId Database ID.
@@ -2028,7 +2069,6 @@ const databasesListIndexes = async ({databaseId,collectionId,queries,parseOutput
2028
2069
  return response;
2029
2070
 
2030
2071
  }
2031
-
2032
2072
  /**
2033
2073
  * @typedef {Object} DatabasesCreateIndexRequestParams
2034
2074
  * @property {string} databaseId Database ID.
@@ -2083,7 +2123,6 @@ const databasesCreateIndex = async ({databaseId,collectionId,key,type,attributes
2083
2123
  return response;
2084
2124
 
2085
2125
  }
2086
-
2087
2126
  /**
2088
2127
  * @typedef {Object} DatabasesGetIndexRequestParams
2089
2128
  * @property {string} databaseId Database ID.
@@ -2115,7 +2154,6 @@ const databasesGetIndex = async ({databaseId,collectionId,key,parseOutput = true
2115
2154
  return response;
2116
2155
 
2117
2156
  }
2118
-
2119
2157
  /**
2120
2158
  * @typedef {Object} DatabasesDeleteIndexRequestParams
2121
2159
  * @property {string} databaseId Database ID.
@@ -2148,7 +2186,6 @@ const databasesDeleteIndex = async ({databaseId,collectionId,key,parseOutput = t
2148
2186
  return response;
2149
2187
 
2150
2188
  }
2151
-
2152
2189
  /**
2153
2190
  * @typedef {Object} DatabasesListCollectionLogsRequestParams
2154
2191
  * @property {string} databaseId Database ID.
@@ -2183,12 +2220,11 @@ const databasesListCollectionLogs = async ({databaseId,collectionId,queries,pars
2183
2220
  return response;
2184
2221
 
2185
2222
  }
2186
-
2187
2223
  /**
2188
2224
  * @typedef {Object} DatabasesGetCollectionUsageRequestParams
2189
2225
  * @property {string} databaseId Database ID.
2190
2226
  * @property {string} collectionId Collection ID.
2191
- * @property {DatabaseUsageRange} range Date range.
2227
+ * @property {UsageRange} range Date range.
2192
2228
  * @property {boolean} overrideForCli
2193
2229
  * @property {boolean} parseOutput
2194
2230
  * @property {libClient | undefined} sdk
@@ -2218,7 +2254,6 @@ const databasesGetCollectionUsage = async ({databaseId,collectionId,range,parseO
2218
2254
  return response;
2219
2255
 
2220
2256
  }
2221
-
2222
2257
  /**
2223
2258
  * @typedef {Object} DatabasesListLogsRequestParams
2224
2259
  * @property {string} databaseId Database ID.
@@ -2252,20 +2287,19 @@ const databasesListLogs = async ({databaseId,queries,parseOutput = true, overrid
2252
2287
  return response;
2253
2288
 
2254
2289
  }
2255
-
2256
2290
  /**
2257
- * @typedef {Object} DatabasesGetDatabaseUsageRequestParams
2291
+ * @typedef {Object} DatabasesGetUsageRequestParams
2258
2292
  * @property {string} databaseId Database ID.
2259
- * @property {DatabaseUsageRange} range 'Date range.
2293
+ * @property {UsageRange} range Date range.
2260
2294
  * @property {boolean} overrideForCli
2261
2295
  * @property {boolean} parseOutput
2262
2296
  * @property {libClient | undefined} sdk
2263
2297
  */
2264
2298
 
2265
2299
  /**
2266
- * @param {DatabasesGetDatabaseUsageRequestParams} params
2300
+ * @param {DatabasesGetUsageRequestParams} params
2267
2301
  */
2268
- const databasesGetDatabaseUsage = async ({databaseId,range,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => {
2302
+ const databasesGetUsage = async ({databaseId,range,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
2269
2303
  let client = !sdk ? await sdkForProject() :
2270
2304
  sdk;
2271
2305
  let apiPath = '/databases/{databaseId}/usage'.replace('{databaseId}', databaseId);
@@ -2280,20 +2314,15 @@ const databasesGetDatabaseUsage = async ({databaseId,range,parseOutput = true, o
2280
2314
  }, payload);
2281
2315
 
2282
2316
  if (parseOutput) {
2283
- if(console) {
2284
- showConsoleLink('databases', 'getDatabaseUsage', databaseId);
2285
- } else {
2286
- parse(response)
2287
- }
2317
+ parse(response)
2288
2318
  }
2289
2319
 
2290
2320
  return response;
2291
2321
 
2292
2322
  }
2293
-
2294
2323
  databases
2295
2324
  .command(`list`)
2296
- .description(`Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.`)
2325
+ .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db list' instead] Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.`)
2297
2326
  .option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name`)
2298
2327
  .option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`)
2299
2328
  .option(`--console`, `Get the resource console url`)
@@ -2301,28 +2330,29 @@ databases
2301
2330
 
2302
2331
  databases
2303
2332
  .command(`create`)
2304
- .description(`Create a new Database. `)
2333
+ .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db create-database' instead] Create a new Database. `)
2305
2334
  .requiredOption(`--database-id <database-id>`, `Unique Id. Choose a custom ID or generate a random ID with 'ID.unique()'. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`)
2306
2335
  .requiredOption(`--name <name>`, `Database name. Max length: 128 chars.`)
2307
2336
  .option(`--enabled [value]`, `Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.`, (value) => value === undefined ? true : parseBool(value))
2308
2337
  .action(actionRunner(databasesCreate))
2309
2338
 
2310
2339
  databases
2311
- .command(`get-usage`)
2312
- .description(`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.`)
2313
- .option(`--range <range>`, `'Date range.`)
2314
- .action(actionRunner(databasesGetUsage))
2340
+ .command(`list-usage`)
2341
+ .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db list-usage' instead] List 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.`)
2342
+ .option(`--range <range>`, `Date range.`)
2343
+ .option(`--console`, `Get the resource console url`)
2344
+ .action(actionRunner(databasesListUsage))
2315
2345
 
2316
2346
  databases
2317
2347
  .command(`get`)
2318
- .description(`Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.`)
2348
+ .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db get' instead] Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.`)
2319
2349
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
2320
2350
  .option(`--console`, `Get the resource console url`)
2321
2351
  .action(actionRunner(databasesGet))
2322
2352
 
2323
2353
  databases
2324
2354
  .command(`update`)
2325
- .description(`Update a database by its unique ID.`)
2355
+ .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db update' instead] Update a database by its unique ID.`)
2326
2356
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
2327
2357
  .requiredOption(`--name <name>`, `Database name. Max length: 128 chars.`)
2328
2358
  .option(`--enabled [value]`, `Is database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.`, (value) => value === undefined ? true : parseBool(value))
@@ -2330,13 +2360,13 @@ databases
2330
2360
 
2331
2361
  databases
2332
2362
  .command(`delete`)
2333
- .description(`Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.`)
2363
+ .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db delete' instead] Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.`)
2334
2364
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
2335
2365
  .action(actionRunner(databasesDelete))
2336
2366
 
2337
2367
  databases
2338
2368
  .command(`list-collections`)
2339
- .description(`Get a list of all collections that belong to the provided databaseId. You can use the search parameter to filter your results.`)
2369
+ .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db list-tables' instead] Get a list of all collections that belong to the provided databaseId. You can use the search parameter to filter your results.`)
2340
2370
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
2341
2371
  .option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, documentSecurity`)
2342
2372
  .option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`)
@@ -2345,7 +2375,7 @@ databases
2345
2375
 
2346
2376
  databases
2347
2377
  .command(`create-collection`)
2348
- .description(`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.`)
2378
+ .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db create-table' instead] 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.`)
2349
2379
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
2350
2380
  .requiredOption(`--collection-id <collection-id>`, `Unique Id. Choose a custom ID or generate a random ID with 'ID.unique()'. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`)
2351
2381
  .requiredOption(`--name <name>`, `Collection name. Max length: 128 chars.`)
@@ -2356,7 +2386,7 @@ databases
2356
2386
 
2357
2387
  databases
2358
2388
  .command(`get-collection`)
2359
- .description(`Get a collection by its unique ID. This endpoint response returns a JSON object with the collection metadata.`)
2389
+ .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db get-table' instead] Get a collection by its unique ID. This endpoint response returns a JSON object with the collection metadata.`)
2360
2390
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
2361
2391
  .requiredOption(`--collection-id <collection-id>`, `Collection ID.`)
2362
2392
  .option(`--console`, `Get the resource console url`)
@@ -2364,7 +2394,7 @@ databases
2364
2394
 
2365
2395
  databases
2366
2396
  .command(`update-collection`)
2367
- .description(`Update a collection by its unique ID.`)
2397
+ .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db update-table' instead] Update a collection by its unique ID.`)
2368
2398
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
2369
2399
  .requiredOption(`--collection-id <collection-id>`, `Collection ID.`)
2370
2400
  .requiredOption(`--name <name>`, `Collection name. Max length: 128 chars.`)
@@ -2375,25 +2405,25 @@ databases
2375
2405
 
2376
2406
  databases
2377
2407
  .command(`delete-collection`)
2378
- .description(`Delete a collection by its unique ID. Only users with write permissions have access to delete this resource.`)
2408
+ .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db delete-table' instead] Delete a collection by its unique ID. Only users with write permissions have access to delete this resource.`)
2379
2409
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
2380
2410
  .requiredOption(`--collection-id <collection-id>`, `Collection ID.`)
2381
2411
  .action(actionRunner(databasesDeleteCollection))
2382
2412
 
2383
2413
  databases
2384
2414
  .command(`list-attributes`)
2385
- .description(`List attributes in the collection.`)
2415
+ .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db list-columns' instead] List attributes in the collection.`)
2386
2416
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
2387
- .requiredOption(`--collection-id <collection-id>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`)
2417
+ .requiredOption(`--collection-id <collection-id>`, `Collection ID.`)
2388
2418
  .option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, size, required, array, status, error`)
2389
2419
  .option(`--console`, `Get the resource console url`)
2390
2420
  .action(actionRunner(databasesListAttributes))
2391
2421
 
2392
2422
  databases
2393
2423
  .command(`create-boolean-attribute`)
2394
- .description(`Create a boolean attribute. `)
2424
+ .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db create-boolean-column' instead] Create a boolean attribute. `)
2395
2425
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
2396
- .requiredOption(`--collection-id <collection-id>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`)
2426
+ .requiredOption(`--collection-id <collection-id>`, `Collection ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`)
2397
2427
  .requiredOption(`--key <key>`, `Attribute Key.`)
2398
2428
  .requiredOption(`--required [value]`, `Is attribute required?`, (value) => value === undefined ? true : parseBool(value))
2399
2429
  .option(`--xdefault [value]`, `Default value for attribute when not provided. Cannot be set when attribute is required.`, (value) => value === undefined ? true : parseBool(value))
@@ -2402,9 +2432,9 @@ databases
2402
2432
 
2403
2433
  databases
2404
2434
  .command(`update-boolean-attribute`)
2405
- .description(`Update a boolean attribute. Changing the 'default' value will not update already existing documents.`)
2435
+ .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db update-boolean-column' instead] Update a boolean attribute. Changing the 'default' value will not update already existing documents.`)
2406
2436
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
2407
- .requiredOption(`--collection-id <collection-id>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`)
2437
+ .requiredOption(`--collection-id <collection-id>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#createCollection).`)
2408
2438
  .requiredOption(`--key <key>`, `Attribute Key.`)
2409
2439
  .requiredOption(`--required [value]`, `Is attribute required?`, (value) => value === undefined ? true : parseBool(value))
2410
2440
  .option(`--xdefault [value]`, `Default value for attribute when not provided. Cannot be set when attribute is required.`, (value) => value === undefined ? true : parseBool(value))
@@ -2413,9 +2443,9 @@ databases
2413
2443
 
2414
2444
  databases
2415
2445
  .command(`create-datetime-attribute`)
2416
- .description(`Create a date time attribute according to the ISO 8601 standard.`)
2446
+ .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db create-datetime-column' instead] Create a date time attribute according to the ISO 8601 standard.`)
2417
2447
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
2418
- .requiredOption(`--collection-id <collection-id>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`)
2448
+ .requiredOption(`--collection-id <collection-id>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#createCollection).`)
2419
2449
  .requiredOption(`--key <key>`, `Attribute Key.`)
2420
2450
  .requiredOption(`--required [value]`, `Is attribute required?`, (value) => value === undefined ? true : parseBool(value))
2421
2451
  .option(`--xdefault <xdefault>`, `Default value for the attribute in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Cannot be set when attribute is required.`)
@@ -2424,9 +2454,9 @@ databases
2424
2454
 
2425
2455
  databases
2426
2456
  .command(`update-datetime-attribute`)
2427
- .description(`Update a date time attribute. Changing the 'default' value will not update already existing documents.`)
2457
+ .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db update-datetime-column' instead] Update a date time attribute. Changing the 'default' value will not update already existing documents.`)
2428
2458
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
2429
- .requiredOption(`--collection-id <collection-id>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`)
2459
+ .requiredOption(`--collection-id <collection-id>`, `Collection ID.`)
2430
2460
  .requiredOption(`--key <key>`, `Attribute Key.`)
2431
2461
  .requiredOption(`--required [value]`, `Is attribute required?`, (value) => value === undefined ? true : parseBool(value))
2432
2462
  .option(`--xdefault <xdefault>`, `Default value for attribute when not provided. Cannot be set when attribute is required.`)
@@ -2435,9 +2465,9 @@ databases
2435
2465
 
2436
2466
  databases
2437
2467
  .command(`create-email-attribute`)
2438
- .description(`Create an email attribute. `)
2468
+ .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db create-email-column' instead] Create an email attribute. `)
2439
2469
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
2440
- .requiredOption(`--collection-id <collection-id>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`)
2470
+ .requiredOption(`--collection-id <collection-id>`, `Collection ID.`)
2441
2471
  .requiredOption(`--key <key>`, `Attribute Key.`)
2442
2472
  .requiredOption(`--required [value]`, `Is attribute required?`, (value) => value === undefined ? true : parseBool(value))
2443
2473
  .option(`--xdefault <xdefault>`, `Default value for attribute when not provided. Cannot be set when attribute is required.`)
@@ -2446,22 +2476,22 @@ databases
2446
2476
 
2447
2477
  databases
2448
2478
  .command(`update-email-attribute`)
2449
- .description(`Update an email attribute. Changing the 'default' value will not update already existing documents. `)
2479
+ .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db update-email-column' instead] Update an email attribute. Changing the 'default' value will not update already existing documents. `)
2450
2480
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
2451
- .requiredOption(`--collection-id <collection-id>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`)
2481
+ .requiredOption(`--collection-id <collection-id>`, `Collection ID.`)
2452
2482
  .requiredOption(`--key <key>`, `Attribute Key.`)
2453
2483
  .requiredOption(`--required [value]`, `Is attribute required?`, (value) => value === undefined ? true : parseBool(value))
2454
2484
  .option(`--xdefault <xdefault>`, `Default value for attribute when not provided. Cannot be set when attribute is required.`)
2455
- .option(`--new-key <new-key>`, `New attribute key.`)
2485
+ .option(`--new-key <new-key>`, `New Attribute Key.`)
2456
2486
  .action(actionRunner(databasesUpdateEmailAttribute))
2457
2487
 
2458
2488
  databases
2459
2489
  .command(`create-enum-attribute`)
2460
- .description(`Create an enumeration attribute. The 'elements' param acts as a white-list of accepted values for this attribute. `)
2490
+ .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db create-enum-column' instead] Create an enum attribute. The 'elements' param acts as a white-list of accepted values for this attribute. `)
2461
2491
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
2462
- .requiredOption(`--collection-id <collection-id>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`)
2492
+ .requiredOption(`--collection-id <collection-id>`, `Collection ID.`)
2463
2493
  .requiredOption(`--key <key>`, `Attribute Key.`)
2464
- .requiredOption(`--elements [elements...]`, `Array of elements in enumerated type. Uses length of longest element to determine size. Maximum of 100 elements are allowed, each 255 characters long.`)
2494
+ .requiredOption(`--elements [elements...]`, `Array of enum values.`)
2465
2495
  .requiredOption(`--required [value]`, `Is attribute required?`, (value) => value === undefined ? true : parseBool(value))
2466
2496
  .option(`--xdefault <xdefault>`, `Default value for attribute when not provided. Cannot be set when attribute is required.`)
2467
2497
  .option(`--array [value]`, `Is attribute an array?`, (value) => value === undefined ? true : parseBool(value))
@@ -2469,96 +2499,96 @@ databases
2469
2499
 
2470
2500
  databases
2471
2501
  .command(`update-enum-attribute`)
2472
- .description(`Update an enum attribute. Changing the 'default' value will not update already existing documents. `)
2502
+ .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db update-enum-column' instead] Update an enum attribute. Changing the 'default' value will not update already existing documents. `)
2473
2503
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
2474
- .requiredOption(`--collection-id <collection-id>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`)
2504
+ .requiredOption(`--collection-id <collection-id>`, `Collection ID.`)
2475
2505
  .requiredOption(`--key <key>`, `Attribute Key.`)
2476
- .requiredOption(`--elements [elements...]`, `Array of elements in enumerated type. Uses length of longest element to determine size. Maximum of 100 elements are allowed, each 255 characters long.`)
2506
+ .requiredOption(`--elements [elements...]`, `Updated list of enum values.`)
2477
2507
  .requiredOption(`--required [value]`, `Is attribute required?`, (value) => value === undefined ? true : parseBool(value))
2478
2508
  .option(`--xdefault <xdefault>`, `Default value for attribute when not provided. Cannot be set when attribute is required.`)
2479
- .option(`--new-key <new-key>`, `New attribute key.`)
2509
+ .option(`--new-key <new-key>`, `New Attribute Key.`)
2480
2510
  .action(actionRunner(databasesUpdateEnumAttribute))
2481
2511
 
2482
2512
  databases
2483
2513
  .command(`create-float-attribute`)
2484
- .description(`Create a float attribute. Optionally, minimum and maximum values can be provided. `)
2514
+ .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db create-float-column' instead] Create a float attribute. Optionally, minimum and maximum values can be provided. `)
2485
2515
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
2486
- .requiredOption(`--collection-id <collection-id>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`)
2516
+ .requiredOption(`--collection-id <collection-id>`, `Collection ID.`)
2487
2517
  .requiredOption(`--key <key>`, `Attribute Key.`)
2488
2518
  .requiredOption(`--required [value]`, `Is attribute required?`, (value) => value === undefined ? true : parseBool(value))
2489
- .option(`--min <min>`, `Minimum value to enforce on new documents`, parseInteger)
2490
- .option(`--max <max>`, `Maximum value to enforce on new documents`, parseInteger)
2491
- .option(`--xdefault <xdefault>`, `Default value for attribute when not provided. Cannot be set when attribute is required.`, parseInteger)
2519
+ .option(`--min <min>`, `Minimum value.`, parseInteger)
2520
+ .option(`--max <max>`, `Maximum value.`, parseInteger)
2521
+ .option(`--xdefault <xdefault>`, `Default value. Cannot be set when required.`, parseInteger)
2492
2522
  .option(`--array [value]`, `Is attribute an array?`, (value) => value === undefined ? true : parseBool(value))
2493
2523
  .action(actionRunner(databasesCreateFloatAttribute))
2494
2524
 
2495
2525
  databases
2496
2526
  .command(`update-float-attribute`)
2497
- .description(`Update a float attribute. Changing the 'default' value will not update already existing documents. `)
2527
+ .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db update-float-column' instead] Update a float attribute. Changing the 'default' value will not update already existing documents. `)
2498
2528
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
2499
- .requiredOption(`--collection-id <collection-id>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`)
2529
+ .requiredOption(`--collection-id <collection-id>`, `Collection ID.`)
2500
2530
  .requiredOption(`--key <key>`, `Attribute Key.`)
2501
2531
  .requiredOption(`--required [value]`, `Is attribute required?`, (value) => value === undefined ? true : parseBool(value))
2502
- .option(`--xdefault <xdefault>`, `Default value for attribute when not provided. Cannot be set when attribute is required.`, parseInteger)
2503
- .option(`--min <min>`, `Minimum value to enforce on new documents`, parseInteger)
2504
- .option(`--max <max>`, `Maximum value to enforce on new documents`, parseInteger)
2505
- .option(`--new-key <new-key>`, `New attribute key.`)
2532
+ .option(`--xdefault <xdefault>`, `Default value. Cannot be set when required.`, parseInteger)
2533
+ .option(`--min <min>`, `Minimum value.`, parseInteger)
2534
+ .option(`--max <max>`, `Maximum value.`, parseInteger)
2535
+ .option(`--new-key <new-key>`, `New Attribute Key.`)
2506
2536
  .action(actionRunner(databasesUpdateFloatAttribute))
2507
2537
 
2508
2538
  databases
2509
2539
  .command(`create-integer-attribute`)
2510
- .description(`Create an integer attribute. Optionally, minimum and maximum values can be provided. `)
2540
+ .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db create-integer-column' instead] Create an integer attribute. Optionally, minimum and maximum values can be provided. `)
2511
2541
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
2512
- .requiredOption(`--collection-id <collection-id>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`)
2542
+ .requiredOption(`--collection-id <collection-id>`, `Collection ID.`)
2513
2543
  .requiredOption(`--key <key>`, `Attribute Key.`)
2514
2544
  .requiredOption(`--required [value]`, `Is attribute required?`, (value) => value === undefined ? true : parseBool(value))
2515
- .option(`--min <min>`, `Minimum value to enforce on new documents`, parseInteger)
2516
- .option(`--max <max>`, `Maximum value to enforce on new documents`, parseInteger)
2517
- .option(`--xdefault <xdefault>`, `Default value for attribute when not provided. Cannot be set when attribute is required.`, parseInteger)
2545
+ .option(`--min <min>`, `Minimum value`, parseInteger)
2546
+ .option(`--max <max>`, `Maximum value`, parseInteger)
2547
+ .option(`--xdefault <xdefault>`, `Default value. Cannot be set when attribute is required.`, parseInteger)
2518
2548
  .option(`--array [value]`, `Is attribute an array?`, (value) => value === undefined ? true : parseBool(value))
2519
2549
  .action(actionRunner(databasesCreateIntegerAttribute))
2520
2550
 
2521
2551
  databases
2522
2552
  .command(`update-integer-attribute`)
2523
- .description(`Update an integer attribute. Changing the 'default' value will not update already existing documents. `)
2553
+ .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db update-integer-column' instead] Update an integer attribute. Changing the 'default' value will not update already existing documents. `)
2524
2554
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
2525
- .requiredOption(`--collection-id <collection-id>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`)
2555
+ .requiredOption(`--collection-id <collection-id>`, `Collection ID.`)
2526
2556
  .requiredOption(`--key <key>`, `Attribute Key.`)
2527
2557
  .requiredOption(`--required [value]`, `Is attribute required?`, (value) => value === undefined ? true : parseBool(value))
2528
- .option(`--xdefault <xdefault>`, `Default value for attribute when not provided. Cannot be set when attribute is required.`, parseInteger)
2529
- .option(`--min <min>`, `Minimum value to enforce on new documents`, parseInteger)
2530
- .option(`--max <max>`, `Maximum value to enforce on new documents`, parseInteger)
2531
- .option(`--new-key <new-key>`, `New attribute key.`)
2558
+ .option(`--xdefault <xdefault>`, `Default value. Cannot be set when attribute is required.`, parseInteger)
2559
+ .option(`--min <min>`, `Minimum value`, parseInteger)
2560
+ .option(`--max <max>`, `Maximum value`, parseInteger)
2561
+ .option(`--new-key <new-key>`, `New Attribute Key.`)
2532
2562
  .action(actionRunner(databasesUpdateIntegerAttribute))
2533
2563
 
2534
2564
  databases
2535
2565
  .command(`create-ip-attribute`)
2536
- .description(`Create IP address attribute. `)
2566
+ .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db create-ip-column' instead] Create IP address attribute. `)
2537
2567
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
2538
- .requiredOption(`--collection-id <collection-id>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`)
2568
+ .requiredOption(`--collection-id <collection-id>`, `Collection ID.`)
2539
2569
  .requiredOption(`--key <key>`, `Attribute Key.`)
2540
2570
  .requiredOption(`--required [value]`, `Is attribute required?`, (value) => value === undefined ? true : parseBool(value))
2541
- .option(`--xdefault <xdefault>`, `Default value for attribute when not provided. Cannot be set when attribute is required.`)
2571
+ .option(`--xdefault <xdefault>`, `Default value. Cannot be set when attribute is required.`)
2542
2572
  .option(`--array [value]`, `Is attribute an array?`, (value) => value === undefined ? true : parseBool(value))
2543
2573
  .action(actionRunner(databasesCreateIpAttribute))
2544
2574
 
2545
2575
  databases
2546
2576
  .command(`update-ip-attribute`)
2547
- .description(`Update an ip attribute. Changing the 'default' value will not update already existing documents. `)
2577
+ .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db update-ip-column' instead] Update an ip attribute. Changing the 'default' value will not update already existing documents. `)
2548
2578
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
2549
- .requiredOption(`--collection-id <collection-id>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`)
2579
+ .requiredOption(`--collection-id <collection-id>`, `Collection ID.`)
2550
2580
  .requiredOption(`--key <key>`, `Attribute Key.`)
2551
2581
  .requiredOption(`--required [value]`, `Is attribute required?`, (value) => value === undefined ? true : parseBool(value))
2552
- .option(`--xdefault <xdefault>`, `Default value for attribute when not provided. Cannot be set when attribute is required.`)
2553
- .option(`--new-key <new-key>`, `New attribute key.`)
2582
+ .option(`--xdefault <xdefault>`, `Default value. Cannot be set when attribute is required.`)
2583
+ .option(`--new-key <new-key>`, `New Attribute Key.`)
2554
2584
  .action(actionRunner(databasesUpdateIpAttribute))
2555
2585
 
2556
2586
  databases
2557
2587
  .command(`create-relationship-attribute`)
2558
- .description(`Create relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes). `)
2588
+ .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db create-relationship-column' instead] Create relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes). `)
2559
2589
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
2560
- .requiredOption(`--collection-id <collection-id>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`)
2561
- .requiredOption(`--related-collection-id <related-collection-id>`, `Related Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`)
2590
+ .requiredOption(`--collection-id <collection-id>`, `Collection ID.`)
2591
+ .requiredOption(`--related-collection-id <related-collection-id>`, `Related Collection ID.`)
2562
2592
  .requiredOption(`--type <type>`, `Relation type`)
2563
2593
  .option(`--two-way [value]`, `Is Two Way?`, (value) => value === undefined ? true : parseBool(value))
2564
2594
  .option(`--key <key>`, `Attribute Key.`)
@@ -2568,9 +2598,9 @@ databases
2568
2598
 
2569
2599
  databases
2570
2600
  .command(`create-string-attribute`)
2571
- .description(`Create a string attribute. `)
2601
+ .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db create-string-column' instead] Create a string attribute. `)
2572
2602
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
2573
- .requiredOption(`--collection-id <collection-id>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`)
2603
+ .requiredOption(`--collection-id <collection-id>`, `Collection ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`)
2574
2604
  .requiredOption(`--key <key>`, `Attribute Key.`)
2575
2605
  .requiredOption(`--size <size>`, `Attribute size for text attributes, in number of characters.`, parseInteger)
2576
2606
  .requiredOption(`--required [value]`, `Is attribute required?`, (value) => value === undefined ? true : parseBool(value))
@@ -2581,21 +2611,21 @@ databases
2581
2611
 
2582
2612
  databases
2583
2613
  .command(`update-string-attribute`)
2584
- .description(`Update a string attribute. Changing the 'default' value will not update already existing documents. `)
2614
+ .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db update-string-column' instead] Update a string attribute. Changing the 'default' value will not update already existing documents. `)
2585
2615
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
2586
- .requiredOption(`--collection-id <collection-id>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`)
2616
+ .requiredOption(`--collection-id <collection-id>`, `Collection ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`)
2587
2617
  .requiredOption(`--key <key>`, `Attribute Key.`)
2588
2618
  .requiredOption(`--required [value]`, `Is attribute required?`, (value) => value === undefined ? true : parseBool(value))
2589
2619
  .option(`--xdefault <xdefault>`, `Default value for attribute when not provided. Cannot be set when attribute is required.`)
2590
2620
  .option(`--size <size>`, `Maximum size of the string attribute.`, parseInteger)
2591
- .option(`--new-key <new-key>`, `New attribute key.`)
2621
+ .option(`--new-key <new-key>`, `New Attribute Key.`)
2592
2622
  .action(actionRunner(databasesUpdateStringAttribute))
2593
2623
 
2594
2624
  databases
2595
2625
  .command(`create-url-attribute`)
2596
- .description(`Create a URL attribute. `)
2626
+ .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db create-url-column' instead] Create a URL attribute. `)
2597
2627
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
2598
- .requiredOption(`--collection-id <collection-id>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`)
2628
+ .requiredOption(`--collection-id <collection-id>`, `Collection ID.`)
2599
2629
  .requiredOption(`--key <key>`, `Attribute Key.`)
2600
2630
  .requiredOption(`--required [value]`, `Is attribute required?`, (value) => value === undefined ? true : parseBool(value))
2601
2631
  .option(`--xdefault <xdefault>`, `Default value for attribute when not provided. Cannot be set when attribute is required.`)
@@ -2604,44 +2634,44 @@ databases
2604
2634
 
2605
2635
  databases
2606
2636
  .command(`update-url-attribute`)
2607
- .description(`Update an url attribute. Changing the 'default' value will not update already existing documents. `)
2637
+ .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db update-url-column' instead] Update an url attribute. Changing the 'default' value will not update already existing documents. `)
2608
2638
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
2609
- .requiredOption(`--collection-id <collection-id>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`)
2639
+ .requiredOption(`--collection-id <collection-id>`, `Collection ID.`)
2610
2640
  .requiredOption(`--key <key>`, `Attribute Key.`)
2611
2641
  .requiredOption(`--required [value]`, `Is attribute required?`, (value) => value === undefined ? true : parseBool(value))
2612
2642
  .option(`--xdefault <xdefault>`, `Default value for attribute when not provided. Cannot be set when attribute is required.`)
2613
- .option(`--new-key <new-key>`, `New attribute key.`)
2643
+ .option(`--new-key <new-key>`, `New Attribute Key.`)
2614
2644
  .action(actionRunner(databasesUpdateUrlAttribute))
2615
2645
 
2616
2646
  databases
2617
2647
  .command(`get-attribute`)
2618
- .description(`Get attribute by ID.`)
2648
+ .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db get-column' instead] Get attribute by ID.`)
2619
2649
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
2620
- .requiredOption(`--collection-id <collection-id>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`)
2650
+ .requiredOption(`--collection-id <collection-id>`, `Collection ID.`)
2621
2651
  .requiredOption(`--key <key>`, `Attribute Key.`)
2622
2652
  .action(actionRunner(databasesGetAttribute))
2623
2653
 
2624
2654
  databases
2625
2655
  .command(`delete-attribute`)
2626
- .description(`Deletes an attribute.`)
2656
+ .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db delete-column' instead] Deletes an attribute.`)
2627
2657
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
2628
- .requiredOption(`--collection-id <collection-id>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`)
2658
+ .requiredOption(`--collection-id <collection-id>`, `Collection ID.`)
2629
2659
  .requiredOption(`--key <key>`, `Attribute Key.`)
2630
2660
  .action(actionRunner(databasesDeleteAttribute))
2631
2661
 
2632
2662
  databases
2633
2663
  .command(`update-relationship-attribute`)
2634
- .description(`Update relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes). `)
2664
+ .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db update-relationship-column' instead] Update relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes). `)
2635
2665
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
2636
- .requiredOption(`--collection-id <collection-id>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`)
2666
+ .requiredOption(`--collection-id <collection-id>`, `Collection ID.`)
2637
2667
  .requiredOption(`--key <key>`, `Attribute Key.`)
2638
2668
  .option(`--on-delete <on-delete>`, `Constraints option`)
2639
- .option(`--new-key <new-key>`, `New attribute key.`)
2669
+ .option(`--new-key <new-key>`, `New Attribute Key.`)
2640
2670
  .action(actionRunner(databasesUpdateRelationshipAttribute))
2641
2671
 
2642
2672
  databases
2643
2673
  .command(`list-documents`)
2644
- .description(`Get a list of all the user's documents in a given collection. You can use the query params to filter your results.`)
2674
+ .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db list-rows' instead] Get a list of all the user's documents in a given collection. You can use the query params to filter your results.`)
2645
2675
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
2646
2676
  .requiredOption(`--collection-id <collection-id>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`)
2647
2677
  .option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.`)
@@ -2650,7 +2680,7 @@ databases
2650
2680
 
2651
2681
  databases
2652
2682
  .command(`create-document`)
2653
- .description(`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.`)
2683
+ .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db create-row' instead] 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.`)
2654
2684
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
2655
2685
  .requiredOption(`--collection-id <collection-id>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). Make sure to define attributes before creating documents.`)
2656
2686
  .requiredOption(`--document-id <document-id>`, `Document ID. Choose a custom ID or generate a random ID with 'ID.unique()'. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`)
@@ -2660,7 +2690,7 @@ databases
2660
2690
 
2661
2691
  databases
2662
2692
  .command(`create-documents`)
2663
- .description(`**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions. 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.`)
2693
+ .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db create-rows' instead] 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.`)
2664
2694
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
2665
2695
  .requiredOption(`--collection-id <collection-id>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). Make sure to define attributes before creating documents.`)
2666
2696
  .requiredOption(`--documents [documents...]`, `Array of documents data as JSON objects.`)
@@ -2668,7 +2698,7 @@ databases
2668
2698
 
2669
2699
  databases
2670
2700
  .command(`upsert-documents`)
2671
- .description(`**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions. 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.`)
2701
+ .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db upsert-rows' instead] 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. `)
2672
2702
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
2673
2703
  .requiredOption(`--collection-id <collection-id>`, `Collection ID.`)
2674
2704
  .requiredOption(`--documents [documents...]`, `Array of document data as JSON objects. May contain partial documents.`)
@@ -2676,7 +2706,7 @@ databases
2676
2706
 
2677
2707
  databases
2678
2708
  .command(`update-documents`)
2679
- .description(`**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions. 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.`)
2709
+ .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db update-rows' instead] 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.`)
2680
2710
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
2681
2711
  .requiredOption(`--collection-id <collection-id>`, `Collection ID.`)
2682
2712
  .option(`--data <data>`, `Document data as JSON object. Include only attribute and value pairs to be updated.`)
@@ -2685,7 +2715,7 @@ databases
2685
2715
 
2686
2716
  databases
2687
2717
  .command(`delete-documents`)
2688
- .description(`**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions. Bulk delete documents using queries, if no queries are passed then all documents are deleted.`)
2718
+ .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db delete-rows' instead] Bulk delete documents using queries, if no queries are passed then all documents are deleted.`)
2689
2719
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
2690
2720
  .requiredOption(`--collection-id <collection-id>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`)
2691
2721
  .option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.`)
@@ -2693,7 +2723,7 @@ databases
2693
2723
 
2694
2724
  databases
2695
2725
  .command(`get-document`)
2696
- .description(`Get a document by its unique ID. This endpoint response returns a JSON object with the document data.`)
2726
+ .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db get-row' instead] Get a document by its unique ID. This endpoint response returns a JSON object with the document data.`)
2697
2727
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
2698
2728
  .requiredOption(`--collection-id <collection-id>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`)
2699
2729
  .requiredOption(`--document-id <document-id>`, `Document ID.`)
@@ -2703,7 +2733,7 @@ databases
2703
2733
 
2704
2734
  databases
2705
2735
  .command(`upsert-document`)
2706
- .description(`**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions. Create or update a 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.`)
2736
+ .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db upsert-row' instead] Create or update a 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.`)
2707
2737
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
2708
2738
  .requiredOption(`--collection-id <collection-id>`, `Collection ID.`)
2709
2739
  .requiredOption(`--document-id <document-id>`, `Document ID.`)
@@ -2713,7 +2743,7 @@ databases
2713
2743
 
2714
2744
  databases
2715
2745
  .command(`update-document`)
2716
- .description(`Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.`)
2746
+ .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db update-row' instead] Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.`)
2717
2747
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
2718
2748
  .requiredOption(`--collection-id <collection-id>`, `Collection ID.`)
2719
2749
  .requiredOption(`--document-id <document-id>`, `Document ID.`)
@@ -2723,7 +2753,7 @@ databases
2723
2753
 
2724
2754
  databases
2725
2755
  .command(`delete-document`)
2726
- .description(`Delete a document by its unique ID.`)
2756
+ .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db delete-row' instead] Delete a document by its unique ID.`)
2727
2757
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
2728
2758
  .requiredOption(`--collection-id <collection-id>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`)
2729
2759
  .requiredOption(`--document-id <document-id>`, `Document ID.`)
@@ -2731,16 +2761,38 @@ databases
2731
2761
 
2732
2762
  databases
2733
2763
  .command(`list-document-logs`)
2734
- .description(`Get the document activity logs list by its unique ID.`)
2764
+ .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db list-row-logs' instead] Get the document activity logs list by its unique ID.`)
2735
2765
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
2736
2766
  .requiredOption(`--collection-id <collection-id>`, `Collection ID.`)
2737
2767
  .requiredOption(`--document-id <document-id>`, `Document ID.`)
2738
2768
  .option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit and offset`)
2739
2769
  .action(actionRunner(databasesListDocumentLogs))
2740
2770
 
2771
+ databases
2772
+ .command(`decrement-document-attribute`)
2773
+ .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db decrement-row-column' instead] Decrement a specific attribute of a document by a given value.`)
2774
+ .requiredOption(`--database-id <database-id>`, `Database ID.`)
2775
+ .requiredOption(`--collection-id <collection-id>`, `Collection ID.`)
2776
+ .requiredOption(`--document-id <document-id>`, `Document ID.`)
2777
+ .requiredOption(`--attribute <attribute>`, `Attribute key.`)
2778
+ .option(`--value <value>`, `Value to increment the attribute by. The value must be a number.`, parseInteger)
2779
+ .option(`--min <min>`, `Minimum value for the attribute. If the current value is lesser than this value, an exception will be thrown.`, parseInteger)
2780
+ .action(actionRunner(databasesDecrementDocumentAttribute))
2781
+
2782
+ databases
2783
+ .command(`increment-document-attribute`)
2784
+ .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db increment-row-column' instead] Increment a specific attribute of a document by a given value.`)
2785
+ .requiredOption(`--database-id <database-id>`, `Database ID.`)
2786
+ .requiredOption(`--collection-id <collection-id>`, `Collection ID.`)
2787
+ .requiredOption(`--document-id <document-id>`, `Document ID.`)
2788
+ .requiredOption(`--attribute <attribute>`, `Attribute key.`)
2789
+ .option(`--value <value>`, `Value to increment the attribute by. The value must be a number.`, parseInteger)
2790
+ .option(`--max <max>`, `Maximum value for the attribute. If the current value is greater than this value, an error will be thrown.`, parseInteger)
2791
+ .action(actionRunner(databasesIncrementDocumentAttribute))
2792
+
2741
2793
  databases
2742
2794
  .command(`list-indexes`)
2743
- .description(`List indexes in the collection.`)
2795
+ .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db list-indexes' instead] List indexes in the collection.`)
2744
2796
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
2745
2797
  .requiredOption(`--collection-id <collection-id>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`)
2746
2798
  .option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, status, attributes, error`)
@@ -2749,7 +2801,7 @@ databases
2749
2801
 
2750
2802
  databases
2751
2803
  .command(`create-index`)
2752
- .description(`Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request. Attributes can be 'key', 'fulltext', and 'unique'.`)
2804
+ .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db create-index' instead] Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request. Attributes can be 'key', 'fulltext', and 'unique'.`)
2753
2805
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
2754
2806
  .requiredOption(`--collection-id <collection-id>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`)
2755
2807
  .requiredOption(`--key <key>`, `Index Key.`)
@@ -2761,7 +2813,7 @@ databases
2761
2813
 
2762
2814
  databases
2763
2815
  .command(`get-index`)
2764
- .description(`Get index by ID.`)
2816
+ .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db get-index' instead] Get index by ID.`)
2765
2817
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
2766
2818
  .requiredOption(`--collection-id <collection-id>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`)
2767
2819
  .requiredOption(`--key <key>`, `Index Key.`)
@@ -2769,7 +2821,7 @@ databases
2769
2821
 
2770
2822
  databases
2771
2823
  .command(`delete-index`)
2772
- .description(`Delete an index.`)
2824
+ .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db delete-index' instead] Delete an index.`)
2773
2825
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
2774
2826
  .requiredOption(`--collection-id <collection-id>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`)
2775
2827
  .requiredOption(`--key <key>`, `Index Key.`)
@@ -2777,7 +2829,7 @@ databases
2777
2829
 
2778
2830
  databases
2779
2831
  .command(`list-collection-logs`)
2780
- .description(`Get the collection activity logs list by its unique ID.`)
2832
+ .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db list-table-logs' instead] Get the collection activity logs list by its unique ID.`)
2781
2833
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
2782
2834
  .requiredOption(`--collection-id <collection-id>`, `Collection ID.`)
2783
2835
  .option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit and offset`)
@@ -2785,7 +2837,7 @@ databases
2785
2837
 
2786
2838
  databases
2787
2839
  .command(`get-collection-usage`)
2788
- .description(`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.`)
2840
+ .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db get-table-usage' instead] 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.`)
2789
2841
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
2790
2842
  .requiredOption(`--collection-id <collection-id>`, `Collection ID.`)
2791
2843
  .option(`--range <range>`, `Date range.`)
@@ -2793,24 +2845,23 @@ databases
2793
2845
 
2794
2846
  databases
2795
2847
  .command(`list-logs`)
2796
- .description(`Get the database activity logs list by its unique ID.`)
2848
+ .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db list-database-logs' instead] Get the database activity logs list by its unique ID.`)
2797
2849
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
2798
2850
  .option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit and offset`)
2799
2851
  .action(actionRunner(databasesListLogs))
2800
2852
 
2801
2853
  databases
2802
- .command(`get-database-usage`)
2803
- .description(`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.`)
2854
+ .command(`get-usage`)
2855
+ .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db get-usage' instead] 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.`)
2804
2856
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
2805
- .option(`--range <range>`, `'Date range.`)
2806
- .option(`--console`, `Get the resource console url`)
2807
- .action(actionRunner(databasesGetDatabaseUsage))
2857
+ .option(`--range <range>`, `Date range.`)
2858
+ .action(actionRunner(databasesGetUsage))
2808
2859
 
2809
2860
  module.exports = {
2810
2861
  databases,
2811
2862
  databasesList,
2812
2863
  databasesCreate,
2813
- databasesGetUsage,
2864
+ databasesListUsage,
2814
2865
  databasesGet,
2815
2866
  databasesUpdate,
2816
2867
  databasesDelete,
@@ -2853,6 +2904,8 @@ module.exports = {
2853
2904
  databasesUpdateDocument,
2854
2905
  databasesDeleteDocument,
2855
2906
  databasesListDocumentLogs,
2907
+ databasesDecrementDocumentAttribute,
2908
+ databasesIncrementDocumentAttribute,
2856
2909
  databasesListIndexes,
2857
2910
  databasesCreateIndex,
2858
2911
  databasesGetIndex,
@@ -2860,5 +2913,5 @@ module.exports = {
2860
2913
  databasesListCollectionLogs,
2861
2914
  databasesGetCollectionUsage,
2862
2915
  databasesListLogs,
2863
- databasesGetDatabaseUsage
2916
+ databasesGetUsage
2864
2917
  };