Commit Graph

8 Commits

Author SHA1 Message Date
e8e5b68617 Merge pull request 'feat: complete API coverage — add 37 missing endpoint methods' (#16) from feat/complete-api-coverage into main
Reviewed-on: #16
2026-02-17 13:15:17 +00:00
a646906e6f feat: add 37 missing API endpoint methods (issues #5-#11)
- Add _upload_csv helper for CSV multipart uploads
- Issue #5: search_items, get_item_by_uuid, delete_item, export/import CSV/ODS
- Issue #6: get_bom_flat, get_bom_cost, export/import BOM CSV, merge_bom
- Issue #7: get_project, create/update/delete_project, remove_item_project
- Issue #8: create_revision, presign_upload, list/add/delete attachments, set_thumbnail
- Issue #9: get_audit_completeness, get_audit_item_completeness
- Issue #10: get_dag_forward_cone, get_dag_dirty, mark_dag_dirty
- Issue #11: runner_heartbeat, runner_claim_job, runner_update_progress,
  runner_complete_job, runner_fail_job, runner_append_log, runner_push_dag
- Bump version 0.2.0 -> 0.3.0
2026-02-16 14:26:51 -06:00
8c4fb4c433 feat(settings): add get_schema_name() to SiloSettings, remove hardcoded defaults
Add get_schema_name() to SiloSettings base class with default 'kindred-rd'.
Update get_schema(), get_schema_form(), and get_property_schema() to fall
back to settings instead of hardcoding the schema name. Add category
query parameter support to get_property_schema().

Closes #28
2026-02-16 13:15:41 -06:00
83faa993b2 refactor: remove hardcoded CATEGORY_NAMES, add missing schema API methods
Issues #3 and #4.

Remove:
- CATEGORY_NAMES dict (170 Kindred-specific category codes)
- sanitize_filename(), parse_part_number(), get_category_folder_name()
- import re (only used by removed sanitize_filename)

These are consumer-side concerns (filesystem path construction) that
don't belong in a generic HTTP client. Categories should be fetched
dynamically from the server via the schema API.

Add schema methods:
- list_schemas() — GET /api/schemas
- get_schema_form(name) — GET /api/schemas/{name}/form
- add_enum_value(schema, segment, code, label) — POST enum value
- update_enum_value(schema, segment, code, **fields) — PUT enum value
- delete_enum_value(schema, segment, code) — DELETE enum value

Bump version 0.1.0 -> 0.2.0.
2026-02-16 11:23:37 -06:00
Zoe Forbes
9b71cf0375 feat: add job, job-definition, and runner API methods 2026-02-15 05:07:15 -06:00
Zoe Forbes
fb658c5a24 feat: add push_dag and get_dag methods to SiloClient
- push_dag(part_number, revision_number, nodes, edges): PUT /api/items/{pn}/dag
- get_dag(part_number, revision_number=None): GET /api/items/{pn}/dag

Closes kindred/create#215
2026-02-14 15:06:22 -06:00
Zoe Forbes
68a4139251 fix: use _request() in delete_bom_entry() for consistent error handling (#59)
delete_bom_entry() used raw urllib.request instead of self._request(),
bypassing 401 auth clearing and standard error normalization. Replace
with a single _request('DELETE', ..., raw=True) call, matching the
pattern used by all other BOM methods.
2026-02-08 18:29:06 -06:00
Zoe Forbes
a6ac3d4d06 initial: shared Python API client for Silo PLM
Extracted from silo monorepo. Provides SiloClient (HTTP client) and
SiloSettings (abstract config adapter) so both the FreeCAD workbench
and LibreOffice Calc extension share the same API layer.

Includes CATEGORY_NAMES, sanitize_filename, parse_part_number,
get_category_folder_name, and SSL context builder.
2026-02-06 11:14:21 -06:00