@seliseblocks/cli-os 0.1.3 → 0.1.5

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 (391) hide show
  1. package/AI_USAGE_GUIDE.md +328 -58
  2. package/README.md +83 -46
  3. package/dist/commands/auth/client-credentials/delete.d.ts +1 -0
  4. package/dist/commands/auth/client-credentials/delete.js +23 -0
  5. package/dist/commands/auth/client-credentials/list.d.ts +1 -0
  6. package/dist/commands/auth/client-credentials/list.js +14 -0
  7. package/dist/commands/auth/client-credentials/save.d.ts +1 -0
  8. package/dist/commands/auth/client-credentials/save.js +41 -0
  9. package/dist/commands/auth/config/get.d.ts +1 -0
  10. package/dist/commands/auth/config/get.js +14 -0
  11. package/dist/commands/auth/config/save.d.ts +1 -0
  12. package/dist/commands/auth/config/save.js +37 -0
  13. package/dist/commands/auth/idp/create.d.ts +1 -0
  14. package/dist/commands/auth/idp/create.js +46 -0
  15. package/dist/commands/auth/idp/delete.d.ts +1 -0
  16. package/dist/commands/auth/idp/delete.js +23 -0
  17. package/dist/commands/auth/idp/get.d.ts +1 -0
  18. package/dist/commands/auth/idp/get.js +16 -0
  19. package/dist/commands/auth/idp/list.d.ts +1 -0
  20. package/dist/commands/auth/idp/list.js +14 -0
  21. package/dist/commands/auth/idp/status.d.ts +1 -0
  22. package/dist/commands/auth/idp/status.js +27 -0
  23. package/dist/commands/auth/idp/update.d.ts +7 -0
  24. package/dist/commands/auth/idp/update.js +45 -0
  25. package/dist/commands/auth/oidc-clients/delete.d.ts +1 -0
  26. package/dist/commands/auth/oidc-clients/delete.js +23 -0
  27. package/dist/commands/auth/oidc-clients/get.d.ts +1 -0
  28. package/dist/commands/auth/oidc-clients/get.js +16 -0
  29. package/dist/commands/auth/oidc-clients/list.d.ts +1 -0
  30. package/dist/commands/auth/oidc-clients/list.js +14 -0
  31. package/dist/commands/auth/oidc-clients/rotate-secret.d.ts +1 -0
  32. package/dist/commands/auth/oidc-clients/rotate-secret.js +23 -0
  33. package/dist/commands/auth/oidc-clients/save.d.ts +2 -0
  34. package/dist/commands/auth/oidc-clients/save.js +57 -0
  35. package/dist/commands/auth/refresh.js +1 -1
  36. package/dist/commands/data/config/create.d.ts +1 -0
  37. package/dist/commands/data/config/create.js +38 -0
  38. package/dist/commands/data/config/get.d.ts +1 -0
  39. package/dist/commands/data/config/get.js +14 -0
  40. package/dist/commands/data/config/update.d.ts +1 -0
  41. package/dist/commands/data/config/update.js +41 -0
  42. package/dist/commands/data/files/create-folder.d.ts +1 -0
  43. package/dist/commands/data/files/create-folder.js +34 -0
  44. package/dist/commands/data/files/delete-folder.d.ts +1 -0
  45. package/dist/commands/data/files/delete-folder.js +25 -0
  46. package/dist/commands/data/files/delete.d.ts +1 -0
  47. package/dist/commands/data/files/delete.js +28 -0
  48. package/dist/commands/data/files/dms-list.d.ts +1 -0
  49. package/dist/commands/data/files/dms-list.js +27 -0
  50. package/dist/commands/data/files/dms-upload.d.ts +6 -0
  51. package/dist/commands/data/files/dms-upload.js +41 -0
  52. package/dist/commands/data/files/get-many.d.ts +1 -0
  53. package/dist/commands/data/files/get-many.js +24 -0
  54. package/dist/commands/data/files/get.d.ts +1 -0
  55. package/dist/commands/data/files/get.js +21 -0
  56. package/dist/commands/data/files/info.d.ts +1 -0
  57. package/dist/commands/data/files/info.js +30 -0
  58. package/dist/commands/data/files/presigned-upload-url.d.ts +6 -0
  59. package/dist/commands/data/files/presigned-upload-url.js +34 -0
  60. package/dist/commands/data/files/update-additional-info.d.ts +1 -0
  61. package/dist/commands/data/files/update-additional-info.js +26 -0
  62. package/dist/commands/data/files/upload-to-local-storage.d.ts +5 -0
  63. package/dist/commands/data/files/upload-to-local-storage.js +55 -0
  64. package/dist/commands/data/files/upload-to-url.d.ts +8 -0
  65. package/dist/commands/data/files/upload-to-url.js +36 -0
  66. package/dist/commands/data/files/upload.d.ts +7 -0
  67. package/dist/commands/data/files/upload.js +145 -0
  68. package/dist/commands/data/rules/policy/delete.d.ts +1 -0
  69. package/dist/commands/data/rules/policy/delete.js +24 -0
  70. package/dist/commands/data/rules/policy/get.d.ts +1 -0
  71. package/dist/commands/data/rules/policy/get.js +17 -0
  72. package/dist/commands/data/schema/aggregation.d.ts +1 -0
  73. package/dist/commands/data/schema/aggregation.js +26 -0
  74. package/dist/commands/data/schema/change-logs.d.ts +1 -0
  75. package/dist/commands/data/schema/change-logs.js +14 -0
  76. package/dist/commands/data/schema/delete.d.ts +1 -0
  77. package/dist/commands/data/schema/delete.js +24 -0
  78. package/dist/commands/data/schema/fields.d.ts +5 -0
  79. package/dist/commands/data/schema/fields.js +39 -0
  80. package/dist/commands/data/schema/get-by-name.d.ts +1 -0
  81. package/dist/commands/data/schema/get-by-name.js +17 -0
  82. package/dist/commands/data/schema/get.d.ts +1 -0
  83. package/dist/commands/data/schema/get.js +17 -0
  84. package/dist/commands/data/schema/info/list.d.ts +1 -0
  85. package/dist/commands/data/schema/info/list.js +15 -0
  86. package/dist/commands/data/schema/info/save.d.ts +1 -0
  87. package/dist/commands/data/schema/info/save.js +34 -0
  88. package/dist/commands/data/schema/info/update.d.ts +1 -0
  89. package/dist/commands/data/schema/info/update.js +35 -0
  90. package/dist/commands/data/sync.d.ts +7 -0
  91. package/dist/commands/data/sync.js +46 -0
  92. package/dist/commands/data/validation/by-schema-field.d.ts +1 -0
  93. package/dist/commands/data/validation/by-schema-field.js +18 -0
  94. package/dist/commands/data/validation/by-schema.d.ts +1 -0
  95. package/dist/commands/data/validation/by-schema.js +17 -0
  96. package/dist/commands/data/validation/delete.d.ts +1 -0
  97. package/dist/commands/data/validation/delete.js +24 -0
  98. package/dist/commands/data/validation/get.d.ts +1 -0
  99. package/dist/commands/data/validation/get.js +17 -0
  100. package/dist/commands/data/validation/list.d.ts +1 -0
  101. package/dist/commands/data/validation/list.js +25 -0
  102. package/dist/commands/data/validation/save.d.ts +6 -0
  103. package/dist/commands/data/validation/save.js +44 -0
  104. package/dist/commands/deselect.d.ts +1 -0
  105. package/dist/commands/deselect.js +31 -0
  106. package/dist/commands/iam/email/available.d.ts +1 -0
  107. package/dist/commands/iam/email/available.js +17 -0
  108. package/dist/commands/iam/organizations/config-get.d.ts +1 -0
  109. package/dist/commands/iam/organizations/config-get.js +14 -0
  110. package/dist/commands/iam/organizations/config-save.d.ts +1 -0
  111. package/dist/commands/iam/organizations/config-save.js +34 -0
  112. package/dist/commands/iam/organizations/create.d.ts +1 -0
  113. package/dist/commands/iam/organizations/create.js +37 -0
  114. package/dist/commands/iam/organizations/get.d.ts +1 -0
  115. package/dist/commands/iam/organizations/get.js +16 -0
  116. package/dist/commands/iam/organizations/list.d.ts +1 -0
  117. package/dist/commands/iam/organizations/list.js +26 -0
  118. package/dist/commands/iam/organizations/my.d.ts +1 -0
  119. package/dist/commands/iam/organizations/my.js +14 -0
  120. package/dist/commands/iam/organizations/update.d.ts +1 -0
  121. package/dist/commands/iam/organizations/update.js +39 -0
  122. package/dist/commands/iam/permissions/by-severity.d.ts +1 -0
  123. package/dist/commands/iam/permissions/by-severity.js +14 -0
  124. package/dist/commands/iam/permissions/create.d.ts +1 -0
  125. package/dist/commands/iam/permissions/create.js +39 -0
  126. package/dist/commands/iam/permissions/get.d.ts +1 -0
  127. package/dist/commands/iam/permissions/get.js +16 -0
  128. package/dist/commands/iam/permissions/list.d.ts +1 -0
  129. package/dist/commands/iam/permissions/list.js +41 -0
  130. package/dist/commands/iam/permissions/update.d.ts +1 -0
  131. package/dist/commands/iam/permissions/update.js +40 -0
  132. package/dist/commands/iam/resources/features.d.ts +1 -0
  133. package/dist/commands/iam/resources/features.js +19 -0
  134. package/dist/commands/iam/resources/groups.d.ts +1 -0
  135. package/dist/commands/iam/resources/groups.js +14 -0
  136. package/dist/commands/iam/roles/assign-permissions.d.ts +1 -0
  137. package/dist/commands/iam/roles/assign-permissions.js +33 -0
  138. package/dist/commands/iam/roles/assignable.d.ts +1 -0
  139. package/dist/commands/iam/roles/assignable.js +14 -0
  140. package/dist/commands/iam/roles/create.d.ts +1 -0
  141. package/dist/commands/iam/roles/create.js +35 -0
  142. package/dist/commands/iam/roles/get.d.ts +1 -0
  143. package/dist/commands/iam/roles/get.js +16 -0
  144. package/dist/commands/iam/roles/list.d.ts +1 -0
  145. package/dist/commands/iam/roles/list.js +34 -0
  146. package/dist/commands/iam/roles/update.d.ts +1 -0
  147. package/dist/commands/iam/roles/update.js +35 -0
  148. package/dist/commands/iam/signup-settings/get.d.ts +1 -0
  149. package/dist/commands/iam/signup-settings/get.js +14 -0
  150. package/dist/commands/iam/signup-settings/save.d.ts +1 -0
  151. package/dist/commands/iam/signup-settings/save.js +32 -0
  152. package/dist/commands/iam/users/access-grant.d.ts +1 -0
  153. package/dist/commands/iam/users/access-grant.js +32 -0
  154. package/dist/commands/iam/users/access-revoke.d.ts +1 -0
  155. package/dist/commands/iam/users/access-revoke.js +24 -0
  156. package/dist/commands/iam/users/activate.d.ts +1 -0
  157. package/dist/commands/iam/users/activate.js +24 -0
  158. package/dist/commands/iam/users/create.d.ts +1 -0
  159. package/dist/commands/iam/users/create.js +39 -0
  160. package/dist/commands/iam/users/deactivate.d.ts +1 -0
  161. package/dist/commands/iam/users/deactivate.js +24 -0
  162. package/dist/commands/iam/users/exists.d.ts +1 -0
  163. package/dist/commands/iam/users/exists.js +17 -0
  164. package/dist/commands/iam/users/get.d.ts +1 -0
  165. package/dist/commands/iam/users/get.js +17 -0
  166. package/dist/commands/iam/users/list.d.ts +1 -0
  167. package/dist/commands/iam/users/list.js +34 -0
  168. package/dist/commands/iam/users/update.d.ts +1 -0
  169. package/dist/commands/iam/users/update.js +35 -0
  170. package/dist/commands/init.js +0 -12
  171. package/dist/commands/localization/assistant/translation-suggestion.d.ts +1 -0
  172. package/dist/commands/localization/assistant/translation-suggestion.js +35 -0
  173. package/dist/commands/localization/config/get-webhook.d.ts +1 -0
  174. package/dist/commands/localization/config/get-webhook.js +14 -0
  175. package/dist/commands/localization/config/save-webhook.d.ts +1 -0
  176. package/dist/commands/localization/config/save-webhook.js +47 -0
  177. package/dist/commands/localization/glossary/delete.d.ts +1 -0
  178. package/dist/commands/localization/glossary/delete.js +24 -0
  179. package/dist/commands/localization/glossary/get.d.ts +1 -0
  180. package/dist/commands/localization/glossary/get.js +17 -0
  181. package/dist/commands/localization/glossary/list.d.ts +1 -0
  182. package/dist/commands/localization/glossary/list.js +22 -0
  183. package/dist/commands/localization/glossary/save.d.ts +1 -0
  184. package/dist/commands/localization/glossary/save.js +38 -0
  185. package/dist/commands/localization/glossary/suggested.d.ts +1 -0
  186. package/dist/commands/localization/glossary/suggested.js +20 -0
  187. package/dist/commands/localization/key/delete-keys.d.ts +1 -0
  188. package/dist/commands/localization/key/delete-keys.js +28 -0
  189. package/dist/commands/localization/key/delete.d.ts +1 -0
  190. package/dist/commands/localization/key/delete.js +24 -0
  191. package/dist/commands/localization/key/generate-uilm-file.d.ts +1 -0
  192. package/dist/commands/localization/key/generate-uilm-file.js +29 -0
  193. package/dist/commands/localization/key/get-by-names.d.ts +1 -0
  194. package/dist/commands/localization/key/get-by-names.js +24 -0
  195. package/dist/commands/localization/key/get-language-file-generation-history.d.ts +1 -0
  196. package/dist/commands/localization/key/get-language-file-generation-history.js +19 -0
  197. package/dist/commands/localization/key/get-localization-timeline.d.ts +1 -0
  198. package/dist/commands/localization/key/get-localization-timeline.js +28 -0
  199. package/dist/commands/localization/key/get-timeline-by-operation-id.d.ts +1 -0
  200. package/dist/commands/localization/key/get-timeline-by-operation-id.js +21 -0
  201. package/dist/commands/localization/key/get-timeline.d.ts +1 -0
  202. package/dist/commands/localization/key/get-timeline.js +25 -0
  203. package/dist/commands/localization/key/get-uilm-exported-files.d.ts +1 -0
  204. package/dist/commands/localization/key/get-uilm-exported-files.js +22 -0
  205. package/dist/commands/localization/key/get-uilm-file.d.ts +1 -0
  206. package/dist/commands/localization/key/get-uilm-file.js +18 -0
  207. package/dist/commands/localization/key/get.d.ts +1 -0
  208. package/dist/commands/localization/key/get.js +17 -0
  209. package/dist/commands/localization/key/list.d.ts +1 -0
  210. package/dist/commands/localization/key/list.js +39 -0
  211. package/dist/commands/localization/key/rollback.d.ts +1 -0
  212. package/dist/commands/localization/key/rollback.js +24 -0
  213. package/dist/commands/localization/key/save.d.ts +1 -0
  214. package/dist/commands/localization/key/save.js +44 -0
  215. package/dist/commands/localization/key/translate-all.d.ts +1 -0
  216. package/dist/commands/localization/key/translate-all.js +30 -0
  217. package/dist/commands/localization/key/translate-and-export.d.ts +7 -0
  218. package/dist/commands/localization/key/translate-and-export.js +132 -0
  219. package/dist/commands/localization/key/translate-key.d.ts +1 -0
  220. package/dist/commands/localization/key/translate-key.js +27 -0
  221. package/dist/commands/localization/key/translate-keys.d.ts +1 -0
  222. package/dist/commands/localization/key/translate-keys.js +31 -0
  223. package/dist/commands/localization/key/uilm-export.d.ts +1 -0
  224. package/dist/commands/localization/key/uilm-export.js +33 -0
  225. package/dist/commands/localization/key/uilm-import.d.ts +1 -0
  226. package/dist/commands/localization/key/uilm-import.js +26 -0
  227. package/dist/commands/localization/language/delete.d.ts +1 -0
  228. package/dist/commands/localization/language/delete.js +24 -0
  229. package/dist/commands/localization/language/list-for-tenant.d.ts +1 -0
  230. package/dist/commands/localization/language/list-for-tenant.js +14 -0
  231. package/dist/commands/localization/language/list.d.ts +1 -0
  232. package/dist/commands/localization/language/list.js +14 -0
  233. package/dist/commands/localization/language/save.d.ts +1 -0
  234. package/dist/commands/localization/language/save.js +36 -0
  235. package/dist/commands/localization/language/set-default.d.ts +1 -0
  236. package/dist/commands/localization/language/set-default.js +24 -0
  237. package/dist/commands/localization/module/list-for-tenant.d.ts +1 -0
  238. package/dist/commands/localization/module/list-for-tenant.js +14 -0
  239. package/dist/commands/localization/module/list.d.ts +1 -0
  240. package/dist/commands/localization/module/list.js +14 -0
  241. package/dist/commands/localization/module/save.d.ts +1 -0
  242. package/dist/commands/localization/module/save.js +32 -0
  243. package/dist/commands/localization/module/tag-glossary.d.ts +1 -0
  244. package/dist/commands/localization/module/tag-glossary.js +28 -0
  245. package/dist/commands/mail/config/delete.d.ts +1 -0
  246. package/dist/commands/mail/config/delete.js +24 -0
  247. package/dist/commands/mail/config/duplicate.d.ts +1 -0
  248. package/dist/commands/mail/config/duplicate.js +24 -0
  249. package/dist/commands/mail/config/get.d.ts +1 -0
  250. package/dist/commands/mail/config/get.js +17 -0
  251. package/dist/commands/mail/config/list.d.ts +1 -0
  252. package/dist/commands/mail/config/list.js +14 -0
  253. package/dist/commands/mail/config/save.d.ts +1 -0
  254. package/dist/commands/mail/config/save.js +44 -0
  255. package/dist/commands/mail/mailbox/get.d.ts +1 -0
  256. package/dist/commands/mail/mailbox/get.js +17 -0
  257. package/dist/commands/mail/mailbox/list.d.ts +1 -0
  258. package/dist/commands/mail/mailbox/list.js +24 -0
  259. package/dist/commands/mail/send.d.ts +1 -0
  260. package/dist/commands/mail/send.js +40 -0
  261. package/dist/commands/mail/sendtoany.d.ts +1 -0
  262. package/dist/commands/mail/sendtoany.js +41 -0
  263. package/dist/commands/mail/template/clone.d.ts +1 -0
  264. package/dist/commands/mail/template/clone.js +33 -0
  265. package/dist/commands/mail/template/delete.d.ts +1 -0
  266. package/dist/commands/mail/template/delete.js +24 -0
  267. package/dist/commands/mail/template/get.d.ts +1 -0
  268. package/dist/commands/mail/template/get.js +17 -0
  269. package/dist/commands/mail/template/list.d.ts +1 -0
  270. package/dist/commands/mail/template/list.js +24 -0
  271. package/dist/commands/mail/template/save.d.ts +1 -0
  272. package/dist/commands/mail/template/save.js +37 -0
  273. package/dist/commands/mfa/backup-codes/generate.d.ts +1 -0
  274. package/dist/commands/mfa/backup-codes/generate.js +22 -0
  275. package/dist/commands/mfa/backup-codes/list.d.ts +1 -0
  276. package/dist/commands/mfa/backup-codes/list.js +14 -0
  277. package/dist/commands/mfa/backup-codes/use.d.ts +1 -0
  278. package/dist/commands/mfa/backup-codes/use.js +18 -0
  279. package/dist/commands/mfa/config-get.d.ts +1 -0
  280. package/dist/commands/mfa/config-get.js +14 -0
  281. package/dist/commands/mfa/config-save.d.ts +1 -0
  282. package/dist/commands/mfa/config-save.js +36 -0
  283. package/dist/commands/mfa/disable.d.ts +1 -0
  284. package/dist/commands/mfa/disable.js +22 -0
  285. package/dist/commands/mfa/generate.d.ts +1 -0
  286. package/dist/commands/mfa/generate.js +22 -0
  287. package/dist/commands/mfa/method-set.d.ts +1 -0
  288. package/dist/commands/mfa/method-set.js +20 -0
  289. package/dist/commands/mfa/resend.d.ts +1 -0
  290. package/dist/commands/mfa/resend.js +20 -0
  291. package/dist/commands/mfa/totp-enable.d.ts +10 -0
  292. package/dist/commands/mfa/totp-enable.js +52 -0
  293. package/dist/commands/mfa/totp-setup.d.ts +1 -0
  294. package/dist/commands/mfa/totp-setup.js +15 -0
  295. package/dist/commands/mfa/totp-verify-setup.d.ts +1 -0
  296. package/dist/commands/mfa/totp-verify-setup.js +17 -0
  297. package/dist/commands/mfa/verify.d.ts +1 -0
  298. package/dist/commands/mfa/verify.js +26 -0
  299. package/dist/commands/new/web.js +115 -15
  300. package/dist/commands/notification/delete.d.ts +1 -0
  301. package/dist/commands/notification/delete.js +24 -0
  302. package/dist/commands/notification/get.d.ts +1 -0
  303. package/dist/commands/notification/get.js +17 -0
  304. package/dist/commands/notification/list.d.ts +1 -0
  305. package/dist/commands/notification/list.js +22 -0
  306. package/dist/commands/notification/save.d.ts +1 -0
  307. package/dist/commands/notification/save.js +34 -0
  308. package/dist/commands/notifier/list.d.ts +1 -0
  309. package/dist/commands/notifier/list.js +23 -0
  310. package/dist/commands/notifier/mark-all-read.d.ts +1 -0
  311. package/dist/commands/notifier/mark-all-read.js +23 -0
  312. package/dist/commands/notifier/mark-read.d.ts +1 -0
  313. package/dist/commands/notifier/mark-read.js +24 -0
  314. package/dist/commands/notifier/notify.d.ts +1 -0
  315. package/dist/commands/notifier/notify.js +39 -0
  316. package/dist/commands/notifier/unread.d.ts +1 -0
  317. package/dist/commands/notifier/unread.js +25 -0
  318. package/dist/commands/projects/get.js +16 -14
  319. package/dist/commands/projects/list.js +2 -7
  320. package/dist/commands/release/builds/list.js +22 -2
  321. package/dist/commands/release/deploy.js +122 -29
  322. package/dist/commands/release/status.js +4 -2
  323. package/dist/commands/sdk/client.d.ts +1 -0
  324. package/dist/commands/sdk/client.js +99 -0
  325. package/dist/commands/secrets/get.d.ts +1 -0
  326. package/dist/commands/secrets/get.js +21 -0
  327. package/dist/commands/secrets/save.d.ts +1 -0
  328. package/dist/commands/secrets/save.js +51 -0
  329. package/dist/commands/skill/add.d.ts +1 -0
  330. package/dist/commands/skill/add.js +19 -0
  331. package/dist/commands/skill/list.d.ts +1 -0
  332. package/dist/commands/skill/list.js +15 -0
  333. package/dist/commands/skill/show.d.ts +1 -0
  334. package/dist/commands/skill/show.js +15 -0
  335. package/dist/commands/storage/config/delete.d.ts +1 -0
  336. package/dist/commands/storage/config/delete.js +24 -0
  337. package/dist/commands/storage/config/get.d.ts +1 -0
  338. package/dist/commands/storage/config/get.js +17 -0
  339. package/dist/commands/storage/config/list.d.ts +1 -0
  340. package/dist/commands/storage/config/list.js +14 -0
  341. package/dist/commands/storage/config/save.d.ts +1 -0
  342. package/dist/commands/storage/config/save.js +49 -0
  343. package/dist/index.js +959 -143
  344. package/dist/lib/api.d.ts +1 -1
  345. package/dist/lib/api.js +39 -21
  346. package/dist/lib/args.d.ts +3 -0
  347. package/dist/lib/args.js +15 -0
  348. package/dist/lib/auth.d.ts +5 -2
  349. package/dist/lib/auth.js +23 -35
  350. package/dist/lib/config.js +7 -7
  351. package/dist/lib/json-flag.d.ts +17 -0
  352. package/dist/lib/json-flag.js +55 -0
  353. package/dist/lib/project-info.d.ts +33 -0
  354. package/dist/lib/project-info.js +39 -0
  355. package/dist/lib/prompt.d.ts +2 -0
  356. package/dist/lib/prompt.js +28 -0
  357. package/dist/lib/scaffold-web/dashboard.js +1 -1
  358. package/dist/lib/scaffold-web/root-files.js +1 -1
  359. package/dist/lib/secret-store.js +7 -7
  360. package/dist/lib/skills.d.ts +17 -0
  361. package/dist/lib/skills.js +69 -0
  362. package/dist/lib/token.d.ts +2 -0
  363. package/dist/lib/token.js +12 -0
  364. package/dist/lib/workspace.d.ts +1 -4
  365. package/dist/lib/workspace.js +18 -2
  366. package/dist/skills/blocks-data-gateway-configuration/SKILL.md +204 -0
  367. package/dist/skills/blocks-data-gateway-crud/SKILL.md +223 -0
  368. package/dist/skills/blocks-data-storage/SKILL.md +161 -0
  369. package/dist/skills/blocks-frontend-local-https/SKILL.md +100 -0
  370. package/dist/skills/blocks-iam-access-control/SKILL.md +49 -0
  371. package/dist/skills/blocks-iam-access-control/flows/feature-gating.md +38 -0
  372. package/dist/skills/blocks-iam-access-control/flows/manage-roles-permissions.md +109 -0
  373. package/dist/skills/blocks-iam-account/SKILL.md +169 -0
  374. package/dist/skills/blocks-iam-mfa/SKILL.md +124 -0
  375. package/dist/skills/blocks-iam-organizations/SKILL.md +43 -0
  376. package/dist/skills/blocks-iam-organizations/flows/admin-mutations.md +89 -0
  377. package/dist/skills/blocks-iam-organizations/flows/read-and-switch.md +57 -0
  378. package/dist/skills/blocks-iam-sso-oidc-configuration/SKILL.md +89 -0
  379. package/dist/skills/blocks-iam-sso-oidc-implementation/SKILL.md +80 -0
  380. package/dist/skills/blocks-iam-users/SKILL.md +131 -0
  381. package/dist/skills/blocks-localization-configuration/SKILL.md +149 -0
  382. package/dist/skills/blocks-localization-implementation/SKILL.md +63 -0
  383. package/dist/skills/blocks-mail/SKILL.md +95 -0
  384. package/dist/skills/blocks-notification/SKILL.md +69 -0
  385. package/dist/skills/blocks-notifier/SKILL.md +107 -0
  386. package/dist/skills/blocks-onboarding/SKILL.md +78 -0
  387. package/dist/skills/blocks-release-deployment/SKILL.md +81 -0
  388. package/dist/skills/blocks-secrets/SKILL.md +81 -0
  389. package/dist/skills/blocks-storage-configuration/SKILL.md +93 -0
  390. package/dist/skills/lint.mjs +168 -0
  391. package/package.json +4 -4
