appwrite-cli 13.0.0-rc.2 → 13.0.0-rc.3

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 (718) hide show
  1. package/.github/workflows/{npm-publish.yml → publish.yml} +1 -1
  2. package/CHANGELOG.md +106 -101
  3. package/LICENSE.md +2 -2
  4. package/README.md +36 -59
  5. package/cli.ts +152 -0
  6. package/dist/bundle.cjs +4613 -3653
  7. package/dist/cli.d.ts +3 -0
  8. package/dist/cli.d.ts.map +1 -0
  9. package/dist/cli.js +145 -0
  10. package/dist/cli.js.map +1 -0
  11. package/dist/index.d.ts +10 -2
  12. package/dist/index.d.ts.map +1 -1
  13. package/dist/index.js +7 -142
  14. package/dist/index.js.map +1 -1
  15. package/dist/lib/client.d.ts.map +1 -1
  16. package/dist/lib/client.js +7 -6
  17. package/dist/lib/client.js.map +1 -1
  18. package/dist/lib/commands/config.d.ts +562 -0
  19. package/dist/lib/commands/config.d.ts.map +1 -0
  20. package/dist/lib/commands/config.js +416 -0
  21. package/dist/lib/commands/config.js.map +1 -0
  22. package/dist/lib/commands/db.d.ts +34 -0
  23. package/dist/lib/commands/db.d.ts.map +1 -0
  24. package/dist/lib/commands/db.js +247 -0
  25. package/dist/lib/commands/db.js.map +1 -0
  26. package/dist/lib/commands/errors.d.ts +68 -0
  27. package/dist/lib/commands/errors.d.ts.map +1 -0
  28. package/dist/lib/commands/errors.js +72 -0
  29. package/dist/lib/commands/errors.js.map +1 -0
  30. package/dist/lib/commands/init.d.ts.map +1 -1
  31. package/dist/lib/commands/init.js +15 -14
  32. package/dist/lib/commands/init.js.map +1 -1
  33. package/dist/lib/commands/pull.d.ts +104 -2
  34. package/dist/lib/commands/pull.d.ts.map +1 -1
  35. package/dist/lib/commands/pull.js +470 -281
  36. package/dist/lib/commands/pull.js.map +1 -1
  37. package/dist/lib/commands/push.d.ts +106 -0
  38. package/dist/lib/commands/push.d.ts.map +1 -1
  39. package/dist/lib/commands/push.js +1257 -1628
  40. package/dist/lib/commands/push.js.map +1 -1
  41. package/dist/lib/commands/run.js +1 -1
  42. package/dist/lib/commands/run.js.map +1 -1
  43. package/dist/lib/commands/schema.d.ts +59 -0
  44. package/dist/lib/commands/schema.d.ts.map +1 -0
  45. package/dist/lib/commands/schema.js +86 -0
  46. package/dist/lib/commands/schema.js.map +1 -0
  47. package/dist/lib/commands/services/account.d.ts.map +1 -1
  48. package/dist/lib/commands/services/account.js +86 -64
  49. package/dist/lib/commands/services/account.js.map +1 -1
  50. package/dist/lib/commands/services/console.d.ts.map +1 -1
  51. package/dist/lib/commands/services/console.js +4 -17
  52. package/dist/lib/commands/services/console.js.map +1 -1
  53. package/dist/lib/commands/services/databases.d.ts.map +1 -1
  54. package/dist/lib/commands/services/databases.js +160 -152
  55. package/dist/lib/commands/services/databases.js.map +1 -1
  56. package/dist/lib/commands/services/functions.d.ts.map +1 -1
  57. package/dist/lib/commands/services/functions.js +41 -33
  58. package/dist/lib/commands/services/functions.js.map +1 -1
  59. package/dist/lib/commands/services/graphql.d.ts.map +1 -1
  60. package/dist/lib/commands/services/graphql.js +3 -3
  61. package/dist/lib/commands/services/graphql.js.map +1 -1
  62. package/dist/lib/commands/services/health.d.ts.map +1 -1
  63. package/dist/lib/commands/services/health.js +24 -24
  64. package/dist/lib/commands/services/health.js.map +1 -1
  65. package/dist/lib/commands/services/locale.d.ts.map +1 -1
  66. package/dist/lib/commands/services/locale.js +9 -9
  67. package/dist/lib/commands/services/locale.js.map +1 -1
  68. package/dist/lib/commands/services/messaging.d.ts.map +1 -1
  69. package/dist/lib/commands/services/messaging.js +59 -59
  70. package/dist/lib/commands/services/messaging.js.map +1 -1
  71. package/dist/lib/commands/services/migrations.d.ts.map +1 -1
  72. package/dist/lib/commands/services/migrations.js +19 -19
  73. package/dist/lib/commands/services/migrations.js.map +1 -1
  74. package/dist/lib/commands/services/project.d.ts.map +1 -1
  75. package/dist/lib/commands/services/project.js +8 -8
  76. package/dist/lib/commands/services/project.js.map +1 -1
  77. package/dist/lib/commands/services/projects.d.ts.map +1 -1
  78. package/dist/lib/commands/services/projects.js +64 -64
  79. package/dist/lib/commands/services/projects.js.map +1 -1
  80. package/dist/lib/commands/services/proxy.d.ts.map +1 -1
  81. package/dist/lib/commands/services/proxy.js +11 -11
  82. package/dist/lib/commands/services/proxy.js.map +1 -1
  83. package/dist/lib/commands/services/sites.d.ts.map +1 -1
  84. package/dist/lib/commands/services/sites.js +41 -33
  85. package/dist/lib/commands/services/sites.js.map +1 -1
  86. package/dist/lib/commands/services/storage.d.ts.map +1 -1
  87. package/dist/lib/commands/services/storage.js +38 -16
  88. package/dist/lib/commands/services/storage.js.map +1 -1
  89. package/dist/lib/commands/services/tables-db.d.ts +3 -0
  90. package/dist/lib/commands/services/tables-db.d.ts.map +1 -0
  91. package/dist/lib/commands/services/{tablesdb.js → tables-db.js} +171 -163
  92. package/dist/lib/commands/services/tables-db.js.map +1 -0
  93. package/dist/lib/commands/services/teams.d.ts.map +1 -1
  94. package/dist/lib/commands/services/teams.js +16 -16
  95. package/dist/lib/commands/services/teams.js.map +1 -1
  96. package/dist/lib/commands/services/tokens.d.ts.map +1 -1
  97. package/dist/lib/commands/services/tokens.js +6 -6
  98. package/dist/lib/commands/services/tokens.js.map +1 -1
  99. package/dist/lib/commands/services/users.d.ts.map +1 -1
  100. package/dist/lib/commands/services/users.js +54 -54
  101. package/dist/lib/commands/services/users.js.map +1 -1
  102. package/dist/lib/commands/services/vcs.d.ts.map +1 -1
  103. package/dist/lib/commands/services/vcs.js +13 -13
  104. package/dist/lib/commands/services/vcs.js.map +1 -1
  105. package/dist/lib/commands/types.d.ts.map +1 -1
  106. package/dist/lib/commands/types.js +1 -1
  107. package/dist/lib/commands/types.js.map +1 -1
  108. package/dist/lib/commands/update.d.ts.map +1 -1
  109. package/dist/lib/commands/update.js +9 -8
  110. package/dist/lib/commands/update.js.map +1 -1
  111. package/dist/lib/commands/utils/attributes.d.ts +47 -0
  112. package/dist/lib/commands/utils/attributes.d.ts.map +1 -0
  113. package/dist/lib/commands/utils/attributes.js +514 -0
  114. package/dist/lib/commands/utils/attributes.js.map +1 -0
  115. package/dist/lib/commands/utils/change-approval.d.ts +25 -0
  116. package/dist/lib/commands/utils/change-approval.d.ts.map +1 -0
  117. package/dist/lib/commands/utils/change-approval.js +129 -0
  118. package/dist/lib/commands/utils/change-approval.js.map +1 -0
  119. package/dist/lib/commands/utils/database-sync.d.ts +10 -0
  120. package/dist/lib/commands/utils/database-sync.d.ts.map +1 -0
  121. package/dist/lib/commands/utils/database-sync.js +136 -0
  122. package/dist/lib/commands/utils/database-sync.js.map +1 -0
  123. package/dist/lib/commands/utils/deployment.d.ts +34 -0
  124. package/dist/lib/commands/utils/deployment.d.ts.map +1 -0
  125. package/dist/lib/commands/utils/deployment.js +109 -0
  126. package/dist/lib/commands/utils/deployment.js.map +1 -0
  127. package/dist/lib/commands/utils/error-formatter.d.ts +19 -0
  128. package/dist/lib/commands/utils/error-formatter.d.ts.map +1 -0
  129. package/dist/lib/commands/utils/error-formatter.js +333 -0
  130. package/dist/lib/commands/utils/error-formatter.js.map +1 -0
  131. package/dist/lib/commands/utils/pools.d.ts +16 -0
  132. package/dist/lib/commands/utils/pools.d.ts.map +1 -0
  133. package/dist/lib/commands/utils/pools.js +198 -0
  134. package/dist/lib/commands/utils/pools.js.map +1 -0
  135. package/dist/lib/config.d.ts +27 -26
  136. package/dist/lib/config.d.ts.map +1 -1
  137. package/dist/lib/config.js +8 -45
  138. package/dist/lib/config.js.map +1 -1
  139. package/dist/lib/constants.d.ts +14 -0
  140. package/dist/lib/constants.d.ts.map +1 -0
  141. package/dist/lib/constants.js +19 -0
  142. package/dist/lib/constants.js.map +1 -0
  143. package/dist/lib/emulation/docker.d.ts +4 -4
  144. package/dist/lib/emulation/docker.d.ts.map +1 -1
  145. package/dist/lib/emulation/docker.js +80 -67
  146. package/dist/lib/emulation/docker.js.map +1 -1
  147. package/dist/lib/parser.d.ts.map +1 -1
  148. package/dist/lib/parser.js +11 -10
  149. package/dist/lib/parser.js.map +1 -1
  150. package/dist/lib/questions.d.ts.map +1 -1
  151. package/dist/lib/questions.js +20 -20
  152. package/dist/lib/questions.js.map +1 -1
  153. package/dist/lib/sdks.d.ts.map +1 -1
  154. package/dist/lib/sdks.js +10 -11
  155. package/dist/lib/sdks.js.map +1 -1
  156. package/dist/lib/types.d.ts +0 -214
  157. package/dist/lib/types.d.ts.map +1 -1
  158. package/dist/lib/utils.d.ts +3 -0
  159. package/dist/lib/utils.d.ts.map +1 -1
  160. package/dist/lib/utils.js +42 -2
  161. package/dist/lib/utils.js.map +1 -1
  162. package/dist/package.json +12 -11
  163. package/docs/examples/account/create-anonymous-session.md +1 -0
  164. package/docs/examples/account/create-email-password-session.md +3 -0
  165. package/docs/examples/account/create-email-token.md +3 -0
  166. package/docs/examples/account/create-email-verification.md +2 -0
  167. package/docs/examples/account/create-jwt.md +1 -0
  168. package/docs/examples/account/create-magic-url-token.md +3 -0
  169. package/docs/examples/account/create-mfa-authenticator.md +2 -0
  170. package/docs/examples/account/create-mfa-challenge.md +2 -0
  171. package/docs/examples/account/create-mfa-recovery-codes.md +1 -0
  172. package/docs/examples/account/create-o-auth-2-session.md +2 -0
  173. package/docs/examples/account/create-o-auth-2-token.md +2 -0
  174. package/docs/examples/account/create-phone-token.md +3 -0
  175. package/docs/examples/account/create-phone-verification.md +1 -0
  176. package/docs/examples/account/create-push-target.md +3 -0
  177. package/docs/examples/account/create-recovery.md +3 -0
  178. package/docs/examples/account/create-session.md +3 -0
  179. package/docs/examples/account/create-verification.md +2 -0
  180. package/docs/examples/account/create.md +4 -0
  181. package/docs/examples/account/delete-identity.md +2 -0
  182. package/docs/examples/account/delete-mfa-authenticator.md +2 -0
  183. package/docs/examples/account/delete-push-target.md +2 -0
  184. package/docs/examples/account/delete-session.md +2 -0
  185. package/docs/examples/account/delete-sessions.md +1 -0
  186. package/docs/examples/account/delete.md +1 -0
  187. package/docs/examples/account/get-mfa-recovery-codes.md +1 -0
  188. package/docs/examples/account/get-prefs.md +1 -0
  189. package/docs/examples/account/get-session.md +2 -0
  190. package/docs/examples/account/get.md +1 -0
  191. package/docs/examples/account/list-identities.md +1 -0
  192. package/docs/examples/account/list-logs.md +1 -0
  193. package/docs/examples/account/list-mfa-factors.md +1 -0
  194. package/docs/examples/account/list-sessions.md +1 -0
  195. package/docs/examples/account/update-email-verification.md +3 -0
  196. package/docs/examples/account/update-email.md +3 -0
  197. package/docs/examples/account/update-magic-url-session.md +3 -0
  198. package/docs/examples/account/update-mfa-authenticator.md +3 -0
  199. package/docs/examples/account/update-mfa-challenge.md +3 -0
  200. package/docs/examples/account/update-mfa-recovery-codes.md +1 -0
  201. package/docs/examples/account/update-mfa.md +2 -0
  202. package/docs/examples/account/update-name.md +2 -0
  203. package/docs/examples/account/update-password.md +2 -0
  204. package/docs/examples/account/update-phone-session.md +3 -0
  205. package/docs/examples/account/update-phone-verification.md +3 -0
  206. package/docs/examples/account/update-phone.md +3 -0
  207. package/docs/examples/account/update-prefs.md +2 -0
  208. package/docs/examples/account/update-push-target.md +3 -0
  209. package/docs/examples/account/update-recovery.md +4 -0
  210. package/docs/examples/account/update-session.md +2 -0
  211. package/docs/examples/account/update-status.md +1 -0
  212. package/docs/examples/account/update-verification.md +3 -0
  213. package/docs/examples/console/get-resource.md +3 -0
  214. package/docs/examples/console/variables.md +1 -0
  215. package/docs/examples/databases/create-boolean-attribute.md +5 -0
  216. package/docs/examples/databases/create-collection.md +4 -0
  217. package/docs/examples/databases/create-datetime-attribute.md +5 -0
  218. package/docs/examples/databases/create-document.md +5 -0
  219. package/docs/examples/databases/create-documents.md +4 -0
  220. package/docs/examples/databases/create-email-attribute.md +5 -0
  221. package/docs/examples/databases/create-enum-attribute.md +6 -0
  222. package/docs/examples/databases/create-float-attribute.md +5 -0
  223. package/docs/examples/databases/create-index.md +6 -0
  224. package/docs/examples/databases/create-integer-attribute.md +5 -0
  225. package/docs/examples/databases/create-ip-attribute.md +5 -0
  226. package/docs/examples/databases/create-line-attribute.md +5 -0
  227. package/docs/examples/databases/create-operations.md +2 -0
  228. package/docs/examples/databases/create-point-attribute.md +5 -0
  229. package/docs/examples/databases/create-polygon-attribute.md +5 -0
  230. package/docs/examples/databases/create-relationship-attribute.md +5 -0
  231. package/docs/examples/databases/create-string-attribute.md +6 -0
  232. package/docs/examples/databases/create-transaction.md +1 -0
  233. package/docs/examples/databases/create-url-attribute.md +5 -0
  234. package/docs/examples/databases/create.md +3 -0
  235. package/docs/examples/databases/decrement-document-attribute.md +5 -0
  236. package/docs/examples/databases/delete-attribute.md +4 -0
  237. package/docs/examples/databases/delete-collection.md +3 -0
  238. package/docs/examples/databases/delete-document.md +4 -0
  239. package/docs/examples/databases/delete-documents.md +3 -0
  240. package/docs/examples/databases/delete-index.md +4 -0
  241. package/docs/examples/databases/delete-transaction.md +2 -0
  242. package/docs/examples/databases/delete.md +2 -0
  243. package/docs/examples/databases/get-attribute.md +4 -0
  244. package/docs/examples/databases/get-collection-usage.md +3 -0
  245. package/docs/examples/databases/get-collection.md +3 -0
  246. package/docs/examples/databases/get-document.md +4 -0
  247. package/docs/examples/databases/get-index.md +4 -0
  248. package/docs/examples/databases/get-transaction.md +2 -0
  249. package/docs/examples/databases/get-usage.md +2 -0
  250. package/docs/examples/databases/get.md +2 -0
  251. package/docs/examples/databases/increment-document-attribute.md +5 -0
  252. package/docs/examples/databases/list-attributes.md +3 -0
  253. package/docs/examples/databases/list-collection-logs.md +3 -0
  254. package/docs/examples/databases/list-collections.md +2 -0
  255. package/docs/examples/databases/list-document-logs.md +4 -0
  256. package/docs/examples/databases/list-documents.md +3 -0
  257. package/docs/examples/databases/list-indexes.md +3 -0
  258. package/docs/examples/databases/list-logs.md +2 -0
  259. package/docs/examples/databases/list-transactions.md +1 -0
  260. package/docs/examples/databases/list-usage.md +1 -0
  261. package/docs/examples/databases/list.md +1 -0
  262. package/docs/examples/databases/update-boolean-attribute.md +6 -0
  263. package/docs/examples/databases/update-collection.md +4 -0
  264. package/docs/examples/databases/update-datetime-attribute.md +6 -0
  265. package/docs/examples/databases/update-document.md +4 -0
  266. package/docs/examples/databases/update-documents.md +3 -0
  267. package/docs/examples/databases/update-email-attribute.md +6 -0
  268. package/docs/examples/databases/update-enum-attribute.md +7 -0
  269. package/docs/examples/databases/update-float-attribute.md +6 -0
  270. package/docs/examples/databases/update-integer-attribute.md +6 -0
  271. package/docs/examples/databases/update-ip-attribute.md +6 -0
  272. package/docs/examples/databases/update-line-attribute.md +5 -0
  273. package/docs/examples/databases/update-point-attribute.md +5 -0
  274. package/docs/examples/databases/update-polygon-attribute.md +5 -0
  275. package/docs/examples/databases/update-relationship-attribute.md +4 -0
  276. package/docs/examples/databases/update-string-attribute.md +6 -0
  277. package/docs/examples/databases/update-transaction.md +2 -0
  278. package/docs/examples/databases/update-url-attribute.md +6 -0
  279. package/docs/examples/databases/update.md +3 -0
  280. package/docs/examples/databases/upsert-document.md +4 -0
  281. package/docs/examples/databases/upsert-documents.md +4 -0
  282. package/docs/examples/functions/create-deployment.md +4 -0
  283. package/docs/examples/functions/create-duplicate-deployment.md +3 -0
  284. package/docs/examples/functions/create-execution.md +2 -0
  285. package/docs/examples/functions/create-template-deployment.md +7 -0
  286. package/docs/examples/functions/create-variable.md +4 -0
  287. package/docs/examples/functions/create-vcs-deployment.md +4 -0
  288. package/docs/examples/functions/create.md +4 -0
  289. package/docs/examples/functions/delete-deployment.md +3 -0
  290. package/docs/examples/functions/delete-execution.md +3 -0
  291. package/docs/examples/functions/delete-variable.md +3 -0
  292. package/docs/examples/functions/delete.md +2 -0
  293. package/docs/examples/functions/get-deployment-download.md +3 -0
  294. package/docs/examples/functions/get-deployment.md +3 -0
  295. package/docs/examples/functions/get-execution.md +3 -0
  296. package/docs/examples/functions/get-template.md +2 -0
  297. package/docs/examples/functions/get-usage.md +2 -0
  298. package/docs/examples/functions/get-variable.md +3 -0
  299. package/docs/examples/functions/get.md +2 -0
  300. package/docs/examples/functions/list-deployments.md +2 -0
  301. package/docs/examples/functions/list-executions.md +2 -0
  302. package/docs/examples/functions/list-runtimes.md +1 -0
  303. package/docs/examples/functions/list-specifications.md +1 -0
  304. package/docs/examples/functions/list-templates.md +1 -0
  305. package/docs/examples/functions/list-usage.md +1 -0
  306. package/docs/examples/functions/list-variables.md +2 -0
  307. package/docs/examples/functions/list.md +1 -0
  308. package/docs/examples/functions/update-deployment-status.md +3 -0
  309. package/docs/examples/functions/update-function-deployment.md +3 -0
  310. package/docs/examples/functions/update-variable.md +4 -0
  311. package/docs/examples/functions/update.md +3 -0
  312. package/docs/examples/graphql/mutation.md +2 -0
  313. package/docs/examples/graphql/query.md +2 -0
  314. package/docs/examples/health/get-antivirus.md +1 -0
  315. package/docs/examples/health/get-cache.md +1 -0
  316. package/docs/examples/health/get-certificate.md +1 -0
  317. package/docs/examples/health/get-db.md +1 -0
  318. package/docs/examples/health/get-failed-jobs.md +2 -0
  319. package/docs/examples/health/get-pub-sub.md +1 -0
  320. package/docs/examples/health/get-queue-builds.md +1 -0
  321. package/docs/examples/health/get-queue-certificates.md +1 -0
  322. package/docs/examples/health/get-queue-databases.md +1 -0
  323. package/docs/examples/health/get-queue-deletes.md +1 -0
  324. package/docs/examples/health/get-queue-functions.md +1 -0
  325. package/docs/examples/health/get-queue-logs.md +1 -0
  326. package/docs/examples/health/get-queue-mails.md +1 -0
  327. package/docs/examples/health/get-queue-messaging.md +1 -0
  328. package/docs/examples/health/get-queue-migrations.md +1 -0
  329. package/docs/examples/health/get-queue-stats-resources.md +1 -0
  330. package/docs/examples/health/get-queue-usage.md +1 -0
  331. package/docs/examples/health/get-queue-webhooks.md +1 -0
  332. package/docs/examples/health/get-storage-local.md +1 -0
  333. package/docs/examples/health/get-storage.md +1 -0
  334. package/docs/examples/health/get-time.md +1 -0
  335. package/docs/examples/health/get.md +1 -0
  336. package/docs/examples/locale/get.md +1 -0
  337. package/docs/examples/locale/list-codes.md +1 -0
  338. package/docs/examples/locale/list-continents.md +1 -0
  339. package/docs/examples/locale/list-countries-eu.md +1 -0
  340. package/docs/examples/locale/list-countries-phones.md +1 -0
  341. package/docs/examples/locale/list-countries.md +1 -0
  342. package/docs/examples/locale/list-currencies.md +1 -0
  343. package/docs/examples/locale/list-languages.md +1 -0
  344. package/docs/examples/messaging/create-apns-provider.md +3 -0
  345. package/docs/examples/messaging/create-email.md +4 -0
  346. package/docs/examples/messaging/create-fcm-provider.md +3 -0
  347. package/docs/examples/messaging/create-mailgun-provider.md +3 -0
  348. package/docs/examples/messaging/create-msg-91-provider.md +3 -0
  349. package/docs/examples/messaging/create-push.md +2 -0
  350. package/docs/examples/messaging/create-resend-provider.md +3 -0
  351. package/docs/examples/messaging/create-sendgrid-provider.md +3 -0
  352. package/docs/examples/messaging/create-sms.md +3 -0
  353. package/docs/examples/messaging/create-smtp-provider.md +4 -0
  354. package/docs/examples/messaging/create-subscriber.md +4 -0
  355. package/docs/examples/messaging/create-telesign-provider.md +3 -0
  356. package/docs/examples/messaging/create-textmagic-provider.md +3 -0
  357. package/docs/examples/messaging/create-topic.md +3 -0
  358. package/docs/examples/messaging/create-twilio-provider.md +3 -0
  359. package/docs/examples/messaging/create-vonage-provider.md +3 -0
  360. package/docs/examples/messaging/delete-provider.md +2 -0
  361. package/docs/examples/messaging/delete-subscriber.md +3 -0
  362. package/docs/examples/messaging/delete-topic.md +2 -0
  363. package/docs/examples/messaging/delete.md +2 -0
  364. package/docs/examples/messaging/get-message.md +2 -0
  365. package/docs/examples/messaging/get-provider.md +2 -0
  366. package/docs/examples/messaging/get-subscriber.md +3 -0
  367. package/docs/examples/messaging/get-topic.md +2 -0
  368. package/docs/examples/messaging/list-message-logs.md +2 -0
  369. package/docs/examples/messaging/list-messages.md +1 -0
  370. package/docs/examples/messaging/list-provider-logs.md +2 -0
  371. package/docs/examples/messaging/list-providers.md +1 -0
  372. package/docs/examples/messaging/list-subscriber-logs.md +2 -0
  373. package/docs/examples/messaging/list-subscribers.md +2 -0
  374. package/docs/examples/messaging/list-targets.md +2 -0
  375. package/docs/examples/messaging/list-topic-logs.md +2 -0
  376. package/docs/examples/messaging/list-topics.md +1 -0
  377. package/docs/examples/messaging/update-apns-provider.md +2 -0
  378. package/docs/examples/messaging/update-email.md +2 -0
  379. package/docs/examples/messaging/update-fcm-provider.md +2 -0
  380. package/docs/examples/messaging/update-mailgun-provider.md +2 -0
  381. package/docs/examples/messaging/update-msg-91-provider.md +2 -0
  382. package/docs/examples/messaging/update-push.md +2 -0
  383. package/docs/examples/messaging/update-resend-provider.md +2 -0
  384. package/docs/examples/messaging/update-sendgrid-provider.md +2 -0
  385. package/docs/examples/messaging/update-sms.md +2 -0
  386. package/docs/examples/messaging/update-smtp-provider.md +2 -0
  387. package/docs/examples/messaging/update-telesign-provider.md +2 -0
  388. package/docs/examples/messaging/update-textmagic-provider.md +2 -0
  389. package/docs/examples/messaging/update-topic.md +2 -0
  390. package/docs/examples/messaging/update-twilio-provider.md +2 -0
  391. package/docs/examples/messaging/update-vonage-provider.md +2 -0
  392. package/docs/examples/migrations/create-appwrite-migration.md +5 -0
  393. package/docs/examples/migrations/create-csv-export.md +3 -0
  394. package/docs/examples/migrations/create-csv-import.md +4 -0
  395. package/docs/examples/migrations/create-firebase-migration.md +3 -0
  396. package/docs/examples/migrations/create-n-host-migration.md +8 -0
  397. package/docs/examples/migrations/create-supabase-migration.md +7 -0
  398. package/docs/examples/migrations/delete.md +2 -0
  399. package/docs/examples/migrations/get-appwrite-report.md +5 -0
  400. package/docs/examples/migrations/get-firebase-report.md +3 -0
  401. package/docs/examples/migrations/get-n-host-report.md +8 -0
  402. package/docs/examples/migrations/get-supabase-report.md +7 -0
  403. package/docs/examples/migrations/get.md +2 -0
  404. package/docs/examples/migrations/list.md +1 -0
  405. package/docs/examples/migrations/retry.md +2 -0
  406. package/docs/examples/project/create-variable.md +3 -0
  407. package/docs/examples/project/delete-variable.md +2 -0
  408. package/docs/examples/project/get-usage.md +3 -0
  409. package/docs/examples/project/get-variable.md +2 -0
  410. package/docs/examples/project/list-variables.md +1 -0
  411. package/docs/examples/project/update-variable.md +3 -0
  412. package/docs/examples/projects/create-dev-key.md +4 -0
  413. package/docs/examples/projects/create-jwt.md +3 -0
  414. package/docs/examples/projects/create-key.md +4 -0
  415. package/docs/examples/projects/create-platform.md +4 -0
  416. package/docs/examples/projects/create-smtp-test.md +6 -0
  417. package/docs/examples/projects/create-webhook.md +6 -0
  418. package/docs/examples/projects/create.md +4 -0
  419. package/docs/examples/projects/delete-dev-key.md +3 -0
  420. package/docs/examples/projects/delete-email-template.md +4 -0
  421. package/docs/examples/projects/delete-key.md +3 -0
  422. package/docs/examples/projects/delete-platform.md +3 -0
  423. package/docs/examples/projects/delete-sms-template.md +4 -0
  424. package/docs/examples/projects/delete-webhook.md +3 -0
  425. package/docs/examples/projects/delete.md +2 -0
  426. package/docs/examples/projects/get-dev-key.md +3 -0
  427. package/docs/examples/projects/get-email-template.md +4 -0
  428. package/docs/examples/projects/get-key.md +3 -0
  429. package/docs/examples/projects/get-platform.md +3 -0
  430. package/docs/examples/projects/get-sms-template.md +4 -0
  431. package/docs/examples/projects/get-webhook.md +3 -0
  432. package/docs/examples/projects/get.md +2 -0
  433. package/docs/examples/projects/list-dev-keys.md +2 -0
  434. package/docs/examples/projects/list-keys.md +2 -0
  435. package/docs/examples/projects/list-platforms.md +2 -0
  436. package/docs/examples/projects/list-webhooks.md +2 -0
  437. package/docs/examples/projects/list.md +1 -0
  438. package/docs/examples/projects/update-api-status-all.md +3 -0
  439. package/docs/examples/projects/update-api-status.md +4 -0
  440. package/docs/examples/projects/update-auth-duration.md +3 -0
  441. package/docs/examples/projects/update-auth-limit.md +3 -0
  442. package/docs/examples/projects/update-auth-password-dictionary.md +3 -0
  443. package/docs/examples/projects/update-auth-password-history.md +3 -0
  444. package/docs/examples/projects/update-auth-sessions-limit.md +3 -0
  445. package/docs/examples/projects/update-auth-status.md +4 -0
  446. package/docs/examples/projects/update-dev-key.md +5 -0
  447. package/docs/examples/projects/update-email-template.md +6 -0
  448. package/docs/examples/projects/update-key.md +5 -0
  449. package/docs/examples/projects/update-memberships-privacy.md +5 -0
  450. package/docs/examples/projects/update-mock-numbers.md +3 -0
  451. package/docs/examples/projects/update-o-auth-2.md +3 -0
  452. package/docs/examples/projects/update-personal-data-check.md +3 -0
  453. package/docs/examples/projects/update-platform.md +4 -0
  454. package/docs/examples/projects/update-service-status-all.md +3 -0
  455. package/docs/examples/projects/update-service-status.md +4 -0
  456. package/docs/examples/projects/update-session-alerts.md +3 -0
  457. package/docs/examples/projects/update-session-invalidation.md +3 -0
  458. package/docs/examples/projects/update-sms-template.md +5 -0
  459. package/docs/examples/projects/update-smtp.md +3 -0
  460. package/docs/examples/projects/update-team.md +3 -0
  461. package/docs/examples/projects/update-webhook-signature.md +3 -0
  462. package/docs/examples/projects/update-webhook.md +7 -0
  463. package/docs/examples/projects/update.md +3 -0
  464. package/docs/examples/proxy/create-api-rule.md +2 -0
  465. package/docs/examples/proxy/create-function-rule.md +3 -0
  466. package/docs/examples/proxy/create-redirect-rule.md +6 -0
  467. package/docs/examples/proxy/create-site-rule.md +3 -0
  468. package/docs/examples/proxy/delete-rule.md +2 -0
  469. package/docs/examples/proxy/get-rule.md +2 -0
  470. package/docs/examples/proxy/list-rules.md +1 -0
  471. package/docs/examples/proxy/update-rule-verification.md +2 -0
  472. package/docs/examples/sites/create-deployment.md +4 -0
  473. package/docs/examples/sites/create-duplicate-deployment.md +3 -0
  474. package/docs/examples/sites/create-template-deployment.md +7 -0
  475. package/docs/examples/sites/create-variable.md +4 -0
  476. package/docs/examples/sites/create-vcs-deployment.md +4 -0
  477. package/docs/examples/sites/create.md +5 -0
  478. package/docs/examples/sites/delete-deployment.md +3 -0
  479. package/docs/examples/sites/delete-log.md +3 -0
  480. package/docs/examples/sites/delete-variable.md +3 -0
  481. package/docs/examples/sites/delete.md +2 -0
  482. package/docs/examples/sites/get-deployment-download.md +3 -0
  483. package/docs/examples/sites/get-deployment.md +3 -0
  484. package/docs/examples/sites/get-log.md +3 -0
  485. package/docs/examples/sites/get-template.md +2 -0
  486. package/docs/examples/sites/get-usage.md +2 -0
  487. package/docs/examples/sites/get-variable.md +3 -0
  488. package/docs/examples/sites/get.md +2 -0
  489. package/docs/examples/sites/list-deployments.md +2 -0
  490. package/docs/examples/sites/list-frameworks.md +1 -0
  491. package/docs/examples/sites/list-logs.md +2 -0
  492. package/docs/examples/sites/list-specifications.md +1 -0
  493. package/docs/examples/sites/list-templates.md +1 -0
  494. package/docs/examples/sites/list-usage.md +1 -0
  495. package/docs/examples/sites/list-variables.md +2 -0
  496. package/docs/examples/sites/list.md +1 -0
  497. package/docs/examples/sites/update-deployment-status.md +3 -0
  498. package/docs/examples/sites/update-site-deployment.md +3 -0
  499. package/docs/examples/sites/update-variable.md +4 -0
  500. package/docs/examples/sites/update.md +4 -0
  501. package/docs/examples/storage/create-bucket.md +3 -0
  502. package/docs/examples/storage/create-file.md +4 -0
  503. package/docs/examples/storage/delete-bucket.md +2 -0
  504. package/docs/examples/storage/delete-file.md +3 -0
  505. package/docs/examples/storage/get-bucket-usage.md +2 -0
  506. package/docs/examples/storage/get-bucket.md +2 -0
  507. package/docs/examples/storage/get-file-download.md +3 -0
  508. package/docs/examples/storage/get-file-preview.md +3 -0
  509. package/docs/examples/storage/get-file-view.md +3 -0
  510. package/docs/examples/storage/get-file.md +3 -0
  511. package/docs/examples/storage/get-usage.md +1 -0
  512. package/docs/examples/storage/list-buckets.md +1 -0
  513. package/docs/examples/storage/list-files.md +2 -0
  514. package/docs/examples/storage/update-bucket.md +3 -0
  515. package/docs/examples/storage/update-file.md +3 -0
  516. package/docs/examples/tablesdb/create-boolean-column.md +5 -0
  517. package/docs/examples/tablesdb/create-datetime-column.md +5 -0
  518. package/docs/examples/tablesdb/create-email-column.md +5 -0
  519. package/docs/examples/tablesdb/create-enum-column.md +6 -0
  520. package/docs/examples/tablesdb/create-float-column.md +5 -0
  521. package/docs/examples/tablesdb/create-index.md +6 -0
  522. package/docs/examples/tablesdb/create-integer-column.md +5 -0
  523. package/docs/examples/tablesdb/create-ip-column.md +5 -0
  524. package/docs/examples/tablesdb/create-line-column.md +5 -0
  525. package/docs/examples/tablesdb/create-operations.md +2 -0
  526. package/docs/examples/tablesdb/create-point-column.md +5 -0
  527. package/docs/examples/tablesdb/create-polygon-column.md +5 -0
  528. package/docs/examples/tablesdb/create-relationship-column.md +5 -0
  529. package/docs/examples/tablesdb/create-row.md +5 -0
  530. package/docs/examples/tablesdb/create-rows.md +4 -0
  531. package/docs/examples/tablesdb/create-string-column.md +6 -0
  532. package/docs/examples/tablesdb/create-table.md +4 -0
  533. package/docs/examples/tablesdb/create-transaction.md +1 -0
  534. package/docs/examples/tablesdb/create-url-column.md +5 -0
  535. package/docs/examples/tablesdb/create.md +3 -0
  536. package/docs/examples/tablesdb/decrement-row-column.md +5 -0
  537. package/docs/examples/tablesdb/delete-column.md +4 -0
  538. package/docs/examples/tablesdb/delete-index.md +4 -0
  539. package/docs/examples/tablesdb/delete-row.md +4 -0
  540. package/docs/examples/tablesdb/delete-rows.md +3 -0
  541. package/docs/examples/tablesdb/delete-table.md +3 -0
  542. package/docs/examples/tablesdb/delete-transaction.md +2 -0
  543. package/docs/examples/tablesdb/delete.md +2 -0
  544. package/docs/examples/tablesdb/get-column.md +4 -0
  545. package/docs/examples/tablesdb/get-index.md +4 -0
  546. package/docs/examples/tablesdb/get-row.md +4 -0
  547. package/docs/examples/tablesdb/get-table-usage.md +3 -0
  548. package/docs/examples/tablesdb/get-table.md +3 -0
  549. package/docs/examples/tablesdb/get-transaction.md +2 -0
  550. package/docs/examples/tablesdb/get-usage.md +2 -0
  551. package/docs/examples/tablesdb/get.md +2 -0
  552. package/docs/examples/tablesdb/increment-row-column.md +5 -0
  553. package/docs/examples/tablesdb/list-columns.md +3 -0
  554. package/docs/examples/tablesdb/list-indexes.md +3 -0
  555. package/docs/examples/tablesdb/list-row-logs.md +4 -0
  556. package/docs/examples/tablesdb/list-rows.md +3 -0
  557. package/docs/examples/tablesdb/list-table-logs.md +3 -0
  558. package/docs/examples/tablesdb/list-tables.md +2 -0
  559. package/docs/examples/tablesdb/list-transactions.md +1 -0
  560. package/docs/examples/tablesdb/list-usage.md +1 -0
  561. package/docs/examples/tablesdb/list.md +1 -0
  562. package/docs/examples/tablesdb/update-boolean-column.md +6 -0
  563. package/docs/examples/tablesdb/update-datetime-column.md +6 -0
  564. package/docs/examples/tablesdb/update-email-column.md +6 -0
  565. package/docs/examples/tablesdb/update-enum-column.md +7 -0
  566. package/docs/examples/tablesdb/update-float-column.md +6 -0
  567. package/docs/examples/tablesdb/update-integer-column.md +6 -0
  568. package/docs/examples/tablesdb/update-ip-column.md +6 -0
  569. package/docs/examples/tablesdb/update-line-column.md +5 -0
  570. package/docs/examples/tablesdb/update-point-column.md +5 -0
  571. package/docs/examples/tablesdb/update-polygon-column.md +5 -0
  572. package/docs/examples/tablesdb/update-relationship-column.md +4 -0
  573. package/docs/examples/tablesdb/update-row.md +4 -0
  574. package/docs/examples/tablesdb/update-rows.md +3 -0
  575. package/docs/examples/tablesdb/update-string-column.md +6 -0
  576. package/docs/examples/tablesdb/update-table.md +4 -0
  577. package/docs/examples/tablesdb/update-transaction.md +2 -0
  578. package/docs/examples/tablesdb/update-url-column.md +6 -0
  579. package/docs/examples/tablesdb/update.md +3 -0
  580. package/docs/examples/tablesdb/upsert-row.md +4 -0
  581. package/docs/examples/tablesdb/upsert-rows.md +4 -0
  582. package/docs/examples/teams/create-membership.md +3 -0
  583. package/docs/examples/teams/create.md +3 -0
  584. package/docs/examples/teams/delete-membership.md +3 -0
  585. package/docs/examples/teams/delete.md +2 -0
  586. package/docs/examples/teams/get-membership.md +3 -0
  587. package/docs/examples/teams/get-prefs.md +2 -0
  588. package/docs/examples/teams/get.md +2 -0
  589. package/docs/examples/teams/list-logs.md +2 -0
  590. package/docs/examples/teams/list-memberships.md +2 -0
  591. package/docs/examples/teams/list.md +1 -0
  592. package/docs/examples/teams/update-membership-status.md +5 -0
  593. package/docs/examples/teams/update-membership.md +4 -0
  594. package/docs/examples/teams/update-name.md +3 -0
  595. package/docs/examples/teams/update-prefs.md +3 -0
  596. package/docs/examples/tokens/create-file-token.md +3 -0
  597. package/docs/examples/tokens/delete.md +2 -0
  598. package/docs/examples/tokens/get.md +2 -0
  599. package/docs/examples/tokens/list.md +3 -0
  600. package/docs/examples/tokens/update.md +2 -0
  601. package/docs/examples/users/create-argon-2-user.md +4 -0
  602. package/docs/examples/users/create-bcrypt-user.md +4 -0
  603. package/docs/examples/users/create-jwt.md +2 -0
  604. package/docs/examples/users/create-md-5-user.md +4 -0
  605. package/docs/examples/users/create-mfa-recovery-codes.md +2 -0
  606. package/docs/examples/users/create-ph-pass-user.md +4 -0
  607. package/docs/examples/users/create-scrypt-modified-user.md +7 -0
  608. package/docs/examples/users/create-scrypt-user.md +9 -0
  609. package/docs/examples/users/create-session.md +2 -0
  610. package/docs/examples/users/create-sha-user.md +4 -0
  611. package/docs/examples/users/create-target.md +5 -0
  612. package/docs/examples/users/create-token.md +2 -0
  613. package/docs/examples/users/create.md +2 -0
  614. package/docs/examples/users/delete-identity.md +2 -0
  615. package/docs/examples/users/delete-mfa-authenticator.md +3 -0
  616. package/docs/examples/users/delete-session.md +3 -0
  617. package/docs/examples/users/delete-sessions.md +2 -0
  618. package/docs/examples/users/delete-target.md +3 -0
  619. package/docs/examples/users/delete.md +2 -0
  620. package/docs/examples/users/get-mfa-recovery-codes.md +2 -0
  621. package/docs/examples/users/get-prefs.md +2 -0
  622. package/docs/examples/users/get-target.md +3 -0
  623. package/docs/examples/users/get-usage.md +1 -0
  624. package/docs/examples/users/get.md +2 -0
  625. package/docs/examples/users/list-identities.md +1 -0
  626. package/docs/examples/users/list-logs.md +2 -0
  627. package/docs/examples/users/list-memberships.md +2 -0
  628. package/docs/examples/users/list-mfa-factors.md +2 -0
  629. package/docs/examples/users/list-sessions.md +2 -0
  630. package/docs/examples/users/list-targets.md +2 -0
  631. package/docs/examples/users/list.md +1 -0
  632. package/docs/examples/users/update-email-verification.md +3 -0
  633. package/docs/examples/users/update-email.md +3 -0
  634. package/docs/examples/users/update-labels.md +3 -0
  635. package/docs/examples/users/update-mfa-recovery-codes.md +2 -0
  636. package/docs/examples/users/update-mfa.md +3 -0
  637. package/docs/examples/users/update-name.md +3 -0
  638. package/docs/examples/users/update-password.md +3 -0
  639. package/docs/examples/users/update-phone-verification.md +3 -0
  640. package/docs/examples/users/update-phone.md +3 -0
  641. package/docs/examples/users/update-prefs.md +3 -0
  642. package/docs/examples/users/update-status.md +3 -0
  643. package/docs/examples/users/update-target.md +3 -0
  644. package/docs/examples/vcs/create-repository-detection.md +4 -0
  645. package/docs/examples/vcs/create-repository.md +4 -0
  646. package/docs/examples/vcs/delete-installation.md +2 -0
  647. package/docs/examples/vcs/get-installation.md +2 -0
  648. package/docs/examples/vcs/get-repository-contents.md +3 -0
  649. package/docs/examples/vcs/get-repository.md +3 -0
  650. package/docs/examples/vcs/list-installations.md +1 -0
  651. package/docs/examples/vcs/list-repositories.md +3 -0
  652. package/docs/examples/vcs/list-repository-branches.md +3 -0
  653. package/docs/examples/vcs/update-external-deployments.md +4 -0
  654. package/index.ts +25 -165
  655. package/install.ps1 +2 -2
  656. package/install.sh +1 -1
  657. package/lib/client.ts +14 -6
  658. package/lib/commands/config.ts +494 -0
  659. package/lib/commands/db.ts +324 -0
  660. package/lib/commands/errors.ts +93 -0
  661. package/lib/commands/init.ts +25 -14
  662. package/lib/commands/pull.ts +683 -420
  663. package/lib/commands/push.ts +1677 -2404
  664. package/lib/commands/run.ts +1 -1
  665. package/lib/commands/schema.ts +122 -0
  666. package/lib/commands/services/account.ts +200 -385
  667. package/lib/commands/services/console.ts +13 -34
  668. package/lib/commands/services/databases.ts +298 -1215
  669. package/lib/commands/services/functions.ts +115 -434
  670. package/lib/commands/services/graphql.ts +5 -2
  671. package/lib/commands/services/health.ts +87 -149
  672. package/lib/commands/services/locale.ts +36 -33
  673. package/lib/commands/services/messaging.ts +180 -999
  674. package/lib/commands/services/migrations.ts +54 -226
  675. package/lib/commands/services/project.ts +19 -23
  676. package/lib/commands/services/projects.ts +182 -714
  677. package/lib/commands/services/proxy.ts +30 -58
  678. package/lib/commands/services/sites.ts +107 -379
  679. package/lib/commands/services/storage.ts +93 -302
  680. package/lib/commands/services/tables-db.ts +1150 -0
  681. package/lib/commands/services/teams.ts +48 -110
  682. package/lib/commands/services/tokens.ts +16 -28
  683. package/lib/commands/services/users.ts +133 -403
  684. package/lib/commands/services/vcs.ts +48 -151
  685. package/lib/commands/types.ts +1 -1
  686. package/lib/commands/update.ts +13 -22
  687. package/lib/commands/utils/attributes.ts +719 -0
  688. package/lib/commands/utils/change-approval.ts +186 -0
  689. package/lib/commands/utils/database-sync.ts +180 -0
  690. package/lib/commands/utils/deployment.ts +184 -0
  691. package/lib/commands/utils/error-formatter.ts +417 -0
  692. package/lib/commands/utils/pools.ts +355 -0
  693. package/lib/config.ts +46 -82
  694. package/lib/constants.ts +22 -0
  695. package/lib/emulation/docker.ts +101 -87
  696. package/lib/parser.ts +16 -11
  697. package/lib/questions.ts +20 -21
  698. package/lib/sdks.ts +15 -11
  699. package/lib/types.ts +0 -229
  700. package/lib/utils.ts +45 -4
  701. package/package.json +12 -11
  702. package/scoop/appwrite.config.json +29 -19
  703. package/.github/workflows/build-verify.yml +0 -71
  704. package/bun.lock +0 -625
  705. package/dist/lib/commands/services/avatars.d.ts +0 -3
  706. package/dist/lib/commands/services/avatars.d.ts.map +0 -1
  707. package/dist/lib/commands/services/avatars.js +0 -118
  708. package/dist/lib/commands/services/avatars.js.map +0 -1
  709. package/dist/lib/commands/services/tablesdb.d.ts +0 -3
  710. package/dist/lib/commands/services/tablesdb.d.ts.map +0 -1
  711. package/dist/lib/commands/services/tablesdb.js.map +0 -1
  712. package/dist/scripts/generate-commands.d.ts +0 -2
  713. package/dist/scripts/generate-commands.d.ts.map +0 -1
  714. package/dist/scripts/generate-commands.js +0 -398
  715. package/dist/scripts/generate-commands.js.map +0 -1
  716. package/lib/commands/services/avatars.ts +0 -400
  717. package/lib/commands/services/tablesdb.ts +0 -1928
  718. package/scripts/generate-commands.ts +0 -539
