bc-cli 0.1.0__tar.gz

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 (154) hide show
  1. bc_cli-0.1.0/.claude/settings.local.json +12 -0
  2. bc_cli-0.1.0/.env.example +5 -0
  3. bc_cli-0.1.0/.github/ISSUE_TEMPLATE/bug_report.md +39 -0
  4. bc_cli-0.1.0/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
  5. bc_cli-0.1.0/.github/PULL_REQUEST_TEMPLATE.md +23 -0
  6. bc_cli-0.1.0/.github/workflows/tests.yml +50 -0
  7. bc_cli-0.1.0/.gitignore +34 -0
  8. bc_cli-0.1.0/.planning/engine-tech.endpoints.json +1142 -0
  9. bc_cli-0.1.0/.planning/pw1500g-llp/generate.py +394 -0
  10. bc_cli-0.1.0/.planning/pw1500g-llp/load_llp.yaml +5725 -0
  11. bc_cli-0.1.0/.planning/pw1500g-llp/load_llp_retry.yaml +2813 -0
  12. bc_cli-0.1.0/.planning/pw1500g-llp/seed_dimension_values.yaml +194 -0
  13. bc_cli-0.1.0/.planning/pw1500g-llp/seed_thrust_ratings.yaml +84 -0
  14. bc_cli-0.1.0/CHANGELOG.md +30 -0
  15. bc_cli-0.1.0/CLAUDE.md +209 -0
  16. bc_cli-0.1.0/CODE_OF_CONDUCT.md +76 -0
  17. bc_cli-0.1.0/CONTRIBUTING.md +87 -0
  18. bc_cli-0.1.0/LICENSE +202 -0
  19. bc_cli-0.1.0/NOTICE +10 -0
  20. bc_cli-0.1.0/PKG-INFO +224 -0
  21. bc_cli-0.1.0/README.md +170 -0
  22. bc_cli-0.1.0/SECURITY.md +32 -0
  23. bc_cli-0.1.0/docs/authentication.md +194 -0
  24. bc_cli-0.1.0/docs/batch-operations.md +232 -0
  25. bc_cli-0.1.0/docs/command-reference.md +399 -0
  26. bc_cli-0.1.0/docs/configuration.md +118 -0
  27. bc_cli-0.1.0/docs/contributing.md +1 -0
  28. bc_cli-0.1.0/docs/custom-apis.md +155 -0
  29. bc_cli-0.1.0/docs/demo-setup.md +151 -0
  30. bc_cli-0.1.0/docs/getting-started.md +117 -0
  31. bc_cli-0.1.0/docs/multi-company.md +97 -0
  32. bc_cli-0.1.0/docs/querying.md +145 -0
  33. bc_cli-0.1.0/docs/saved-queries.md +164 -0
  34. bc_cli-0.1.0/docs/sdk-usage.md +229 -0
  35. bc_cli-0.1.0/docs/write-operations.md +71 -0
  36. bc_cli-0.1.0/examples/ap-monthly-review.yaml +37 -0
  37. bc_cli-0.1.0/examples/attach-purchase-invoice-pdf.yaml +37 -0
  38. bc_cli-0.1.0/examples/create-purchase-invoice.yaml +59 -0
  39. bc_cli-0.1.0/examples/month-end-cronus.yaml +64 -0
  40. bc_cli-0.1.0/examples/queries/sample.yaml +53 -0
  41. bc_cli-0.1.0/pyproject.toml +84 -0
  42. bc_cli-0.1.0/src/bcli/__init__.py +44 -0
  43. bc_cli-0.1.0/src/bcli/_url.py +133 -0
  44. bc_cli-0.1.0/src/bcli/_version.py +1 -0
  45. bc_cli-0.1.0/src/bcli/auth/__init__.py +8 -0
  46. bc_cli-0.1.0/src/bcli/auth/_base.py +17 -0
  47. bc_cli-0.1.0/src/bcli/auth/_browser.py +234 -0
  48. bc_cli-0.1.0/src/bcli/auth/_credentials.py +169 -0
  49. bc_cli-0.1.0/src/bcli/auth/_device_code.py +90 -0
  50. bc_cli-0.1.0/src/bcli/auth/_secure_io.py +155 -0
  51. bc_cli-0.1.0/src/bcli/auth/_token_cache.py +93 -0
  52. bc_cli-0.1.0/src/bcli/auth/_workos.py +279 -0
  53. bc_cli-0.1.0/src/bcli/client/__init__.py +6 -0
  54. bc_cli-0.1.0/src/bcli/client/_async.py +566 -0
  55. bc_cli-0.1.0/src/bcli/client/_safety.py +179 -0
  56. bc_cli-0.1.0/src/bcli/client/_sync.py +171 -0
  57. bc_cli-0.1.0/src/bcli/client/_transport.py +303 -0
  58. bc_cli-0.1.0/src/bcli/config/__init__.py +6 -0
  59. bc_cli-0.1.0/src/bcli/config/_defaults.py +47 -0
  60. bc_cli-0.1.0/src/bcli/config/_loader.py +190 -0
  61. bc_cli-0.1.0/src/bcli/config/_model.py +206 -0
  62. bc_cli-0.1.0/src/bcli/errors.py +69 -0
  63. bc_cli-0.1.0/src/bcli/etl/__init__.py +63 -0
  64. bc_cli-0.1.0/src/bcli/etl/_auth.py +75 -0
  65. bc_cli-0.1.0/src/bcli/etl/_bridge.py +122 -0
  66. bc_cli-0.1.0/src/bcli/etl/_client.py +177 -0
  67. bc_cli-0.1.0/src/bcli/etl/_generic.py +220 -0
  68. bc_cli-0.1.0/src/bcli/etl/_polaris.py +170 -0
  69. bc_cli-0.1.0/src/bcli/etl/_stampers.py +74 -0
  70. bc_cli-0.1.0/src/bcli/odata/__init__.py +8 -0
  71. bc_cli-0.1.0/src/bcli/odata/_escape.py +32 -0
  72. bc_cli-0.1.0/src/bcli/odata/_filter_fields.py +137 -0
  73. bc_cli-0.1.0/src/bcli/odata/_pagination.py +42 -0
  74. bc_cli-0.1.0/src/bcli/odata/_query.py +117 -0
  75. bc_cli-0.1.0/src/bcli/odata/_response.py +46 -0
  76. bc_cli-0.1.0/src/bcli/py.typed +0 -0
  77. bc_cli-0.1.0/src/bcli/registry/__init__.py +12 -0
  78. bc_cli-0.1.0/src/bcli/registry/_importers.py +335 -0
  79. bc_cli-0.1.0/src/bcli/registry/_registry.py +148 -0
  80. bc_cli-0.1.0/src/bcli/registry/_schema.py +49 -0
  81. bc_cli-0.1.0/src/bcli/registry/standard_v2.json +85 -0
  82. bc_cli-0.1.0/src/bcli/telemetry/__init__.py +37 -0
  83. bc_cli-0.1.0/src/bcli/telemetry/_azure_monitor.py +103 -0
  84. bc_cli-0.1.0/src/bcli/telemetry/_factory.py +112 -0
  85. bc_cli-0.1.0/src/bcli/telemetry/_protocol.py +83 -0
  86. bc_cli-0.1.0/src/bcli/telemetry/events.py +271 -0
  87. bc_cli-0.1.0/src/bcli/workflow/__init__.py +19 -0
  88. bc_cli-0.1.0/src/bcli/workflow/_models.py +68 -0
  89. bc_cli-0.1.0/src/bcli/workflow/_resolver.py +131 -0
  90. bc_cli-0.1.0/src/bcli_cli/__init__.py +1 -0
  91. bc_cli-0.1.0/src/bcli_cli/_safety.py +73 -0
  92. bc_cli-0.1.0/src/bcli_cli/_state.py +113 -0
  93. bc_cli-0.1.0/src/bcli_cli/app.py +193 -0
  94. bc_cli-0.1.0/src/bcli_cli/commands/__init__.py +1 -0
  95. bc_cli-0.1.0/src/bcli_cli/commands/auth_cmd.py +182 -0
  96. bc_cli-0.1.0/src/bcli_cli/commands/batch_cmd.py +386 -0
  97. bc_cli-0.1.0/src/bcli_cli/commands/beautech_cmd.py +214 -0
  98. bc_cli-0.1.0/src/bcli_cli/commands/company_cmd.py +229 -0
  99. bc_cli-0.1.0/src/bcli_cli/commands/config_cmd.py +380 -0
  100. bc_cli-0.1.0/src/bcli_cli/commands/context_cmd.py +99 -0
  101. bc_cli-0.1.0/src/bcli_cli/commands/delete_cmd.py +52 -0
  102. bc_cli-0.1.0/src/bcli_cli/commands/endpoint_cmd.py +197 -0
  103. bc_cli-0.1.0/src/bcli_cli/commands/env_cmd.py +86 -0
  104. bc_cli-0.1.0/src/bcli_cli/commands/etl_cmd.py +218 -0
  105. bc_cli-0.1.0/src/bcli_cli/commands/get_cmd.py +266 -0
  106. bc_cli-0.1.0/src/bcli_cli/commands/patch_cmd.py +68 -0
  107. bc_cli-0.1.0/src/bcli_cli/commands/post_cmd.py +67 -0
  108. bc_cli-0.1.0/src/bcli_cli/commands/query_cmd.py +474 -0
  109. bc_cli-0.1.0/src/bcli_cli/commands/registry_cmd.py +135 -0
  110. bc_cli-0.1.0/src/bcli_cli/commands/test_cmd.py +95 -0
  111. bc_cli-0.1.0/src/bcli_cli/output/__init__.py +6 -0
  112. bc_cli-0.1.0/src/bcli_cli/output/_display.py +28 -0
  113. bc_cli-0.1.0/src/bcli_cli/output/_formatters.py +168 -0
  114. bc_cli-0.1.0/tests/conftest.py +1 -0
  115. bc_cli-0.1.0/tests/fixtures/sample_postman_collection.json +119 -0
  116. bc_cli-0.1.0/tests/test_auth/__init__.py +0 -0
  117. bc_cli-0.1.0/tests/test_auth/test_secure_io.py +131 -0
  118. bc_cli-0.1.0/tests/test_auth/test_workos_cache.py +93 -0
  119. bc_cli-0.1.0/tests/test_cli/__init__.py +0 -0
  120. bc_cli-0.1.0/tests/test_cli/test_company_cmd.py +173 -0
  121. bc_cli-0.1.0/tests/test_cli/test_config_cmd.py +122 -0
  122. bc_cli-0.1.0/tests/test_cli/test_query_cmd.py +245 -0
  123. bc_cli-0.1.0/tests/test_cli/test_safety.py +101 -0
  124. bc_cli-0.1.0/tests/test_cli/test_state.py +128 -0
  125. bc_cli-0.1.0/tests/test_client/__init__.py +0 -0
  126. bc_cli-0.1.0/tests/test_client/test_resolve_url.py +70 -0
  127. bc_cli-0.1.0/tests/test_client/test_safety.py +192 -0
  128. bc_cli-0.1.0/tests/test_client/test_transport.py +265 -0
  129. bc_cli-0.1.0/tests/test_client/test_upload_attachment.py +320 -0
  130. bc_cli-0.1.0/tests/test_config/__init__.py +0 -0
  131. bc_cli-0.1.0/tests/test_config/test_config.py +329 -0
  132. bc_cli-0.1.0/tests/test_etl/__init__.py +0 -0
  133. bc_cli-0.1.0/tests/test_etl/test_bridge.py +58 -0
  134. bc_cli-0.1.0/tests/test_etl/test_generic.py +212 -0
  135. bc_cli-0.1.0/tests/test_etl/test_stampers.py +72 -0
  136. bc_cli-0.1.0/tests/test_odata/__init__.py +0 -0
  137. bc_cli-0.1.0/tests/test_odata/test_escape.py +37 -0
  138. bc_cli-0.1.0/tests/test_odata/test_filter_fields.py +116 -0
  139. bc_cli-0.1.0/tests/test_odata/test_query.py +77 -0
  140. bc_cli-0.1.0/tests/test_registry/__init__.py +0 -0
  141. bc_cli-0.1.0/tests/test_registry/test_importers.py +105 -0
  142. bc_cli-0.1.0/tests/test_registry/test_metadata_fields.py +84 -0
  143. bc_cli-0.1.0/tests/test_registry/test_registry.py +70 -0
  144. bc_cli-0.1.0/tests/test_telemetry/__init__.py +0 -0
  145. bc_cli-0.1.0/tests/test_telemetry/test_events.py +240 -0
  146. bc_cli-0.1.0/tests/test_telemetry/test_sink.py +190 -0
  147. bc_cli-0.1.0/tests/test_url/__init__.py +0 -0
  148. bc_cli-0.1.0/tests/test_url/test_origin_allowlist.py +111 -0
  149. bc_cli-0.1.0/tests/test_url/test_url_builder.py +45 -0
  150. bc_cli-0.1.0/tests/test_workflow/__init__.py +0 -0
  151. bc_cli-0.1.0/tests/test_workflow/test_batch_integration.py +270 -0
  152. bc_cli-0.1.0/tests/test_workflow/test_models.py +91 -0
  153. bc_cli-0.1.0/tests/test_workflow/test_resolver.py +193 -0
  154. bc_cli-0.1.0/uv.lock +2894 -0
