appwrite-cli 4.2.2 → 5.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 (315) 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 +5 -5
  291. package/install.sh +4 -4
  292. package/lib/client.js +4 -4
  293. package/lib/commands/account.js +906 -226
  294. package/lib/commands/avatars.js +3 -3
  295. package/lib/commands/databases.js +22 -22
  296. package/lib/commands/deploy.js +45 -6
  297. package/lib/commands/functions.js +5 -5
  298. package/lib/commands/generic.js +2 -2
  299. package/lib/commands/health.js +193 -1
  300. package/lib/commands/messaging.js +2815 -0
  301. package/lib/commands/migrations.js +2 -2
  302. package/lib/commands/project.js +15 -5
  303. package/lib/commands/projects.js +210 -72
  304. package/lib/commands/proxy.js +1 -1
  305. package/lib/commands/storage.js +6 -6
  306. package/lib/commands/teams.js +2 -2
  307. package/lib/commands/users.js +545 -14
  308. package/lib/paginate.js +2 -2
  309. package/lib/parser.js +2 -1
  310. package/package.json +1 -1
  311. package/scoop/appwrite.json +3 -3
  312. package/docs/examples/account/create-magic-u-r-l-session.md +0 -4
  313. package/docs/examples/account/create-phone-session.md +0 -3
  314. package/docs/examples/projects/get-usage.md +0 -3
  315. package/docs/examples/projects/update-smtp-configuration.md +0 -11
