appwrite-cli 8.3.0 → 9.0.1

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 (520) hide show
  1. package/README.md +5 -5
  2. package/docs/examples/account/create-anonymous-session.md +1 -1
  3. package/docs/examples/account/create-email-password-session.md +3 -3
  4. package/docs/examples/account/create-email-token.md +3 -4
  5. package/docs/examples/account/create-jwt.md +1 -0
  6. package/docs/examples/account/create-magic-url-token.md +3 -0
  7. package/docs/examples/account/create-mfa-authenticator.md +2 -2
  8. package/docs/examples/account/create-mfa-challenge.md +2 -2
  9. package/docs/examples/account/create-mfa-recovery-codes.md +1 -1
  10. package/docs/examples/account/create-o-auth-2-session.md +2 -0
  11. package/docs/examples/account/create-o-auth-2-token.md +2 -0
  12. package/docs/examples/account/create-phone-token.md +3 -3
  13. package/docs/examples/account/create-phone-verification.md +1 -1
  14. package/docs/examples/account/create-push-target.md +3 -4
  15. package/docs/examples/account/create-recovery.md +3 -3
  16. package/docs/examples/account/create-session.md +3 -3
  17. package/docs/examples/account/create-verification.md +2 -2
  18. package/docs/examples/account/create.md +3 -4
  19. package/docs/examples/account/delete-identity.md +2 -2
  20. package/docs/examples/account/delete-mfa-authenticator.md +2 -2
  21. package/docs/examples/account/delete-push-target.md +2 -2
  22. package/docs/examples/account/delete-session.md +2 -2
  23. package/docs/examples/account/delete-sessions.md +1 -1
  24. package/docs/examples/account/get-mfa-recovery-codes.md +1 -1
  25. package/docs/examples/account/get-prefs.md +1 -1
  26. package/docs/examples/account/get-session.md +2 -2
  27. package/docs/examples/account/list-identities.md +1 -2
  28. package/docs/examples/account/list-logs.md +1 -2
  29. package/docs/examples/account/list-mfa-factors.md +1 -1
  30. package/docs/examples/account/list-sessions.md +1 -1
  31. package/docs/examples/account/update-email.md +3 -3
  32. package/docs/examples/account/update-magic-url-session.md +3 -0
  33. package/docs/examples/account/update-mfa-authenticator.md +3 -3
  34. package/docs/examples/account/update-mfa-challenge.md +3 -3
  35. package/docs/examples/account/update-mfa-recovery-codes.md +1 -1
  36. package/docs/examples/account/update-mfa.md +2 -0
  37. package/docs/examples/account/update-name.md +2 -2
  38. package/docs/examples/account/update-password.md +2 -3
  39. package/docs/examples/account/update-phone-session.md +3 -3
  40. package/docs/examples/account/update-phone-verification.md +3 -3
  41. package/docs/examples/account/update-phone.md +3 -3
  42. package/docs/examples/account/update-prefs.md +2 -2
  43. package/docs/examples/account/update-push-target.md +3 -3
  44. package/docs/examples/account/update-recovery.md +4 -4
  45. package/docs/examples/account/update-session.md +2 -2
  46. package/docs/examples/account/update-status.md +1 -1
  47. package/docs/examples/account/update-verification.md +3 -3
  48. package/docs/examples/avatars/get-browser.md +2 -5
  49. package/docs/examples/avatars/get-credit-card.md +2 -5
  50. package/docs/examples/avatars/get-favicon.md +2 -2
  51. package/docs/examples/avatars/get-flag.md +2 -5
  52. package/docs/examples/avatars/get-image.md +2 -4
  53. package/docs/examples/avatars/get-initials.md +1 -5
  54. package/docs/examples/avatars/get-qr.md +2 -0
  55. package/docs/examples/console/get-resource.md +3 -3
  56. package/docs/examples/databases/create-boolean-attribute.md +5 -7
  57. package/docs/examples/databases/create-collection.md +4 -7
  58. package/docs/examples/databases/create-datetime-attribute.md +5 -7
  59. package/docs/examples/databases/create-document.md +5 -6
  60. package/docs/examples/databases/create-documents.md +4 -4
  61. package/docs/examples/databases/create-email-attribute.md +5 -7
  62. package/docs/examples/databases/create-enum-attribute.md +6 -8
  63. package/docs/examples/databases/create-float-attribute.md +5 -9
  64. package/docs/examples/databases/create-index.md +6 -8
  65. package/docs/examples/databases/create-integer-attribute.md +5 -9
  66. package/docs/examples/databases/create-ip-attribute.md +5 -7
  67. package/docs/examples/databases/create-relationship-attribute.md +5 -9
  68. package/docs/examples/databases/create-string-attribute.md +6 -9
  69. package/docs/examples/databases/create-url-attribute.md +5 -7
  70. package/docs/examples/databases/create.md +2 -3
  71. package/docs/examples/databases/decrement-document-attribute.md +5 -7
  72. package/docs/examples/databases/delete-attribute.md +4 -4
  73. package/docs/examples/databases/delete-collection.md +3 -3
  74. package/docs/examples/databases/delete-document.md +4 -4
  75. package/docs/examples/databases/delete-documents.md +3 -4
  76. package/docs/examples/databases/delete-index.md +4 -4
  77. package/docs/examples/databases/delete.md +1 -1
  78. package/docs/examples/databases/get-attribute.md +4 -4
  79. package/docs/examples/databases/get-collection-usage.md +3 -4
  80. package/docs/examples/databases/get-collection.md +3 -3
  81. package/docs/examples/databases/get-document.md +4 -5
  82. package/docs/examples/databases/get-index.md +4 -4
  83. package/docs/examples/databases/get-usage.md +2 -2
  84. package/docs/examples/databases/get.md +1 -1
  85. package/docs/examples/databases/increment-document-attribute.md +5 -7
  86. package/docs/examples/databases/list-attributes.md +3 -4
  87. package/docs/examples/databases/list-collection-logs.md +3 -4
  88. package/docs/examples/databases/list-collections.md +2 -4
  89. package/docs/examples/databases/list-document-logs.md +4 -5
  90. package/docs/examples/databases/list-documents.md +3 -4
  91. package/docs/examples/databases/list-indexes.md +3 -4
  92. package/docs/examples/databases/list-logs.md +2 -3
  93. package/docs/examples/databases/list-usage.md +1 -0
  94. package/docs/examples/databases/list.md +1 -3
  95. package/docs/examples/databases/update-boolean-attribute.md +6 -7
  96. package/docs/examples/databases/update-collection.md +4 -7
  97. package/docs/examples/databases/update-datetime-attribute.md +6 -7
  98. package/docs/examples/databases/update-document.md +4 -6
  99. package/docs/examples/databases/update-documents.md +3 -5
  100. package/docs/examples/databases/update-email-attribute.md +6 -7
  101. package/docs/examples/databases/update-enum-attribute.md +7 -8
  102. package/docs/examples/databases/update-float-attribute.md +6 -9
  103. package/docs/examples/databases/update-integer-attribute.md +6 -9
  104. package/docs/examples/databases/update-ip-attribute.md +6 -7
  105. package/docs/examples/databases/update-relationship-attribute.md +4 -6
  106. package/docs/examples/databases/update-string-attribute.md +6 -8
  107. package/docs/examples/databases/update-url-attribute.md +6 -7
  108. package/docs/examples/databases/update.md +2 -3
  109. package/docs/examples/databases/upsert-document.md +5 -6
  110. package/docs/examples/databases/upsert-documents.md +4 -4
  111. package/docs/examples/functions/create-deployment.md +4 -6
  112. package/docs/examples/functions/create-duplicate-deployment.md +3 -4
  113. package/docs/examples/functions/create-execution.md +2 -8
  114. package/docs/examples/functions/create-template-deployment.md +6 -7
  115. package/docs/examples/functions/create-variable.md +4 -5
  116. package/docs/examples/functions/create-vcs-deployment.md +4 -5
  117. package/docs/examples/functions/create.md +3 -18
  118. package/docs/examples/functions/delete-deployment.md +3 -3
  119. package/docs/examples/functions/delete-execution.md +3 -3
  120. package/docs/examples/functions/delete-variable.md +3 -3
  121. package/docs/examples/functions/delete.md +1 -1
  122. package/docs/examples/functions/get-deployment-download.md +3 -4
  123. package/docs/examples/functions/get-deployment.md +3 -3
  124. package/docs/examples/functions/get-execution.md +3 -3
  125. package/docs/examples/functions/get-template.md +2 -2
  126. package/docs/examples/functions/get-usage.md +2 -3
  127. package/docs/examples/functions/get-variable.md +3 -3
  128. package/docs/examples/functions/get.md +1 -1
  129. package/docs/examples/functions/list-deployments.md +2 -4
  130. package/docs/examples/functions/list-executions.md +2 -3
  131. package/docs/examples/functions/list-runtimes.md +1 -1
  132. package/docs/examples/functions/list-specifications.md +1 -1
  133. package/docs/examples/functions/list-templates.md +1 -5
  134. package/docs/examples/functions/list-usage.md +1 -2
  135. package/docs/examples/functions/list-variables.md +2 -2
  136. package/docs/examples/functions/list.md +1 -3
  137. package/docs/examples/functions/update-deployment-status.md +3 -3
  138. package/docs/examples/functions/update-function-deployment.md +3 -3
  139. package/docs/examples/functions/update-variable.md +4 -6
  140. package/docs/examples/functions/update.md +2 -18
  141. package/docs/examples/graphql/mutation.md +1 -1
  142. package/docs/examples/graphql/query.md +1 -1
  143. package/docs/examples/health/get-antivirus.md +1 -1
  144. package/docs/examples/health/get-cache.md +1 -1
  145. package/docs/examples/health/get-certificate.md +1 -2
  146. package/docs/examples/health/get-db.md +1 -0
  147. package/docs/examples/health/get-failed-jobs.md +2 -3
  148. package/docs/examples/health/get-pub-sub.md +1 -1
  149. package/docs/examples/health/get-queue-builds.md +1 -2
  150. package/docs/examples/health/get-queue-certificates.md +1 -2
  151. package/docs/examples/health/get-queue-databases.md +1 -3
  152. package/docs/examples/health/get-queue-deletes.md +1 -2
  153. package/docs/examples/health/get-queue-functions.md +1 -2
  154. package/docs/examples/health/get-queue-logs.md +1 -2
  155. package/docs/examples/health/get-queue-mails.md +1 -2
  156. package/docs/examples/health/get-queue-messaging.md +1 -2
  157. package/docs/examples/health/get-queue-migrations.md +1 -2
  158. package/docs/examples/health/get-queue-stats-resources.md +1 -2
  159. package/docs/examples/health/get-queue-usage.md +1 -2
  160. package/docs/examples/health/get-queue-webhooks.md +1 -2
  161. package/docs/examples/health/get-storage-local.md +1 -1
  162. package/docs/examples/health/get-storage.md +1 -1
  163. package/docs/examples/health/get-time.md +1 -1
  164. package/docs/examples/locale/list-codes.md +1 -1
  165. package/docs/examples/locale/list-continents.md +1 -1
  166. package/docs/examples/locale/list-countries-eu.md +1 -0
  167. package/docs/examples/locale/list-countries-phones.md +1 -1
  168. package/docs/examples/locale/list-countries.md +1 -1
  169. package/docs/examples/locale/list-currencies.md +1 -1
  170. package/docs/examples/locale/list-languages.md +1 -1
  171. package/docs/examples/messaging/create-apns-provider.md +3 -9
  172. package/docs/examples/messaging/create-email.md +4 -13
  173. package/docs/examples/messaging/create-fcm-provider.md +3 -5
  174. package/docs/examples/messaging/create-mailgun-provider.md +3 -11
  175. package/docs/examples/messaging/create-msg-91-provider.md +3 -0
  176. package/docs/examples/messaging/create-push.md +2 -20
  177. package/docs/examples/messaging/create-sendgrid-provider.md +3 -9
  178. package/docs/examples/messaging/create-sms.md +3 -8
  179. package/docs/examples/messaging/create-smtp-provider.md +4 -15
  180. package/docs/examples/messaging/create-subscriber.md +4 -4
  181. package/docs/examples/messaging/create-telesign-provider.md +3 -7
  182. package/docs/examples/messaging/create-textmagic-provider.md +3 -7
  183. package/docs/examples/messaging/create-topic.md +3 -4
  184. package/docs/examples/messaging/create-twilio-provider.md +3 -7
  185. package/docs/examples/messaging/create-vonage-provider.md +3 -7
  186. package/docs/examples/messaging/delete-provider.md +2 -2
  187. package/docs/examples/messaging/delete-subscriber.md +3 -3
  188. package/docs/examples/messaging/delete-topic.md +2 -2
  189. package/docs/examples/messaging/delete.md +1 -1
  190. package/docs/examples/messaging/get-message.md +2 -2
  191. package/docs/examples/messaging/get-provider.md +2 -2
  192. package/docs/examples/messaging/get-subscriber.md +3 -3
  193. package/docs/examples/messaging/get-topic.md +2 -2
  194. package/docs/examples/messaging/list-message-logs.md +2 -3
  195. package/docs/examples/messaging/list-messages.md +1 -3
  196. package/docs/examples/messaging/list-provider-logs.md +2 -3
  197. package/docs/examples/messaging/list-providers.md +1 -3
  198. package/docs/examples/messaging/list-subscriber-logs.md +2 -3
  199. package/docs/examples/messaging/list-subscribers.md +2 -4
  200. package/docs/examples/messaging/list-targets.md +2 -3
  201. package/docs/examples/messaging/list-topic-logs.md +2 -3
  202. package/docs/examples/messaging/list-topics.md +1 -3
  203. package/docs/examples/messaging/update-apns-provider.md +2 -9
  204. package/docs/examples/messaging/update-email.md +2 -13
  205. package/docs/examples/messaging/update-fcm-provider.md +2 -5
  206. package/docs/examples/messaging/update-mailgun-provider.md +2 -11
  207. package/docs/examples/messaging/update-msg-91-provider.md +2 -0
  208. package/docs/examples/messaging/update-push.md +2 -20
  209. package/docs/examples/messaging/update-sendgrid-provider.md +2 -9
  210. package/docs/examples/messaging/update-sms.md +2 -8
  211. package/docs/examples/messaging/update-smtp-provider.md +2 -15
  212. package/docs/examples/messaging/update-telesign-provider.md +2 -7
  213. package/docs/examples/messaging/update-textmagic-provider.md +2 -7
  214. package/docs/examples/messaging/update-topic.md +2 -4
  215. package/docs/examples/messaging/update-twilio-provider.md +2 -7
  216. package/docs/examples/messaging/update-vonage-provider.md +2 -7
  217. package/docs/examples/migrations/create-appwrite-migration.md +5 -5
  218. package/docs/examples/migrations/create-csv-migration.md +4 -4
  219. package/docs/examples/migrations/create-firebase-migration.md +3 -3
  220. package/docs/examples/migrations/create-n-host-migration.md +8 -9
  221. package/docs/examples/migrations/create-supabase-migration.md +7 -8
  222. package/docs/examples/migrations/delete.md +1 -1
  223. package/docs/examples/migrations/get-appwrite-report.md +5 -5
  224. package/docs/examples/migrations/get-firebase-report.md +3 -3
  225. package/docs/examples/migrations/get-n-host-report.md +8 -9
  226. package/docs/examples/migrations/get-supabase-report.md +7 -8
  227. package/docs/examples/migrations/get.md +1 -1
  228. package/docs/examples/migrations/list.md +1 -3
  229. package/docs/examples/migrations/retry.md +1 -1
  230. package/docs/examples/project/create-variable.md +3 -4
  231. package/docs/examples/project/delete-variable.md +2 -2
  232. package/docs/examples/project/get-usage.md +3 -4
  233. package/docs/examples/project/get-variable.md +2 -2
  234. package/docs/examples/project/list-variables.md +1 -1
  235. package/docs/examples/project/update-variable.md +3 -5
  236. package/docs/examples/projects/create-dev-key.md +4 -4
  237. package/docs/examples/projects/create-jwt.md +3 -0
  238. package/docs/examples/projects/create-key.md +4 -5
  239. package/docs/examples/projects/create-platform.md +4 -7
  240. package/docs/examples/projects/create-smtp-test.md +6 -11
  241. package/docs/examples/projects/create-webhook.md +6 -9
  242. package/docs/examples/projects/create.md +3 -13
  243. package/docs/examples/projects/delete-dev-key.md +3 -3
  244. package/docs/examples/projects/delete-email-template.md +4 -4
  245. package/docs/examples/projects/delete-key.md +3 -3
  246. package/docs/examples/projects/delete-platform.md +3 -3
  247. package/docs/examples/projects/delete-sms-template.md +4 -4
  248. package/docs/examples/projects/delete-webhook.md +3 -3
  249. package/docs/examples/projects/delete.md +1 -1
  250. package/docs/examples/projects/get-dev-key.md +3 -3
  251. package/docs/examples/projects/get-email-template.md +4 -4
  252. package/docs/examples/projects/get-key.md +3 -3
  253. package/docs/examples/projects/get-platform.md +3 -3
  254. package/docs/examples/projects/get-sms-template.md +4 -4
  255. package/docs/examples/projects/get-webhook.md +3 -3
  256. package/docs/examples/projects/get.md +1 -1
  257. package/docs/examples/projects/list-dev-keys.md +2 -3
  258. package/docs/examples/projects/list-keys.md +2 -2
  259. package/docs/examples/projects/list-platforms.md +2 -2
  260. package/docs/examples/projects/list-webhooks.md +2 -2
  261. package/docs/examples/projects/list.md +1 -3
  262. package/docs/examples/projects/update-api-status-all.md +3 -3
  263. package/docs/examples/projects/update-api-status.md +4 -4
  264. package/docs/examples/projects/update-auth-duration.md +3 -3
  265. package/docs/examples/projects/update-auth-limit.md +3 -3
  266. package/docs/examples/projects/update-auth-password-dictionary.md +3 -3
  267. package/docs/examples/projects/update-auth-password-history.md +3 -3
  268. package/docs/examples/projects/update-auth-sessions-limit.md +3 -3
  269. package/docs/examples/projects/update-auth-status.md +4 -4
  270. package/docs/examples/projects/update-dev-key.md +5 -5
  271. package/docs/examples/projects/update-email-template.md +6 -9
  272. package/docs/examples/projects/update-key.md +5 -6
  273. package/docs/examples/projects/update-memberships-privacy.md +5 -5
  274. package/docs/examples/projects/update-mock-numbers.md +3 -3
  275. package/docs/examples/projects/update-o-auth-2.md +3 -0
  276. package/docs/examples/projects/update-personal-data-check.md +3 -3
  277. package/docs/examples/projects/update-platform.md +4 -7
  278. package/docs/examples/projects/update-service-status-all.md +3 -3
  279. package/docs/examples/projects/update-service-status.md +4 -4
  280. package/docs/examples/projects/update-session-alerts.md +3 -3
  281. package/docs/examples/projects/update-session-invalidation.md +3 -0
  282. package/docs/examples/projects/update-sms-template.md +5 -5
  283. package/docs/examples/projects/update-smtp.md +3 -11
  284. package/docs/examples/projects/update-team.md +3 -3
  285. package/docs/examples/projects/update-webhook-signature.md +3 -3
  286. package/docs/examples/projects/update-webhook.md +7 -10
  287. package/docs/examples/projects/update.md +2 -11
  288. package/docs/examples/proxy/create-api-rule.md +2 -0
  289. package/docs/examples/proxy/create-function-rule.md +3 -4
  290. package/docs/examples/proxy/create-redirect-rule.md +6 -6
  291. package/docs/examples/proxy/create-site-rule.md +3 -4
  292. package/docs/examples/proxy/delete-rule.md +2 -2
  293. package/docs/examples/proxy/get-rule.md +2 -2
  294. package/docs/examples/proxy/list-rules.md +1 -3
  295. package/docs/examples/proxy/update-rule-verification.md +2 -2
  296. package/docs/examples/sites/create-deployment.md +4 -7
  297. package/docs/examples/sites/create-duplicate-deployment.md +3 -3
  298. package/docs/examples/sites/create-template-deployment.md +6 -7
  299. package/docs/examples/sites/create-variable.md +4 -5
  300. package/docs/examples/sites/create-vcs-deployment.md +4 -5
  301. package/docs/examples/sites/create.md +4 -18
  302. package/docs/examples/sites/delete-deployment.md +3 -3
  303. package/docs/examples/sites/delete-log.md +3 -3
  304. package/docs/examples/sites/delete-variable.md +3 -3
  305. package/docs/examples/sites/delete.md +1 -1
  306. package/docs/examples/sites/get-deployment-download.md +3 -4
  307. package/docs/examples/sites/get-deployment.md +3 -3
  308. package/docs/examples/sites/get-log.md +3 -3
  309. package/docs/examples/sites/get-template.md +2 -2
  310. package/docs/examples/sites/get-usage.md +2 -3
  311. package/docs/examples/sites/get-variable.md +3 -3
  312. package/docs/examples/sites/get.md +1 -1
  313. package/docs/examples/sites/list-deployments.md +2 -4
  314. package/docs/examples/sites/list-frameworks.md +1 -1
  315. package/docs/examples/sites/list-logs.md +2 -3
  316. package/docs/examples/sites/list-specifications.md +1 -1
  317. package/docs/examples/sites/list-templates.md +1 -5
  318. package/docs/examples/sites/list-usage.md +1 -2
  319. package/docs/examples/sites/list-variables.md +2 -2
  320. package/docs/examples/sites/list.md +1 -3
  321. package/docs/examples/sites/update-deployment-status.md +3 -3
  322. package/docs/examples/sites/update-site-deployment.md +3 -3
  323. package/docs/examples/sites/update-variable.md +4 -6
  324. package/docs/examples/sites/update.md +3 -18
  325. package/docs/examples/storage/create-bucket.md +3 -11
  326. package/docs/examples/storage/create-file.md +4 -5
  327. package/docs/examples/storage/delete-bucket.md +2 -2
  328. package/docs/examples/storage/delete-file.md +3 -3
  329. package/docs/examples/storage/get-bucket-usage.md +2 -3
  330. package/docs/examples/storage/get-bucket.md +2 -2
  331. package/docs/examples/storage/get-file-download.md +3 -4
  332. package/docs/examples/storage/get-file-preview.md +3 -15
  333. package/docs/examples/storage/get-file-view.md +3 -4
  334. package/docs/examples/storage/get-file.md +3 -3
  335. package/docs/examples/storage/get-usage.md +1 -2
  336. package/docs/examples/storage/list-buckets.md +1 -3
  337. package/docs/examples/storage/list-files.md +2 -4
  338. package/docs/examples/storage/update-bucket.md +3 -11
  339. package/docs/examples/storage/update-file.md +3 -5
  340. package/docs/examples/tablesdb/create-boolean-column.md +5 -0
  341. package/docs/examples/tablesdb/create-datetime-column.md +5 -0
  342. package/docs/examples/tablesdb/create-email-column.md +5 -0
  343. package/docs/examples/tablesdb/create-enum-column.md +6 -0
  344. package/docs/examples/tablesdb/create-float-column.md +5 -0
  345. package/docs/examples/tablesdb/create-index.md +6 -0
  346. package/docs/examples/tablesdb/create-integer-column.md +5 -0
  347. package/docs/examples/tablesdb/create-ip-column.md +5 -0
  348. package/docs/examples/tablesdb/create-relationship-column.md +5 -0
  349. package/docs/examples/tablesdb/create-row.md +5 -0
  350. package/docs/examples/tablesdb/create-rows.md +4 -0
  351. package/docs/examples/tablesdb/create-string-column.md +6 -0
  352. package/docs/examples/tablesdb/create-table.md +4 -0
  353. package/docs/examples/tablesdb/create-url-column.md +5 -0
  354. package/docs/examples/tablesdb/create.md +3 -0
  355. package/docs/examples/tablesdb/decrement-row-column.md +5 -0
  356. package/docs/examples/tablesdb/delete-column.md +4 -0
  357. package/docs/examples/tablesdb/delete-index.md +4 -0
  358. package/docs/examples/tablesdb/delete-row.md +4 -0
  359. package/docs/examples/tablesdb/delete-rows.md +3 -0
  360. package/docs/examples/tablesdb/delete-table.md +3 -0
  361. package/docs/examples/tablesdb/delete.md +2 -0
  362. package/docs/examples/tablesdb/get-column.md +4 -0
  363. package/docs/examples/tablesdb/get-index.md +4 -0
  364. package/docs/examples/tablesdb/get-row.md +4 -0
  365. package/docs/examples/tablesdb/get-table-usage.md +3 -0
  366. package/docs/examples/tablesdb/get-table.md +3 -0
  367. package/docs/examples/tablesdb/get-usage.md +2 -0
  368. package/docs/examples/tablesdb/get.md +2 -0
  369. package/docs/examples/tablesdb/increment-row-column.md +5 -0
  370. package/docs/examples/tablesdb/list-columns.md +3 -0
  371. package/docs/examples/tablesdb/list-indexes.md +3 -0
  372. package/docs/examples/tablesdb/list-row-logs.md +4 -0
  373. package/docs/examples/tablesdb/list-rows.md +3 -0
  374. package/docs/examples/tablesdb/list-table-logs.md +3 -0
  375. package/docs/examples/tablesdb/list-tables.md +2 -0
  376. package/docs/examples/tablesdb/list-usage.md +1 -0
  377. package/docs/examples/tablesdb/list.md +1 -0
  378. package/docs/examples/tablesdb/update-boolean-column.md +6 -0
  379. package/docs/examples/tablesdb/update-datetime-column.md +6 -0
  380. package/docs/examples/tablesdb/update-email-column.md +6 -0
  381. package/docs/examples/tablesdb/update-enum-column.md +7 -0
  382. package/docs/examples/tablesdb/update-float-column.md +6 -0
  383. package/docs/examples/tablesdb/update-integer-column.md +6 -0
  384. package/docs/examples/tablesdb/update-ip-column.md +6 -0
  385. package/docs/examples/tablesdb/update-relationship-column.md +4 -0
  386. package/docs/examples/tablesdb/update-row.md +4 -0
  387. package/docs/examples/tablesdb/update-rows.md +3 -0
  388. package/docs/examples/tablesdb/update-string-column.md +6 -0
  389. package/docs/examples/tablesdb/update-table.md +4 -0
  390. package/docs/examples/tablesdb/update-url-column.md +6 -0
  391. package/docs/examples/tablesdb/update.md +3 -0
  392. package/docs/examples/tablesdb/upsert-row.md +4 -0
  393. package/docs/examples/tablesdb/upsert-rows.md +4 -0
  394. package/docs/examples/teams/create-membership.md +3 -8
  395. package/docs/examples/teams/create.md +2 -3
  396. package/docs/examples/teams/delete-membership.md +3 -3
  397. package/docs/examples/teams/delete.md +1 -1
  398. package/docs/examples/teams/get-membership.md +3 -3
  399. package/docs/examples/teams/get-prefs.md +2 -2
  400. package/docs/examples/teams/get.md +1 -1
  401. package/docs/examples/teams/list-logs.md +2 -3
  402. package/docs/examples/teams/list-memberships.md +2 -4
  403. package/docs/examples/teams/list.md +1 -3
  404. package/docs/examples/teams/update-membership-status.md +5 -5
  405. package/docs/examples/teams/update-membership.md +4 -4
  406. package/docs/examples/teams/update-name.md +3 -3
  407. package/docs/examples/teams/update-prefs.md +3 -3
  408. package/docs/examples/tokens/create-file-token.md +3 -4
  409. package/docs/examples/tokens/delete.md +1 -1
  410. package/docs/examples/tokens/get.md +1 -1
  411. package/docs/examples/tokens/list.md +2 -3
  412. package/docs/examples/tokens/update.md +1 -2
  413. package/docs/examples/users/create-argon-2-user.md +4 -0
  414. package/docs/examples/users/create-bcrypt-user.md +4 -5
  415. package/docs/examples/users/create-jwt.md +2 -0
  416. package/docs/examples/users/create-md-5-user.md +4 -0
  417. package/docs/examples/users/create-mfa-recovery-codes.md +2 -2
  418. package/docs/examples/users/create-ph-pass-user.md +4 -0
  419. package/docs/examples/users/create-scrypt-modified-user.md +7 -8
  420. package/docs/examples/users/create-scrypt-user.md +9 -10
  421. package/docs/examples/users/create-session.md +2 -2
  422. package/docs/examples/users/create-sha-user.md +4 -0
  423. package/docs/examples/users/create-target.md +5 -7
  424. package/docs/examples/users/create-token.md +2 -4
  425. package/docs/examples/users/create.md +1 -5
  426. package/docs/examples/users/delete-identity.md +2 -2
  427. package/docs/examples/users/delete-mfa-authenticator.md +3 -3
  428. package/docs/examples/users/delete-session.md +3 -3
  429. package/docs/examples/users/delete-sessions.md +2 -2
  430. package/docs/examples/users/delete-target.md +3 -3
  431. package/docs/examples/users/delete.md +1 -1
  432. package/docs/examples/users/get-mfa-recovery-codes.md +2 -2
  433. package/docs/examples/users/get-prefs.md +2 -2
  434. package/docs/examples/users/get-target.md +3 -3
  435. package/docs/examples/users/get-usage.md +1 -2
  436. package/docs/examples/users/get.md +1 -1
  437. package/docs/examples/users/list-identities.md +1 -3
  438. package/docs/examples/users/list-logs.md +2 -3
  439. package/docs/examples/users/list-memberships.md +2 -4
  440. package/docs/examples/users/list-mfa-factors.md +2 -2
  441. package/docs/examples/users/list-sessions.md +2 -2
  442. package/docs/examples/users/list-targets.md +2 -3
  443. package/docs/examples/users/list.md +1 -3
  444. package/docs/examples/users/update-email-verification.md +3 -3
  445. package/docs/examples/users/update-email.md +3 -3
  446. package/docs/examples/users/update-labels.md +3 -3
  447. package/docs/examples/users/update-mfa-recovery-codes.md +2 -2
  448. package/docs/examples/users/update-mfa.md +3 -3
  449. package/docs/examples/users/update-name.md +3 -3
  450. package/docs/examples/users/update-password.md +3 -3
  451. package/docs/examples/users/update-phone-verification.md +3 -3
  452. package/docs/examples/users/update-phone.md +3 -3
  453. package/docs/examples/users/update-prefs.md +3 -3
  454. package/docs/examples/users/update-status.md +3 -3
  455. package/docs/examples/users/update-target.md +3 -6
  456. package/docs/examples/vcs/create-repository-detection.md +4 -5
  457. package/docs/examples/vcs/create-repository.md +4 -4
  458. package/docs/examples/vcs/delete-installation.md +2 -2
  459. package/docs/examples/vcs/get-installation.md +2 -2
  460. package/docs/examples/vcs/get-repository-contents.md +3 -5
  461. package/docs/examples/vcs/get-repository.md +3 -3
  462. package/docs/examples/vcs/list-installations.md +1 -3
  463. package/docs/examples/vcs/list-repositories.md +3 -4
  464. package/docs/examples/vcs/list-repository-branches.md +3 -3
  465. package/docs/examples/vcs/update-external-deployments.md +4 -4
  466. package/index.js +40 -0
  467. package/install.ps1 +2 -2
  468. package/install.sh +1 -1
  469. package/lib/client.js +3 -8
  470. package/lib/commands/account.js +55 -103
  471. package/lib/commands/avatars.js +1 -8
  472. package/lib/commands/console.js +1 -3
  473. package/lib/commands/databases.js +178 -233
  474. package/lib/commands/functions.js +3 -33
  475. package/lib/commands/graphql.js +1 -3
  476. package/lib/commands/health.js +1 -23
  477. package/lib/commands/init.js +1 -1
  478. package/lib/commands/locale.js +1 -9
  479. package/lib/commands/messaging.js +41 -87
  480. package/lib/commands/migrations.js +7 -15
  481. package/lib/commands/project.js +1 -7
  482. package/lib/commands/projects.js +77 -86
  483. package/lib/commands/proxy.js +1 -9
  484. package/lib/commands/pull.js +62 -1
  485. package/lib/commands/push.js +163 -8
  486. package/lib/commands/run.js +1 -1
  487. package/lib/commands/sites.js +3 -32
  488. package/lib/commands/storage.js +3 -18
  489. package/lib/commands/tables-db.js +2896 -0
  490. package/lib/commands/teams.js +1 -15
  491. package/lib/commands/tokens.js +1 -6
  492. package/lib/commands/update.js +218 -0
  493. package/lib/commands/users.js +32 -75
  494. package/lib/commands/vcs.js +1 -11
  495. package/lib/config.js +73 -0
  496. package/lib/parser.js +2 -1
  497. package/lib/questions.js +32 -7
  498. package/lib/utils.js +39 -2
  499. package/package.json +1 -1
  500. package/scoop/{appwrite.json → appwrite.config.json} +3 -3
  501. package/docs/examples/account/create-j-w-t.md +0 -1
  502. package/docs/examples/account/create-magic-u-r-l-token.md +0 -5
  503. package/docs/examples/account/create-o-auth2session.md +0 -5
  504. package/docs/examples/account/create-o-auth2token.md +0 -5
  505. package/docs/examples/account/update-m-f-a.md +0 -2
  506. package/docs/examples/account/update-magic-u-r-l-session.md +0 -3
  507. package/docs/examples/avatars/get-q-r.md +0 -5
  508. package/docs/examples/databases/get-database-usage.md +0 -3
  509. package/docs/examples/health/get-d-b.md +0 -1
  510. package/docs/examples/locale/list-countries-e-u.md +0 -1
  511. package/docs/examples/messaging/create-msg91provider.md +0 -7
  512. package/docs/examples/messaging/update-msg91provider.md +0 -7
  513. package/docs/examples/projects/create-j-w-t.md +0 -4
  514. package/docs/examples/projects/update-o-auth2.md +0 -6
  515. package/docs/examples/proxy/create-a-p-i-rule.md +0 -2
  516. package/docs/examples/users/create-argon2user.md +0 -5
  517. package/docs/examples/users/create-j-w-t.md +0 -4
  518. package/docs/examples/users/create-m-d5user.md +0 -5
  519. package/docs/examples/users/create-p-h-pass-user.md +0 -5
  520. package/docs/examples/users/create-s-h-a-user.md +0 -6
