Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
0f19507
chore: point the contract ignore at docs/api_contract/
baraline Sep 16, 2026
6d3fdaa
feat(dropdowns): add Dropdowns/ContractType endpoint support
baraline Sep 16, 2026
c79b603
test(dropdowns): cover the contract-type pagination advance branch
baraline Sep 17, 2026
c6d7d68
feat(management): add Management/Contract endpoint support
baraline Sep 17, 2026
ccc02c7
feat(management): add contract cost sub-resource
baraline Sep 17, 2026
af1047b
feat(assets): add Assets/Computer endpoint support
baraline Sep 17, 2026
984c49c
fix(tests): drop banned async/coroutine wording from pagination test …
baraline Sep 17, 2026
2099616
feat(assets): link contracts to computers
baraline Sep 17, 2026
f26ed9e
fix(tests): assert itemtype stamping on the computer-contract update …
baraline Sep 17, 2026
e2c3536
test(exports): guard the asset and contract public surface
baraline Sep 17, 2026
bda38ca
fix(docs): update all API contract path references
baraline Sep 17, 2026
0e173bd
docs: document the asset and contract endpoints
baraline Sep 17, 2026
898b99c
fix(docs): drop the not-yet-existing skills bullet from the changelog
baraline Sep 17, 2026
b9929ad
docs(skills): add asset and contract agent skills
baraline Sep 17, 2026
b188676
fix(skills): reorder asset link lifecycle and restore import
baraline Sep 17, 2026
33ce7e2
test(integration): cover computers, contracts, costs, and links
baraline Sep 17, 2026
bb6f396
fix(integration): nest teardown so each resource's cleanup is indepen…
baraline Sep 17, 2026
2e5efa3
fix(review): correct Computer.entity typing, alert docstring, and sta…
baraline Sep 17, 2026
763f709
test(integration): verify the new models against a live GLPI instance
baraline Sep 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ CLAUDE.md
docs/superpowers/*

# Large generated GLPI API contract (kept locally, not tracked)
docs/glpi_api_contract.json
docs/api_contract/
# Coverage data: rewritten by every test run (and by the venv .pth hook).
.coverage
.coverage.*
Expand Down
27 changes: 27 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,33 @@ All notable changes to this project are documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).

## Unreleased

### Added

- `Assets/Computer` endpoint support: `search_computers`,
`iter_search_computers`, `get_computer`, `create_computer`,
`update_computer`, `delete_computer`, and the `GetComputer` /
`PostComputer` / `PatchComputer` / `DeleteComputer` models.
- Computer-to-contract links: `list_computer_contracts`,
`get_computer_contract`, `link_computer_contract`,
`update_computer_contract`, `unlink_computer_contract`. The client sets
the link's `itemtype` itself, because the GLPI contract types it as a
free string.
- `Management/Contract` endpoint support, including the cost sub-resource
and the `Dropdowns/ContractType` dropdown.
- `GlpiContractRenewalType` for the contract's documented `renewal_type`
enum (no renewal, tacit, explicit).
- Two agent skills: `glpi-asset-workflow` and `glpi-contract-workflow`.

### Notes

- `Contract.date_begin` is modelled as `datetime.date`, not `datetime`.
The GLPI contract declares `format: date`, and keeping it a plain date
keeps it out of the server-clock conversion that rewrites aware
timestamps — which on a date-only field could roll the value to the
previous or next day.

## 0.5.0 — 2026-09-08

### Fixed
Expand Down
16 changes: 16 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,19 @@ python -m sphinx -W --keep-going -b html docs docs/_build/html
library core.
- Add tests for payload serialization and response normalization when adding
endpoints.

### The GLPI OpenAPI contract

The models under `glpi_python_client/models/api_schema/` mirror
`components.schemas.*` from the GLPI High-Level REST API document,
including which fields are `readOnly`. That document is not committed —
it is ~14 MB and instance-specific. Fetch your instance's copy to the
path the models cite:

```bash
curl -sk "<your GLPI base>/api.php/v2.3/doc.json" -o docs/api_contract/api.json
```

`docs/api_contract/` is gitignored. Nothing in CI checks the models
against it, so when you add or change a model, diff it against the
contract by hand.
120 changes: 120 additions & 0 deletions docs/api_reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,121 @@ The companion mixin methods are exposed on :class:`GlpiClient` /
:undoc-members:
:show-inheritance:

Computers
---------

.. autoclass:: GetComputer
:members:
:undoc-members:
:show-inheritance:

.. autoclass:: PostComputer
:members:
:undoc-members:
:show-inheritance:

.. autoclass:: PatchComputer
:members:
:undoc-members:
:show-inheritance:

.. autoclass:: DeleteComputer
:members:
:undoc-members:
:show-inheritance:

Computer Contract Links
-----------------------

.. autoclass:: GetContractItem
:members:
:undoc-members:
:show-inheritance:

.. autoclass:: PostContractItem
:members:
:undoc-members:
:show-inheritance:

.. autoclass:: PatchContractItem
:members:
:undoc-members:
:show-inheritance:

.. autoclass:: DeleteContractItem
:members:
:undoc-members:
:show-inheritance:

Contracts
---------

.. autoclass:: GetContract
:members:
:undoc-members:
:show-inheritance:

.. autoclass:: PostContract
:members:
:undoc-members:
:show-inheritance:

.. autoclass:: PatchContract
:members:
:undoc-members:
:show-inheritance:

.. autoclass:: DeleteContract
:members:
:undoc-members:
:show-inheritance:

Contract Costs
--------------

.. autoclass:: GetContractCost
:members:
:undoc-members:
:show-inheritance:

.. autoclass:: PostContractCost
:members:
:undoc-members:
:show-inheritance:

.. autoclass:: PatchContractCost
:members:
:undoc-members:
:show-inheritance:

.. autoclass:: DeleteContractCost
:members:
:undoc-members:
:show-inheritance:

Contract Types
--------------

.. autoclass:: GetContractType
:members:
:undoc-members:
:show-inheritance:

.. autoclass:: PostContractType
:members:
:undoc-members:
:show-inheritance:

.. autoclass:: PatchContractType
:members:
:undoc-members:
:show-inheritance:

.. autoclass:: DeleteContractType
:members:
:undoc-members:
:show-inheritance:

Enums
-----

Expand Down Expand Up @@ -547,6 +662,11 @@ Enums
:undoc-members:
:show-inheritance:

.. autoclass:: GlpiContractRenewalType
:members:
:undoc-members:
:show-inheritance:

Package Metadata
----------------

Expand Down
Loading
Loading