appwrite-cli 4.2.1 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (320) hide show
  1. package/.github/workflows/npm-publish.yml +1 -1
  2. package/README.md +6 -9
  3. package/docs/examples/account/{create-email-session.md → create-email-password-session.md} +1 -1
  4. package/docs/examples/account/create-email-token.md +4 -0
  5. package/docs/examples/account/create-magic-u-r-l-token.md +5 -0
  6. package/docs/examples/account/create-mfa-authenticator.md +2 -0
  7. package/docs/examples/account/create-mfa-challenge.md +2 -0
  8. package/docs/examples/account/create-mfa-recovery-codes.md +1 -0
  9. package/docs/examples/account/create-o-auth2token.md +5 -0
  10. package/docs/examples/account/create-phone-token.md +3 -0
  11. package/docs/examples/account/create-push-target.md +4 -0
  12. package/docs/examples/account/create-session.md +3 -0
  13. package/docs/examples/account/create.md +1 -1
  14. package/docs/examples/account/delete-identity.md +1 -1
  15. package/docs/examples/account/delete-mfa-authenticator.md +3 -0
  16. package/docs/examples/account/delete-push-target.md +2 -0
  17. package/docs/examples/account/delete-session.md +1 -1
  18. package/docs/examples/account/delete.md +1 -0
  19. package/docs/examples/account/get-mfa-recovery-codes.md +1 -0
  20. package/docs/examples/account/get-session.md +1 -1
  21. package/docs/examples/account/list-mfa-factors.md +1 -0
  22. package/docs/examples/account/update-m-f-a.md +2 -0
  23. package/docs/examples/account/update-magic-u-r-l-session.md +2 -2
  24. package/docs/examples/account/update-mfa-authenticator.md +3 -0
  25. package/docs/examples/account/update-mfa-challenge.md +3 -0
  26. package/docs/examples/account/update-mfa-recovery-codes.md +1 -0
  27. package/docs/examples/account/update-name.md +1 -1
  28. package/docs/examples/account/update-phone-session.md +2 -2
  29. package/docs/examples/account/update-phone-verification.md +2 -2
  30. package/docs/examples/account/update-push-target.md +3 -0
  31. package/docs/examples/account/update-recovery.md +3 -4
  32. package/docs/examples/account/update-session.md +1 -1
  33. package/docs/examples/account/update-verification.md +2 -2
  34. package/docs/examples/assistant/chat.md +1 -1
  35. package/docs/examples/avatars/get-q-r.md +1 -1
  36. package/docs/examples/databases/create-boolean-attribute.md +2 -2
  37. package/docs/examples/databases/create-collection.md +3 -3
  38. package/docs/examples/databases/create-datetime-attribute.md +2 -2
  39. package/docs/examples/databases/create-document.md +3 -3
  40. package/docs/examples/databases/create-email-attribute.md +2 -2
  41. package/docs/examples/databases/create-enum-attribute.md +2 -2
  42. package/docs/examples/databases/create-float-attribute.md +2 -2
  43. package/docs/examples/databases/create-index.md +2 -2
  44. package/docs/examples/databases/create-integer-attribute.md +2 -2
  45. package/docs/examples/databases/create-ip-attribute.md +2 -2
  46. package/docs/examples/databases/create-relationship-attribute.md +3 -3
  47. package/docs/examples/databases/create-string-attribute.md +2 -2
  48. package/docs/examples/databases/create-url-attribute.md +2 -2
  49. package/docs/examples/databases/create.md +2 -2
  50. package/docs/examples/databases/delete-attribute.md +2 -2
  51. package/docs/examples/databases/delete-collection.md +2 -2
  52. package/docs/examples/databases/delete-document.md +3 -3
  53. package/docs/examples/databases/delete-index.md +2 -2
  54. package/docs/examples/databases/delete.md +1 -1
  55. package/docs/examples/databases/get-attribute.md +2 -2
  56. package/docs/examples/databases/get-collection-usage.md +2 -2
  57. package/docs/examples/databases/get-collection.md +2 -2
  58. package/docs/examples/databases/get-database-usage.md +1 -1
  59. package/docs/examples/databases/get-document.md +3 -3
  60. package/docs/examples/databases/get-index.md +2 -2
  61. package/docs/examples/databases/get.md +1 -1
  62. package/docs/examples/databases/list-attributes.md +2 -2
  63. package/docs/examples/databases/list-collection-logs.md +2 -2
  64. package/docs/examples/databases/list-collections.md +1 -1
  65. package/docs/examples/databases/list-document-logs.md +3 -3
  66. package/docs/examples/databases/list-documents.md +2 -2
  67. package/docs/examples/databases/list-indexes.md +2 -2
  68. package/docs/examples/databases/list-logs.md +1 -1
  69. package/docs/examples/databases/update-boolean-attribute.md +2 -2
  70. package/docs/examples/databases/update-collection.md +3 -3
  71. package/docs/examples/databases/update-datetime-attribute.md +2 -2
  72. package/docs/examples/databases/update-document.md +3 -3
  73. package/docs/examples/databases/update-email-attribute.md +2 -2
  74. package/docs/examples/databases/update-enum-attribute.md +3 -3
  75. package/docs/examples/databases/update-float-attribute.md +2 -2
  76. package/docs/examples/databases/update-integer-attribute.md +2 -2
  77. package/docs/examples/databases/update-ip-attribute.md +2 -2
  78. package/docs/examples/databases/update-relationship-attribute.md +2 -2
  79. package/docs/examples/databases/update-string-attribute.md +3 -3
  80. package/docs/examples/databases/update-url-attribute.md +2 -2
  81. package/docs/examples/databases/update.md +2 -2
  82. package/docs/examples/functions/create-build.md +3 -3
  83. package/docs/examples/functions/create-deployment.md +1 -1
  84. package/docs/examples/functions/create-execution.md +1 -1
  85. package/docs/examples/functions/create-variable.md +3 -3
  86. package/docs/examples/functions/create.md +3 -3
  87. package/docs/examples/functions/delete-deployment.md +2 -2
  88. package/docs/examples/functions/delete-variable.md +2 -2
  89. package/docs/examples/functions/delete.md +1 -1
  90. package/docs/examples/functions/download-deployment.md +2 -2
  91. package/docs/examples/functions/get-deployment.md +2 -2
  92. package/docs/examples/functions/get-execution.md +2 -2
  93. package/docs/examples/functions/get-function-usage.md +1 -1
  94. package/docs/examples/functions/get-variable.md +2 -2
  95. package/docs/examples/functions/get.md +1 -1
  96. package/docs/examples/functions/list-deployments.md +1 -1
  97. package/docs/examples/functions/list-executions.md +1 -1
  98. package/docs/examples/functions/list-variables.md +1 -1
  99. package/docs/examples/functions/update-deployment.md +2 -2
  100. package/docs/examples/functions/update-variable.md +3 -3
  101. package/docs/examples/functions/update.md +2 -2
  102. package/docs/examples/health/get-certificate.md +2 -0
  103. package/docs/examples/health/get-failed-jobs.md +3 -0
  104. package/docs/examples/health/get-queue-usage-dump.md +2 -0
  105. package/docs/examples/health/get-queue-usage.md +2 -0
  106. package/docs/examples/health/get-storage.md +1 -0
  107. package/docs/examples/messaging/create-apns-provider.md +9 -0
  108. package/docs/examples/messaging/create-email.md +13 -0
  109. package/docs/examples/messaging/create-fcm-provider.md +5 -0
  110. package/docs/examples/messaging/create-mailgun-provider.md +11 -0
  111. package/docs/examples/messaging/create-msg91provider.md +7 -0
  112. package/docs/examples/messaging/create-push.md +17 -0
  113. package/docs/examples/messaging/create-sendgrid-provider.md +9 -0
  114. package/docs/examples/messaging/create-sms.md +8 -0
  115. package/docs/examples/messaging/create-smtp-provider.md +15 -0
  116. package/docs/examples/messaging/create-subscriber.md +4 -0
  117. package/docs/examples/messaging/create-telesign-provider.md +7 -0
  118. package/docs/examples/messaging/create-textmagic-provider.md +7 -0
  119. package/docs/examples/messaging/create-topic.md +4 -0
  120. package/docs/examples/messaging/create-twilio-provider.md +7 -0
  121. package/docs/examples/messaging/create-vonage-provider.md +7 -0
  122. package/docs/examples/messaging/delete-provider.md +2 -0
  123. package/docs/examples/messaging/delete-subscriber.md +3 -0
  124. package/docs/examples/messaging/delete-topic.md +2 -0
  125. package/docs/examples/messaging/delete.md +2 -0
  126. package/docs/examples/messaging/get-message.md +2 -0
  127. package/docs/examples/messaging/get-provider.md +2 -0
  128. package/docs/examples/messaging/get-subscriber.md +3 -0
  129. package/docs/examples/messaging/get-topic.md +2 -0
  130. package/docs/examples/messaging/list-message-logs.md +3 -0
  131. package/docs/examples/messaging/list-messages.md +3 -0
  132. package/docs/examples/messaging/list-provider-logs.md +3 -0
  133. package/docs/examples/messaging/list-providers.md +3 -0
  134. package/docs/examples/messaging/list-subscriber-logs.md +3 -0
  135. package/docs/examples/messaging/list-subscribers.md +4 -0
  136. package/docs/examples/messaging/list-targets.md +3 -0
  137. package/docs/examples/messaging/list-topic-logs.md +3 -0
  138. package/docs/examples/messaging/list-topics.md +3 -0
  139. package/docs/examples/messaging/update-apns-provider.md +9 -0
  140. package/docs/examples/messaging/update-email.md +12 -0
  141. package/docs/examples/messaging/update-fcm-provider.md +5 -0
  142. package/docs/examples/messaging/update-mailgun-provider.md +11 -0
  143. package/docs/examples/messaging/update-msg91provider.md +7 -0
  144. package/docs/examples/messaging/update-push.md +17 -0
  145. package/docs/examples/messaging/update-sendgrid-provider.md +9 -0
  146. package/docs/examples/messaging/update-sms.md +8 -0
  147. package/docs/examples/messaging/update-smtp-provider.md +15 -0
  148. package/docs/examples/messaging/update-telesign-provider.md +7 -0
  149. package/docs/examples/messaging/update-textmagic-provider.md +7 -0
  150. package/docs/examples/messaging/update-topic.md +4 -0
  151. package/docs/examples/messaging/update-twilio-provider.md +7 -0
  152. package/docs/examples/messaging/update-vonage-provider.md +7 -0
  153. package/docs/examples/migrations/create-appwrite-migration.md +2 -2
  154. package/docs/examples/migrations/create-firebase-migration.md +1 -1
  155. package/docs/examples/migrations/create-firebase-o-auth-migration.md +1 -1
  156. package/docs/examples/migrations/create-n-host-migration.md +6 -6
  157. package/docs/examples/migrations/create-supabase-migration.md +4 -4
  158. package/docs/examples/migrations/delete.md +1 -1
  159. package/docs/examples/migrations/get-appwrite-report.md +2 -2
  160. package/docs/examples/migrations/get-firebase-report-o-auth.md +1 -1
  161. package/docs/examples/migrations/get-firebase-report.md +1 -1
  162. package/docs/examples/migrations/get-n-host-report.md +6 -6
  163. package/docs/examples/migrations/get-supabase-report.md +4 -4
  164. package/docs/examples/migrations/get.md +1 -1
  165. package/docs/examples/migrations/retry.md +1 -1
  166. package/docs/examples/project/create-variable.md +2 -2
  167. package/docs/examples/project/delete-variable.md +1 -1
  168. package/docs/examples/project/get-usage.md +2 -0
  169. package/docs/examples/project/get-variable.md +1 -1
  170. package/docs/examples/project/update-variable.md +2 -2
  171. package/docs/examples/projects/create-key.md +2 -2
  172. package/docs/examples/projects/create-platform.md +2 -2
  173. package/docs/examples/projects/create-smtp-test.md +11 -0
  174. package/docs/examples/projects/create-webhook.md +4 -3
  175. package/docs/examples/projects/create.md +2 -2
  176. package/docs/examples/projects/delete-email-template.md +1 -1
  177. package/docs/examples/projects/delete-key.md +2 -2
  178. package/docs/examples/projects/delete-platform.md +2 -2
  179. package/docs/examples/projects/delete-sms-template.md +1 -1
  180. package/docs/examples/projects/delete-webhook.md +2 -2
  181. package/docs/examples/projects/delete.md +1 -1
  182. package/docs/examples/projects/get-email-template.md +1 -1
  183. package/docs/examples/projects/get-key.md +2 -2
  184. package/docs/examples/projects/get-platform.md +2 -2
  185. package/docs/examples/projects/get-sms-template.md +1 -1
  186. package/docs/examples/projects/get-webhook.md +2 -2
  187. package/docs/examples/projects/get.md +1 -1
  188. package/docs/examples/projects/list-keys.md +1 -1
  189. package/docs/examples/projects/list-platforms.md +1 -1
  190. package/docs/examples/projects/list-webhooks.md +1 -1
  191. package/docs/examples/projects/update-api-status-all.md +3 -0
  192. package/docs/examples/projects/update-api-status.md +4 -0
  193. package/docs/examples/projects/update-auth-duration.md +1 -1
  194. package/docs/examples/projects/update-auth-limit.md +1 -1
  195. package/docs/examples/projects/update-auth-password-dictionary.md +1 -1
  196. package/docs/examples/projects/update-auth-password-history.md +1 -1
  197. package/docs/examples/projects/update-auth-sessions-limit.md +1 -1
  198. package/docs/examples/projects/update-auth-status.md +1 -1
  199. package/docs/examples/projects/update-email-template.md +3 -3
  200. package/docs/examples/projects/update-key.md +3 -3
  201. package/docs/examples/projects/update-o-auth2.md +1 -1
  202. package/docs/examples/projects/update-personal-data-check.md +1 -1
  203. package/docs/examples/projects/update-platform.md +3 -3
  204. package/docs/examples/projects/update-service-status-all.md +1 -1
  205. package/docs/examples/projects/update-service-status.md +1 -1
  206. package/docs/examples/projects/update-sms-template.md +2 -2
  207. package/docs/examples/projects/update-smtp.md +11 -0
  208. package/docs/examples/projects/update-team.md +2 -2
  209. package/docs/examples/projects/update-webhook-signature.md +2 -2
  210. package/docs/examples/projects/update-webhook.md +5 -4
  211. package/docs/examples/projects/update.md +2 -2
  212. package/docs/examples/proxy/delete-rule.md +1 -1
  213. package/docs/examples/proxy/get-rule.md +1 -1
  214. package/docs/examples/proxy/update-rule-verification.md +1 -1
  215. package/docs/examples/storage/create-bucket.md +2 -2
  216. package/docs/examples/storage/create-file.md +2 -2
  217. package/docs/examples/storage/delete-bucket.md +1 -1
  218. package/docs/examples/storage/delete-file.md +2 -2
  219. package/docs/examples/storage/get-bucket-usage.md +1 -1
  220. package/docs/examples/storage/get-bucket.md +1 -1
  221. package/docs/examples/storage/get-file-download.md +2 -2
  222. package/docs/examples/storage/get-file-preview.md +2 -2
  223. package/docs/examples/storage/get-file-view.md +2 -2
  224. package/docs/examples/storage/get-file.md +2 -2
  225. package/docs/examples/storage/list-files.md +1 -1
  226. package/docs/examples/storage/update-bucket.md +2 -2
  227. package/docs/examples/storage/update-file.md +2 -2
  228. package/docs/examples/teams/create-membership.md +1 -1
  229. package/docs/examples/teams/create.md +2 -2
  230. package/docs/examples/teams/delete-membership.md +2 -2
  231. package/docs/examples/teams/delete.md +1 -1
  232. package/docs/examples/teams/get-membership.md +2 -2
  233. package/docs/examples/teams/get-prefs.md +1 -1
  234. package/docs/examples/teams/get.md +1 -1
  235. package/docs/examples/teams/list-logs.md +1 -1
  236. package/docs/examples/teams/list-memberships.md +1 -1
  237. package/docs/examples/teams/update-membership-status.md +4 -4
  238. package/docs/examples/teams/update-membership.md +2 -2
  239. package/docs/examples/teams/update-name.md +2 -2
  240. package/docs/examples/teams/update-prefs.md +1 -1
  241. package/docs/examples/users/create-argon2user.md +1 -1
  242. package/docs/examples/users/create-bcrypt-user.md +1 -1
  243. package/docs/examples/users/create-m-d5user.md +1 -1
  244. package/docs/examples/users/create-mfa-recovery-codes.md +2 -0
  245. package/docs/examples/users/create-p-h-pass-user.md +1 -1
  246. package/docs/examples/users/create-s-h-a-user.md +1 -1
  247. package/docs/examples/users/create-scrypt-modified-user.md +4 -4
  248. package/docs/examples/users/create-scrypt-user.md +2 -2
  249. package/docs/examples/users/create-session.md +2 -0
  250. package/docs/examples/users/create-target.md +7 -0
  251. package/docs/examples/users/create-token.md +4 -0
  252. package/docs/examples/users/create.md +1 -1
  253. package/docs/examples/users/delete-identity.md +1 -1
  254. package/docs/examples/users/delete-mfa-authenticator.md +3 -0
  255. package/docs/examples/users/delete-session.md +2 -2
  256. package/docs/examples/users/delete-sessions.md +1 -1
  257. package/docs/examples/users/delete-target.md +3 -0
  258. package/docs/examples/users/delete.md +1 -1
  259. package/docs/examples/users/get-mfa-recovery-codes.md +2 -0
  260. package/docs/examples/users/get-prefs.md +1 -1
  261. package/docs/examples/users/get-target.md +3 -0
  262. package/docs/examples/users/get-usage.md +0 -1
  263. package/docs/examples/users/get.md +1 -1
  264. package/docs/examples/users/list-logs.md +1 -1
  265. package/docs/examples/users/list-memberships.md +1 -1
  266. package/docs/examples/users/list-mfa-factors.md +2 -0
  267. package/docs/examples/users/list-sessions.md +1 -1
  268. package/docs/examples/users/list-targets.md +3 -0
  269. package/docs/examples/users/update-email-verification.md +1 -1
  270. package/docs/examples/users/update-email.md +1 -1
  271. package/docs/examples/users/update-labels.md +1 -1
  272. package/docs/examples/users/update-mfa-recovery-codes.md +2 -0
  273. package/docs/examples/users/update-mfa.md +3 -0
  274. package/docs/examples/users/update-name.md +2 -2
  275. package/docs/examples/users/update-password.md +1 -1
  276. package/docs/examples/users/update-phone-verification.md +1 -1
  277. package/docs/examples/users/update-phone.md +1 -1
  278. package/docs/examples/users/update-prefs.md +1 -1
  279. package/docs/examples/users/update-status.md +1 -1
  280. package/docs/examples/users/update-target.md +6 -0
  281. package/docs/examples/vcs/create-repository-detection.md +2 -2
  282. package/docs/examples/vcs/create-repository.md +2 -2
  283. package/docs/examples/vcs/delete-installation.md +1 -1
  284. package/docs/examples/vcs/get-installation.md +1 -1
  285. package/docs/examples/vcs/get-repository.md +2 -2
  286. package/docs/examples/vcs/list-repositories.md +1 -1
  287. package/docs/examples/vcs/list-repository-branches.md +2 -2
  288. package/docs/examples/vcs/update-external-deployments.md +3 -3
  289. package/index.js +2 -0
  290. package/install.ps1 +2 -2
  291. package/install.sh +1 -1
  292. package/lib/client.js +9 -4
  293. package/lib/commands/account.js +966 -381
  294. package/lib/commands/assistant.js +3 -8
  295. package/lib/commands/avatars.js +32 -48
  296. package/lib/commands/console.js +3 -8
  297. package/lib/commands/databases.js +119 -265
  298. package/lib/commands/deploy.js +45 -6
  299. package/lib/commands/functions.js +59 -124
  300. package/lib/commands/generic.js +0 -1
  301. package/lib/commands/graphql.js +5 -13
  302. package/lib/commands/health.js +225 -89
  303. package/lib/commands/locale.js +17 -43
  304. package/lib/commands/messaging.js +2815 -0
  305. package/lib/commands/migrations.js +35 -85
  306. package/lib/commands/project.js +28 -38
  307. package/lib/commands/projects.js +286 -270
  308. package/lib/commands/proxy.js +12 -29
  309. package/lib/commands/storage.js +42 -87
  310. package/lib/commands/teams.js +31 -75
  311. package/lib/commands/users.js +677 -235
  312. package/lib/commands/vcs.js +19 -48
  313. package/lib/paginate.js +2 -2
  314. package/lib/parser.js +1 -0
  315. package/package.json +1 -1
  316. package/scoop/appwrite.json +3 -3
  317. package/docs/examples/account/create-magic-u-r-l-session.md +0 -4
  318. package/docs/examples/account/create-phone-session.md +0 -3
  319. package/docs/examples/projects/get-usage.md +0 -3
  320. package/docs/examples/projects/update-smtp-configuration.md +0 -11