@@ -0,0 +1,20 @@
1
+ import { integerFlag } from "../../lib/args.js";
2
+ import { blocksRequest } from "../../lib/api.js";
3
+ import { writeOutput } from "../../lib/output.js";
4
+ import { requestContext } from "../../lib/request-context.js";
5
+ import { parseCommand, selectedProject } from "../../lib/workspace.js";
6
+ export async function mfaMethodSet(argv) {
7
+ const { args, flags } = parseCommand(argv);
8
+ const mfaType = integerFlag(flags, "mfa-type", NaN) || Number(args[0]);
9
+ if (!Number.isInteger(mfaType))
10
+ throw new Error("Provide --mfa-type <n> (or a positional integer).");
11
+ const projectKey = await selectedProject(flags);
12
+ const result = await blocksRequest("/iam/v4/mfa/method", {
13
+ body: { mfaType },
14
+ impersonatedProjectAuth: true,
15
+ method: "PUT",
16
+ ...requestContext(flags),
17
+ projectTenantId: projectKey
18
+ });
19
+ writeOutput(result, flags);
20
+ }
@@ -0,0 +1 @@
1
+ export declare function mfaResend(argv: string[]): Promise<void>;
@@ -0,0 +1,20 @@
1
+ import { stringFlag } from "../../lib/args.js";
2
+ import { blocksRequest } from "../../lib/api.js";
3
+ import { writeOutput } from "../../lib/output.js";
4
+ import { requestContext } from "../../lib/request-context.js";
5
+ import { parseCommand, selectedProject } from "../../lib/workspace.js";
6
+ export async function mfaResend(argv) {
7
+ const { args, flags } = parseCommand(argv);
8
+ const mfaId = args[0] || stringFlag(flags, "mfa-id", { required: true });
9
+ const projectKey = await selectedProject(flags);
10
+ const result = await blocksRequest("/iam/v4/mfa/resend", {
11
+ body: {
12
+ mfaId,
13
+ sendPhoneNumberAsEmailDomain: stringFlag(flags, "send-phone-number-as-email-domain") || undefined
14
+ },
15
+ impersonatedProjectAuth: true,
16
+ ...requestContext(flags),
17
+ projectTenantId: projectKey
18
+ });
19
+ writeOutput(result, flags);
20
+ }
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Composed TOTP enrollment: setup -> (scan QR, enter code) -> verify -> switch the active
3
+ * method to TOTP -> generate backup codes. This is one real enrollment sitting, not four
4
+ * independent tasks -- nobody enables TOTP setup and comes back next week to verify it.
5
+ *
6
+ * --mfa-type is still required, not defaulted: the numeric MFA-method value that means
7
+ * "TOTP" for a given tenant isn't documented anywhere in this CLI (mfa:method:set/mfa:generate
8
+ * take the same raw, tenant-defined integer), so it's not safe to guess one here.
9
+ */
10
+ export declare function mfaTotpEnable(argv: string[]): Promise<void>;
@@ -0,0 +1,52 @@
1
+ import { booleanFlag, integerFlag, stringFlag } from "../../lib/args.js";
2
+ import { confirmMutation } from "../../lib/confirm.js";
3
+ import { writeOutput } from "../../lib/output.js";
4
+ import { promptText } from "../../lib/prompt.js";
5
+ import { parseCommand } from "../../lib/workspace.js";
6
+ import { mfaBackupCodesGenerate } from "./backup-codes/generate.js";
7
+ import { mfaMethodSet } from "./method-set.js";
8
+ import { mfaTotpSetup } from "./totp-setup.js";
9
+ import { mfaTotpVerifySetup } from "./totp-verify-setup.js";
10
+ /**
11
+ * Composed TOTP enrollment: setup -> (scan QR, enter code) -> verify -> switch the active
12
+ * method to TOTP -> generate backup codes. This is one real enrollment sitting, not four
13
+ * independent tasks -- nobody enables TOTP setup and comes back next week to verify it.
14
+ *
15
+ * --mfa-type is still required, not defaulted: the numeric MFA-method value that means
16
+ * "TOTP" for a given tenant isn't documented anywhere in this CLI (mfa:method:set/mfa:generate
17
+ * take the same raw, tenant-defined integer), so it's not safe to guess one here.
18
+ */
19
+ export async function mfaTotpEnable(argv) {
20
+ const { flags } = parseCommand(argv);
21
+ const mfaType = integerFlag(flags, "mfa-type", NaN);
22
+ if (!Number.isInteger(mfaType)) {
23
+ throw new Error("Provide --mfa-type <n> -- the numeric MFA method value your tenant uses for TOTP (the same value 'mfa:method:set' expects).");
24
+ }
25
+ if (booleanFlag(flags, "dry-run")) {
26
+ writeOutput({
27
+ dryRun: true,
28
+ mfaType,
29
+ steps: [
30
+ "mfa:totp:setup",
31
+ "(scan the QR/secret with your authenticator app, then enter the code)",
32
+ "mfa:totp:verify-setup <code>",
33
+ `mfa:method:set ${mfaType}`,
34
+ "mfa:backup-codes:generate"
35
+ ]
36
+ }, flags);
37
+ return;
38
+ }
39
+ await confirmMutation(flags, "Enable TOTP: start enrollment, verify it, switch to it as the active method, and generate backup codes.");
40
+ console.log("== mfa:totp:setup ==");
41
+ await mfaTotpSetup([]);
42
+ console.log("Scan the QR code / secret above with your authenticator app.");
43
+ const code = stringFlag(flags, "code") || (await promptText("Enter the 6-digit code from your authenticator app: "));
44
+ if (!code)
45
+ throw new Error("A verification code is required to complete TOTP setup.");
46
+ console.log("== mfa:totp:verify-setup ==");
47
+ await mfaTotpVerifySetup([code]);
48
+ console.log("== mfa:method:set ==");
49
+ await mfaMethodSet([String(mfaType)]);
50
+ console.log("== mfa:backup-codes:generate ==");
51
+ await mfaBackupCodesGenerate(["--yes"]);
52
+ }
@@ -0,0 +1 @@
1
+ export declare function mfaTotpSetup(argv: string[]): Promise<void>;
@@ -0,0 +1,15 @@
1
+ import { blocksRequest } from "../../lib/api.js";
2
+ import { writeOutput } from "../../lib/output.js";
3
+ import { requestContext } from "../../lib/request-context.js";
4
+ import { parseCommand, selectedProject } from "../../lib/workspace.js";
5
+ export async function mfaTotpSetup(argv) {
6
+ const { flags } = parseCommand(argv);
7
+ const projectKey = await selectedProject(flags);
8
+ const result = await blocksRequest("/iam/v4/mfa/totp/setup", {
9
+ impersonatedProjectAuth: true,
10
+ method: "POST",
11
+ ...requestContext(flags),
12
+ projectTenantId: projectKey
13
+ });
14
+ writeOutput(result, flags);
15
+ }
@@ -0,0 +1 @@
1
+ export declare function mfaTotpVerifySetup(argv: string[]): Promise<void>;
@@ -0,0 +1,17 @@
1
+ import { stringFlag } from "../../lib/args.js";
2
+ import { blocksRequest } from "../../lib/api.js";
3
+ import { writeOutput } from "../../lib/output.js";
4
+ import { requestContext } from "../../lib/request-context.js";
5
+ import { parseCommand, selectedProject } from "../../lib/workspace.js";
6
+ export async function mfaTotpVerifySetup(argv) {
7
+ const { args, flags } = parseCommand(argv);
8
+ const code = args[0] || stringFlag(flags, "code", { required: true });
9
+ const projectKey = await selectedProject(flags);
10
+ const result = await blocksRequest("/iam/v4/mfa/totp/verify-setup", {
11
+ body: { code },
12
+ impersonatedProjectAuth: true,
13
+ ...requestContext(flags),
14
+ projectTenantId: projectKey
15
+ });
16
+ writeOutput(result, flags);
17
+ }
@@ -0,0 +1 @@
1
+ export declare function mfaVerify(argv: string[]): Promise<void>;
@@ -0,0 +1,26 @@
1
+ import { booleanFlag, integerFlag, stringFlag } from "../../lib/args.js";
2
+ import { blocksRequest } from "../../lib/api.js";
3
+ import { writeOutput } from "../../lib/output.js";
4
+ import { requestContext } from "../../lib/request-context.js";
5
+ import { parseCommand, selectedProject } from "../../lib/workspace.js";
6
+ export async function mfaVerify(argv) {
7
+ const { args, flags } = parseCommand(argv);
8
+ const mfaId = args[0] || stringFlag(flags, "mfa-id", { required: true });
9
+ const verificationCode = args[1] || stringFlag(flags, "code", { required: true });
10
+ const authType = integerFlag(flags, "auth-type", NaN);
11
+ if (!Number.isInteger(authType))
12
+ throw new Error("Provide --auth-type <n>.");
13
+ const projectKey = await selectedProject(flags);
14
+ const result = await blocksRequest("/iam/v4/mfa/verify", {
15
+ body: {
16
+ authType,
17
+ isFromTokenCall: booleanFlag(flags, "from-token-call") || undefined,
18
+ mfaId,
19
+ verificationCode
20
+ },
21
+ impersonatedProjectAuth: true,
22
+ ...requestContext(flags),
23
+ projectTenantId: projectKey
24
+ });
25
+ writeOutput(result, flags);
26
+ }
@@ -1,27 +1,32 @@
1
- import { parseFlags, stringFlag } from "../../lib/args.js";
1
+ import { stringFlag } from "../../lib/args.js";
2
+ import { blocksRequest } from "../../lib/api.js";
3
+ import { confirmMutation } from "../../lib/confirm.js";
2
4
  import { defaults, readConfig, writeConfig } from "../../lib/config.js";
