appwrite-cli 12.0.1 → 13.0.0-rc.2

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 (801) hide show
  1. package/.github/workflows/build-verify.yml +71 -0
  2. package/.github/workflows/npm-publish.yml +41 -22
  3. package/CHANGELOG.md +108 -100
  4. package/LICENSE.md +1 -1
  5. package/README.md +58 -35
  6. package/bun.lock +625 -0
  7. package/dist/bundle.cjs +94853 -0
  8. package/dist/index.d.ts +3 -0
  9. package/dist/index.d.ts.map +1 -0
  10. package/dist/index.js +145 -0
  11. package/dist/index.js.map +1 -0
  12. package/dist/lib/client.d.ts +88 -0
  13. package/dist/lib/client.d.ts.map +1 -0
  14. package/dist/lib/client.js +238 -0
  15. package/dist/lib/client.js.map +1 -0
  16. package/dist/lib/commands/generic.d.ts +17 -0
  17. package/dist/lib/commands/generic.d.ts.map +1 -0
  18. package/dist/lib/commands/generic.js +292 -0
  19. package/dist/lib/commands/generic.js.map +1 -0
  20. package/dist/lib/commands/init.d.ts +3 -0
  21. package/dist/lib/commands/init.d.ts.map +1 -0
  22. package/{lib → dist/lib}/commands/init.js +186 -270
  23. package/dist/lib/commands/init.js.map +1 -0
  24. package/dist/lib/commands/pull.d.ts +8 -0
  25. package/dist/lib/commands/pull.d.ts.map +1 -0
  26. package/{lib → dist/lib}/commands/pull.js +159 -280
  27. package/dist/lib/commands/pull.js.map +1 -0
  28. package/dist/lib/commands/push.d.ts +4 -0
  29. package/dist/lib/commands/push.d.ts.map +1 -0
  30. package/dist/lib/commands/push.js +2127 -0
  31. package/dist/lib/commands/push.js.map +1 -0
  32. package/dist/lib/commands/run.d.ts +3 -0
  33. package/dist/lib/commands/run.d.ts.map +1 -0
  34. package/{lib → dist/lib}/commands/run.js +146 -187
  35. package/dist/lib/commands/run.js.map +1 -0
  36. package/dist/lib/commands/services/account.d.ts +3 -0
  37. package/dist/lib/commands/services/account.d.ts.map +1 -0
  38. package/dist/lib/commands/services/account.js +306 -0
  39. package/dist/lib/commands/services/account.js.map +1 -0
  40. package/dist/lib/commands/services/avatars.d.ts +3 -0
  41. package/dist/lib/commands/services/avatars.d.ts.map +1 -0
  42. package/dist/lib/commands/services/avatars.js +118 -0
  43. package/dist/lib/commands/services/avatars.js.map +1 -0
  44. package/dist/lib/commands/services/console.d.ts +3 -0
  45. package/dist/lib/commands/services/console.d.ts.map +1 -0
  46. package/dist/lib/commands/services/console.js +41 -0
  47. package/dist/lib/commands/services/console.js.map +1 -0
  48. package/dist/lib/commands/services/databases.d.ts +3 -0
  49. package/dist/lib/commands/services/databases.d.ts.map +1 -0
  50. package/dist/lib/commands/services/databases.js +612 -0
  51. package/dist/lib/commands/services/databases.js.map +1 -0
  52. package/dist/lib/commands/services/functions.d.ts +3 -0
  53. package/dist/lib/commands/services/functions.d.ts.map +1 -0
  54. package/dist/lib/commands/services/functions.js +258 -0
  55. package/dist/lib/commands/services/functions.js.map +1 -0
  56. package/dist/lib/commands/services/graphql.d.ts +3 -0
  57. package/dist/lib/commands/services/graphql.d.ts.map +1 -0
  58. package/dist/lib/commands/services/graphql.js +28 -0
  59. package/dist/lib/commands/services/graphql.js.map +1 -0
  60. package/dist/lib/commands/services/health.d.ts +3 -0
  61. package/dist/lib/commands/services/health.d.ts.map +1 -0
  62. package/dist/lib/commands/services/health.js +123 -0
  63. package/dist/lib/commands/services/health.js.map +1 -0
  64. package/dist/lib/commands/services/locale.d.ts +3 -0
  65. package/dist/lib/commands/services/locale.d.ts.map +1 -0
  66. package/dist/lib/commands/services/locale.js +52 -0
  67. package/dist/lib/commands/services/locale.js.map +1 -0
  68. package/dist/lib/commands/services/messaging.d.ts +3 -0
  69. package/dist/lib/commands/services/messaging.d.ts.map +1 -0
  70. package/dist/lib/commands/services/messaging.js +505 -0
  71. package/dist/lib/commands/services/messaging.js.map +1 -0
  72. package/dist/lib/commands/services/migrations.d.ts +3 -0
  73. package/dist/lib/commands/services/migrations.d.ts.map +1 -0
  74. package/dist/lib/commands/services/migrations.js +135 -0
  75. package/dist/lib/commands/services/migrations.js.map +1 -0
  76. package/dist/lib/commands/services/project.d.ts +3 -0
  77. package/dist/lib/commands/services/project.d.ts.map +1 -0
  78. package/dist/lib/commands/services/project.js +54 -0
  79. package/dist/lib/commands/services/project.js.map +1 -0
  80. package/dist/lib/commands/services/projects.d.ts +3 -0
  81. package/dist/lib/commands/services/projects.d.ts.map +1 -0
  82. package/dist/lib/commands/services/projects.js +415 -0
  83. package/dist/lib/commands/services/projects.js.map +1 -0
  84. package/dist/lib/commands/services/proxy.d.ts +3 -0
  85. package/dist/lib/commands/services/proxy.d.ts.map +1 -0
  86. package/dist/lib/commands/services/proxy.js +68 -0
  87. package/dist/lib/commands/services/proxy.js.map +1 -0
  88. package/dist/lib/commands/services/sites.d.ts +3 -0
  89. package/dist/lib/commands/services/sites.d.ts.map +1 -0
  90. package/dist/lib/commands/services/sites.js +242 -0
  91. package/dist/lib/commands/services/sites.js.map +1 -0
  92. package/dist/lib/commands/services/storage.d.ts +3 -0
  93. package/dist/lib/commands/services/storage.d.ts.map +1 -0
  94. package/dist/lib/commands/services/storage.js +153 -0
  95. package/dist/lib/commands/services/storage.js.map +1 -0
  96. package/dist/lib/commands/services/tablesdb.d.ts +3 -0
  97. package/dist/lib/commands/services/tablesdb.d.ts.map +1 -0
  98. package/dist/lib/commands/services/tablesdb.js +605 -0
  99. package/dist/lib/commands/services/tablesdb.js.map +1 -0
  100. package/dist/lib/commands/services/teams.d.ts +3 -0
  101. package/dist/lib/commands/services/teams.d.ts.map +1 -0
  102. package/dist/lib/commands/services/teams.js +123 -0
  103. package/dist/lib/commands/services/teams.js.map +1 -0
  104. package/dist/lib/commands/services/tokens.d.ts +3 -0
  105. package/dist/lib/commands/services/tokens.d.ts.map +1 -0
  106. package/dist/lib/commands/services/tokens.js +49 -0
  107. package/dist/lib/commands/services/tokens.js.map +1 -0
  108. package/dist/lib/commands/services/users.d.ts +3 -0
  109. package/dist/lib/commands/services/users.d.ts.map +1 -0
  110. package/dist/lib/commands/services/users.js +312 -0
  111. package/dist/lib/commands/services/users.js.map +1 -0
  112. package/dist/lib/commands/services/vcs.d.ts +3 -0
  113. package/dist/lib/commands/services/vcs.d.ts.map +1 -0
  114. package/dist/lib/commands/services/vcs.js +87 -0
  115. package/dist/lib/commands/services/vcs.js.map +1 -0
  116. package/dist/lib/commands/types.d.ts +3 -0
  117. package/dist/lib/commands/types.d.ts.map +1 -0
  118. package/dist/lib/commands/types.js +151 -0
  119. package/dist/lib/commands/types.js.map +1 -0
  120. package/dist/lib/commands/update.d.ts +3 -0
  121. package/dist/lib/commands/update.d.ts.map +1 -0
  122. package/{lib → dist/lib}/commands/update.js +62 -79
  123. package/dist/lib/commands/update.js.map +1 -0
  124. package/dist/lib/config.d.ts +118 -0
  125. package/dist/lib/config.d.ts.map +1 -0
  126. package/{lib → dist/lib}/config.js +173 -232
  127. package/dist/lib/config.js.map +1 -0
  128. package/dist/lib/emulation/docker.d.ts +7 -0
  129. package/dist/lib/emulation/docker.d.ts.map +1 -0
  130. package/dist/lib/emulation/docker.js +224 -0
  131. package/dist/lib/emulation/docker.js.map +1 -0
  132. package/dist/lib/emulation/utils.d.ts +29 -0
  133. package/dist/lib/emulation/utils.d.ts.map +1 -0
  134. package/{lib → dist/lib}/emulation/utils.js +70 -91
  135. package/dist/lib/emulation/utils.js.map +1 -0
  136. package/dist/lib/id.d.ts +7 -0
  137. package/dist/lib/id.d.ts.map +1 -0
  138. package/{lib → dist/lib}/id.js +5 -8
  139. package/dist/lib/id.js.map +1 -0
  140. package/dist/lib/paginate.d.ts +9 -0
  141. package/dist/lib/paginate.d.ts.map +1 -0
  142. package/{lib → dist/lib}/paginate.js +10 -19
  143. package/dist/lib/paginate.js.map +1 -0
  144. package/dist/lib/parser.d.ts +18 -0
  145. package/dist/lib/parser.d.ts.map +1 -0
  146. package/dist/lib/parser.js +225 -0
  147. package/dist/lib/parser.js.map +1 -0
  148. package/dist/lib/questions.d.ts +59 -0
  149. package/dist/lib/questions.d.ts.map +1 -0
  150. package/{lib → dist/lib}/questions.js +393 -500
  151. package/dist/lib/questions.js.map +1 -0
  152. package/dist/lib/sdks.d.ts +4 -0
  153. package/dist/lib/sdks.d.ts.map +1 -0
  154. package/dist/lib/sdks.js +61 -0
  155. package/dist/lib/sdks.js.map +1 -0
  156. package/dist/lib/services.d.ts +13 -0
  157. package/dist/lib/services.d.ts.map +1 -0
  158. package/dist/lib/services.js +47 -0
  159. package/dist/lib/services.js.map +1 -0
  160. package/dist/lib/spinner.d.ts +28 -0
  161. package/dist/lib/spinner.d.ts.map +1 -0
  162. package/dist/lib/spinner.js +91 -0
  163. package/dist/lib/spinner.js.map +1 -0
  164. package/dist/lib/type-generation/attribute.d.ts +17 -0
  165. package/dist/lib/type-generation/attribute.d.ts.map +1 -0
  166. package/{lib → dist/lib}/type-generation/attribute.js +2 -5
  167. package/dist/lib/type-generation/attribute.js.map +1 -0
  168. package/dist/lib/type-generation/languages/csharp.d.ts +7 -0
  169. package/dist/lib/type-generation/languages/csharp.d.ts.map +1 -0
  170. package/dist/lib/type-generation/languages/csharp.js +180 -0
  171. package/dist/lib/type-generation/languages/csharp.js.map +1 -0
  172. package/dist/lib/type-generation/languages/dart.d.ts +8 -0
  173. package/dist/lib/type-generation/languages/dart.d.ts.map +1 -0
  174. package/dist/lib/type-generation/languages/dart.js +197 -0
  175. package/dist/lib/type-generation/languages/dart.js.map +1 -0
  176. package/dist/lib/type-generation/languages/java.d.ts +7 -0
  177. package/dist/lib/type-generation/languages/java.d.ts.map +1 -0
  178. package/dist/lib/type-generation/languages/java.js +140 -0
  179. package/dist/lib/type-generation/languages/java.js.map +1 -0
  180. package/dist/lib/type-generation/languages/javascript.d.ts +9 -0
  181. package/dist/lib/type-generation/languages/javascript.d.ts.map +1 -0
  182. package/dist/lib/type-generation/languages/javascript.js +109 -0
  183. package/dist/lib/type-generation/languages/javascript.js.map +1 -0
  184. package/dist/lib/type-generation/languages/kotlin.d.ts +7 -0
  185. package/dist/lib/type-generation/languages/kotlin.d.ts.map +1 -0
  186. package/dist/lib/type-generation/languages/kotlin.js +95 -0
  187. package/dist/lib/type-generation/languages/kotlin.js.map +1 -0
  188. package/dist/lib/type-generation/languages/language.d.ts +43 -0
  189. package/dist/lib/type-generation/languages/language.d.ts.map +1 -0
  190. package/dist/lib/type-generation/languages/language.js +77 -0
  191. package/dist/lib/type-generation/languages/language.js.map +1 -0
  192. package/dist/lib/type-generation/languages/php.d.ts +7 -0
  193. package/dist/lib/type-generation/languages/php.d.ts.map +1 -0
  194. package/dist/lib/type-generation/languages/php.js +116 -0
  195. package/dist/lib/type-generation/languages/php.js.map +1 -0
  196. package/dist/lib/type-generation/languages/swift.d.ts +7 -0
  197. package/dist/lib/type-generation/languages/swift.d.ts.map +1 -0
  198. package/dist/lib/type-generation/languages/swift.js +179 -0
  199. package/dist/lib/type-generation/languages/swift.js.map +1 -0
  200. package/dist/lib/type-generation/languages/typescript.d.ts +9 -0
  201. package/dist/lib/type-generation/languages/typescript.d.ts.map +1 -0
  202. package/dist/lib/type-generation/languages/typescript.js +115 -0
  203. package/dist/lib/type-generation/languages/typescript.js.map +1 -0
  204. package/dist/lib/types.d.ts +277 -0
  205. package/dist/lib/types.d.ts.map +1 -0
  206. package/dist/lib/types.js +2 -0
  207. package/dist/lib/types.js.map +1 -0
  208. package/dist/lib/utils.d.ts +15 -0
  209. package/dist/lib/utils.d.ts.map +1 -0
  210. package/{lib → dist/lib}/utils.js +125 -167
  211. package/dist/lib/utils.js.map +1 -0
  212. package/dist/lib/validations.d.ts +2 -0
  213. package/dist/lib/validations.d.ts.map +1 -0
  214. package/dist/lib/validations.js +16 -0
  215. package/dist/lib/validations.js.map +1 -0
  216. package/dist/package.json +67 -0
  217. package/dist/scripts/generate-commands.d.ts +2 -0
  218. package/dist/scripts/generate-commands.d.ts.map +1 -0
  219. package/dist/scripts/generate-commands.js +398 -0
  220. package/dist/scripts/generate-commands.js.map +1 -0
  221. package/index.ts +168 -0
  222. package/install.ps1 +2 -5
  223. package/install.sh +1 -2
  224. package/lib/client.ts +292 -0
  225. package/lib/commands/generic.ts +440 -0
  226. package/lib/commands/init.ts +713 -0
  227. package/lib/commands/pull.ts +668 -0
  228. package/lib/commands/push.ts +3183 -0
  229. package/lib/commands/run.ts +416 -0
  230. package/lib/commands/services/account.ts +832 -0
  231. package/lib/commands/services/avatars.ts +400 -0
  232. package/lib/commands/services/console.ts +73 -0
  233. package/lib/commands/services/databases.ts +2080 -0
  234. package/lib/commands/services/functions.ts +855 -0
  235. package/lib/commands/services/graphql.ts +47 -0
  236. package/lib/commands/services/health.ts +322 -0
  237. package/lib/commands/services/locale.ts +99 -0
  238. package/lib/commands/services/messaging.ts +1871 -0
  239. package/lib/commands/services/migrations.ts +421 -0
  240. package/lib/commands/services/project.ts +116 -0
  241. package/lib/commands/services/projects.ts +1317 -0
  242. package/lib/commands/services/proxy.ts +163 -0
  243. package/lib/commands/services/sites.ts +777 -0
  244. package/lib/commands/services/storage.ts +547 -0
  245. package/lib/commands/services/tablesdb.ts +1928 -0
  246. package/lib/commands/services/teams.ts +294 -0
  247. package/lib/commands/services/tokens.ts +106 -0
  248. package/lib/commands/services/users.ts +886 -0
  249. package/lib/commands/services/vcs.ts +268 -0
  250. package/lib/commands/types.ts +220 -0
  251. package/lib/commands/update.ts +255 -0
  252. package/lib/config.ts +969 -0
  253. package/lib/emulation/docker.ts +312 -0
  254. package/lib/emulation/utils.ts +207 -0
  255. package/lib/id.ts +30 -0
  256. package/lib/paginate.ts +77 -0
  257. package/lib/parser.ts +264 -0
  258. package/lib/questions.ts +1167 -0
  259. package/lib/sdks.ts +84 -0
  260. package/lib/services.ts +72 -0
  261. package/lib/spinner.ts +131 -0
  262. package/lib/type-generation/attribute.ts +18 -0
  263. package/lib/type-generation/languages/{csharp.js → csharp.ts} +27 -14
  264. package/lib/type-generation/languages/{dart.js → dart.ts} +61 -46
  265. package/lib/type-generation/languages/{java.js → java.ts} +31 -18
  266. package/lib/type-generation/languages/{javascript.js → javascript.ts} +35 -24
  267. package/lib/type-generation/languages/{kotlin.js → kotlin.ts} +27 -14
  268. package/lib/type-generation/languages/{language.js → language.ts} +45 -43
  269. package/lib/type-generation/languages/{php.js → php.ts} +28 -15
  270. package/lib/type-generation/languages/{swift.js → swift.ts} +27 -14
  271. package/lib/type-generation/languages/{typescript.js → typescript.ts} +43 -26
  272. package/lib/types.ts +304 -0
  273. package/lib/utils.ts +352 -0
  274. package/lib/validations.ts +20 -0
  275. package/package.json +36 -19
  276. package/scoop/appwrite.config.json +19 -29
  277. package/scripts/generate-commands.ts +539 -0
  278. package/tsconfig.json +24 -0
  279. package/.github/workflows/autoclose.yml +0 -11
  280. package/docs/examples/account/create-anonymous-session.md +0 -1
  281. package/docs/examples/account/create-email-password-session.md +0 -3
  282. package/docs/examples/account/create-email-token.md +0 -3
  283. package/docs/examples/account/create-email-verification.md +0 -2
  284. package/docs/examples/account/create-jwt.md +0 -1
  285. package/docs/examples/account/create-magic-url-token.md +0 -3
  286. package/docs/examples/account/create-mfa-authenticator.md +0 -2
  287. package/docs/examples/account/create-mfa-challenge.md +0 -2
  288. package/docs/examples/account/create-mfa-recovery-codes.md +0 -1
  289. package/docs/examples/account/create-o-auth-2-session.md +0 -2
  290. package/docs/examples/account/create-o-auth-2-token.md +0 -2
  291. package/docs/examples/account/create-phone-token.md +0 -3
  292. package/docs/examples/account/create-phone-verification.md +0 -1
  293. package/docs/examples/account/create-push-target.md +0 -3
  294. package/docs/examples/account/create-recovery.md +0 -3
  295. package/docs/examples/account/create-session.md +0 -3
  296. package/docs/examples/account/create-verification.md +0 -2
  297. package/docs/examples/account/create.md +0 -4
  298. package/docs/examples/account/delete-identity.md +0 -2
  299. package/docs/examples/account/delete-mfa-authenticator.md +0 -2
  300. package/docs/examples/account/delete-push-target.md +0 -2
  301. package/docs/examples/account/delete-session.md +0 -2
  302. package/docs/examples/account/delete-sessions.md +0 -1
  303. package/docs/examples/account/delete.md +0 -1
  304. package/docs/examples/account/get-mfa-recovery-codes.md +0 -1
  305. package/docs/examples/account/get-prefs.md +0 -1
  306. package/docs/examples/account/get-session.md +0 -2
  307. package/docs/examples/account/get.md +0 -1
  308. package/docs/examples/account/list-identities.md +0 -1
  309. package/docs/examples/account/list-logs.md +0 -1
  310. package/docs/examples/account/list-mfa-factors.md +0 -1
  311. package/docs/examples/account/list-sessions.md +0 -1
  312. package/docs/examples/account/update-email-verification.md +0 -3
  313. package/docs/examples/account/update-email.md +0 -3
  314. package/docs/examples/account/update-magic-url-session.md +0 -3
  315. package/docs/examples/account/update-mfa-authenticator.md +0 -3
  316. package/docs/examples/account/update-mfa-challenge.md +0 -3
  317. package/docs/examples/account/update-mfa-recovery-codes.md +0 -1
  318. package/docs/examples/account/update-mfa.md +0 -2
  319. package/docs/examples/account/update-name.md +0 -2
  320. package/docs/examples/account/update-password.md +0 -2
  321. package/docs/examples/account/update-phone-session.md +0 -3
  322. package/docs/examples/account/update-phone-verification.md +0 -3
  323. package/docs/examples/account/update-phone.md +0 -3
  324. package/docs/examples/account/update-prefs.md +0 -2
  325. package/docs/examples/account/update-push-target.md +0 -3
  326. package/docs/examples/account/update-recovery.md +0 -4
  327. package/docs/examples/account/update-session.md +0 -2
  328. package/docs/examples/account/update-status.md +0 -1
  329. package/docs/examples/account/update-verification.md +0 -3
  330. package/docs/examples/console/get-resource.md +0 -3
  331. package/docs/examples/console/variables.md +0 -1
  332. package/docs/examples/databases/create-boolean-attribute.md +0 -5
  333. package/docs/examples/databases/create-collection.md +0 -4
  334. package/docs/examples/databases/create-datetime-attribute.md +0 -5
  335. package/docs/examples/databases/create-document.md +0 -5
  336. package/docs/examples/databases/create-documents.md +0 -4
  337. package/docs/examples/databases/create-email-attribute.md +0 -5
  338. package/docs/examples/databases/create-enum-attribute.md +0 -6
  339. package/docs/examples/databases/create-float-attribute.md +0 -5
  340. package/docs/examples/databases/create-index.md +0 -6
  341. package/docs/examples/databases/create-integer-attribute.md +0 -5
  342. package/docs/examples/databases/create-ip-attribute.md +0 -5
  343. package/docs/examples/databases/create-line-attribute.md +0 -5
  344. package/docs/examples/databases/create-operations.md +0 -2
  345. package/docs/examples/databases/create-point-attribute.md +0 -5
  346. package/docs/examples/databases/create-polygon-attribute.md +0 -5
  347. package/docs/examples/databases/create-relationship-attribute.md +0 -5
  348. package/docs/examples/databases/create-string-attribute.md +0 -6
  349. package/docs/examples/databases/create-transaction.md +0 -1
  350. package/docs/examples/databases/create-url-attribute.md +0 -5
  351. package/docs/examples/databases/create.md +0 -3
  352. package/docs/examples/databases/decrement-document-attribute.md +0 -5
  353. package/docs/examples/databases/delete-attribute.md +0 -4
  354. package/docs/examples/databases/delete-collection.md +0 -3
  355. package/docs/examples/databases/delete-document.md +0 -4
  356. package/docs/examples/databases/delete-documents.md +0 -3
  357. package/docs/examples/databases/delete-index.md +0 -4
  358. package/docs/examples/databases/delete-transaction.md +0 -2
  359. package/docs/examples/databases/delete.md +0 -2
  360. package/docs/examples/databases/get-attribute.md +0 -4
  361. package/docs/examples/databases/get-collection-usage.md +0 -3
  362. package/docs/examples/databases/get-collection.md +0 -3
  363. package/docs/examples/databases/get-document.md +0 -4
  364. package/docs/examples/databases/get-index.md +0 -4
  365. package/docs/examples/databases/get-transaction.md +0 -2
  366. package/docs/examples/databases/get-usage.md +0 -2
  367. package/docs/examples/databases/get.md +0 -2
  368. package/docs/examples/databases/increment-document-attribute.md +0 -5
  369. package/docs/examples/databases/list-attributes.md +0 -3
  370. package/docs/examples/databases/list-collection-logs.md +0 -3
  371. package/docs/examples/databases/list-collections.md +0 -2
  372. package/docs/examples/databases/list-document-logs.md +0 -4
  373. package/docs/examples/databases/list-documents.md +0 -3
  374. package/docs/examples/databases/list-indexes.md +0 -3
  375. package/docs/examples/databases/list-logs.md +0 -2
  376. package/docs/examples/databases/list-transactions.md +0 -1
  377. package/docs/examples/databases/list-usage.md +0 -1
  378. package/docs/examples/databases/list.md +0 -1
  379. package/docs/examples/databases/update-boolean-attribute.md +0 -6
  380. package/docs/examples/databases/update-collection.md +0 -4
  381. package/docs/examples/databases/update-datetime-attribute.md +0 -6
  382. package/docs/examples/databases/update-document.md +0 -4
  383. package/docs/examples/databases/update-documents.md +0 -3
  384. package/docs/examples/databases/update-email-attribute.md +0 -6
  385. package/docs/examples/databases/update-enum-attribute.md +0 -7
  386. package/docs/examples/databases/update-float-attribute.md +0 -6
  387. package/docs/examples/databases/update-integer-attribute.md +0 -6
  388. package/docs/examples/databases/update-ip-attribute.md +0 -6
  389. package/docs/examples/databases/update-line-attribute.md +0 -5
  390. package/docs/examples/databases/update-point-attribute.md +0 -5
  391. package/docs/examples/databases/update-polygon-attribute.md +0 -5
  392. package/docs/examples/databases/update-relationship-attribute.md +0 -4
  393. package/docs/examples/databases/update-string-attribute.md +0 -6
  394. package/docs/examples/databases/update-transaction.md +0 -2
  395. package/docs/examples/databases/update-url-attribute.md +0 -6
  396. package/docs/examples/databases/update.md +0 -3
  397. package/docs/examples/databases/upsert-document.md +0 -5
  398. package/docs/examples/databases/upsert-documents.md +0 -4
  399. package/docs/examples/functions/create-deployment.md +0 -4
  400. package/docs/examples/functions/create-duplicate-deployment.md +0 -3
  401. package/docs/examples/functions/create-execution.md +0 -2
  402. package/docs/examples/functions/create-template-deployment.md +0 -7
  403. package/docs/examples/functions/create-variable.md +0 -4
  404. package/docs/examples/functions/create-vcs-deployment.md +0 -4
  405. package/docs/examples/functions/create.md +0 -4
  406. package/docs/examples/functions/delete-deployment.md +0 -3
  407. package/docs/examples/functions/delete-execution.md +0 -3
  408. package/docs/examples/functions/delete-variable.md +0 -3
  409. package/docs/examples/functions/delete.md +0 -2
  410. package/docs/examples/functions/get-deployment-download.md +0 -3
  411. package/docs/examples/functions/get-deployment.md +0 -3
  412. package/docs/examples/functions/get-execution.md +0 -3
  413. package/docs/examples/functions/get-template.md +0 -2
  414. package/docs/examples/functions/get-usage.md +0 -2
  415. package/docs/examples/functions/get-variable.md +0 -3
  416. package/docs/examples/functions/get.md +0 -2
  417. package/docs/examples/functions/list-deployments.md +0 -2
  418. package/docs/examples/functions/list-executions.md +0 -2
  419. package/docs/examples/functions/list-runtimes.md +0 -1
  420. package/docs/examples/functions/list-specifications.md +0 -1
  421. package/docs/examples/functions/list-templates.md +0 -1
  422. package/docs/examples/functions/list-usage.md +0 -1
  423. package/docs/examples/functions/list-variables.md +0 -2
  424. package/docs/examples/functions/list.md +0 -1
  425. package/docs/examples/functions/update-deployment-status.md +0 -3
  426. package/docs/examples/functions/update-function-deployment.md +0 -3
  427. package/docs/examples/functions/update-variable.md +0 -4
  428. package/docs/examples/functions/update.md +0 -3
  429. package/docs/examples/graphql/mutation.md +0 -2
  430. package/docs/examples/graphql/query.md +0 -2
  431. package/docs/examples/health/get-antivirus.md +0 -1
  432. package/docs/examples/health/get-cache.md +0 -1
  433. package/docs/examples/health/get-certificate.md +0 -1
  434. package/docs/examples/health/get-db.md +0 -1
  435. package/docs/examples/health/get-failed-jobs.md +0 -2
  436. package/docs/examples/health/get-pub-sub.md +0 -1
  437. package/docs/examples/health/get-queue-builds.md +0 -1
  438. package/docs/examples/health/get-queue-certificates.md +0 -1
  439. package/docs/examples/health/get-queue-databases.md +0 -1
  440. package/docs/examples/health/get-queue-deletes.md +0 -1
  441. package/docs/examples/health/get-queue-functions.md +0 -1
  442. package/docs/examples/health/get-queue-logs.md +0 -1
  443. package/docs/examples/health/get-queue-mails.md +0 -1
  444. package/docs/examples/health/get-queue-messaging.md +0 -1
  445. package/docs/examples/health/get-queue-migrations.md +0 -1
  446. package/docs/examples/health/get-queue-stats-resources.md +0 -1
  447. package/docs/examples/health/get-queue-usage.md +0 -1
  448. package/docs/examples/health/get-queue-webhooks.md +0 -1
  449. package/docs/examples/health/get-storage-local.md +0 -1
  450. package/docs/examples/health/get-storage.md +0 -1
  451. package/docs/examples/health/get-time.md +0 -1
  452. package/docs/examples/health/get.md +0 -1
  453. package/docs/examples/locale/get.md +0 -1
  454. package/docs/examples/locale/list-codes.md +0 -1
  455. package/docs/examples/locale/list-continents.md +0 -1
  456. package/docs/examples/locale/list-countries-eu.md +0 -1
  457. package/docs/examples/locale/list-countries-phones.md +0 -1
  458. package/docs/examples/locale/list-countries.md +0 -1
  459. package/docs/examples/locale/list-currencies.md +0 -1
  460. package/docs/examples/locale/list-languages.md +0 -1
  461. package/docs/examples/messaging/create-apns-provider.md +0 -3
  462. package/docs/examples/messaging/create-email.md +0 -4
  463. package/docs/examples/messaging/create-fcm-provider.md +0 -3
  464. package/docs/examples/messaging/create-mailgun-provider.md +0 -3
  465. package/docs/examples/messaging/create-msg-91-provider.md +0 -3
  466. package/docs/examples/messaging/create-push.md +0 -2
  467. package/docs/examples/messaging/create-resend-provider.md +0 -3
  468. package/docs/examples/messaging/create-sendgrid-provider.md +0 -3
  469. package/docs/examples/messaging/create-sms.md +0 -3
  470. package/docs/examples/messaging/create-smtp-provider.md +0 -4
  471. package/docs/examples/messaging/create-subscriber.md +0 -4
  472. package/docs/examples/messaging/create-telesign-provider.md +0 -3
  473. package/docs/examples/messaging/create-textmagic-provider.md +0 -3
  474. package/docs/examples/messaging/create-topic.md +0 -3
  475. package/docs/examples/messaging/create-twilio-provider.md +0 -3
  476. package/docs/examples/messaging/create-vonage-provider.md +0 -3
  477. package/docs/examples/messaging/delete-provider.md +0 -2
  478. package/docs/examples/messaging/delete-subscriber.md +0 -3
  479. package/docs/examples/messaging/delete-topic.md +0 -2
  480. package/docs/examples/messaging/delete.md +0 -2
  481. package/docs/examples/messaging/get-message.md +0 -2
  482. package/docs/examples/messaging/get-provider.md +0 -2
  483. package/docs/examples/messaging/get-subscriber.md +0 -3
  484. package/docs/examples/messaging/get-topic.md +0 -2
  485. package/docs/examples/messaging/list-message-logs.md +0 -2
  486. package/docs/examples/messaging/list-messages.md +0 -1
  487. package/docs/examples/messaging/list-provider-logs.md +0 -2
  488. package/docs/examples/messaging/list-providers.md +0 -1
  489. package/docs/examples/messaging/list-subscriber-logs.md +0 -2
  490. package/docs/examples/messaging/list-subscribers.md +0 -2
  491. package/docs/examples/messaging/list-targets.md +0 -2
  492. package/docs/examples/messaging/list-topic-logs.md +0 -2
  493. package/docs/examples/messaging/list-topics.md +0 -1
  494. package/docs/examples/messaging/update-apns-provider.md +0 -2
  495. package/docs/examples/messaging/update-email.md +0 -2
  496. package/docs/examples/messaging/update-fcm-provider.md +0 -2
  497. package/docs/examples/messaging/update-mailgun-provider.md +0 -2
  498. package/docs/examples/messaging/update-msg-91-provider.md +0 -2
  499. package/docs/examples/messaging/update-push.md +0 -2
  500. package/docs/examples/messaging/update-resend-provider.md +0 -2
  501. package/docs/examples/messaging/update-sendgrid-provider.md +0 -2
  502. package/docs/examples/messaging/update-sms.md +0 -2
  503. package/docs/examples/messaging/update-smtp-provider.md +0 -2
  504. package/docs/examples/messaging/update-telesign-provider.md +0 -2
  505. package/docs/examples/messaging/update-textmagic-provider.md +0 -2
  506. package/docs/examples/messaging/update-topic.md +0 -2
  507. package/docs/examples/messaging/update-twilio-provider.md +0 -2
  508. package/docs/examples/messaging/update-vonage-provider.md +0 -2
  509. package/docs/examples/migrations/create-appwrite-migration.md +0 -5
  510. package/docs/examples/migrations/create-csv-export.md +0 -3
  511. package/docs/examples/migrations/create-csv-import.md +0 -4
  512. package/docs/examples/migrations/create-firebase-migration.md +0 -3
  513. package/docs/examples/migrations/create-n-host-migration.md +0 -8
  514. package/docs/examples/migrations/create-supabase-migration.md +0 -7
  515. package/docs/examples/migrations/delete.md +0 -2
  516. package/docs/examples/migrations/get-appwrite-report.md +0 -5
  517. package/docs/examples/migrations/get-firebase-report.md +0 -3
  518. package/docs/examples/migrations/get-n-host-report.md +0 -8
  519. package/docs/examples/migrations/get-supabase-report.md +0 -7
  520. package/docs/examples/migrations/get.md +0 -2
  521. package/docs/examples/migrations/list.md +0 -1
  522. package/docs/examples/migrations/retry.md +0 -2
  523. package/docs/examples/project/create-variable.md +0 -3
  524. package/docs/examples/project/delete-variable.md +0 -2
  525. package/docs/examples/project/get-usage.md +0 -3
  526. package/docs/examples/project/get-variable.md +0 -2
  527. package/docs/examples/project/list-variables.md +0 -1
  528. package/docs/examples/project/update-variable.md +0 -3
  529. package/docs/examples/projects/create-dev-key.md +0 -4
  530. package/docs/examples/projects/create-jwt.md +0 -3
  531. package/docs/examples/projects/create-key.md +0 -4
  532. package/docs/examples/projects/create-platform.md +0 -4
  533. package/docs/examples/projects/create-smtp-test.md +0 -6
  534. package/docs/examples/projects/create-webhook.md +0 -6
  535. package/docs/examples/projects/create.md +0 -4
  536. package/docs/examples/projects/delete-dev-key.md +0 -3
  537. package/docs/examples/projects/delete-email-template.md +0 -4
  538. package/docs/examples/projects/delete-key.md +0 -3
  539. package/docs/examples/projects/delete-platform.md +0 -3
  540. package/docs/examples/projects/delete-sms-template.md +0 -4
  541. package/docs/examples/projects/delete-webhook.md +0 -3
  542. package/docs/examples/projects/delete.md +0 -2
  543. package/docs/examples/projects/get-dev-key.md +0 -3
  544. package/docs/examples/projects/get-email-template.md +0 -4
  545. package/docs/examples/projects/get-key.md +0 -3
  546. package/docs/examples/projects/get-platform.md +0 -3
  547. package/docs/examples/projects/get-sms-template.md +0 -4
  548. package/docs/examples/projects/get-webhook.md +0 -3
  549. package/docs/examples/projects/get.md +0 -2
  550. package/docs/examples/projects/list-dev-keys.md +0 -2
  551. package/docs/examples/projects/list-keys.md +0 -2
  552. package/docs/examples/projects/list-platforms.md +0 -2
  553. package/docs/examples/projects/list-webhooks.md +0 -2
  554. package/docs/examples/projects/list.md +0 -1
  555. package/docs/examples/projects/update-api-status-all.md +0 -3
  556. package/docs/examples/projects/update-api-status.md +0 -4
  557. package/docs/examples/projects/update-auth-duration.md +0 -3
  558. package/docs/examples/projects/update-auth-limit.md +0 -3
  559. package/docs/examples/projects/update-auth-password-dictionary.md +0 -3
  560. package/docs/examples/projects/update-auth-password-history.md +0 -3
  561. package/docs/examples/projects/update-auth-sessions-limit.md +0 -3
  562. package/docs/examples/projects/update-auth-status.md +0 -4
  563. package/docs/examples/projects/update-dev-key.md +0 -5
  564. package/docs/examples/projects/update-email-template.md +0 -6
  565. package/docs/examples/projects/update-key.md +0 -5
  566. package/docs/examples/projects/update-memberships-privacy.md +0 -5
  567. package/docs/examples/projects/update-mock-numbers.md +0 -3
  568. package/docs/examples/projects/update-o-auth-2.md +0 -3
  569. package/docs/examples/projects/update-personal-data-check.md +0 -3
  570. package/docs/examples/projects/update-platform.md +0 -4
  571. package/docs/examples/projects/update-service-status-all.md +0 -3
  572. package/docs/examples/projects/update-service-status.md +0 -4
  573. package/docs/examples/projects/update-session-alerts.md +0 -3
  574. package/docs/examples/projects/update-session-invalidation.md +0 -3
  575. package/docs/examples/projects/update-sms-template.md +0 -5
  576. package/docs/examples/projects/update-smtp.md +0 -3
  577. package/docs/examples/projects/update-team.md +0 -3
  578. package/docs/examples/projects/update-webhook-signature.md +0 -3
  579. package/docs/examples/projects/update-webhook.md +0 -7
  580. package/docs/examples/projects/update.md +0 -3
  581. package/docs/examples/proxy/create-api-rule.md +0 -2
  582. package/docs/examples/proxy/create-function-rule.md +0 -3
  583. package/docs/examples/proxy/create-redirect-rule.md +0 -6
  584. package/docs/examples/proxy/create-site-rule.md +0 -3
  585. package/docs/examples/proxy/delete-rule.md +0 -2
  586. package/docs/examples/proxy/get-rule.md +0 -2
  587. package/docs/examples/proxy/list-rules.md +0 -1
  588. package/docs/examples/proxy/update-rule-verification.md +0 -2
  589. package/docs/examples/sites/create-deployment.md +0 -4
  590. package/docs/examples/sites/create-duplicate-deployment.md +0 -3
  591. package/docs/examples/sites/create-template-deployment.md +0 -7
  592. package/docs/examples/sites/create-variable.md +0 -4
  593. package/docs/examples/sites/create-vcs-deployment.md +0 -4
  594. package/docs/examples/sites/create.md +0 -5
  595. package/docs/examples/sites/delete-deployment.md +0 -3
  596. package/docs/examples/sites/delete-log.md +0 -3
  597. package/docs/examples/sites/delete-variable.md +0 -3
  598. package/docs/examples/sites/delete.md +0 -2
  599. package/docs/examples/sites/get-deployment-download.md +0 -3
  600. package/docs/examples/sites/get-deployment.md +0 -3
  601. package/docs/examples/sites/get-log.md +0 -3
  602. package/docs/examples/sites/get-template.md +0 -2
  603. package/docs/examples/sites/get-usage.md +0 -2
  604. package/docs/examples/sites/get-variable.md +0 -3
  605. package/docs/examples/sites/get.md +0 -2
  606. package/docs/examples/sites/list-deployments.md +0 -2
  607. package/docs/examples/sites/list-frameworks.md +0 -1
  608. package/docs/examples/sites/list-logs.md +0 -2
  609. package/docs/examples/sites/list-specifications.md +0 -1
  610. package/docs/examples/sites/list-templates.md +0 -1
  611. package/docs/examples/sites/list-usage.md +0 -1
  612. package/docs/examples/sites/list-variables.md +0 -2
  613. package/docs/examples/sites/list.md +0 -1
  614. package/docs/examples/sites/update-deployment-status.md +0 -3
  615. package/docs/examples/sites/update-site-deployment.md +0 -3
  616. package/docs/examples/sites/update-variable.md +0 -4
  617. package/docs/examples/sites/update.md +0 -4
  618. package/docs/examples/storage/create-bucket.md +0 -3
  619. package/docs/examples/storage/create-file.md +0 -4
  620. package/docs/examples/storage/delete-bucket.md +0 -2
  621. package/docs/examples/storage/delete-file.md +0 -3
  622. package/docs/examples/storage/get-bucket-usage.md +0 -2
  623. package/docs/examples/storage/get-bucket.md +0 -2
  624. package/docs/examples/storage/get-file-download.md +0 -3
  625. package/docs/examples/storage/get-file-preview.md +0 -3
  626. package/docs/examples/storage/get-file-view.md +0 -3
  627. package/docs/examples/storage/get-file.md +0 -3
  628. package/docs/examples/storage/get-usage.md +0 -1
  629. package/docs/examples/storage/list-buckets.md +0 -1
  630. package/docs/examples/storage/list-files.md +0 -2
  631. package/docs/examples/storage/update-bucket.md +0 -3
  632. package/docs/examples/storage/update-file.md +0 -3
  633. package/docs/examples/tablesdb/create-boolean-column.md +0 -5
  634. package/docs/examples/tablesdb/create-datetime-column.md +0 -5
  635. package/docs/examples/tablesdb/create-email-column.md +0 -5
  636. package/docs/examples/tablesdb/create-enum-column.md +0 -6
  637. package/docs/examples/tablesdb/create-float-column.md +0 -5
  638. package/docs/examples/tablesdb/create-index.md +0 -6
  639. package/docs/examples/tablesdb/create-integer-column.md +0 -5
  640. package/docs/examples/tablesdb/create-ip-column.md +0 -5
  641. package/docs/examples/tablesdb/create-line-column.md +0 -5
  642. package/docs/examples/tablesdb/create-operations.md +0 -2
  643. package/docs/examples/tablesdb/create-point-column.md +0 -5
  644. package/docs/examples/tablesdb/create-polygon-column.md +0 -5
  645. package/docs/examples/tablesdb/create-relationship-column.md +0 -5
  646. package/docs/examples/tablesdb/create-row.md +0 -5
  647. package/docs/examples/tablesdb/create-rows.md +0 -4
  648. package/docs/examples/tablesdb/create-string-column.md +0 -6
  649. package/docs/examples/tablesdb/create-table.md +0 -4
  650. package/docs/examples/tablesdb/create-transaction.md +0 -1
  651. package/docs/examples/tablesdb/create-url-column.md +0 -5
  652. package/docs/examples/tablesdb/create.md +0 -3
  653. package/docs/examples/tablesdb/decrement-row-column.md +0 -5
  654. package/docs/examples/tablesdb/delete-column.md +0 -4
  655. package/docs/examples/tablesdb/delete-index.md +0 -4
  656. package/docs/examples/tablesdb/delete-row.md +0 -4
  657. package/docs/examples/tablesdb/delete-rows.md +0 -3
  658. package/docs/examples/tablesdb/delete-table.md +0 -3
  659. package/docs/examples/tablesdb/delete-transaction.md +0 -2
  660. package/docs/examples/tablesdb/delete.md +0 -2
  661. package/docs/examples/tablesdb/get-column.md +0 -4
  662. package/docs/examples/tablesdb/get-index.md +0 -4
  663. package/docs/examples/tablesdb/get-row.md +0 -4
  664. package/docs/examples/tablesdb/get-table-usage.md +0 -3
  665. package/docs/examples/tablesdb/get-table.md +0 -3
  666. package/docs/examples/tablesdb/get-transaction.md +0 -2
  667. package/docs/examples/tablesdb/get-usage.md +0 -2
  668. package/docs/examples/tablesdb/get.md +0 -2
  669. package/docs/examples/tablesdb/increment-row-column.md +0 -5
  670. package/docs/examples/tablesdb/list-columns.md +0 -3
  671. package/docs/examples/tablesdb/list-indexes.md +0 -3
  672. package/docs/examples/tablesdb/list-row-logs.md +0 -4
  673. package/docs/examples/tablesdb/list-rows.md +0 -3
  674. package/docs/examples/tablesdb/list-table-logs.md +0 -3
  675. package/docs/examples/tablesdb/list-tables.md +0 -2
  676. package/docs/examples/tablesdb/list-transactions.md +0 -1
  677. package/docs/examples/tablesdb/list-usage.md +0 -1
  678. package/docs/examples/tablesdb/list.md +0 -1
  679. package/docs/examples/tablesdb/update-boolean-column.md +0 -6
  680. package/docs/examples/tablesdb/update-datetime-column.md +0 -6
  681. package/docs/examples/tablesdb/update-email-column.md +0 -6
  682. package/docs/examples/tablesdb/update-enum-column.md +0 -7
  683. package/docs/examples/tablesdb/update-float-column.md +0 -6
  684. package/docs/examples/tablesdb/update-integer-column.md +0 -6
  685. package/docs/examples/tablesdb/update-ip-column.md +0 -6
  686. package/docs/examples/tablesdb/update-line-column.md +0 -5
  687. package/docs/examples/tablesdb/update-point-column.md +0 -5
  688. package/docs/examples/tablesdb/update-polygon-column.md +0 -5
  689. package/docs/examples/tablesdb/update-relationship-column.md +0 -4
  690. package/docs/examples/tablesdb/update-row.md +0 -4
  691. package/docs/examples/tablesdb/update-rows.md +0 -3
  692. package/docs/examples/tablesdb/update-string-column.md +0 -6
  693. package/docs/examples/tablesdb/update-table.md +0 -4
  694. package/docs/examples/tablesdb/update-transaction.md +0 -2
  695. package/docs/examples/tablesdb/update-url-column.md +0 -6
  696. package/docs/examples/tablesdb/update.md +0 -3
  697. package/docs/examples/tablesdb/upsert-row.md +0 -4
  698. package/docs/examples/tablesdb/upsert-rows.md +0 -4
  699. package/docs/examples/teams/create-membership.md +0 -3
  700. package/docs/examples/teams/create.md +0 -3
  701. package/docs/examples/teams/delete-membership.md +0 -3
  702. package/docs/examples/teams/delete.md +0 -2
  703. package/docs/examples/teams/get-membership.md +0 -3
  704. package/docs/examples/teams/get-prefs.md +0 -2
  705. package/docs/examples/teams/get.md +0 -2
  706. package/docs/examples/teams/list-logs.md +0 -2
  707. package/docs/examples/teams/list-memberships.md +0 -2
  708. package/docs/examples/teams/list.md +0 -1
  709. package/docs/examples/teams/update-membership-status.md +0 -5
  710. package/docs/examples/teams/update-membership.md +0 -4
  711. package/docs/examples/teams/update-name.md +0 -3
  712. package/docs/examples/teams/update-prefs.md +0 -3
  713. package/docs/examples/tokens/create-file-token.md +0 -3
  714. package/docs/examples/tokens/delete.md +0 -2
  715. package/docs/examples/tokens/get.md +0 -2
  716. package/docs/examples/tokens/list.md +0 -3
  717. package/docs/examples/tokens/update.md +0 -2
  718. package/docs/examples/users/create-argon-2-user.md +0 -4
  719. package/docs/examples/users/create-bcrypt-user.md +0 -4
  720. package/docs/examples/users/create-jwt.md +0 -2
  721. package/docs/examples/users/create-md-5-user.md +0 -4
  722. package/docs/examples/users/create-mfa-recovery-codes.md +0 -2
  723. package/docs/examples/users/create-ph-pass-user.md +0 -4
  724. package/docs/examples/users/create-scrypt-modified-user.md +0 -7
  725. package/docs/examples/users/create-scrypt-user.md +0 -9
  726. package/docs/examples/users/create-session.md +0 -2
  727. package/docs/examples/users/create-sha-user.md +0 -4
  728. package/docs/examples/users/create-target.md +0 -5
  729. package/docs/examples/users/create-token.md +0 -2
  730. package/docs/examples/users/create.md +0 -2
  731. package/docs/examples/users/delete-identity.md +0 -2
  732. package/docs/examples/users/delete-mfa-authenticator.md +0 -3
  733. package/docs/examples/users/delete-session.md +0 -3
  734. package/docs/examples/users/delete-sessions.md +0 -2
  735. package/docs/examples/users/delete-target.md +0 -3
  736. package/docs/examples/users/delete.md +0 -2
  737. package/docs/examples/users/get-mfa-recovery-codes.md +0 -2
  738. package/docs/examples/users/get-prefs.md +0 -2
  739. package/docs/examples/users/get-target.md +0 -3
  740. package/docs/examples/users/get-usage.md +0 -1
  741. package/docs/examples/users/get.md +0 -2
  742. package/docs/examples/users/list-identities.md +0 -1
  743. package/docs/examples/users/list-logs.md +0 -2
  744. package/docs/examples/users/list-memberships.md +0 -2
  745. package/docs/examples/users/list-mfa-factors.md +0 -2
  746. package/docs/examples/users/list-sessions.md +0 -2
  747. package/docs/examples/users/list-targets.md +0 -2
  748. package/docs/examples/users/list.md +0 -1
  749. package/docs/examples/users/update-email-verification.md +0 -3
  750. package/docs/examples/users/update-email.md +0 -3
  751. package/docs/examples/users/update-labels.md +0 -3
  752. package/docs/examples/users/update-mfa-recovery-codes.md +0 -2
  753. package/docs/examples/users/update-mfa.md +0 -3
  754. package/docs/examples/users/update-name.md +0 -3
  755. package/docs/examples/users/update-password.md +0 -3
  756. package/docs/examples/users/update-phone-verification.md +0 -3
  757. package/docs/examples/users/update-phone.md +0 -3
  758. package/docs/examples/users/update-prefs.md +0 -3
  759. package/docs/examples/users/update-status.md +0 -3
  760. package/docs/examples/users/update-target.md +0 -3
  761. package/docs/examples/vcs/create-repository-detection.md +0 -4
  762. package/docs/examples/vcs/create-repository.md +0 -4
  763. package/docs/examples/vcs/delete-installation.md +0 -2
  764. package/docs/examples/vcs/get-installation.md +0 -2
  765. package/docs/examples/vcs/get-repository-contents.md +0 -3
  766. package/docs/examples/vcs/get-repository.md +0 -3
  767. package/docs/examples/vcs/list-installations.md +0 -1
  768. package/docs/examples/vcs/list-repositories.md +0 -3
  769. package/docs/examples/vcs/list-repository-branches.md +0 -3
  770. package/docs/examples/vcs/update-external-deployments.md +0 -4
  771. package/index.js +0 -147
  772. package/lib/client.js +0 -254
  773. package/lib/commands/account.js +0 -2121
  774. package/lib/commands/console.js +0 -127
  775. package/lib/commands/databases.js +0 -3590
  776. package/lib/commands/functions.js +0 -1732
  777. package/lib/commands/generic.js +0 -330
  778. package/lib/commands/graphql.js +0 -126
  779. package/lib/commands/health.js +0 -869
  780. package/lib/commands/locale.js +0 -316
  781. package/lib/commands/messaging.js +0 -3116
  782. package/lib/commands/migrations.js +0 -830
  783. package/lib/commands/organizations.js +0 -48
  784. package/lib/commands/project.js +0 -302
  785. package/lib/commands/projects.js +0 -2626
  786. package/lib/commands/proxy.js +0 -403
  787. package/lib/commands/push.js +0 -2570
  788. package/lib/commands/sites.js +0 -1654
  789. package/lib/commands/storage.js +0 -995
  790. package/lib/commands/tables-db.js +0 -3569
  791. package/lib/commands/teams.js +0 -683
  792. package/lib/commands/tokens.js +0 -261
  793. package/lib/commands/types.js +0 -191
  794. package/lib/commands/users.js +0 -2022
  795. package/lib/commands/vcs.js +0 -484
  796. package/lib/emulation/docker.js +0 -264
  797. package/lib/exception.js +0 -9
  798. package/lib/parser.js +0 -250
  799. package/lib/sdks.js +0 -60
  800. package/lib/spinner.js +0 -104
  801. package/lib/validations.js +0 -17