@@ -1,99 +1,99 @@
1
1
  import { Command } from "commander";
2
2
  import { sdkForProject } from "../../sdks.js";
3
- import { actionRunner, commandDescriptions, parseBool, parseInteger, } from "../../parser.js";
3
+ import { actionRunner, commandDescriptions, parse, parseBool, parseInteger, } from "../../parser.js";
4
4
  import { TablesDB, } from "@appwrite.io/console";
5
- let tablesdbClient = null;
5
+ let tablesDBClient = null;
6
6
  const getTablesDBClient = async () => {
7
- if (!tablesdbClient) {
7
+ if (!tablesDBClient) {
8
8
  const sdkClient = await sdkForProject();
9
- tablesdbClient = new TablesDB(sdkClient);
9
+ tablesDBClient = new TablesDB(sdkClient);
10
10
  }
11
- return tablesdbClient;
11
+ return tablesDBClient;
12
12
  };
13
- export const tablesdb = new Command("tablesdb")
14
- .description(commandDescriptions["tablesdb"] ?? "")
13
+ export const tablesDB = new Command("tables-db")
14
+ .description(commandDescriptions["tablesDB"] ?? "")
15
15
  .configureHelp({
16
16
  helpWidth: process.stdout.columns || 80,
17
17
  });
18
- tablesdb
18
+ tablesDB
19
19
  .command(`list`)
20
20
  .description(`Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.`)
21
21
  .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 columns: name`)
22
22
  .option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`)
