@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,55 @@
1
+ import { readFile } from "node:fs/promises";
2
+ import { basename } from "node:path";
3
+ import { booleanFlag, stringFlag } from "../../../lib/args.js";
4
+ import { blocksRequest } from "../../../lib/api.js";
5
+ import { confirmMutation } from "../../../lib/confirm.js";
6
+ import { writeOutput } from "../../../lib/output.js";
7
+ import { requestContext } from "../../../lib/request-context.js";
8
+ import { parseCommand, selectedProject } from "../../../lib/workspace.js";
9
+ /**
10
+ * The one-call alternative to presigned-upload-url + upload-to-url, for projects backed
11
+ * by local storage (not cloud object storage). Sends multipart/form-data with the file bytes.
12
+ */
13
+ export async function dataFilesUploadToLocalStorage(argv) {
14
+ const { flags } = parseCommand(argv);
15
+ const filePath = stringFlag(flags, "file", { required: true });
16
+ const name = stringFlag(flags, "name") || basename(filePath);
17
+ const additionalPropertiesRaw = stringFlag(flags, "additional-properties");
18
+ if (booleanFlag(flags, "dry-run")) {
19
+ writeOutput({ dryRun: true, endpoint: "/data/v4/Files/UploadFileToLocalStorage", name, request: { file: filePath } }, flags);
20
+ return;
21
+ }
22
+ await confirmMutation(flags, `Upload '${filePath}' to local storage as '${name}'.`);
23
+ const form = new FormData();
24
+ form.set("File", new Blob([await readFile(filePath)]), name);
25
+ form.set("Name", name);
26
+ form.set("ParentDirectoryId", stringFlag(flags, "parent-directory-id"));
27
+ const itemId = stringFlag(flags, "item-id");
28
+ if (itemId)
29
+ form.set("ItemId", itemId);
30
+ const metaData = stringFlag(flags, "meta-data");
31
+ if (metaData)
32
+ form.set("MetaData", metaData);
33
+ const tags = stringFlag(flags, "tags");
34
+ if (tags)
35
+ form.set("Tags", tags);
36
+ const accessModifier = stringFlag(flags, "access-modifier");
37
+ if (accessModifier)
38
+ form.set("AccessModifier", accessModifier);
39
+ const configurationName = stringFlag(flags, "configuration-name");
40
+ if (configurationName)
41
+ form.set("ConfigurationName", configurationName);
42
+ if (additionalPropertiesRaw) {
43
+ const parsed = JSON.parse(additionalPropertiesRaw);
44
+ for (const [key, value] of Object.entries(parsed))
45
+ form.set(`AdditionalProperties[${key}]`, value);
46
+ }
47
+ const projectKey = await selectedProject(flags);
48
+ const result = await blocksRequest("/data/v4/Files/UploadFileToLocalStorage", {
49
+ body: form,
50
+ impersonatedProjectAuth: true,
51
+ ...requestContext(flags),
52
+ projectTenantId: projectKey
53
+ });
54
+ writeOutput(result, flags);
55
+ }
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Step 2 of the cloud-storage upload path (after `data:files:presigned-upload-url`).
3
+ * This PUTs straight to the storage provider's pre-signed URL - no `x-blocks-key`, no
4
+ * bearer token, not a Blocks API call. Adds `x-ms-blob-type: BlockBlob` by default
5
+ * (Azure block-blob upload header); pass --blob-type to override or --no-blob-type-header
6
+ * to omit it entirely for non-Azure providers.
7
+ */
8
+ export declare function dataFilesUploadToUrl(argv: string[]): Promise<void>;
@@ -0,0 +1,36 @@
1
+ import { readFile } from "node:fs/promises";
2
+ import { booleanFlag, stringFlag } from "../../../lib/args.js";
3
+ import { confirmMutation } from "../../../lib/confirm.js";
4
+ import { writeOutput } from "../../../lib/output.js";
5
+ import { parseCommand } from "../../../lib/workspace.js";
6
+ /**
7
+ * Step 2 of the cloud-storage upload path (after `data:files:presigned-upload-url`).
8
+ * This PUTs straight to the storage provider's pre-signed URL - no `x-blocks-key`, no
9
+ * bearer token, not a Blocks API call. Adds `x-ms-blob-type: BlockBlob` by default
10
+ * (Azure block-blob upload header); pass --blob-type to override or --no-blob-type-header
11
+ * to omit it entirely for non-Azure providers.
12
+ */
13
+ export async function dataFilesUploadToUrl(argv) {
14
+ const { flags } = parseCommand(argv);
15
+ const url = stringFlag(flags, "url", { required: true });
16
+ const filePath = stringFlag(flags, "file", { required: true });
17
+ const contentType = stringFlag(flags, "content-type", { required: true });
18
+ const blobType = stringFlag(flags, "blob-type", { defaultValue: "BlockBlob" });
19
+ const skipBlobTypeHeader = flags["no-blob-type-header"] === true;
20
+ if (booleanFlag(flags, "dry-run")) {
21
+ writeOutput({ dryRun: true, file: filePath, url }, flags);
22
+ return;
23
+ }
24
+ await confirmMutation(flags, `Upload '${filePath}' to the pre-signed URL.`);
25
+ const body = await readFile(filePath);
26
+ const headers = { "Content-Type": contentType };
27
+ if (!skipBlobTypeHeader && blobType)
28
+ headers["x-ms-blob-type"] = blobType;
29
+ const response = await fetch(url, { body, headers, method: "PUT" }).catch((error) => {
30
+ throw new Error(`Upload PUT failed: ${error.message}`);
31
+ });
32
+ if (!response.ok) {
33
+ throw new Error(`Upload PUT ${response.status} ${response.statusText}: ${await response.text().catch(() => "")}`);
34
+ }
35
+ writeOutput({ ok: true, status: response.status }, flags);
36
+ }
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Composed upload: give it a local file, it runs the right sequence of API calls itself --
3
+ * presign + PUT + DMS-register for cloud storage (--local-storage for the single-call
4
+ * local-storage path) -- instead of you chaining presigned-upload-url/upload-to-url/dms-upload
5
+ * (or upload-to-local-storage) by hand.
6
+ */
7
+ export declare function dataFilesUpload(argv: string[]): Promise<void>;
@@ -0,0 +1,145 @@
1
+ import { readFile } from "node:fs/promises";
2
+ import { basename, extname } from "node:path";
3
+ import { booleanFlag, optionalIntegerFlag, stringFlag } from "../../../lib/args.js";
4
+ import { blocksRequest } from "../../../lib/api.js";
5
+ import { confirmMutation } from "../../../lib/confirm.js";
6
+ import { compact, listFlag } from "../../../lib/json-flag.js";
7
+ import { writeOutput } from "../../../lib/output.js";
8
+ import { requestContext } from "../../../lib/request-context.js";
9
+ import { parseCommand, selectedProject } from "../../../lib/workspace.js";
10
+ const CONTENT_TYPES = {
11
+ ".csv": "text/csv",
12
+ ".doc": "application/msword",
13
+ ".docx": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
14
+ ".gif": "image/gif",
15
+ ".jpeg": "image/jpeg",
16
+ ".jpg": "image/jpeg",
17
+ ".json": "application/json",
18
+ ".pdf": "application/pdf",
19
+ ".png": "image/png",
20
+ ".svg": "image/svg+xml",
21
+ ".txt": "text/plain",
22
+ ".webp": "image/webp",
23
+ ".xls": "application/vnd.ms-excel",
24
+ ".xlsx": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
25
+ ".zip": "application/zip"
26
+ };
27
+ /**
28
+ * Composed upload: give it a local file, it runs the right sequence of API calls itself --
29
+ * presign + PUT + DMS-register for cloud storage (--local-storage for the single-call
30
+ * local-storage path) -- instead of you chaining presigned-upload-url/upload-to-url/dms-upload
31
+ * (or upload-to-local-storage) by hand.
32
+ */
33
+ export async function dataFilesUpload(argv) {
34
+ const { flags } = parseCommand(argv);
35
+ const filePath = stringFlag(flags, "file", { required: true });
36
+ const name = stringFlag(flags, "name") || basename(filePath);
37
+ if (booleanFlag(flags, "local-storage")) {
38
+ await uploadToLocalStorage(filePath, name, flags);
39
+ return;
40
+ }
41
+ await uploadViaPresignedUrl(filePath, name, flags);
42
+ }
43
+ async function uploadToLocalStorage(filePath, name, flags) {
44
+ const parentDirectoryId = stringFlag(flags, "parent-id") || stringFlag(flags, "parent-directory-id");
45
+ if (booleanFlag(flags, "dry-run")) {
46
+ writeOutput({ dryRun: true, endpoint: "/data/v4/Files/UploadFileToLocalStorage", file: filePath, name }, flags);
47
+ return;
48
+ }
49
+ await confirmMutation(flags, `Upload '${filePath}' to local storage as '${name}'.`);
50
+ const form = new FormData();
51
+ form.set("File", new Blob([await readFile(filePath)]), name);
52
+ form.set("Name", name);
53
+ if (parentDirectoryId)
54
+ form.set("ParentDirectoryId", parentDirectoryId);
55
+ const tags = stringFlag(flags, "tags");
56
+ if (tags)
57
+ form.set("Tags", tags);
58
+ const accessModifier = stringFlag(flags, "access-modifier");
59
+ if (accessModifier)
60
+ form.set("AccessModifier", accessModifier);
61
+ const configurationName = stringFlag(flags, "configuration-name");
62
+ if (configurationName)
63
+ form.set("ConfigurationName", configurationName);
64
+ const projectKey = await selectedProject(flags);
65
+ const result = await blocksRequest("/data/v4/Files/UploadFileToLocalStorage", {
66
+ body: form,
67
+ impersonatedProjectAuth: true,
68
+ ...requestContext(flags),
69
+ projectTenantId: projectKey
70
+ });
71
+ writeOutput(result, flags);
72
+ }
73
+ async function uploadViaPresignedUrl(filePath, name, flags) {
74
+ const parentDirectoryId = stringFlag(flags, "parent-id") || stringFlag(flags, "parent-directory-id");
75
+ const contentType = stringFlag(flags, "content-type") || CONTENT_TYPES[extname(filePath).toLowerCase()] || "application/octet-stream";
76
+ const tags = stringFlag(flags, "tags");
77
+ const presignBody = compact({
78
+ accessModifier: stringFlag(flags, "access-modifier") || undefined,
79
+ configurationName: stringFlag(flags, "configuration-name") || undefined,
80
+ metaData: stringFlag(flags, "meta-data") || undefined,
81
+ moduleName: optionalIntegerFlag(flags, "module-name"),
82
+ name,
83
+ parentDirectoryId: parentDirectoryId || undefined,
84
+ tags: tags || undefined
85
+ });
86
+ if (booleanFlag(flags, "dry-run")) {
87
+ writeOutput({
88
+ dryRun: true,
89
+ steps: [
90
+ { body: presignBody, endpoint: "/data/v4/Files/GetPreSignedUrlForUpload" },
91
+ { contentType, endpoint: "PUT <uploadUrl>", file: filePath },
92
+ { endpoint: "/data/v4/Files/UploadFile" }
93
+ ]
94
+ }, flags);
95
+ return;
96
+ }
97
+ await confirmMutation(flags, `Upload '${filePath}' as '${name}' (presign + PUT + DMS register).`);
98
+ const projectKey = await selectedProject(flags);
99
+ const presigned = await blocksRequest("/data/v4/Files/GetPreSignedUrlForUpload", {
100
+ body: presignBody,
101
+ impersonatedProjectAuth: true,
102
+ ...requestContext(flags),
103
+ projectTenantId: projectKey
104
+ });
105
+ const uploadUrl = firstString(presigned, ["uploadUrl", "url", "preSignedUrl"]);
106
+ const fileId = firstString(presigned, ["fileId", "itemId", "fileStorageId"]);
107
+ if (!uploadUrl || !fileId) {
108
+ throw new Error(`Presigned URL response did not include a recognizable uploadUrl/fileId. Check the response and consider running the individual steps manually: ${JSON.stringify(presigned)}`);
109
+ }
110
+ const bytes = await readFile(filePath);
111
+ const putResponse = await fetch(uploadUrl, {
112
+ body: bytes,
113
+ headers: { "Content-Type": contentType, "x-ms-blob-type": "BlockBlob" },
114
+ method: "PUT"
115
+ }).catch((error) => {
116
+ throw new Error(`Upload PUT failed: ${error.message}`);
117
+ });
118
+ if (!putResponse.ok) {
119
+ throw new Error(`Upload PUT ${putResponse.status} ${putResponse.statusText}: ${await putResponse.text().catch(() => "")}`);
120
+ }
121
+ const registered = await blocksRequest("/data/v4/Files/UploadFile", {
122
+ body: {
123
+ upload: [
124
+ compact({
125
+ artifactName: name,
126
+ fileStorageId: fileId,
127
+ parentId: parentDirectoryId || undefined,
128
+ tags: listFlag(flags, "tags")
129
+ })
130
+ ]
131
+ },
132
+ impersonatedProjectAuth: true,
133
+ ...requestContext(flags),
134
+ projectTenantId: projectKey
135
+ });
136
+ writeOutput({ fileId, registered, uploadUrl }, flags);
137
+ }
138
+ function firstString(record, keys) {
139
+ for (const key of keys) {
140
+ const value = record[key];
141
+ if (typeof value === "string" && value)
142
+ return value;
143
+ }
144
+ return undefined;
145
+ }
@@ -0,0 +1 @@
1
+ export declare function dataRulesPolicyDelete(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 dataRulesPolicyDelete(argv) {
8
+ const { args, flags } = parseCommand(argv);
9
+ const itemId = args[0] || stringFlag(flags, "item-id", { required: true });
10
+ if (booleanFlag(flags, "dry-run")) {
11
+ writeOutput({ dryRun: true, endpoint: "/data/v4/data-access/policy/delete", itemId }, flags);
12
+ return;
13
+ }
14
+ await confirmMutation(flags, `Delete data-access policy '${itemId}'.`);
15
+ const projectKey = await selectedProject(flags);
16
+ const result = await blocksRequest("/data/v4/data-access/policy/delete", {
17
+ impersonatedProjectAuth: true,
18
+ method: "DELETE",
19
+ ...requestContext(flags),
20
+ projectTenantId: projectKey,
21
+ query: { itemId }
22
+ });
23
+ writeOutput(result, flags);
24
+ }
@@ -0,0 +1 @@
1
+ export declare function dataRulesPolicyGet(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 dataRulesPolicyGet(argv) {
7
+ const { args, flags } = parseCommand(argv);
8
+ const schemaName = args[0] || stringFlag(flags, "schema-name", { required: true });
9
+ const projectKey = await selectedProject(flags);
10
+ const result = await blocksRequest("/data/v4/data-access/policy/get", {
11
+ impersonatedProjectAuth: true,
12
+ ...requestContext(flags),
13
+ projectTenantId: projectKey,
14
+ query: { schemaName }
15
+ });
16
+ writeOutput(result, flags);
17
+ }
@@ -0,0 +1 @@
1
+ export declare function dataSchemaAggregation(argv: string[]): Promise<void>;
@@ -0,0 +1,26 @@
1
+ import { booleanFlag, integerFlag, 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
+ export async function dataSchemaAggregation(argv) {
7
+ const { flags } = parseCommand(argv);
8
+ const projectKey = await selectedProject(flags);
9
+ const result = await blocksRequest("/data/v4/schemas/aggregation", {
10
+ impersonatedProjectAuth: true,
11
+ ...requestContext(flags),
12
+ projectTenantId: projectKey,
13
+ query: {
14
+ CollectionName: stringFlag(flags, "collection-name") || undefined,
15
+ Keyword: stringFlag(flags, "keyword") || undefined,
16
+ PageNo: integerFlag(flags, "page", 1),
17
+ PageSize: integerFlag(flags, "page-size", 100),
18
+ ProjectKey: projectKey,
19
+ SchemaName: stringFlag(flags, "schema-name") || undefined,
20
+ SchemaType: optionalIntegerFlag(flags, "schema-type"),
21
+ SortBy: stringFlag(flags, "sort-by") || undefined,
22
+ SortDescending: booleanFlag(flags, "sort-desc") || undefined
23
+ }
24
+ });
25
+ writeOutput(result, flags);
26
+ }
@@ -0,0 +1 @@
1
+ export declare function dataSchemaChangeLogs(argv: string[]): Promise<void>;
@@ -0,0 +1,14 @@
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 dataSchemaChangeLogs(argv) {
6
+ const { flags } = parseCommand(argv);
7
+ const projectKey = await selectedProject(flags);
8
+ const result = await blocksRequest("/data/v4/schemas/unadapted-change-logs", {
9
+ impersonatedProjectAuth: true,
10
+ ...requestContext(flags),
11
+ projectTenantId: projectKey
12
+ });
13
+ writeOutput(result, flags);
14
+ }
@@ -0,0 +1 @@
1
+ export declare function dataSchemaDelete(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 dataSchemaDelete(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: "/data/v4/schemas", id }, flags);
12
+ return;
13
+ }
14
+ await confirmMutation(flags, `Delete schema definition '${id}'. This cannot be undone.`);
15
+ const projectKey = await selectedProject(flags);
16
+ const result = await blocksRequest("/data/v4/schemas", {
17
+ impersonatedProjectAuth: true,
18
+ method: "DELETE",
19
+ ...requestContext(flags),
20
+ projectTenantId: projectKey,
21
+ query: { id }
22
+ });
23
+ writeOutput(result, flags);
24
+ }
@@ -0,0 +1,5 @@
1
+ /**
2
+ * `fields` (a FieldDefinitionRequest[]: name/type/isArray/isPIIData/isUniqueData/description) has no
3
+ * single-value flag equivalent - pass it via --body/--file. Convenience flags cover the scalar/array-of-string fields.
4
+ */
5
+ export declare function dataSchemaFields(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, 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
+ /**
9
+ * `fields` (a FieldDefinitionRequest[]: name/type/isArray/isPIIData/isUniqueData/description) has no
10
+ * single-value flag equivalent - pass it via --body/--file. Convenience flags cover the scalar/array-of-string fields.
11
+ */
12
+ export async function dataSchemaFields(argv) {
13
+ const { flags } = parseCommand(argv);
14
+ const body = {
15
+ ...(await jsonBodyFlag(flags)),
16
+ ...compact({
17
+ deletableFieldNames: listFlag(flags, "deletable-fields"),
18
+ schemaDefinitionItemId: stringFlag(flags, "schema-id") || undefined
19
+ })
20
+ };
21
+ if (!body.schemaDefinitionItemId)
22
+ throw new Error("Provide --schema-id (the target schema's itemId).");
23
+ if (!Array.isArray(body.fields) && !Array.isArray(body.deletableFieldNames)) {
24
+ throw new Error("Provide --deletable-fields a,b and/or a 'fields' array via --body/--file.");
25
+ }
26
+ if (booleanFlag(flags, "dry-run")) {
27
+ writeOutput({ dryRun: true, endpoint: "/data/v4/schemas/fields", request: body }, flags);
28
+ return;
29
+ }
30
+ await confirmMutation(flags, `Save field definitions for schema '${body.schemaDefinitionItemId}'.`);
31
+ const projectKey = await selectedProject(flags);
32
+ const result = await blocksRequest("/data/v4/schemas/fields", {
33
+ body,
34
+ impersonatedProjectAuth: true,
35
+ ...requestContext(flags),
36
+ projectTenantId: projectKey
37
+ });
38
+ writeOutput(result, flags);
39
+ }
@@ -0,0 +1 @@
1
+ export declare function dataSchemaGetByName(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 dataSchemaGetByName(argv) {
7
+ const { args, flags } = parseCommand(argv);
8
+ const schemaName = args[0] || stringFlag(flags, "schema-name", { required: true });
9
+ const projectKey = await selectedProject(flags);
10
+ const result = await blocksRequest("/data/v4/schemas/info-by-name", {
11
+ impersonatedProjectAuth: true,
12
+ ...requestContext(flags),
13
+ projectTenantId: projectKey,
14
+ query: { schemaName }
15
+ });
16
+ writeOutput(result, flags);
17
+ }
@@ -0,0 +1 @@
1
+ export declare function dataSchemaGet(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 dataSchemaGet(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("/data/v4/schemas/get-by-id", {
11
+ impersonatedProjectAuth: true,
12
+ ...requestContext(flags),
13
+ projectTenantId: projectKey,
14
+ query: { id }
15
+ });
16
+ writeOutput(result, flags);
17
+ }
@@ -0,0 +1 @@
1
+ export declare function dataSchemaInfoList(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 dataSchemaInfoList(argv) {
6
+ const { flags } = parseCommand(argv);
7
+ const projectKey = await selectedProject(flags);
8
+ const result = await blocksRequest("/data/v4/schemas/info", {
9
+ impersonatedProjectAuth: true,
10
+ ...requestContext(flags),
11
+ projectTenantId: projectKey,
12
+ query: { projectKey }
13
+ });
14
+ writeOutput(result, flags);
15
+ }
@@ -0,0 +1 @@
1
+ export declare function dataSchemaInfoSave(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 dataSchemaInfoSave(argv) {
9
+ const { flags } = parseCommand(argv);
10
+ const body = {
11
+ ...(await jsonBodyFlag(flags)),
12
+ ...compact({
13
+ collectionName: stringFlag(flags, "collection-name") || undefined,
14
+ schemaName: stringFlag(flags, "schema-name") || undefined,
15
+ schemaType: optionalIntegerFlag(flags, "schema-type")
16
+ })
17
+ };
18
+ if (!body.schemaName)
19
+ throw new Error("Provide --schema-name (or set it in --body/--file).");
20
+ if (booleanFlag(flags, "dry-run")) {
21
+ writeOutput({ dryRun: true, endpoint: "/data/v4/schemas/info", request: body }, flags);
22
+ return;
23
+ }
24
+ await confirmMutation(flags, `Create schema '${body.schemaName}' (metadata only - use 'data:schema:fields' to add fields).`);
25
+ const projectKey = await selectedProject(flags);
26
+ const result = await blocksRequest("/data/v4/schemas/info", {
27
+ body,
28
+ impersonatedProjectAuth: true,
29
+ method: "POST",
30
+ ...requestContext(flags),
31
+ projectTenantId: projectKey
32
+ });
33
+ writeOutput(result, flags);
34
+ }
@@ -0,0 +1 @@
1
+ export declare function dataSchemaInfoUpdate(argv: string[]): Promise<void>;
@@ -0,0 +1,35 @@
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 dataSchemaInfoUpdate(argv) {
9
+ const { flags } = parseCommand(argv);
10
+ const body = {
11
+ ...(await jsonBodyFlag(flags)),
12
+ ...compact({
13
+ collectionName: stringFlag(flags, "collection-name") || undefined,
14
+ itemId: stringFlag(flags, "item-id") || undefined,
15
+ schemaName: stringFlag(flags, "schema-name") || undefined,
16
+ schemaType: optionalIntegerFlag(flags, "schema-type")
17
+ })
18
+ };
19
+ if (!body.itemId)
20
+ throw new Error("Provide --item-id (the existing schema's itemId).");
21
+ if (booleanFlag(flags, "dry-run")) {
22
+ writeOutput({ dryRun: true, endpoint: "/data/v4/schemas/info", request: body }, flags);
23
+ return;
24
+ }
25
+ await confirmMutation(flags, `Update schema '${body.itemId}'.`);
26
+ const projectKey = await selectedProject(flags);
27
+ const result = await blocksRequest("/data/v4/schemas/info", {
28
+ body,
29
+ impersonatedProjectAuth: true,
30
+ method: "PUT",
31
+ ...requestContext(flags),
32
+ projectTenantId: projectKey
33
+ });
34
+ writeOutput(result, flags);
35
+ }
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Composed "deploy my data model" flow: validate local schemas/rules, push schemas, deploy
3
+ * rules, then reload the data gateway so the changes actually take effect. Nothing else in
4
+ * this CLI calls data:reload automatically -- pushed schema/rule changes can otherwise sit
5
+ * staged without going live.
6
+ */
7
+ export declare function dataSync(argv: string[]): Promise<void>;
@@ -0,0 +1,46 @@
1
+ import { booleanFlag } from "../../lib/args.js";
2
+ import { confirmMutation } from "../../lib/confirm.js";
3
+ import { readRulesFile, readSchemaFiles, validateSchemas } from "../../lib/data-files.js";
4
+ import { writeOutput } from "../../lib/output.js";
5
+ import { parseCommand, selectedProject } from "../../lib/workspace.js";
6
+ import { dataReload } from "./reload.js";
7
+ import { dataRulesDeploy } from "./rules/deploy.js";
8
+ import { dataSchemaPush } from "./schema/push.js";
9
+ /**
10
+ * Composed "deploy my data model" flow: validate local schemas/rules, push schemas, deploy
11
+ * rules, then reload the data gateway so the changes actually take effect. Nothing else in
12
+ * this CLI calls data:reload automatically -- pushed schema/rule changes can otherwise sit
13
+ * staged without going live.
14
+ */
15
+ export async function dataSync(argv) {
16
+ const { flags } = parseCommand(argv);
17
+ const dryRun = booleanFlag(flags, "dry-run");
18
+ const projectKey = await selectedProject(flags);
19
+ const schemas = await readSchemaFiles();
20
+ const errors = validateSchemas(schemas);
21
+ try {
22
+ await readRulesFile();
23
+ }
24
+ catch (error) {
25
+ if (!(dryRun && error.code === "ENOENT")) {
26
+ errors.push(`rules file: ${error.message}`);
27
+ }
28
+ }
29
+ if (errors.length)
30
+ throw new Error(`Data model validation failed:\n${errors.join("\n")}`);
31
+ if (dryRun) {
32
+ writeOutput({ dryRun: true, project: projectKey, schemas: schemas.length, steps: ["data:schema:push", "data:rules:deploy", "data:reload"] }, flags);
33
+ return;
34
+ }
35
+ await confirmMutation(flags, `Sync data model for project '${projectKey}': push ${schemas.length} schema(s), deploy rules, then reload the gateway.`);
36
+ // Each step below prints its own output/confirmation-skip via --yes; this is 3 separate
37
+ // JSON blocks (one per step), not one combined document, since each step is a full
38
+ // existing command reused as-is rather than re-implemented to return a value.
39
+ const subArgv = [...argv.filter((token) => token !== "--dry-run"), "--yes"];
40
+ console.log("== data:schema:push ==");
41
+ await dataSchemaPush(subArgv);
42
+ console.log("== data:rules:deploy ==");
43
+ await dataRulesDeploy(subArgv);
44
+ console.log("== data:reload ==");
45
+ await dataReload(subArgv);
46
+ }
@@ -0,0 +1 @@
1
+ export declare function dataValidationBySchemaField(argv: string[]): Promise<void>;