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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (430) hide show
  1. package/.github/workflows/publish.yml +68 -0
  2. package/CHANGELOG.md +10 -1
  3. package/LICENSE.md +1 -1
  4. package/README.md +3 -3
  5. package/cli.ts +152 -0
  6. package/dist/bundle.cjs +95813 -0
  7. package/dist/cli.d.ts +3 -0
  8. package/dist/cli.d.ts.map +1 -0
  9. package/dist/cli.js +145 -0
  10. package/dist/cli.js.map +1 -0
  11. package/dist/index.d.ts +10 -2
  12. package/dist/index.d.ts.map +1 -1
  13. package/dist/index.js +7 -142
  14. package/dist/index.js.map +1 -1
  15. package/dist/lib/client.d.ts +2 -3
  16. package/dist/lib/client.d.ts.map +1 -1
  17. package/dist/lib/client.js +57 -45
  18. package/dist/lib/client.js.map +1 -1
  19. package/dist/lib/commands/config.d.ts +562 -0
  20. package/dist/lib/commands/config.d.ts.map +1 -0
  21. package/dist/lib/commands/config.js +416 -0
  22. package/dist/lib/commands/config.js.map +1 -0
  23. package/dist/lib/commands/db.d.ts +34 -0
  24. package/dist/lib/commands/db.d.ts.map +1 -0
  25. package/dist/lib/commands/db.js +247 -0
  26. package/dist/lib/commands/db.js.map +1 -0
  27. package/dist/lib/commands/errors.d.ts +68 -0
  28. package/dist/lib/commands/errors.d.ts.map +1 -0
  29. package/dist/lib/commands/errors.js +72 -0
  30. package/dist/lib/commands/errors.js.map +1 -0
  31. package/dist/lib/commands/generic.d.ts +2 -2
  32. package/dist/lib/commands/generic.d.ts.map +1 -1
  33. package/dist/lib/commands/generic.js +170 -157
  34. package/dist/lib/commands/generic.js.map +1 -1
  35. package/dist/lib/commands/init.d.ts +1 -1
  36. package/dist/lib/commands/init.d.ts.map +1 -1
  37. package/dist/lib/commands/init.js +201 -192
  38. package/dist/lib/commands/init.js.map +1 -1
  39. package/dist/lib/commands/pull.d.ts +105 -3
  40. package/dist/lib/commands/pull.d.ts.map +1 -1
  41. package/dist/lib/commands/pull.js +530 -370
  42. package/dist/lib/commands/pull.js.map +1 -1
  43. package/dist/lib/commands/push.d.ts +106 -0
  44. package/dist/lib/commands/push.d.ts.map +1 -1
  45. package/dist/lib/commands/push.js +1432 -1830
  46. package/dist/lib/commands/push.js.map +1 -1
  47. package/dist/lib/commands/run.d.ts +1 -1
  48. package/dist/lib/commands/run.d.ts.map +1 -1
  49. package/dist/lib/commands/run.js +129 -127
  50. package/dist/lib/commands/run.js.map +1 -1
  51. package/dist/lib/commands/schema.d.ts +59 -0
  52. package/dist/lib/commands/schema.d.ts.map +1 -0
  53. package/dist/lib/commands/schema.js +86 -0
  54. package/dist/lib/commands/schema.js.map +1 -0
  55. package/dist/lib/commands/services/account.d.ts +3 -0
  56. package/dist/lib/commands/services/account.d.ts.map +1 -0
  57. package/dist/lib/commands/services/account.js +328 -0
  58. package/dist/lib/commands/services/account.js.map +1 -0
  59. package/dist/lib/commands/services/console.d.ts +3 -0
  60. package/dist/lib/commands/services/console.d.ts.map +1 -0
  61. package/dist/lib/commands/services/console.js +28 -0
  62. package/dist/lib/commands/services/console.js.map +1 -0
  63. package/dist/lib/commands/services/databases.d.ts +3 -0
  64. package/dist/lib/commands/services/databases.d.ts.map +1 -0
  65. package/dist/lib/commands/services/databases.js +620 -0
  66. package/dist/lib/commands/services/databases.js.map +1 -0
  67. package/dist/lib/commands/services/functions.d.ts +3 -0
  68. package/dist/lib/commands/services/functions.d.ts.map +1 -0
  69. package/dist/lib/commands/services/functions.js +266 -0
  70. package/dist/lib/commands/services/functions.js.map +1 -0
  71. package/dist/lib/commands/services/graphql.d.ts +3 -0
  72. package/dist/lib/commands/services/graphql.d.ts.map +1 -0
  73. package/dist/lib/commands/services/graphql.js +28 -0
  74. package/dist/lib/commands/services/graphql.js.map +1 -0
  75. package/dist/lib/commands/services/health.d.ts +3 -0
  76. package/dist/lib/commands/services/health.d.ts.map +1 -0
  77. package/dist/lib/commands/services/health.js +123 -0
  78. package/dist/lib/commands/services/health.js.map +1 -0
  79. package/dist/lib/commands/services/locale.d.ts +3 -0
  80. package/dist/lib/commands/services/locale.d.ts.map +1 -0
  81. package/dist/lib/commands/services/locale.js +52 -0
  82. package/dist/lib/commands/services/locale.js.map +1 -0
  83. package/dist/lib/commands/services/messaging.d.ts +3 -0
  84. package/dist/lib/commands/services/messaging.d.ts.map +1 -0
  85. package/dist/lib/commands/services/messaging.js +505 -0
  86. package/dist/lib/commands/services/messaging.js.map +1 -0
  87. package/dist/lib/commands/services/migrations.d.ts +3 -0
  88. package/dist/lib/commands/services/migrations.d.ts.map +1 -0
  89. package/dist/lib/commands/services/migrations.js +135 -0
  90. package/dist/lib/commands/services/migrations.js.map +1 -0
  91. package/dist/lib/commands/services/project.d.ts +3 -0
  92. package/dist/lib/commands/services/project.d.ts.map +1 -0
  93. package/dist/lib/commands/services/project.js +54 -0
  94. package/dist/lib/commands/services/project.js.map +1 -0
  95. package/dist/lib/commands/services/projects.d.ts +3 -0
  96. package/dist/lib/commands/services/projects.d.ts.map +1 -0
  97. package/dist/lib/commands/services/projects.js +415 -0
  98. package/dist/lib/commands/services/projects.js.map +1 -0
  99. package/dist/lib/commands/services/proxy.d.ts +3 -0
  100. package/dist/lib/commands/services/proxy.d.ts.map +1 -0
  101. package/dist/lib/commands/services/proxy.js +68 -0
  102. package/dist/lib/commands/services/proxy.js.map +1 -0
  103. package/dist/lib/commands/services/sites.d.ts +3 -0
  104. package/dist/lib/commands/services/sites.d.ts.map +1 -0
  105. package/dist/lib/commands/services/sites.js +250 -0
  106. package/dist/lib/commands/services/sites.js.map +1 -0
  107. package/dist/lib/commands/services/storage.d.ts +3 -0
  108. package/dist/lib/commands/services/storage.d.ts.map +1 -0
  109. package/dist/lib/commands/services/storage.js +175 -0
  110. package/dist/lib/commands/services/storage.js.map +1 -0
  111. package/dist/lib/commands/services/tables-db.d.ts +3 -0
  112. package/dist/lib/commands/services/tables-db.d.ts.map +1 -0
  113. package/dist/lib/commands/services/tables-db.js +613 -0
  114. package/dist/lib/commands/services/tables-db.js.map +1 -0
  115. package/dist/lib/commands/services/teams.d.ts +3 -0
  116. package/dist/lib/commands/services/teams.d.ts.map +1 -0
  117. package/dist/lib/commands/services/teams.js +123 -0
  118. package/dist/lib/commands/services/teams.js.map +1 -0
  119. package/dist/lib/commands/services/tokens.d.ts +3 -0
  120. package/dist/lib/commands/services/tokens.d.ts.map +1 -0
  121. package/dist/lib/commands/services/tokens.js +49 -0
  122. package/dist/lib/commands/services/tokens.js.map +1 -0
  123. package/dist/lib/commands/services/users.d.ts +3 -0
  124. package/dist/lib/commands/services/users.d.ts.map +1 -0
  125. package/dist/lib/commands/services/users.js +312 -0
  126. package/dist/lib/commands/services/users.js.map +1 -0
  127. package/dist/lib/commands/services/vcs.d.ts +3 -0
  128. package/dist/lib/commands/services/vcs.d.ts.map +1 -0
  129. package/dist/lib/commands/services/vcs.js +87 -0
  130. package/dist/lib/commands/services/vcs.js.map +1 -0
  131. package/dist/lib/commands/types.d.ts +1 -1
  132. package/dist/lib/commands/types.d.ts.map +1 -1
  133. package/dist/lib/commands/types.js +53 -57
  134. package/dist/lib/commands/types.js.map +1 -1
  135. package/dist/lib/commands/update.d.ts +1 -1
  136. package/dist/lib/commands/update.d.ts.map +1 -1
  137. package/dist/lib/commands/update.js +69 -69
  138. package/dist/lib/commands/update.js.map +1 -1
  139. package/dist/lib/commands/utils/attributes.d.ts +47 -0
  140. package/dist/lib/commands/utils/attributes.d.ts.map +1 -0
  141. package/dist/lib/commands/utils/attributes.js +514 -0
  142. package/dist/lib/commands/utils/attributes.js.map +1 -0
  143. package/dist/lib/commands/utils/change-approval.d.ts +25 -0
  144. package/dist/lib/commands/utils/change-approval.d.ts.map +1 -0
  145. package/dist/lib/commands/utils/change-approval.js +129 -0
  146. package/dist/lib/commands/utils/change-approval.js.map +1 -0
  147. package/dist/lib/commands/utils/database-sync.d.ts +10 -0
  148. package/dist/lib/commands/utils/database-sync.d.ts.map +1 -0
  149. package/dist/lib/commands/utils/database-sync.js +136 -0
  150. package/dist/lib/commands/utils/database-sync.js.map +1 -0
  151. package/dist/lib/commands/utils/deployment.d.ts +34 -0
  152. package/dist/lib/commands/utils/deployment.d.ts.map +1 -0
  153. package/dist/lib/commands/utils/deployment.js +109 -0
  154. package/dist/lib/commands/utils/deployment.js.map +1 -0
  155. package/dist/lib/commands/utils/error-formatter.d.ts +19 -0
  156. package/dist/lib/commands/utils/error-formatter.d.ts.map +1 -0
  157. package/dist/lib/commands/utils/error-formatter.js +333 -0
  158. package/dist/lib/commands/utils/error-formatter.js.map +1 -0
  159. package/dist/lib/commands/utils/pools.d.ts +16 -0
  160. package/dist/lib/commands/utils/pools.d.ts.map +1 -0
  161. package/dist/lib/commands/utils/pools.js +198 -0
  162. package/dist/lib/commands/utils/pools.js.map +1 -0
  163. package/dist/lib/config.d.ts +41 -40
  164. package/dist/lib/config.d.ts.map +1 -1
  165. package/dist/lib/config.js +264 -239
  166. package/dist/lib/config.js.map +1 -1
  167. package/dist/lib/constants.d.ts +14 -0
  168. package/dist/lib/constants.d.ts.map +1 -0
  169. package/dist/lib/constants.js +19 -0
  170. package/dist/lib/constants.js.map +1 -0
  171. package/dist/lib/emulation/docker.d.ts +4 -12
  172. package/dist/lib/emulation/docker.d.ts.map +1 -1
  173. package/dist/lib/emulation/docker.js +159 -142
  174. package/dist/lib/emulation/docker.js.map +1 -1
  175. package/dist/lib/emulation/utils.d.ts +1 -1
  176. package/dist/lib/emulation/utils.d.ts.map +1 -1
  177. package/dist/lib/emulation/utils.js +55 -58
  178. package/dist/lib/emulation/utils.js.map +1 -1
  179. package/dist/lib/id.d.ts +1 -1
  180. package/dist/lib/id.d.ts.map +1 -1
  181. package/dist/lib/id.js +13 -18
  182. package/dist/lib/id.js.map +1 -1
  183. package/dist/lib/paginate.d.ts +3 -4
  184. package/dist/lib/paginate.d.ts.map +1 -1
  185. package/dist/lib/paginate.js +7 -10
  186. package/dist/lib/paginate.js.map +1 -1
  187. package/dist/lib/parser.d.ts +1 -1
  188. package/dist/lib/parser.d.ts.map +1 -1
  189. package/dist/lib/parser.js +92 -103
  190. package/dist/lib/parser.js.map +1 -1
  191. package/dist/lib/questions.d.ts +1 -1
  192. package/dist/lib/questions.d.ts.map +1 -1
  193. package/dist/lib/questions.js +381 -385
  194. package/dist/lib/questions.js.map +1 -1
  195. package/dist/lib/sdks.d.ts +1 -1
  196. package/dist/lib/sdks.d.ts.map +1 -1
  197. package/dist/lib/sdks.js +39 -30
  198. package/dist/lib/sdks.js.map +1 -1
  199. package/dist/lib/services.d.ts +13 -0
  200. package/dist/lib/services.d.ts.map +1 -0
  201. package/dist/lib/services.js +47 -0
  202. package/dist/lib/services.js.map +1 -0
  203. package/dist/lib/spinner.d.ts +1 -1
  204. package/dist/lib/spinner.d.ts.map +1 -1
  205. package/dist/lib/spinner.js +25 -27
  206. package/dist/lib/spinner.js.map +1 -1
  207. package/dist/lib/type-generation/attribute.d.ts +1 -1
  208. package/dist/lib/type-generation/attribute.d.ts.map +1 -1
  209. package/dist/lib/type-generation/attribute.js +14 -17
  210. package/dist/lib/type-generation/attribute.js.map +1 -1
  211. package/dist/lib/type-generation/languages/csharp.d.ts +1 -1
  212. package/dist/lib/type-generation/languages/csharp.d.ts.map +1 -1
  213. package/dist/lib/type-generation/languages/csharp.js +34 -34
  214. package/dist/lib/type-generation/languages/csharp.js.map +1 -1
  215. package/dist/lib/type-generation/languages/dart.d.ts +1 -1
  216. package/dist/lib/type-generation/languages/dart.d.ts.map +1 -1
  217. package/dist/lib/type-generation/languages/dart.js +57 -57
  218. package/dist/lib/type-generation/languages/dart.js.map +1 -1
  219. package/dist/lib/type-generation/languages/java.d.ts +1 -1
  220. package/dist/lib/type-generation/languages/java.d.ts.map +1 -1
  221. package/dist/lib/type-generation/languages/java.js +35 -35
  222. package/dist/lib/type-generation/languages/java.js.map +1 -1
  223. package/dist/lib/type-generation/languages/javascript.d.ts +1 -1
  224. package/dist/lib/type-generation/languages/javascript.d.ts.map +1 -1
  225. package/dist/lib/type-generation/languages/javascript.js +45 -44
  226. package/dist/lib/type-generation/languages/javascript.js.map +1 -1
  227. package/dist/lib/type-generation/languages/kotlin.d.ts +1 -1
  228. package/dist/lib/type-generation/languages/kotlin.d.ts.map +1 -1
  229. package/dist/lib/type-generation/languages/kotlin.js +35 -35
  230. package/dist/lib/type-generation/languages/kotlin.js.map +1 -1
  231. package/dist/lib/type-generation/languages/language.d.ts.map +1 -1
  232. package/dist/lib/type-generation/languages/language.js +32 -37
  233. package/dist/lib/type-generation/languages/language.js.map +1 -1
  234. package/dist/lib/type-generation/languages/php.d.ts +1 -1
  235. package/dist/lib/type-generation/languages/php.d.ts.map +1 -1
  236. package/dist/lib/type-generation/languages/php.js +34 -34
  237. package/dist/lib/type-generation/languages/php.js.map +1 -1
  238. package/dist/lib/type-generation/languages/swift.d.ts +1 -1
  239. package/dist/lib/type-generation/languages/swift.d.ts.map +1 -1
  240. package/dist/lib/type-generation/languages/swift.js +35 -35
  241. package/dist/lib/type-generation/languages/swift.js.map +1 -1
  242. package/dist/lib/type-generation/languages/typescript.d.ts +1 -1
  243. package/dist/lib/type-generation/languages/typescript.d.ts.map +1 -1
  244. package/dist/lib/type-generation/languages/typescript.js +49 -46
  245. package/dist/lib/type-generation/languages/typescript.js.map +1 -1
  246. package/dist/lib/types.d.ts +38 -108
  247. package/dist/lib/types.d.ts.map +1 -1
  248. package/dist/lib/types.js +1 -2
  249. package/dist/lib/utils.d.ts +3 -0
  250. package/dist/lib/utils.d.ts.map +1 -1
  251. package/dist/lib/utils.js +142 -98
  252. package/dist/lib/utils.js.map +1 -1
  253. package/dist/lib/validations.d.ts.map +1 -1
  254. package/dist/lib/validations.js +2 -6
  255. package/dist/lib/validations.js.map +1 -1
  256. package/dist/package.json +68 -0
  257. package/index.ts +25 -149
  258. package/install.ps1 +2 -2
  259. package/install.sh +1 -1
  260. package/lib/client.ts +261 -220
  261. package/lib/commands/config.ts +494 -0
  262. package/lib/commands/db.ts +324 -0
  263. package/lib/commands/errors.ts +93 -0
  264. package/lib/commands/generic.ts +371 -269
  265. package/lib/commands/init.ts +631 -519
  266. package/lib/commands/pull.ts +827 -453
  267. package/lib/commands/push.ts +2191 -2349
  268. package/lib/commands/run.ts +382 -302
  269. package/lib/commands/schema.ts +122 -0
  270. package/lib/commands/services/account.ts +647 -0
  271. package/lib/commands/services/console.ts +52 -0
  272. package/lib/commands/services/databases.ts +1163 -0
  273. package/lib/commands/services/functions.ts +536 -0
  274. package/lib/commands/services/graphql.ts +50 -0
  275. package/lib/commands/services/health.ts +260 -0
  276. package/lib/commands/services/locale.ts +102 -0
  277. package/lib/commands/services/messaging.ts +1052 -0
  278. package/lib/commands/services/migrations.ts +249 -0
  279. package/lib/commands/services/project.ts +112 -0
  280. package/lib/commands/services/projects.ts +785 -0
  281. package/lib/commands/services/proxy.ts +135 -0
  282. package/lib/commands/services/sites.ts +505 -0
  283. package/lib/commands/services/storage.ts +338 -0
  284. package/lib/commands/services/tables-db.ts +1150 -0
  285. package/lib/commands/services/teams.ts +232 -0
  286. package/lib/commands/services/tokens.ts +94 -0
  287. package/lib/commands/services/users.ts +616 -0
  288. package/lib/commands/services/vcs.ts +165 -0
  289. package/lib/commands/types.ts +145 -118
  290. package/lib/commands/update.ts +189 -159
  291. package/lib/commands/utils/attributes.ts +719 -0
  292. package/lib/commands/utils/change-approval.ts +186 -0
  293. package/lib/commands/utils/database-sync.ts +180 -0
  294. package/lib/commands/utils/deployment.ts +184 -0
  295. package/lib/commands/utils/error-formatter.ts +417 -0
  296. package/lib/commands/utils/pools.ts +355 -0
  297. package/lib/config.ts +766 -687
  298. package/lib/constants.ts +22 -0
  299. package/lib/emulation/docker.ts +277 -216
  300. package/lib/emulation/utils.ts +188 -174
  301. package/lib/id.ts +23 -23
  302. package/lib/paginate.ts +69 -55
  303. package/lib/parser.ts +220 -189
  304. package/lib/questions.ts +1024 -948
  305. package/lib/sdks.ts +84 -51
  306. package/lib/services.ts +72 -0
  307. package/lib/spinner.ts +112 -99
  308. package/lib/type-generation/attribute.ts +15 -14
  309. package/lib/type-generation/languages/csharp.ts +71 -60
  310. package/lib/type-generation/languages/dart.ts +106 -93
  311. package/lib/type-generation/languages/java.ts +69 -58
  312. package/lib/type-generation/languages/javascript.ts +84 -73
  313. package/lib/type-generation/languages/kotlin.ts +71 -60
  314. package/lib/type-generation/languages/language.ts +103 -95
  315. package/lib/type-generation/languages/php.ts +67 -56
  316. package/lib/type-generation/languages/swift.ts +71 -60
  317. package/lib/type-generation/languages/typescript.ts +93 -76
  318. package/lib/types.ts +50 -125
  319. package/lib/utils.ts +304 -233
  320. package/lib/validations.ts +17 -14
  321. package/package.json +31 -22
  322. package/scoop/appwrite.config.json +3 -3
  323. package/tsconfig.json +7 -13
  324. package/.github/workflows/autoclose.yml +0 -11
  325. package/.github/workflows/npm-publish.yml +0 -49
  326. package/dist/lib/commands/account.d.ts +0 -379
  327. package/dist/lib/commands/account.d.ts.map +0 -1
  328. package/dist/lib/commands/account.js +0 -1228
  329. package/dist/lib/commands/account.js.map +0 -1
  330. package/dist/lib/commands/console.d.ts +0 -20
  331. package/dist/lib/commands/console.d.ts.map +0 -1
  332. package/dist/lib/commands/console.js +0 -78
  333. package/dist/lib/commands/console.js.map +0 -1
  334. package/dist/lib/commands/databases.d.ts +0 -732
  335. package/dist/lib/commands/databases.d.ts.map +0 -1
  336. package/dist/lib/commands/databases.js +0 -2196
  337. package/dist/lib/commands/databases.js.map +0 -1
  338. package/dist/lib/commands/functions.d.ts +0 -310
  339. package/dist/lib/commands/functions.d.ts.map +0 -1
  340. package/dist/lib/commands/functions.js +0 -1100
  341. package/dist/lib/commands/functions.js.map +0 -1
  342. package/dist/lib/commands/graphql.d.ts +0 -19
  343. package/dist/lib/commands/graphql.d.ts.map +0 -1
  344. package/dist/lib/commands/graphql.js +0 -77
  345. package/dist/lib/commands/graphql.js.map +0 -1
  346. package/dist/lib/commands/health.d.ts +0 -153
  347. package/dist/lib/commands/health.d.ts.map +0 -1
  348. package/dist/lib/commands/health.js +0 -464
  349. package/dist/lib/commands/health.js.map +0 -1
  350. package/dist/lib/commands/locale.d.ts +0 -53
  351. package/dist/lib/commands/locale.d.ts.map +0 -1
  352. package/dist/lib/commands/locale.js +0 -165
  353. package/dist/lib/commands/locale.js.map +0 -1
  354. package/dist/lib/commands/messaging.d.ts +0 -588
  355. package/dist/lib/commands/messaging.d.ts.map +0 -1
  356. package/dist/lib/commands/messaging.js +0 -2042
  357. package/dist/lib/commands/messaging.js.map +0 -1
  358. package/dist/lib/commands/migrations.d.ts +0 -150
  359. package/dist/lib/commands/migrations.d.ts.map +0 -1
  360. package/dist/lib/commands/migrations.js +0 -524
  361. package/dist/lib/commands/migrations.js.map +0 -1
  362. package/dist/lib/commands/organizations.d.ts +0 -11
  363. package/dist/lib/commands/organizations.d.ts.map +0 -1
  364. package/dist/lib/commands/organizations.js +0 -31
  365. package/dist/lib/commands/organizations.js.map +0 -1
  366. package/dist/lib/commands/project.d.ts +0 -53
  367. package/dist/lib/commands/project.d.ts.map +0 -1
  368. package/dist/lib/commands/project.js +0 -176
  369. package/dist/lib/commands/project.js.map +0 -1
  370. package/dist/lib/commands/projects.d.ts +0 -516
  371. package/dist/lib/commands/projects.d.ts.map +0 -1
  372. package/dist/lib/commands/projects.js +0 -1590
  373. package/dist/lib/commands/projects.js.map +0 -1
  374. package/dist/lib/commands/proxy.d.ts +0 -71
  375. package/dist/lib/commands/proxy.d.ts.map +0 -1
  376. package/dist/lib/commands/proxy.js +0 -240
  377. package/dist/lib/commands/proxy.js.map +0 -1
  378. package/dist/lib/commands/sites.d.ts +0 -296
  379. package/dist/lib/commands/sites.d.ts.map +0 -1
  380. package/dist/lib/commands/sites.js +0 -1046
  381. package/dist/lib/commands/sites.js.map +0 -1
  382. package/dist/lib/commands/storage.d.ts +0 -170
  383. package/dist/lib/commands/storage.d.ts.map +0 -1
  384. package/dist/lib/commands/storage.js +0 -651
  385. package/dist/lib/commands/storage.js.map +0 -1
  386. package/dist/lib/commands/tables-db.d.ts +0 -728
  387. package/dist/lib/commands/tables-db.d.ts.map +0 -1
  388. package/dist/lib/commands/tables-db.js +0 -2198
  389. package/dist/lib/commands/tables-db.js.map +0 -1
  390. package/dist/lib/commands/teams.d.ts +0 -129
  391. package/dist/lib/commands/teams.d.ts.map +0 -1
  392. package/dist/lib/commands/teams.js +0 -403
  393. package/dist/lib/commands/teams.js.map +0 -1
  394. package/dist/lib/commands/tokens.d.ts +0 -48
  395. package/dist/lib/commands/tokens.d.ts.map +0 -1
  396. package/dist/lib/commands/tokens.js +0 -156
  397. package/dist/lib/commands/tokens.js.map +0 -1
  398. package/dist/lib/commands/users.d.ts +0 -382
  399. package/dist/lib/commands/users.d.ts.map +0 -1
  400. package/dist/lib/commands/users.js +0 -1195
  401. package/dist/lib/commands/users.js.map +0 -1
  402. package/dist/lib/commands/vcs.d.ts +0 -92
  403. package/dist/lib/commands/vcs.d.ts.map +0 -1
  404. package/dist/lib/commands/vcs.js +0 -276
  405. package/dist/lib/commands/vcs.js.map +0 -1
  406. package/dist/lib/exception.d.ts +0 -8
  407. package/dist/lib/exception.d.ts.map +0 -1
  408. package/dist/lib/exception.js +0 -16
  409. package/dist/lib/exception.js.map +0 -1
  410. package/lib/commands/account.ts +0 -1867
  411. package/lib/commands/console.ts +0 -112
  412. package/lib/commands/databases.ts +0 -3272
  413. package/lib/commands/functions.ts +0 -1587
  414. package/lib/commands/graphql.ts +0 -110
  415. package/lib/commands/health.ts +0 -753
  416. package/lib/commands/locale.ts +0 -270
  417. package/lib/commands/messaging.ts +0 -2878
  418. package/lib/commands/migrations.ts +0 -754
  419. package/lib/commands/organizations.ts +0 -46
  420. package/lib/commands/project.ts +0 -266
  421. package/lib/commands/projects.ts +0 -2370
  422. package/lib/commands/proxy.ts +0 -357
  423. package/lib/commands/sites.ts +0 -1514
  424. package/lib/commands/storage.ts +0 -919
  425. package/lib/commands/tables-db.ts +0 -3260
  426. package/lib/commands/teams.ts +0 -609
  427. package/lib/commands/tokens.ts +0 -232
  428. package/lib/commands/users.ts +0 -1804
  429. package/lib/commands/vcs.ts +0 -428
  430. package/lib/exception.ts +0 -20