23
23
  .option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value))
24
- .action(actionRunner(async ({ queries, search, total }) => await (await getTablesDBClient()).list(queries, search, total)));
25
- tablesdb
24
+ .action(actionRunner(async ({ queries, search, total }) => parse(await (await getTablesDBClient()).list(queries, search, total))));
25
+ tablesDB
26
26
  .command(`create`)
27
27
  .description(`Create a new Database.
28
28
  `)
29
29
  .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.`)
30
30
  .requiredOption(`--name <name>`, `Database name. Max length: 128 chars.`)
31
31
  .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))
32
- .action(actionRunner(async ({ databaseId, name, enabled }) => await (await getTablesDBClient()).create(databaseId, name, enabled)));
33
- tablesdb
32
+ .action(actionRunner(async ({ databaseId, name, enabled }) => parse(await (await getTablesDBClient()).create(databaseId, name, enabled))));
33
+ tablesDB
34
34
  .command(`list-transactions`)
35
35
  .description(`List transactions across all databases.`)
36
36
  .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).`)
37
- .action(actionRunner(async ({ queries }) => await (await getTablesDBClient()).listTransactions(queries)));
38
- tablesdb
37
+ .action(actionRunner(async ({ queries }) => parse(await (await getTablesDBClient()).listTransactions(queries))));
38
+ tablesDB
39
39
  .command(`create-transaction`)
