ekwo-os 0.4.1

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 (361) hide show
  1. package/README.md +873 -0
  2. package/dist/args.d.ts +57 -0
  3. package/dist/args.d.ts.map +1 -0
  4. package/dist/args.js +134 -0
  5. package/dist/args.js.map +1 -0
  6. package/dist/assets/expected-objects.json +9432 -0
  7. package/dist/assets/migrations/20260911120000_core_companies.sql +260 -0
  8. package/dist/assets/migrations/20260911120100_accounts_journals.sql +211 -0
  9. package/dist/assets/migrations/20260911120200_contacts.sql +90 -0
  10. package/dist/assets/migrations/20260911120300_taxes.sql +146 -0
  11. package/dist/assets/migrations/20260911120400_entries.sql +338 -0
  12. package/dist/assets/migrations/20260911120500_documents.sql +279 -0
  13. package/dist/assets/migrations/20260911120600_payments_reconciliation.sql +251 -0
  14. package/dist/assets/migrations/20260911120700_bank.sql +178 -0
  15. package/dist/assets/migrations/20260911120800_analytics_attachments.sql +128 -0
  16. package/dist/assets/migrations/20260911120900_post_document.sql +279 -0
  17. package/dist/assets/migrations/20260911121000_reporting.sql +235 -0
  18. package/dist/assets/migrations/20260911121100_country_templates.sql +226 -0
  19. package/dist/assets/migrations/20260911121200_fec.sql +71 -0
  20. package/dist/assets/migrations/20260911130000_instance.sql +77 -0
  21. package/dist/assets/migrations/20260911130100_instance_members.sql +224 -0
  22. package/dist/assets/migrations/20260911140000_instance_admins.sql +112 -0
  23. package/dist/assets/migrations/20260911160000_tax_posting_templates_unique.sql +17 -0
  24. package/dist/assets/migrations/20260911170000_document_amount_paid.sql +82 -0
  25. package/dist/assets/migrations/20260911173000_post_payment.sql +122 -0
  26. package/dist/assets/migrations/20260911173100_sequence_counters_under_rls.sql +84 -0
  27. package/dist/assets/migrations/20260911183000_country_journal_defaults.sql +143 -0
  28. package/dist/assets/migrations/20260911193853_line_account_defaults.sql +274 -0
  29. package/dist/assets/migrations/20260911195054_products.sql +221 -0
  30. package/dist/assets/migrations/20260911210131_anon_surface.sql +85 -0
  31. package/dist/assets/migrations/20260912074712_country_packs.sql +318 -0
  32. package/dist/assets/migrations/20260912080311_report_code_and_region.sql +198 -0
  33. package/dist/assets/migrations/20260912081014_pack_certification_maintained.sql +31 -0
  34. package/dist/assets/migrations/20260912081015_pack_certification_backfill.sql +16 -0
  35. package/dist/assets/migrations/20260912090407_tax_report_boxes.sql +329 -0
  36. package/dist/assets/migrations/20260912091917_tax_on_base_value.sql +25 -0
  37. package/dist/assets/migrations/20260912091918_tax_engine_columns.sql +776 -0
  38. package/dist/assets/migrations/20260912094412_opening_and_closing.sql +759 -0
  39. package/dist/assets/migrations/20260912095825_charts_of_accounts.sql +326 -0
  40. package/dist/assets/migrations/20260912100412_financial_statements.sql +632 -0
  41. package/dist/assets/migrations/20260912104719_one_formula_evaluator.sql +209 -0
  42. package/dist/assets/migrations/20260912105720_entry_kind_appropriation.sql +26 -0
  43. package/dist/assets/migrations/20260912105721_appropriation_entry_kind.sql +444 -0
  44. package/dist/assets/migrations/20260912111751_document_rules.sql +274 -0
  45. package/dist/assets/migrations/20260912112132_cash_basis_vat_and_fx.sql +1189 -0
  46. package/dist/assets/migrations/20260913074512_modules.sql +493 -0
  47. package/dist/assets/migrations/20260913075903_asset_disposal_roles.sql +47 -0
  48. package/dist/assets/migrations/20260913083216_capabilities.sql +637 -0
  49. package/dist/assets/migrations/20260913083901_company_invitations.sql +262 -0
  50. package/dist/assets/migrations/20260913084402_user_preferences.sql +376 -0
  51. package/dist/assets/migrations/20260913084847_company_profile.sql +261 -0
  52. package/dist/assets/migrations/20260913085436_numbering_reads_the_pack.sql +235 -0
  53. package/dist/assets/migrations/20260913085932_api_keys.sql +303 -0
  54. package/dist/assets/migrations/20260913090216_fiscal_year_bounds.sql +159 -0
  55. package/dist/assets/migrations/20260913092527_entries_import.sql +219 -0
  56. package/dist/assets/migrations/20260913101536_null_safe_guards.sql +188 -0
  57. package/dist/assets/migrations/20260913102115_installer_is_named.sql +462 -0
  58. package/dist/assets/migrations/20260913102758_no_currency_default.sql +138 -0
  59. package/dist/assets/migrations/20260913103355_cash_basis_needs_a_box.sql +453 -0
  60. package/dist/assets/migrations/20260913104014_aged_balance_named_group.sql +79 -0
  61. package/dist/assets/migrations/20260913104232_foreign_key_indexes.sql +144 -0
  62. package/dist/assets/migrations/20260913105120_declared_no_reader.sql +41 -0
  63. package/dist/assets/migrations/20260913111407_pack_languages.sql +223 -0
  64. package/dist/assets/migrations/20260913112233_schema_comments_for_a_reader.sql +27 -0
  65. package/dist/assets/migrations/20260913114535_fec_opening_balances.sql +307 -0
  66. package/dist/assets/migrations/20260914103412_audit_log.sql +509 -0
  67. package/dist/assets/migrations/20260914111907_pack_upgrade.sql +428 -0
  68. package/dist/assets/migrations/20260914120500_rounding_reads_the_currency.sql +206 -0
  69. package/dist/assets/migrations/20260914121200_amounts_round_at_the_currency.sql +2403 -0
  70. package/dist/assets/migrations/20260914134325_schema_version_0_2_0.sql +36 -0
  71. package/dist/assets/migrations/20260914143915_accounts_in_use.sql +428 -0
  72. package/dist/assets/migrations/20260914144731_account_code_frozen.sql +99 -0
  73. package/dist/assets/migrations/20260914151207_schema_grants_its_own_rights.sql +284 -0
  74. package/dist/assets/migrations/20260914152840_pack_upgrade_records_its_own_line.sql +237 -0
  75. package/dist/assets/migrations/20260914163943_declaration_periodicity.sql +349 -0
  76. package/dist/assets/migrations/20260915094000_foreign_services_received.sql +37 -0
  77. package/dist/assets/migrations/20260915094500_mentions_read_a_foreign_service.sql +72 -0
  78. package/dist/assets/migrations/20260915153000_document_shares.sql +568 -0
  79. package/dist/assets/migrations/20260915160000_ec_sales_list.sql +181 -0
  80. package/dist/assets/migrations/20260915161842_pack_sources.sql +56 -0
  81. package/dist/assets/migrations/20260915170500_schema_version_0_3_0.sql +45 -0
  82. package/dist/assets/migrations/20260915174500_a_vat_category_is_a_code.sql +177 -0
  83. package/dist/assets/migrations/20260915180000_document_rule_references.sql +85 -0
  84. package/dist/assets/migrations/20260915181000_territories.sql +342 -0
  85. package/dist/assets/migrations/20260915181500_ec_sales_list_reads_the_territories.sql +222 -0
  86. package/dist/assets/migrations/20260915182000_intracom_triangular.sql +53 -0
  87. package/dist/assets/migrations/20260915182500_a_triangular_supply_says_reverse_charge.sql +99 -0
  88. package/dist/assets/migrations/20260915191200_a_document_knows_its_language.sql +633 -0
  89. package/dist/assets/migrations/20260915195000_a_price_that_holds_its_tax.sql +649 -0
  90. package/dist/assets/migrations/20260915200000_a_posting_names_its_boxes.sql +1004 -0
  91. package/dist/assets/migrations/20260916094500_a_company_files_more_than_one_declaration.sql +795 -0
  92. package/dist/assets/migrations/20260916103000_a_ledger_line_names_its_posting.sql +902 -0
  93. package/dist/assets/migrations/20260916123000_a_vocabulary_for_a_tax_that_is_not_a_vat.sql +144 -0
  94. package/dist/assets/migrations/20260916124000_a_box_can_be_a_rate_of_a_box.sql +525 -0
  95. package/dist/assets/migrations/20260916125000_a_tax_follows_the_territory.sql +1318 -0
  96. package/dist/assets/migrations/20260916126000_a_tax_point_and_its_exception.sql +1211 -0
  97. package/dist/assets/migrations/20260917090000_a_counterparty_that_learns.sql +561 -0
  98. package/dist/assets/migrations/20260917120000_what_the_money_pays.sql +545 -0
  99. package/dist/assets/migrations/20260917150000_a_filing_is_a_row.sql +488 -0
  100. package/dist/assets/migrations/20260917170000_when_it_is_due.sql +194 -0
  101. package/dist/assets/migrations/20260917180000_a_box_is_a_number_and_a_kind.sql +213 -0
  102. package/dist/assets/migrations/20260917190000_what_a_declaration_owes.sql +486 -0
  103. package/dist/assets/migrations/20260917200000_what_moved_after_it_went.sql +227 -0
  104. package/dist/assets/migrations/20260918090000_a_form_names_its_file.sql +27 -0
  105. package/dist/assets/migrations/20260918110000_a_deposit_and_what_came_back.sql +286 -0
  106. package/dist/assets/migrations/20260918113741_a_fourth_preset_is_named.sql +9 -0
  107. package/dist/assets/migrations/20260918113807_a_client_reads_and_hands_over.sql +96 -0
  108. package/dist/assets/migrations/20260918114322_two_definer_functions_check_their_caller.sql +75 -0
  109. package/dist/assets/migrations/20260918130000_every_company_somebody_keeps.sql +177 -0
  110. package/dist/assets/migrations/20260918140000_a_session_nobody_prepared.sql +40 -0
  111. package/dist/assets/migrations/20260918141107_a_line_keeps_the_tax_it_was_posted_with.sql +256 -0
  112. package/dist/assets/migrations/20260918141342_a_company_has_an_electronic_address.sql +66 -0
  113. package/dist/assets/migrations/20260918141605_an_invoice_reads_whole_from_the_views.sql +313 -0
  114. package/dist/assets/migrations/20260918141627_a_policy_asks_once.sql +132 -0
  115. package/dist/assets/migrations/20260918143352_a_suggestion_reads_the_words_once.sql +204 -0
  116. package/dist/assets/migrations/20260918143417_a_reference_of_the_caller_and_a_rehearsal.sql +115 -0
  117. package/dist/assets/migrations/20260918150712_a_company_leaves_with_its_books.sql +1119 -0
  118. package/dist/assets/migrations/20260918150931_a_statement_is_imported_once.sql +654 -0
  119. package/dist/assets/migrations/20260918161204_a_posted_document_does_not_move.sql +437 -0
  120. package/dist/assets/migrations/20260918161538_a_posted_entry_does_not_move.sql +252 -0
  121. package/dist/assets/migrations/20260918171946_an_entry_is_posted_by_post_entry.sql +289 -0
  122. package/dist/assets/migrations/20260918174312_schema_version_0_4_0.sql +53 -0
  123. package/dist/assets/modules/assets/module.json +13 -0
  124. package/dist/assets/modules/assets/supabase/migrations/20260913081447_assets.sql +1190 -0
  125. package/dist/assets/modules/assets/supabase/migrations/20260913104234_foreign_key_indexes.sql +47 -0
  126. package/dist/assets/modules/assets/supabase/migrations/20260913104500_assets_capabilities.sql +145 -0
  127. package/dist/assets/modules/assets/supabase/migrations/20260914122100_assets_round_at_the_currency.sql +564 -0
  128. package/dist/assets/modules/assets/supabase/migrations/20260914145012_assets_accounts_in_use.sql +37 -0
  129. package/dist/assets/modules/assets/supabase/migrations/20260914151530_assets_grants_its_own_rights.sql +63 -0
  130. package/dist/assets/modules/assets/supabase/migrations/20260918113912_assets_client_reads.sql +20 -0
  131. package/dist/assets/modules/assets/supabase/migrations/20260918150801_assets_leave_with_the_company.sql +41 -0
  132. package/dist/assets/modules/budgets/module.json +12 -0
  133. package/dist/assets/modules/budgets/supabase/migrations/20260913083012_budgets.sql +210 -0
  134. package/dist/assets/modules/budgets/supabase/migrations/20260913104233_foreign_key_indexes.sql +37 -0
  135. package/dist/assets/modules/budgets/supabase/migrations/20260913104501_budgets_capabilities.sql +72 -0
  136. package/dist/assets/modules/budgets/supabase/migrations/20260914122400_budgets_round_at_the_currency.sql +68 -0
  137. package/dist/assets/modules/budgets/supabase/migrations/20260914145048_budgets_accounts_in_use.sql +30 -0
  138. package/dist/assets/modules/budgets/supabase/migrations/20260914151812_budgets_grants_its_own_rights.sql +31 -0
  139. package/dist/assets/modules/budgets/supabase/migrations/20260918113954_budgets_client_reads.sql +20 -0
  140. package/dist/assets/modules/budgets/supabase/migrations/20260918150823_budgets_leave_with_the_company.sql +37 -0
  141. package/dist/assets/modules/schema/module.1.json +69 -0
  142. package/dist/assets/seed/00_currencies.sql +15 -0
  143. package/dist/assets/seed/00_territories.sql +280 -0
  144. package/dist/assets/seed/05_framework_generic.sql +110 -0
  145. package/dist/assets/seed/10_pack_be.sql +1284 -0
  146. package/dist/assets/seed/11_pack_fr.sql +1112 -0
  147. package/dist/assets/seed/12_pack_lu.sql +2484 -0
  148. package/dist/assets/seed/13_pack_ee.sql +733 -0
  149. package/dist/assets/seed/14_pack_gb.sql +796 -0
  150. package/dist/assets/seed/15_pack_us.sql +751 -0
  151. package/dist/assets/seed/90_demo_company.sql +368 -0
  152. package/dist/assets/seed/modules/assets/10_pack_be.sql +58 -0
  153. package/dist/assets/seed/modules/assets/11_pack_fr.sql +57 -0
  154. package/dist/assets/seed/modules/assets/14_pack_gb.sql +58 -0
  155. package/dist/assets/seed/modules/assets/15_pack_us.sql +60 -0
  156. package/dist/auth.d.ts +59 -0
  157. package/dist/auth.d.ts.map +1 -0
  158. package/dist/auth.js +134 -0
  159. package/dist/auth.js.map +1 -0
  160. package/dist/bin.d.ts +6 -0
  161. package/dist/bin.d.ts.map +1 -0
  162. package/dist/bin.js +8 -0
  163. package/dist/bin.js.map +1 -0
  164. package/dist/books.d.ts +60 -0
  165. package/dist/books.d.ts.map +1 -0
  166. package/dist/books.js +168 -0
  167. package/dist/books.js.map +1 -0
  168. package/dist/bootstrap.d.ts +236 -0
  169. package/dist/bootstrap.d.ts.map +1 -0
  170. package/dist/bootstrap.js +459 -0
  171. package/dist/bootstrap.js.map +1 -0
  172. package/dist/bundle.d.ts +27 -0
  173. package/dist/bundle.d.ts.map +1 -0
  174. package/dist/bundle.js +47 -0
  175. package/dist/bundle.js.map +1 -0
  176. package/dist/checklist.d.ts +35 -0
  177. package/dist/checklist.d.ts.map +1 -0
  178. package/dist/checklist.js +64 -0
  179. package/dist/checklist.js.map +1 -0
  180. package/dist/cli.d.ts +14 -0
  181. package/dist/cli.d.ts.map +1 -0
  182. package/dist/cli.js +318 -0
  183. package/dist/cli.js.map +1 -0
  184. package/dist/commands/company.d.ts +59 -0
  185. package/dist/commands/company.d.ts.map +1 -0
  186. package/dist/commands/company.js +287 -0
  187. package/dist/commands/company.js.map +1 -0
  188. package/dist/commands/contact.d.ts +9 -0
  189. package/dist/commands/contact.d.ts.map +1 -0
  190. package/dist/commands/contact.js +82 -0
  191. package/dist/commands/contact.js.map +1 -0
  192. package/dist/commands/demo.d.ts +19 -0
  193. package/dist/commands/demo.d.ts.map +1 -0
  194. package/dist/commands/demo.js +72 -0
  195. package/dist/commands/demo.js.map +1 -0
  196. package/dist/commands/doctor.d.ts +12 -0
  197. package/dist/commands/doctor.d.ts.map +1 -0
  198. package/dist/commands/doctor.js +68 -0
  199. package/dist/commands/doctor.js.map +1 -0
  200. package/dist/commands/document.d.ts +17 -0
  201. package/dist/commands/document.d.ts.map +1 -0
  202. package/dist/commands/document.js +217 -0
  203. package/dist/commands/document.js.map +1 -0
  204. package/dist/commands/init.d.ts +31 -0
  205. package/dist/commands/init.d.ts.map +1 -0
  206. package/dist/commands/init.js +535 -0
  207. package/dist/commands/init.js.map +1 -0
  208. package/dist/commands/login.d.ts +24 -0
  209. package/dist/commands/login.d.ts.map +1 -0
  210. package/dist/commands/login.js +128 -0
  211. package/dist/commands/login.js.map +1 -0
  212. package/dist/commands/migrate.d.ts +30 -0
  213. package/dist/commands/migrate.d.ts.map +1 -0
  214. package/dist/commands/migrate.js +115 -0
  215. package/dist/commands/migrate.js.map +1 -0
  216. package/dist/commands/module.d.ts +32 -0
  217. package/dist/commands/module.d.ts.map +1 -0
  218. package/dist/commands/module.js +285 -0
  219. package/dist/commands/module.js.map +1 -0
  220. package/dist/commands/pack.d.ts +22 -0
  221. package/dist/commands/pack.d.ts.map +1 -0
  222. package/dist/commands/pack.js +481 -0
  223. package/dist/commands/pack.js.map +1 -0
  224. package/dist/commands/payment.d.ts +15 -0
  225. package/dist/commands/payment.d.ts.map +1 -0
  226. package/dist/commands/payment.js +97 -0
  227. package/dist/commands/payment.js.map +1 -0
  228. package/dist/commands/register.d.ts +20 -0
  229. package/dist/commands/register.d.ts.map +1 -0
  230. package/dist/commands/register.js +134 -0
  231. package/dist/commands/register.js.map +1 -0
  232. package/dist/commands/status.d.ts +8 -0
  233. package/dist/commands/status.d.ts.map +1 -0
  234. package/dist/commands/status.js +134 -0
  235. package/dist/commands/status.js.map +1 -0
  236. package/dist/commands/whoami.d.ts +21 -0
  237. package/dist/commands/whoami.d.ts.map +1 -0
  238. package/dist/commands/whoami.js +133 -0
  239. package/dist/commands/whoami.js.map +1 -0
  240. package/dist/company.d.ts +16 -0
  241. package/dist/company.d.ts.map +1 -0
  242. package/dist/company.js +26 -0
  243. package/dist/company.js.map +1 -0
  244. package/dist/config.d.ts +24 -0
  245. package/dist/config.d.ts.map +1 -0
  246. package/dist/config.js +50 -0
  247. package/dist/config.js.map +1 -0
  248. package/dist/connection.d.ts +79 -0
  249. package/dist/connection.d.ts.map +1 -0
  250. package/dist/connection.js +116 -0
  251. package/dist/connection.js.map +1 -0
  252. package/dist/context.d.ts +47 -0
  253. package/dist/context.d.ts.map +1 -0
  254. package/dist/context.js +93 -0
  255. package/dist/context.js.map +1 -0
  256. package/dist/doctor.d.ts +45 -0
  257. package/dist/doctor.d.ts.map +1 -0
  258. package/dist/doctor.js +448 -0
  259. package/dist/doctor.js.map +1 -0
  260. package/dist/grants.d.ts +88 -0
  261. package/dist/grants.d.ts.map +1 -0
  262. package/dist/grants.js +174 -0
  263. package/dist/grants.js.map +1 -0
  264. package/dist/identity.d.ts +54 -0
  265. package/dist/identity.d.ts.map +1 -0
  266. package/dist/identity.js +132 -0
  267. package/dist/identity.js.map +1 -0
  268. package/dist/index.d.ts +44 -0
  269. package/dist/index.d.ts.map +1 -0
  270. package/dist/index.js +43 -0
  271. package/dist/index.js.map +1 -0
  272. package/dist/inventory.d.ts +155 -0
  273. package/dist/inventory.d.ts.map +1 -0
  274. package/dist/inventory.js +303 -0
  275. package/dist/inventory.js.map +1 -0
  276. package/dist/migrations.d.ts +76 -0
  277. package/dist/migrations.d.ts.map +1 -0
  278. package/dist/migrations.js +226 -0
  279. package/dist/migrations.js.map +1 -0
  280. package/dist/module/read.d.ts +91 -0
  281. package/dist/module/read.d.ts.map +1 -0
  282. package/dist/module/read.js +172 -0
  283. package/dist/module/read.js.map +1 -0
  284. package/dist/output.d.ts +110 -0
  285. package/dist/output.d.ts.map +1 -0
  286. package/dist/output.js +173 -0
  287. package/dist/output.js.map +1 -0
  288. package/dist/pack/certification.d.ts +27 -0
  289. package/dist/pack/certification.d.ts.map +1 -0
  290. package/dist/pack/certification.js +38 -0
  291. package/dist/pack/certification.js.map +1 -0
  292. package/dist/pack/compile.d.ts +75 -0
  293. package/dist/pack/compile.d.ts.map +1 -0
  294. package/dist/pack/compile.js +801 -0
  295. package/dist/pack/compile.js.map +1 -0
  296. package/dist/pack/filing.d.ts +48 -0
  297. package/dist/pack/filing.d.ts.map +1 -0
  298. package/dist/pack/filing.js +56 -0
  299. package/dist/pack/filing.js.map +1 -0
  300. package/dist/pack/read.d.ts +766 -0
  301. package/dist/pack/read.d.ts.map +1 -0
  302. package/dist/pack/read.js +2336 -0
  303. package/dist/pack/read.js.map +1 -0
  304. package/dist/pack/schema.d.ts +26 -0
  305. package/dist/pack/schema.d.ts.map +1 -0
  306. package/dist/pack/schema.js +181 -0
  307. package/dist/pack/schema.js.map +1 -0
  308. package/dist/pack/territories.d.ts +98 -0
  309. package/dist/pack/territories.d.ts.map +1 -0
  310. package/dist/pack/territories.js +0 -0
  311. package/dist/pack/territories.js.map +1 -0
  312. package/dist/pack/upgrade.d.ts +86 -0
  313. package/dist/pack/upgrade.d.ts.map +1 -0
  314. package/dist/pack/upgrade.js +76 -0
  315. package/dist/pack/upgrade.js.map +1 -0
  316. package/dist/pack/vat-codes.d.ts +273 -0
  317. package/dist/pack/vat-codes.d.ts.map +1 -0
  318. package/dist/pack/vat-codes.js +513 -0
  319. package/dist/pack/vat-codes.js.map +1 -0
  320. package/dist/profiles.d.ts +67 -0
  321. package/dist/profiles.d.ts.map +1 -0
  322. package/dist/profiles.js +187 -0
  323. package/dist/profiles.js.map +1 -0
  324. package/dist/prompt.d.ts +40 -0
  325. package/dist/prompt.d.ts.map +1 -0
  326. package/dist/prompt.js +120 -0
  327. package/dist/prompt.js.map +1 -0
  328. package/dist/registry.d.ts +84 -0
  329. package/dist/registry.d.ts.map +1 -0
  330. package/dist/registry.js +104 -0
  331. package/dist/registry.js.map +1 -0
  332. package/dist/rest.d.ts +81 -0
  333. package/dist/rest.d.ts.map +1 -0
  334. package/dist/rest.js +245 -0
  335. package/dist/rest.js.map +1 -0
  336. package/dist/schema.d.ts +15 -0
  337. package/dist/schema.d.ts.map +1 -0
  338. package/dist/schema.js +15 -0
  339. package/dist/schema.js.map +1 -0
  340. package/dist/seeds.d.ts +27 -0
  341. package/dist/seeds.d.ts.map +1 -0
  342. package/dist/seeds.js +47 -0
  343. package/dist/seeds.js.map +1 -0
  344. package/dist/session.d.ts +39 -0
  345. package/dist/session.d.ts.map +1 -0
  346. package/dist/session.js +92 -0
  347. package/dist/session.js.map +1 -0
  348. package/dist/sql.d.ts +48 -0
  349. package/dist/sql.d.ts.map +1 -0
  350. package/dist/sql.js +112 -0
  351. package/dist/sql.js.map +1 -0
  352. package/dist/status.d.ts +94 -0
  353. package/dist/status.d.ts.map +1 -0
  354. package/dist/status.js +120 -0
  355. package/dist/status.js.map +1 -0
  356. package/dist/ui.d.ts +55 -0
  357. package/dist/ui.d.ts.map +1 -0
  358. package/dist/ui.js +114 -0
  359. package/dist/ui.js.map +1 -0
  360. package/package.json +29 -0
  361. package/schema/output.1.json +613 -0