@@ -1,1228 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.accountCreatePhoneVerification = exports.accountUpdateVerification = exports.accountUpdateEmailVerification = exports.accountCreateVerification = exports.accountCreateEmailVerification = exports.accountCreatePhoneToken = exports.accountCreateOAuth2Token = exports.accountCreateMagicURLToken = exports.accountCreateEmailToken = exports.accountDeletePushTarget = exports.accountUpdatePushTarget = exports.accountCreatePushTarget = exports.accountUpdateStatus = exports.accountDeleteSession = exports.accountUpdateSession = exports.accountGetSession = exports.accountCreateSession = exports.accountUpdatePhoneSession = exports.accountCreateOAuth2Session = exports.accountUpdateMagicURLSession = exports.accountCreateEmailPasswordSession = exports.accountCreateAnonymousSession = exports.accountDeleteSessions = exports.accountListSessions = exports.accountUpdateRecovery = exports.accountCreateRecovery = exports.accountUpdatePrefs = exports.accountGetPrefs = exports.accountUpdatePhone = exports.accountUpdatePassword = exports.accountUpdateName = exports.accountUpdateMFARecoveryCodes = exports.accountCreateMFARecoveryCodes = exports.accountGetMFARecoveryCodes = exports.accountListMFAFactors = exports.accountUpdateMFAChallenge = exports.accountCreateMFAChallenge = exports.accountDeleteMFAAuthenticator = exports.accountUpdateMFAAuthenticator = exports.accountCreateMFAAuthenticator = exports.accountUpdateMFA = exports.accountListLogs = exports.accountCreateJWT = exports.accountDeleteIdentity = exports.accountListIdentities = exports.accountUpdateEmail = exports.accountDelete = exports.accountCreate = exports.accountGet = exports.account = void 0;
4
- exports.accountUpdatePhoneVerification = void 0;
5
- const utils_1 = require("../utils");
6
- const commander_1 = require("commander");
7
- const sdks_1 = require("../sdks");
8
- const parser_1 = require("../parser");
9
- const web_1 = require("stream/web");
10
- function convertReadStreamToReadableStream(readStream) {
11
- return new web_1.ReadableStream({
12
- start(controller) {
13
- readStream.on("data", (chunk) => {
14
- controller.enqueue(chunk);
15
- });
16
- readStream.on("end", () => {
17
- controller.close();
18
- });
19
- readStream.on("error", (err) => {
20
- controller.error(err);
21
- });
22
- },
23
- cancel() {
24
- readStream.destroy();
25
- },
26
- });
27
- }
28
- exports.account = new commander_1.Command("account").description(parser_1.commandDescriptions['account'] ?? '').configureHelp({
29
- helpWidth: process.stdout.columns || 80
30
- });
31
- const accountGet = async ({ parseOutput = true, overrideForCli = false, sdk = undefined, console: showConsole }) => {
32
- let client = !sdk ? await (0, sdks_1.sdkForProject)() :
33
- sdk;
34
- let apiPath = '/account';
35
- let payload = {};
36
- let response = undefined;
37
- response = await client.call('get', apiPath, {}, payload);
38
- if (parseOutput) {
39
- if (showConsole) {
40
- (0, utils_1.showConsoleLink)('account', 'get');
41
- }
42
- else {
43
- (0, parser_1.parse)(response);
44
- }
45
- }
46
- return response;
47
- };
48
- exports.accountGet = accountGet;
49
- const accountCreate = async ({ userId, email, password, name, parseOutput = true, overrideForCli = false, sdk = undefined }) => {
50
- let client = !sdk ? await (0, sdks_1.sdkForProject)() :
51
- sdk;
52
- let apiPath = '/account';
53
- let payload = {};
54
- if (typeof userId !== 'undefined') {
55
- payload['userId'] = userId;
56
- }
57
- if (typeof email !== 'undefined') {
58
- payload['email'] = email;
59
- }
60
- if (typeof password !== 'undefined') {
61
- payload['password'] = password;
62
- }
63
- if (typeof name !== 'undefined') {
64
- payload['name'] = name;
65
- }
66
- let response = undefined;
67
- response = await client.call('post', apiPath, {
68
- 'content-type': 'application/json',
69
- }, payload);
70
- if (parseOutput) {
71
- (0, parser_1.parse)(response);
72
- }
73
- return response;
74
- };
75
- exports.accountCreate = accountCreate;
76
- const accountDelete = async ({ parseOutput = true, overrideForCli = false, sdk = undefined }) => {
77
- let client = !sdk ? await (0, sdks_1.sdkForProject)() :
78
- sdk;
79
- let apiPath = '/account';
80
- let payload = {};
81
- let response = undefined;
82
- response = await client.call('delete', apiPath, {
83
- 'content-type': 'application/json',
84
- }, payload);
85
- if (parseOutput) {
86
- (0, parser_1.parse)(response);
87
- }
88
- return response;
89
- };
90
- exports.accountDelete = accountDelete;
91
- const accountUpdateEmail = async ({ email, password, parseOutput = true, overrideForCli = false, sdk = undefined }) => {
92
- let client = !sdk ? await (0, sdks_1.sdkForProject)() :
93
- sdk;
94
- let apiPath = '/account/email';
95
- let payload = {};
96
- if (typeof email !== 'undefined') {
97
- payload['email'] = email;
98
- }
99
- if (typeof password !== 'undefined') {
100
- payload['password'] = password;
101
- }
102
- let response = undefined;
103
- response = await client.call('patch', apiPath, {
104
- 'content-type': 'application/json',
105
- }, payload);
106
- if (parseOutput) {
107
- (0, parser_1.parse)(response);
108
- }
109
- return response;
110
- };
111
- exports.accountUpdateEmail = accountUpdateEmail;
112
- const accountListIdentities = async ({ queries, total, parseOutput = true, overrideForCli = false, sdk = undefined }) => {
113
- let client = !sdk ? await (0, sdks_1.sdkForProject)() :
114
- sdk;
115
- let apiPath = '/account/identities';
116
- let payload = {};
117
- if (typeof queries !== 'undefined') {
118
- payload['queries'] = queries;
119
- }
120
- if (typeof total !== 'undefined') {
121
- payload['total'] = total;
122
- }
123
- let response = undefined;
124
- response = await client.call('get', apiPath, {}, payload);
125
- if (parseOutput) {
126
- (0, parser_1.parse)(response);
127
- }
128
- return response;
129
- };
130
- exports.accountListIdentities = accountListIdentities;
131
- const accountDeleteIdentity = async ({ identityId, parseOutput = true, overrideForCli = false, sdk = undefined }) => {
132
- let client = !sdk ? await (0, sdks_1.sdkForProject)() :
133
- sdk;
134
- let apiPath = '/account/identities/{identityId}'.replace('{identityId}', identityId);
135
- let payload = {};
136
- let response = undefined;
137
- response = await client.call('delete', apiPath, {
138
- 'content-type': 'application/json',
139
- }, payload);
140
- if (parseOutput) {
141
- (0, parser_1.parse)(response);
142
- }
143
- return response;
144
- };
145
- exports.accountDeleteIdentity = accountDeleteIdentity;
146
- const accountCreateJWT = async ({ parseOutput = true, overrideForCli = false, sdk = undefined }) => {
147
- let client = !sdk ? await (0, sdks_1.sdkForProject)() :
148
- sdk;
149
- let apiPath = '/account/jwts';
150
- let payload = {};
151
- let response = undefined;
152
- response = await client.call('post', apiPath, {
153
- 'content-type': 'application/json',
154
- }, payload);
155
- if (parseOutput) {
156
- (0, parser_1.parse)(response);
157
- }
158
- return response;
159
- };
160
- exports.accountCreateJWT = accountCreateJWT;
161
- const accountListLogs = async ({ queries, total, parseOutput = true, overrideForCli = false, sdk = undefined }) => {
162
- let client = !sdk ? await (0, sdks_1.sdkForProject)() :
163
- sdk;
164
- let apiPath = '/account/logs';
165
- let payload = {};
166
- if (typeof queries !== 'undefined') {
167
- payload['queries'] = queries;
168
- }
169
- if (typeof total !== 'undefined') {
170
- payload['total'] = total;
171
- }
172
- let response = undefined;
173
- response = await client.call('get', apiPath, {}, payload);
174
- if (parseOutput) {
175
- (0, parser_1.parse)(response);
176
- }
177
- return response;
178
- };
179
- exports.accountListLogs = accountListLogs;
180
- const accountUpdateMFA = async ({ mfa, parseOutput = true, overrideForCli = false, sdk = undefined }) => {
181
- let client = !sdk ? await (0, sdks_1.sdkForProject)() :
182
- sdk;
183
- let apiPath = '/account/mfa';
184
- let payload = {};
185
- if (typeof mfa !== 'undefined') {
186
- payload['mfa'] = mfa;
187
- }
188
- let response = undefined;
189
- response = await client.call('patch', apiPath, {
190
- 'content-type': 'application/json',
191
- }, payload);
192
- if (parseOutput) {
193
- (0, parser_1.parse)(response);
194
- }
195
- return response;
196
- };
197
- exports.accountUpdateMFA = accountUpdateMFA;
198
- const accountCreateMFAAuthenticator = async ({ type, parseOutput = true, overrideForCli = false, sdk = undefined }) => {
199
- let client = !sdk ? await (0, sdks_1.sdkForProject)() :
200
- sdk;
201
- let apiPath = '/account/mfa/authenticators/{type}'.replace('{type}', type);
202
- let payload = {};
203
- let response = undefined;
204
- response = await client.call('post', apiPath, {
205
- 'content-type': 'application/json',
206
- }, payload);
207
- if (parseOutput) {
208
- (0, parser_1.parse)(response);
209
- }
210
- return response;
211
- };
212
- exports.accountCreateMFAAuthenticator = accountCreateMFAAuthenticator;
213
- const accountUpdateMFAAuthenticator = async ({ type, otp, parseOutput = true, overrideForCli = false, sdk = undefined }) => {
214
- let client = !sdk ? await (0, sdks_1.sdkForProject)() :
215
- sdk;
216
- let apiPath = '/account/mfa/authenticators/{type}'.replace('{type}', type);
217
- let payload = {};
218
- if (typeof otp !== 'undefined') {
219
- payload['otp'] = otp;
220
- }
221
- let response = undefined;
222
- response = await client.call('put', apiPath, {
223
- 'content-type': 'application/json',
224
- }, payload);
225
- if (parseOutput) {
226
- (0, parser_1.parse)(response);
227
- }
228
- return response;
229
- };
230
- exports.accountUpdateMFAAuthenticator = accountUpdateMFAAuthenticator;
231
- const accountDeleteMFAAuthenticator = async ({ type, parseOutput = true, overrideForCli = false, sdk = undefined }) => {
232
- let client = !sdk ? await (0, sdks_1.sdkForProject)() :
233
- sdk;
234
- let apiPath = '/account/mfa/authenticators/{type}'.replace('{type}', type);
235
- let payload = {};
236
- let response = undefined;
237
- response = await client.call('delete', apiPath, {
238
- 'content-type': 'application/json',
239
- }, payload);
240
- if (parseOutput) {
241
- (0, parser_1.parse)(response);
242
- }
243
- return response;
244
- };
245
- exports.accountDeleteMFAAuthenticator = accountDeleteMFAAuthenticator;
246
- const accountCreateMFAChallenge = async ({ factor, parseOutput = true, overrideForCli = false, sdk = undefined }) => {
247
- let client = !sdk ? await (0, sdks_1.sdkForProject)() :
248
- sdk;
249
- let apiPath = '/account/mfa/challenges';
250
- let payload = {};
251
- if (typeof factor !== 'undefined') {
252
- payload['factor'] = factor;
253
- }
254
- let response = undefined;
255
- response = await client.call('post', apiPath, {
256
- 'content-type': 'application/json',
257
- }, payload);
258
- if (parseOutput) {
259
- (0, parser_1.parse)(response);
260
- }
261
- return response;
262
- };
263
- exports.accountCreateMFAChallenge = accountCreateMFAChallenge;
264
- const accountUpdateMFAChallenge = async ({ challengeId, otp, parseOutput = true, overrideForCli = false, sdk = undefined }) => {
265
- let client = !sdk ? await (0, sdks_1.sdkForProject)() :
266
- sdk;
267
- let apiPath = '/account/mfa/challenges';
268
- let payload = {};
269
- if (typeof challengeId !== 'undefined') {
270
- payload['challengeId'] = challengeId;
271
- }
272
- if (typeof otp !== 'undefined') {
273
- payload['otp'] = otp;
274
- }
275
- let response = undefined;
276
- response = await client.call('put', apiPath, {
277
- 'content-type': 'application/json',
278
- }, payload);
279
- if (parseOutput) {
280
- (0, parser_1.parse)(response);
281
- }
282
- return response;
283
- };
284
- exports.accountUpdateMFAChallenge = accountUpdateMFAChallenge;
285
- const accountListMFAFactors = async ({ parseOutput = true, overrideForCli = false, sdk = undefined }) => {
286
- let client = !sdk ? await (0, sdks_1.sdkForProject)() :
287
- sdk;
288
- let apiPath = '/account/mfa/factors';
289
- let payload = {};
290
- let response = undefined;
291
- response = await client.call('get', apiPath, {}, payload);
292
- if (parseOutput) {
293
- (0, parser_1.parse)(response);
294
- }
295
- return response;
296
- };
297
- exports.accountListMFAFactors = accountListMFAFactors;
298
- const accountGetMFARecoveryCodes = async ({ parseOutput = true, overrideForCli = false, sdk = undefined }) => {
299
- let client = !sdk ? await (0, sdks_1.sdkForProject)() :
300
- sdk;
301
- let apiPath = '/account/mfa/recovery-codes';
302
- let payload = {};
303
- let response = undefined;
304
- response = await client.call('get', apiPath, {}, payload);
305
- if (parseOutput) {
306
- (0, parser_1.parse)(response);
307
- }
308
- return response;
309
- };
310
- exports.accountGetMFARecoveryCodes = accountGetMFARecoveryCodes;
311
- const accountCreateMFARecoveryCodes = async ({ parseOutput = true, overrideForCli = false, sdk = undefined }) => {
312
- let client = !sdk ? await (0, sdks_1.sdkForProject)() :
313
- sdk;
314
- let apiPath = '/account/mfa/recovery-codes';
315
- let payload = {};
316
- let response = undefined;
317
- response = await client.call('post', apiPath, {
318
- 'content-type': 'application/json',
319
- }, payload);
320
- if (parseOutput) {
321
- (0, parser_1.parse)(response);
322
- }
323
- return response;
324
- };
325
- exports.accountCreateMFARecoveryCodes = accountCreateMFARecoveryCodes;
326
- const accountUpdateMFARecoveryCodes = async ({ parseOutput = true, overrideForCli = false, sdk = undefined }) => {
327
- let client = !sdk ? await (0, sdks_1.sdkForProject)() :
328
- sdk;
329
- let apiPath = '/account/mfa/recovery-codes';
330
- let payload = {};
331
- let response = undefined;
332
- response = await client.call('patch', apiPath, {
333
- 'content-type': 'application/json',
334
- }, payload);
335
- if (parseOutput) {
336
- (0, parser_1.parse)(response);
337
- }
338
- return response;
339
- };
340
- exports.accountUpdateMFARecoveryCodes = accountUpdateMFARecoveryCodes;
341
- const accountUpdateName = async ({ name, parseOutput = true, overrideForCli = false, sdk = undefined }) => {
342
- let client = !sdk ? await (0, sdks_1.sdkForProject)() :
343
- sdk;
344
- let apiPath = '/account/name';
345
- let payload = {};
346
- if (typeof name !== 'undefined') {
347
- payload['name'] = name;
348
- }
349
- let response = undefined;
350
- response = await client.call('patch', apiPath, {
351
- 'content-type': 'application/json',
352
- }, payload);
353
- if (parseOutput) {
354
- (0, parser_1.parse)(response);
355
- }
356
- return response;
357
- };
358
- exports.accountUpdateName = accountUpdateName;
359
- const accountUpdatePassword = async ({ password, oldPassword, parseOutput = true, overrideForCli = false, sdk = undefined }) => {
360
- let client = !sdk ? await (0, sdks_1.sdkForProject)() :
361
- sdk;
362
- let apiPath = '/account/password';
363
- let payload = {};
364
- if (typeof password !== 'undefined') {
365
- payload['password'] = password;
366
- }
367
- if (typeof oldPassword !== 'undefined') {
368
- payload['oldPassword'] = oldPassword;
369
- }
370
- let response = undefined;
371
- response = await client.call('patch', apiPath, {
372
- 'content-type': 'application/json',
373
- }, payload);
374
- if (parseOutput) {
375
- (0, parser_1.parse)(response);
376
- }
377
- return response;
378
- };
379
- exports.accountUpdatePassword = accountUpdatePassword;
380
- const accountUpdatePhone = async ({ phone, password, parseOutput = true, overrideForCli = false, sdk = undefined }) => {
381
- let client = !sdk ? await (0, sdks_1.sdkForProject)() :
382
- sdk;
383
- let apiPath = '/account/phone';
384
- let payload = {};
385
- if (typeof phone !== 'undefined') {
386
- payload['phone'] = phone;
387
- }
388
- if (typeof password !== 'undefined') {
389
- payload['password'] = password;
390
- }
391
- let response = undefined;
392
- response = await client.call('patch', apiPath, {
393
- 'content-type': 'application/json',
394
- }, payload);
395
- if (parseOutput) {
396
- (0, parser_1.parse)(response);
397
- }
398
- return response;
399
- };
400
- exports.accountUpdatePhone = accountUpdatePhone;
401
- const accountGetPrefs = async ({ parseOutput = true, overrideForCli = false, sdk = undefined }) => {
402
- let client = !sdk ? await (0, sdks_1.sdkForProject)() :
403
- sdk;
404
- let apiPath = '/account/prefs';
405
- let payload = {};
406
- let response = undefined;
407
- response = await client.call('get', apiPath, {}, payload);
408
- if (parseOutput) {
409
- (0, parser_1.parse)(response);
410
- }
411
- return response;
412
- };
413
- exports.accountGetPrefs = accountGetPrefs;
414
- const accountUpdatePrefs = async ({ prefs, parseOutput = true, overrideForCli = false, sdk = undefined }) => {
415
- let client = !sdk ? await (0, sdks_1.sdkForProject)() :
416
- sdk;
417
- let apiPath = '/account/prefs';
418
- let payload = {};
419
- if (typeof prefs !== 'undefined') {
420
- payload['prefs'] = JSON.parse(prefs);
421
- }
422
- let response = undefined;
423
- response = await client.call('patch', apiPath, {
424
- 'content-type': 'application/json',
425
- }, payload);
426
- if (parseOutput) {
427
- (0, parser_1.parse)(response);
428
- }
429
- return response;
430
- };
431
- exports.accountUpdatePrefs = accountUpdatePrefs;
432
- const accountCreateRecovery = async ({ email, url, parseOutput = true, overrideForCli = false, sdk = undefined }) => {
433
- let client = !sdk ? await (0, sdks_1.sdkForProject)() :
434
- sdk;
435
- let apiPath = '/account/recovery';
436
- let payload = {};
437
- if (typeof email !== 'undefined') {
438
- payload['email'] = email;
439
- }
440
- if (typeof url !== 'undefined') {
441
- payload['url'] = url;
442
- }
443
- let response = undefined;
444
- response = await client.call('post', apiPath, {
445
- 'content-type': 'application/json',
446
- }, payload);
447
- if (parseOutput) {
448
- (0, parser_1.parse)(response);
449
- }
450
- return response;
451
- };
452
- exports.accountCreateRecovery = accountCreateRecovery;
453
- const accountUpdateRecovery = async ({ userId, secret, password, parseOutput = true, overrideForCli = false, sdk = undefined }) => {
454
- let client = !sdk ? await (0, sdks_1.sdkForProject)() :
455
- sdk;
456
- let apiPath = '/account/recovery';
457
- let payload = {};
458
- if (typeof userId !== 'undefined') {
459
- payload['userId'] = userId;
460
- }
461
- if (typeof secret !== 'undefined') {
462
- payload['secret'] = secret;
463
- }
464
- if (typeof password !== 'undefined') {
465
- payload['password'] = password;
466
- }
467
- let response = undefined;
468
- response = await client.call('put', apiPath, {
469
- 'content-type': 'application/json',
470
- }, payload);
471
- if (parseOutput) {
472
- (0, parser_1.parse)(response);
473
- }
474
- return response;
475
- };
476
- exports.accountUpdateRecovery = accountUpdateRecovery;
477
- const accountListSessions = async ({ parseOutput = true, overrideForCli = false, sdk = undefined, console: showConsole }) => {
478
- let client = !sdk ? await (0, sdks_1.sdkForProject)() :
479
- sdk;
480
- let apiPath = '/account/sessions';
481
- let payload = {};
482
- let response = undefined;
483
- response = await client.call('get', apiPath, {}, payload);
484
- if (parseOutput) {
485
- if (showConsole) {
486
- (0, utils_1.showConsoleLink)('account', 'listSessions');
487
- }
488
- else {
489
- (0, parser_1.parse)(response);
490
- }
491
- }
492
- return response;
493
- };
494
- exports.accountListSessions = accountListSessions;
495
- const accountDeleteSessions = async ({ parseOutput = true, overrideForCli = false, sdk = undefined }) => {
496
- let client = !sdk ? await (0, sdks_1.sdkForProject)() :
497
- sdk;
498
- let apiPath = '/account/sessions';
499
- let payload = {};
500
- let response = undefined;
501
- response = await client.call('delete', apiPath, {
502
- 'content-type': 'application/json',
503
- }, payload);
504
- if (parseOutput) {
505
- (0, parser_1.parse)(response);
506
- }
507
- return response;
508
- };
509
- exports.accountDeleteSessions = accountDeleteSessions;
510
- const accountCreateAnonymousSession = async ({ parseOutput = true, overrideForCli = false, sdk = undefined }) => {
511
- let client = !sdk ? await (0, sdks_1.sdkForProject)() :
512
- sdk;
513
- let apiPath = '/account/sessions/anonymous';
514
- let payload = {};
515
- let response = undefined;
516
- response = await client.call('post', apiPath, {
517
- 'content-type': 'application/json',
518
- }, payload);
519
- if (parseOutput) {
520
- (0, parser_1.parse)(response);
521
- }
522
- return response;
523
- };
524
- exports.accountCreateAnonymousSession = accountCreateAnonymousSession;
525
- const accountCreateEmailPasswordSession = async ({ email, password, parseOutput = true, overrideForCli = false, sdk = undefined }) => {
526
- let client = !sdk ? await (0, sdks_1.sdkForProject)() :
527
- sdk;
528
- let apiPath = '/account/sessions/email';
529
- let payload = {};
530
- if (typeof email !== 'undefined') {
531
- payload['email'] = email;
532
- }
533
- if (typeof password !== 'undefined') {
534
- payload['password'] = password;
535
- }
536
- let response = undefined;
537
- response = await client.call('post', apiPath, {
538
- 'content-type': 'application/json',
539
- }, payload);
540
- if (parseOutput) {
541
- (0, parser_1.parse)(response);
542
- }
543
- return response;
544
- };
545
- exports.accountCreateEmailPasswordSession = accountCreateEmailPasswordSession;
546
- const accountUpdateMagicURLSession = async ({ userId, secret, parseOutput = true, overrideForCli = false, sdk = undefined }) => {
547
- let client = !sdk ? await (0, sdks_1.sdkForProject)() :
548
- sdk;
549
- let apiPath = '/account/sessions/magic-url';
550
- let payload = {};
551
- if (typeof userId !== 'undefined') {
552
- payload['userId'] = userId;
553
- }
554
- if (typeof secret !== 'undefined') {
555
- payload['secret'] = secret;
556
- }
557
- let response = undefined;
558
- response = await client.call('put', apiPath, {
559
- 'content-type': 'application/json',
560
- }, payload);
561
- if (parseOutput) {
562
- (0, parser_1.parse)(response);
563
- }
564
- return response;
565
- };
566
- exports.accountUpdateMagicURLSession = accountUpdateMagicURLSession;
567
- const accountCreateOAuth2Session = async ({ provider, success, failure, scopes, parseOutput = true, overrideForCli = false, sdk = undefined }) => {
568
- let client = !sdk ? await (0, sdks_1.sdkForProject)() :
569
- sdk;
570
- let apiPath = '/account/sessions/oauth2/{provider}'.replace('{provider}', provider);
571
- let payload = {};
572
- if (typeof success !== 'undefined') {
573
- payload['success'] = success;
574
- }
575
- if (typeof failure !== 'undefined') {
576
- payload['failure'] = failure;
577
- }
578
- if (typeof scopes !== 'undefined') {
579
- payload['scopes'] = scopes;
580
- }
581
- let response = undefined;
582
- response = await client.call('get', apiPath, {}, payload);
583
- if (parseOutput) {
584
- (0, parser_1.parse)(response);
585
- }
586
- return response;
587
- };
588
- exports.accountCreateOAuth2Session = accountCreateOAuth2Session;
589
- const accountUpdatePhoneSession = async ({ userId, secret, parseOutput = true, overrideForCli = false, sdk = undefined }) => {
590
- let client = !sdk ? await (0, sdks_1.sdkForProject)() :
591
- sdk;
592
- let apiPath = '/account/sessions/phone';
593
- let payload = {};
594
- if (typeof userId !== 'undefined') {
595
- payload['userId'] = userId;
596
- }
597
- if (typeof secret !== 'undefined') {
598
- payload['secret'] = secret;
599
- }
600
- let response = undefined;
601
- response = await client.call('put', apiPath, {
602
- 'content-type': 'application/json',
603
- }, payload);
604
- if (parseOutput) {
605
- (0, parser_1.parse)(response);
606
- }
607
- return response;
608
- };
609
- exports.accountUpdatePhoneSession = accountUpdatePhoneSession;
610
- const accountCreateSession = async ({ userId, secret, parseOutput = true, overrideForCli = false, sdk = undefined }) => {
611
- let client = !sdk ? await (0, sdks_1.sdkForProject)() :
612
- sdk;
613
- let apiPath = '/account/sessions/token';
614
- let payload = {};
615
- if (typeof userId !== 'undefined') {
616
- payload['userId'] = userId;
617
- }
618
- if (typeof secret !== 'undefined') {
619
- payload['secret'] = secret;
620
- }
621
- let response = undefined;
622
- response = await client.call('post', apiPath, {
623
- 'content-type': 'application/json',
624
- }, payload);
625
- if (parseOutput) {
626
- (0, parser_1.parse)(response);
627
- }
628
- return response;
629
- };
630
- exports.accountCreateSession = accountCreateSession;
631
- const accountGetSession = async ({ sessionId, parseOutput = true, overrideForCli = false, sdk = undefined }) => {
632
- let client = !sdk ? await (0, sdks_1.sdkForProject)() :
633
- sdk;
634
- let apiPath = '/account/sessions/{sessionId}'.replace('{sessionId}', sessionId);
635
- let payload = {};
636
- let response = undefined;
637
- response = await client.call('get', apiPath, {}, payload);
638
- if (parseOutput) {
639
- (0, parser_1.parse)(response);
640
- }
641
- return response;
642
- };
643
- exports.accountGetSession = accountGetSession;
644
- const accountUpdateSession = async ({ sessionId, parseOutput = true, overrideForCli = false, sdk = undefined }) => {
645
- let client = !sdk ? await (0, sdks_1.sdkForProject)() :
646
- sdk;
647
- let apiPath = '/account/sessions/{sessionId}'.replace('{sessionId}', sessionId);
648
- let payload = {};
649
- let response = undefined;
650
- response = await client.call('patch', apiPath, {
651
- 'content-type': 'application/json',
652
- }, payload);
653
- if (parseOutput) {
654
- (0, parser_1.parse)(response);
655
- }
656
- return response;
657
- };
658
- exports.accountUpdateSession = accountUpdateSession;
659
- const accountDeleteSession = async ({ sessionId, parseOutput = true, overrideForCli = false, sdk = undefined }) => {
660
- let client = !sdk ? await (0, sdks_1.sdkForProject)() :
661
- sdk;
662
- let apiPath = '/account/sessions/{sessionId}'.replace('{sessionId}', sessionId);
663
- let payload = {};
664
- let response = undefined;
665
- response = await client.call('delete', apiPath, {
666
- 'content-type': 'application/json',
667
- }, payload);
668
- if (parseOutput) {
669
- (0, parser_1.parse)(response);
670
- }
671
- return response;
672
- };
673
- exports.accountDeleteSession = accountDeleteSession;
674
- const accountUpdateStatus = async ({ parseOutput = true, overrideForCli = false, sdk = undefined }) => {
675
- let client = !sdk ? await (0, sdks_1.sdkForProject)() :
676
- sdk;
677
- let apiPath = '/account/status';
678
- let payload = {};
679
- let response = undefined;
680
- response = await client.call('patch', apiPath, {
681
- 'content-type': 'application/json',
682
- }, payload);
683
- if (parseOutput) {
684
- (0, parser_1.parse)(response);
685
- }
686
- return response;
687
- };
688
- exports.accountUpdateStatus = accountUpdateStatus;
689
- const accountCreatePushTarget = async ({ targetId, identifier, providerId, parseOutput = true, overrideForCli = false, sdk = undefined }) => {
690
- let client = !sdk ? await (0, sdks_1.sdkForProject)() :
691
- sdk;
692
- let apiPath = '/account/targets/push';
693
- let payload = {};
694
- if (typeof targetId !== 'undefined') {
695
- payload['targetId'] = targetId;
696
- }
697
- if (typeof identifier !== 'undefined') {
698
- payload['identifier'] = identifier;
699
- }
700
- if (typeof providerId !== 'undefined') {
701
- payload['providerId'] = providerId;
702
- }
703
- let response = undefined;
704
- response = await client.call('post', apiPath, {
705
- 'content-type': 'application/json',
706
- }, payload);
707
- if (parseOutput) {
708
- (0, parser_1.parse)(response);
709
- }
710
- return response;
711
- };
712
- exports.accountCreatePushTarget = accountCreatePushTarget;
713
- const accountUpdatePushTarget = async ({ targetId, identifier, parseOutput = true, overrideForCli = false, sdk = undefined }) => {
714
- let client = !sdk ? await (0, sdks_1.sdkForProject)() :
715
- sdk;
716
- let apiPath = '/account/targets/{targetId}/push'.replace('{targetId}', targetId);
717
- let payload = {};
718
- if (typeof identifier !== 'undefined') {
719
- payload['identifier'] = identifier;
720
- }
721
- let response = undefined;
722
- response = await client.call('put', apiPath, {
723
- 'content-type': 'application/json',
724
- }, payload);
725
- if (parseOutput) {
726
- (0, parser_1.parse)(response);
727
- }
728
- return response;
729
- };
730
- exports.accountUpdatePushTarget = accountUpdatePushTarget;
731
- const accountDeletePushTarget = async ({ targetId, parseOutput = true, overrideForCli = false, sdk = undefined }) => {
732
- let client = !sdk ? await (0, sdks_1.sdkForProject)() :
733
- sdk;
734
- let apiPath = '/account/targets/{targetId}/push'.replace('{targetId}', targetId);
735
- let payload = {};
736
- let response = undefined;
737
- response = await client.call('delete', apiPath, {
738
- 'content-type': 'application/json',
739
- }, payload);
740
- if (parseOutput) {
741
- (0, parser_1.parse)(response);
742
- }
743
- return response;
744
- };
745
- exports.accountDeletePushTarget = accountDeletePushTarget;
746
- const accountCreateEmailToken = async ({ userId, email, phrase, parseOutput = true, overrideForCli = false, sdk = undefined }) => {
747
- let client = !sdk ? await (0, sdks_1.sdkForProject)() :
748
- sdk;
749
- let apiPath = '/account/tokens/email';
750
- let payload = {};
751
- if (typeof userId !== 'undefined') {
752
- payload['userId'] = userId;
753
- }
754
- if (typeof email !== 'undefined') {
755
- payload['email'] = email;
756
- }
757
- if (typeof phrase !== 'undefined') {
758
- payload['phrase'] = phrase;
759
- }
760
- let response = undefined;
761
- response = await client.call('post', apiPath, {
762
- 'content-type': 'application/json',
763
- }, payload);
764
- if (parseOutput) {
765
- (0, parser_1.parse)(response);
766
- }
767
- return response;
768
- };
769
- exports.accountCreateEmailToken = accountCreateEmailToken;
770
- const accountCreateMagicURLToken = async ({ userId, email, url, phrase, parseOutput = true, overrideForCli = false, sdk = undefined }) => {
771
- let client = !sdk ? await (0, sdks_1.sdkForProject)() :
772
- sdk;
773
- let apiPath = '/account/tokens/magic-url';
774
- let payload = {};
775
- if (typeof userId !== 'undefined') {
776
- payload['userId'] = userId;
777
- }
778
- if (typeof email !== 'undefined') {
779
- payload['email'] = email;
780
- }
781
- if (typeof url !== 'undefined') {
782
- payload['url'] = url;
783
- }
784
- if (typeof phrase !== 'undefined') {
785
- payload['phrase'] = phrase;
786
- }
787
- let response = undefined;
788
- response = await client.call('post', apiPath, {
789
- 'content-type': 'application/json',
790
- }, payload);
791
- if (parseOutput) {
792
- (0, parser_1.parse)(response);
793
- }
794
- return response;
795
- };
796
- exports.accountCreateMagicURLToken = accountCreateMagicURLToken;
797
- const accountCreateOAuth2Token = async ({ provider, success, failure, scopes, parseOutput = true, overrideForCli = false, sdk = undefined }) => {
798
- let client = !sdk ? await (0, sdks_1.sdkForProject)() :
799
- sdk;
800
- let apiPath = '/account/tokens/oauth2/{provider}'.replace('{provider}', provider);
801
- let payload = {};
802
- if (typeof success !== 'undefined') {
803
- payload['success'] = success;
804
- }
805
- if (typeof failure !== 'undefined') {
806
- payload['failure'] = failure;
807
- }
808
- if (typeof scopes !== 'undefined') {
809
- payload['scopes'] = scopes;
810
- }
811
- let response = undefined;
812
- response = await client.call('get', apiPath, {}, payload);
813
- if (parseOutput) {
814
- (0, parser_1.parse)(response);
815
- }
816
- return response;
817
- };
818
- exports.accountCreateOAuth2Token = accountCreateOAuth2Token;
819
- const accountCreatePhoneToken = async ({ userId, phone, parseOutput = true, overrideForCli = false, sdk = undefined }) => {
820
- let client = !sdk ? await (0, sdks_1.sdkForProject)() :
821
- sdk;
822
- let apiPath = '/account/tokens/phone';
823
- let payload = {};
824
- if (typeof userId !== 'undefined') {
825
- payload['userId'] = userId;
826
- }
827
- if (typeof phone !== 'undefined') {
828
- payload['phone'] = phone;
829
- }
830
- let response = undefined;
831
- response = await client.call('post', apiPath, {
832
- 'content-type': 'application/json',
833
- }, payload);
834
- if (parseOutput) {
835
- (0, parser_1.parse)(response);
836
- }
837
- return response;
838
- };
839
- exports.accountCreatePhoneToken = accountCreatePhoneToken;
840
- const accountCreateEmailVerification = async ({ url, parseOutput = true, overrideForCli = false, sdk = undefined }) => {
841
- let client = !sdk ? await (0, sdks_1.sdkForProject)() :
842
- sdk;
843
- let apiPath = '/account/verifications/email';
844
- let payload = {};
845
- if (typeof url !== 'undefined') {
846
- payload['url'] = url;
847
- }
848
- let response = undefined;
849
- response = await client.call('post', apiPath, {
850
- 'content-type': 'application/json',
851
- }, payload);
852
- if (parseOutput) {
853
- (0, parser_1.parse)(response);
854
- }
855
- return response;
856
- };
857
- exports.accountCreateEmailVerification = accountCreateEmailVerification;
858
- const accountCreateVerification = async ({ url, parseOutput = true, overrideForCli = false, sdk = undefined }) => {
859
- let client = !sdk ? await (0, sdks_1.sdkForProject)() :
860
- sdk;
861
- let apiPath = '/account/verifications/email';
862
- let payload = {};
863
- if (typeof url !== 'undefined') {
864
- payload['url'] = url;
865
- }
866
- let response = undefined;
867
- response = await client.call('post', apiPath, {
868
- 'content-type': 'application/json',
869
- }, payload);
870
- if (parseOutput) {
871
- (0, parser_1.parse)(response);
872
- }
873
- return response;
874
- };
875
- exports.accountCreateVerification = accountCreateVerification;
876
- const accountUpdateEmailVerification = async ({ userId, secret, parseOutput = true, overrideForCli = false, sdk = undefined }) => {
877
- let client = !sdk ? await (0, sdks_1.sdkForProject)() :
878
- sdk;
879
- let apiPath = '/account/verifications/email';
880
- let payload = {};
881
- if (typeof userId !== 'undefined') {
882
- payload['userId'] = userId;
883
- }
884
- if (typeof secret !== 'undefined') {
885
- payload['secret'] = secret;
886
- }
887
- let response = undefined;
888
- response = await client.call('put', apiPath, {
889
- 'content-type': 'application/json',
890
- }, payload);
891
- if (parseOutput) {
892
- (0, parser_1.parse)(response);
893
- }
894
- return response;
895
- };
896
- exports.accountUpdateEmailVerification = accountUpdateEmailVerification;
897
- const accountUpdateVerification = async ({ userId, secret, parseOutput = true, overrideForCli = false, sdk = undefined }) => {
898
- let client = !sdk ? await (0, sdks_1.sdkForProject)() :
899
- sdk;
900
- let apiPath = '/account/verifications/email';
901
- let payload = {};
902
- if (typeof userId !== 'undefined') {
903
- payload['userId'] = userId;
904
- }
905
- if (typeof secret !== 'undefined') {
906
- payload['secret'] = secret;
907
- }
908
- let response = undefined;
909
- response = await client.call('put', apiPath, {
910
- 'content-type': 'application/json',
911
- }, payload);
912
- if (parseOutput) {
913
- (0, parser_1.parse)(response);
914
- }
915
- return response;
916
- };
917
- exports.accountUpdateVerification = accountUpdateVerification;
918
- const accountCreatePhoneVerification = async ({ parseOutput = true, overrideForCli = false, sdk = undefined }) => {
919
- let client = !sdk ? await (0, sdks_1.sdkForProject)() :
920
- sdk;
921
- let apiPath = '/account/verifications/phone';
922
- let payload = {};
923
- let response = undefined;
924
- response = await client.call('post', apiPath, {
925
- 'content-type': 'application/json',
926
- }, payload);
927
- if (parseOutput) {
928
- (0, parser_1.parse)(response);
929
- }
930
- return response;
931
- };
932
- exports.accountCreatePhoneVerification = accountCreatePhoneVerification;
933
- const accountUpdatePhoneVerification = async ({ userId, secret, parseOutput = true, overrideForCli = false, sdk = undefined }) => {
934
- let client = !sdk ? await (0, sdks_1.sdkForProject)() :
935
- sdk;
936
- let apiPath = '/account/verifications/phone';
937
- let payload = {};
938
- if (typeof userId !== 'undefined') {
939
- payload['userId'] = userId;
940
- }
941
- if (typeof secret !== 'undefined') {
942
- payload['secret'] = secret;
943
- }
944
- let response = undefined;
945
- response = await client.call('put', apiPath, {
946
- 'content-type': 'application/json',
947
- }, payload);
948
- if (parseOutput) {
949
- (0, parser_1.parse)(response);
950
- }
951
- return response;
952
- };
953
- exports.accountUpdatePhoneVerification = accountUpdatePhoneVerification;
954
- exports.account
955
- .command(`get`)
956
- .description(`Get the currently logged in user.`)
957
- .option(`--console`, `Get the resource console url`)
958
- .action((0, parser_1.actionRunner)(exports.accountGet));
959
- exports.account
960
- .command(`create`)
961
- .description(`Use this endpoint to allow a new user to register a new account in your project. After the user registration completes successfully, you can use the [/account/verfication](https://appwrite.io/docs/references/cloud/client-web/account#createVerification) route to start verifying the user email address. To allow the new user to login to their new account, you need to create a new [account session](https://appwrite.io/docs/references/cloud/client-web/account#createEmailSession).`)
962
- .requiredOption(`--user-id <user-id>`, `User ID. Choose a custom ID or generate a random ID with 'ID.unique()'. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`)
963
- .requiredOption(`--email <email>`, `User email.`)
964
- .requiredOption(`--password <password>`, `New user password. Must be between 8 and 256 chars.`)
965
- .option(`--name <name>`, `User name. Max length: 128 chars.`)
966
- .action((0, parser_1.actionRunner)(exports.accountCreate));
967
- exports.account
968
- .command(`delete`)
969
- .description(`Delete the currently logged in user.`)
970
- .action((0, parser_1.actionRunner)(exports.accountDelete));
971
- exports.account
972
- .command(`update-email`)
973
- .description(`Update currently logged in user account email address. After changing user address, the user confirmation status will get reset. A new confirmation email is not sent automatically however you can use the send confirmation email endpoint again to send the confirmation email. For security measures, user password is required to complete this request. This endpoint can also be used to convert an anonymous account to a normal one, by passing an email address and a new password. `)
974
- .requiredOption(`--email <email>`, `User email.`)
975
- .requiredOption(`--password <password>`, `User password. Must be at least 8 chars.`)
976
- .action((0, parser_1.actionRunner)(exports.accountUpdateEmail));
977
- exports.account
978
- .command(`list-identities`)
979
- .description(`Get the list of identities for the currently logged in user.`)
980
- .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: userId, provider, providerUid, providerEmail, providerAccessTokenExpiry`)
981
- .option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : (0, parser_1.parseBool)(value))
982
- .action((0, parser_1.actionRunner)(exports.accountListIdentities));
983
- exports.account
984
- .command(`delete-identity`)
985
- .description(`Delete an identity by its unique ID.`)
986
- .requiredOption(`--identity-id <identity-id>`, `Identity ID.`)
987
- .action((0, parser_1.actionRunner)(exports.accountDeleteIdentity));
988
- exports.account
989
- .command(`create-jwt`)
990
- .description(`Use this endpoint to create a JSON Web Token. You can use the resulting JWT to authenticate on behalf of the current user when working with the Appwrite server-side API and SDKs. The JWT secret is valid for 15 minutes from its creation and will be invalid if the user will logout in that time frame.`)
991
- .action((0, parser_1.actionRunner)(exports.accountCreateJWT));
992
- exports.account
993
- .command(`list-logs`)
994
- .description(`Get the list of latest security activity logs for the currently logged in user. Each log returns user IP address, location and date and time of log.`)
995
- .option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit and offset`)
996
- .option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : (0, parser_1.parseBool)(value))
997
- .action((0, parser_1.actionRunner)(exports.accountListLogs));
998
- exports.account
999
- .command(`update-mfa`)
1000
- .description(`Enable or disable MFA on an account.`)
1001
- .requiredOption(`--mfa [value]`, `Enable or disable MFA.`, (value) => value === undefined ? true : (0, parser_1.parseBool)(value))
1002
- .action((0, parser_1.actionRunner)(exports.accountUpdateMFA));
1003
- exports.account
1004
- .command(`create-mfa-authenticator`)
1005
- .description(`Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](/docs/references/cloud/client-web/account#updateMfaAuthenticator) method.`)
1006
- .requiredOption(`--type <type>`, `Type of authenticator. Must be 'totp'`)
1007
- .action((0, parser_1.actionRunner)(exports.accountCreateMFAAuthenticator));
1008
- exports.account
1009
- .command(`update-mfa-authenticator`)
1010
- .description(`Verify an authenticator app after adding it using the [add authenticator](/docs/references/cloud/client-web/account#createMfaAuthenticator) method.`)
1011
- .requiredOption(`--type <type>`, `Type of authenticator.`)
1012
- .requiredOption(`--otp <otp>`, `Valid verification token.`)
1013
- .action((0, parser_1.actionRunner)(exports.accountUpdateMFAAuthenticator));
1014
- exports.account
1015
- .command(`delete-mfa-authenticator`)
1016
- .description(`Delete an authenticator for a user by ID.`)
1017
- .requiredOption(`--type <type>`, `Type of authenticator.`)
1018
- .action((0, parser_1.actionRunner)(exports.accountDeleteMFAAuthenticator));
1019
- exports.account
1020
- .command(`create-mfa-challenge`)
1021
- .description(`Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](/docs/references/cloud/client-web/account#updateMfaChallenge) method.`)
1022
- .requiredOption(`--factor <factor>`, `Factor used for verification. Must be one of following: 'email', 'phone', 'totp', 'recoveryCode'.`)
1023
- .action((0, parser_1.actionRunner)(exports.accountCreateMFAChallenge));
1024
- exports.account
1025
- .command(`update-mfa-challenge`)
1026
- .description(`Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge) method.`)
1027
- .requiredOption(`--challenge-id <challenge-id>`, `ID of the challenge.`)
1028
- .requiredOption(`--otp <otp>`, `Valid verification token.`)
1029
- .action((0, parser_1.actionRunner)(exports.accountUpdateMFAChallenge));
1030
- exports.account
1031
- .command(`list-mfa-factors`)
1032
- .description(`List the factors available on the account to be used as a MFA challange.`)
1033
- .action((0, parser_1.actionRunner)(exports.accountListMFAFactors));
1034
- exports.account
1035
- .command(`get-mfa-recovery-codes`)
1036
- .description(`Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes.`)
1037
- .action((0, parser_1.actionRunner)(exports.accountGetMFARecoveryCodes));
1038
- exports.account
1039
- .command(`create-mfa-recovery-codes`)
1040
- .description(`Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge) method.`)
1041
- .action((0, parser_1.actionRunner)(exports.accountCreateMFARecoveryCodes));
1042
- exports.account
1043
- .command(`update-mfa-recovery-codes`)
1044
- .description(`Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes.`)
1045
- .action((0, parser_1.actionRunner)(exports.accountUpdateMFARecoveryCodes));
1046
- exports.account
1047
- .command(`update-name`)
1048
- .description(`Update currently logged in user account name.`)
1049
- .requiredOption(`--name <name>`, `User name. Max length: 128 chars.`)
1050
- .action((0, parser_1.actionRunner)(exports.accountUpdateName));
1051
- exports.account
1052
- .command(`update-password`)
1053
- .description(`Update currently logged in user password. For validation, user is required to pass in the new password, and the old password. For users created with OAuth, Team Invites and Magic URL, oldPassword is optional.`)
1054
- .requiredOption(`--password <password>`, `New user password. Must be at least 8 chars.`)
1055
- .option(`--old-password <old-password>`, `Current user password. Must be at least 8 chars.`)
1056
- .action((0, parser_1.actionRunner)(exports.accountUpdatePassword));
1057
- exports.account
1058
- .command(`update-phone`)
1059
- .description(`Update the currently logged in user's phone number. After updating the phone number, the phone verification status will be reset. A confirmation SMS is not sent automatically, however you can use the [POST /account/verification/phone](https://appwrite.io/docs/references/cloud/client-web/account#createPhoneVerification) endpoint to send a confirmation SMS.`)
1060
- .requiredOption(`--phone <phone>`, `Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.`)
1061
- .requiredOption(`--password <password>`, `User password. Must be at least 8 chars.`)
1062
- .action((0, parser_1.actionRunner)(exports.accountUpdatePhone));
1063
- exports.account
1064
- .command(`get-prefs`)
1065
- .description(`Get the preferences as a key-value object for the currently logged in user.`)
1066
- .action((0, parser_1.actionRunner)(exports.accountGetPrefs));
1067
- exports.account
1068
- .command(`update-prefs`)
1069
- .description(`Update currently logged in user account preferences. The object you pass is stored as is, and replaces any previous value. The maximum allowed prefs size is 64kB and throws error if exceeded.`)
1070
- .requiredOption(`--prefs <prefs>`, `Prefs key-value JSON object.`)
1071
- .action((0, parser_1.actionRunner)(exports.accountUpdatePrefs));
1072
- exports.account
1073
- .command(`create-recovery`)
1074
- .description(`Sends the user an email with a temporary secret key for password reset. When the user clicks the confirmation link he is redirected back to your app password reset URL with the secret key and email address values attached to the URL query string. Use the query string params to submit a request to the [PUT /account/recovery](https://appwrite.io/docs/references/cloud/client-web/account#updateRecovery) endpoint to complete the process. The verification link sent to the user's email address is valid for 1 hour.`)
1075
- .requiredOption(`--email <email>`, `User email.`)
1076
- .requiredOption(`--url <url>`, `URL to redirect the user back to your app from the recovery email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.`)
1077
- .action((0, parser_1.actionRunner)(exports.accountCreateRecovery));
1078
- exports.account
1079
- .command(`update-recovery`)
1080
- .description(`Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST /account/recovery](https://appwrite.io/docs/references/cloud/client-web/account#createRecovery) endpoint. Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.`)
1081
- .requiredOption(`--user-id <user-id>`, `User ID.`)
1082
- .requiredOption(`--secret <secret>`, `Valid reset token.`)
1083
- .requiredOption(`--password <password>`, `New user password. Must be between 8 and 256 chars.`)
1084
- .action((0, parser_1.actionRunner)(exports.accountUpdateRecovery));
1085
- exports.account
1086
- .command(`list-sessions`)
1087
- .description(`Get the list of active sessions across different devices for the currently logged in user.`)
1088
- .option(`--console`, `Get the resource console url`)
1089
- .action((0, parser_1.actionRunner)(exports.accountListSessions));
1090
- exports.account
1091
- .command(`delete-sessions`)
1092
- .description(`Delete all sessions from the user account and remove any sessions cookies from the end client.`)
1093
- .action((0, parser_1.actionRunner)(exports.accountDeleteSessions));
1094
- exports.account
1095
- .command(`create-anonymous-session`)
1096
- .description(`Use this endpoint to allow a new user to register an anonymous account in your project. This route will also create a new session for the user. To allow the new user to convert an anonymous account to a normal account, you need to update its [email and password](https://appwrite.io/docs/references/cloud/client-web/account#updateEmail) or create an [OAuth2 session](https://appwrite.io/docs/references/cloud/client-web/account#CreateOAuth2Session).`)
1097
- .action((0, parser_1.actionRunner)(exports.accountCreateAnonymousSession));
1098
- exports.account
1099
- .command(`create-email-password-session`)
1100
- .description(`Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user. A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).`)
1101
- .requiredOption(`--email <email>`, `User email.`)
1102
- .requiredOption(`--password <password>`, `User password. Must be at least 8 chars.`)
1103
- .action((0, parser_1.actionRunner)(exports.accountCreateEmailPasswordSession));
1104
- exports.account
1105
- .command(`update-magic-url-session`)
1106
- .description(`[**DEPRECATED** - This command is deprecated. Please use 'account create-session' instead] Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.`)
1107
- .requiredOption(`--user-id <user-id>`, `User ID. Choose a custom ID or generate a random ID with 'ID.unique()'. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`)
1108
- .requiredOption(`--secret <secret>`, `Valid verification token.`)
1109
- .action((0, parser_1.actionRunner)(exports.accountUpdateMagicURLSession));
1110
- exports.account
1111
- .command(`create-o-auth-2-session`)
1112
- .description(`Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed. If there is already an active session, the new session will be attached to the logged-in account. If there are no active sessions, the server will attempt to look for a user with the same email address as the email received from the OAuth2 provider and attach the new session to the existing user. If no matching user is found - the server will create a new user. A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits). `)
1113
- .requiredOption(`--provider <provider>`, `OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, github, gitlab, google, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoho, zoom.`)
1114
- .option(`--success <success>`, `URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.`)
1115
- .option(`--failure <failure>`, `URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.`)
1116
- .option(`--scopes [scopes...]`, `A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long.`)
1117
- .action((0, parser_1.actionRunner)(exports.accountCreateOAuth2Session));
1118
- exports.account
1119
- .command(`update-phone-session`)
1120
- .description(`[**DEPRECATED** - This command is deprecated. Please use 'account create-session' instead] Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.`)
1121
- .requiredOption(`--user-id <user-id>`, `User ID. Choose a custom ID or generate a random ID with 'ID.unique()'. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`)
1122
- .requiredOption(`--secret <secret>`, `Valid verification token.`)
1123
- .action((0, parser_1.actionRunner)(exports.accountUpdatePhoneSession));
1124
- exports.account
1125
- .command(`create-session`)
1126
- .description(`Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.`)
1127
- .requiredOption(`--user-id <user-id>`, `User ID. Choose a custom ID or generate a random ID with 'ID.unique()'. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`)
1128
- .requiredOption(`--secret <secret>`, `Secret of a token generated by login methods. For example, the 'createMagicURLToken' or 'createPhoneToken' methods.`)
1129
- .action((0, parser_1.actionRunner)(exports.accountCreateSession));
1130
- exports.account
1131
- .command(`get-session`)
1132
- .description(`Use this endpoint to get a logged in user's session using a Session ID. Inputting 'current' will return the current session being used.`)
1133
- .requiredOption(`--session-id <session-id>`, `Session ID. Use the string 'current' to get the current device session.`)
1134
- .action((0, parser_1.actionRunner)(exports.accountGetSession));
1135
- exports.account
1136
- .command(`update-session`)
1137
- .description(`Use this endpoint to extend a session's length. Extending a session is useful when session expiry is short. If the session was created using an OAuth provider, this endpoint refreshes the access token from the provider.`)
1138
- .requiredOption(`--session-id <session-id>`, `Session ID. Use the string 'current' to update the current device session.`)
1139
- .action((0, parser_1.actionRunner)(exports.accountUpdateSession));
1140
- exports.account
1141
- .command(`delete-session`)
1142
- .description(`Logout the user. Use 'current' as the session ID to logout on this device, use a session ID to logout on another device. If you're looking to logout the user on all devices, use [Delete Sessions](https://appwrite.io/docs/references/cloud/client-web/account#deleteSessions) instead.`)
1143
- .requiredOption(`--session-id <session-id>`, `Session ID. Use the string 'current' to delete the current device session.`)
1144
- .action((0, parser_1.actionRunner)(exports.accountDeleteSession));
1145
- exports.account
1146
- .command(`update-status`)
1147
- .description(`Block the currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. To completely delete a user, use the Users API instead.`)
1148
- .action((0, parser_1.actionRunner)(exports.accountUpdateStatus));
1149
- exports.account
1150
- .command(`create-push-target`)
1151
- .description(`Use this endpoint to register a device for push notifications. Provide a target ID (custom or generated using ID.unique()), a device identifier (usually a device token), and optionally specify which provider should send notifications to this target. The target is automatically linked to the current session and includes device information like brand and model.`)
1152
- .requiredOption(`--target-id <target-id>`, `Target ID. Choose a custom ID or generate a random ID with 'ID.unique()'. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`)
1153
- .requiredOption(`--identifier <identifier>`, `The target identifier (token, email, phone etc.)`)
1154
- .option(`--provider-id <provider-id>`, `Provider ID. Message will be sent to this target from the specified provider ID. If no provider ID is set the first setup provider will be used.`)
1155
- .action((0, parser_1.actionRunner)(exports.accountCreatePushTarget));
1156
- exports.account
1157
- .command(`update-push-target`)
1158
- .description(`Update the currently logged in user's push notification target. You can modify the target's identifier (device token) and provider ID (token, email, phone etc.). The target must exist and belong to the current user. If you change the provider ID, notifications will be sent through the new messaging provider instead.`)
1159
- .requiredOption(`--target-id <target-id>`, `Target ID.`)
1160
- .requiredOption(`--identifier <identifier>`, `The target identifier (token, email, phone etc.)`)
1161
- .action((0, parser_1.actionRunner)(exports.accountUpdatePushTarget));
1162
- exports.account
1163
- .command(`delete-push-target`)
1164
- .description(`Delete a push notification target for the currently logged in user. After deletion, the device will no longer receive push notifications. The target must exist and belong to the current user.`)
1165
- .requiredOption(`--target-id <target-id>`, `Target ID.`)
1166
- .action((0, parser_1.actionRunner)(exports.accountDeletePushTarget));
1167
- exports.account
1168
- .command(`create-email-token`)
1169
- .description(`Sends the user an email with a secret key for creating a session. If the email address has never been used, a **new account is created** using the provided 'userId'. Otherwise, if the email address is already attached to an account, the **user ID is ignored**. Then, the user will receive an email with the one-time password. Use the returned user ID and secret and submit a request to the [POST /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes. A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits). `)
1170
- .requiredOption(`--user-id <user-id>`, `User ID. Choose a custom ID or generate a random ID with 'ID.unique()'. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.`)
1171
- .requiredOption(`--email <email>`, `User email.`)
1172
- .option(`--phrase [value]`, `Toggle for security phrase. If enabled, email will be send with a randomly generated phrase and the phrase will also be included in the response. Confirming phrases match increases the security of your authentication flow.`, (value) => value === undefined ? true : (0, parser_1.parseBool)(value))
1173
- .action((0, parser_1.actionRunner)(exports.accountCreateEmailToken));
1174
- exports.account
1175
- .command(`create-magic-url-token`)
1176
- .description(`Sends the user an email with a secret key for creating a session. If the provided user ID has not been registered, a new user will be created. When the user clicks the link in the email, the user is redirected back to the URL you provided with the secret key and userId values attached to the URL query string. Use the query string parameters to submit a request to the [POST /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour. A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits). `)
1177
- .requiredOption(`--user-id <user-id>`, `Unique Id. Choose a custom ID or generate a random ID with 'ID.unique()'. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.`)
1178
- .requiredOption(`--email <email>`, `User email.`)
1179
- .option(`--url <url>`, `URL to redirect the user back to your app from the magic URL login. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.`)
1180
- .option(`--phrase [value]`, `Toggle for security phrase. If enabled, email will be send with a randomly generated phrase and the phrase will also be included in the response. Confirming phrases match increases the security of your authentication flow.`, (value) => value === undefined ? true : (0, parser_1.parseBool)(value))
1181
- .action((0, parser_1.actionRunner)(exports.accountCreateMagicURLToken));
1182
- exports.account
1183
- .command(`create-o-auth-2-token`)
1184
- .description(`Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed. If authentication succeeds, 'userId' and 'secret' of a token will be appended to the success URL as query parameters. These can be used to create a new session using the [Create session](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint. A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).`)
1185
- .requiredOption(`--provider <provider>`, `OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, github, gitlab, google, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoho, zoom.`)
1186
- .option(`--success <success>`, `URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.`)
1187
- .option(`--failure <failure>`, `URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.`)
1188
- .option(`--scopes [scopes...]`, `A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long.`)
1189
- .action((0, parser_1.actionRunner)(exports.accountCreateOAuth2Token));
1190
- exports.account
1191
- .command(`create-phone-token`)
1192
- .description(`Sends the user an SMS with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes. A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).`)
1193
- .requiredOption(`--user-id <user-id>`, `Unique Id. Choose a custom ID or generate a random ID with 'ID.unique()'. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the phone number has never been used, a new account is created using the provided userId. Otherwise, if the phone number is already attached to an account, the user ID is ignored.`)
1194
- .requiredOption(`--phone <phone>`, `Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.`)
1195
- .action((0, parser_1.actionRunner)(exports.accountCreatePhoneToken));
1196
- exports.account
1197
- .command(`create-email-verification`)
1198
- .description(`Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](https://appwrite.io/docs/references/cloud/client-web/account#updateVerification). The verification link sent to the user's email address is valid for 7 days. Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface. `)
1199
- .requiredOption(`--url <url>`, `URL to redirect the user back to your app from the verification email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.`)
1200
- .action((0, parser_1.actionRunner)(exports.accountCreateEmailVerification));
1201
- exports.account
1202
- .command(`create-verification`)
1203
- .description(`[**DEPRECATED** - This command is deprecated. Please use 'account create-email-verification' instead] Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](https://appwrite.io/docs/references/cloud/client-web/account#updateVerification). The verification link sent to the user's email address is valid for 7 days. Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface. `)
1204
- .requiredOption(`--url <url>`, `URL to redirect the user back to your app from the verification email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.`)
1205
- .action((0, parser_1.actionRunner)(exports.accountCreateVerification));
1206
- exports.account
1207
- .command(`update-email-verification`)
1208
- .description(`Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.`)
1209
- .requiredOption(`--user-id <user-id>`, `User ID.`)
1210
- .requiredOption(`--secret <secret>`, `Valid verification token.`)
1211
- .action((0, parser_1.actionRunner)(exports.accountUpdateEmailVerification));
1212
- exports.account
1213
- .command(`update-verification`)
1214
- .description(`[**DEPRECATED** - This command is deprecated. Please use 'account update-email-verification' instead] Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.`)
1215
- .requiredOption(`--user-id <user-id>`, `User ID.`)
1216
- .requiredOption(`--secret <secret>`, `Valid verification token.`)
1217
- .action((0, parser_1.actionRunner)(exports.accountUpdateVerification));
1218
- exports.account
1219
- .command(`create-phone-verification`)
1220
- .description(`Use this endpoint to send a verification SMS to the currently logged in user. This endpoint is meant for use after updating a user's phone number using the [accountUpdatePhone](https://appwrite.io/docs/references/cloud/client-web/account#updatePhone) endpoint. Learn more about how to [complete the verification process](https://appwrite.io/docs/references/cloud/client-web/account#updatePhoneVerification). The verification code sent to the user's phone number is valid for 15 minutes.`)
1221
- .action((0, parser_1.actionRunner)(exports.accountCreatePhoneVerification));
1222
- exports.account
1223
- .command(`update-phone-verification`)
1224
- .description(`Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number to verify the user email ownership. If confirmed this route will return a 200 status code.`)
1225
- .requiredOption(`--user-id <user-id>`, `User ID.`)
1226
- .requiredOption(`--secret <secret>`, `Valid verification token.`)
1227
- .action((0, parser_1.actionRunner)(exports.accountUpdatePhoneVerification));
1228
- //# sourceMappingURL=account.js.map