40
40
  .description(`Create a new transaction.`)
41
41
  .option(`--ttl <ttl>`, `Seconds before the transaction expires.`, parseInteger)
42
- .action(actionRunner(async ({ ttl }) => await (await getTablesDBClient()).createTransaction(ttl)));
43
- tablesdb
42
+ .action(actionRunner(async ({ ttl }) => parse(await (await getTablesDBClient()).createTransaction(ttl))));
43
+ tablesDB
44
44
  .command(`get-transaction`)
45
45
  .description(`Get a transaction by its unique ID.`)
46
46
  .requiredOption(`--transaction-id <transaction-id>`, `Transaction ID.`)
47
- .action(actionRunner(async ({ transactionId }) => await (await getTablesDBClient()).getTransaction(transactionId)));
48
- tablesdb
47
+ .action(actionRunner(async ({ transactionId }) => parse(await (await getTablesDBClient()).getTransaction(transactionId))));
48
+ tablesDB
49
49
  .command(`update-transaction`)
50
50
  .description(`Update a transaction, to either commit or roll back its operations.`)
51
51
  .requiredOption(`--transaction-id <transaction-id>`, `Transaction ID.`)
52
52
  .option(`--commit [value]`, `Commit transaction?`, (value) => value === undefined ? true : parseBool(value))
53
53
  .option(`--rollback [value]`, `Rollback transaction?`, (value) => value === undefined ? true : parseBool(value))
54
- .action(actionRunner(async ({ transactionId, commit, rollback }) => await (await getTablesDBClient()).updateTransaction(transactionId, commit, rollback)));
55
- tablesdb
54
+ .action(actionRunner(async ({ transactionId, commit, rollback }) => parse(await (await getTablesDBClient()).updateTransaction(transactionId, commit, rollback))));
55
+ tablesDB
56
56
  .command(`delete-transaction`)
57
57
  .description(`Delete a transaction by its unique ID.`)
58
58
  .requiredOption(`--transaction-id <transaction-id>`, `Transaction ID.`)
59
- .action(actionRunner(async ({ transactionId }) => await (await getTablesDBClient()).deleteTransaction(transactionId)));
60
- tablesdb
59
+ .action(actionRunner(async ({ transactionId }) => parse(await (await getTablesDBClient()).deleteTransaction(transactionId))));
60
+ tablesDB
61
61
  .command(`create-operations`)
62
62
  .description(`Create multiple operations in a single transaction.`)
63
63
  .requiredOption(`--transaction-id <transaction-id>`, `Transaction ID.`)
64
64
  .option(`--operations [operations...]`, `Array of staged operations.`)
65
- .action(actionRunner(async ({ transactionId, operations }) => await (await getTablesDBClient()).createOperations(transactionId, operations)));
66
- tablesdb
65
+ .action(actionRunner(async ({ transactionId, operations }) => parse(await (await getTablesDBClient()).createOperations(transactionId, operations))));
66
+ tablesDB
67
67
  .command(`list-usage`)
68
68
  .description(`List usage metrics and statistics for all databases in the project. You can view the total number of databases, tables, rows, 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.`)
69
69
  .option(`--range <range>`, `Date range.`)
70
- .action(actionRunner(async ({ range }) => await (await getTablesDBClient()).listUsage(range)));
71
- tablesdb
70
+ .action(actionRunner(async ({ range }) => parse(await (await getTablesDBClient()).listUsage(range))));
71
+ tablesDB
72
72
  .command(`get`)
73
73
  .description(`Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.`)