@@ -7,7 +7,7 @@ const libClient = require('../client.js');
7
7
  const { getAllFiles, showConsoleLink } = require('../utils.js');
8
8
  const { Command } = require('commander');
9
9
  const { sdkForProject, sdkForConsole } = require('../sdks')
10
- const { parse, actionRunner, parseInteger, parseBool, commandDescriptions, success, log } = require('../parser')
10
+ const { parse, actionRunner, parseInteger, parseBool, commandDescriptions, success, log, warn } = require('../parser')
11
11
  const { localConfig, globalConfig } = require("../config");
12
12
  const { File } = require('undici');
13
13
  const { ReadableStream } = require('stream/web');
@@ -79,7 +79,6 @@ const usersList = async ({queries,search,parseOutput = true, overrideForCli = fa
79
79
  return response;
80
80
 
81
81
  }
82
-
83
82
  /**
84
83
  * @typedef {Object} UsersCreateRequestParams
85
84
  * @property {string} userId User 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.
@@ -129,7 +128,6 @@ const usersCreate = async ({userId,email,phone,password,name,parseOutput = true,
129
128
  return response;
130
129
 
131
130
  }
132
-
133
131
  /**
134
132
  * @typedef {Object} UsersCreateArgon2UserRequestParams
135
133
  * @property {string} userId User 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.
@@ -175,7 +173,6 @@ const usersCreateArgon2User = async ({userId,email,password,name,parseOutput = t
175
173
  return response;
176
174
 
177
175
  }
178
-
179
176
  /**
180
177
  * @typedef {Object} UsersCreateBcryptUserRequestParams
181
178
  * @property {string} userId User 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.
@@ -221,7 +218,6 @@ const usersCreateBcryptUser = async ({userId,email,password,name,parseOutput = t
221
218
  return response;
222
219
 
223
220
  }
224
-
225
221
  /**
226
222
  * @typedef {Object} UsersListIdentitiesRequestParams
227
223
  * @property {string[]} queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, provider, providerUid, providerEmail, providerAccessTokenExpiry
@@ -258,7 +254,6 @@ const usersListIdentities = async ({queries,search,parseOutput = true, overrideF
258
254
  return response;
259
255
 
260
256
  }
261
-
262
257
  /**
263
258
  * @typedef {Object} UsersDeleteIdentityRequestParams
264
259
  * @property {string} identityId Identity ID.
@@ -289,7 +284,6 @@ const usersDeleteIdentity = async ({identityId,parseOutput = true, overrideForCl
289
284
  return response;
290
285
 
291
286
  }
292
-
293
287
  /**
294
288
  * @typedef {Object} UsersCreateMD5UserRequestParams
295
289
  * @property {string} userId User 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.
@@ -335,7 +329,6 @@ const usersCreateMD5User = async ({userId,email,password,name,parseOutput = true
335
329
  return response;
336
330
 
337
331
  }
338
-
339
332
  /**
340
333
  * @typedef {Object} UsersCreatePHPassUserRequestParams
341
334
  * @property {string} userId User ID. Choose a custom ID or pass the string 'ID.unique()'to auto generate it. 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.
@@ -381,7 +374,6 @@ const usersCreatePHPassUser = async ({userId,email,password,name,parseOutput = t
381
374
  return response;
382
375
 
383
376
  }
384
-
385
377
  /**
386
378
  * @typedef {Object} UsersCreateScryptUserRequestParams
387
379
  * @property {string} userId User 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.
@@ -447,7 +439,6 @@ const usersCreateScryptUser = async ({userId,email,password,passwordSalt,passwor
447
439
  return response;
448
440
 
449
441
  }
450
-
451
442
  /**
452
443
  * @typedef {Object} UsersCreateScryptModifiedUserRequestParams
453
444
  * @property {string} userId User 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.
@@ -505,7 +496,6 @@ const usersCreateScryptModifiedUser = async ({userId,email,password,passwordSalt
505
496
  return response;
506
497
 
507
498
  }
508
-
509
499
  /**
510
500
  * @typedef {Object} UsersCreateSHAUserRequestParams
511
501
  * @property {string} userId User 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.
@@ -555,10 +545,9 @@ const usersCreateSHAUser = async ({userId,email,password,passwordVersion,name,pa
555
545
  return response;
556
546
 
557
547
  }
558
-
559
548
  /**
560
549
  * @typedef {Object} UsersGetUsageRequestParams
561
- * @property {UserUsageRange} range Date range.
550
+ * @property {UsageRange} range Date range.
562
551
  * @property {boolean} overrideForCli
563
552
  * @property {boolean} parseOutput
564
553
  * @property {libClient | undefined} sdk
@@ -588,7 +577,6 @@ const usersGetUsage = async ({range,parseOutput = true, overrideForCli = false,
588
577
  return response;
589
578
 
590
579
  }
591
-
592
580
  /**
593
581
  * @typedef {Object} UsersGetRequestParams
594
582
  * @property {string} userId User ID.
@@ -622,7 +610,6 @@ const usersGet = async ({userId,parseOutput = true, overrideForCli = false, sdk
622
610
  return response;
623
611
 
624
612
  }
625
-
626
613
  /**
627
614
  * @typedef {Object} UsersDeleteRequestParams
628
615
  * @property {string} userId User ID.
@@ -653,7 +640,6 @@ const usersDelete = async ({userId,parseOutput = true, overrideForCli = false, s
653
640
  return response;
654
641
 
655
642
  }
656
-
657
643
  /**
658
644
  * @typedef {Object} UsersUpdateEmailRequestParams
659
645
  * @property {string} userId User ID.
@@ -688,7 +674,6 @@ const usersUpdateEmail = async ({userId,email,parseOutput = true, overrideForCli
688
674
  return response;
689
675
 
690
676
  }
691
-
692
677
  /**
693
678
  * @typedef {Object} UsersCreateJWTRequestParams
694
679
  * @property {string} userId User ID.
@@ -727,7 +712,6 @@ const usersCreateJWT = async ({userId,sessionId,duration,parseOutput = true, ove
727
712
  return response;
728
713
 
729
714
  }
730
-
731
715
  /**
732
716
  * @typedef {Object} UsersUpdateLabelsRequestParams
733
717
  * @property {string} userId User ID.
@@ -763,7 +747,6 @@ const usersUpdateLabels = async ({userId,labels,parseOutput = true, overrideForC
763
747
  return response;
764
748
 
765
749
  }
766
-
767
750
  /**
768
751
  * @typedef {Object} UsersListLogsRequestParams
769
752
  * @property {string} userId User ID.
@@ -797,7 +780,6 @@ const usersListLogs = async ({userId,queries,parseOutput = true, overrideForCli
797
780
  return response;
798
781
 
799
782
  }
800
-
801
783
  /**
802
784
  * @typedef {Object} UsersListMembershipsRequestParams
803
785
  * @property {string} userId User ID.
@@ -835,9 +817,8 @@ const usersListMemberships = async ({userId,queries,search,parseOutput = true, o
835
817
  return response;
836
818
 
837
819
  }
838
-
839
820
  /**
840
- * @typedef {Object} UsersUpdateMfaRequestParams
821
+ * @typedef {Object} UsersUpdateMFARequestParams
841
822
  * @property {string} userId User ID.
842
823
  * @property {boolean} mfa Enable or disable MFA.
843
824
  * @property {boolean} overrideForCli
@@ -846,9 +827,9 @@ const usersListMemberships = async ({userId,queries,search,parseOutput = true, o
846
827
  */
847
828
 
848
829
  /**
849
- * @param {UsersUpdateMfaRequestParams} params
830
+ * @param {UsersUpdateMFARequestParams} params
850
831
  */
851
- const usersUpdateMfa = async ({userId,mfa,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
832
+ const usersUpdateMFA = async ({userId,mfa,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
852
833
  let client = !sdk ? await sdkForProject() :
853
834
  sdk;
854
835
  let apiPath = '/users/{userId}/mfa'.replace('{userId}', userId);
@@ -870,9 +851,8 @@ const usersUpdateMfa = async ({userId,mfa,parseOutput = true, overrideForCli = f
870
851
  return response;
871
852
 
872
853
  }
873
-
874
854
  /**
875
- * @typedef {Object} UsersDeleteMfaAuthenticatorRequestParams
855
+ * @typedef {Object} UsersDeleteMFAAuthenticatorRequestParams
876
856
  * @property {string} userId User ID.
877
857
  * @property {AuthenticatorType} type Type of authenticator.
878
858
  * @property {boolean} overrideForCli
@@ -881,9 +861,9 @@ const usersUpdateMfa = async ({userId,mfa,parseOutput = true, overrideForCli = f
881
861
  */
882
862
 
883
863
  /**
884
- * @param {UsersDeleteMfaAuthenticatorRequestParams} params
864
+ * @param {UsersDeleteMFAAuthenticatorRequestParams} params
885
865
  */
886
- const usersDeleteMfaAuthenticator = async ({userId,type,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
866
+ const usersDeleteMFAAuthenticator = async ({userId,type,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
887
867
  let client = !sdk ? await sdkForProject() :
888
868
  sdk;
889
869
  let apiPath = '/users/{userId}/mfa/authenticators/{type}'.replace('{userId}', userId).replace('{type}', type);
@@ -902,9 +882,8 @@ const usersDeleteMfaAuthenticator = async ({userId,type,parseOutput = true, over
902
882
  return response;
903
883
 
904
884
  }
905
-
906
885
  /**
907
- * @typedef {Object} UsersListMfaFactorsRequestParams
886
+ * @typedef {Object} UsersListMFAFactorsRequestParams
908
887
  * @property {string} userId User ID.
909
888
  * @property {boolean} overrideForCli
910
889
  * @property {boolean} parseOutput
@@ -912,9 +891,9 @@ const usersDeleteMfaAuthenticator = async ({userId,type,parseOutput = true, over
912
891
  */
913
892
 
914
893
  /**
915
- * @param {UsersListMfaFactorsRequestParams} params
894
+ * @param {UsersListMFAFactorsRequestParams} params
916
895
  */
917
- const usersListMfaFactors = async ({userId,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
896
+ const usersListMFAFactors = async ({userId,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
918
897
  let client = !sdk ? await sdkForProject() :
919
898
  sdk;
920
899
  let apiPath = '/users/{userId}/mfa/factors'.replace('{userId}', userId);
@@ -932,9 +911,8 @@ const usersListMfaFactors = async ({userId,parseOutput = true, overrideForCli =
932
911
  return response;
933
912
 
934
913
  }
935
-
936
914
  /**
937
- * @typedef {Object} UsersGetMfaRecoveryCodesRequestParams
915
+ * @typedef {Object} UsersGetMFARecoveryCodesRequestParams
938
916
  * @property {string} userId User ID.
939
917
  * @property {boolean} overrideForCli
940
918
  * @property {boolean} parseOutput
@@ -942,9 +920,9 @@ const usersListMfaFactors = async ({userId,parseOutput = true, overrideForCli =
942
920
  */
943
921
 
944
922
  /**
945
- * @param {UsersGetMfaRecoveryCodesRequestParams} params
923
+ * @param {UsersGetMFARecoveryCodesRequestParams} params
946
924
  */
947
- const usersGetMfaRecoveryCodes = async ({userId,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
925
+ const usersGetMFARecoveryCodes = async ({userId,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
948
926
  let client = !sdk ? await sdkForProject() :
949
927
  sdk;
950
928
  let apiPath = '/users/{userId}/mfa/recovery-codes'.replace('{userId}', userId);
@@ -962,9 +940,8 @@ const usersGetMfaRecoveryCodes = async ({userId,parseOutput = true, overrideForC
962
940
  return response;
963
941
 
964
942
  }
965
-
966
943
  /**
967
- * @typedef {Object} UsersUpdateMfaRecoveryCodesRequestParams
944
+ * @typedef {Object} UsersUpdateMFARecoveryCodesRequestParams
968
945
  * @property {string} userId User ID.
969
946
  * @property {boolean} overrideForCli
970
947
  * @property {boolean} parseOutput
@@ -972,9 +949,9 @@ const usersGetMfaRecoveryCodes = async ({userId,parseOutput = true, overrideForC
972
949
  */
973
950
 
974
951
  /**
975
- * @param {UsersUpdateMfaRecoveryCodesRequestParams} params
952
+ * @param {UsersUpdateMFARecoveryCodesRequestParams} params
976
953
  */
977
- const usersUpdateMfaRecoveryCodes = async ({userId,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
954
+ const usersUpdateMFARecoveryCodes = async ({userId,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
978
955
  let client = !sdk ? await sdkForProject() :
979
956
  sdk;
980
957
  let apiPath = '/users/{userId}/mfa/recovery-codes'.replace('{userId}', userId);
@@ -993,9 +970,8 @@ const usersUpdateMfaRecoveryCodes = async ({userId,parseOutput = true, overrideF
993
970
  return response;
994
971
 
995
972
  }
996
-
997
973
  /**
998
- * @typedef {Object} UsersCreateMfaRecoveryCodesRequestParams
974
+ * @typedef {Object} UsersCreateMFARecoveryCodesRequestParams
999
975
  * @property {string} userId User ID.
1000
976
  * @property {boolean} overrideForCli
1001
977
  * @property {boolean} parseOutput
@@ -1003,9 +979,9 @@ const usersUpdateMfaRecoveryCodes = async ({userId,parseOutput = true, overrideF
1003
979
  */
1004
980
 
1005
981
  /**
1006
- * @param {UsersCreateMfaRecoveryCodesRequestParams} params
982
+ * @param {UsersCreateMFARecoveryCodesRequestParams} params
1007
983
  */
1008
- const usersCreateMfaRecoveryCodes = async ({userId,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
984
+ const usersCreateMFARecoveryCodes = async ({userId,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
1009
985
  let client = !sdk ? await sdkForProject() :
1010
986
  sdk;
1011
987
  let apiPath = '/users/{userId}/mfa/recovery-codes'.replace('{userId}', userId);
@@ -1024,7 +1000,6 @@ const usersCreateMfaRecoveryCodes = async ({userId,parseOutput = true, overrideF
1024
1000
  return response;
1025
1001
 
1026
1002
  }
1027
-
1028
1003
  /**
1029
1004
  * @typedef {Object} UsersUpdateNameRequestParams
1030
1005
  * @property {string} userId User ID.
@@ -1059,7 +1034,6 @@ const usersUpdateName = async ({userId,name,parseOutput = true, overrideForCli =
1059
1034
  return response;
1060
1035
 
1061
1036
  }
1062
-
1063
1037
  /**
1064
1038
  * @typedef {Object} UsersUpdatePasswordRequestParams
1065
1039
  * @property {string} userId User ID.
@@ -1094,7 +1068,6 @@ const usersUpdatePassword = async ({userId,password,parseOutput = true, override
1094
1068
  return response;
1095
1069
 
1096
1070
  }
1097
-
1098
1071
  /**
1099
1072
  * @typedef {Object} UsersUpdatePhoneRequestParams
1100
1073
  * @property {string} userId User ID.
@@ -1129,7 +1102,6 @@ const usersUpdatePhone = async ({userId,number,parseOutput = true, overrideForCl
1129
1102
  return response;
1130
1103
 
1131
1104
  }
1132
-
1133
1105
  /**
1134
1106
  * @typedef {Object} UsersGetPrefsRequestParams
1135
1107
  * @property {string} userId User ID.
@@ -1159,7 +1131,6 @@ const usersGetPrefs = async ({userId,parseOutput = true, overrideForCli = false,
1159
1131
  return response;
1160
1132
 
1161
1133
  }
1162
-
1163
1134
  /**
1164
1135
  * @typedef {Object} UsersUpdatePrefsRequestParams
1165
1136
  * @property {string} userId User ID.
@@ -1194,7 +1165,6 @@ const usersUpdatePrefs = async ({userId,prefs,parseOutput = true, overrideForCli
1194
1165
  return response;
1195
1166
 
1196
1167
  }
1197
-
1198
1168
  /**
1199
1169
  * @typedef {Object} UsersListSessionsRequestParams
1200
1170
  * @property {string} userId User ID.
@@ -1228,7 +1198,6 @@ const usersListSessions = async ({userId,parseOutput = true, overrideForCli = fa
1228
1198
  return response;
1229
1199
 
1230
1200
  }
1231
-
1232
1201
  /**
1233
1202
  * @typedef {Object} UsersCreateSessionRequestParams
1234
1203
  * @property {string} userId User 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.
@@ -1259,7 +1228,6 @@ const usersCreateSession = async ({userId,parseOutput = true, overrideForCli = f
1259
1228
  return response;
1260
1229
 
1261
1230
  }
1262
-
1263
1231
  /**
1264
1232
  * @typedef {Object} UsersDeleteSessionsRequestParams
1265
1233
  * @property {string} userId User ID.
@@ -1290,7 +1258,6 @@ const usersDeleteSessions = async ({userId,parseOutput = true, overrideForCli =
1290
1258
  return response;
1291
1259
 
1292
1260
  }
1293
-
1294
1261
  /**
1295
1262
  * @typedef {Object} UsersDeleteSessionRequestParams
1296
1263
  * @property {string} userId User ID.
@@ -1322,7 +1289,6 @@ const usersDeleteSession = async ({userId,sessionId,parseOutput = true, override
1322
1289
  return response;
1323
1290
 
1324
1291
  }
1325
-
1326
1292
  /**
1327
1293
  * @typedef {Object} UsersUpdateStatusRequestParams
1328
1294
  * @property {string} userId User ID.
@@ -1357,7 +1323,6 @@ const usersUpdateStatus = async ({userId,status,parseOutput = true, overrideForC
1357
1323
  return response;
1358
1324
 
1359
1325
  }
1360
-
1361
1326
  /**
1362
1327
  * @typedef {Object} UsersListTargetsRequestParams
1363
1328
  * @property {string} userId User ID.
@@ -1391,7 +1356,6 @@ const usersListTargets = async ({userId,queries,parseOutput = true, overrideForC
1391
1356
  return response;
1392
1357
 
1393
1358
  }
1394
-
1395
1359
  /**
1396
1360
  * @typedef {Object} UsersCreateTargetRequestParams
1397
1361
  * @property {string} userId User ID.
@@ -1442,7 +1406,6 @@ const usersCreateTarget = async ({userId,targetId,providerType,identifier,provid
1442
1406
  return response;
1443
1407
 
1444
1408
  }
1445
-
1446
1409
  /**
1447
1410
  * @typedef {Object} UsersGetTargetRequestParams
1448
1411
  * @property {string} userId User ID.
@@ -1473,7 +1436,6 @@ const usersGetTarget = async ({userId,targetId,parseOutput = true, overrideForCl
1473
1436
  return response;
1474
1437
 
1475
1438
  }
1476
-
1477
1439
  /**
1478
1440
  * @typedef {Object} UsersUpdateTargetRequestParams
1479
1441
  * @property {string} userId User ID.
@@ -1517,7 +1479,6 @@ const usersUpdateTarget = async ({userId,targetId,identifier,providerId,name,par
1517
1479
  return response;
1518
1480
 
1519
1481
  }
1520
-
1521
1482
  /**
1522
1483
  * @typedef {Object} UsersDeleteTargetRequestParams
1523
1484
  * @property {string} userId User ID.
@@ -1549,7 +1510,6 @@ const usersDeleteTarget = async ({userId,targetId,parseOutput = true, overrideFo
1549
1510
  return response;
1550
1511
 
1551
1512
  }
1552
-
1553
1513
  /**
1554
1514
  * @typedef {Object} UsersCreateTokenRequestParams
1555
1515
  * @property {string} userId User ID.
@@ -1588,7 +1548,6 @@ const usersCreateToken = async ({userId,length,expire,parseOutput = true, overri
1588
1548
  return response;
1589
1549
 
1590
1550
  }
1591
-
1592
1551
  /**
1593
1552
  * @typedef {Object} UsersUpdateEmailVerificationRequestParams
1594
1553
  * @property {string} userId User ID.
@@ -1623,7 +1582,6 @@ const usersUpdateEmailVerification = async ({userId,emailVerification,parseOutpu
1623
1582
  return response;
1624
1583
 
1625
1584
  }
1626
-
1627
1585
  /**
1628
1586
  * @typedef {Object} UsersUpdatePhoneVerificationRequestParams
1629
1587
  * @property {string} userId User ID.
@@ -1658,7 +1616,6 @@ const usersUpdatePhoneVerification = async ({userId,phoneVerification,parseOutpu
1658
1616
  return response;
1659
1617
 
1660
1618
  }
1661
-
1662
1619
  users
1663
1620
  .command(`list`)
1664
1621
  .description(`Get a list of all the project's users. You can use the query params to filter your results.`)
@@ -1823,38 +1780,38 @@ users
1823
1780
  .description(`Enable or disable MFA on a user account.`)
1824
1781
  .requiredOption(`--user-id <user-id>`, `User ID.`)
1825
1782
  .requiredOption(`--mfa [value]`, `Enable or disable MFA.`, (value) => value === undefined ? true : parseBool(value))
1826
- .action(actionRunner(usersUpdateMfa))
1783
+ .action(actionRunner(usersUpdateMFA))
1827
1784
 
1828
1785
  users
1829
1786
  .command(`delete-mfa-authenticator`)
1830
1787
  .description(`Delete an authenticator app.`)
1831
1788
  .requiredOption(`--user-id <user-id>`, `User ID.`)
1832
1789
  .requiredOption(`--type <type>`, `Type of authenticator.`)
1833
- .action(actionRunner(usersDeleteMfaAuthenticator))
1790
+ .action(actionRunner(usersDeleteMFAAuthenticator))
1834
1791
 
1835
1792
  users
1836
1793
  .command(`list-mfa-factors`)
1837
1794
  .description(`List the factors available on the account to be used as a MFA challange.`)
1838
1795
  .requiredOption(`--user-id <user-id>`, `User ID.`)
1839
- .action(actionRunner(usersListMfaFactors))
1796
+ .action(actionRunner(usersListMFAFactors))
1840
1797
 
1841
1798
  users
1842
1799
  .command(`get-mfa-recovery-codes`)
1843
1800
  .description(`Get recovery codes that can be used as backup for MFA flow by User ID. Before getting codes, they must be generated using [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes) method.`)
1844
1801
  .requiredOption(`--user-id <user-id>`, `User ID.`)
1845
- .action(actionRunner(usersGetMfaRecoveryCodes))
1802
+ .action(actionRunner(usersGetMFARecoveryCodes))
1846
1803
 
1847
1804
  users
1848
1805
  .command(`update-mfa-recovery-codes`)
1849
1806
  .description(`Regenerate recovery codes that can be used as backup for MFA flow by User ID. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes) method.`)
1850
1807
  .requiredOption(`--user-id <user-id>`, `User ID.`)
1851
- .action(actionRunner(usersUpdateMfaRecoveryCodes))
1808
+ .action(actionRunner(usersUpdateMFARecoveryCodes))
1852
1809
 
1853
1810
  users
1854
1811
  .command(`create-mfa-recovery-codes`)
1855
1812
  .description(`Generate recovery codes used as backup for MFA flow for User ID. Recovery codes can be used as a MFA verification type in [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge) method by client SDK.`)
1856
1813
  .requiredOption(`--user-id <user-id>`, `User ID.`)
1857
- .action(actionRunner(usersCreateMfaRecoveryCodes))
1814
+ .action(actionRunner(usersCreateMFARecoveryCodes))
1858
1815
 
1859
1816
  users
1860
1817
  .command(`update-name`)
@@ -2008,12 +1965,12 @@ module.exports = {
2008
1965
  usersUpdateLabels,
2009
1966
  usersListLogs,
2010
1967
  usersListMemberships,
2011
- usersUpdateMfa,
2012
- usersDeleteMfaAuthenticator,
2013
- usersListMfaFactors,
2014
- usersGetMfaRecoveryCodes,
2015
- usersUpdateMfaRecoveryCodes,
2016
- usersCreateMfaRecoveryCodes,
1968
+ usersUpdateMFA,
1969
+ usersDeleteMFAAuthenticator,
1970
+ usersListMFAFactors,
1971
+ usersGetMFARecoveryCodes,
1972
+ usersUpdateMFARecoveryCodes,
1973
+ usersCreateMFARecoveryCodes,
2017
1974
  usersUpdateName,
2018
1975
  usersUpdatePassword,
2019
1976
  usersUpdatePhone,
@@ -7,7 +7,7 @@ const libClient = require('../client.js');
7
7
  const { getAllFiles, showConsoleLink } = require('../utils.js');
8
8
  const { Command } = require('commander');
9
9
  const { sdkForProject, sdkForConsole } = require('../sdks')
10
- const { parse, actionRunner, parseInteger, parseBool, commandDescriptions, success, log } = require('../parser')
10
+ const { parse, actionRunner, parseInteger, parseBool, commandDescriptions, success, log, warn } = require('../parser')
11
11
  const { localConfig, globalConfig } = require("../config");
12
12
  const { File } = require('undici');
13
13
  const { ReadableStream } = require('stream/web');
@@ -81,7 +81,6 @@ const vcsCreateRepositoryDetection = async ({installationId,providerRepositoryId
81
81
  return response;
82
82
 
83
83
  }
84
-
85
84
  /**
86
85
  * @typedef {Object} VcsListRepositoriesRequestParams
87
86
  * @property {string} installationId Installation Id
@@ -119,7 +118,6 @@ const vcsListRepositories = async ({installationId,type,search,parseOutput = tru
119
118
  return response;
120
119
 
121
120
  }
122
-
123
121
  /**
124
122
  * @typedef {Object} VcsCreateRepositoryRequestParams
125
123
  * @property {string} installationId Installation Id
@@ -158,7 +156,6 @@ const vcsCreateRepository = async ({installationId,name,xprivate,parseOutput = t
158
156
  return response;
159
157
 
160
158
  }
161
-
162
159
  /**
163
160
  * @typedef {Object} VcsGetRepositoryRequestParams
164
161
  * @property {string} installationId Installation Id
@@ -189,7 +186,6 @@ const vcsGetRepository = async ({installationId,providerRepositoryId,parseOutput
189
186
  return response;
190
187
 
191
188
  }
192
-
193
189
  /**
194
190
  * @typedef {Object} VcsListRepositoryBranchesRequestParams
195
191
  * @property {string} installationId Installation Id
@@ -220,7 +216,6 @@ const vcsListRepositoryBranches = async ({installationId,providerRepositoryId,pa
220
216
  return response;
221
217
 
222
218
  }
223
-
224
219
  /**
225
220
  * @typedef {Object} VcsGetRepositoryContentsRequestParams
226
221
  * @property {string} installationId Installation Id
@@ -259,7 +254,6 @@ const vcsGetRepositoryContents = async ({installationId,providerRepositoryId,pro
259
254
  return response;
260
255
 
261
256
  }
262
-
263
257
  /**
264
258
  * @typedef {Object} VcsUpdateExternalDeploymentsRequestParams
265
259
  * @property {string} installationId Installation Id
@@ -295,7 +289,6 @@ const vcsUpdateExternalDeployments = async ({installationId,repositoryId,provide
295
289
  return response;
296
290
 
297
291
  }
298
-
299
292
  /**
300
293
  * @typedef {Object} VcsListInstallationsRequestParams
301
294
  * @property {string[]} queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: provider, organization
@@ -332,7 +325,6 @@ const vcsListInstallations = async ({queries,search,parseOutput = true, override
332
325
  return response;
333
326
 
334
327
  }
335
-
336
328
  /**
337
329
  * @typedef {Object} VcsGetInstallationRequestParams
338
330
  * @property {string} installationId Installation Id
@@ -362,7 +354,6 @@ const vcsGetInstallation = async ({installationId,parseOutput = true, overrideFo
362
354
  return response;
363
355
 
364
356
  }
365
-
366
357
  /**
367
358
  * @typedef {Object} VcsDeleteInstallationRequestParams
368
359
  * @property {string} installationId Installation Id
@@ -393,7 +384,6 @@ const vcsDeleteInstallation = async ({installationId,parseOutput = true, overrid
393
384
  return response;
394
385
 
395
386
  }
396
-
397
387
  vcs
398
388
  .command(`create-repository-detection`)
399
389
  .description(`Analyze a GitHub repository to automatically detect the programming language and runtime environment. This endpoint scans the repository's files and language statistics to determine the appropriate runtime settings for your function. The GitHub installation must be properly configured and the repository must be accessible through your installation for this endpoint to work.`)
package/lib/config.js CHANGED
@@ -9,6 +9,7 @@ const KeysSite = new Set(["path", "$id", "name", "enabled", "logging", "timeout"
9
9
  const KeysFunction = new Set(["path", "$id", "execute", "name", "enabled", "logging", "runtime", "specification", "scopes", "events", "schedule", "timeout", "entrypoint", "commands", "vars"]);
10
10
  const KeysDatabase = new Set(["$id", "name", "enabled"]);
11
11
  const KeysCollection = new Set(["$id", "$permissions", "databaseId", "name", "enabled", "documentSecurity", "attributes", "indexes"]);
12
+ const KeysTable = new Set(["$id", "$permissions", "databaseId", "name", "enabled", "documentSecurity", "columns", "indexes"]);
12
13
  const KeysStorage = new Set(["$id", "$permissions", "fileSecurity", "name", "enabled", "maximumFileSize", "allowedFileExtensions", "compression", "encryption", "antivirus"]);
13
14
  const KeysTopics = new Set(["$id", "name", "subscribe"]);
14
15
  const KeysTeams = new Set(["$id", "name"]);
@@ -39,6 +40,33 @@ const KeysAttributes = new Set([
39
40
  // Strings
40
41
  "encrypt",
41
42
  ]);
43
+ const KeysColumns = new Set([
44
+ "key",
45
+ "type",
46
+ "required",
47
+ "array",
48
+ "size",
49
+ "default",
50
+ // integer and float
51
+ "min",
52
+ "max",
53
+ // email, enum, URL, IP, and datetime
54
+ "format",
55
+ // enum
56
+ "elements",
57
+ // relationship
58
+ "relatedCollection",
59
+ "relationType",
60
+ "twoWay",
61
+ "twoWayKey",
62
+ "onDelete",
63
+ "side",
64
+ // Indexes
65
+ "attributes",
66
+ "orders",
67
+ // Strings
68
+ "encrypt",
69
+ ]);
42
70
  const KeyIndexes = new Set(["key", "type", "status", "attributes", "orders"]);
43
71
 
44
72
  function whitelistKeys(value, keys, nestedKeys = {}) {
@@ -310,6 +338,50 @@ class Local extends Config {
310
338
  this.set("collections", collections);
311
339
  }
312
340
 
341
+ getTables() {
342
+ if (!this.has("tables")) {
343
+ return [];
344
+ }
345
+ return this.get("tables");
346
+ }
347
+
348
+ getTable($id) {
349
+ if (!this.has("tables")) {
350
+ return {};
351
+ }
352
+
353
+ let tables = this.get("tables");
354
+ for (let i = 0; i < tables.length; i++) {
355
+ if (tables[i]['$id'] == $id) {
356
+ return tables[i];
357
+ }
358
+ }
359
+
360
+ return {};
361
+ }
362
+
363
+ addTable(props) {
364
+ props = whitelistKeys(props, KeysTable, {
365
+ columns: KeysColumns,
366
+ indexes: KeyIndexes
367
+ });
368
+
369
+ if (!this.has("tables")) {
370
+ this.set("tables", []);
371
+ }
372
+
373
+ let tables = this.get("tables");
374
+ for (let i = 0; i < tables.length; i++) {
375
+ if (tables[i]['$id'] == props['$id'] && tables[i]['databaseId'] == props['databaseId']) {
376
+ tables[i] = props;
377
+ this.set("tables", tables);
378
+ return;
379
+ }
380
+ }
381
+ tables.push(props);
382
+ this.set("tables", tables);
383
+ }
384
+
313
385
  getBuckets() {
314
386
  if (!this.has("buckets")) {
315
387
  return [];
@@ -713,5 +785,6 @@ module.exports = {
713
785
  KeysStorage,
714
786
  KeysTeams,
715
787
  KeysCollection,
788
+ KeysTable,
716
789
  whitelistKeys
717
790
  };