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