74
74
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
75
- .action(actionRunner(async ({ databaseId }) => await (await getTablesDBClient()).get(databaseId)));
76
- tablesdb
75
+ .action(actionRunner(async ({ databaseId }) => parse(await (await getTablesDBClient()).get(databaseId))));
76
+ tablesDB
77
77
  .command(`update`)
78
78
  .description(`Update a database by its unique ID.`)
79
79
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
80
80
  .requiredOption(`--name <name>`, `Database name. Max length: 128 chars.`)
81
81
  .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))
82
- .action(actionRunner(async ({ databaseId, name, enabled }) => await (await getTablesDBClient()).update(databaseId, name, enabled)));
83
- tablesdb
82
+ .action(actionRunner(async ({ databaseId, name, enabled }) => parse(await (await getTablesDBClient()).update(databaseId, name, enabled))));
83
+ tablesDB
84
84
  .command(`delete`)
85
85
  .description(`Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.`)
86
86
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
87
- .action(actionRunner(async ({ databaseId }) => await (await getTablesDBClient()).delete(databaseId)));
88
- tablesdb
87
+ .action(actionRunner(async ({ databaseId }) => parse(await (await getTablesDBClient()).delete(databaseId))));
88
+ tablesDB
89
89
  .command(`list-tables`)
90
90
  .description(`Get a list of all tables that belong to the provided databaseId. You can use the search parameter to filter your results.`)
91
91
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
92
92
  .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 columns: name, enabled, rowSecurity`)
93
93
  .option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`)
94
94
  .option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value))
95
- .action(actionRunner(async ({ databaseId, queries, search, total }) => await (await getTablesDBClient()).listTables(databaseId, queries, search, total)));
96
- tablesdb
95
+ .action(actionRunner(async ({ databaseId, queries, search, total }) => parse(await (await getTablesDBClient()).listTables(databaseId, queries, search, total))));
96
+ tablesDB
97
97
  .command(`create-table`)
98
98
  .description(`Create a new Table. Before using this route, you should create a new database resource using either a [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable) API or directly from your database console.`)
99
99
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
@@ -104,14 +104,14 @@ tablesdb
104
104
  .option(`--enabled [value]`, `Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.`, (value) => value === undefined ? true : parseBool(value))
105
105
  .option(`--columns [columns...]`, `Array of column definitions to create. Each column should contain: key (string), type (string: string, integer, float, boolean, datetime, relationship), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.`)
106
106
  .option(`--indexes [indexes...]`, `Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of column keys), orders (array of ASC/DESC, optional), and lengths (array of integers, optional).`)
107
- .action(actionRunner(async ({ databaseId, tableId, name, permissions, rowSecurity, enabled, columns, indexes, }) => await (await getTablesDBClient()).createTable(databaseId, tableId, name, permissions, rowSecurity, enabled, columns, indexes)));
108
- tablesdb
107
+ .action(actionRunner(async ({ databaseId, tableId, name, permissions, rowSecurity, enabled, columns, indexes }) => parse(await (await getTablesDBClient()).createTable(databaseId, tableId, name, permissions, rowSecurity, enabled, columns, indexes))));
108
+ tablesDB
109
109
  .command(`get-table`)
110
110
  .description(`Get a table by its unique ID. This endpoint response returns a JSON object with the table metadata.`)
111
111
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
112
112
  .requiredOption(`--table-id <table-id>`, `Table ID.`)
113
- .action(actionRunner(async ({ databaseId, tableId }) => await (await getTablesDBClient()).getTable(databaseId, tableId)));
114
- tablesdb
113
+ .action(actionRunner(async ({ databaseId, tableId }) => parse(await (await getTablesDBClient()).getTable(databaseId, tableId))));
114
+ tablesDB
115
115
  .command(`update-table`)
116
116
  .description(`Update a table by its unique ID.`)
117
117
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
@@ -120,22 +120,22 @@ tablesdb
120
120
  .option(`--permissions [permissions...]`, `An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).`)
121
121
  .option(`--row-security [value]`, `Enables configuring permissions for individual rows. A user needs one of row or table-level permissions to access a row. [Learn more about permissions](https://appwrite.io/docs/permissions).`, (value) => value === undefined ? true : parseBool(value))
122
122
  .option(`--enabled [value]`, `Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.`, (value) => value === undefined ? true : parseBool(value))
123
- .action(actionRunner(async ({ databaseId, tableId, name, permissions, rowSecurity, enabled, }) => await (await getTablesDBClient()).updateTable(databaseId, tableId, name, permissions, rowSecurity, enabled)));
124
- tablesdb
123
+ .action(actionRunner(async ({ databaseId, tableId, name, permissions, rowSecurity, enabled }) => parse(await (await getTablesDBClient()).updateTable(databaseId, tableId, name, permissions, rowSecurity, enabled))));
124
+ tablesDB
125
125
  .command(`delete-table`)
126
126
  .description(`Delete a table by its unique ID. Only users with write permissions have access to delete this resource.`)
127
127
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
128
128
  .requiredOption(`--table-id <table-id>`, `Table ID.`)
129
- .action(actionRunner(async ({ databaseId, tableId }) => await (await getTablesDBClient()).deleteTable(databaseId, tableId)));
130
- tablesdb
129
+ .action(actionRunner(async ({ databaseId, tableId }) => parse(await (await getTablesDBClient()).deleteTable(databaseId, tableId))));
130
+ tablesDB
131
131
  .command(`list-columns`)
132
132
  .description(`List columns in the table.`)
133
133
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
134
134
  .requiredOption(`--table-id <table-id>`, `Table ID.`)
135
135
  .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 columns: key, type, size, required, array, status, error`)
136
136
  .option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value))
137
- .action(actionRunner(async ({ databaseId, tableId, queries, total }) => await (await getTablesDBClient()).listColumns(databaseId, tableId, queries, total)));
138
- tablesdb
137
+ .action(actionRunner(async ({ databaseId, tableId, queries, total }) => parse(await (await getTablesDBClient()).listColumns(databaseId, tableId, queries, total))));
138
+ tablesDB
139
139
  .command(`create-boolean-column`)
140
140
  .description(`Create a boolean column.
141
141
  `)
@@ -143,40 +143,40 @@ tablesdb
143
143
  .requiredOption(`--table-id <table-id>`, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`)
144
144
  .requiredOption(`--key <key>`, `Column Key.`)
145
145
  .requiredOption(`--required <required>`, `Is column required?`, parseBool)
146
- .option(`--default [value]`, `Default value for column when not provided. Cannot be set when column is required.`, (value) => value === undefined ? true : parseBool(value))
146
+ .option(`--xdefault [value]`, `Default value for column when not provided. Cannot be set when column is required.`, (value) => value === undefined ? true : parseBool(value))
147
147
  .option(`--array [value]`, `Is column an array?`, (value) => value === undefined ? true : parseBool(value))
148
- .action(actionRunner(async ({ databaseId, tableId, key, required, xDefault, array }) => await (await getTablesDBClient()).createBooleanColumn(databaseId, tableId, key, required, xDefault, array)));
149
- tablesdb
148
+ .action(actionRunner(async ({ databaseId, tableId, key, required, xdefault, array }) => parse(await (await getTablesDBClient()).createBooleanColumn(databaseId, tableId, key, required, xdefault, array))));
149
+ tablesDB
150
150
  .command(`update-boolean-column`)
151
151
  .description(`Update a boolean column. Changing the \`default\` value will not update already existing rows.`)
152
152
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
153
153
  .requiredOption(`--table-id <table-id>`, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`)
154
154
  .requiredOption(`--key <key>`, `Column Key.`)
155
155
  .requiredOption(`--required <required>`, `Is column required?`, parseBool)
156
- .requiredOption(`--default <default>`, `Default value for column when not provided. Cannot be set when column is required.`, parseBool)
156
+ .requiredOption(`--xdefault <xdefault>`, `Default value for column when not provided. Cannot be set when column is required.`, parseBool)
157
157
  .option(`--new-key <new-key>`, `New Column Key.`)
158
- .action(actionRunner(async ({ databaseId, tableId, key, required, xDefault, newKey }) => await (await getTablesDBClient()).updateBooleanColumn(databaseId, tableId, key, required, xDefault, newKey)));
159
- tablesdb
158
+ .action(actionRunner(async ({ databaseId, tableId, key, required, xdefault, newKey }) => parse(await (await getTablesDBClient()).updateBooleanColumn(databaseId, tableId, key, required, xdefault, newKey))));
159
+ tablesDB
160
160
  .command(`create-datetime-column`)
161
161
  .description(`Create a date time column according to the ISO 8601 standard.`)
162
162
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
163
163
  .requiredOption(`--table-id <table-id>`, `Table ID.`)
164
164
  .requiredOption(`--key <key>`, `Column Key.`)
165
165
  .requiredOption(`--required <required>`, `Is column required?`, parseBool)
166
- .option(`--default <default>`, `Default value for the column in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Cannot be set when column is required.`)
166
+ .option(`--xdefault <xdefault>`, `Default value for the column in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Cannot be set when column is required.`)
167
167
  .option(`--array [value]`, `Is column an array?`, (value) => value === undefined ? true : parseBool(value))
168
- .action(actionRunner(async ({ databaseId, tableId, key, required, xDefault, array }) => await (await getTablesDBClient()).createDatetimeColumn(databaseId, tableId, key, required, xDefault, array)));
169
- tablesdb
168
+ .action(actionRunner(async ({ databaseId, tableId, key, required, xdefault, array }) => parse(await (await getTablesDBClient()).createDatetimeColumn(databaseId, tableId, key, required, xdefault, array))));
169
+ tablesDB
170
170
  .command(`update-datetime-column`)
171
171
  .description(`Update a date time column. Changing the \`default\` value will not update already existing rows.`)
172
172
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
173
173
  .requiredOption(`--table-id <table-id>`, `Table ID.`)
174
174
  .requiredOption(`--key <key>`, `Column Key.`)
175
175
  .requiredOption(`--required <required>`, `Is column required?`, parseBool)
176
- .requiredOption(`--default <default>`, `Default value for column when not provided. Cannot be set when column is required.`)
176
+ .requiredOption(`--xdefault <xdefault>`, `Default value for column when not provided. Cannot be set when column is required.`)
177
177
  .option(`--new-key <new-key>`, `New Column Key.`)
178
- .action(actionRunner(async ({ databaseId, tableId, key, required, xDefault, newKey }) => await (await getTablesDBClient()).updateDatetimeColumn(databaseId, tableId, key, required, xDefault, newKey)));
179
- tablesdb
178
+ .action(actionRunner(async ({ databaseId, tableId, key, required, xdefault, newKey }) => parse(await (await getTablesDBClient()).updateDatetimeColumn(databaseId, tableId, key, required, xdefault, newKey))));
179
+ tablesDB
180
180
  .command(`create-email-column`)
181
181
  .description(`Create an email column.
182
182
  `)
@@ -184,10 +184,10 @@ tablesdb
184
184
  .requiredOption(`--table-id <table-id>`, `Table ID.`)
185
185
  .requiredOption(`--key <key>`, `Column Key.`)
186
186
  .requiredOption(`--required <required>`, `Is column required?`, parseBool)
187
- .option(`--default <default>`, `Default value for column when not provided. Cannot be set when column is required.`)
187
+ .option(`--xdefault <xdefault>`, `Default value for column when not provided. Cannot be set when column is required.`)
188
188
  .option(`--array [value]`, `Is column an array?`, (value) => value === undefined ? true : parseBool(value))
189
- .action(actionRunner(async ({ databaseId, tableId, key, required, xDefault, array }) => await (await getTablesDBClient()).createEmailColumn(databaseId, tableId, key, required, xDefault, array)));
190
- tablesdb
189
+ .action(actionRunner(async ({ databaseId, tableId, key, required, xdefault, array }) => parse(await (await getTablesDBClient()).createEmailColumn(databaseId, tableId, key, required, xdefault, array))));
190
+ tablesDB
191
191
  .command(`update-email-column`)
192
192
  .description(`Update an email column. Changing the \`default\` value will not update already existing rows.
193
193
  `)
@@ -195,10 +195,10 @@ tablesdb
195
195
  .requiredOption(`--table-id <table-id>`, `Table ID.`)
196
196
  .requiredOption(`--key <key>`, `Column Key.`)
197
197
  .requiredOption(`--required <required>`, `Is column required?`, parseBool)
198
- .requiredOption(`--default <default>`, `Default value for column when not provided. Cannot be set when column is required.`)
198
+ .requiredOption(`--xdefault <xdefault>`, `Default value for column when not provided. Cannot be set when column is required.`)
199
199
  .option(`--new-key <new-key>`, `New Column Key.`)
200
- .action(actionRunner(async ({ databaseId, tableId, key, required, xDefault, newKey }) => await (await getTablesDBClient()).updateEmailColumn(databaseId, tableId, key, required, xDefault, newKey)));
201
- tablesdb
200
+ .action(actionRunner(async ({ databaseId, tableId, key, required, xdefault, newKey }) => parse(await (await getTablesDBClient()).updateEmailColumn(databaseId, tableId, key, required, xdefault, newKey))));
201
+ tablesDB
202
202
  .command(`create-enum-column`)
203
203
  .description(`Create an enumeration column. The \`elements\` param acts as a white-list of accepted values for this column.`)
204
204
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
@@ -206,10 +206,10 @@ tablesdb
206
206
  .requiredOption(`--key <key>`, `Column Key.`)
207
207
  .requiredOption(`--elements [elements...]`, `Array of enum values.`)
208
208
  .requiredOption(`--required <required>`, `Is column required?`, parseBool)