5
+ import { CliActionableError } from "../../lib/errors.js";
6
+ import { findProjectByTenantId } from "../../lib/project-info.js";
7
+ import { promptText, selectFromList } from "../../lib/prompt.js";
8
+ import { requestContext } from "../../lib/request-context.js";
3
9
  import { scaffoldWebProject } from "../../lib/scaffold-web/index.js";
4
- import { readWorkspaceConfig, writeWorkspaceConfig } from "../../lib/workspace.js";
10
+ import { parseCommand, readWorkspaceConfig, selectedProject, writeWorkspaceConfig } from "../../lib/workspace.js";
5
11
  export async function newWeb(argv) {
6
- const parsed = parseFlags(argv);
7
- const name = parsed.args[0];
12
+ const { args, flags } = parseCommand(argv);
13
+ const name = args[0];
8
14
  if (!name)
9
15
  throw new Error("Missing web app name.");
10
- const appDomain = stringFlag(parsed.flags, "app-domain", { required: true });
11
- const apiUrl = stringFlag(parsed.flags, "blocks-api-url", { defaultValue: defaults().apiUrl });
12
- const oidcUrl = stringFlag(parsed.flags, "oidc-url", { defaultValue: defaults().oidcUrl });
13
- const xBlocksKey = stringFlag(parsed.flags, "x-blocks-key", { required: true });
14
- const oidcClientId = stringFlag(parsed.flags, "client-id");
15
- if (!oidcClientId) {
16
- console.warn("Warning: no --client-id given. The scaffolded app's login page will show a setup notice until you register a public OIDC client (redirect_uri = <origin>/login/callback) and set VITE_BLOCKS_OIDC_CLIENT_ID in .env.");
17
- }
16
+ const tenantId = stringFlag(flags, "x-blocks-key") || (await selectedProject(flags));
17
+ const explicitAppDomain = stringFlag(flags, "app-domain");
18
+ const project = explicitAppDomain ? {} : (await findProjectByTenantId(tenantId, flags)).project;
19
+ const apiUrl = stringFlag(flags, "blocks-api-url", { defaultValue: defaults().apiUrl });
20
+ const oidcUrl = stringFlag(flags, "oidc-url", { defaultValue: defaults().oidcUrl });
21
+ const appDomain = await resolveAppDomain(project, flags);
22
+ const oidcClientId = await resolveOidcClientId(tenantId, appDomain, name, flags);
18
23
  await scaffoldWebProject({
19
24
  apiUrl,
20
25
  appDomain,
21
26
  name,
22
27
  oidcClientId,
23
28
  oidcUrl,
24
- xBlocksKey
29
+ xBlocksKey: tenantId
25
30
  });
26
31
  try {
27
32
  const config = await readConfig();
@@ -31,7 +36,7 @@ export async function newWeb(argv) {
31
36
  ...config.selectedProject,
32
37
  appDomain,
33
38
  name,
34
- tenantId: xBlocksKey
39
+ tenantId
35
40
  }
36
41
  });