@@ -37,7 +37,7 @@ function convertReadStreamToReadableStream(readStream) {
37
37
 
38
38
  const vcs = new Command("vcs").description(commandDescriptions['vcs']).configureHelp({
39
39
  helpWidth: process.stdout.columns || 80
40
- })
40
+ })
41
41
 
42
42
  /**
43
43
  * @typedef {Object} VcsListRepositoriesRequestParams
@@ -52,21 +52,18 @@ const vcs = new Command("vcs").description(commandDescriptions['vcs']).configure
52
52
  */
53
53
  const vcsListRepositories = async ({ installationId, search, parseOutput = true, sdk = undefined}) => {
54
54
  let client = !sdk ? await sdkForProject() : sdk;
55
-
56
55
  let apiPath = '/vcs/github/installations/{installationId}/providerRepositories'.replace('{installationId}', installationId);
57
56
  let payload = {};
58
57
  if (typeof search !== 'undefined') {
59
58
  payload['search'] = search;
60
59
  }
61
60
 
62
-
63
61
  let response = undefined;
64
-
62
+
65
63
  response = await client.call('get', apiPath, {
66
64
  'content-type': 'application/json',
67
65
  }, payload);
68
66
 
69
-
70
67
  if (parseOutput) {
71
68
  parse(response)
72
69
  success()
@@ -89,7 +86,6 @@ const vcsListRepositories = async ({ installationId, search, parseOutput = true,
89
86
  */
90
87
  const vcsCreateRepository = async ({ installationId, name, xprivate, parseOutput = true, sdk = undefined}) => {
91
88
  let client = !sdk ? await sdkForProject() : sdk;
92
-
93
89
  let apiPath = '/vcs/github/installations/{installationId}/providerRepositories'.replace('{installationId}', installationId);
94
90
  let payload = {};
95
91
  if (typeof name !== 'undefined') {
@@ -99,14 +95,12 @@ const vcsCreateRepository = async ({ installationId, name, xprivate, parseOutput
99
95
  payload['private'] = xprivate;
100
96
  }
101
97
 
102
-
103
98
  let response = undefined;
104
-
99
+
105
100
  response = await client.call('post', apiPath, {
106
101
  'content-type': 'application/json',
107
102
  }, payload);
108
103
 
109
-
110
104
  if (parseOutput) {
111
105
  parse(response)
112
106
  success()
@@ -128,18 +122,15 @@ const vcsCreateRepository = async ({ installationId, name, xprivate, parseOutput
128
122
  */
129
123
  const vcsGetRepository = async ({ installationId, providerRepositoryId, parseOutput = true, sdk = undefined}) => {
130
124
  let client = !sdk ? await sdkForProject() : sdk;
131
-
132
125
  let apiPath = '/vcs/github/installations/{installationId}/providerRepositories/{providerRepositoryId}'.replace('{installationId}', installationId).replace('{providerRepositoryId}', providerRepositoryId);
133
126
  let payload = {};
134
127
 
135
-
136
128
  let response = undefined;
137
-
129
+
138
130
  response = await client.call('get', apiPath, {
139
131
  'content-type': 'application/json',
140
132
  }, payload);
141
133
 
142
-
143
134
  if (parseOutput) {
144
135
  parse(response)
145
136
  success()
@@ -161,18 +152,15 @@ const vcsGetRepository = async ({ installationId, providerRepositoryId, parseOut
161
152
  */
162
153
  const vcsListRepositoryBranches = async ({ installationId, providerRepositoryId, parseOutput = true, sdk = undefined}) => {
163
154
  let client = !sdk ? await sdkForProject() : sdk;
164
-
165
155
  let apiPath = '/vcs/github/installations/{installationId}/providerRepositories/{providerRepositoryId}/branches'.replace('{installationId}', installationId).replace('{providerRepositoryId}', providerRepositoryId);
166
156
  let payload = {};
167
157
 
168
-
169
158
  let response = undefined;
170
-
159
+
171
160
  response = await client.call('get', apiPath, {
172
161
  'content-type': 'application/json',
173
162
  }, payload);
174
163
 
175
-
176
164
  if (parseOutput) {
177
165
  parse(response)
178
166
  success()
@@ -195,21 +183,18 @@ const vcsListRepositoryBranches = async ({ installationId, providerRepositoryId,
195
183
  */
196
184
  const vcsCreateRepositoryDetection = async ({ installationId, providerRepositoryId, providerRootDirectory, parseOutput = true, sdk = undefined}) => {
197
185
  let client = !sdk ? await sdkForProject() : sdk;
198
-
199
186
  let apiPath = '/vcs/github/installations/{installationId}/providerRepositories/{providerRepositoryId}/detection'.replace('{installationId}', installationId).replace('{providerRepositoryId}', providerRepositoryId);
200
187
  let payload = {};
201
188
  if (typeof providerRootDirectory !== 'undefined') {
202
189
  payload['providerRootDirectory'] = providerRootDirectory;
203
190
  }
204
191
 
205
-
206
192
  let response = undefined;
207
-
193
+
208
194
  response = await client.call('post', apiPath, {
209
195
  'content-type': 'application/json',
210
196
  }, payload);
211
197
 
212
-
213
198
  if (parseOutput) {
214
199
  parse(response)
215
200
  success()
@@ -232,21 +217,18 @@ const vcsCreateRepositoryDetection = async ({ installationId, providerRepository
232
217
  */
233
218
  const vcsUpdateExternalDeployments = async ({ installationId, repositoryId, providerPullRequestId, parseOutput = true, sdk = undefined}) => {
234
219
  let client = !sdk ? await sdkForProject() : sdk;
235
-
236
220
  let apiPath = '/vcs/github/installations/{installationId}/repositories/{repositoryId}'.replace('{installationId}', installationId).replace('{repositoryId}', repositoryId);
237
221
  let payload = {};
238
222
  if (typeof providerPullRequestId !== 'undefined') {
239
223
  payload['providerPullRequestId'] = providerPullRequestId;
240
224
  }
241
225
 
242
-
243
226
  let response = undefined;
244
-
227
+
245
228
  response = await client.call('patch', apiPath, {
246
229
  'content-type': 'application/json',
247
230
  }, payload);
248
231
 
249
-
250
232
  if (parseOutput) {
251
233
  parse(response)
252
234
  success()
@@ -268,7 +250,6 @@ const vcsUpdateExternalDeployments = async ({ installationId, repositoryId, prov
268
250
  */
269
251
  const vcsListInstallations = async ({ queries, search, parseOutput = true, sdk = undefined}) => {
270
252
  let client = !sdk ? await sdkForProject() : sdk;
271
-
272
253
  let apiPath = '/vcs/installations';
273
254
  let payload = {};
274
255
  if (typeof queries !== 'undefined') {
@@ -278,14 +259,12 @@ const vcsListInstallations = async ({ queries, search, parseOutput = true, sdk =
278
259
  payload['search'] = search;
279
260
  }
280
261
 
281
-
282
262
  let response = undefined;
283
-
263
+
284
264
  response = await client.call('get', apiPath, {
285
265
  'content-type': 'application/json',
286
266
  }, payload);
287
267
 
288
-
289
268
  if (parseOutput) {
290
269
  parse(response)
291
270
  success()
@@ -306,18 +285,15 @@ const vcsListInstallations = async ({ queries, search, parseOutput = true, sdk =
306
285
  */
307
286
  const vcsGetInstallation = async ({ installationId, parseOutput = true, sdk = undefined}) => {
308
287
  let client = !sdk ? await sdkForProject() : sdk;
309
-
310
288
  let apiPath = '/vcs/installations/{installationId}'.replace('{installationId}', installationId);
311
289
  let payload = {};
312
290
 
313
-
314
291
  let response = undefined;
315
-
292
+
316
293
  response = await client.call('get', apiPath, {
317
294
  'content-type': 'application/json',
318
295
  }, payload);
319
296
 
320
-
321
297
  if (parseOutput) {
322
298
  parse(response)
323
299
  success()
@@ -338,18 +314,15 @@ const vcsGetInstallation = async ({ installationId, parseOutput = true, sdk = un
338
314
  */
339
315
  const vcsDeleteInstallation = async ({ installationId, parseOutput = true, sdk = undefined}) => {
340
316
  let client = !sdk ? await sdkForProject() : sdk;
341
-
342
317
  let apiPath = '/vcs/installations/{installationId}'.replace('{installationId}', installationId);
343
318
  let payload = {};
344
319
 
345
-
346
320
  let response = undefined;
347
-
321
+
348
322
  response = await client.call('delete', apiPath, {
349
323
  'content-type': 'application/json',
350
324
  }, payload);
351
325
 
352
-
353
326
  if (parseOutput) {
354
327
  parse(response)
355
328
  success()
@@ -358,7 +331,6 @@ const vcsDeleteInstallation = async ({ installationId, parseOutput = true, sdk =
358
331
  return response;
359
332
  }
360
333
 
361
-
362
334
  vcs
363
335
  .command(`listRepositories`)
364
336
  .description(``)
@@ -423,16 +395,15 @@ vcs
423
395
  .requiredOption(`--installationId <installationId>`, `Installation Id`)
424
396
  .action(actionRunner(vcsDeleteInstallation))
425
397
 
426
-
427
398
  module.exports = {
428
399
  vcs,
429
- vcsListRepositories,
430
- vcsCreateRepository,
431
- vcsGetRepository,
432
- vcsListRepositoryBranches,
433
- vcsCreateRepositoryDetection,
434
- vcsUpdateExternalDeployments,
435
- vcsListInstallations,
436
- vcsGetInstallation,
437
- vcsDeleteInstallation
400
+ vcsListRepositories,
401
+ vcsCreateRepository,
402
+ vcsGetRepository,
403
+ vcsListRepositoryBranches,
404
+ vcsCreateRepositoryDetection,
405
+ vcsUpdateExternalDeployments,
406
+ vcsListInstallations,
407
+ vcsGetInstallation,
408
+ vcsDeleteInstallation
438
409
  };
package/lib/paginate.js CHANGED
@@ -10,8 +10,8 @@ const paginate = async (action, args = {}, limit = 100, wrapper = '') => {
10
10
  const response = await action({
11
11
  ...args,
12
12
  queries: [
13
- `limit(${limit})`,
14
- `offset(${offset})`
13
+ JSON.stringify({ method: 'limit', values: [limit] }),
14
+ JSON.stringify({ method: 'offset', values: [offset] })
15
15
  ]
16
16
  });
17
17
 
package/lib/parser.js CHANGED
@@ -170,6 +170,7 @@ const commandDescriptions = {
170
170
  "logout": `The logout command allows you to logout of your Appwrite account.`,
171
171
  "console" : `The console command allows gives you access to the APIs used by the Appwrite console.`,
172
172
  "assistant": `The assistant command allows you to interact with the Appwrite Assistant AI`,
173
+ "messaging": `The messaging command allows you to send messages.`,
173
174
  "migrations": `The migrations command allows you to migrate data between services.`,
174
175
  "project": `The project command is for overall project administration.`,
175
176
  "proxy": `The proxy command allows you to configure behavior for your attached domains.`,
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "appwrite-cli",
3
3
  "homepage": "https://appwrite.io/support",
4
4
  "description": "Appwrite is an open-source self-hosted backend server that abstract and simplify complex and repetitive development tasks behind a very simple REST API",
5
- "version": "4.2.1",
5
+ "version": "5.0.0",
6
6
  "license": "BSD-3-Clause",
7
7
  "main": "index.js",
8
8
  "bin": {
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "$schema": "https://raw.githubusercontent.com/ScoopInstaller/Scoop/master/schema.json",
3
- "version": "4.2.1",
3
+ "version": "5.0.0",
4
4
  "description": "The Appwrite CLI is a command-line application that allows you to interact with Appwrite and perform server-side tasks using your terminal.",
5
5
  "homepage": "https://github.com/appwrite/sdk-for-cli",
6
6
  "license": "BSD-3-Clause",
7
7
  "architecture": {
8
8
  "64bit": {
9
- "url": "https://github.com/appwrite/sdk-for-cli/releases/download/4.2.1/appwrite-cli-win-x64.exe",
9
+ "url": "https://github.com/appwrite/sdk-for-cli/releases/download/5.0.0/appwrite-cli-win-x64.exe",
10
10
  "bin": [
11
11
  [
12
12
  "appwrite-cli-win-x64.exe",
@@ -15,7 +15,7 @@
15
15
  ]
16
16
  },
17
17
  "arm64": {
18
- "url": "https://github.com/appwrite/sdk-for-cli/releases/download/4.2.1/appwrite-cli-win-arm64.exe",
18
+ "url": "https://github.com/appwrite/sdk-for-cli/releases/download/5.0.0/appwrite-cli-win-arm64.exe",
19
19
  "bin": [
20
20
  [
21
21
  "appwrite-cli-win-arm64.exe",
@@ -1,4 +0,0 @@
1
- appwrite account createMagicURLSession \
2
- --userId [USER_ID] \
3
- --email email@example.com \
4
-
@@ -1,3 +0,0 @@
1
- appwrite account createPhoneSession \
2
- --userId [USER_ID] \
3
- --phone +12065550100
@@ -1,3 +0,0 @@
1
- appwrite projects getUsage \
2
- --projectId [PROJECT_ID] \
3
-
@@ -1,11 +0,0 @@
1
- appwrite projects updateSmtpConfiguration \
2
- --projectId [PROJECT_ID] \
3
- --enabled false \
4
-
5
-
6
-
7
-
8
-
9
-
10
-
11
-