209
- .option(`--default <default>`, `Default value for column when not provided. Cannot be set when column is required.`)
209
+ .option(`--xdefault <xdefault>`, `Default value for column when not provided. Cannot be set when column is required.`)
210
210
  .option(`--array [value]`, `Is column an array?`, (value) => value === undefined ? true : parseBool(value))
211
- .action(actionRunner(async ({ databaseId, tableId, key, elements, required, xDefault, array, }) => await (await getTablesDBClient()).createEnumColumn(databaseId, tableId, key, elements, required, xDefault, array)));
212
- tablesdb
211
+ .action(actionRunner(async ({ databaseId, tableId, key, elements, required, xdefault, array }) => parse(await (await getTablesDBClient()).createEnumColumn(databaseId, tableId, key, elements, required, xdefault, array))));
212
+ tablesDB
213
213
  .command(`update-enum-column`)
214
214
  .description(`Update an enum column. Changing the \`default\` value will not update already existing rows.
215
215
  `)
@@ -218,10 +218,10 @@ tablesdb
218
218
  .requiredOption(`--key <key>`, `Column Key.`)
219
219
  .requiredOption(`--elements [elements...]`, `Updated list of enum values.`)
220
220
  .requiredOption(`--required <required>`, `Is column required?`, parseBool)
221
- .requiredOption(`--default <default>`, `Default value for column when not provided. Cannot be set when column is required.`)
221
+ .requiredOption(`--xdefault <xdefault>`, `Default value for column when not provided. Cannot be set when column is required.`)
222
222
  .option(`--new-key <new-key>`, `New Column Key.`)
223
- .action(actionRunner(async ({ databaseId, tableId, key, elements, required, xDefault, newKey, }) => await (await getTablesDBClient()).updateEnumColumn(databaseId, tableId, key, elements, required, xDefault, newKey)));
224
- tablesdb
223
+ .action(actionRunner(async ({ databaseId, tableId, key, elements, required, xdefault, newKey }) => parse(await (await getTablesDBClient()).updateEnumColumn(databaseId, tableId, key, elements, required, xdefault, newKey))));
224
+ tablesDB
225
225
  .command(`create-float-column`)
226
226
  .description(`Create a float column. Optionally, minimum and maximum values can be provided.
227
227
  `)
@@ -231,10 +231,10 @@ tablesdb
231
231
  .requiredOption(`--required <required>`, `Is column required?`, parseBool)
232
232
  .option(`--min <min>`, `Minimum value`, parseInteger)
233
233
  .option(`--max <max>`, `Maximum value`, parseInteger)
234
- .option(`--default <default>`, `Default value. Cannot be set when required.`, parseInteger)
234
+ .option(`--xdefault <xdefault>`, `Default value. Cannot be set when required.`, parseInteger)
235
235
  .option(`--array [value]`, `Is column an array?`, (value) => value === undefined ? true : parseBool(value))
236
- .action(actionRunner(async ({ databaseId, tableId, key, required, min, max, xDefault, array, }) => await (await getTablesDBClient()).createFloatColumn(databaseId, tableId, key, required, min, max, xDefault, array)));
237
- tablesdb
236
+ .action(actionRunner(async ({ databaseId, tableId, key, required, min, max, xdefault, array }) => parse(await (await getTablesDBClient()).createFloatColumn(databaseId, tableId, key, required, min, max, xdefault, array))));
237
+ tablesDB
238
238
  .command(`update-float-column`)
239
239
  .description(`Update a float column. Changing the \`default\` value will not update already existing rows.
240
240
  `)
@@ -242,12 +242,12 @@ tablesdb
242
242
  .requiredOption(`--table-id <table-id>`, `Table ID.`)
243
243
  .requiredOption(`--key <key>`, `Column Key.`)
244
244
  .requiredOption(`--required <required>`, `Is column required?`, parseBool)
245
+ .requiredOption(`--xdefault <xdefault>`, `Default value. Cannot be set when required.`, parseInteger)
245
246
  .option(`--min <min>`, `Minimum value`, parseInteger)
246
247
  .option(`--max <max>`, `Maximum value`, parseInteger)
247
- .requiredOption(`--default <default>`, `Default value. Cannot be set when required.`, parseInteger)
248
248
  .option(`--new-key <new-key>`, `New Column Key.`)
249
- .action(actionRunner(async ({ databaseId, tableId, key, required, min, max, xDefault, newKey, }) => await (await getTablesDBClient()).updateFloatColumn(databaseId, tableId, key, required, min, max, xDefault, newKey)));
250
- tablesdb
249
+ .action(actionRunner(async ({ databaseId, tableId, key, required, xdefault, min, max, newKey }) => parse(await (await getTablesDBClient()).updateFloatColumn(databaseId, tableId, key, required, xdefault, min, max, newKey))));
250
+ tablesDB
251
251
  .command(`create-integer-column`)
252
252
  .description(`Create an integer column. Optionally, minimum and maximum values can be provided.
253
253
  `)
@@ -257,10 +257,10 @@ tablesdb
257
257
  .requiredOption(`--required <required>`, `Is column required?`, parseBool)
258
258
  .option(`--min <min>`, `Minimum value`, parseInteger)
259
259
  .option(`--max <max>`, `Maximum value`, parseInteger)
260
- .option(`--default <default>`, `Default value. Cannot be set when column is required.`, parseInteger)
260
+ .option(`--xdefault <xdefault>`, `Default value. Cannot be set when column is required.`, parseInteger)
261
261
  .option(`--array [value]`, `Is column an array?`, (value) => value === undefined ? true : parseBool(value))
262
- .action(actionRunner(async ({ databaseId, tableId, key, required, min, max, xDefault, array, }) => await (await getTablesDBClient()).createIntegerColumn(databaseId, tableId, key, required, min, max, xDefault, array)));
263
- tablesdb
262
+ .action(actionRunner(async ({ databaseId, tableId, key, required, min, max, xdefault, array }) => parse(await (await getTablesDBClient()).createIntegerColumn(databaseId, tableId, key, required, min, max, xdefault, array))));
263
+ tablesDB
264
264
  .command(`update-integer-column`)
265
265
  .description(`Update an integer column. Changing the \`default\` value will not update already existing rows.
266
266
  `)
@@ -268,12 +268,12 @@ tablesdb
268
268
  .requiredOption(`--table-id <table-id>`, `Table ID.`)
269
269
  .requiredOption(`--key <key>`, `Column Key.`)
270
270
  .requiredOption(`--required <required>`, `Is column required?`, parseBool)
271
+ .requiredOption(`--xdefault <xdefault>`, `Default value. Cannot be set when column is required.`, parseInteger)
271
272
  .option(`--min <min>`, `Minimum value`, parseInteger)
272
273
  .option(`--max <max>`, `Maximum value`, parseInteger)
273
- .requiredOption(`--default <default>`, `Default value. Cannot be set when column is required.`, parseInteger)
274
274
  .option(`--new-key <new-key>`, `New Column Key.`)
275
- .action(actionRunner(async ({ databaseId, tableId, key, required, min, max, xDefault, newKey, }) => await (await getTablesDBClient()).updateIntegerColumn(databaseId, tableId, key, required, min, max, xDefault, newKey)));
276
- tablesdb
275
+ .action(actionRunner(async ({ databaseId, tableId, key, required, xdefault, min, max, newKey }) => parse(await (await getTablesDBClient()).updateIntegerColumn(databaseId, tableId, key, required, xdefault, min, max, newKey))));
276
+ tablesDB
277
277
  .command(`create-ip-column`)
278
278
  .description(`Create IP address column.
279
279
  `)
@@ -281,10 +281,10 @@ tablesdb
281
281
  .requiredOption(`--table-id <table-id>`, `Table ID.`)
282
282
  .requiredOption(`--key <key>`, `Column Key.`)
283
283
  .requiredOption(`--required <required>`, `Is column required?`, parseBool)
284
- .option(`--default <default>`, `Default value. Cannot be set when column is required.`)
284
+ .option(`--xdefault <xdefault>`, `Default value. Cannot be set when column is required.`)
285
285
  .option(`--array [value]`, `Is column an array?`, (value) => value === undefined ? true : parseBool(value))
286
- .action(actionRunner(async ({ databaseId, tableId, key, required, xDefault, array }) => await (await getTablesDBClient()).createIpColumn(databaseId, tableId, key, required, xDefault, array)));
287
- tablesdb
286
+ .action(actionRunner(async ({ databaseId, tableId, key, required, xdefault, array }) => parse(await (await getTablesDBClient()).createIpColumn(databaseId, tableId, key, required, xdefault, array))));
287
+ tablesDB
288
288
  .command(`update-ip-column`)
289
289
  .description(`Update an ip column. Changing the \`default\` value will not update already existing rows.
290
290
  `)
@@ -292,67 +292,67 @@ tablesdb
292
292
  .requiredOption(`--table-id <table-id>`, `Table ID.`)
293
293
  .requiredOption(`--key <key>`, `Column Key.`)
294
294
  .requiredOption(`--required <required>`, `Is column required?`, parseBool)
295
- .requiredOption(`--default <default>`, `Default value. Cannot be set when column is required.`)
295
+ .requiredOption(`--xdefault <xdefault>`, `Default value. Cannot be set when column is required.`)
296
296
  .option(`--new-key <new-key>`, `New Column Key.`)
297
- .action(actionRunner(async ({ databaseId, tableId, key, required, xDefault, newKey }) => await (await getTablesDBClient()).updateIpColumn(databaseId, tableId, key, required, xDefault, newKey)));
298
- tablesdb
297
+ .action(actionRunner(async ({ databaseId, tableId, key, required, xdefault, newKey }) => parse(await (await getTablesDBClient()).updateIpColumn(databaseId, tableId, key, required, xdefault, newKey))));
298
+ tablesDB
299
299
  .command(`create-line-column`)
300
300
  .description(`Create a geometric line column.`)
301
301
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
302
302
  .requiredOption(`--table-id <table-id>`, `Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`)
303
303
  .requiredOption(`--key <key>`, `Column Key.`)
304
304
  .requiredOption(`--required <required>`, `Is column required?`, parseBool)
305
- .option(`--default [default...]`, `Default value for column when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], …], listing the vertices of the line in order. Cannot be set when column is required.`)
306
- .action(actionRunner(async ({ databaseId, tableId, key, required, xDefault }) => await (await getTablesDBClient()).createLineColumn(databaseId, tableId, key, required, xDefault)));
307
- tablesdb
305
+ .option(`--xdefault [xdefault...]`, `Default value for column when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], …], listing the vertices of the line in order. Cannot be set when column is required.`)
306
+ .action(actionRunner(async ({ databaseId, tableId, key, required, xdefault }) => parse(await (await getTablesDBClient()).createLineColumn(databaseId, tableId, key, required, xdefault))));
307
+ tablesDB
308
308
  .command(`update-line-column`)
309
309
  .description(`Update a line column. Changing the \`default\` value will not update already existing rows.`)
310
310
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
311
311
  .requiredOption(`--table-id <table-id>`, `Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`)
312
312
  .requiredOption(`--key <key>`, `Column Key.`)
313
313
  .requiredOption(`--required <required>`, `Is column required?`, parseBool)
314
- .option(`--default [default...]`, `Default value for column when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], …], listing the vertices of the line in order. Cannot be set when column is required.`)
314
+ .option(`--xdefault [xdefault...]`, `Default value for column when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], …], listing the vertices of the line in order. Cannot be set when column is required.`)
315
315
  .option(`--new-key <new-key>`, `New Column Key.`)
316
- .action(actionRunner(async ({ databaseId, tableId, key, required, xDefault, newKey }) => await (await getTablesDBClient()).updateLineColumn(databaseId, tableId, key, required, xDefault, newKey)));
317
- tablesdb
316
+ .action(actionRunner(async ({ databaseId, tableId, key, required, xdefault, newKey }) => parse(await (await getTablesDBClient()).updateLineColumn(databaseId, tableId, key, required, xdefault, newKey))));
317
+ tablesDB
318
318
  .command(`create-point-column`)
319
319
  .description(`Create a geometric point column.`)
320
320
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
321
321
  .requiredOption(`--table-id <table-id>`, `Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`)
322
322
  .requiredOption(`--key <key>`, `Column Key.`)
323
323
  .requiredOption(`--required <required>`, `Is column required?`, parseBool)
324
- .option(`--default [default...]`, `Default value for column when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when column is required.`)
325
- .action(actionRunner(async ({ databaseId, tableId, key, required, xDefault }) => await (await getTablesDBClient()).createPointColumn(databaseId, tableId, key, required, xDefault)));
326
- tablesdb
324
+ .option(`--xdefault [xdefault...]`, `Default value for column when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when column is required.`)
325
+ .action(actionRunner(async ({ databaseId, tableId, key, required, xdefault }) => parse(await (await getTablesDBClient()).createPointColumn(databaseId, tableId, key, required, xdefault))));
326
+ tablesDB
327
327
  .command(`update-point-column`)
328
328
  .description(`Update a point column. Changing the \`default\` value will not update already existing rows.`)
329
329
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
330
330
  .requiredOption(`--table-id <table-id>`, `Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`)
331
331
  .requiredOption(`--key <key>`, `Column Key.`)
332
332
  .requiredOption(`--required <required>`, `Is column required?`, parseBool)
333
- .option(`--default [default...]`, `Default value for column when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when column is required.`)
333
+ .option(`--xdefault [xdefault...]`, `Default value for column when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when column is required.`)
334
334
  .option(`--new-key <new-key>`, `New Column Key.`)