37
42
  }
@@ -46,7 +51,7 @@ export async function newWeb(argv) {
46
51
  ...workspace.project,
47
52
  apiUrl,
48
53
  appDomain,
49
- tenantId: xBlocksKey
54
+ tenantId
50
55
  }
51
56
  });
52
57
  }
@@ -54,3 +59,98 @@ export async function newWeb(argv) {
54
59
  console.log(`Next: cd ${name} && npm install && npm run cert && npm run dev`);
55
60
  console.log("See README.md for hosts-file and OIDC redirect URI setup.");
56
61
  }
62
+ async function resolveAppDomain(project, flags) {
63
+ const flagValue = stringFlag(flags, "app-domain");
64
+ const domains = (project.applications ?? [])
65
+ .map((application) => application.domain)
66
+ .filter((domain) => Boolean(domain));
67
+ if (flagValue) {
68
+ if (domains.length > 0 && !domains.includes(flagValue)) {
69
+ console.warn(`Warning: '${flagValue}' is not one of this project's known domains (${domains.join(", ")}).`);
70
+ }
71
+ return flagValue;
72
+ }
73
+ if (domains.length === 0) {
74
+ throw new CliActionableError("This project has no domains registered in Blocks.", "no_project_domain", "Add a domain from the Blocks portal, or pass --app-domain explicitly.");
75
+ }
76
+ if (domains.length === 1)
77
+ return domains[0];
78
+ const index = await selectFromList("Multiple domains found for this project -- choose one:", domains);
79
+ return domains[index];
80
+ }
81
+ async function resolveOidcClientId(tenantId, appDomain, appName, flags) {
82
+ const flagValue = stringFlag(flags, "client-id");
83
+ if (flagValue)
84
+ return flagValue;
85
+ const clients = await listOidcClientSummaries(tenantId, flags);
86
+ const options = [
87
+ ...clients.map((client) => `${client.label} (${client.id})`),
88
+ "Create a new OIDC client now",
89
+ "Skip -- register later from the Blocks portal or 'auth:oidc-clients:save'"
90
+ ];
91
+ const choice = await selectFromList("Choose an OIDC client for this app's login, or create/skip:", options);
92
+ if (choice < clients.length)
93
+ return clients[choice].id;
94
+ if (choice === clients.length)
95
+ return await createOidcClientInteractively(tenantId, appDomain, appName, flags);
96
+ console.warn("Warning: no OIDC client selected. The scaffolded app's login page will show a setup notice until you register a public OIDC client (redirect_uri = <origin>/login/callback) and set VITE_BLOCKS_OIDC_CLIENT_ID in .env.");
97
+ return undefined;
98
+ }
99
+ async function listOidcClientSummaries(tenantId, flags) {
100
+ const raw = await blocksRequest("/iam/v4/oidc-clients", {
101
+ impersonatedProjectAuth: true,
102
+ projectTenantId: tenantId,
103
+ ...requestContext(flags)
104
+ });
105
+ const summaries = [];
106
+ for (const item of normalizeList(raw)) {
107
+ if (typeof item !== "object" || item === null)
108
+ continue;
109
+ const record = item;
110
+ const id = record.itemId ?? record.clientId ?? record.id;
111
+ if (typeof id !== "string" || !id)
112
+ continue;
113
+ const label = typeof record.clientDisplayName === "string" && record.clientDisplayName ? record.clientDisplayName : id;
114
+ summaries.push({ id, label });
115
+ }
116
+ return summaries;
117
+ }
118
+ function normalizeList(raw) {
119
+ if (Array.isArray(raw))
120
+ return raw;
121
+ if (raw && typeof raw === "object") {
122
+ for (const key of ["data", "items", "results"]) {
123
+ const value = raw[key];
124
+ if (Array.isArray(value))
125
+ return value;
126
+ }
127
+ }
128
+ return [];
129
+ }
130
+ async function createOidcClientInteractively(tenantId, appDomain, appName, flags) {
131
+ const defaultRedirect = `https://${appDomain}/login/callback`;
132
+ const displayName = (await promptText(`OIDC client display name [${appName}]: `)) || appName;
133
+ const redirectUri = (await promptText(`Redirect URI [${defaultRedirect}]: `)) || defaultRedirect;
134
+ const body = {
135
+ clientDisplayName: displayName,
136
+ isActive: true,
137
+ redirectUris: [redirectUri],
138
+ registerAsIdentityProvider: true,
139
+ requirePkce: true,
140
+ scope: "openid profile"
141
+ };
142
+ await confirmMutation(flags, `Create OIDC client '${displayName}' for this project. The response's client secret (if any) is shown once.`);
143
+ const result = await blocksRequest("/iam/v4/oidc-clients", {
144
+ body,
145
+ impersonatedProjectAuth: true,
146
+ projectTenantId: tenantId,
147
+ ...requestContext(flags)
148
+ });
149
+ console.log("Created OIDC client:");
150
+ console.log(JSON.stringify(result, null, 2));
151
+ const id = result.itemId ?? result.clientId ?? result.id;
152
+ if (typeof id !== "string" || !id) {
153
+ throw new Error("OIDC client creation response did not include a recognizable client id (itemId/clientId/id). Check the JSON above and pass --client-id manually.");
154
+ }
155
+ return id;
156
+ }
@@ -0,0 +1 @@
1
+ export declare function notificationDelete(argv: string[]): Promise<void>;
@@ -0,0 +1,24 @@
1
+ import { booleanFlag, stringFlag } from "../../lib/args.js";
2
+ import { blocksRequest } from "../../lib/api.js";
3
+ import { confirmMutation } from "../../lib/confirm.js";
4
+ import { writeOutput } from "../../lib/output.js";
5
+ import { requestContext } from "../../lib/request-context.js";
6
+ import { parseCommand, selectedProject } from "../../lib/workspace.js";
7
+ export async function notificationDelete(argv) {
8
+ const { args, flags } = parseCommand(argv);
9
+ const id = args[0] || stringFlag(flags, "id", { required: true });
10
+ if (booleanFlag(flags, "dry-run")) {
11
+ writeOutput({ dryRun: true, endpoint: "/os/v4/Notification/Delete", query: { ItemId: id } }, flags);
12
+ return;
13
+ }
14
+ await confirmMutation(flags, `Delete notification configuration '${id}'.`);
15
+ const projectKey = await selectedProject(flags);
16
+ const result = await blocksRequest("/os/v4/Notification/Delete", {
17
+ impersonatedProjectAuth: true,
18
+ method: "DELETE",
19
+ ...requestContext(flags),
20
+ projectTenantId: projectKey,
21
+ query: { ItemId: id }
22
+ });
23
+ writeOutput(result, flags);
24
+ }
@@ -0,0 +1 @@
1
+ export declare function notificationGet(argv: string[]): Promise<void>;
@@ -0,0 +1,17 @@
1
+ import { stringFlag } from "../../lib/args.js";
2
+ import { blocksRequest } from "../../lib/api.js";
3
+ import { writeOutput } from "../../lib/output.js";
4
+ import { requestContext } from "../../lib/request-context.js";
5
+ import { parseCommand, selectedProject } from "../../lib/workspace.js";
6
+ export async function notificationGet(argv) {
7
+ const { args, flags } = parseCommand(argv);
8
+ const id = args[0] || stringFlag(flags, "id", { required: true });
9
+ const projectKey = await selectedProject(flags);
10
+ const result = await blocksRequest("/os/v4/Notification/Get", {
11
+ impersonatedProjectAuth: true,
12
+ ...requestContext(flags),
13
+ projectTenantId: projectKey,
14
+ query: { ItemId: id }
15
+ });
16
+ writeOutput(result, flags);
17
+ }
@@ -0,0 +1 @@
1
+ export declare function notificationList(argv: string[]): Promise<void>;
@@ -0,0 +1,22 @@
1
+ import { integerFlag, optionalBooleanFlag, stringFlag } from "../../lib/args.js";
2
+ import { blocksRequest } from "../../lib/api.js";
3
+ import { writeOutput } from "../../lib/output.js";
4
+ import { requestContext } from "../../lib/request-context.js";
5
+ import { parseCommand, selectedProject } from "../../lib/workspace.js";
6
+ export async function notificationList(argv) {
7
+ const { flags } = parseCommand(argv);
8
+ const projectKey = await selectedProject(flags);
9
+ const result = await blocksRequest("/os/v4/Notification/Gets", {
10
+ impersonatedProjectAuth: true,
11
+ ...requestContext(flags),
12
+ projectTenantId: projectKey,
13
+ query: {
14
+ Filter: stringFlag(flags, "filter") || undefined,
15
+ Page: integerFlag(flags, "page", 1),
16
+ PageSize: integerFlag(flags, "page-size", 20),
17
+ "Sort.IsDescending": optionalBooleanFlag(flags, "sort-desc"),
18
+ "Sort.Property": stringFlag(flags, "sort-by") || undefined
19
+ }
20
+ });
21
+ writeOutput(result, flags);
22
+ }
@@ -0,0 +1 @@
1
+ export declare function notificationSave(argv: string[]): Promise<void>;
@@ -0,0 +1,34 @@
1
+ import { booleanFlag, optionalIntegerFlag, stringFlag } from "../../lib/args.js";
2
+ import { blocksRequest } from "../../lib/api.js";
3
+ import { confirmMutation } from "../../lib/confirm.js";
4
+ import { compact, jsonBodyFlag } from "../../lib/json-flag.js";
5
+ import { writeOutput } from "../../lib/output.js";
6
+ import { requestContext } from "../../lib/request-context.js";
7
+ import { parseCommand, selectedProject } from "../../lib/workspace.js";
8
+ export async function notificationSave(argv) {
9
+ const { flags } = parseCommand(argv);
10
+ const body = {
11
+ ...(await jsonBodyFlag(flags)),
12
+ ...compact({
13
+ channelToNotify: optionalIntegerFlag(flags, "channel"),
14
+ enablePersistence: booleanFlag(flags, "enable-persistence") || undefined,
15
+ isUpdateRequest: booleanFlag(flags, "update") || undefined,
16
+ name: stringFlag(flags, "name") || undefined,
17
+ notificationType: optionalIntegerFlag(flags, "type"),
18
+ notifyMethod: stringFlag(flags, "notify-method") || undefined
19
+ })
20
+ };
21
+ if (booleanFlag(flags, "dry-run")) {
22
+ writeOutput({ dryRun: true, endpoint: "/os/v4/Notification/Save", request: body }, flags);
23
+ return;
24
+ }
25
+ await confirmMutation(flags, `Save notification configuration '${body.name ?? ""}'.`);
26
+ const projectKey = await selectedProject(flags);
27
+ const result = await blocksRequest("/os/v4/Notification/Save", {
28
+ body,
29
+ impersonatedProjectAuth: true,
30
+ ...requestContext(flags),
31
+ projectTenantId: projectKey
32
+ });
33
+ writeOutput(result, flags);
34
+ }
@@ -0,0 +1 @@
1
+ export declare function notifierList(argv: string[]): Promise<void>;
@@ -0,0 +1,23 @@
1
+ import { integerFlag, optionalBooleanFlag, stringFlag } from "../../lib/args.js";
2
+ import { blocksRequest } from "../../lib/api.js";
3
+ import { writeOutput } from "../../lib/output.js";
4
+ import { requestContext } from "../../lib/request-context.js";
5
+ import { parseCommand, selectedProject } from "../../lib/workspace.js";
6
+ export async function notifierList(argv) {
7
+ const { flags } = parseCommand(argv);
8
+ const projectKey = await selectedProject(flags);
9
+ const result = await blocksRequest("/logic/v4/Notifier/GetNotifications", {
10
+ impersonatedProjectAuth: true,
11
+ ...requestContext(flags),
12
+ projectTenantId: projectKey,
13
+ query: {
14
+ Filter: stringFlag(flags, "filter") || undefined,
15
+ IsUnreadOnly: optionalBooleanFlag(flags, "unread-only"),
16
+ Page: integerFlag(flags, "page", 1),
17
+ PageSize: integerFlag(flags, "page-size", 20),
18
+ "Sort.IsDescending": optionalBooleanFlag(flags, "sort-desc"),
19
+ "Sort.Property": stringFlag(flags, "sort-by") || undefined
20
+ }
21
+ });
22
+ writeOutput(result, flags);
23
+ }
@@ -0,0 +1 @@
1
+ export declare function notifierMarkAllRead(argv: string[]): Promise<void>;
@@ -0,0 +1,23 @@
1
+ import { booleanFlag } from "../../lib/args.js";
2
+ import { blocksRequest } from "../../lib/api.js";
3
+ import { confirmMutation } from "../../lib/confirm.js";
4
+ import { writeOutput } from "../../lib/output.js";
5
+ import { requestContext } from "../../lib/request-context.js";
6
+ import { parseCommand, selectedProject } from "../../lib/workspace.js";
7
+ const NOTIFIER_MARK_ALL_READ_API = "/logic/v4/Notifier/MarkAllNotificationAsRead";
8
+ export async function notifierMarkAllRead(argv) {
9
+ const { flags } = parseCommand(argv);
10
+ if (booleanFlag(flags, "dry-run")) {
11
+ writeOutput({ dryRun: true, endpoint: NOTIFIER_MARK_ALL_READ_API }, flags);
12
+ return;
13
+ }
14
+ await confirmMutation(flags, "Mark all notifications as read.");
15
+ const projectKey = await selectedProject(flags);
16
+ const result = await blocksRequest(NOTIFIER_MARK_ALL_READ_API, {
17
+ impersonatedProjectAuth: true,
18
+ method: "POST",
19
+ ...requestContext(flags),
20
+ projectTenantId: projectKey
21
+ });
22
+ writeOutput(result, flags);
23
+ }
@@ -0,0 +1 @@
1
+ export declare function notifierMarkRead(argv: string[]): Promise<void>;
@@ -0,0 +1,24 @@
1
+ import { booleanFlag, stringFlag } from "../../lib/args.js";
2
+ import { blocksRequest } from "../../lib/api.js";
3
+ import { confirmMutation } from "../../lib/confirm.js";
4
+ import { writeOutput } from "../../lib/output.js";
5
+ import { requestContext } from "../../lib/request-context.js";
6
+ import { parseCommand, selectedProject } from "../../lib/workspace.js";
7
+ const NOTIFIER_MARK_READ_API = "/logic/v4/Notifier/MarkNotificationAsRead";
8
+ export async function notifierMarkRead(argv) {
9
+ const { args, flags } = parseCommand(argv);
10
+ const id = args[0] || stringFlag(flags, "id", { required: true });
11
+ if (booleanFlag(flags, "dry-run")) {
12
+ writeOutput({ dryRun: true, endpoint: NOTIFIER_MARK_READ_API, request: { id } }, flags);
13
+ return;
14
+ }
15
+ await confirmMutation(flags, `Mark notification '${id}' as read.`);
16
+ const projectKey = await selectedProject(flags);
17
+ const result = await blocksRequest(NOTIFIER_MARK_READ_API, {
18
+ body: { id },
19
+ impersonatedProjectAuth: true,
20
+ ...requestContext(flags),
21
+ projectTenantId: projectKey
22
+ });
23
+ writeOutput(result, flags);
24
+ }
@@ -0,0 +1 @@
1
+ export declare function notifierNotify(argv: string[]): Promise<void>;
@@ -0,0 +1,39 @@
1
+ import { booleanFlag, stringFlag } from "../../lib/args.js";
2
+ import { blocksRequest } from "../../lib/api.js";
3
+ import { confirmMutation } from "../../lib/confirm.js";
4
+ import { compact, jsonBodyFlag, jsonFlag, listFlag } from "../../lib/json-flag.js";
5
+ import { writeOutput } from "../../lib/output.js";
6
+ import { requestContext } from "../../lib/request-context.js";
7
+ import { parseCommand, selectedProject } from "../../lib/workspace.js";
8
+ const NOTIFIER_NOTIFY_API = "/logic/v4/Notifier/Notify";
9
+ export async function notifierNotify(argv) {
10
+ const { flags } = parseCommand(argv);
11
+ const body = {
12
+ ...(await jsonBodyFlag(flags)),
13
+ ...compact({
14
+ configurationName: stringFlag(flags, "configuration-name") || undefined,
15
+ connectionId: stringFlag(flags, "connection-id") || undefined,
16
+ contentAvailable: booleanFlag(flags, "content-available") || undefined,
17
+ denormalizedPayload: stringFlag(flags, "denormalized-payload") || undefined,
18
+ responseKey: stringFlag(flags, "response-key") || undefined,
19
+ responseValue: stringFlag(flags, "response-value") || undefined,
20
+ roles: listFlag(flags, "roles"),
21
+ saveDenormalizedPayloadAsAnObject: booleanFlag(flags, "save-denormalized-payload-as-object") || undefined,
22
+ subscriptionFilters: jsonFlag(flags, "subscription-filters"),
23
+ userIds: listFlag(flags, "user-ids")
24
+ })
25
+ };
26
+ if (booleanFlag(flags, "dry-run")) {
27
+ writeOutput({ dryRun: true, endpoint: NOTIFIER_NOTIFY_API, request: body }, flags);
28
+ return;
29
+ }
30
+ await confirmMutation(flags, "Send notification.");
31
+ const projectKey = await selectedProject(flags);
32
+ const result = await blocksRequest(NOTIFIER_NOTIFY_API, {
33
+ body,
34
+ impersonatedProjectAuth: true,
35
+ ...requestContext(flags),
36
+ projectTenantId: projectKey
37
+ });
38
+ writeOutput(result, flags);
39
+ }
@@ -0,0 +1 @@
1
+ export declare function notifierUnread(argv: string[]): Promise<void>;
@@ -0,0 +1,25 @@
1
+ import { optionalIntegerFlag, stringFlag } from "../../lib/args.js";
2
+ import { blocksRequest } from "../../lib/api.js";
3
+ import { writeOutput } from "../../lib/output.js";
4
+ import { requestContext } from "../../lib/request-context.js";
5
+ import { parseCommand, selectedProject } from "../../lib/workspace.js";
6
+ // Swagger documents GetUnreadNotificationsBySubscriptionFilter as GET with a JSON
7
+ // request body, which the Fetch spec forbids sending on a GET request. Sent as a
8
+ // flattened query string instead, matching every other GET endpoint in this API.
9
+ export async function notifierUnread(argv) {
10
+ const { flags } = parseCommand(argv);
11
+ const projectKey = await selectedProject(flags);
12
+ const result = await blocksRequest("/logic/v4/Notifier/GetUnreadNotificationsBySubscriptionFilter", {
13
+ impersonatedProjectAuth: true,
14
+ ...requestContext(flags),
15
+ projectTenantId: projectKey,
16
+ query: {
17
+ OrderBy: optionalIntegerFlag(flags, "order-by"),
18
+ "SubscriptionFilterData.ActionName": stringFlag(flags, "action-name") || undefined,
19
+ "SubscriptionFilterData.Context": stringFlag(flags, "context") || undefined,
20
+ "SubscriptionFilterData.Value": stringFlag(flags, "value") || undefined,
21
+ UserId: stringFlag(flags, "user-id") || undefined
22
+ }
23
+ });
24
+ writeOutput(result, flags);
25
+ }