@@ -1,2626 +0,0 @@
1
- const fs = require('fs');
2
- const pathLib = require('path');
3
- const tar = require("tar");
4
- const ignore = require("ignore");
5
- const { promisify } = require('util');
6
- const libClient = require('../client.js');
7
- const { getAllFiles, showConsoleLink } = require('../utils.js');
8
- const { Command } = require('commander');
9
- const { sdkForProject, sdkForConsole } = require('../sdks')
10
- const { parse, actionRunner, parseInteger, parseBool, commandDescriptions, success, log, warn } = require('../parser')
11
- const { localConfig, globalConfig } = require("../config");
12
- const { File } = require('undici');
13
- const { ReadableStream } = require('stream/web');
14
-
15
- /**
16
- * @param {fs.ReadStream} readStream
17
- * @returns {ReadableStream}
18
- */
19
- function convertReadStreamToReadableStream(readStream) {
20
- return new ReadableStream({
21
- start(controller) {
22
- readStream.on("data", (chunk) => {
23
- controller.enqueue(chunk);
24
- });
25
- readStream.on("end", () => {
26
- controller.close();
27
- });
28
- readStream.on("error", (err) => {
29
- controller.error(err);
30
- });
31
- },
32
- cancel() {
33
- readStream.destroy();
34
- },
35
- });
36
- }
37
-
38
- const projects = new Command("projects").description(commandDescriptions['projects'] ?? '').configureHelp({
39
- helpWidth: process.stdout.columns || 80
40
- })
41
-
42
- /**
43
- * @typedef {Object} ProjectsListRequestParams
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/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, teamId
45
- * @property {string} search Search term to filter your list results. Max length: 256 chars.
46
- * @property {boolean} total When set to false, the total count returned will be 0 and will not be calculated.
47
- * @property {boolean} overrideForCli
48
- * @property {boolean} parseOutput
49
- * @property {libClient | undefined} sdk
50
- */
51
-
52
- /**
53
- * @param {ProjectsListRequestParams} params
54
- */
55
- const projectsList = async ({queries,search,total,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => {
56
- let client = !sdk ? await sdkForConsole() :
57
- sdk;
58
- let apiPath = '/projects';
59
- let payload = {};
60
- if (typeof queries !== 'undefined') {
61
- payload['queries'] = queries;
62
- }
63
- if (typeof search !== 'undefined') {
64
- payload['search'] = search;
65
- }
66
- if (typeof total !== 'undefined') {
67
- payload['total'] = total;
68
- }
69
-
70
- let response = undefined;
71
-
72
- response = await client.call('get', apiPath, {
73
- }, payload);
74
-
75
- if (parseOutput) {
76
- if(console) {
77
- showConsoleLink('projects', 'list');
78
- } else {
79
- parse(response)
80
- }
81
- }
82
-
83
- return response;
84
-
85
- }
86
- /**
87
- * @typedef {Object} ProjectsCreateRequestParams
88
- * @property {string} projectId Unique Id. Choose a custom ID or generate a random ID with 'ID.unique()'. Valid chars are a-z, and hyphen. Can't start with a special char. Max length is 36 chars.
89
- * @property {string} name Project name. Max length: 128 chars.
90
- * @property {string} teamId Team unique ID.
91
- * @property {Region} region Project Region.
92
- * @property {string} description Project description. Max length: 256 chars.
93
- * @property {string} logo Project logo.
94
- * @property {string} url Project URL.
95
- * @property {string} legalName Project legal Name. Max length: 256 chars.
96
- * @property {string} legalCountry Project legal Country. Max length: 256 chars.
97
- * @property {string} legalState Project legal State. Max length: 256 chars.
98
- * @property {string} legalCity Project legal City. Max length: 256 chars.
99
- * @property {string} legalAddress Project legal Address. Max length: 256 chars.
100
- * @property {string} legalTaxId Project legal Tax ID. Max length: 256 chars.
101
- * @property {boolean} overrideForCli
102
- * @property {boolean} parseOutput
103
- * @property {libClient | undefined} sdk
104
- */
105
-
106
- /**
107
- * @param {ProjectsCreateRequestParams} params
108
- */
109
- const projectsCreate = async ({projectId,name,teamId,region,description,logo,url,legalName,legalCountry,legalState,legalCity,legalAddress,legalTaxId,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
110
- let client = !sdk ? await sdkForConsole() :
111
- sdk;
112
- let apiPath = '/projects';
113
- let payload = {};
114
- if (typeof projectId !== 'undefined') {
115
- payload['projectId'] = projectId;
116
- }
117
- if (typeof name !== 'undefined') {
118
- payload['name'] = name;
119
- }
120
- if (typeof teamId !== 'undefined') {
121
- payload['teamId'] = teamId;
122
- }
123
- if (typeof region !== 'undefined') {
124
- payload['region'] = region;
125
- }
126
- if (typeof description !== 'undefined') {
127
- payload['description'] = description;
128
- }
129
- if (typeof logo !== 'undefined') {
130
- payload['logo'] = logo;
131
- }
132
- if (typeof url !== 'undefined') {
133
- payload['url'] = url;
134
- }
135
- if (typeof legalName !== 'undefined') {
136
- payload['legalName'] = legalName;
137
- }
138
- if (typeof legalCountry !== 'undefined') {
139
- payload['legalCountry'] = legalCountry;
140
- }
141
- if (typeof legalState !== 'undefined') {
142
- payload['legalState'] = legalState;
143
- }
144
- if (typeof legalCity !== 'undefined') {
145
- payload['legalCity'] = legalCity;
146
- }
147
- if (typeof legalAddress !== 'undefined') {
148
- payload['legalAddress'] = legalAddress;
149
- }
150
- if (typeof legalTaxId !== 'undefined') {
151
- payload['legalTaxId'] = legalTaxId;
152
- }
153
-
154
- let response = undefined;
155
-
156
- response = await client.call('post', apiPath, {
157
- 'content-type': 'application/json',
158
- }, payload);
159
-
160
- if (parseOutput) {
161
- parse(response)
162
- }
163
-
164
- return response;
165
-
166
- }
167
- /**
168
- * @typedef {Object} ProjectsGetRequestParams
169
- * @property {string} projectId Project unique ID.
170
- * @property {boolean} overrideForCli
171
- * @property {boolean} parseOutput
172
- * @property {libClient | undefined} sdk
173
- */
174
-
175
- /**
176
- * @param {ProjectsGetRequestParams} params
177
- */
178
- const projectsGet = async ({projectId,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => {
179
- let client = !sdk ? await sdkForConsole() :
180
- sdk;
181
- let apiPath = '/projects/{projectId}'.replace('{projectId}', projectId);
182
- let payload = {};
183
-
184
- let response = undefined;
185
-
186
- response = await client.call('get', apiPath, {
187
- }, payload);
188
-
189
- if (parseOutput) {
190
- if(console) {
191
- showConsoleLink('projects', 'get', projectId);
192
- } else {
193
- parse(response)
194
- }
195
- }
196
-
197
- return response;
198
-
199
- }
200
- /**
201
- * @typedef {Object} ProjectsUpdateRequestParams
202
- * @property {string} projectId Project unique ID.
203
- * @property {string} name Project name. Max length: 128 chars.
204
- * @property {string} description Project description. Max length: 256 chars.
205
- * @property {string} logo Project logo.
206
- * @property {string} url Project URL.
207
- * @property {string} legalName Project legal name. Max length: 256 chars.
208
- * @property {string} legalCountry Project legal country. Max length: 256 chars.
209
- * @property {string} legalState Project legal state. Max length: 256 chars.
210
- * @property {string} legalCity Project legal city. Max length: 256 chars.
211
- * @property {string} legalAddress Project legal address. Max length: 256 chars.
212
- * @property {string} legalTaxId Project legal tax ID. Max length: 256 chars.
213
- * @property {boolean} overrideForCli
214
- * @property {boolean} parseOutput
215
- * @property {libClient | undefined} sdk
216
- */
217
-
218
- /**
219
- * @param {ProjectsUpdateRequestParams} params
220
- */
221
- const projectsUpdate = async ({projectId,name,description,logo,url,legalName,legalCountry,legalState,legalCity,legalAddress,legalTaxId,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
222
- let client = !sdk ? await sdkForConsole() :
223
- sdk;
224
- let apiPath = '/projects/{projectId}'.replace('{projectId}', projectId);
225
- let payload = {};
226
- if (typeof name !== 'undefined') {
227
- payload['name'] = name;
228
- }
229
- if (typeof description !== 'undefined') {
230
- payload['description'] = description;
231
- }
232
- if (typeof logo !== 'undefined') {
233
- payload['logo'] = logo;
234
- }
235
- if (typeof url !== 'undefined') {
236
- payload['url'] = url;
237
- }
238
- if (typeof legalName !== 'undefined') {
239
- payload['legalName'] = legalName;
240
- }
241
- if (typeof legalCountry !== 'undefined') {
242
- payload['legalCountry'] = legalCountry;
243
- }
244
- if (typeof legalState !== 'undefined') {
245
- payload['legalState'] = legalState;
246
- }
247
- if (typeof legalCity !== 'undefined') {
248
- payload['legalCity'] = legalCity;
249
- }
250
- if (typeof legalAddress !== 'undefined') {
251
- payload['legalAddress'] = legalAddress;
252
- }
253
- if (typeof legalTaxId !== 'undefined') {
254
- payload['legalTaxId'] = legalTaxId;
255
- }
256
-
257
- let response = undefined;
258
-
259
- response = await client.call('patch', apiPath, {
260
- 'content-type': 'application/json',
261
- }, payload);
262
-
263
- if (parseOutput) {
264
- parse(response)
265
- }
266
-
267
- return response;
268
-
269
- }
270
- /**
271
- * @typedef {Object} ProjectsDeleteRequestParams
272
- * @property {string} projectId Project unique ID.
273
- * @property {boolean} overrideForCli
274
- * @property {boolean} parseOutput
275
- * @property {libClient | undefined} sdk
276
- */
277
-
278
- /**
279
- * @param {ProjectsDeleteRequestParams} params
280
- */
281
- const projectsDelete = async ({projectId,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
282
- let client = !sdk ? await sdkForConsole() :
283
- sdk;
284
- let apiPath = '/projects/{projectId}'.replace('{projectId}', projectId);
285
- let payload = {};
286
-
287
- let response = undefined;
288
-
289
- response = await client.call('delete', apiPath, {
290
- 'content-type': 'application/json',
291
- }, payload);
292
-
293
- if (parseOutput) {
294
- parse(response)
295
- }
296
-
297
- return response;
298
-
299
- }
300
- /**
301
- * @typedef {Object} ProjectsUpdateAPIStatusRequestParams
302
- * @property {string} projectId Project unique ID.
303
- * @property {Api} api API name.
304
- * @property {boolean} status API status.
305
- * @property {boolean} overrideForCli
306
- * @property {boolean} parseOutput
307
- * @property {libClient | undefined} sdk
308
- */
309
-
310
- /**
311
- * @param {ProjectsUpdateAPIStatusRequestParams} params
312
- */
313
- const projectsUpdateAPIStatus = async ({projectId,api,status,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
314
- let client = !sdk ? await sdkForConsole() :
315
- sdk;
316
- let apiPath = '/projects/{projectId}/api'.replace('{projectId}', projectId);
317
- let payload = {};
318
- if (typeof api !== 'undefined') {
319
- payload['api'] = api;
320
- }
321
- if (typeof status !== 'undefined') {
322
- payload['status'] = status;
323
- }
324
-
325
- let response = undefined;
326
-
327
- response = await client.call('patch', apiPath, {
328
- 'content-type': 'application/json',
329
- }, payload);
330
-
331
- if (parseOutput) {
332
- parse(response)
333
- }
334
-
335
- return response;
336
-
337
- }
338
- /**
339
- * @typedef {Object} ProjectsUpdateAPIStatusAllRequestParams
340
- * @property {string} projectId Project unique ID.
341
- * @property {boolean} status API status.
342
- * @property {boolean} overrideForCli
343
- * @property {boolean} parseOutput
344
- * @property {libClient | undefined} sdk
345
- */
346
-
347
- /**
348
- * @param {ProjectsUpdateAPIStatusAllRequestParams} params
349
- */
350
- const projectsUpdateAPIStatusAll = async ({projectId,status,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
351
- let client = !sdk ? await sdkForConsole() :
352
- sdk;
353
- let apiPath = '/projects/{projectId}/api/all'.replace('{projectId}', projectId);
354
- let payload = {};
355
- if (typeof status !== 'undefined') {
356
- payload['status'] = status;
357
- }
358
-
359
- let response = undefined;
360
-
361
- response = await client.call('patch', apiPath, {
362
- 'content-type': 'application/json',
363
- }, payload);
364
-
365
- if (parseOutput) {
366
- parse(response)
367
- }
368
-
369
- return response;
370
-
371
- }
372
- /**
373
- * @typedef {Object} ProjectsUpdateAuthDurationRequestParams
374
- * @property {string} projectId Project unique ID.
375
- * @property {number} duration Project session length in seconds. Max length: 31536000 seconds.
376
- * @property {boolean} overrideForCli
377
- * @property {boolean} parseOutput
378
- * @property {libClient | undefined} sdk
379
- */
380
-
381
- /**
382
- * @param {ProjectsUpdateAuthDurationRequestParams} params
383
- */
384
- const projectsUpdateAuthDuration = async ({projectId,duration,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
385
- let client = !sdk ? await sdkForConsole() :
386
- sdk;
387
- let apiPath = '/projects/{projectId}/auth/duration'.replace('{projectId}', projectId);
388
- let payload = {};
389
- if (typeof duration !== 'undefined') {
390
- payload['duration'] = duration;
391
- }
392
-
393
- let response = undefined;
394
-
395
- response = await client.call('patch', apiPath, {
396
- 'content-type': 'application/json',
397
- }, payload);
398
-
399
- if (parseOutput) {
400
- parse(response)
401
- }
402
-
403
- return response;
404
-
405
- }
406
- /**
407
- * @typedef {Object} ProjectsUpdateAuthLimitRequestParams
408
- * @property {string} projectId Project unique ID.
409
- * @property {number} limit Set the max number of users allowed in this project. Use 0 for unlimited.
410
- * @property {boolean} overrideForCli
411
- * @property {boolean} parseOutput
412
- * @property {libClient | undefined} sdk
413
- */
414
-
415
- /**
416
- * @param {ProjectsUpdateAuthLimitRequestParams} params
417
- */
418
- const projectsUpdateAuthLimit = async ({projectId,limit,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
419
- let client = !sdk ? await sdkForConsole() :
420
- sdk;
421
- let apiPath = '/projects/{projectId}/auth/limit'.replace('{projectId}', projectId);
422
- let payload = {};
423
- if (typeof limit !== 'undefined') {
424
- payload['limit'] = limit;
425
- }
426
-
427
- let response = undefined;
428
-
429
- response = await client.call('patch', apiPath, {
430
- 'content-type': 'application/json',
431
- }, payload);
432
-
433
- if (parseOutput) {
434
- parse(response)
435
- }
436
-
437
- return response;
438
-
439
- }
440
- /**
441
- * @typedef {Object} ProjectsUpdateAuthSessionsLimitRequestParams
442
- * @property {string} projectId Project unique ID.
443
- * @property {number} limit Set the max number of users allowed in this project. Value allowed is between 1-100. Default is 10
444
- * @property {boolean} overrideForCli
445
- * @property {boolean} parseOutput
446
- * @property {libClient | undefined} sdk
447
- */
448
-
449
- /**
450
- * @param {ProjectsUpdateAuthSessionsLimitRequestParams} params
451
- */
452
- const projectsUpdateAuthSessionsLimit = async ({projectId,limit,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
453
- let client = !sdk ? await sdkForConsole() :
454
- sdk;
455
- let apiPath = '/projects/{projectId}/auth/max-sessions'.replace('{projectId}', projectId);
456
- let payload = {};
457
- if (typeof limit !== 'undefined') {
458
- payload['limit'] = limit;
459
- }
460
-
461
- let response = undefined;
462
-
463
- response = await client.call('patch', apiPath, {
464
- 'content-type': 'application/json',
465
- }, payload);
466
-
467
- if (parseOutput) {
468
- parse(response)
469
- }
470
-
471
- return response;
472
-
473
- }
474
- /**
475
- * @typedef {Object} ProjectsUpdateMembershipsPrivacyRequestParams
476
- * @property {string} projectId Project unique ID.
477
- * @property {boolean} userName Set to true to show userName to members of a team.
478
- * @property {boolean} userEmail Set to true to show email to members of a team.
479
- * @property {boolean} mfa Set to true to show mfa to members of a team.
480
- * @property {boolean} overrideForCli
481
- * @property {boolean} parseOutput
482
- * @property {libClient | undefined} sdk
483
- */
484
-
485
- /**
486
- * @param {ProjectsUpdateMembershipsPrivacyRequestParams} params
487
- */
488
- const projectsUpdateMembershipsPrivacy = async ({projectId,userName,userEmail,mfa,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
489
- let client = !sdk ? await sdkForConsole() :
490
- sdk;
491
- let apiPath = '/projects/{projectId}/auth/memberships-privacy'.replace('{projectId}', projectId);
492
- let payload = {};
493
- if (typeof userName !== 'undefined') {
494
- payload['userName'] = userName;
495
- }
496
- if (typeof userEmail !== 'undefined') {
497
- payload['userEmail'] = userEmail;
498
- }
499
- if (typeof mfa !== 'undefined') {
500
- payload['mfa'] = mfa;
501
- }
502
-
503
- let response = undefined;
504
-
505
- response = await client.call('patch', apiPath, {
506
- 'content-type': 'application/json',
507
- }, payload);
508
-
509
- if (parseOutput) {
510
- parse(response)
511
- }
512
-
513
- return response;
514
-
515
- }
516
- /**
517
- * @typedef {Object} ProjectsUpdateMockNumbersRequestParams
518
- * @property {string} projectId Project unique ID.
519
- * @property {object[]} numbers An array of mock numbers and their corresponding verification codes (OTPs). Each number should be a valid E.164 formatted phone number. Maximum of 10 numbers are allowed.
520
- * @property {boolean} overrideForCli
521
- * @property {boolean} parseOutput
522
- * @property {libClient | undefined} sdk
523
- */
524
-
525
- /**
526
- * @param {ProjectsUpdateMockNumbersRequestParams} params
527
- */
528
- const projectsUpdateMockNumbers = async ({projectId,numbers,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
529
- let client = !sdk ? await sdkForConsole() :
530
- sdk;
531
- let apiPath = '/projects/{projectId}/auth/mock-numbers'.replace('{projectId}', projectId);
532
- let payload = {};
533
- numbers = numbers === true ? [] : numbers;
534
- if (typeof numbers !== 'undefined') {
535
- payload['numbers'] = numbers;
536
- }
537
-
538
- let response = undefined;
539
-
540
- response = await client.call('patch', apiPath, {
541
- 'content-type': 'application/json',
542
- }, payload);
543
-
544
- if (parseOutput) {
545
- parse(response)
546
- }
547
-
548
- return response;
549
-
550
- }
551
- /**
552
- * @typedef {Object} ProjectsUpdateAuthPasswordDictionaryRequestParams
553
- * @property {string} projectId Project unique ID.
554
- * @property {boolean} enabled Set whether or not to enable checking user's password against most commonly used passwords. Default is false.
555
- * @property {boolean} overrideForCli
556
- * @property {boolean} parseOutput
557
- * @property {libClient | undefined} sdk
558
- */
559
-
560
- /**
561
- * @param {ProjectsUpdateAuthPasswordDictionaryRequestParams} params
562
- */
563
- const projectsUpdateAuthPasswordDictionary = async ({projectId,enabled,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
564
- let client = !sdk ? await sdkForConsole() :
565
- sdk;
566
- let apiPath = '/projects/{projectId}/auth/password-dictionary'.replace('{projectId}', projectId);
567
- let payload = {};
568
- if (typeof enabled !== 'undefined') {
569
- payload['enabled'] = enabled;
570
- }
571
-
572
- let response = undefined;
573
-
574
- response = await client.call('patch', apiPath, {
575
- 'content-type': 'application/json',
576
- }, payload);
577
-
578
- if (parseOutput) {
579
- parse(response)
580
- }
581
-
582
- return response;
583
-
584
- }
585
- /**
586
- * @typedef {Object} ProjectsUpdateAuthPasswordHistoryRequestParams
587
- * @property {string} projectId Project unique ID.
588
- * @property {number} limit Set the max number of passwords to store in user history. User can't choose a new password that is already stored in the password history list. Max number of passwords allowed in history is20. Default value is 0
589
- * @property {boolean} overrideForCli
590
- * @property {boolean} parseOutput
591
- * @property {libClient | undefined} sdk
592
- */
593
-
594
- /**
595
- * @param {ProjectsUpdateAuthPasswordHistoryRequestParams} params
596
- */
597
- const projectsUpdateAuthPasswordHistory = async ({projectId,limit,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
598
- let client = !sdk ? await sdkForConsole() :
599
- sdk;
600
- let apiPath = '/projects/{projectId}/auth/password-history'.replace('{projectId}', projectId);
601
- let payload = {};
602
- if (typeof limit !== 'undefined') {
603
- payload['limit'] = limit;
604
- }
605
-
606
- let response = undefined;
607
-
608
- response = await client.call('patch', apiPath, {
609
- 'content-type': 'application/json',
610
- }, payload);
611
-
612
- if (parseOutput) {
613
- parse(response)
614
- }
615
-
616
- return response;
617
-
618
- }
619
- /**
620
- * @typedef {Object} ProjectsUpdatePersonalDataCheckRequestParams
621
- * @property {string} projectId Project unique ID.
622
- * @property {boolean} enabled Set whether or not to check a password for similarity with personal data. Default is false.
623
- * @property {boolean} overrideForCli
624
- * @property {boolean} parseOutput
625
- * @property {libClient | undefined} sdk
626
- */
627
-
628
- /**
629
- * @param {ProjectsUpdatePersonalDataCheckRequestParams} params
630
- */
631
- const projectsUpdatePersonalDataCheck = async ({projectId,enabled,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
632
- let client = !sdk ? await sdkForConsole() :
633
- sdk;
634
- let apiPath = '/projects/{projectId}/auth/personal-data'.replace('{projectId}', projectId);
635
- let payload = {};
636
- if (typeof enabled !== 'undefined') {
637
- payload['enabled'] = enabled;
638
- }
639
-
640
- let response = undefined;
641
-
642
- response = await client.call('patch', apiPath, {
643
- 'content-type': 'application/json',
644
- }, payload);
645
-
646
- if (parseOutput) {
647
- parse(response)
648
- }
649
-
650
- return response;
651
-
652
- }
653
- /**
654
- * @typedef {Object} ProjectsUpdateSessionAlertsRequestParams
655
- * @property {string} projectId Project unique ID.
656
- * @property {boolean} alerts Set to true to enable session emails.
657
- * @property {boolean} overrideForCli
658
- * @property {boolean} parseOutput
659
- * @property {libClient | undefined} sdk
660
- */
661
-
662
- /**
663
- * @param {ProjectsUpdateSessionAlertsRequestParams} params
664
- */
665
- const projectsUpdateSessionAlerts = async ({projectId,alerts,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
666
- let client = !sdk ? await sdkForConsole() :
667
- sdk;
668
- let apiPath = '/projects/{projectId}/auth/session-alerts'.replace('{projectId}', projectId);
669
- let payload = {};
670
- if (typeof alerts !== 'undefined') {
671
- payload['alerts'] = alerts;
672
- }
673
-
674
- let response = undefined;
675
-
676
- response = await client.call('patch', apiPath, {
677
- 'content-type': 'application/json',
678
- }, payload);
679
-
680
- if (parseOutput) {
681
- parse(response)
682
- }
683
-
684
- return response;
685
-
686
- }
687
- /**
688
- * @typedef {Object} ProjectsUpdateSessionInvalidationRequestParams
689
- * @property {string} projectId Project unique ID.
690
- * @property {boolean} enabled Update authentication session invalidation status. Use this endpoint to enable or disable session invalidation on password change
691
- * @property {boolean} overrideForCli
692
- * @property {boolean} parseOutput
693
- * @property {libClient | undefined} sdk
694
- */
695
-
696
- /**
697
- * @param {ProjectsUpdateSessionInvalidationRequestParams} params
698
- */
699
- const projectsUpdateSessionInvalidation = async ({projectId,enabled,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
700
- let client = !sdk ? await sdkForConsole() :
701
- sdk;
702
- let apiPath = '/projects/{projectId}/auth/session-invalidation'.replace('{projectId}', projectId);
703
- let payload = {};
704
- if (typeof enabled !== 'undefined') {
705
- payload['enabled'] = enabled;
706
- }
707
-
708
- let response = undefined;
709
-
710
- response = await client.call('patch', apiPath, {
711
- 'content-type': 'application/json',
712
- }, payload);
713
-
714
- if (parseOutput) {
715
- parse(response)
716
- }
717
-
718
- return response;
719
-
720
- }
721
- /**
722
- * @typedef {Object} ProjectsUpdateAuthStatusRequestParams
723
- * @property {string} projectId Project unique ID.
724
- * @property {AuthMethod} method Auth Method. Possible values: email-password,magic-url,email-otp,anonymous,invites,jwt,phone
725
- * @property {boolean} status Set the status of this auth method.
726
- * @property {boolean} overrideForCli
727
- * @property {boolean} parseOutput
728
- * @property {libClient | undefined} sdk
729
- */
730
-
731
- /**
732
- * @param {ProjectsUpdateAuthStatusRequestParams} params
733
- */
734
- const projectsUpdateAuthStatus = async ({projectId,method,status,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
735
- let client = !sdk ? await sdkForConsole() :
736
- sdk;
737
- let apiPath = '/projects/{projectId}/auth/{method}'.replace('{projectId}', projectId).replace('{method}', method);
738
- let payload = {};
739
- if (typeof status !== 'undefined') {
740
- payload['status'] = status;
741
- }
742
-
743
- let response = undefined;
744
-
745
- response = await client.call('patch', apiPath, {
746
- 'content-type': 'application/json',
747
- }, payload);
748
-
749
- if (parseOutput) {
750
- parse(response)
751
- }
752
-
753
- return response;
754
-
755
- }
756
- /**
757
- * @typedef {Object} ProjectsListDevKeysRequestParams
758
- * @property {string} projectId Project unique ID.
759
- * @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: accessedAt, expire
760
- * @property {boolean} overrideForCli
761
- * @property {boolean} parseOutput
762
- * @property {libClient | undefined} sdk
763
- */
764
-
765
- /**
766
- * @param {ProjectsListDevKeysRequestParams} params
767
- */
768
- const projectsListDevKeys = async ({projectId,queries,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => {
769
- let client = !sdk ? await sdkForConsole() :
770
- sdk;
771
- let apiPath = '/projects/{projectId}/dev-keys'.replace('{projectId}', projectId);
772
- let payload = {};
773
- if (typeof queries !== 'undefined') {
774
- payload['queries'] = queries;
775
- }
776
-
777
- let response = undefined;
778
-
779
- response = await client.call('get', apiPath, {
780
- }, payload);
781
-
782
- if (parseOutput) {
783
- if(console) {
784
- showConsoleLink('projects', 'listDevKeys', projectId);
785
- } else {
786
- parse(response)
787
- }
788
- }
789
-
790
- return response;
791
-
792
- }
793
- /**
794
- * @typedef {Object} ProjectsCreateDevKeyRequestParams
795
- * @property {string} projectId Project unique ID.
796
- * @property {string} name Key name. Max length: 128 chars.
797
- * @property {string} expire Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format.
798
- * @property {boolean} overrideForCli
799
- * @property {boolean} parseOutput
800
- * @property {libClient | undefined} sdk
801
- */
802
-
803
- /**
804
- * @param {ProjectsCreateDevKeyRequestParams} params
805
- */
806
- const projectsCreateDevKey = async ({projectId,name,expire,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
807
- let client = !sdk ? await sdkForConsole() :
808
- sdk;
809
- let apiPath = '/projects/{projectId}/dev-keys'.replace('{projectId}', projectId);
810
- let payload = {};
811
- if (typeof name !== 'undefined') {
812
- payload['name'] = name;
813
- }
814
- if (typeof expire !== 'undefined') {
815
- payload['expire'] = expire;
816
- }
817
-
818
- let response = undefined;
819
-
820
- response = await client.call('post', apiPath, {
821
- 'content-type': 'application/json',
822
- }, payload);
823
-
824
- if (parseOutput) {
825
- parse(response)
826
- }
827
-
828
- return response;
829
-
830
- }
831
- /**
832
- * @typedef {Object} ProjectsGetDevKeyRequestParams
833
- * @property {string} projectId Project unique ID.
834
- * @property {string} keyId Key unique ID.
835
- * @property {boolean} overrideForCli
836
- * @property {boolean} parseOutput
837
- * @property {libClient | undefined} sdk
838
- */
839
-
840
- /**
841
- * @param {ProjectsGetDevKeyRequestParams} params
842
- */
843
- const projectsGetDevKey = async ({projectId,keyId,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => {
844
- let client = !sdk ? await sdkForConsole() :
845
- sdk;
846
- let apiPath = '/projects/{projectId}/dev-keys/{keyId}'.replace('{projectId}', projectId).replace('{keyId}', keyId);
847
- let payload = {};
848
-
849
- let response = undefined;
850
-
851
- response = await client.call('get', apiPath, {
852
- }, payload);
853
-
854
- if (parseOutput) {
855
- if(console) {
856
- showConsoleLink('projects', 'getDevKey', projectId, keyId);
857
- } else {
858
- parse(response)
859
- }
860
- }
861
-
862
- return response;
863
-
864
- }
865
- /**
866
- * @typedef {Object} ProjectsUpdateDevKeyRequestParams
867
- * @property {string} projectId Project unique ID.
868
- * @property {string} keyId Key unique ID.
869
- * @property {string} name Key name. Max length: 128 chars.
870
- * @property {string} expire Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format.
871
- * @property {boolean} overrideForCli
872
- * @property {boolean} parseOutput
873
- * @property {libClient | undefined} sdk
874
- */
875
-
876
- /**
877
- * @param {ProjectsUpdateDevKeyRequestParams} params
878
- */
879
- const projectsUpdateDevKey = async ({projectId,keyId,name,expire,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
880
- let client = !sdk ? await sdkForConsole() :
881
- sdk;
882
- let apiPath = '/projects/{projectId}/dev-keys/{keyId}'.replace('{projectId}', projectId).replace('{keyId}', keyId);
883
- let payload = {};
884
- if (typeof name !== 'undefined') {
885
- payload['name'] = name;
886
- }
887
- if (typeof expire !== 'undefined') {
888
- payload['expire'] = expire;
889
- }
890
-
891
- let response = undefined;
892
-
893
- response = await client.call('put', apiPath, {
894
- 'content-type': 'application/json',
895
- }, payload);
896
-
897
- if (parseOutput) {
898
- parse(response)
899
- }
900
-
901
- return response;
902
-
903
- }
904
- /**
905
- * @typedef {Object} ProjectsDeleteDevKeyRequestParams
906
- * @property {string} projectId Project unique ID.
907
- * @property {string} keyId Key unique ID.
908
- * @property {boolean} overrideForCli
909
- * @property {boolean} parseOutput
910
- * @property {libClient | undefined} sdk
911
- */
912
-
913
- /**
914
- * @param {ProjectsDeleteDevKeyRequestParams} params
915
- */
916
- const projectsDeleteDevKey = async ({projectId,keyId,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
917
- let client = !sdk ? await sdkForConsole() :
918
- sdk;
919
- let apiPath = '/projects/{projectId}/dev-keys/{keyId}'.replace('{projectId}', projectId).replace('{keyId}', keyId);
920
- let payload = {};
921
-
922
- let response = undefined;
923
-
924
- response = await client.call('delete', apiPath, {
925
- 'content-type': 'application/json',
926
- }, payload);
927
-
928
- if (parseOutput) {
929
- parse(response)
930
- }
931
-
932
- return response;
933
-
934
- }
935
- /**
936
- * @typedef {Object} ProjectsCreateJWTRequestParams
937
- * @property {string} projectId Project unique ID.
938
- * @property {string[]} scopes List of scopes allowed for JWT key. Maximum of 100 scopes are allowed.
939
- * @property {number} duration Time in seconds before JWT expires. Default duration is 900 seconds, and maximum is 3600 seconds.
940
- * @property {boolean} overrideForCli
941
- * @property {boolean} parseOutput
942
- * @property {libClient | undefined} sdk
943
- */
944
-
945
- /**
946
- * @param {ProjectsCreateJWTRequestParams} params
947
- */
948
- const projectsCreateJWT = async ({projectId,scopes,duration,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
949
- let client = !sdk ? await sdkForConsole() :
950
- sdk;
951
- let apiPath = '/projects/{projectId}/jwts'.replace('{projectId}', projectId);
952
- let payload = {};
953
- scopes = scopes === true ? [] : scopes;
954
- if (typeof scopes !== 'undefined') {
955
- payload['scopes'] = scopes;
956
- }
957
- if (typeof duration !== 'undefined') {
958
- payload['duration'] = duration;
959
- }
960
-
961
- let response = undefined;
962
-
963
- response = await client.call('post', apiPath, {
964
- 'content-type': 'application/json',
965
- }, payload);
966
-
967
- if (parseOutput) {
968
- parse(response)
969
- }
970
-
971
- return response;
972
-
973
- }
974
- /**
975
- * @typedef {Object} ProjectsListKeysRequestParams
976
- * @property {string} projectId Project unique ID.
977
- * @property {boolean} total When set to false, the total count returned will be 0 and will not be calculated.
978
- * @property {boolean} overrideForCli
979
- * @property {boolean} parseOutput
980
- * @property {libClient | undefined} sdk
981
- */
982
-
983
- /**
984
- * @param {ProjectsListKeysRequestParams} params
985
- */
986
- const projectsListKeys = async ({projectId,total,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => {
987
- let client = !sdk ? await sdkForConsole() :
988
- sdk;
989
- let apiPath = '/projects/{projectId}/keys'.replace('{projectId}', projectId);
990
- let payload = {};
991
- if (typeof total !== 'undefined') {
992
- payload['total'] = total;
993
- }
994
-
995
- let response = undefined;
996
-
997
- response = await client.call('get', apiPath, {
998
- }, payload);
999
-
1000
- if (parseOutput) {
1001
- if(console) {
1002
- showConsoleLink('projects', 'listKeys', projectId);
1003
- } else {
1004
- parse(response)
1005
- }
1006
- }
1007
-
1008
- return response;
1009
-
1010
- }
1011
- /**
1012
- * @typedef {Object} ProjectsCreateKeyRequestParams
1013
- * @property {string} projectId Project unique ID.
1014
- * @property {string} name Key name. Max length: 128 chars.
1015
- * @property {string[]} scopes Key scopes list. Maximum of 100 scopes are allowed.
1016
- * @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.
1017
- * @property {boolean} overrideForCli
1018
- * @property {boolean} parseOutput
1019
- * @property {libClient | undefined} sdk
1020
- */
1021
-
1022
- /**
1023
- * @param {ProjectsCreateKeyRequestParams} params
1024
- */
1025
- const projectsCreateKey = async ({projectId,name,scopes,expire,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
1026
- let client = !sdk ? await sdkForConsole() :
1027
- sdk;
1028
- let apiPath = '/projects/{projectId}/keys'.replace('{projectId}', projectId);
1029
- let payload = {};
1030
- if (typeof name !== 'undefined') {
1031
- payload['name'] = name;
1032
- }
1033
- scopes = scopes === true ? [] : scopes;
1034
- if (typeof scopes !== 'undefined') {
1035
- payload['scopes'] = scopes;
1036
- }
1037
- if (typeof expire !== 'undefined') {
1038
- payload['expire'] = expire;
1039
- }
1040
-
1041
- let response = undefined;
1042
-
1043
- response = await client.call('post', apiPath, {
1044
- 'content-type': 'application/json',
1045
- }, payload);
1046
-
1047
- if (parseOutput) {
1048
- parse(response)
1049
- }
1050
-
1051
- return response;
1052
-
1053
- }
1054
- /**
1055
- * @typedef {Object} ProjectsGetKeyRequestParams
1056
- * @property {string} projectId Project unique ID.
1057
- * @property {string} keyId Key unique ID.
1058
- * @property {boolean} overrideForCli
1059
- * @property {boolean} parseOutput
1060
- * @property {libClient | undefined} sdk
1061
- */
1062
-
1063
- /**
1064
- * @param {ProjectsGetKeyRequestParams} params
1065
- */
1066
- const projectsGetKey = async ({projectId,keyId,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => {
1067
- let client = !sdk ? await sdkForConsole() :
1068
- sdk;
1069
- let apiPath = '/projects/{projectId}/keys/{keyId}'.replace('{projectId}', projectId).replace('{keyId}', keyId);
1070
- let payload = {};
1071
-
1072
- let response = undefined;
1073
-
1074
- response = await client.call('get', apiPath, {
1075
- }, payload);
1076
-
1077
- if (parseOutput) {
1078
- if(console) {
1079
- showConsoleLink('projects', 'getKey', projectId, keyId);
1080
- } else {
1081
- parse(response)
1082
- }
1083
- }
1084
-
1085
- return response;
1086
-
1087
- }
1088
- /**
1089
- * @typedef {Object} ProjectsUpdateKeyRequestParams
1090
- * @property {string} projectId Project unique ID.
1091
- * @property {string} keyId Key unique ID.
1092
- * @property {string} name Key name. Max length: 128 chars.
1093
- * @property {string[]} scopes Key scopes list. Maximum of 100 events are allowed.
1094
- * @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.
1095
- * @property {boolean} overrideForCli
1096
- * @property {boolean} parseOutput
1097
- * @property {libClient | undefined} sdk
1098
- */
1099
-
1100
- /**
1101
- * @param {ProjectsUpdateKeyRequestParams} params
1102
- */
1103
- const projectsUpdateKey = async ({projectId,keyId,name,scopes,expire,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
1104
- let client = !sdk ? await sdkForConsole() :
1105
- sdk;
1106
- let apiPath = '/projects/{projectId}/keys/{keyId}'.replace('{projectId}', projectId).replace('{keyId}', keyId);
1107
- let payload = {};
1108
- if (typeof name !== 'undefined') {
1109
- payload['name'] = name;
1110
- }
1111
- scopes = scopes === true ? [] : scopes;
1112
- if (typeof scopes !== 'undefined') {
1113
- payload['scopes'] = scopes;
1114
- }
1115
- if (typeof expire !== 'undefined') {
1116
- payload['expire'] = expire;
1117
- }
1118
-
1119
- let response = undefined;
1120
-
1121
- response = await client.call('put', apiPath, {
1122
- 'content-type': 'application/json',
1123
- }, payload);
1124
-
1125
- if (parseOutput) {
1126
- parse(response)
1127
- }
1128
-
1129
- return response;
1130
-
1131
- }
1132
- /**
1133
- * @typedef {Object} ProjectsDeleteKeyRequestParams
1134
- * @property {string} projectId Project unique ID.
1135
- * @property {string} keyId Key unique ID.
1136
- * @property {boolean} overrideForCli
1137
- * @property {boolean} parseOutput
1138
- * @property {libClient | undefined} sdk
1139
- */
1140
-
1141
- /**
1142
- * @param {ProjectsDeleteKeyRequestParams} params
1143
- */
1144
- const projectsDeleteKey = async ({projectId,keyId,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
1145
- let client = !sdk ? await sdkForConsole() :
1146
- sdk;
1147
- let apiPath = '/projects/{projectId}/keys/{keyId}'.replace('{projectId}', projectId).replace('{keyId}', keyId);
1148
- let payload = {};
1149
-
1150
- let response = undefined;
1151
-
1152
- response = await client.call('delete', apiPath, {
1153
- 'content-type': 'application/json',
1154
- }, payload);
1155
-
1156
- if (parseOutput) {
1157
- parse(response)
1158
- }
1159
-
1160
- return response;
1161
-
1162
- }
1163
- /**
1164
- * @typedef {Object} ProjectsUpdateOAuth2RequestParams
1165
- * @property {string} projectId Project unique ID.
1166
- * @property {OAuthProvider} provider Provider Name
1167
- * @property {string} appId Provider app ID. Max length: 256 chars.
1168
- * @property {string} secret Provider secret key. Max length: 512 chars.
1169
- * @property {boolean} enabled Provider status. Set to 'false' to disable new session creation.
1170
- * @property {boolean} overrideForCli
1171
- * @property {boolean} parseOutput
1172
- * @property {libClient | undefined} sdk
1173
- */
1174
-
1175
- /**
1176
- * @param {ProjectsUpdateOAuth2RequestParams} params
1177
- */
1178
- const projectsUpdateOAuth2 = async ({projectId,provider,appId,secret,enabled,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
1179
- let client = !sdk ? await sdkForConsole() :
1180
- sdk;
1181
- let apiPath = '/projects/{projectId}/oauth2'.replace('{projectId}', projectId);
1182
- let payload = {};
1183
- if (typeof provider !== 'undefined') {
1184
- payload['provider'] = provider;
1185
- }
1186
- if (typeof appId !== 'undefined') {
1187
- payload['appId'] = appId;
1188
- }
1189
- if (typeof secret !== 'undefined') {
1190
- payload['secret'] = secret;
1191
- }
1192
- if (typeof enabled !== 'undefined') {
1193
- payload['enabled'] = enabled;
1194
- }
1195
-
1196
- let response = undefined;
1197
-
1198
- response = await client.call('patch', apiPath, {
1199
- 'content-type': 'application/json',
1200
- }, payload);
1201
-
1202
- if (parseOutput) {
1203
- parse(response)
1204
- }
1205
-
1206
- return response;
1207
-
1208
- }
1209
- /**
1210
- * @typedef {Object} ProjectsListPlatformsRequestParams
1211
- * @property {string} projectId Project unique ID.
1212
- * @property {boolean} total When set to false, the total count returned will be 0 and will not be calculated.
1213
- * @property {boolean} overrideForCli
1214
- * @property {boolean} parseOutput
1215
- * @property {libClient | undefined} sdk
1216
- */
1217
-
1218
- /**
1219
- * @param {ProjectsListPlatformsRequestParams} params
1220
- */
1221
- const projectsListPlatforms = async ({projectId,total,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => {
1222
- let client = !sdk ? await sdkForConsole() :
1223
- sdk;
1224
- let apiPath = '/projects/{projectId}/platforms'.replace('{projectId}', projectId);
1225
- let payload = {};
1226
- if (typeof total !== 'undefined') {
1227
- payload['total'] = total;
1228
- }
1229
-
1230
- let response = undefined;
1231
-
1232
- response = await client.call('get', apiPath, {
1233
- }, payload);
1234
-
1235
- if (parseOutput) {
1236
- if(console) {
1237
- showConsoleLink('projects', 'listPlatforms', projectId);
1238
- } else {
1239
- parse(response)
1240
- }
1241
- }
1242
-
1243
- return response;
1244
-
1245
- }
1246
- /**
1247
- * @typedef {Object} ProjectsCreatePlatformRequestParams
1248
- * @property {string} projectId Project unique ID.
1249
- * @property {PlatformType} type Platform type. Possible values are: web, flutter-web, flutter-ios, flutter-android, flutter-linux, flutter-macos, flutter-windows, apple-ios, apple-macos, apple-watchos, apple-tvos, android, unity, react-native-ios, react-native-android.
1250
- * @property {string} name Platform name. Max length: 128 chars.
1251
- * @property {string} key Package name for Android or bundle ID for iOS or macOS. Max length: 256 chars.
1252
- * @property {string} store App store or Google Play store ID. Max length: 256 chars.
1253
- * @property {string} hostname Platform client hostname. Max length: 256 chars.
1254
- * @property {boolean} overrideForCli
1255
- * @property {boolean} parseOutput
1256
- * @property {libClient | undefined} sdk
1257
- */
1258
-
1259
- /**
1260
- * @param {ProjectsCreatePlatformRequestParams} params
1261
- */
1262
- const projectsCreatePlatform = async ({projectId,type,name,key,store,hostname,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
1263
- let client = !sdk ? await sdkForConsole() :
1264
- sdk;
1265
- let apiPath = '/projects/{projectId}/platforms'.replace('{projectId}', projectId);
1266
- let payload = {};
1267
- if (typeof type !== 'undefined') {
1268
- payload['type'] = type;
1269
- }
1270
- if (typeof name !== 'undefined') {
1271
- payload['name'] = name;
1272
- }
1273
- if (typeof key !== 'undefined') {
1274
- payload['key'] = key;
1275
- }
1276
- if (typeof store !== 'undefined') {
1277
- payload['store'] = store;
1278
- }
1279
- if (typeof hostname !== 'undefined') {
1280
- payload['hostname'] = hostname;
1281
- }
1282
-
1283
- let response = undefined;
1284
-
1285
- response = await client.call('post', apiPath, {
1286
- 'content-type': 'application/json',
1287
- }, payload);
1288
-
1289
- if (parseOutput) {
1290
- parse(response)
1291
- }
1292
-
1293
- return response;
1294
-
1295
- }
1296
- /**
1297
- * @typedef {Object} ProjectsGetPlatformRequestParams
1298
- * @property {string} projectId Project unique ID.
1299
- * @property {string} platformId Platform unique ID.
1300
- * @property {boolean} overrideForCli
1301
- * @property {boolean} parseOutput
1302
- * @property {libClient | undefined} sdk
1303
- */
1304
-
1305
- /**
1306
- * @param {ProjectsGetPlatformRequestParams} params
1307
- */
1308
- const projectsGetPlatform = async ({projectId,platformId,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => {
1309
- let client = !sdk ? await sdkForConsole() :
1310
- sdk;
1311
- let apiPath = '/projects/{projectId}/platforms/{platformId}'.replace('{projectId}', projectId).replace('{platformId}', platformId);
1312
- let payload = {};
1313
-
1314
- let response = undefined;
1315
-
1316
- response = await client.call('get', apiPath, {
1317
- }, payload);
1318
-
1319
- if (parseOutput) {
1320
- if(console) {
1321
- showConsoleLink('projects', 'getPlatform', projectId, platformId);
1322
- } else {
1323
- parse(response)
1324
- }
1325
- }
1326
-
1327
- return response;
1328
-
1329
- }
1330
- /**
1331
- * @typedef {Object} ProjectsUpdatePlatformRequestParams
1332
- * @property {string} projectId Project unique ID.
1333
- * @property {string} platformId Platform unique ID.
1334
- * @property {string} name Platform name. Max length: 128 chars.
1335
- * @property {string} key Package name for android or bundle ID for iOS. Max length: 256 chars.
1336
- * @property {string} store App store or Google Play store ID. Max length: 256 chars.
1337
- * @property {string} hostname Platform client URL. Max length: 256 chars.
1338
- * @property {boolean} overrideForCli
1339
- * @property {boolean} parseOutput
1340
- * @property {libClient | undefined} sdk
1341
- */
1342
-
1343
- /**
1344
- * @param {ProjectsUpdatePlatformRequestParams} params
1345
- */
1346
- const projectsUpdatePlatform = async ({projectId,platformId,name,key,store,hostname,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
1347
- let client = !sdk ? await sdkForConsole() :
1348
- sdk;
1349
- let apiPath = '/projects/{projectId}/platforms/{platformId}'.replace('{projectId}', projectId).replace('{platformId}', platformId);
1350
- let payload = {};
1351
- if (typeof name !== 'undefined') {
1352
- payload['name'] = name;
1353
- }
1354
- if (typeof key !== 'undefined') {
1355
- payload['key'] = key;
1356
- }
1357
- if (typeof store !== 'undefined') {
1358
- payload['store'] = store;
1359
- }
1360
- if (typeof hostname !== 'undefined') {
1361
- payload['hostname'] = hostname;
1362
- }
1363
-
1364
- let response = undefined;
1365
-
1366
- response = await client.call('put', apiPath, {
1367
- 'content-type': 'application/json',
1368
- }, payload);
1369
-
1370
- if (parseOutput) {
1371
- parse(response)
1372
- }
1373
-
1374
- return response;
1375
-
1376
- }
1377
- /**
1378
- * @typedef {Object} ProjectsDeletePlatformRequestParams
1379
- * @property {string} projectId Project unique ID.
1380
- * @property {string} platformId Platform unique ID.
1381
- * @property {boolean} overrideForCli
1382
- * @property {boolean} parseOutput
1383
- * @property {libClient | undefined} sdk
1384
- */
1385
-
1386
- /**
1387
- * @param {ProjectsDeletePlatformRequestParams} params
1388
- */
1389
- const projectsDeletePlatform = async ({projectId,platformId,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
1390
- let client = !sdk ? await sdkForConsole() :
1391
- sdk;
1392
- let apiPath = '/projects/{projectId}/platforms/{platformId}'.replace('{projectId}', projectId).replace('{platformId}', platformId);
1393
- let payload = {};
1394
-
1395
- let response = undefined;
1396
-
1397
- response = await client.call('delete', apiPath, {
1398
- 'content-type': 'application/json',
1399
- }, payload);
1400
-
1401
- if (parseOutput) {
1402
- parse(response)
1403
- }
1404
-
1405
- return response;
1406
-
1407
- }
1408
- /**
1409
- * @typedef {Object} ProjectsUpdateServiceStatusRequestParams
1410
- * @property {string} projectId Project unique ID.
1411
- * @property {ApiService} service Service name.
1412
- * @property {boolean} status Service status.
1413
- * @property {boolean} overrideForCli
1414
- * @property {boolean} parseOutput
1415
- * @property {libClient | undefined} sdk
1416
- */
1417
-
1418
- /**
1419
- * @param {ProjectsUpdateServiceStatusRequestParams} params
1420
- */
1421
- const projectsUpdateServiceStatus = async ({projectId,service,status,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
1422
- let client = !sdk ? await sdkForConsole() :
1423
- sdk;
1424
- let apiPath = '/projects/{projectId}/service'.replace('{projectId}', projectId);
1425
- let payload = {};
1426
- if (typeof service !== 'undefined') {
1427
- payload['service'] = service;
1428
- }
1429
- if (typeof status !== 'undefined') {
1430
- payload['status'] = status;
1431
- }
1432
-
1433
- let response = undefined;
1434
-
1435
- response = await client.call('patch', apiPath, {
1436
- 'content-type': 'application/json',
1437
- }, payload);
1438
-
1439
- if (parseOutput) {
1440
- parse(response)
1441
- }
1442
-
1443
- return response;
1444
-
1445
- }
1446
- /**
1447
- * @typedef {Object} ProjectsUpdateServiceStatusAllRequestParams
1448
- * @property {string} projectId Project unique ID.
1449
- * @property {boolean} status Service status.
1450
- * @property {boolean} overrideForCli
1451
- * @property {boolean} parseOutput
1452
- * @property {libClient | undefined} sdk
1453
- */
1454
-
1455
- /**
1456
- * @param {ProjectsUpdateServiceStatusAllRequestParams} params
1457
- */
1458
- const projectsUpdateServiceStatusAll = async ({projectId,status,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
1459
- let client = !sdk ? await sdkForConsole() :
1460
- sdk;
1461
- let apiPath = '/projects/{projectId}/service/all'.replace('{projectId}', projectId);
1462
- let payload = {};
1463
- if (typeof status !== 'undefined') {
1464
- payload['status'] = status;
1465
- }
1466
-
1467
- let response = undefined;
1468
-
1469
- response = await client.call('patch', apiPath, {
1470
- 'content-type': 'application/json',
1471
- }, payload);
1472
-
1473
- if (parseOutput) {
1474
- parse(response)
1475
- }
1476
-
1477
- return response;
1478
-
1479
- }
1480
- /**
1481
- * @typedef {Object} ProjectsUpdateSMTPRequestParams
1482
- * @property {string} projectId Project unique ID.
1483
- * @property {boolean} enabled Enable custom SMTP service
1484
- * @property {string} senderName Name of the email sender
1485
- * @property {string} senderEmail Email of the sender
1486
- * @property {string} replyTo Reply to email
1487
- * @property {string} host SMTP server host name
1488
- * @property {number} port SMTP server port
1489
- * @property {string} username SMTP server username
1490
- * @property {string} password SMTP server password
1491
- * @property {SMTPSecure} secure Does SMTP server use secure connection
1492
- * @property {boolean} overrideForCli
1493
- * @property {boolean} parseOutput
1494
- * @property {libClient | undefined} sdk
1495
- */
1496
-
1497
- /**
1498
- * @param {ProjectsUpdateSMTPRequestParams} params
1499
- */
1500
- const projectsUpdateSMTP = async ({projectId,enabled,senderName,senderEmail,replyTo,host,port,username,password,secure,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
1501
- let client = !sdk ? await sdkForConsole() :
1502
- sdk;
1503
- let apiPath = '/projects/{projectId}/smtp'.replace('{projectId}', projectId);
1504
- let payload = {};
1505
- if (typeof enabled !== 'undefined') {
1506
- payload['enabled'] = enabled;
1507
- }
1508
- if (typeof senderName !== 'undefined') {
1509
- payload['senderName'] = senderName;
1510
- }
1511
- if (typeof senderEmail !== 'undefined') {
1512
- payload['senderEmail'] = senderEmail;
1513
- }
1514
- if (typeof replyTo !== 'undefined') {
1515
- payload['replyTo'] = replyTo;
1516
- }
1517
- if (typeof host !== 'undefined') {
1518
- payload['host'] = host;
1519
- }
1520
- if (typeof port !== 'undefined') {
1521
- payload['port'] = port;
1522
- }
1523
- if (typeof username !== 'undefined') {
1524
- payload['username'] = username;
1525
- }
1526
- if (typeof password !== 'undefined') {
1527
- payload['password'] = password;
1528
- }
1529
- if (typeof secure !== 'undefined') {
1530
- payload['secure'] = secure;
1531
- }
1532
-
1533
- let response = undefined;
1534
-
1535
- response = await client.call('patch', apiPath, {
1536
- 'content-type': 'application/json',
1537
- }, payload);
1538
-
1539
- if (parseOutput) {
1540
- parse(response)
1541
- }
1542
-
1543
- return response;
1544
-
1545
- }
1546
- /**
1547
- * @typedef {Object} ProjectsCreateSMTPTestRequestParams
1548
- * @property {string} projectId Project unique ID.
1549
- * @property {string[]} emails Array of emails to send test email to. Maximum of 10 emails are allowed.
1550
- * @property {string} senderName Name of the email sender
1551
- * @property {string} senderEmail Email of the sender
1552
- * @property {string} host SMTP server host name
1553
- * @property {string} replyTo Reply to email
1554
- * @property {number} port SMTP server port
1555
- * @property {string} username SMTP server username
1556
- * @property {string} password SMTP server password
1557
- * @property {SMTPSecure} secure Does SMTP server use secure connection
1558
- * @property {boolean} overrideForCli
1559
- * @property {boolean} parseOutput
1560
- * @property {libClient | undefined} sdk
1561
- */
1562
-
1563
- /**
1564
- * @param {ProjectsCreateSMTPTestRequestParams} params
1565
- */
1566
- const projectsCreateSMTPTest = async ({projectId,emails,senderName,senderEmail,host,replyTo,port,username,password,secure,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
1567
- let client = !sdk ? await sdkForConsole() :
1568
- sdk;
1569
- let apiPath = '/projects/{projectId}/smtp/tests'.replace('{projectId}', projectId);
1570
- let payload = {};
1571
- emails = emails === true ? [] : emails;
1572
- if (typeof emails !== 'undefined') {
1573
- payload['emails'] = emails;
1574
- }
1575
- if (typeof senderName !== 'undefined') {
1576
- payload['senderName'] = senderName;
1577
- }
1578
- if (typeof senderEmail !== 'undefined') {
1579
- payload['senderEmail'] = senderEmail;
1580
- }
1581
- if (typeof replyTo !== 'undefined') {
1582
- payload['replyTo'] = replyTo;
1583
- }
1584
- if (typeof host !== 'undefined') {
1585
- payload['host'] = host;
1586
- }
1587
- if (typeof port !== 'undefined') {
1588
- payload['port'] = port;
1589
- }
1590
- if (typeof username !== 'undefined') {
1591
- payload['username'] = username;
1592
- }
1593
- if (typeof password !== 'undefined') {
1594
- payload['password'] = password;
1595
- }
1596
- if (typeof secure !== 'undefined') {
1597
- payload['secure'] = secure;
1598
- }
1599
-
1600
- let response = undefined;
1601
-
1602
- response = await client.call('post', apiPath, {
1603
- 'content-type': 'application/json',
1604
- }, payload);
1605
-
1606
- if (parseOutput) {
1607
- parse(response)
1608
- }
1609
-
1610
- return response;
1611
-
1612
- }
1613
- /**
1614
- * @typedef {Object} ProjectsUpdateTeamRequestParams
1615
- * @property {string} projectId Project unique ID.
1616
- * @property {string} teamId Team ID of the team to transfer project to.
1617
- * @property {boolean} overrideForCli
1618
- * @property {boolean} parseOutput
1619
- * @property {libClient | undefined} sdk
1620
- */
1621
-
1622
- /**
1623
- * @param {ProjectsUpdateTeamRequestParams} params
1624
- */
1625
- const projectsUpdateTeam = async ({projectId,teamId,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
1626
- let client = !sdk ? await sdkForConsole() :
1627
- sdk;
1628
- let apiPath = '/projects/{projectId}/team'.replace('{projectId}', projectId);
1629
- let payload = {};
1630
- if (typeof teamId !== 'undefined') {
1631
- payload['teamId'] = teamId;
1632
- }
1633
-
1634
- let response = undefined;
1635
-
1636
- response = await client.call('patch', apiPath, {
1637
- 'content-type': 'application/json',
1638
- }, payload);
1639
-
1640
- if (parseOutput) {
1641
- parse(response)
1642
- }
1643
-
1644
- return response;
1645
-
1646
- }
1647
- /**
1648
- * @typedef {Object} ProjectsGetEmailTemplateRequestParams
1649
- * @property {string} projectId Project unique ID.
1650
- * @property {EmailTemplateType} type Template type
1651
- * @property {EmailTemplateLocale} locale Template locale
1652
- * @property {boolean} overrideForCli
1653
- * @property {boolean} parseOutput
1654
- * @property {libClient | undefined} sdk
1655
- */
1656
-
1657
- /**
1658
- * @param {ProjectsGetEmailTemplateRequestParams} params
1659
- */
1660
- const projectsGetEmailTemplate = async ({projectId,type,locale,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
1661
- let client = !sdk ? await sdkForConsole() :
1662
- sdk;
1663
- let apiPath = '/projects/{projectId}/templates/email/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale);
1664
- let payload = {};
1665
-
1666
- let response = undefined;
1667
-
1668
- response = await client.call('get', apiPath, {
1669
- }, payload);
1670
-
1671
- if (parseOutput) {
1672
- parse(response)
1673
- }
1674
-
1675
- return response;
1676
-
1677
- }
1678
- /**
1679
- * @typedef {Object} ProjectsUpdateEmailTemplateRequestParams
1680
- * @property {string} projectId Project unique ID.
1681
- * @property {EmailTemplateType} type Template type
1682
- * @property {EmailTemplateLocale} locale Template locale
1683
- * @property {string} subject Email Subject
1684
- * @property {string} message Template message
1685
- * @property {string} senderName Name of the email sender
1686
- * @property {string} senderEmail Email of the sender
1687
- * @property {string} replyTo Reply to email
1688
- * @property {boolean} overrideForCli
1689
- * @property {boolean} parseOutput
1690
- * @property {libClient | undefined} sdk
1691
- */
1692
-
1693
- /**
1694
- * @param {ProjectsUpdateEmailTemplateRequestParams} params
1695
- */
1696
- const projectsUpdateEmailTemplate = async ({projectId,type,locale,subject,message,senderName,senderEmail,replyTo,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
1697
- let client = !sdk ? await sdkForConsole() :
1698
- sdk;
1699
- let apiPath = '/projects/{projectId}/templates/email/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale);
1700
- let payload = {};
1701
- if (typeof subject !== 'undefined') {
1702
- payload['subject'] = subject;
1703
- }
1704
- if (typeof message !== 'undefined') {
1705
- payload['message'] = message;
1706
- }
1707
- if (typeof senderName !== 'undefined') {
1708
- payload['senderName'] = senderName;
1709
- }
1710
- if (typeof senderEmail !== 'undefined') {
1711
- payload['senderEmail'] = senderEmail;
1712
- }
1713
- if (typeof replyTo !== 'undefined') {
1714
- payload['replyTo'] = replyTo;
1715
- }
1716
-
1717
- let response = undefined;
1718
-
1719
- response = await client.call('patch', apiPath, {
1720
- 'content-type': 'application/json',
1721
- }, payload);
1722
-
1723
- if (parseOutput) {
1724
- parse(response)
1725
- }
1726
-
1727
- return response;
1728
-
1729
- }
1730
- /**
1731
- * @typedef {Object} ProjectsDeleteEmailTemplateRequestParams
1732
- * @property {string} projectId Project unique ID.
1733
- * @property {EmailTemplateType} type Template type
1734
- * @property {EmailTemplateLocale} locale Template locale
1735
- * @property {boolean} overrideForCli
1736
- * @property {boolean} parseOutput
1737
- * @property {libClient | undefined} sdk
1738
- */
1739
-
1740
- /**
1741
- * @param {ProjectsDeleteEmailTemplateRequestParams} params
1742
- */
1743
- const projectsDeleteEmailTemplate = async ({projectId,type,locale,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
1744
- let client = !sdk ? await sdkForConsole() :
1745
- sdk;
1746
- let apiPath = '/projects/{projectId}/templates/email/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale);
1747
- let payload = {};
1748
-
1749
- let response = undefined;
1750
-
1751
- response = await client.call('delete', apiPath, {
1752
- 'content-type': 'application/json',
1753
- }, payload);
1754
-
1755
- if (parseOutput) {
1756
- parse(response)
1757
- }
1758
-
1759
- return response;
1760
-
1761
- }
1762
- /**
1763
- * @typedef {Object} ProjectsGetSMSTemplateRequestParams
1764
- * @property {string} projectId Project unique ID.
1765
- * @property {SmsTemplateType} type Template type
1766
- * @property {SmsTemplateLocale} locale Template locale
1767
- * @property {boolean} overrideForCli
1768
- * @property {boolean} parseOutput
1769
- * @property {libClient | undefined} sdk
1770
- */
1771
-
1772
- /**
1773
- * @param {ProjectsGetSMSTemplateRequestParams} params
1774
- */
1775
- const projectsGetSMSTemplate = async ({projectId,type,locale,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
1776
- let client = !sdk ? await sdkForConsole() :
1777
- sdk;
1778
- let apiPath = '/projects/{projectId}/templates/sms/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale);
1779
- let payload = {};
1780
-
1781
- let response = undefined;
1782
-
1783
- response = await client.call('get', apiPath, {
1784
- }, payload);
1785
-
1786
- if (parseOutput) {
1787
- parse(response)
1788
- }
1789
-
1790
- return response;
1791
-
1792
- }
1793
- /**
1794
- * @typedef {Object} ProjectsUpdateSMSTemplateRequestParams
1795
- * @property {string} projectId Project unique ID.
1796
- * @property {SmsTemplateType} type Template type
1797
- * @property {SmsTemplateLocale} locale Template locale
1798
- * @property {string} message Template message
1799
- * @property {boolean} overrideForCli
1800
- * @property {boolean} parseOutput
1801
- * @property {libClient | undefined} sdk
1802
- */
1803
-
1804
- /**
1805
- * @param {ProjectsUpdateSMSTemplateRequestParams} params
1806
- */
1807
- const projectsUpdateSMSTemplate = async ({projectId,type,locale,message,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
1808
- let client = !sdk ? await sdkForConsole() :
1809
- sdk;
1810
- let apiPath = '/projects/{projectId}/templates/sms/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale);
1811
- let payload = {};
1812
- if (typeof message !== 'undefined') {
1813
- payload['message'] = message;
1814
- }
1815
-
1816
- let response = undefined;
1817
-
1818
- response = await client.call('patch', apiPath, {
1819
- 'content-type': 'application/json',
1820
- }, payload);
1821
-
1822
- if (parseOutput) {
1823
- parse(response)
1824
- }
1825
-
1826
- return response;
1827
-
1828
- }
1829
- /**
1830
- * @typedef {Object} ProjectsDeleteSMSTemplateRequestParams
1831
- * @property {string} projectId Project unique ID.
1832
- * @property {SmsTemplateType} type Template type
1833
- * @property {SmsTemplateLocale} locale Template locale
1834
- * @property {boolean} overrideForCli
1835
- * @property {boolean} parseOutput
1836
- * @property {libClient | undefined} sdk
1837
- */
1838
-
1839
- /**
1840
- * @param {ProjectsDeleteSMSTemplateRequestParams} params
1841
- */
1842
- const projectsDeleteSMSTemplate = async ({projectId,type,locale,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
1843
- let client = !sdk ? await sdkForConsole() :
1844
- sdk;
1845
- let apiPath = '/projects/{projectId}/templates/sms/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale);
1846
- let payload = {};
1847
-
1848
- let response = undefined;
1849
-
1850
- response = await client.call('delete', apiPath, {
1851
- 'content-type': 'application/json',
1852
- }, payload);
1853
-
1854
- if (parseOutput) {
1855
- parse(response)
1856
- }
1857
-
1858
- return response;
1859
-
1860
- }
1861
- /**
1862
- * @typedef {Object} ProjectsListWebhooksRequestParams
1863
- * @property {string} projectId Project unique ID.
1864
- * @property {boolean} total When set to false, the total count returned will be 0 and will not be calculated.
1865
- * @property {boolean} overrideForCli
1866
- * @property {boolean} parseOutput
1867
- * @property {libClient | undefined} sdk
1868
- */
1869
-
1870
- /**
1871
- * @param {ProjectsListWebhooksRequestParams} params
1872
- */
1873
- const projectsListWebhooks = async ({projectId,total,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => {
1874
- let client = !sdk ? await sdkForConsole() :
1875
- sdk;
1876
- let apiPath = '/projects/{projectId}/webhooks'.replace('{projectId}', projectId);
1877
- let payload = {};
1878
- if (typeof total !== 'undefined') {
1879
- payload['total'] = total;
1880
- }
1881
-
1882
- let response = undefined;
1883
-
1884
- response = await client.call('get', apiPath, {
1885
- }, payload);
1886
-
1887
- if (parseOutput) {
1888
- if(console) {
1889
- showConsoleLink('projects', 'listWebhooks', projectId);
1890
- } else {
1891
- parse(response)
1892
- }
1893
- }
1894
-
1895
- return response;
1896
-
1897
- }
1898
- /**
1899
- * @typedef {Object} ProjectsCreateWebhookRequestParams
1900
- * @property {string} projectId Project unique ID.
1901
- * @property {string} name Webhook name. Max length: 128 chars.
1902
- * @property {string[]} events Events list. Maximum of 100 events are allowed.
1903
- * @property {string} url Webhook URL.
1904
- * @property {boolean} security Certificate verification, false for disabled or true for enabled.
1905
- * @property {boolean} enabled Enable or disable a webhook.
1906
- * @property {string} httpUser Webhook HTTP user. Max length: 256 chars.
1907
- * @property {string} httpPass Webhook HTTP password. Max length: 256 chars.
1908
- * @property {boolean} overrideForCli
1909
- * @property {boolean} parseOutput
1910
- * @property {libClient | undefined} sdk
1911
- */
1912
-
1913
- /**
1914
- * @param {ProjectsCreateWebhookRequestParams} params
1915
- */
1916
- const projectsCreateWebhook = async ({projectId,name,events,url,security,enabled,httpUser,httpPass,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
1917
- let client = !sdk ? await sdkForConsole() :
1918
- sdk;
1919
- let apiPath = '/projects/{projectId}/webhooks'.replace('{projectId}', projectId);
1920
- let payload = {};
1921
- if (typeof name !== 'undefined') {
1922
- payload['name'] = name;
1923
- }
1924
- if (typeof enabled !== 'undefined') {
1925
- payload['enabled'] = enabled;
1926
- }
1927
- events = events === true ? [] : events;
1928
- if (typeof events !== 'undefined') {
1929
- payload['events'] = events;
1930
- }
1931
- if (typeof url !== 'undefined') {
1932
- payload['url'] = url;
1933
- }
1934
- if (typeof security !== 'undefined') {
1935
- payload['security'] = security;
1936
- }
1937
- if (typeof httpUser !== 'undefined') {
1938
- payload['httpUser'] = httpUser;
1939
- }
1940
- if (typeof httpPass !== 'undefined') {
1941
- payload['httpPass'] = httpPass;
1942
- }
1943
-
1944
- let response = undefined;
1945
-
1946
- response = await client.call('post', apiPath, {
1947
- 'content-type': 'application/json',
1948
- }, payload);
1949
-
1950
- if (parseOutput) {
1951
- parse(response)
1952
- }
1953
-
1954
- return response;
1955
-
1956
- }
1957
- /**
1958
- * @typedef {Object} ProjectsGetWebhookRequestParams
1959
- * @property {string} projectId Project unique ID.
1960
- * @property {string} webhookId Webhook unique ID.
1961
- * @property {boolean} overrideForCli
1962
- * @property {boolean} parseOutput
1963
- * @property {libClient | undefined} sdk
1964
- */
1965
-
1966
- /**
1967
- * @param {ProjectsGetWebhookRequestParams} params
1968
- */
1969
- const projectsGetWebhook = async ({projectId,webhookId,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => {
1970
- let client = !sdk ? await sdkForConsole() :
1971
- sdk;
1972
- let apiPath = '/projects/{projectId}/webhooks/{webhookId}'.replace('{projectId}', projectId).replace('{webhookId}', webhookId);
1973
- let payload = {};
1974
-
1975
- let response = undefined;
1976
-
1977
- response = await client.call('get', apiPath, {
1978
- }, payload);
1979
-
1980
- if (parseOutput) {
1981
- if(console) {
1982
- showConsoleLink('projects', 'getWebhook', projectId, webhookId);
1983
- } else {
1984
- parse(response)
1985
- }
1986
- }
1987
-
1988
- return response;
1989
-
1990
- }
1991
- /**
1992
- * @typedef {Object} ProjectsUpdateWebhookRequestParams
1993
- * @property {string} projectId Project unique ID.
1994
- * @property {string} webhookId Webhook unique ID.
1995
- * @property {string} name Webhook name. Max length: 128 chars.
1996
- * @property {string[]} events Events list. Maximum of 100 events are allowed.
1997
- * @property {string} url Webhook URL.
1998
- * @property {boolean} security Certificate verification, false for disabled or true for enabled.
1999
- * @property {boolean} enabled Enable or disable a webhook.
2000
- * @property {string} httpUser Webhook HTTP user. Max length: 256 chars.
2001
- * @property {string} httpPass Webhook HTTP password. Max length: 256 chars.
2002
- * @property {boolean} overrideForCli
2003
- * @property {boolean} parseOutput
2004
- * @property {libClient | undefined} sdk
2005
- */
2006
-
2007
- /**
2008
- * @param {ProjectsUpdateWebhookRequestParams} params
2009
- */
2010
- const projectsUpdateWebhook = async ({projectId,webhookId,name,events,url,security,enabled,httpUser,httpPass,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
2011
- let client = !sdk ? await sdkForConsole() :
2012
- sdk;
2013
- let apiPath = '/projects/{projectId}/webhooks/{webhookId}'.replace('{projectId}', projectId).replace('{webhookId}', webhookId);
2014
- let payload = {};
2015
- if (typeof name !== 'undefined') {
2016
- payload['name'] = name;
2017
- }
2018
- if (typeof enabled !== 'undefined') {
2019
- payload['enabled'] = enabled;
2020
- }
2021
- events = events === true ? [] : events;
2022
- if (typeof events !== 'undefined') {
2023
- payload['events'] = events;
2024
- }
2025
- if (typeof url !== 'undefined') {
2026
- payload['url'] = url;
2027
- }
2028
- if (typeof security !== 'undefined') {
2029
- payload['security'] = security;
2030
- }
2031
- if (typeof httpUser !== 'undefined') {
2032
- payload['httpUser'] = httpUser;
2033
- }
2034
- if (typeof httpPass !== 'undefined') {
2035
- payload['httpPass'] = httpPass;
2036
- }
2037
-
2038
- let response = undefined;
2039
-
2040
- response = await client.call('put', apiPath, {
2041
- 'content-type': 'application/json',
2042
- }, payload);
2043
-
2044
- if (parseOutput) {
2045
- parse(response)
2046
- }
2047
-
2048
- return response;
2049
-
2050
- }
2051
- /**
2052
- * @typedef {Object} ProjectsDeleteWebhookRequestParams
2053
- * @property {string} projectId Project unique ID.
2054
- * @property {string} webhookId Webhook unique ID.
2055
- * @property {boolean} overrideForCli
2056
- * @property {boolean} parseOutput
2057
- * @property {libClient | undefined} sdk
2058
- */
2059
-
2060
- /**
2061
- * @param {ProjectsDeleteWebhookRequestParams} params
2062
- */
2063
- const projectsDeleteWebhook = async ({projectId,webhookId,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
2064
- let client = !sdk ? await sdkForConsole() :
2065
- sdk;
2066
- let apiPath = '/projects/{projectId}/webhooks/{webhookId}'.replace('{projectId}', projectId).replace('{webhookId}', webhookId);
2067
- let payload = {};
2068
-
2069
- let response = undefined;
2070
-
2071
- response = await client.call('delete', apiPath, {
2072
- 'content-type': 'application/json',
2073
- }, payload);
2074
-
2075
- if (parseOutput) {
2076
- parse(response)
2077
- }
2078
-
2079
- return response;
2080
-
2081
- }
2082
- /**
2083
- * @typedef {Object} ProjectsUpdateWebhookSignatureRequestParams
2084
- * @property {string} projectId Project unique ID.
2085
- * @property {string} webhookId Webhook unique ID.
2086
- * @property {boolean} overrideForCli
2087
- * @property {boolean} parseOutput
2088
- * @property {libClient | undefined} sdk
2089
- */
2090
-
2091
- /**
2092
- * @param {ProjectsUpdateWebhookSignatureRequestParams} params
2093
- */
2094
- const projectsUpdateWebhookSignature = async ({projectId,webhookId,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
2095
- let client = !sdk ? await sdkForConsole() :
2096
- sdk;
2097
- let apiPath = '/projects/{projectId}/webhooks/{webhookId}/signature'.replace('{projectId}', projectId).replace('{webhookId}', webhookId);
2098
- let payload = {};
2099
-
2100
- let response = undefined;
2101
-
2102
- response = await client.call('patch', apiPath, {
2103
- 'content-type': 'application/json',
2104
- }, payload);
2105
-
2106
- if (parseOutput) {
2107
- parse(response)
2108
- }
2109
-
2110
- return response;
2111
-
2112
- }
2113
- projects
2114
- .command(`list`)
2115
- .description(`Get a list of all projects. You can use the query params to filter your results. `)
2116
- .option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, teamId`)
2117
- .option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`)
2118
- .option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value))
2119
- .option(`--console`, `Get the resource console url`)
2120
- .action(actionRunner(projectsList))
2121
-
2122
- projects
2123
- .command(`create`)
2124
- .description(`Create a new project. You can create a maximum of 100 projects per account. `)
2125
- .requiredOption(`--project-id <project-id>`, `Unique Id. Choose a custom ID or generate a random ID with 'ID.unique()'. Valid chars are a-z, and hyphen. Can't start with a special char. Max length is 36 chars.`)
2126
- .requiredOption(`--name <name>`, `Project name. Max length: 128 chars.`)
2127
- .requiredOption(`--team-id <team-id>`, `Team unique ID.`)
2128
- .option(`--region <region>`, `Project Region.`)
2129
- .option(`--description <description>`, `Project description. Max length: 256 chars.`)
2130
- .option(`--logo <logo>`, `Project logo.`)
2131
- .option(`--url <url>`, `Project URL.`)
2132
- .option(`--legal-name <legal-name>`, `Project legal Name. Max length: 256 chars.`)
2133
- .option(`--legal-country <legal-country>`, `Project legal Country. Max length: 256 chars.`)
2134
- .option(`--legal-state <legal-state>`, `Project legal State. Max length: 256 chars.`)
2135
- .option(`--legal-city <legal-city>`, `Project legal City. Max length: 256 chars.`)
2136
- .option(`--legal-address <legal-address>`, `Project legal Address. Max length: 256 chars.`)
2137
- .option(`--legal-tax-id <legal-tax-id>`, `Project legal Tax ID. Max length: 256 chars.`)
2138
- .action(actionRunner(projectsCreate))
2139
-
2140
- projects
2141
- .command(`get`)
2142
- .description(`Get a project by its unique ID. This endpoint allows you to retrieve the project's details, including its name, description, team, region, and other metadata. `)
2143
- .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2144
- .option(`--console`, `Get the resource console url`)
2145
- .action(actionRunner(projectsGet))
2146
-
2147
- projects
2148
- .command(`update`)
2149
- .description(`Update a project by its unique ID.`)
2150
- .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2151
- .requiredOption(`--name <name>`, `Project name. Max length: 128 chars.`)
2152
- .option(`--description <description>`, `Project description. Max length: 256 chars.`)
2153
- .option(`--logo <logo>`, `Project logo.`)
2154
- .option(`--url <url>`, `Project URL.`)
2155
- .option(`--legal-name <legal-name>`, `Project legal name. Max length: 256 chars.`)
2156
- .option(`--legal-country <legal-country>`, `Project legal country. Max length: 256 chars.`)
2157
- .option(`--legal-state <legal-state>`, `Project legal state. Max length: 256 chars.`)
2158
- .option(`--legal-city <legal-city>`, `Project legal city. Max length: 256 chars.`)
2159
- .option(`--legal-address <legal-address>`, `Project legal address. Max length: 256 chars.`)
2160
- .option(`--legal-tax-id <legal-tax-id>`, `Project legal tax ID. Max length: 256 chars.`)
2161
- .action(actionRunner(projectsUpdate))
2162
-
2163
- projects
2164
- .command(`delete`)
2165
- .description(`Delete a project by its unique ID.`)
2166
- .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2167
- .action(actionRunner(projectsDelete))
2168
-
2169
- projects
2170
- .command(`update-api-status`)
2171
- .description(`Update the status of a specific API type. Use this endpoint to enable or disable API types such as REST, GraphQL and Realtime.`)
2172
- .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2173
- .requiredOption(`--api <api>`, `API name.`)
2174
- .requiredOption(`--status [value]`, `API status.`, (value) => value === undefined ? true : parseBool(value))
2175
- .action(actionRunner(projectsUpdateAPIStatus))
2176
-
2177
- projects
2178
- .command(`update-api-status-all`)
2179
- .description(`Update the status of all API types. Use this endpoint to enable or disable API types such as REST, GraphQL and Realtime all at once.`)
2180
- .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2181
- .requiredOption(`--status [value]`, `API status.`, (value) => value === undefined ? true : parseBool(value))
2182
- .action(actionRunner(projectsUpdateAPIStatusAll))
2183
-
2184
- projects
2185
- .command(`update-auth-duration`)
2186
- .description(`Update how long sessions created within a project should stay active for.`)
2187
- .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2188
- .requiredOption(`--duration <duration>`, `Project session length in seconds. Max length: 31536000 seconds.`, parseInteger)
2189
- .action(actionRunner(projectsUpdateAuthDuration))
2190
-
2191
- projects
2192
- .command(`update-auth-limit`)
2193
- .description(`Update the maximum number of users allowed in this project. Set to 0 for unlimited users. `)
2194
- .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2195
- .requiredOption(`--limit <limit>`, `Set the max number of users allowed in this project. Use 0 for unlimited.`, parseInteger)
2196
- .action(actionRunner(projectsUpdateAuthLimit))
2197
-
2198
- projects
2199
- .command(`update-auth-sessions-limit`)
2200
- .description(`Update the maximum number of sessions allowed per user within the project, if the limit is hit the oldest session will be deleted to make room for new sessions.`)
2201
- .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2202
- .requiredOption(`--limit <limit>`, `Set the max number of users allowed in this project. Value allowed is between 1-100. Default is 10`, parseInteger)
2203
- .action(actionRunner(projectsUpdateAuthSessionsLimit))
2204
-
2205
- projects
2206
- .command(`update-memberships-privacy`)
2207
- .description(`Update project membership privacy settings. Use this endpoint to control what user information is visible to other team members, such as user name, email, and MFA status. `)
2208
- .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2209
- .requiredOption(`--user-name [value]`, `Set to true to show userName to members of a team.`, (value) => value === undefined ? true : parseBool(value))
2210
- .requiredOption(`--user-email [value]`, `Set to true to show email to members of a team.`, (value) => value === undefined ? true : parseBool(value))
2211
- .requiredOption(`--mfa [value]`, `Set to true to show mfa to members of a team.`, (value) => value === undefined ? true : parseBool(value))
2212
- .action(actionRunner(projectsUpdateMembershipsPrivacy))
2213
-
2214
- projects
2215
- .command(`update-mock-numbers`)
2216
- .description(`Update the list of mock phone numbers for testing. Use these numbers to bypass SMS verification in development. `)
2217
- .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2218
- .requiredOption(`--numbers [numbers...]`, `An array of mock numbers and their corresponding verification codes (OTPs). Each number should be a valid E.164 formatted phone number. Maximum of 10 numbers are allowed.`)
2219
- .action(actionRunner(projectsUpdateMockNumbers))
2220
-
2221
- projects
2222
- .command(`update-auth-password-dictionary`)
2223
- .description(`Enable or disable checking user passwords against common passwords dictionary. This helps ensure users don't use common and insecure passwords. `)
2224
- .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2225
- .requiredOption(`--enabled [value]`, `Set whether or not to enable checking user's password against most commonly used passwords. Default is false.`, (value) => value === undefined ? true : parseBool(value))
2226
- .action(actionRunner(projectsUpdateAuthPasswordDictionary))
2227
-
2228
- projects
2229
- .command(`update-auth-password-history`)
2230
- .description(`Update the authentication password history requirement. Use this endpoint to require new passwords to be different than the last X amount of previously used ones.`)
2231
- .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2232
- .requiredOption(`--limit <limit>`, `Set the max number of passwords to store in user history. User can't choose a new password that is already stored in the password history list. Max number of passwords allowed in history is20. Default value is 0`, parseInteger)
2233
- .action(actionRunner(projectsUpdateAuthPasswordHistory))
2234
-
2235
- projects
2236
- .command(`update-personal-data-check`)
2237
- .description(`Enable or disable checking user passwords against their personal data. This helps prevent users from using personal information in their passwords. `)
2238
- .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2239
- .requiredOption(`--enabled [value]`, `Set whether or not to check a password for similarity with personal data. Default is false.`, (value) => value === undefined ? true : parseBool(value))
2240
- .action(actionRunner(projectsUpdatePersonalDataCheck))
2241
-
2242
- projects
2243
- .command(`update-session-alerts`)
2244
- .description(`Enable or disable session email alerts. When enabled, users will receive email notifications when new sessions are created.`)
2245
- .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2246
- .requiredOption(`--alerts [value]`, `Set to true to enable session emails.`, (value) => value === undefined ? true : parseBool(value))
2247
- .action(actionRunner(projectsUpdateSessionAlerts))
2248
-
2249
- projects
2250
- .command(`update-session-invalidation`)
2251
- .description(`Invalidate all existing sessions. An optional auth security setting for projects, and enabled by default for console project.`)
2252
- .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2253
- .requiredOption(`--enabled [value]`, `Update authentication session invalidation status. Use this endpoint to enable or disable session invalidation on password change`, (value) => value === undefined ? true : parseBool(value))
2254
- .action(actionRunner(projectsUpdateSessionInvalidation))
2255
-
2256
- projects
2257
- .command(`update-auth-status`)
2258
- .description(`Update the status of a specific authentication method. Use this endpoint to enable or disable different authentication methods such as email, magic urls or sms in your project. `)
2259
- .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2260
- .requiredOption(`--method <method>`, `Auth Method. Possible values: email-password,magic-url,email-otp,anonymous,invites,jwt,phone`)
2261
- .requiredOption(`--status [value]`, `Set the status of this auth method.`, (value) => value === undefined ? true : parseBool(value))
2262
- .action(actionRunner(projectsUpdateAuthStatus))
2263
-
2264
- projects
2265
- .command(`list-dev-keys`)
2266
- .description(`List all the project\'s dev keys. Dev keys are project specific and allow you to bypass rate limits and get better error logging during development.'`)
2267
- .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2268
- .option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: accessedAt, expire`)
2269
- .option(`--console`, `Get the resource console url`)
2270
- .action(actionRunner(projectsListDevKeys))
2271
-
2272
- projects
2273
- .command(`create-dev-key`)
2274
- .description(`Create a new project dev key. Dev keys are project specific and allow you to bypass rate limits and get better error logging during development. Strictly meant for development purposes only.`)
2275
- .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2276
- .requiredOption(`--name <name>`, `Key name. Max length: 128 chars.`)
2277
- .requiredOption(`--expire <expire>`, `Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format.`)
2278
- .action(actionRunner(projectsCreateDevKey))
2279
-
2280
- projects
2281
- .command(`get-dev-key`)
2282
- .description(`Get a project\'s dev key by its unique ID. Dev keys are project specific and allow you to bypass rate limits and get better error logging during development.`)
2283
- .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2284
- .requiredOption(`--key-id <key-id>`, `Key unique ID.`)
2285
- .option(`--console`, `Get the resource console url`)
2286
- .action(actionRunner(projectsGetDevKey))
2287
-
2288
- projects
2289
- .command(`update-dev-key`)
2290
- .description(`Update a project\'s dev key by its unique ID. Use this endpoint to update a project\'s dev key name or expiration time.'`)
2291
- .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2292
- .requiredOption(`--key-id <key-id>`, `Key unique ID.`)
2293
- .requiredOption(`--name <name>`, `Key name. Max length: 128 chars.`)
2294
- .requiredOption(`--expire <expire>`, `Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format.`)
2295
- .action(actionRunner(projectsUpdateDevKey))
2296
-
2297
- projects
2298
- .command(`delete-dev-key`)
2299
- .description(`Delete a project\'s dev key by its unique ID. Once deleted, the key will no longer allow bypassing of rate limits and better logging of errors.`)
2300
- .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2301
- .requiredOption(`--key-id <key-id>`, `Key unique ID.`)
2302
- .action(actionRunner(projectsDeleteDevKey))
2303
-
2304
- projects
2305
- .command(`create-jwt`)
2306
- .description(`Create a new JWT token. This token can be used to authenticate users with custom scopes and expiration time. `)
2307
- .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2308
- .requiredOption(`--scopes [scopes...]`, `List of scopes allowed for JWT key. Maximum of 100 scopes are allowed.`)
2309
- .option(`--duration <duration>`, `Time in seconds before JWT expires. Default duration is 900 seconds, and maximum is 3600 seconds.`, parseInteger)
2310
- .action(actionRunner(projectsCreateJWT))
2311
-
2312
- projects
2313
- .command(`list-keys`)
2314
- .description(`Get a list of all API keys from the current project. `)
2315
- .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2316
- .option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value))
2317
- .option(`--console`, `Get the resource console url`)
2318
- .action(actionRunner(projectsListKeys))
2319
-
2320
- projects
2321
- .command(`create-key`)
2322
- .description(`Create a new API key. It's recommended to have multiple API keys with strict scopes for separate functions within your project.`)
2323
- .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2324
- .requiredOption(`--name <name>`, `Key name. Max length: 128 chars.`)
2325
- .option(`--scopes [scopes...]`, `Key scopes list. Maximum of 100 scopes are allowed.`)
2326
- .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.`)
2327
- .action(actionRunner(projectsCreateKey))
2328
-
2329
- projects
2330
- .command(`get-key`)
2331
- .description(`Get a key by its unique ID. This endpoint returns details about a specific API key in your project including it's scopes.`)
2332
- .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2333
- .requiredOption(`--key-id <key-id>`, `Key unique ID.`)
2334
- .option(`--console`, `Get the resource console url`)
2335
- .action(actionRunner(projectsGetKey))
2336
-
2337
- projects
2338
- .command(`update-key`)
2339
- .description(`Update a key by its unique ID. Use this endpoint to update the name, scopes, or expiration time of an API key. `)
2340
- .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2341
- .requiredOption(`--key-id <key-id>`, `Key unique ID.`)
2342
- .requiredOption(`--name <name>`, `Key name. Max length: 128 chars.`)
2343
- .option(`--scopes [scopes...]`, `Key scopes list. Maximum of 100 events are allowed.`)
2344
- .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.`)
2345
- .action(actionRunner(projectsUpdateKey))
2346
-
2347
- projects
2348
- .command(`delete-key`)
2349
- .description(`Delete a key by its unique ID. Once deleted, the key can no longer be used to authenticate API calls. `)
2350
- .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2351
- .requiredOption(`--key-id <key-id>`, `Key unique ID.`)
2352
- .action(actionRunner(projectsDeleteKey))
2353
-
2354
- projects
2355
- .command(`update-o-auth-2`)
2356
- .description(`Update the OAuth2 provider configurations. Use this endpoint to set up or update the OAuth2 provider credentials or enable/disable providers. `)
2357
- .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2358
- .requiredOption(`--provider <provider>`, `Provider Name`)
2359
- .option(`--app-id <app-id>`, `Provider app ID. Max length: 256 chars.`)
2360
- .option(`--secret <secret>`, `Provider secret key. Max length: 512 chars.`)
2361
- .option(`--enabled [value]`, `Provider status. Set to 'false' to disable new session creation.`, (value) => value === undefined ? true : parseBool(value))
2362
- .action(actionRunner(projectsUpdateOAuth2))
2363
-
2364
- projects
2365
- .command(`list-platforms`)
2366
- .description(`Get a list of all platforms in the project. This endpoint returns an array of all platforms and their configurations. `)
2367
- .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2368
- .option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value))
2369
- .option(`--console`, `Get the resource console url`)
2370
- .action(actionRunner(projectsListPlatforms))
2371
-
2372
- projects
2373
- .command(`create-platform`)
2374
- .description(`Create a new platform for your project. Use this endpoint to register a new platform where your users will run your application which will interact with the Appwrite API.`)
2375
- .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2376
- .requiredOption(`--type <type>`, `Platform type. Possible values are: web, flutter-web, flutter-ios, flutter-android, flutter-linux, flutter-macos, flutter-windows, apple-ios, apple-macos, apple-watchos, apple-tvos, android, unity, react-native-ios, react-native-android.`)
2377
- .requiredOption(`--name <name>`, `Platform name. Max length: 128 chars.`)
2378
- .option(`--key <key>`, `Package name for Android or bundle ID for iOS or macOS. Max length: 256 chars.`)
2379
- .option(`--store <store>`, `App store or Google Play store ID. Max length: 256 chars.`)
2380
- .option(`--hostname <hostname>`, `Platform client hostname. Max length: 256 chars.`)
2381
- .action(actionRunner(projectsCreatePlatform))
2382
-
2383
- projects
2384
- .command(`get-platform`)
2385
- .description(`Get a platform by its unique ID. This endpoint returns the platform's details, including its name, type, and key configurations. `)
2386
- .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2387
- .requiredOption(`--platform-id <platform-id>`, `Platform unique ID.`)
2388
- .option(`--console`, `Get the resource console url`)
2389
- .action(actionRunner(projectsGetPlatform))
2390
-
2391
- projects
2392
- .command(`update-platform`)
2393
- .description(`Update a platform by its unique ID. Use this endpoint to update the platform's name, key, platform store ID, or hostname. `)
2394
- .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2395
- .requiredOption(`--platform-id <platform-id>`, `Platform unique ID.`)
2396
- .requiredOption(`--name <name>`, `Platform name. Max length: 128 chars.`)
2397
- .option(`--key <key>`, `Package name for android or bundle ID for iOS. Max length: 256 chars.`)
2398
- .option(`--store <store>`, `App store or Google Play store ID. Max length: 256 chars.`)
2399
- .option(`--hostname <hostname>`, `Platform client URL. Max length: 256 chars.`)
2400
- .action(actionRunner(projectsUpdatePlatform))
2401
-
2402
- projects
2403
- .command(`delete-platform`)
2404
- .description(`Delete a platform by its unique ID. This endpoint removes the platform and all its configurations from the project. `)
2405
- .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2406
- .requiredOption(`--platform-id <platform-id>`, `Platform unique ID.`)
2407
- .action(actionRunner(projectsDeletePlatform))
2408
-
2409
- projects
2410
- .command(`update-service-status`)
2411
- .description(`Update the status of a specific service. Use this endpoint to enable or disable a service in your project. `)
2412
- .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2413
- .requiredOption(`--service <service>`, `Service name.`)
2414
- .requiredOption(`--status [value]`, `Service status.`, (value) => value === undefined ? true : parseBool(value))
2415
- .action(actionRunner(projectsUpdateServiceStatus))
2416
-
2417
- projects
2418
- .command(`update-service-status-all`)
2419
- .description(`Update the status of all services. Use this endpoint to enable or disable all optional services at once. `)
2420
- .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2421
- .requiredOption(`--status [value]`, `Service status.`, (value) => value === undefined ? true : parseBool(value))
2422
- .action(actionRunner(projectsUpdateServiceStatusAll))
2423
-
2424
- projects
2425
- .command(`update-smtp`)
2426
- .description(`Update the SMTP configuration for your project. Use this endpoint to configure your project's SMTP provider with your custom settings for sending transactional emails. `)
2427
- .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2428
- .requiredOption(`--enabled [value]`, `Enable custom SMTP service`, (value) => value === undefined ? true : parseBool(value))
2429
- .option(`--sender-name <sender-name>`, `Name of the email sender`)
2430
- .option(`--sender-email <sender-email>`, `Email of the sender`)
2431
- .option(`--reply-to <reply-to>`, `Reply to email`)
2432
- .option(`--host <host>`, `SMTP server host name`)
2433
- .option(`--port <port>`, `SMTP server port`, parseInteger)
2434
- .option(`--username <username>`, `SMTP server username`)
2435
- .option(`--password <password>`, `SMTP server password`)
2436
- .option(`--secure <secure>`, `Does SMTP server use secure connection`)
2437
- .action(actionRunner(projectsUpdateSMTP))
2438
-
2439
- projects
2440
- .command(`create-smtp-test`)
2441
- .description(`Send a test email to verify SMTP configuration. `)
2442
- .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2443
- .requiredOption(`--emails [emails...]`, `Array of emails to send test email to. Maximum of 10 emails are allowed.`)
2444
- .requiredOption(`--sender-name <sender-name>`, `Name of the email sender`)
2445
- .requiredOption(`--sender-email <sender-email>`, `Email of the sender`)
2446
- .requiredOption(`--host <host>`, `SMTP server host name`)
2447
- .option(`--reply-to <reply-to>`, `Reply to email`)
2448
- .option(`--port <port>`, `SMTP server port`, parseInteger)
2449
- .option(`--username <username>`, `SMTP server username`)
2450
- .option(`--password <password>`, `SMTP server password`)
2451
- .option(`--secure <secure>`, `Does SMTP server use secure connection`)
2452
- .action(actionRunner(projectsCreateSMTPTest))
2453
-
2454
- projects
2455
- .command(`update-team`)
2456
- .description(`Update the team ID of a project allowing for it to be transferred to another team.`)
2457
- .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2458
- .requiredOption(`--team-id <team-id>`, `Team ID of the team to transfer project to.`)
2459
- .action(actionRunner(projectsUpdateTeam))
2460
-
2461
- projects
2462
- .command(`get-email-template`)
2463
- .description(`Get a custom email template for the specified locale and type. This endpoint returns the template content, subject, and other configuration details. `)
2464
- .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2465
- .requiredOption(`--type <type>`, `Template type`)
2466
- .requiredOption(`--locale <locale>`, `Template locale`)
2467
- .action(actionRunner(projectsGetEmailTemplate))
2468
-
2469
- projects
2470
- .command(`update-email-template`)
2471
- .description(`Update a custom email template for the specified locale and type. Use this endpoint to modify the content of your email templates.`)
2472
- .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2473
- .requiredOption(`--type <type>`, `Template type`)
2474
- .requiredOption(`--locale <locale>`, `Template locale`)
2475
- .requiredOption(`--subject <subject>`, `Email Subject`)
2476
- .requiredOption(`--message <message>`, `Template message`)
2477
- .option(`--sender-name <sender-name>`, `Name of the email sender`)
2478
- .option(`--sender-email <sender-email>`, `Email of the sender`)
2479
- .option(`--reply-to <reply-to>`, `Reply to email`)
2480
- .action(actionRunner(projectsUpdateEmailTemplate))
2481
-
2482
- projects
2483
- .command(`delete-email-template`)
2484
- .description(`Reset a custom email template to its default value. This endpoint removes any custom content and restores the template to its original state. `)
2485
- .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2486
- .requiredOption(`--type <type>`, `Template type`)
2487
- .requiredOption(`--locale <locale>`, `Template locale`)
2488
- .action(actionRunner(projectsDeleteEmailTemplate))
2489
-
2490
- projects
2491
- .command(`get-sms-template`)
2492
- .description(`Get a custom SMS template for the specified locale and type returning it's contents.`)
2493
- .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2494
- .requiredOption(`--type <type>`, `Template type`)
2495
- .requiredOption(`--locale <locale>`, `Template locale`)
2496
- .action(actionRunner(projectsGetSMSTemplate))
2497
-
2498
- projects
2499
- .command(`update-sms-template`)
2500
- .description(`Update a custom SMS template for the specified locale and type. Use this endpoint to modify the content of your SMS templates. `)
2501
- .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2502
- .requiredOption(`--type <type>`, `Template type`)
2503
- .requiredOption(`--locale <locale>`, `Template locale`)
2504
- .requiredOption(`--message <message>`, `Template message`)
2505
- .action(actionRunner(projectsUpdateSMSTemplate))
2506
-
2507
- projects
2508
- .command(`delete-sms-template`)
2509
- .description(`Reset a custom SMS template to its default value. This endpoint removes any custom message and restores the template to its original state. `)
2510
- .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2511
- .requiredOption(`--type <type>`, `Template type`)
2512
- .requiredOption(`--locale <locale>`, `Template locale`)
2513
- .action(actionRunner(projectsDeleteSMSTemplate))
2514
-
2515
- projects
2516
- .command(`list-webhooks`)
2517
- .description(`Get a list of all webhooks belonging to the project. You can use the query params to filter your results. `)
2518
- .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2519
- .option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value))
2520
- .option(`--console`, `Get the resource console url`)
2521
- .action(actionRunner(projectsListWebhooks))
2522
-
2523
- projects
2524
- .command(`create-webhook`)
2525
- .description(`Create a new webhook. Use this endpoint to configure a URL that will receive events from Appwrite when specific events occur. `)
2526
- .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2527
- .requiredOption(`--name <name>`, `Webhook name. Max length: 128 chars.`)
2528
- .requiredOption(`--events [events...]`, `Events list. Maximum of 100 events are allowed.`)
2529
- .requiredOption(`--url <url>`, `Webhook URL.`)
2530
- .requiredOption(`--security [value]`, `Certificate verification, false for disabled or true for enabled.`, (value) => value === undefined ? true : parseBool(value))
2531
- .option(`--enabled [value]`, `Enable or disable a webhook.`, (value) => value === undefined ? true : parseBool(value))
2532
- .option(`--http-user <http-user>`, `Webhook HTTP user. Max length: 256 chars.`)
2533
- .option(`--http-pass <http-pass>`, `Webhook HTTP password. Max length: 256 chars.`)
2534
- .action(actionRunner(projectsCreateWebhook))
2535
-
2536
- projects
2537
- .command(`get-webhook`)
2538
- .description(`Get a webhook by its unique ID. This endpoint returns details about a specific webhook configured for a project. `)
2539
- .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2540
- .requiredOption(`--webhook-id <webhook-id>`, `Webhook unique ID.`)
2541
- .option(`--console`, `Get the resource console url`)
2542
- .action(actionRunner(projectsGetWebhook))
2543
-
2544
- projects
2545
- .command(`update-webhook`)
2546
- .description(`Update a webhook by its unique ID. Use this endpoint to update the URL, events, or status of an existing webhook. `)
2547
- .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2548
- .requiredOption(`--webhook-id <webhook-id>`, `Webhook unique ID.`)
2549
- .requiredOption(`--name <name>`, `Webhook name. Max length: 128 chars.`)
2550
- .requiredOption(`--events [events...]`, `Events list. Maximum of 100 events are allowed.`)
2551
- .requiredOption(`--url <url>`, `Webhook URL.`)
2552
- .requiredOption(`--security [value]`, `Certificate verification, false for disabled or true for enabled.`, (value) => value === undefined ? true : parseBool(value))
2553
- .option(`--enabled [value]`, `Enable or disable a webhook.`, (value) => value === undefined ? true : parseBool(value))
2554
- .option(`--http-user <http-user>`, `Webhook HTTP user. Max length: 256 chars.`)
2555
- .option(`--http-pass <http-pass>`, `Webhook HTTP password. Max length: 256 chars.`)
2556
- .action(actionRunner(projectsUpdateWebhook))
2557
-
2558
- projects
2559
- .command(`delete-webhook`)
2560
- .description(`Delete a webhook by its unique ID. Once deleted, the webhook will no longer receive project events. `)
2561
- .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2562
- .requiredOption(`--webhook-id <webhook-id>`, `Webhook unique ID.`)
2563
- .action(actionRunner(projectsDeleteWebhook))
2564
-
2565
- projects
2566
- .command(`update-webhook-signature`)
2567
- .description(`Update the webhook signature key. This endpoint can be used to regenerate the signature key used to sign and validate payload deliveries for a specific webhook. `)
2568
- .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2569
- .requiredOption(`--webhook-id <webhook-id>`, `Webhook unique ID.`)
2570
- .action(actionRunner(projectsUpdateWebhookSignature))
2571
-
2572
- module.exports = {
2573
- projects,
2574
- projectsList,
2575
- projectsCreate,
2576
- projectsGet,
2577
- projectsUpdate,
2578
- projectsDelete,
2579
- projectsUpdateAPIStatus,
2580
- projectsUpdateAPIStatusAll,
2581
- projectsUpdateAuthDuration,
2582
- projectsUpdateAuthLimit,
2583
- projectsUpdateAuthSessionsLimit,
2584
- projectsUpdateMembershipsPrivacy,
2585
- projectsUpdateMockNumbers,
2586
- projectsUpdateAuthPasswordDictionary,
2587
- projectsUpdateAuthPasswordHistory,
2588
- projectsUpdatePersonalDataCheck,
2589
- projectsUpdateSessionAlerts,
2590
- projectsUpdateSessionInvalidation,
2591
- projectsUpdateAuthStatus,
2592
- projectsListDevKeys,
2593
- projectsCreateDevKey,
2594
- projectsGetDevKey,
2595
- projectsUpdateDevKey,
2596
- projectsDeleteDevKey,
2597
- projectsCreateJWT,
2598
- projectsListKeys,
2599
- projectsCreateKey,
2600
- projectsGetKey,
2601
- projectsUpdateKey,
2602
- projectsDeleteKey,
2603
- projectsUpdateOAuth2,
2604
- projectsListPlatforms,
2605
- projectsCreatePlatform,
2606
- projectsGetPlatform,
2607
- projectsUpdatePlatform,
2608
- projectsDeletePlatform,
2609
- projectsUpdateServiceStatus,
2610
- projectsUpdateServiceStatusAll,
2611
- projectsUpdateSMTP,
2612
- projectsCreateSMTPTest,
2613
- projectsUpdateTeam,
2614
- projectsGetEmailTemplate,
2615
- projectsUpdateEmailTemplate,
2616
- projectsDeleteEmailTemplate,
2617
- projectsGetSMSTemplate,
2618
- projectsUpdateSMSTemplate,
2619
- projectsDeleteSMSTemplate,
2620
- projectsListWebhooks,
2621
- projectsCreateWebhook,
2622
- projectsGetWebhook,
2623
- projectsUpdateWebhook,
2624
- projectsDeleteWebhook,
2625
- projectsUpdateWebhookSignature
2626
- };