335
- .action(actionRunner(async ({ databaseId, tableId, key, required, xDefault, newKey }) => await (await getTablesDBClient()).updatePointColumn(databaseId, tableId, key, required, xDefault, newKey)));
336
- tablesdb
335
+ .action(actionRunner(async ({ databaseId, tableId, key, required, xdefault, newKey }) => parse(await (await getTablesDBClient()).updatePointColumn(databaseId, tableId, key, required, xdefault, newKey))));
336
+ tablesDB
337
337
  .command(`create-polygon-column`)
338
338
  .description(`Create a geometric polygon column.`)
339
339
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
340
340
  .requiredOption(`--table-id <table-id>`, `Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`)
341
341
  .requiredOption(`--key <key>`, `Column Key.`)
342
342
  .requiredOption(`--required <required>`, `Is column required?`, parseBool)
343
- .option(`--default [default...]`, `Default value for column when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when column is required.`)
344
- .action(actionRunner(async ({ databaseId, tableId, key, required, xDefault }) => await (await getTablesDBClient()).createPolygonColumn(databaseId, tableId, key, required, xDefault)));
345
- tablesdb
343
+ .option(`--xdefault [xdefault...]`, `Default value for column when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when column is required.`)
344
+ .action(actionRunner(async ({ databaseId, tableId, key, required, xdefault }) => parse(await (await getTablesDBClient()).createPolygonColumn(databaseId, tableId, key, required, xdefault))));
345
+ tablesDB
346
346
  .command(`update-polygon-column`)
347
347
  .description(`Update a polygon column. Changing the \`default\` value will not update already existing rows.`)
348
348
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
349
349
  .requiredOption(`--table-id <table-id>`, `Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`)
350
350
  .requiredOption(`--key <key>`, `Column Key.`)
351
351
  .requiredOption(`--required <required>`, `Is column required?`, parseBool)
352
- .option(`--default [default...]`, `Default value for column when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when column is required.`)
352
+ .option(`--xdefault [xdefault...]`, `Default value for column when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when column is required.`)
353
353
  .option(`--new-key <new-key>`, `New Column Key.`)
354
- .action(actionRunner(async ({ databaseId, tableId, key, required, xDefault, newKey }) => await (await getTablesDBClient()).updatePolygonColumn(databaseId, tableId, key, required, xDefault, newKey)));
355
- tablesdb
354
+ .action(actionRunner(async ({ databaseId, tableId, key, required, xdefault, newKey }) => parse(await (await getTablesDBClient()).updatePolygonColumn(databaseId, tableId, key, required, xdefault, newKey))));
355
+ tablesDB
356
356
  .command(`create-relationship-column`)
357
357
  .description(`Create relationship column. [Learn more about relationship columns](https://appwrite.io/docs/databases-relationships#relationship-columns).
358
358
  `)
@@ -364,8 +364,8 @@ tablesdb
364
364
  .option(`--key <key>`, `Column Key.`)
365
365
  .option(`--two-way-key <two-way-key>`, `Two Way Column Key.`)
366
366
  .option(`--on-delete <on-delete>`, `Constraints option`)
367
- .action(actionRunner(async ({ databaseId, tableId, relatedTableId, xType, twoWay, key, twoWayKey, onDelete, }) => await (await getTablesDBClient()).createRelationshipColumn(databaseId, tableId, relatedTableId, xType, twoWay, key, twoWayKey, onDelete)));
368
- tablesdb
367
+ .action(actionRunner(async ({ databaseId, tableId, relatedTableId, type, twoWay, key, twoWayKey, onDelete }) => parse(await (await getTablesDBClient()).createRelationshipColumn(databaseId, tableId, relatedTableId, type, twoWay, key, twoWayKey, onDelete))));
368
+ tablesDB
369
369
  .command(`create-string-column`)
370
370
  .description(`Create a string column.
371
371
  `)
@@ -374,11 +374,11 @@ tablesdb
374
374
  .requiredOption(`--key <key>`, `Column Key.`)
375
375
  .requiredOption(`--size <size>`, `Column size for text columns, in number of characters.`, parseInteger)
376
376
  .requiredOption(`--required <required>`, `Is column required?`, parseBool)
377
- .option(`--default <default>`, `Default value for column when not provided. Cannot be set when column is required.`)
377
+ .option(`--xdefault <xdefault>`, `Default value for column when not provided. Cannot be set when column is required.`)
378
378
  .option(`--array [value]`, `Is column an array?`, (value) => value === undefined ? true : parseBool(value))
379
379
  .option(`--encrypt [value]`, `Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.`, (value) => value === undefined ? true : parseBool(value))
380
- .action(actionRunner(async ({ databaseId, tableId, key, size, required, xDefault, array, encrypt, }) => await (await getTablesDBClient()).createStringColumn(databaseId, tableId, key, size, required, xDefault, array, encrypt)));
381
- tablesdb
380
+ .action(actionRunner(async ({ databaseId, tableId, key, size, required, xdefault, array, encrypt }) => parse(await (await getTablesDBClient()).createStringColumn(databaseId, tableId, key, size, required, xdefault, array, encrypt))));
381
+ tablesDB
382
382
  .command(`update-string-column`)
383
383
  .description(`Update a string column. Changing the \`default\` value will not update already existing rows.
384
384
  `)
@@ -386,11 +386,11 @@ tablesdb
386
386
  .requiredOption(`--table-id <table-id>`, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`)
387
387
  .requiredOption(`--key <key>`, `Column Key.`)
388
388
  .requiredOption(`--required <required>`, `Is column required?`, parseBool)
389
- .requiredOption(`--default <default>`, `Default value for column when not provided. Cannot be set when column is required.`)
389
+ .requiredOption(`--xdefault <xdefault>`, `Default value for column when not provided. Cannot be set when column is required.`)
390
390
  .option(`--size <size>`, `Maximum size of the string column.`, parseInteger)
391
391
  .option(`--new-key <new-key>`, `New Column Key.`)
392
- .action(actionRunner(async ({ databaseId, tableId, key, required, xDefault, size, newKey }) => await (await getTablesDBClient()).updateStringColumn(databaseId, tableId, key, required, xDefault, size, newKey)));
393
- tablesdb
392
+ .action(actionRunner(async ({ databaseId, tableId, key, required, xdefault, size, newKey }) => parse(await (await getTablesDBClient()).updateStringColumn(databaseId, tableId, key, required, xdefault, size, newKey))));
393
+ tablesDB
394
394
  .command(`create-url-column`)
395
395
  .description(`Create a URL column.
396
396
  `)
@@ -398,10 +398,10 @@ tablesdb
398
398
  .requiredOption(`--table-id <table-id>`, `Table ID.`)
399
399
  .requiredOption(`--key <key>`, `Column Key.`)
400
400
  .requiredOption(`--required <required>`, `Is column required?`, parseBool)
401
- .option(`--default <default>`, `Default value for column when not provided. Cannot be set when column is required.`)
401
+ .option(`--xdefault <xdefault>`, `Default value for column when not provided. Cannot be set when column is required.`)
402
402
  .option(`--array [value]`, `Is column an array?`, (value) => value === undefined ? true : parseBool(value))
403
- .action(actionRunner(async ({ databaseId, tableId, key, required, xDefault, array }) => await (await getTablesDBClient()).createUrlColumn(databaseId, tableId, key, required, xDefault, array)));
404
- tablesdb
403
+ .action(actionRunner(async ({ databaseId, tableId, key, required, xdefault, array }) => parse(await (await getTablesDBClient()).createUrlColumn(databaseId, tableId, key, required, xdefault, array))));
404
+ tablesDB
405
405
  .command(`update-url-column`)
406
406
  .description(`Update an url column. Changing the \`default\` value will not update already existing rows.
407
407
  `)
@@ -409,24 +409,24 @@ tablesdb
409
409
  .requiredOption(`--table-id <table-id>`, `Table ID.`)
410
410
  .requiredOption(`--key <key>`, `Column Key.`)
411
411
  .requiredOption(`--required <required>`, `Is column required?`, parseBool)
412
- .requiredOption(`--default <default>`, `Default value for column when not provided. Cannot be set when column is required.`)
412
+ .requiredOption(`--xdefault <xdefault>`, `Default value for column when not provided. Cannot be set when column is required.`)
413
413
  .option(`--new-key <new-key>`, `New Column Key.`)
414
- .action(actionRunner(async ({ databaseId, tableId, key, required, xDefault, newKey }) => await (await getTablesDBClient()).updateUrlColumn(databaseId, tableId, key, required, xDefault, newKey)));
415
- tablesdb
414
+ .action(actionRunner(async ({ databaseId, tableId, key, required, xdefault, newKey }) => parse(await (await getTablesDBClient()).updateUrlColumn(databaseId, tableId, key, required, xdefault, newKey))));
415
+ tablesDB
416
416
  .command(`get-column`)
417
417
  .description(`Get column by ID.`)
418
418
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
419
419
  .requiredOption(`--table-id <table-id>`, `Table ID.`)
420
420
  .requiredOption(`--key <key>`, `Column Key.`)
421
- .action(actionRunner(async ({ databaseId, tableId, key }) => await (await getTablesDBClient()).getColumn(databaseId, tableId, key)));
422
- tablesdb
421
+ .action(actionRunner(async ({ databaseId, tableId, key }) => parse(await (await getTablesDBClient()).getColumn(databaseId, tableId, key))));
422
+ tablesDB
423
423
  .command(`delete-column`)
424
424
  .description(`Deletes a column.`)
425
425
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
426
426
  .requiredOption(`--table-id <table-id>`, `Table ID.`)
427
427
  .requiredOption(`--key <key>`, `Column Key.`)
428
- .action(actionRunner(async ({ databaseId, tableId, key }) => await (await getTablesDBClient()).deleteColumn(databaseId, tableId, key)));
429
- tablesdb
428
+ .action(actionRunner(async ({ databaseId, tableId, key }) => parse(await (await getTablesDBClient()).deleteColumn(databaseId, tableId, key))));
429
+ tablesDB
430
430
  .command(`update-relationship-column`)
431
431
  .description(`Update relationship column. [Learn more about relationship columns](https://appwrite.io/docs/databases-relationships#relationship-columns).
432
432
  `)
@@ -435,16 +435,16 @@ tablesdb
435
435
  .requiredOption(`--key <key>`, `Column Key.`)
436
436
  .option(`--on-delete <on-delete>`, `Constraints option`)
437
437
  .option(`--new-key <new-key>`, `New Column Key.`)
438
- .action(actionRunner(async ({ databaseId, tableId, key, onDelete, newKey }) => await (await getTablesDBClient()).updateRelationshipColumn(databaseId, tableId, key, onDelete, newKey)));
439
- tablesdb
438
+ .action(actionRunner(async ({ databaseId, tableId, key, onDelete, newKey }) => parse(await (await getTablesDBClient()).updateRelationshipColumn(databaseId, tableId, key, onDelete, newKey))));
439
+ tablesDB
440
440
  .command(`list-indexes`)
441
441
  .description(`List indexes on the table.`)
442
442
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
443
443
  .requiredOption(`--table-id <table-id>`, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`)
444
444
  .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 columns: key, type, status, attributes, error`)
445
445
  .option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value))
446
- .action(actionRunner(async ({ databaseId, tableId, queries, total }) => await (await getTablesDBClient()).listIndexes(databaseId, tableId, queries, total)));
447
- tablesdb
446
+ .action(actionRunner(async ({ databaseId, tableId, queries, total }) => parse(await (await getTablesDBClient()).listIndexes(databaseId, tableId, queries, total))));
447
+ tablesDB
448
448
  .command(`create-index`)
449
449
  .description(`Creates an index on the columns listed. Your index should include all the columns you will query in a single request.
450
450
  Type can be \`key\`, \`fulltext\`, or \`unique\`.`)
@@ -455,29 +455,29 @@ Type can be \`key\`, \`fulltext\`, or \`unique\`.`)
455
455
  .requiredOption(`--columns [columns...]`, `Array of columns to index. Maximum of 100 columns are allowed, each 32 characters long.`)
456
456
  .option(`--orders [orders...]`, `Array of index orders. Maximum of 100 orders are allowed.`)
457
457
  .option(`--lengths [lengths...]`, `Length of index. Maximum of 100`)
458
- .action(actionRunner(async ({ databaseId, tableId, key, xType, columns, orders, lengths }) => await (await getTablesDBClient()).createIndex(databaseId, tableId, key, xType, columns, orders, lengths)));
459
- tablesdb
458
+ .action(actionRunner(async ({ databaseId, tableId, key, type, columns, orders, lengths }) => parse(await (await getTablesDBClient()).createIndex(databaseId, tableId, key, type, columns, orders, lengths))));
459
+ tablesDB
460
460
  .command(`get-index`)
461
461
  .description(`Get index by ID.`)
462
462
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
463
463
  .requiredOption(`--table-id <table-id>`, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`)
464
464
  .requiredOption(`--key <key>`, `Index Key.`)
465
- .action(actionRunner(async ({ databaseId, tableId, key }) => await (await getTablesDBClient()).getIndex(databaseId, tableId, key)));
466
- tablesdb
465
+ .action(actionRunner(async ({ databaseId, tableId, key }) => parse(await (await getTablesDBClient()).getIndex(databaseId, tableId, key))));
466
+ tablesDB
467
467
  .command(`delete-index`)
468
468
  .description(`Delete an index.`)
469
469
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
470
470
  .requiredOption(`--table-id <table-id>`, `Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`)
471
471
  .requiredOption(`--key <key>`, `Index Key.`)
472
- .action(actionRunner(async ({ databaseId, tableId, key }) => await (await getTablesDBClient()).deleteIndex(databaseId, tableId, key)));
473
- tablesdb
472
+ .action(actionRunner(async ({ databaseId, tableId, key }) => parse(await (await getTablesDBClient()).deleteIndex(databaseId, tableId, key))));
473
+ tablesDB
474
474
  .command(`list-table-logs`)
475
475
  .description(`Get the table activity logs list by its unique ID.`)
476
476
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
477
477
  .requiredOption(`--table-id <table-id>`, `Table ID.`)
478
478
  .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`)