@@ -0,0 +1,12 @@
1
+ {
2
+ "enableAllProjectMcpServers": true,
3
+ "enabledMcpjsonServers": [
4
+ "bc-proxy"
5
+ ],
6
+ "permissions": {
7
+ "allow": [
8
+ "Bash(~/.claude/skills/gstack/bin/gstack-config set *)",
9
+ "Bash(touch ~/.claude/skills/gstack/.feature-prompted-continuous-checkpoint)"
10
+ ]
11
+ }
12
+ }
@@ -0,0 +1,5 @@
1
+ # Business Central API credentials
2
+ # Referenced by client_secret_env in ~/.config/bcapi/config.toml
3
+ BCAPI_SECRET=your-client-secret-here
4
+ BCAPI_PROD_SECRET=your-production-secret-here
5
+ BCAPI_SANDBOX_SECRET=your-sandbox-secret-here
@@ -0,0 +1,39 @@
1
+ ---
2
+ name: Bug report
3
+ about: Report a problem with bcli
4
+ title: "[bug] "
5
+ labels: bug
6
+ ---
7
+
8
+ ## Description
9
+
10
+ What's the unexpected behavior?
11
+
12
+ ## Reproduction
13
+
14
+ Minimal steps to reproduce:
15
+
16
+ 1.
17
+ 2.
18
+ 3.
19
+
20
+ ## Expected vs. Actual
21
+
22
+ **Expected:**
23
+
24
+ **Actual:**
25
+
26
+ ## Environment
27
+
28
+ - bcli version: `bcli --version`
29
+ - Python version: `python --version`
30
+ - OS:
31
+ - BC environment: (Production / Sandbox / ...)
32
+
33
+ ## Logs / Stack trace
34
+
35
+ ```
36
+ paste relevant output here
37
+ ```
38
+
39
+ ## Additional context
@@ -0,0 +1,20 @@
1
+ ---
2
+ name: Feature request
3
+ about: Suggest a new capability for bcli
4
+ title: "[feat] "
5
+ labels: enhancement
6
+ ---
7
+
8
+ ## Problem
9
+
10
+ What are you trying to do, and why is it hard today?
11
+
12
+ ## Proposed solution
13
+
14
+ What would make this easier? CLI command, SDK method, config option, etc.
15
+
16
+ ## Alternatives considered
17
+
18
+ Any workarounds you've tried.
19
+
20
+ ## Additional context
@@ -0,0 +1,23 @@
1
+ ## Summary
2
+
3
+ What does this PR do, in one or two sentences?
4
+
5
+ ## Changes
6
+
7
+ -
8
+ -
9
+
10
+ ## Test plan
11
+
12
+ - [ ] `uv run pytest tests/ -v` passes
13
+ - [ ] `uv run ruff check src/ tests/` is clean
14
+ - [ ] Added / updated tests for new behavior
15
+ - [ ] Manual testing notes:
16
+
17
+ ## Breaking changes
18
+
19
+ Any? If so, what's the migration path?
20
+
21
+ ## Related issues
22
+
23
+ Closes #
@@ -0,0 +1,50 @@
1
+ name: Tests
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ # Default to read-only — every job must opt in to anything writeable.
10
+ # Without this, GITHUB_TOKEN inherits the repo-wide default (often
11
+ # write-all on older repos), which gives anyone who can land a PR an
12
+ # overly permissive token if they trick a workflow step.
13
+ permissions:
14
+ contents: read
15
+
16
+ jobs:
17
+ test:
18
+ runs-on: ubuntu-latest
19
+ permissions:
20
+ contents: read
21
+ strategy:
22
+ fail-fast: false
23
+ matrix:
24
+ python-version: ["3.11", "3.12", "3.13"]
25
+
26
+ steps:
27
+ # Third-party actions are pinned by full commit SHA, not a moving
28
+ # tag like @v4. The trailing comment names the human-readable tag
29
+ # so a maintainer can audit the version without resolving SHAs.
30
+ # Bumping requires checking the new SHA against the upstream
31
+ # release notes and updating both fields together.
32
+ - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
33
+
34
+ - name: Install uv
35
+ uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5
36
+ with:
37
+ enable-cache: true
38
+ python-version: ${{ matrix.python-version }}
39
+
40
+ - name: Install dependencies (locked)
41
+ # `--locked` requires uv.lock to be committed and exactly match the
42
+ # current pyproject.toml, so CI is reproducible from the lockfile
43
+ # under code review rather than re-resolving versions on every run.
44
+ run: uv sync --locked --extra dev --extra etl
45
+
46
+ - name: Lint with ruff
47
+ run: uv run ruff check src/ tests/
48
+
49
+ - name: Run tests
50
+ run: uv run pytest tests/ -v
@@ -0,0 +1,34 @@
1
+ __pycache__/
2
+ *.py[cod]
3
+ *$py.class
4
+ *.egg-info/
5
+ dist/
6
+ build/
7
+ .eggs/
8
+ *.egg
9
+ .venv/
10
+ venv/
11
+ .env
12
+ .env.local
13
+ # Note: uv.lock IS committed (used by `uv sync --locked` in CI for
14
+ # reproducible builds). Other ad-hoc *.lock files (e.g. .dotnet) are
15
+ # still ignored.
16
+ .pytest_cache/
17
+ .ruff_cache/
18
+ .mypy_cache/
19
+ htmlcov/
20
+ .coverage
21
+ *.log
22
+ .DS_Store
23
+
24
+ # dlt pipeline state and secrets
25
+ .dlt/
26
+ *.duckdb
27
+ *.duckdb.wal
28
+ TRASH/
29
+ TRASH-FILES.md
30
+
31
+ # Internal planning docs (not part of OSS release)
32
+ PRD-*.md
33
+ TODOS.md
34
+ bcapi_cli_prd.md