@@ -0,0 +1,613 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/Ekwo-ai/ekwo-os/blob/main/packages/cli/schema/output.1.json",
4
+ "title": "What every `ekwo` command writes to the standard output under --json",
5
+ "$comment": "One document per run, whatever happened. `data` is what the command has to say and its shape depends on the command: it is described under $defs/data, keyed by the value of `command`. An amount is always a decimal string and never a JSON number; a date is ISO 8601; a count is an integer.",
6
+ "type": "object",
7
+ "required": ["ok", "command", "exitCode", "warnings"],
8
+ "additionalProperties": false,
9
+ "properties": {
10
+ "ok": { "type": "boolean", "$comment": "exitCode is 0." },
11
+ "command": { "type": "string", "minLength": 1 },
12
+ "exitCode": {
13
+ "enum": [0, 1, 2, 3],
14
+ "$comment": "0 done. 1 a technical failure, or a check that found something (then `data` says what). 2 the command was called wrong. 3 the database refused."
15
+ },
16
+ "data": { "type": "object" },
17
+ "context": { "$ref": "#/$defs/context" },
18
+ "warnings": { "type": "array", "items": { "type": "string" } },
19
+ "error": { "$ref": "#/$defs/error" }
20
+ },
21
+ "$defs": {
22
+ "error": {
23
+ "type": "object",
24
+ "required": ["kind", "message"],
25
+ "additionalProperties": false,
26
+ "properties": {
27
+ "kind": { "enum": ["refusal", "usage", "technical"] },
28
+ "name": {
29
+ "type": "string",
30
+ "pattern": "^[a-z][a-z0-9_]{3,}$",
31
+ "$comment": "The name the message starts with, e.g. period_locked. Absent when the message carries none; never invented."
32
+ },
33
+ "message": { "type": "string", "$comment": "Word for word. For a refusal, what the database raised." },
34
+ "sqlstate": { "type": "string", "pattern": "^[0-9A-Z]{5}$" },
35
+ "detail": { "type": "string" },
36
+ "hint": { "type": "string" }
37
+ }
38
+ },
39
+ "context": {
40
+ "$comment": "On whose behalf the answer was rendered. Present on every command that acts as a person (login, use, whoami, and every bookkeeping verb), on success and on a refusal alike, as soon as it is known; absent on the commands that install and operate. `company` is null when none is in use: check it before believing the rest.",
41
+ "type": "object",
42
+ "required": ["profile", "instance", "company"],
43
+ "additionalProperties": false,
44
+ "properties": {
45
+ "profile": { "oneOf": [{ "type": "string" }, { "type": "null" }], "$comment": "null when the environment said who." },
46
+ "instance": { "type": "string" },
47
+ "company": { "oneOf": [{ "$ref": "#/$defs/companyRef" }, { "type": "null" }] }
48
+ }
49
+ },
50
+ "row": {
51
+ "$comment": "A row as the database holds it, in the columns the MCP server reads too: snake case, amounts and dates as strings. The columns are the schema's (docs/schema.md), not this file's.",
52
+ "type": "object"
53
+ },
54
+ "documentAnswer": {
55
+ "$comment": "What getDocument() of @ekwo-ai/core answers — the MCP server's get_document. Every total is the database's. `replayed` is true when the document had already been created under this --ref.",
56
+ "type": "object",
57
+ "required": ["document", "lines"],
58
+ "properties": {
59
+ "document": { "$ref": "#/$defs/row" },
60
+ "lines": { "type": "array", "items": { "$ref": "#/$defs/row" } },
61
+ "entry": { "oneOf": [{ "$ref": "#/$defs/row" }, { "type": "null" }] },
62
+ "entry_lines": { "type": "array" },
63
+ "replayed": { "const": true }
64
+ }
65
+ },
66
+ "companyRef": {
67
+ "type": "object",
68
+ "required": ["id", "name"],
69
+ "additionalProperties": false,
70
+ "properties": { "id": { "type": "string" }, "name": { "type": "string" } }
71
+ },
72
+ "visibleCompany": {
73
+ "type": "object",
74
+ "required": ["id", "name", "country", "currency_code"],
75
+ "additionalProperties": false,
76
+ "properties": {
77
+ "id": { "type": "string" },
78
+ "name": { "type": "string" },
79
+ "country": { "type": "string" },
80
+ "currency_code": { "type": "string" },
81
+ "inUse": { "type": "boolean" }
82
+ }
83
+ },
84
+ "sessionUser": {
85
+ "type": "object",
86
+ "required": ["id", "email"],
87
+ "additionalProperties": false,
88
+ "properties": { "id": { "type": "string" }, "email": { "oneOf": [{ "type": "string" }, { "type": "null" }] } }
89
+ },
90
+ "migrationFile": {
91
+ "type": "object",
92
+ "required": ["version", "file"],
93
+ "properties": { "version": { "type": "string" }, "name": { "type": "string" }, "file": { "type": "string" } }
94
+ },
95
+ "packChange": {
96
+ "type": "object",
97
+ "required": ["object", "key", "change", "rule"],
98
+ "properties": {
99
+ "object": { "type": "string" },
100
+ "key": { "type": "string" },
101
+ "change": { "type": "string" },
102
+ "rule": { "enum": ["addition", "closure", "review"] },
103
+ "detail": { "type": "object" }
104
+ }
105
+ },
106
+ "data": {
107
+ "help": {
108
+ "type": "object",
109
+ "required": ["version", "commands"],
110
+ "additionalProperties": false,
111
+ "properties": {
112
+ "version": { "type": "string" },
113
+ "commands": { "type": "array", "items": { "type": "string" } }
114
+ }
115
+ },
116
+ "version": {
117
+ "type": "object",
118
+ "required": ["version"],
119
+ "additionalProperties": false,
120
+ "properties": { "version": { "type": "string" } }
121
+ },
122
+ "init": {
123
+ "type": "object",
124
+ "required": [
125
+ "organization", "instanceId", "adminUserId", "company", "fiscalYear", "filingPeriods",
126
+ "bankAccountId", "migrations", "steps", "schemaVersion", "demo", "configFile"
127
+ ],
128
+ "additionalProperties": false,
129
+ "properties": {
130
+ "organization": { "type": "string" },
131
+ "instanceId": { "type": "string" },
132
+ "adminUserId": { "type": "string" },
133
+ "company": {
134
+ "type": "object",
135
+ "required": ["id", "name", "country", "currency", "language", "chart", "packVersion"],
136
+ "additionalProperties": false,
137
+ "properties": {
138
+ "id": { "type": "string" },
139
+ "name": { "type": "string" },
140
+ "country": { "type": "string" },
141
+ "currency": { "type": "string" },
142
+ "language": { "type": "string" },
143
+ "chart": { "type": ["string", "null"] },
144
+ "packVersion": { "type": ["string", "null"] }
145
+ }
146
+ },
147
+ "fiscalYear": {
148
+ "type": "object",
149
+ "required": ["name", "start", "end"],
150
+ "additionalProperties": false,
151
+ "properties": {
152
+ "name": { "type": "string" },
153
+ "start": { "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}$" },
154
+ "end": { "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}$" }
155
+ }
156
+ },
157
+ "filingPeriods": { "type": "object" },
158
+ "bankAccountId": { "type": ["string", "null"] },
159
+ "migrations": {
160
+ "type": "object",
161
+ "required": ["applied", "alreadyApplied"],
162
+ "additionalProperties": false,
163
+ "properties": {
164
+ "applied": { "type": "array", "items": { "type": "string" } },
165
+ "alreadyApplied": { "type": "integer", "minimum": 0 }
166
+ }
167
+ },
168
+ "steps": {
169
+ "type": "array",
170
+ "items": {
171
+ "type": "object",
172
+ "required": ["name", "outcome"],
173
+ "properties": {
174
+ "name": { "type": "string" },
175
+ "outcome": { "type": "string" },
176
+ "detail": { "type": "string" }
177
+ }
178
+ }
179
+ },
180
+ "schemaVersion": { "type": ["string", "null"] },
181
+ "demo": { "type": "boolean" },
182
+ "configFile": { "type": "string" }
183
+ }
184
+ },
185
+ "migrate": {
186
+ "type": "object",
187
+ "required": ["applied"],
188
+ "additionalProperties": false,
189
+ "properties": {
190
+ "alreadyApplied": { "type": "integer", "minimum": 0 },
191
+ "applied": { "type": "array", "items": { "type": "string" } },
192
+ "moduleMigrations": { "type": "integer", "minimum": 0 },
193
+ "seeds": { "type": "array", "items": { "type": "string" } },
194
+ "schemaVersion": { "type": ["string", "null"] },
195
+ "pending": { "type": "array", "items": { "type": "string" } },
196
+ "unknown": {
197
+ "type": "array",
198
+ "items": { "type": "string" },
199
+ "$comment": "Versions this database ran that this release does not carry. When present nothing was applied: upgrade the CLI first."
200
+ }
201
+ }
202
+ },
203
+ "status": {
204
+ "type": "object",
205
+ "required": [
206
+ "schemaInstalled", "installedVersion", "availableVersion", "appliedCount",
207
+ "pending", "unknown", "admins", "companies", "packs"
208
+ ],
209
+ "properties": {
210
+ "schemaInstalled": { "type": "boolean" },
211
+ "installedVersion": { "type": ["string", "null"] },
212
+ "availableVersion": { "type": ["string", "null"] },
213
+ "appliedCount": { "type": "integer", "minimum": 0 },
214
+ "pending": { "type": "array", "items": { "$ref": "#/$defs/migrationFile" } },
215
+ "unknown": { "type": "array", "items": { "type": "string" } },
216
+ "instance": { "type": "object" },
217
+ "admins": { "type": "integer", "minimum": 0 },
218
+ "companies": {
219
+ "type": "array",
220
+ "items": {
221
+ "type": "object",
222
+ "required": ["name", "country", "accounts", "entries", "fiscalYears", "closedFiscalYears", "filingPeriods"],
223
+ "properties": {
224
+ "name": { "type": "string" },
225
+ "country": { "type": "string" },
226
+ "accounts": { "type": "integer" },
227
+ "entries": { "type": "integer" },
228
+ "fiscalYears": { "type": "integer" },
229
+ "closedFiscalYears": { "type": "integer" },
230
+ "packVersion": { "type": ["string", "null"] },
231
+ "chartCode": { "type": ["string", "null"] },
232
+ "vatPeriod": { "type": ["string", "null"] },
233
+ "filingPeriods": { "type": "array", "items": { "type": "object" } },
234
+ "liveShares": { "type": "integer" }
235
+ }
236
+ }
237
+ },
238
+ "packs": {
239
+ "type": "array",
240
+ "items": {
241
+ "type": "object",
242
+ "required": ["country", "name", "version", "charts", "certificationStatus"],
243
+ "properties": {
244
+ "country": { "type": "string" },
245
+ "name": { "type": "string" },
246
+ "version": { "type": "string" },
247
+ "charts": { "type": "array", "items": { "type": "object" } },
248
+ "certificationStatus": { "type": "string" },
249
+ "certifiedBy": { "type": ["string", "null"] },
250
+ "certifiedAt": { "type": ["string", "null"] },
251
+ "einvoiceProfile": { "type": ["string", "null"] }
252
+ }
253
+ }
254
+ }
255
+ }
256
+ },
257
+ "doctor": {
258
+ "type": "object",
259
+ "required": ["checks", "problems", "warnings"],
260
+ "additionalProperties": false,
261
+ "properties": {
262
+ "checks": {
263
+ "type": "array",
264
+ "items": {
265
+ "type": "object",
266
+ "required": ["name", "severity", "summary"],
267
+ "additionalProperties": false,
268
+ "properties": {
269
+ "name": { "type": "string" },
270
+ "severity": { "enum": ["ok", "warning", "problem"] },
271
+ "summary": { "type": "string" },
272
+ "details": { "type": "array", "items": { "type": "string" } },
273
+ "data": { "type": "object" }
274
+ }
275
+ }
276
+ },
277
+ "problems": { "type": "integer", "minimum": 0 },
278
+ "warnings": { "type": "integer", "minimum": 0 }
279
+ }
280
+ },
281
+ "module list": {
282
+ "type": "object",
283
+ "required": ["modules", "notInThisRelease"],
284
+ "additionalProperties": false,
285
+ "properties": {
286
+ "modules": {
287
+ "type": "array",
288
+ "items": {
289
+ "type": "object",
290
+ "required": ["code", "name", "version", "schema", "description", "migrations", "installed", "installedVersion", "status", "companies"],
291
+ "additionalProperties": false,
292
+ "properties": {
293
+ "code": { "type": "string" },
294
+ "name": { "type": "string" },
295
+ "version": { "type": "string" },
296
+ "schema": { "type": "string" },
297
+ "description": { "type": ["string", "null"] },
298
+ "migrations": { "type": "integer", "minimum": 0 },
299
+ "installed": { "type": "boolean" },
300
+ "installedVersion": { "type": ["string", "null"] },
301
+ "status": { "type": ["string", "null"] },
302
+ "companies": { "type": "integer", "minimum": 0 }
303
+ }
304
+ }
305
+ },
306
+ "notInThisRelease": { "type": "array", "items": { "type": "object" } }
307
+ }
308
+ },
309
+ "module migrate": {
310
+ "type": "object",
311
+ "required": ["modules", "applied"],
312
+ "additionalProperties": false,
313
+ "properties": {
314
+ "modules": { "type": "array", "items": { "type": "string" } },
315
+ "applied": { "type": "integer", "minimum": 0 }
316
+ }
317
+ },
318
+ "module enable": { "$ref": "#/$defs/moduleToggle" },
319
+ "module disable": { "$ref": "#/$defs/moduleToggle" },
320
+ "pack list": {
321
+ "type": "object",
322
+ "required": ["packs"],
323
+ "additionalProperties": false,
324
+ "properties": {
325
+ "packs": {
326
+ "type": "array",
327
+ "minItems": 1,
328
+ "items": {
329
+ "type": "object",
330
+ "required": ["pack", "name", "version", "charts", "taxes", "statements", "languages", "certification", "golden", "goldenExemption"],
331
+ "additionalProperties": false,
332
+ "properties": {
333
+ "pack": { "type": "string" },
334
+ "name": { "type": "string" },
335
+ "version": { "type": "string" },
336
+ "charts": { "type": "array", "items": { "type": "object" } },
337
+ "taxes": { "type": "integer", "minimum": 0 },
338
+ "statements": { "type": "integer", "minimum": 0 },
339
+ "languages": { "type": "array", "items": { "type": "string" } },
340
+ "certification": { "type": ["string", "null"] },
341
+ "golden": { "type": "boolean" },
342
+ "goldenExemption": { "type": ["string", "null"] }
343
+ }
344
+ }
345
+ }
346
+ }
347
+ },
348
+ "pack build": { "$ref": "#/$defs/packFiles" },
349
+ "pack check": { "$ref": "#/$defs/packFiles" },
350
+ "pack status": {
351
+ "type": "object",
352
+ "required": ["packs", "companies"],
353
+ "additionalProperties": false,
354
+ "properties": {
355
+ "packs": { "type": "array", "items": { "type": "object", "required": ["country", "version", "name"] } },
356
+ "companies": {
357
+ "type": "array",
358
+ "items": {
359
+ "type": "object",
360
+ "required": ["companyId", "name", "country", "heldVersion", "packVersion", "behind"],
361
+ "properties": {
362
+ "companyId": { "type": "string" },
363
+ "name": { "type": "string" },
364
+ "country": { "type": "string" },
365
+ "chartCode": { "type": ["string", "null"] },
366
+ "heldVersion": { "type": ["string", "null"] },
367
+ "packVersion": { "type": ["string", "null"] },
368
+ "behind": { "type": "boolean" },
369
+ "differences": { "type": "object" }
370
+ }
371
+ }
372
+ }
373
+ }
374
+ },
375
+ "pack upgrade": {
376
+ "type": "object",
377
+ "required": ["company", "company_id", "country", "from_version", "to_version", "version_moved", "applied", "listed", "never_applied"],
378
+ "$comment": "Everything but `company` is what pack_upgrade() returned, keys included: the function's answer is passed on, not re-spelled.",
379
+ "properties": {
380
+ "company": { "type": "object", "required": ["id", "name"] },
381
+ "company_id": { "type": "string" },
382
+ "country": { "type": "string" },
383
+ "chart_code": { "type": ["string", "null"] },
384
+ "from_version": { "type": ["string", "null"] },
385
+ "to_version": { "type": ["string", "null"] },
386
+ "version_moved": { "type": "boolean" },
387
+ "applied": { "type": "array", "items": { "$ref": "#/$defs/packChange" } },
388
+ "listed": { "type": "array", "items": { "$ref": "#/$defs/packChange" } },
389
+ "never_applied": { "type": "array", "items": { "$ref": "#/$defs/packChange" } }
390
+ }
391
+ },
392
+ "register": {
393
+ "type": "object",
394
+ "required": ["registered", "email", "registryUrl", "announced"],
395
+ "additionalProperties": false,
396
+ "properties": {
397
+ "registered": { "const": true },
398
+ "email": { "type": "string" },
399
+ "registryUrl": { "type": "string" },
400
+ "announced": { "type": "boolean" },
401
+ "reason": { "type": "string" }
402
+ }
403
+ },
404
+ "unregister": {
405
+ "type": "object",
406
+ "required": ["registered", "changed"],
407
+ "additionalProperties": false,
408
+ "properties": { "registered": { "const": false }, "changed": { "type": "boolean" } }
409
+ },
410
+ "demo": {
411
+ "type": "object",
412
+ "required": ["applied"],
413
+ "additionalProperties": false,
414
+ "properties": {
415
+ "applied": { "type": "boolean" },
416
+ "reason": { "enum": ["already_there", "not_confirmed"] }
417
+ }
418
+ },
419
+ "contact add": {
420
+ "$comment": "What createContact() of @ekwo-ai/core answers — the MCP server's create_contact. `replayed` is true when the contact had already been created under this --ref and nothing was written.",
421
+ "type": "object",
422
+ "required": ["contact"],
423
+ "properties": { "contact": { "$ref": "#/$defs/row" }, "replayed": { "const": true } }
424
+ },
425
+ "contact list": {
426
+ "type": "object",
427
+ "required": ["contacts", "count"],
428
+ "properties": { "contacts": { "type": "array", "items": { "$ref": "#/$defs/row" } }, "count": { "type": "integer" } }
429
+ },
430
+ "invoice new": { "$ref": "#/$defs/documentAnswer" },
431
+ "invoice line add": { "$ref": "#/$defs/documentAnswer" },
432
+ "doc show": { "$ref": "#/$defs/documentAnswer" },
433
+ "doc list": {
434
+ "type": "object",
435
+ "required": ["documents", "count"],
436
+ "properties": { "documents": { "type": "array", "items": { "$ref": "#/$defs/row" } }, "count": { "type": "integer" } }
437
+ },
438
+ "post": {
439
+ "$comment": "The entry post_document() wrote — or, under --dry-run, the one it would write: `dry_run` is then true and nothing was written. Amounts are decimal strings.",
440
+ "type": "object",
441
+ "required": ["document_id", "entry", "entry_lines", "note"],
442
+ "properties": {
443
+ "document_id": { "type": "string" },
444
+ "dry_run": { "const": true },
445
+ "entry": { "$ref": "#/$defs/row" },
446
+ "entry_lines": { "type": "array", "items": { "$ref": "#/$defs/row" } },
447
+ "note": { "type": "string" }
448
+ }
449
+ },
450
+ "payment record": {
451
+ "type": "object",
452
+ "required": ["payment", "entry", "entry_lines", "matched", "note"],
453
+ "properties": {
454
+ "payment": { "$ref": "#/$defs/row" },
455
+ "entry": { "$ref": "#/$defs/row" },
456
+ "entry_lines": { "type": "array", "items": { "$ref": "#/$defs/row" } },
457
+ "matched": { "type": "array" },
458
+ "replayed": { "const": true },
459
+ "note": { "type": "string" }
460
+ }
461
+ },
462
+ "match": {
463
+ "type": "object",
464
+ "required": ["document_id", "transaction", "settled_lines"],
465
+ "properties": {
466
+ "document_id": { "type": "string" },
467
+ "transaction": { "$ref": "#/$defs/row" },
468
+ "settled_lines": { "type": "array", "items": { "type": "string" } }
469
+ }
470
+ },
471
+ "login": {
472
+ "$comment": "No token is ever printed, in either form.",
473
+ "type": "object",
474
+ "required": ["profile", "instance", "user", "company", "expiresAt", "configDir"],
475
+ "additionalProperties": false,
476
+ "properties": {
477
+ "profile": { "type": "string" },
478
+ "instance": {
479
+ "type": "object",
480
+ "required": ["url"],
481
+ "additionalProperties": false,
482
+ "properties": { "url": { "type": "string" } }
483
+ },
484
+ "user": { "$ref": "#/$defs/sessionUser" },
485
+ "company": { "oneOf": [{ "$ref": "#/$defs/companyRef" }, { "type": "null" }] },
486
+ "expiresAt": { "type": "string", "$comment": "ISO 8601. When the access token lapses; it is renewed on its own." },
487
+ "configDir": { "type": "string" }
488
+ }
489
+ },
490
+ "logout": {
491
+ "type": "object",
492
+ "required": ["profile", "signedOut", "revoked"],
493
+ "additionalProperties": false,
494
+ "properties": {
495
+ "profile": { "oneOf": [{ "type": "string" }, { "type": "null" }] },
496
+ "signedOut": { "type": "boolean", "$comment": "There was a session here and it is gone." },
497
+ "revoked": { "type": "boolean", "$comment": "The instance was told, so the refresh token is dead there too." }
498
+ }
499
+ },
500
+ "use": {
501
+ "type": "object",
502
+ "required": ["profile", "company"],
503
+ "additionalProperties": false,
504
+ "properties": {
505
+ "profile": { "type": "string" },
506
+ "company": { "$ref": "#/$defs/visibleCompany" }
507
+ }
508
+ },
509
+ "company export": {
510
+ "type": "object",
511
+ "required": ["company", "actingAs", "out", "tables", "rows", "files"],
512
+ "additionalProperties": false,
513
+ "properties": {
514
+ "company": { "$ref": "#/$defs/companyRef" },
515
+ "actingAs": { "type": "string", "$comment": "The member the archive was read as, under row level security." },
516
+ "out": { "type": "string", "$comment": "The directory the archive was written into, absolute." },
517
+ "tables": { "type": "integer", "minimum": 0 },
518
+ "rows": { "type": "integer", "minimum": 0 },
519
+ "files": {
520
+ "type": "object",
521
+ "required": ["listed", "transported"],
522
+ "additionalProperties": false,
523
+ "properties": {
524
+ "listed": { "type": "integer", "minimum": 0 },
525
+ "transported": { "const": false, "$comment": "The bytes of the attachments are not in the archive; manifest.json lists them." }
526
+ }
527
+ }
528
+ }
529
+ },
530
+ "company import": {
531
+ "type": "object",
532
+ "required": ["company", "rows", "owner", "tables", "files"],
533
+ "additionalProperties": false,
534
+ "properties": {
535
+ "company": { "$ref": "#/$defs/companyRef" },
536
+ "rows": { "type": "integer", "minimum": 0 },
537
+ "owner": { "type": ["string", "null"], "$comment": "The first owner. Members do not travel; null when nobody was named." },
538
+ "tables": {
539
+ "type": "object",
540
+ "$comment": "Rows taken in, by table name.",
541
+ "additionalProperties": { "type": "integer", "minimum": 0 }
542
+ },
543
+ "files": {
544
+ "type": "object",
545
+ "required": ["toCarry"],
546
+ "additionalProperties": false,
547
+ "properties": { "toCarry": { "type": "integer", "minimum": 0 } }
548
+ }
549
+ }
550
+ },
551
+ "whoami": {
552
+ "type": "object",
553
+ "required": ["source", "profile", "profiles", "instance", "user", "company", "capabilities", "companies"],
554
+ "additionalProperties": false,
555
+ "properties": {
556
+ "source": { "enum": ["environment", "profile"] },
557
+ "profile": { "oneOf": [{ "type": "string" }, { "type": "null" }] },
558
+ "profiles": { "type": "array", "items": { "type": "string" } },
559
+ "instance": {
560
+ "type": "object",
561
+ "required": ["url", "schemaVersion"],
562
+ "additionalProperties": false,
563
+ "properties": {
564
+ "url": { "type": "string" },
565
+ "schemaVersion": { "oneOf": [{ "type": "string" }, { "type": "null" }] }
566
+ }
567
+ },
568
+ "user": { "$ref": "#/$defs/sessionUser" },
569
+ "company": { "oneOf": [{ "$ref": "#/$defs/visibleCompany" }, { "type": "null" }] },
570
+ "capabilities": {
571
+ "$comment": "What member_capabilities() answers for the company in use; null when none is.",
572
+ "oneOf": [{ "type": "array", "items": { "type": "string" } }, { "type": "null" }]
573
+ },
574
+ "companies": { "type": "array", "items": { "$ref": "#/$defs/visibleCompany" } }
575
+ }
576
+ }
577
+ },
578
+ "moduleToggle": {
579
+ "type": "object",
580
+ "required": ["module", "schema", "companyId", "actingAs", "enabled"],
581
+ "additionalProperties": false,
582
+ "properties": {
583
+ "module": { "type": "string" },
584
+ "schema": { "type": "string" },
585
+ "companyId": { "type": "string" },
586
+ "actingAs": { "type": "string" },
587
+ "enabled": { "type": "boolean" }
588
+ }
589
+ },
590
+ "packFiles": {
591
+ "type": "object",
592
+ "required": ["action", "files", "stale"],
593
+ "additionalProperties": false,
594
+ "properties": {
595
+ "action": { "enum": ["build", "check"] },
596
+ "files": {
597
+ "type": "array",
598
+ "items": {
599
+ "type": "object",
600
+ "required": ["file", "pack", "state"],
601
+ "additionalProperties": false,
602
+ "properties": {
603
+ "file": { "type": "string" },
604
+ "pack": { "type": "string" },
605
+ "state": { "enum": ["written", "unchanged", "stale"] }
606
+ }
607
+ }
608
+ },
609
+ "stale": { "type": "integer", "minimum": 0 }
610
+ }
611
+ }
612
+ }
613
+ }