479
- .action(actionRunner(async ({ databaseId, tableId, queries }) => await (await getTablesDBClient()).listTableLogs(databaseId, tableId, queries)));
480
- tablesdb
479
+ .action(actionRunner(async ({ databaseId, tableId, queries }) => parse(await (await getTablesDBClient()).listTableLogs(databaseId, tableId, queries))));
480
+ tablesDB
481
481
  .command(`list-rows`)
482
482
  .description(`Get a list of all the user's rows in a given table. You can use the query params to filter your results.`)
483
483
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
@@ -485,8 +485,8 @@ tablesdb
485
485
  .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.`)
486
486
  .option(`--transaction-id <transaction-id>`, `Transaction ID to read uncommitted changes within the transaction.`)
487
487
  .option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value))
488
- .action(actionRunner(async ({ databaseId, tableId, queries, transactionId, total }) => await (await getTablesDBClient()).listRows(databaseId, tableId, queries, transactionId, total)));
489
- tablesdb
488
+ .action(actionRunner(async ({ databaseId, tableId, queries, transactionId, total }) => parse(await (await getTablesDBClient()).listRows(databaseId, tableId, queries, transactionId, total))));
489
+ tablesDB
490
490
  .command(`create-row`)
491
491
  .description(`Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable) API or directly from your database console.`)
492
492
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
@@ -495,8 +495,16 @@ tablesdb
495
495
  .requiredOption(`--data <data>`, `Row data as JSON object.`)
496
496
  .option(`--permissions [permissions...]`, `An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).`)
497
497
  .option(`--transaction-id <transaction-id>`, `Transaction ID for staging the operation.`)
498
- .action(actionRunner(async ({ databaseId, tableId, rowId, data, permissions, transactionId, }) => await (await getTablesDBClient()).createRow(databaseId, tableId, rowId, JSON.parse(data), permissions, transactionId)));
499
- tablesdb
498
+ .action(actionRunner(async ({ databaseId, tableId, rowId, data, permissions, transactionId }) => parse(await (await getTablesDBClient()).createRow(databaseId, tableId, rowId, JSON.parse(data), permissions, transactionId))));
499
+ tablesDB
500
+ .command(`create-rows`)
501
+ .description(`Create new Rows. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable) API or directly from your database console.`)
502
+ .requiredOption(`--database-id <database-id>`, `Database ID.`)
503
+ .requiredOption(`--table-id <table-id>`, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable). Make sure to define columns before creating rows.`)
504
+ .requiredOption(`--rows [rows...]`, `Array of rows data as JSON objects.`)
505
+ .option(`--transaction-id <transaction-id>`, `Transaction ID for staging the operation.`)
506
+ .action(actionRunner(async ({ databaseId, tableId, rows, transactionId }) => parse(await (await getTablesDBClient()).createRows(databaseId, tableId, rows, transactionId))));
507
+ tablesDB
500
508
  .command(`upsert-rows`)
501
509
  .description(`Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable) API or directly from your database console.
502
510
  `)
@@ -504,8 +512,8 @@ tablesdb
504
512
  .requiredOption(`--table-id <table-id>`, `Table ID.`)
505
513
  .requiredOption(`--rows [rows...]`, `Array of row data as JSON objects. May contain partial rows.`)
506
514
  .option(`--transaction-id <transaction-id>`, `Transaction ID for staging the operation.`)
507
- .action(actionRunner(async ({ databaseId, tableId, rows, transactionId }) => await (await getTablesDBClient()).upsertRows(databaseId, tableId, rows, transactionId)));
508
- tablesdb
515
+ .action(actionRunner(async ({ databaseId, tableId, rows, transactionId }) => parse(await (await getTablesDBClient()).upsertRows(databaseId, tableId, rows, transactionId))));
516
+ tablesDB
509
517
  .command(`update-rows`)
510
518
  .description(`Update all rows that match your queries, if no queries are submitted then all rows are updated. You can pass only specific fields to be updated.`)
511
519
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
@@ -513,16 +521,16 @@ tablesdb
513
521
  .option(`--data <data>`, `Row data as JSON object. Include only column and value pairs to be updated.`)
514
522
  .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.`)
515
523
  .option(`--transaction-id <transaction-id>`, `Transaction ID for staging the operation.`)
516
- .action(actionRunner(async ({ databaseId, tableId, data, queries, transactionId }) => await (await getTablesDBClient()).updateRows(databaseId, tableId, JSON.parse(data), queries, transactionId)));
517
- tablesdb
524
+ .action(actionRunner(async ({ databaseId, tableId, data, queries, transactionId }) => parse(await (await getTablesDBClient()).updateRows(databaseId, tableId, JSON.parse(data), queries, transactionId))));
525
+ tablesDB
518
526
  .command(`delete-rows`)
519
527
  .description(`Bulk delete rows using queries, if no queries are passed then all rows are deleted.`)
520
528
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
521
529
  .requiredOption(`--table-id <table-id>`, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`)
522
530
  .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.`)
523
531
  .option(`--transaction-id <transaction-id>`, `Transaction ID for staging the operation.`)
524
- .action(actionRunner(async ({ databaseId, tableId, queries, transactionId }) => await (await getTablesDBClient()).deleteRows(databaseId, tableId, queries, transactionId)));
525
- tablesdb
532
+ .action(actionRunner(async ({ databaseId, tableId, queries, transactionId }) => parse(await (await getTablesDBClient()).deleteRows(databaseId, tableId, queries, transactionId))));
533
+ tablesDB
526
534
  .command(`get-row`)
527
535
  .description(`Get a row by its unique ID. This endpoint response returns a JSON object with the row data.`)
528
536
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
@@ -530,8 +538,8 @@ tablesdb
530
538
  .requiredOption(`--row-id <row-id>`, `Row ID.`)
531
539
  .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.`)
532
540
  .option(`--transaction-id <transaction-id>`, `Transaction ID to read uncommitted changes within the transaction.`)
533
- .action(actionRunner(async ({ databaseId, tableId, rowId, queries, transactionId }) => await (await getTablesDBClient()).getRow(databaseId, tableId, rowId, queries, transactionId)));
534
- tablesdb
541
+ .action(actionRunner(async ({ databaseId, tableId, rowId, queries, transactionId }) => parse(await (await getTablesDBClient()).getRow(databaseId, tableId, rowId, queries, transactionId))));
542
+ tablesDB
535
543
  .command(`upsert-row`)
536
544
  .description(`Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable) API or directly from your database console.`)
537
545
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
@@ -540,8 +548,8 @@ tablesdb
540
548
  .option(`--data <data>`, `Row data as JSON object. Include all required columns of the row to be created or updated.`)
541
549
  .option(`--permissions [permissions...]`, `An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).`)
542
550
  .option(`--transaction-id <transaction-id>`, `Transaction ID for staging the operation.`)
543
- .action(actionRunner(async ({ databaseId, tableId, rowId, data, permissions, transactionId, }) => await (await getTablesDBClient()).upsertRow(databaseId, tableId, rowId, JSON.parse(data), permissions, transactionId)));
544
- tablesdb
551
+ .action(actionRunner(async ({ databaseId, tableId, rowId, data, permissions, transactionId }) => parse(await (await getTablesDBClient()).upsertRow(databaseId, tableId, rowId, JSON.parse(data), permissions, transactionId))));
552
+ tablesDB
545
553
  .command(`update-row`)
546
554
  .description(`Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.`)
547
555
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
@@ -550,24 +558,24 @@ tablesdb
550
558
  .option(`--data <data>`, `Row data as JSON object. Include only columns and value pairs to be updated.`)
551
559
  .option(`--permissions [permissions...]`, `An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).`)
552
560
  .option(`--transaction-id <transaction-id>`, `Transaction ID for staging the operation.`)
553
- .action(actionRunner(async ({ databaseId, tableId, rowId, data, permissions, transactionId, }) => await (await getTablesDBClient()).updateRow(databaseId, tableId, rowId, JSON.parse(data), permissions, transactionId)));
554
- tablesdb
561
+ .action(actionRunner(async ({ databaseId, tableId, rowId, data, permissions, transactionId }) => parse(await (await getTablesDBClient()).updateRow(databaseId, tableId, rowId, JSON.parse(data), permissions, transactionId))));
562
+ tablesDB
555
563
  .command(`delete-row`)
556
564
  .description(`Delete a row by its unique ID.`)
557
565
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
558
566
  .requiredOption(`--table-id <table-id>`, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`)
559
567
  .requiredOption(`--row-id <row-id>`, `Row ID.`)
560
568
  .option(`--transaction-id <transaction-id>`, `Transaction ID for staging the operation.`)
561
- .action(actionRunner(async ({ databaseId, tableId, rowId, transactionId }) => await (await getTablesDBClient()).deleteRow(databaseId, tableId, rowId, transactionId)));
562
- tablesdb
569
+ .action(actionRunner(async ({ databaseId, tableId, rowId, transactionId }) => parse(await (await getTablesDBClient()).deleteRow(databaseId, tableId, rowId, transactionId))));
570
+ tablesDB
563
571
  .command(`list-row-logs`)
564
572
  .description(`Get the row activity logs list by its unique ID.`)
565
573
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
566
574
  .requiredOption(`--table-id <table-id>`, `Table ID.`)
567
575
  .requiredOption(`--row-id <row-id>`, `Row ID.`)
568
576
  .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`)
569
- .action(actionRunner(async ({ databaseId, tableId, rowId, queries }) => await (await getTablesDBClient()).listRowLogs(databaseId, tableId, rowId, queries)));
570
- tablesdb
577
+ .action(actionRunner(async ({ databaseId, tableId, rowId, queries }) => parse(await (await getTablesDBClient()).listRowLogs(databaseId, tableId, rowId, queries))));
578
+ tablesDB
571
579
  .command(`decrement-row-column`)
572
580
  .description(`Decrement a specific column of a row by a given value.`)
573
581
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
@@ -577,8 +585,8 @@ tablesdb
577
585
  .option(`--value <value>`, `Value to increment the column by. The value must be a number.`, parseInteger)
578
586
  .option(`--min <min>`, `Minimum value for the column. If the current value is lesser than this value, an exception will be thrown.`, parseInteger)
579
587
  .option(`--transaction-id <transaction-id>`, `Transaction ID for staging the operation.`)
580
- .action(actionRunner(async ({ databaseId, tableId, rowId, column, value, min, transactionId, }) => await (await getTablesDBClient()).decrementRowColumn(databaseId, tableId, rowId, column, value, min, transactionId)));
581
- tablesdb
588
+ .action(actionRunner(async ({ databaseId, tableId, rowId, column, value, min, transactionId }) => parse(await (await getTablesDBClient()).decrementRowColumn(databaseId, tableId, rowId, column, value, min, transactionId))));
589
+ tablesDB
582
590
  .command(`increment-row-column`)
583
591
  .description(`Increment a specific column of a row by a given value.`)
584
592
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
@@ -588,18 +596,18 @@ tablesdb
588
596
  .option(`--value <value>`, `Value to increment the column by. The value must be a number.`, parseInteger)
589
597
  .option(`--max <max>`, `Maximum value for the column. If the current value is greater than this value, an error will be thrown.`, parseInteger)
590
598
  .option(`--transaction-id <transaction-id>`, `Transaction ID for staging the operation.`)
591
- .action(actionRunner(async ({ databaseId, tableId, rowId, column, value, max, transactionId, }) => await (await getTablesDBClient()).incrementRowColumn(databaseId, tableId, rowId, column, value, max, transactionId)));
592
- tablesdb
599
+ .action(actionRunner(async ({ databaseId, tableId, rowId, column, value, max, transactionId }) => parse(await (await getTablesDBClient()).incrementRowColumn(databaseId, tableId, rowId, column, value, max, transactionId))));
600
+ tablesDB
593
601
  .command(`get-table-usage`)
594
602
  .description(`Get usage metrics and statistics for a table. Returning the total number of rows. 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.`)
595
603
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
596
- .option(`--range <range>`, `Date range.`)
597
604
  .requiredOption(`--table-id <table-id>`, `Table ID.`)
598
- .action(actionRunner(async ({ databaseId, range, tableId }) => await (await getTablesDBClient()).getTableUsage(databaseId, range, tableId)));
599
- tablesdb
605
+ .option(`--range <range>`, `Date range.`)
606
+ .action(actionRunner(async ({ databaseId, tableId, range }) => parse(await (await getTablesDBClient()).getTableUsage(databaseId, tableId, range))));
607
+ tablesDB
600
608
  .command(`get-usage`)
601
609
  .description(`Get usage metrics and statistics for a database. You can view the total number of tables, rows, 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.`)
602
610
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
603
611
  .option(`--range <range>`, `Date range.`)
604
- .action(actionRunner(async ({ databaseId, range }) => await (await getTablesDBClient()).getUsage(databaseId, range)));
605
- //# sourceMappingURL=tablesdb.js.map
612
+ .action(actionRunner(async ({ databaseId, range }) => parse(await (await getTablesDBClient()).getUsage(databaseId, range))));
613
+ //# sourceMappingURL=tables-db.js.map