@@ -41,7 +41,7 @@ const migrations = new Command("migrations").description(commandDescriptions['mi
41
41
 
42
42
  /**
43
43
  * @typedef {Object} MigrationsListRequestParams
44
- * @property {string} queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: status, stage, source, resources, statusCounters, resourceData, errors
44
+ * @property {string[]} queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: status, stage, source, resources, statusCounters, resourceData, errors
45
45
  * @property {string} search Search term to filter your list results. Max length: 256 chars.
46
46
  * @property {boolean} parseOutput
47
47
  * @property {libClient | undefined} sdk
@@ -690,7 +690,7 @@ const migrationsDelete = async ({ migrationId, parseOutput = true, sdk = undefin
690
690
  migrations
691
691
  .command(`list`)
692
692
  .description(``)
693
- .option(`--queries <queries>`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: status, stage, source, resources, statusCounters, resourceData, errors`)
693
+ .option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: status, stage, source, resources, statusCounters, resourceData, errors`)
694
694
  .option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`)
695
695
  .action(actionRunner(migrationsList))
696
696
 
@@ -41,7 +41,9 @@ const project = new Command("project").description(commandDescriptions['project'
41
41
 
42
42
  /**
43
43
  * @typedef {Object} ProjectGetUsageRequestParams
44
- * @property {string} range Date range.
44
+ * @property {string} startDate Starting date for the usage
45
+ * @property {string} endDate End date for the usage
46
+ * @property {ProjectUsageRange} period Period used
45
47
  * @property {boolean} parseOutput
46
48
  * @property {libClient | undefined} sdk
47
49
  */
@@ -49,12 +51,18 @@ const project = new Command("project").description(commandDescriptions['project'
49
51
  /**
50
52
  * @param {ProjectGetUsageRequestParams} params
51
53
  */
52
- const projectGetUsage = async ({ range, parseOutput = true, sdk = undefined}) => {
54
+ const projectGetUsage = async ({ startDate, endDate, period, parseOutput = true, sdk = undefined}) => {
53
55
  let client = !sdk ? await sdkForProject() : sdk;
54
56
  let apiPath = '/project/usage';
55
57
  let payload = {};
56
- if (typeof range !== 'undefined') {
57
- payload['range'] = range;
58
+ if (typeof startDate !== 'undefined') {
59
+ payload['startDate'] = startDate;
60
+ }
61
+ if (typeof endDate !== 'undefined') {
62
+ payload['endDate'] = endDate;
63
+ }
64
+ if (typeof period !== 'undefined') {
65
+ payload['period'] = period;
58
66
  }
59
67
 
60
68
  let response = undefined;
@@ -233,7 +241,9 @@ const projectDeleteVariable = async ({ variableId, parseOutput = true, sdk = und
233
241
  project
234
242
  .command(`getUsage`)
235
243
  .description(``)
236
- .option(`--range <range>`, `Date range.`)
244
+ .requiredOption(`--startDate <startDate>`, `Starting date for the usage`)
245
+ .requiredOption(`--endDate <endDate>`, `End date for the usage`)
246
+ .option(`--period <period>`, `Period used`)
237
247
  .action(actionRunner(projectGetUsage))
238
248
 
239
249
  project
@@ -80,7 +80,7 @@ const projectsList = async ({ queries, search, parseOutput = true, sdk = undefin
80
80
  * @property {string} projectId Unique Id. Choose a custom ID or generate a random ID with &#039;ID.unique()&#039;. Valid chars are a-z, and hyphen. Can&#039;t start with a special char. Max length is 36 chars.
81
81
  * @property {string} name Project name. Max length: 128 chars.
82
82
  * @property {string} teamId Team unique ID.
83
- * @property {string} region Project Region.
83
+ * @property {Region} region Project Region.
84
84
  * @property {string} description Project description. Max length: 256 chars.
85
85
  * @property {string} logo Project logo.
86
86
  * @property {string} url Project URL.
@@ -282,6 +282,76 @@ const projectsDelete = async ({ projectId, parseOutput = true, sdk = undefined})
282
282
  return response;
283
283
  }
284
284
 
285
+ /**
286
+ * @typedef {Object} ProjectsUpdateApiStatusRequestParams
287
+ * @property {string} projectId Project unique ID.
288
+ * @property {Api} api API name.
289
+ * @property {boolean} status API status.
290
+ * @property {boolean} parseOutput
291
+ * @property {libClient | undefined} sdk
292
+ */
293
+
294
+ /**
295
+ * @param {ProjectsUpdateApiStatusRequestParams} params
296
+ */
297
+ const projectsUpdateApiStatus = async ({ projectId, api, status, parseOutput = true, sdk = undefined}) => {
298
+ let client = !sdk ? await sdkForConsole() : sdk;
299
+ let apiPath = '/projects/{projectId}/api'.replace('{projectId}', projectId);
300
+ let payload = {};
301
+ if (typeof api !== 'undefined') {
302
+ payload['api'] = api;
303
+ }
304
+ if (typeof status !== 'undefined') {
305
+ payload['status'] = status;
306
+ }
307
+
308
+ let response = undefined;
309
+
310
+ response = await client.call('patch', apiPath, {
311
+ 'content-type': 'application/json',
312
+ }, payload);
313
+
314
+ if (parseOutput) {
315
+ parse(response)
316
+ success()
317
+ }
318
+
319
+ return response;
320
+ }
321
+
322
+ /**
323
+ * @typedef {Object} ProjectsUpdateApiStatusAllRequestParams
324
+ * @property {string} projectId Project unique ID.
325
+ * @property {boolean} status API status.
326
+ * @property {boolean} parseOutput
327
+ * @property {libClient | undefined} sdk
328
+ */
329
+
330
+ /**
331
+ * @param {ProjectsUpdateApiStatusAllRequestParams} params
332
+ */
333
+ const projectsUpdateApiStatusAll = async ({ projectId, status, parseOutput = true, sdk = undefined}) => {
334
+ let client = !sdk ? await sdkForConsole() : sdk;
335
+ let apiPath = '/projects/{projectId}/api/all'.replace('{projectId}', projectId);
336
+ let payload = {};
337
+ if (typeof status !== 'undefined') {
338
+ payload['status'] = status;
339
+ }
340
+
341
+ let response = undefined;
342
+
343
+ response = await client.call('patch', apiPath, {
344
+ 'content-type': 'application/json',
345
+ }, payload);
346
+
347
+ if (parseOutput) {
348
+ parse(response)
349
+ success()
350
+ }
351
+
352
+ return response;
353
+ }
354
+
285
355
  /**
286
356
  * @typedef {Object} ProjectsUpdateAuthDurationRequestParams
287
357
  * @property {string} projectId Project unique ID.
@@ -483,7 +553,7 @@ const projectsUpdatePersonalDataCheck = async ({ projectId, enabled, parseOutput
483
553
  /**
484
554
  * @typedef {Object} ProjectsUpdateAuthStatusRequestParams
485
555
  * @property {string} projectId Project unique ID.
486
- * @property {string} method Auth Method. Possible values: email-password,magic-url,anonymous,invites,jwt,phone
556
+ * @property {AuthMethod} method Auth Method. Possible values: email-password,magic-url,email-otp,anonymous,invites,jwt,phone
487
557
  * @property {boolean} status Set the status of this auth method.
488
558
  * @property {boolean} parseOutput
489
559
  * @property {libClient | undefined} sdk
@@ -548,7 +618,7 @@ const projectsListKeys = async ({ projectId, parseOutput = true, sdk = undefined
548
618
  * @property {string} projectId Project unique ID.
549
619
  * @property {string} name Key name. Max length: 128 chars.
550
620
  * @property {string[]} scopes Key scopes list. Maximum of 100 scopes are allowed.
551
- * @property {string} expire Expiration time in ISO 8601 format. Use null for unlimited expiration.
621
+ * @property {string} expire Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.
552
622
  * @property {boolean} parseOutput
553
623
  * @property {libClient | undefined} sdk
554
624
  */
@@ -621,7 +691,7 @@ const projectsGetKey = async ({ projectId, keyId, parseOutput = true, sdk = unde
621
691
  * @property {string} keyId Key unique ID.
622
692
  * @property {string} name Key name. Max length: 128 chars.
623
693
  * @property {string[]} scopes Key scopes list. Maximum of 100 events are allowed.
624
- * @property {string} expire Expiration time in ISO 8601 format. Use null for unlimited expiration.
694
+ * @property {string} expire Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.
625
695
  * @property {boolean} parseOutput
626
696
  * @property {libClient | undefined} sdk
627
697
  */
@@ -691,7 +761,7 @@ const projectsDeleteKey = async ({ projectId, keyId, parseOutput = true, sdk = u
691
761
  /**
692
762
  * @typedef {Object} ProjectsUpdateOAuth2RequestParams
693
763
  * @property {string} projectId Project unique ID.
694
- * @property {string} provider Provider Name
764
+ * @property {OAuthProvider} provider Provider Name
695
765
  * @property {string} appId Provider app ID. Max length: 256 chars.
696
766
  * @property {string} secret Provider secret key. Max length: 512 chars.
697
767
  * @property {boolean} enabled Provider status. Set to &#039;false&#039; to disable new session creation.
@@ -765,7 +835,7 @@ const projectsListPlatforms = async ({ projectId, parseOutput = true, sdk = unde
765
835
  /**
766
836
  * @typedef {Object} ProjectsCreatePlatformRequestParams
767
837
  * @property {string} projectId Project unique ID.
768
- * @property {string} type Platform type.
838
+ * @property {PlatformType} type Platform type.
769
839
  * @property {string} name Platform name. Max length: 128 chars.
770
840
  * @property {string} key Package name for Android or bundle ID for iOS or macOS. Max length: 256 chars.
771
841
  * @property {string} store App store or Google Play store ID. Max length: 256 chars.
@@ -920,7 +990,7 @@ const projectsDeletePlatform = async ({ projectId, platformId, parseOutput = tru
920
990
  /**
921
991
  * @typedef {Object} ProjectsUpdateServiceStatusRequestParams
922
992
  * @property {string} projectId Project unique ID.
923
- * @property {string} service Service name.
993
+ * @property {ApiService} service Service name.
924
994
  * @property {boolean} status Service status.
925
995
  * @property {boolean} parseOutput
926
996
  * @property {libClient | undefined} sdk
@@ -988,7 +1058,7 @@ const projectsUpdateServiceStatusAll = async ({ projectId, status, parseOutput =
988
1058
  }
989
1059
 
990
1060
  /**
991
- * @typedef {Object} ProjectsUpdateSmtpConfigurationRequestParams
1061
+ * @typedef {Object} ProjectsUpdateSmtpRequestParams
992
1062
  * @property {string} projectId Project unique ID.
993
1063
  * @property {boolean} enabled Enable custom SMTP service
994
1064
  * @property {string} senderName Name of the email sender
@@ -998,15 +1068,15 @@ const projectsUpdateServiceStatusAll = async ({ projectId, status, parseOutput =
998
1068
  * @property {number} port SMTP server port
999
1069
  * @property {string} username SMTP server username
1000
1070
  * @property {string} password SMTP server password
1001
- * @property {string} secure Does SMTP server use secure connection
1071
+ * @property {SMTPSecure} secure Does SMTP server use secure connection
1002
1072
  * @property {boolean} parseOutput
1003
1073
  * @property {libClient | undefined} sdk
1004
1074
  */
1005
1075
 
1006
1076
  /**
1007
- * @param {ProjectsUpdateSmtpConfigurationRequestParams} params
1077
+ * @param {ProjectsUpdateSmtpRequestParams} params
1008
1078
  */
1009
- const projectsUpdateSmtpConfiguration = async ({ projectId, enabled, senderName, senderEmail, replyTo, host, port, username, password, secure, parseOutput = true, sdk = undefined}) => {
1079
+ const projectsUpdateSmtp = async ({ projectId, enabled, senderName, senderEmail, replyTo, host, port, username, password, secure, parseOutput = true, sdk = undefined}) => {
1010
1080
  let client = !sdk ? await sdkForConsole() : sdk;
1011
1081
  let apiPath = '/projects/{projectId}/smtp'.replace('{projectId}', projectId);
1012
1082
  let payload = {};
@@ -1052,6 +1122,72 @@ const projectsUpdateSmtpConfiguration = async ({ projectId, enabled, senderName,
1052
1122
  return response;
1053
1123
  }
1054
1124
 
1125
+ /**
1126
+ * @typedef {Object} ProjectsCreateSmtpTestRequestParams
1127
+ * @property {string} projectId Project unique ID.
1128
+ * @property {string[]} emails Array of emails to send test email to. Maximum of 10 emails are allowed.
1129
+ * @property {string} senderName Name of the email sender
1130
+ * @property {string} senderEmail Email of the sender
1131
+ * @property {string} host SMTP server host name
1132
+ * @property {string} replyTo Reply to email
1133
+ * @property {number} port SMTP server port
1134
+ * @property {string} username SMTP server username
1135
+ * @property {string} password SMTP server password
1136
+ * @property {SMTPSecure} secure Does SMTP server use secure connection
1137
+ * @property {boolean} parseOutput
1138
+ * @property {libClient | undefined} sdk
1139
+ */
1140
+
1141
+ /**
1142
+ * @param {ProjectsCreateSmtpTestRequestParams} params
1143
+ */
1144
+ const projectsCreateSmtpTest = async ({ projectId, emails, senderName, senderEmail, host, replyTo, port, username, password, secure, parseOutput = true, sdk = undefined}) => {
1145
+ let client = !sdk ? await sdkForConsole() : sdk;
1146
+ let apiPath = '/projects/{projectId}/smtp/tests'.replace('{projectId}', projectId);
1147
+ let payload = {};
1148
+ emails = emails === true ? [] : emails;
1149
+ if (typeof emails !== 'undefined') {
1150
+ payload['emails'] = emails;
1151
+ }
1152
+ if (typeof senderName !== 'undefined') {
1153
+ payload['senderName'] = senderName;
1154
+ }
1155
+ if (typeof senderEmail !== 'undefined') {
1156
+ payload['senderEmail'] = senderEmail;
1157
+ }
1158
+ if (typeof replyTo !== 'undefined') {
1159
+ payload['replyTo'] = replyTo;
1160
+ }
1161
+ if (typeof host !== 'undefined') {
1162
+ payload['host'] = host;
1163
+ }
1164
+ if (typeof port !== 'undefined') {
1165
+ payload['port'] = port;
1166
+ }
1167
+ if (typeof username !== 'undefined') {
1168
+ payload['username'] = username;
1169
+ }
1170
+ if (typeof password !== 'undefined') {
1171
+ payload['password'] = password;
1172
+ }
1173
+ if (typeof secure !== 'undefined') {
1174
+ payload['secure'] = secure;
1175
+ }
1176
+
1177
+ let response = undefined;
1178
+
1179
+ response = await client.call('post', apiPath, {
1180
+ 'content-type': 'application/json',
1181
+ }, payload);
1182
+
1183
+ if (parseOutput) {
1184
+ parse(response)
1185
+ success()
1186
+ }
1187
+
1188
+ return response;
1189
+ }
1190
+
1055
1191
  /**
1056
1192
  * @typedef {Object} ProjectsUpdateTeamRequestParams
1057
1193
  * @property {string} projectId Project unique ID.
@@ -1088,8 +1224,8 @@ const projectsUpdateTeam = async ({ projectId, teamId, parseOutput = true, sdk =
1088
1224
  /**
1089
1225
  * @typedef {Object} ProjectsGetEmailTemplateRequestParams
1090
1226
  * @property {string} projectId Project unique ID.
1091
- * @property {string} type Template type
1092
- * @property {string} locale Template locale
1227
+ * @property {EmailTemplateType} type Template type
1228
+ * @property {EmailTemplateLocale} locale Template locale
1093
1229
  * @property {boolean} parseOutput
1094
1230
  * @property {libClient | undefined} sdk
1095
1231
  */
@@ -1119,8 +1255,8 @@ const projectsGetEmailTemplate = async ({ projectId, type, locale, parseOutput =
1119
1255
  /**
1120
1256
  * @typedef {Object} ProjectsUpdateEmailTemplateRequestParams
1121
1257
  * @property {string} projectId Project unique ID.
1122
- * @property {string} type Template type
1123
- * @property {string} locale Template locale
1258
+ * @property {EmailTemplateType} type Template type
1259
+ * @property {EmailTemplateLocale} locale Template locale
1124
1260
  * @property {string} subject Email Subject
1125
1261
  * @property {string} message Template message
1126
1262
  * @property {string} senderName Name of the email sender
@@ -1170,8 +1306,8 @@ const projectsUpdateEmailTemplate = async ({ projectId, type, locale, subject, m
1170
1306
  /**
1171
1307
  * @typedef {Object} ProjectsDeleteEmailTemplateRequestParams
1172
1308
  * @property {string} projectId Project unique ID.
1173
- * @property {string} type Template type
1174
- * @property {string} locale Template locale
1309
+ * @property {EmailTemplateType} type Template type
1310
+ * @property {EmailTemplateLocale} locale Template locale
1175
1311
  * @property {boolean} parseOutput
1176
1312
  * @property {libClient | undefined} sdk
1177
1313
  */
@@ -1201,8 +1337,8 @@ const projectsDeleteEmailTemplate = async ({ projectId, type, locale, parseOutpu
1201
1337
  /**
1202
1338
  * @typedef {Object} ProjectsGetSmsTemplateRequestParams
1203
1339
  * @property {string} projectId Project unique ID.
1204
- * @property {string} type Template type
1205
- * @property {string} locale Template locale
1340
+ * @property {SmsTemplateType} type Template type
1341
+ * @property {SmsTemplateLocale} locale Template locale
1206
1342
  * @property {boolean} parseOutput
1207
1343
  * @property {libClient | undefined} sdk
1208
1344
  */
@@ -1232,8 +1368,8 @@ const projectsGetSmsTemplate = async ({ projectId, type, locale, parseOutput = t
1232
1368
  /**
1233
1369
  * @typedef {Object} ProjectsUpdateSmsTemplateRequestParams
1234
1370
  * @property {string} projectId Project unique ID.
1235
- * @property {string} type Template type
1236
- * @property {string} locale Template locale
1371
+ * @property {SmsTemplateType} type Template type
1372
+ * @property {SmsTemplateLocale} locale Template locale
1237
1373
  * @property {string} message Template message
1238
1374
  * @property {boolean} parseOutput
1239
1375
  * @property {libClient | undefined} sdk
@@ -1267,8 +1403,8 @@ const projectsUpdateSmsTemplate = async ({ projectId, type, locale, message, par
1267
1403
  /**
1268
1404
  * @typedef {Object} ProjectsDeleteSmsTemplateRequestParams
1269
1405
  * @property {string} projectId Project unique ID.
1270
- * @property {string} type Template type
1271
- * @property {string} locale Template locale
1406
+ * @property {SmsTemplateType} type Template type
1407
+ * @property {SmsTemplateLocale} locale Template locale
1272
1408
  * @property {boolean} parseOutput
1273
1409
  * @property {libClient | undefined} sdk
1274
1410
  */
@@ -1295,39 +1431,6 @@ const projectsDeleteSmsTemplate = async ({ projectId, type, locale, parseOutput
1295
1431
  return response;
1296
1432
  }
1297
1433
 
1298
- /**
1299
- * @typedef {Object} ProjectsGetUsageRequestParams
1300
- * @property {string} projectId Project unique ID.
1301
- * @property {string} range Date range.
1302
- * @property {boolean} parseOutput
1303
- * @property {libClient | undefined} sdk
1304
- */
1305
-
1306
- /**
1307
- * @param {ProjectsGetUsageRequestParams} params
1308
- */
1309
- const projectsGetUsage = async ({ projectId, range, parseOutput = true, sdk = undefined}) => {
1310
- let client = !sdk ? await sdkForConsole() : sdk;
1311
- let apiPath = '/projects/{projectId}/usage'.replace('{projectId}', projectId);
1312
- let payload = {};
1313
- if (typeof range !== 'undefined') {
1314
- payload['range'] = range;
1315
- }
1316
-
1317
- let response = undefined;
1318
-
1319
- response = await client.call('get', apiPath, {
1320
- 'content-type': 'application/json',
1321
- }, payload);
1322
-
1323
- if (parseOutput) {
1324
- parse(response)
1325
- success()
1326
- }
1327
-
1328
- return response;
1329
- }
1330
-
1331
1434
  /**
1332
1435
  * @typedef {Object} ProjectsListWebhooksRequestParams
1333
1436
  * @property {string} projectId Project unique ID.
@@ -1364,6 +1467,7 @@ const projectsListWebhooks = async ({ projectId, parseOutput = true, sdk = undef
1364
1467
  * @property {string[]} events Events list. Maximum of 100 events are allowed.
1365
1468
  * @property {string} url Webhook URL.
1366
1469
  * @property {boolean} security Certificate verification, false for disabled or true for enabled.
1470
+ * @property {boolean} enabled Enable or disable a webhook.
1367
1471
  * @property {string} httpUser Webhook HTTP user. Max length: 256 chars.
1368
1472
  * @property {string} httpPass Webhook HTTP password. Max length: 256 chars.
1369
1473
  * @property {boolean} parseOutput
@@ -1373,13 +1477,16 @@ const projectsListWebhooks = async ({ projectId, parseOutput = true, sdk = undef
1373
1477
  /**
1374
1478
  * @param {ProjectsCreateWebhookRequestParams} params
1375
1479
  */
1376
- const projectsCreateWebhook = async ({ projectId, name, events, url, security, httpUser, httpPass, parseOutput = true, sdk = undefined}) => {
1480
+ const projectsCreateWebhook = async ({ projectId, name, events, url, security, enabled, httpUser, httpPass, parseOutput = true, sdk = undefined}) => {
1377
1481
  let client = !sdk ? await sdkForConsole() : sdk;
1378
1482
  let apiPath = '/projects/{projectId}/webhooks'.replace('{projectId}', projectId);
1379
1483
  let payload = {};
1380
1484
  if (typeof name !== 'undefined') {
1381
1485
  payload['name'] = name;
1382
1486
  }
1487
+ if (typeof enabled !== 'undefined') {
1488
+ payload['enabled'] = enabled;
1489
+ }
1383
1490
  events = events === true ? [] : events;
1384
1491
  if (typeof events !== 'undefined') {
1385
1492
  payload['events'] = events;
@@ -1449,6 +1556,7 @@ const projectsGetWebhook = async ({ projectId, webhookId, parseOutput = true, sd
1449
1556
  * @property {string[]} events Events list. Maximum of 100 events are allowed.
1450
1557
  * @property {string} url Webhook URL.
1451
1558
  * @property {boolean} security Certificate verification, false for disabled or true for enabled.
1559
+ * @property {boolean} enabled Enable or disable a webhook.
1452
1560
  * @property {string} httpUser Webhook HTTP user. Max length: 256 chars.
1453
1561
  * @property {string} httpPass Webhook HTTP password. Max length: 256 chars.
1454
1562
  * @property {boolean} parseOutput
@@ -1458,13 +1566,16 @@ const projectsGetWebhook = async ({ projectId, webhookId, parseOutput = true, sd
1458
1566
  /**
1459
1567
  * @param {ProjectsUpdateWebhookRequestParams} params
1460
1568
  */
1461
- const projectsUpdateWebhook = async ({ projectId, webhookId, name, events, url, security, httpUser, httpPass, parseOutput = true, sdk = undefined}) => {
1569
+ const projectsUpdateWebhook = async ({ projectId, webhookId, name, events, url, security, enabled, httpUser, httpPass, parseOutput = true, sdk = undefined}) => {
1462
1570
  let client = !sdk ? await sdkForConsole() : sdk;
1463
1571
  let apiPath = '/projects/{projectId}/webhooks/{webhookId}'.replace('{projectId}', projectId).replace('{webhookId}', webhookId);
1464
1572
  let payload = {};
1465
1573
  if (typeof name !== 'undefined') {
1466
1574
  payload['name'] = name;
1467
1575
  }
1576
+ if (typeof enabled !== 'undefined') {
1577
+ payload['enabled'] = enabled;
1578
+ }
1468
1579
  events = events === true ? [] : events;
1469
1580
  if (typeof events !== 'undefined') {
1470
1581
  payload['events'] = events;
@@ -1609,6 +1720,21 @@ projects
1609
1720
  .requiredOption(`--projectId <projectId>`, `Project unique ID.`)
1610
1721
  .action(actionRunner(projectsDelete))
1611
1722
 
1723
+ projects
1724
+ .command(`updateApiStatus`)
1725
+ .description(``)
1726
+ .requiredOption(`--projectId <projectId>`, `Project unique ID.`)
1727
+ .requiredOption(`--api <api>`, `API name.`)
1728
+ .requiredOption(`--status <status>`, `API status.`, parseBool)
1729
+ .action(actionRunner(projectsUpdateApiStatus))
1730
+
1731
+ projects
1732
+ .command(`updateApiStatusAll`)
1733
+ .description(``)
1734
+ .requiredOption(`--projectId <projectId>`, `Project unique ID.`)
1735
+ .requiredOption(`--status <status>`, `API status.`, parseBool)
1736
+ .action(actionRunner(projectsUpdateApiStatusAll))
1737
+
1612
1738
  projects
1613
1739
  .command(`updateAuthDuration`)
1614
1740
  .description(``)
@@ -1655,7 +1781,7 @@ projects
1655
1781
  .command(`updateAuthStatus`)
1656
1782
  .description(``)
1657
1783
  .requiredOption(`--projectId <projectId>`, `Project unique ID.`)
1658
- .requiredOption(`--method <method>`, `Auth Method. Possible values: email-password,magic-url,anonymous,invites,jwt,phone`)
1784
+ .requiredOption(`--method <method>`, `Auth Method. Possible values: email-password,magic-url,email-otp,anonymous,invites,jwt,phone`)
1659
1785
  .requiredOption(`--status <status>`, `Set the status of this auth method.`, parseBool)
1660
1786
  .action(actionRunner(projectsUpdateAuthStatus))
1661
1787
 
@@ -1671,7 +1797,7 @@ projects
1671
1797
  .requiredOption(`--projectId <projectId>`, `Project unique ID.`)
1672
1798
  .requiredOption(`--name <name>`, `Key name. Max length: 128 chars.`)
1673
1799
  .requiredOption(`--scopes [scopes...]`, `Key scopes list. Maximum of 100 scopes are allowed.`)
1674
- .option(`--expire <expire>`, `Expiration time in ISO 8601 format. Use null for unlimited expiration.`)
1800
+ .option(`--expire <expire>`, `Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.`)
1675
1801
  .action(actionRunner(projectsCreateKey))
1676
1802
 
1677
1803
  projects
@@ -1688,7 +1814,7 @@ projects
1688
1814
  .requiredOption(`--keyId <keyId>`, `Key unique ID.`)
1689
1815
  .requiredOption(`--name <name>`, `Key name. Max length: 128 chars.`)
1690
1816
  .requiredOption(`--scopes [scopes...]`, `Key scopes list. Maximum of 100 events are allowed.`)
1691
- .option(`--expire <expire>`, `Expiration time in ISO 8601 format. Use null for unlimited expiration.`)
1817
+ .option(`--expire <expire>`, `Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.`)
1692
1818
  .action(actionRunner(projectsUpdateKey))
1693
1819
 
1694
1820
  projects
@@ -1766,7 +1892,7 @@ projects
1766
1892
  .action(actionRunner(projectsUpdateServiceStatusAll))
1767
1893
 
1768
1894
  projects
1769
- .command(`updateSmtpConfiguration`)
1895
+ .command(`updateSmtp`)
1770
1896
  .description(``)
1771
1897
  .requiredOption(`--projectId <projectId>`, `Project unique ID.`)
1772
1898
  .requiredOption(`--enabled <enabled>`, `Enable custom SMTP service`, parseBool)
@@ -1778,7 +1904,22 @@ projects
1778
1904
  .option(`--username <username>`, `SMTP server username`)
1779
1905
  .option(`--password <password>`, `SMTP server password`)
1780
1906
  .option(`--secure <secure>`, `Does SMTP server use secure connection`)
1781
- .action(actionRunner(projectsUpdateSmtpConfiguration))
1907
+ .action(actionRunner(projectsUpdateSmtp))
1908
+
1909
+ projects
1910
+ .command(`createSmtpTest`)
1911
+ .description(``)
1912
+ .requiredOption(`--projectId <projectId>`, `Project unique ID.`)
1913
+ .requiredOption(`--emails [emails...]`, `Array of emails to send test email to. Maximum of 10 emails are allowed.`)
1914
+ .requiredOption(`--senderName <senderName>`, `Name of the email sender`)
1915
+ .requiredOption(`--senderEmail <senderEmail>`, `Email of the sender`)
1916
+ .requiredOption(`--host <host>`, `SMTP server host name`)
1917
+ .option(`--replyTo <replyTo>`, `Reply to email`)
1918
+ .option(`--port <port>`, `SMTP server port`, parseInteger)
1919
+ .option(`--username <username>`, `SMTP server username`)
1920
+ .option(`--password <password>`, `SMTP server password`)
1921
+ .option(`--secure <secure>`, `Does SMTP server use secure connection`)
1922
+ .action(actionRunner(projectsCreateSmtpTest))
1782
1923
 
1783
1924
  projects
1784
1925
  .command(`updateTeam`)
@@ -1841,13 +1982,6 @@ projects
1841
1982
  .requiredOption(`--locale <locale>`, `Template locale`)
1842
1983
  .action(actionRunner(projectsDeleteSmsTemplate))
1843
1984
 
1844
- projects
1845
- .command(`getUsage`)
1846
- .description(``)
1847
- .requiredOption(`--projectId <projectId>`, `Project unique ID.`)
1848
- .option(`--range <range>`, `Date range.`)
1849
- .action(actionRunner(projectsGetUsage))
1850
-
1851
1985
  projects
1852
1986
  .command(`listWebhooks`)
1853
1987
  .description(``)
@@ -1862,6 +1996,7 @@ projects
1862
1996
  .requiredOption(`--events [events...]`, `Events list. Maximum of 100 events are allowed.`)
1863
1997
  .requiredOption(`--url <url>`, `Webhook URL.`)
1864
1998
  .requiredOption(`--security <security>`, `Certificate verification, false for disabled or true for enabled.`, parseBool)
1999
+ .option(`--enabled <enabled>`, `Enable or disable a webhook.`, parseBool)
1865
2000
  .option(`--httpUser <httpUser>`, `Webhook HTTP user. Max length: 256 chars.`)
1866
2001
  .option(`--httpPass <httpPass>`, `Webhook HTTP password. Max length: 256 chars.`)
1867
2002
  .action(actionRunner(projectsCreateWebhook))
@@ -1882,6 +2017,7 @@ projects
1882
2017
  .requiredOption(`--events [events...]`, `Events list. Maximum of 100 events are allowed.`)
1883
2018
  .requiredOption(`--url <url>`, `Webhook URL.`)
1884
2019
  .requiredOption(`--security <security>`, `Certificate verification, false for disabled or true for enabled.`, parseBool)
2020
+ .option(`--enabled <enabled>`, `Enable or disable a webhook.`, parseBool)
1885
2021
  .option(`--httpUser <httpUser>`, `Webhook HTTP user. Max length: 256 chars.`)
1886
2022
  .option(`--httpPass <httpPass>`, `Webhook HTTP password. Max length: 256 chars.`)
1887
2023
  .action(actionRunner(projectsUpdateWebhook))
@@ -1907,6 +2043,8 @@ module.exports = {
1907
2043
  projectsGet,
1908
2044
  projectsUpdate,
1909
2045
  projectsDelete,
2046
+ projectsUpdateApiStatus,
2047
+ projectsUpdateApiStatusAll,
1910
2048
  projectsUpdateAuthDuration,
1911
2049
  projectsUpdateAuthLimit,
1912
2050
  projectsUpdateAuthSessionsLimit,
@@ -1927,7 +2065,8 @@ module.exports = {
1927
2065
  projectsDeletePlatform,
1928
2066
  projectsUpdateServiceStatus,
1929
2067
  projectsUpdateServiceStatusAll,
1930
- projectsUpdateSmtpConfiguration,
2068
+ projectsUpdateSmtp,
2069
+ projectsCreateSmtpTest,
1931
2070
  projectsUpdateTeam,
1932
2071
  projectsGetEmailTemplate,
1933
2072
  projectsUpdateEmailTemplate,
@@ -1935,7 +2074,6 @@ module.exports = {
1935
2074
  projectsGetSmsTemplate,
1936
2075
  projectsUpdateSmsTemplate,
1937
2076
  projectsDeleteSmsTemplate,
1938
- projectsGetUsage,
1939
2077
  projectsListWebhooks,
1940
2078
  projectsCreateWebhook,
1941
2079
  projectsGetWebhook,
@@ -78,7 +78,7 @@ const proxyListRules = async ({ queries, search, parseOutput = true, sdk = undef
78
78
  /**
79
79
  * @typedef {Object} ProxyCreateRuleRequestParams
80
80
  * @property {string} domain Domain name.
81
- * @property {string} resourceType Action definition for the rule. Possible values are &quot;api&quot;, &quot;function&quot;
81
+ * @property {ResourceType} resourceType Action definition for the rule. Possible values are &quot;api&quot;, &quot;function&quot;
82
82
  * @property {string} resourceId ID of resource for the action type. If resourceType is &quot;api&quot;, leave empty. If resourceType is &quot;function&quot;, provide ID of the function.
83
83
  * @property {boolean} parseOutput
84
84
  * @property {libClient | undefined} sdk
@@ -84,7 +84,7 @@ const storageListBuckets = async ({ queries, search, parseOutput = true, sdk = u
84
84
  * @property {boolean} enabled Is bucket enabled? When set to &#039;disabled&#039;, users cannot access the files in this bucket but Server SDKs with and API key can still access the bucket. No files are lost when this is toggled.
85
85
  * @property {number} maximumFileSize Maximum file size allowed in bytes. Maximum allowed value is 30MB.
86
86
  * @property {string[]} allowedFileExtensions Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.
87
- * @property {string} compression Compression algorithm choosen for compression. Can be one of none, [gzip](https://en.wikipedia.org/wiki/Gzip), or [zstd](https://en.wikipedia.org/wiki/Zstd), For file size above 20MB compression is skipped even if it&#039;s enabled
87
+ * @property {Compression} compression Compression algorithm choosen for compression. Can be one of none, [gzip](https://en.wikipedia.org/wiki/Gzip), or [zstd](https://en.wikipedia.org/wiki/Zstd), For file size above 20MB compression is skipped even if it&#039;s enabled
88
88
  * @property {boolean} encryption Is encryption enabled? For file size above 20MB encryption is skipped even if it&#039;s enabled
89
89
  * @property {boolean} antivirus Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it&#039;s enabled
90
90
  * @property {boolean} parseOutput
@@ -183,7 +183,7 @@ const storageGetBucket = async ({ bucketId, parseOutput = true, sdk = undefined}
183
183
  * @property {boolean} enabled Is bucket enabled? When set to &#039;disabled&#039;, users cannot access the files in this bucket but Server SDKs with and API key can still access the bucket. No files are lost when this is toggled.
184
184
  * @property {number} maximumFileSize Maximum file size allowed in bytes. Maximum allowed value is 30MB.
185
185
  * @property {string[]} allowedFileExtensions Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.
186
- * @property {string} compression Compression algorithm choosen for compression. Can be one of none, [gzip](https://en.wikipedia.org/wiki/Gzip), or [zstd](https://en.wikipedia.org/wiki/Zstd), For file size above 20MB compression is skipped even if it&#039;s enabled
186
+ * @property {Compression} compression Compression algorithm choosen for compression. Can be one of none, [gzip](https://en.wikipedia.org/wiki/Gzip), or [zstd](https://en.wikipedia.org/wiki/Zstd), For file size above 20MB compression is skipped even if it&#039;s enabled
187
187
  * @property {boolean} encryption Is encryption enabled? For file size above 20MB encryption is skipped even if it&#039;s enabled
188
188
  * @property {boolean} antivirus Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it&#039;s enabled
189
189
  * @property {boolean} parseOutput
@@ -581,7 +581,7 @@ const storageGetFileDownload = async ({ bucketId, fileId, parseOutput = true, sd
581
581
  * @property {string} fileId File ID
582
582
  * @property {number} width Resize preview image width, Pass an integer between 0 to 4000.
583
583
  * @property {number} height Resize preview image height, Pass an integer between 0 to 4000.
584
- * @property {string} gravity Image crop gravity. Can be one of center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right
584
+ * @property {ImageGravity} gravity Image crop gravity. Can be one of center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right
585
585
  * @property {number} quality Preview image quality. Pass an integer between 0 to 100. Defaults to 100.
586
586
  * @property {number} borderWidth Preview image border in pixels. Pass an integer between 0 to 100. Defaults to 0.
587
587
  * @property {string} borderColor Preview image border color. Use a valid HEX color, no # is needed for prefix.
@@ -589,7 +589,7 @@ const storageGetFileDownload = async ({ bucketId, fileId, parseOutput = true, sd
589
589
  * @property {number} opacity Preview image opacity. Only works with images having an alpha channel (like png). Pass a number between 0 to 1.
590
590
  * @property {number} rotation Preview image rotation in degrees. Pass an integer between -360 and 360.
591
591
  * @property {string} background Preview image background color. Only works with transparent images (png). Use a valid HEX color, no # is needed for prefix.
592
- * @property {string} output Output format type (jpeg, jpg, png, gif and webp).
592
+ * @property {ImageFormat} output Output format type (jpeg, jpg, png, gif and webp).
593
593
  * @property {boolean} parseOutput
594
594
  * @property {libClient | undefined} sdk
595
595
  * @property {string} destination
@@ -695,7 +695,7 @@ const storageGetFileView = async ({ bucketId, fileId, parseOutput = true, sdk =
695
695
 
696
696
  /**
697
697
  * @typedef {Object} StorageGetUsageRequestParams
698
- * @property {string} range Date range.
698
+ * @property {StorageUsageRange} range Date range.
699
699
  * @property {boolean} parseOutput
700
700
  * @property {libClient | undefined} sdk
701
701
  */
@@ -728,7 +728,7 @@ const storageGetUsage = async ({ range, parseOutput = true, sdk = undefined}) =>
728
728
  /**
729
729
  * @typedef {Object} StorageGetBucketUsageRequestParams
730
730
  * @property {string} bucketId Bucket ID.
731
- * @property {string} range Date range.
731
+ * @property {StorageUsageRange} range Date range.
732
732
  * @property {boolean} parseOutput
733
733
  * @property {libClient | undefined} sdk
734
734
  */