glpi-python-client 0.6.9__tar.gz → 0.6.12__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 (182) hide show
  1. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/CHANGELOG.md +87 -0
  2. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/PKG-INFO +1 -1
  3. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/docs/api_reference.rst +46 -0
  4. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/docs/user_guide.rst +130 -14
  5. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/__init__.py +15 -1
  6. glpi_python_client-0.6.12/glpi_python_client/_async/_retry.py +90 -0
  7. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_async/auth/_v1_session.py +70 -28
  8. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_async/auth/auth.py +41 -18
  9. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_async/clients/_base_client.py +24 -1
  10. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_async/clients/api/__init__.py +4 -0
  11. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_async/clients/api/assistance/__init__.py +4 -1
  12. glpi_python_client-0.6.12/glpi_python_client/_async/clients/api/assistance/_pending_reason.py +336 -0
  13. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_async/clients/api/dropdowns/__init__.py +4 -1
  14. glpi_python_client-0.6.12/glpi_python_client/_async/clients/api/dropdowns/_itil_category.py +233 -0
  15. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_async/clients/client.py +4 -0
  16. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_async/clients/commons/_config.py +42 -0
  17. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_async/clients/commons/_constants.py +4 -0
  18. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_async/clients/commons/_http.py +63 -2
  19. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_async/clients/commons/_transport.py +13 -10
  20. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_errors.py +87 -2
  21. glpi_python_client-0.6.12/glpi_python_client/_sync/_retry.py +90 -0
  22. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_sync/auth/_v1_session.py +70 -28
  23. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_sync/auth/auth.py +41 -18
  24. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_sync/clients/_base_client.py +24 -1
  25. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_sync/clients/api/__init__.py +4 -0
  26. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_sync/clients/api/assistance/__init__.py +4 -1
  27. glpi_python_client-0.6.12/glpi_python_client/_sync/clients/api/assistance/_pending_reason.py +336 -0
  28. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_sync/clients/api/dropdowns/__init__.py +4 -1
  29. glpi_python_client-0.6.12/glpi_python_client/_sync/clients/api/dropdowns/_itil_category.py +233 -0
  30. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_sync/clients/client.py +4 -0
  31. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_sync/clients/commons/_config.py +42 -0
  32. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_sync/clients/commons/_constants.py +4 -0
  33. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_sync/clients/commons/_http.py +63 -2
  34. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_sync/clients/commons/_transport.py +13 -10
  35. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/models/__init__.py +12 -0
  36. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/models/api_schema/assistance/__init__.py +6 -0
  37. glpi_python_client-0.6.12/glpi_python_client/models/api_schema/assistance/_pending_reason.py +102 -0
  38. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/models/api_schema/dropdowns/__init__.py +10 -0
  39. glpi_python_client-0.6.12/glpi_python_client/models/api_schema/dropdowns/_itil_category.py +199 -0
  40. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/pyproject.toml +1 -1
  41. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/skills/README.md +1 -1
  42. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/skills/glpi-asset-workflow/SKILL.md +1 -1
  43. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/skills/glpi-client-setup/SKILL.md +8 -4
  44. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/skills/glpi-contract-workflow/SKILL.md +1 -1
  45. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/skills/glpi-document-workflow/SKILL.md +1 -1
  46. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/skills/glpi-knowledge-base/SKILL.md +1 -1
  47. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/skills/glpi-plugin-fields/SKILL.md +1 -1
  48. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/skills/glpi-reporting-and-context/SKILL.md +1 -1
  49. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/skills/glpi-team-members/SKILL.md +1 -1
  50. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/skills/glpi-ticket-timeline/SKILL.md +1 -1
  51. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/skills/glpi-ticket-workflow/SKILL.md +3 -2
  52. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/skills/glpi-user-location-provisioning/SKILL.md +6 -2
  53. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/.gitignore +0 -0
  54. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/.pre-commit-config.yaml +0 -0
  55. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/.readthedocs.yaml +0 -0
  56. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/CONTRIBUTING.md +0 -0
  57. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/LICENSE +0 -0
  58. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/README.md +0 -0
  59. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/docs/_static/.gitkeep +0 -0
  60. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/docs/conf.py +0 -0
  61. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/docs/development.md +0 -0
  62. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/docs/development_rtd.rst +0 -0
  63. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/docs/index.rst +0 -0
  64. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/docs/installation.rst +0 -0
  65. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/docs/publishing.md +0 -0
  66. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/docs/publishing_rtd.rst +0 -0
  67. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/docs/sponsoring.rst +0 -0
  68. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_async/__init__.py +0 -0
  69. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_async/_concurrency.py +0 -0
  70. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_async/_testing.py +0 -0
  71. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_async/auth/__init__.py +0 -0
  72. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_async/clients/__init__.py +0 -0
  73. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_async/clients/api/administration/__init__.py +0 -0
  74. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_async/clients/api/administration/_entity.py +0 -0
  75. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_async/clients/api/administration/_group.py +0 -0
  76. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_async/clients/api/administration/_user.py +0 -0
  77. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_async/clients/api/assets/__init__.py +0 -0
  78. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_async/clients/api/assets/_computer.py +0 -0
  79. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_async/clients/api/assistance/_team.py +0 -0
  80. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_async/clients/api/assistance/_ticket.py +0 -0
  81. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_async/clients/api/assistance/timeline/__init__.py +0 -0
  82. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_async/clients/api/assistance/timeline/_document.py +0 -0
  83. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_async/clients/api/assistance/timeline/_followup.py +0 -0
  84. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_async/clients/api/assistance/timeline/_solution.py +0 -0
  85. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_async/clients/api/assistance/timeline/_task.py +0 -0
  86. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_async/clients/api/dropdowns/_contract_type.py +0 -0
  87. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_async/clients/api/dropdowns/_location.py +0 -0
  88. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_async/clients/api/knowledgebase/__init__.py +0 -0
  89. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_async/clients/api/knowledgebase/_article.py +0 -0
  90. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_async/clients/api/knowledgebase/_category.py +0 -0
  91. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_async/clients/api/knowledgebase/_comment.py +0 -0
  92. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_async/clients/api/knowledgebase/_revision.py +0 -0
  93. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_async/clients/api/management/__init__.py +0 -0
  94. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_async/clients/api/management/_contract.py +0 -0
  95. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_async/clients/api/management/_document.py +0 -0
  96. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_async/clients/api/plugins/__init__.py +0 -0
  97. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_async/clients/api/plugins/_fields.py +0 -0
  98. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_async/clients/commons/__init__.py +0 -0
  99. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_async/clients/commons/_filters.py +0 -0
  100. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_async/clients/commons/_payloads.py +0 -0
  101. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_async/clients/custom/__init__.py +0 -0
  102. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_async/clients/custom/_statistics.py +0 -0
  103. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_async/clients/custom/_ticket_context.py +0 -0
  104. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_sync/__init__.py +0 -0
  105. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_sync/_concurrency.py +0 -0
  106. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_sync/_testing.py +0 -0
  107. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_sync/auth/__init__.py +0 -0
  108. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_sync/clients/__init__.py +0 -0
  109. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_sync/clients/api/administration/__init__.py +0 -0
  110. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_sync/clients/api/administration/_entity.py +0 -0
  111. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_sync/clients/api/administration/_group.py +0 -0
  112. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_sync/clients/api/administration/_user.py +0 -0
  113. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_sync/clients/api/assets/__init__.py +0 -0
  114. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_sync/clients/api/assets/_computer.py +0 -0
  115. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_sync/clients/api/assistance/_team.py +0 -0
  116. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_sync/clients/api/assistance/_ticket.py +0 -0
  117. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_sync/clients/api/assistance/timeline/__init__.py +0 -0
  118. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_sync/clients/api/assistance/timeline/_document.py +0 -0
  119. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_sync/clients/api/assistance/timeline/_followup.py +0 -0
  120. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_sync/clients/api/assistance/timeline/_solution.py +0 -0
  121. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_sync/clients/api/assistance/timeline/_task.py +0 -0
  122. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_sync/clients/api/dropdowns/_contract_type.py +0 -0
  123. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_sync/clients/api/dropdowns/_location.py +0 -0
  124. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_sync/clients/api/knowledgebase/__init__.py +0 -0
  125. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_sync/clients/api/knowledgebase/_article.py +0 -0
  126. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_sync/clients/api/knowledgebase/_category.py +0 -0
  127. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_sync/clients/api/knowledgebase/_comment.py +0 -0
  128. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_sync/clients/api/knowledgebase/_revision.py +0 -0
  129. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_sync/clients/api/management/__init__.py +0 -0
  130. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_sync/clients/api/management/_contract.py +0 -0
  131. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_sync/clients/api/management/_document.py +0 -0
  132. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_sync/clients/api/plugins/__init__.py +0 -0
  133. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_sync/clients/api/plugins/_fields.py +0 -0
  134. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_sync/clients/commons/__init__.py +0 -0
  135. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_sync/clients/commons/_filters.py +0 -0
  136. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_sync/clients/commons/_payloads.py +0 -0
  137. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_sync/clients/custom/__init__.py +0 -0
  138. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_sync/clients/custom/_statistics.py +0 -0
  139. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/_sync/clients/custom/_ticket_context.py +0 -0
  140. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/content/__init__.py +0 -0
  141. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/content/conversion.py +0 -0
  142. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/models/_base.py +0 -0
  143. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/models/api_schema/__init__.py +0 -0
  144. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/models/api_schema/_common.py +0 -0
  145. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/models/api_schema/_content.py +0 -0
  146. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/models/api_schema/administration/__init__.py +0 -0
  147. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/models/api_schema/administration/_entity.py +0 -0
  148. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/models/api_schema/administration/_group.py +0 -0
  149. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/models/api_schema/administration/_user.py +0 -0
  150. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/models/api_schema/administration/_user_authorization.py +0 -0
  151. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/models/api_schema/assets/__init__.py +0 -0
  152. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/models/api_schema/assets/_computer.py +0 -0
  153. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/models/api_schema/assets/_contract_item.py +0 -0
  154. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/models/api_schema/assistance/_team.py +0 -0
  155. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/models/api_schema/assistance/_ticket.py +0 -0
  156. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/models/api_schema/assistance/timeline/__init__.py +0 -0
  157. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/models/api_schema/assistance/timeline/_document.py +0 -0
  158. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/models/api_schema/assistance/timeline/_followup.py +0 -0
  159. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/models/api_schema/assistance/timeline/_solution.py +0 -0
  160. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/models/api_schema/assistance/timeline/_task.py +0 -0
  161. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/models/api_schema/dropdowns/_contract_type.py +0 -0
  162. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/models/api_schema/dropdowns/_location.py +0 -0
  163. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/models/api_schema/enums.py +0 -0
  164. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/models/api_schema/knowledgebase/__init__.py +0 -0
  165. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/models/api_schema/knowledgebase/_article.py +0 -0
  166. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/models/api_schema/knowledgebase/_category.py +0 -0
  167. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/models/api_schema/knowledgebase/_comment.py +0 -0
  168. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/models/api_schema/knowledgebase/_revision.py +0 -0
  169. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/models/api_schema/management/__init__.py +0 -0
  170. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/models/api_schema/management/_contract.py +0 -0
  171. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/models/api_schema/management/_contract_cost.py +0 -0
  172. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/models/api_schema/management/_document.py +0 -0
  173. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/models/api_schema/management/_document_item.py +0 -0
  174. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/models/api_schema/plugins/__init__.py +0 -0
  175. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/models/api_schema/plugins/_fields.py +0 -0
  176. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/models/custom_schema/__init__.py +0 -0
  177. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/models/custom_schema/_ticket_context.py +0 -0
  178. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/py.typed +0 -0
  179. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/rsql.py +0 -0
  180. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/testing/__init__.py +0 -0
  181. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/testing/fixtures.py +0 -0
  182. {glpi_python_client-0.6.9 → glpi_python_client-0.6.12}/glpi_python_client/testing/utils.py +0 -0
@@ -4,6 +4,93 @@ All notable changes to this project are documented in this file.
4
4
 
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
6
6
 
7
+ ## 0.6.12 — 2026-11-23
8
+
9
+ Pending reasons, a setting that turns the automatic retries off, a typed error
10
+ for a success response whose body is not JSON, and v1 session renewals that
11
+ run once under concurrency. Retries behave as before unless the new setting is
12
+ passed.
13
+
14
+ There is no 0.6.11 on PyPI: its release stopped before the upload because
15
+ the package still declared 0.6.10, and the tag name cannot be reused. This
16
+ release carries the same changes.
17
+
18
+ ### Added
19
+
20
+ - **`list_pending_reasons`, `iter_pending_reasons`,
21
+ `get_ticket_pending_reason`, `set_ticket_pending_reason` and
22
+ `clear_ticket_pending_reason`** on both clients, from a new
23
+ `PendingReasonMixin`. The catalogue is read from the v2
24
+ `/Assistance/PendingReason` route; a ticket's pending-reason item goes
25
+ through the legacy v1 API, because the v2 item schema omits the
26
+ catalogue id and no v2 route writes an item. The three ticket methods
27
+ need the v1 session and raise `RuntimeError` without one.
28
+ `set_ticket_pending_reason` creates or updates the item after reading
29
+ it and does not change the ticket status.
30
+ - **`PendingReason` and `PendingReasonItem`** read models, exported from
31
+ the package root and from `glpi_python_client.models`.
32
+ - **`max_retries` and `retry_wait_seconds`** on both clients, on
33
+ `GLPITokenManager` and `GLPIV1Session`, and as `GLPI_MAX_RETRIES` and
34
+ `GLPI_RETRY_WAIT_SECONDS` for `from_env`. `max_retries` counts the retries
35
+ after the first attempt: the default `2` keeps today's 3 attempts, `0`
36
+ disables retrying, so a failing call raises after exactly one request.
37
+ `retry_wait_seconds` is the pause between attempts (default 3 seconds). The
38
+ setting applies to every retried call: the v2 verbs, the v1 session helpers
39
+ and OAuth token acquisition. Which errors are retried (network faults and
40
+ 5xx) is unchanged.
41
+ - **`GlpiResponseBodyError`**, exported from the package root.
42
+
43
+ ### Fixed
44
+
45
+ - **A success response whose body is not JSON now raises `GlpiProtocolError`
46
+ instead of a bare `json.JSONDecodeError`.** A server or a proxy answering
47
+ 200 with an HTML page or a garbled body used to surface a `ValueError`
48
+ that read like bad input. Every decode of a success body, on the v2
49
+ transport, the v1 session and the OAuth token manager, now goes through
50
+ one helper that raises the new `GlpiResponseBodyError` (a subclass of
51
+ `GlpiProtocolError`) with `status_code`, `url`, `content_type`,
52
+ `body_length` and a bounded `body_excerpt`, and chains the decode error as
53
+ `__cause__`. The body is kept out of the message. It is not retried: a
54
+ 2xx means the request was processed. Empty answers on routes that accept
55
+ them (204, `DELETE`, v1 calls without a payload) are unchanged; an empty
56
+ 200 on a route that must return JSON raises the same error. The lenient
57
+ helpers `response_json_or_empty` and `response_json_mapping` keep an
58
+ empty or whitespace-only body as empty but now raise the same error for a
59
+ non-empty body that is not JSON; the new error is a `ValueError` subclass
60
+ like the one it replaces, so existing `except ValueError` handlers still
61
+ catch it.
62
+ - **Concurrent renewals of the legacy v1 session.** A client shared by
63
+ concurrent tasks or threads renewed the v1 session once per request that
64
+ found the token stale (every 15 minutes by default), on the first lazy
65
+ `initSession`, and after a 401/403 rejection: each renewal killed the
66
+ token and opened a session, so a second `killSession` answered 401 and
67
+ one server-side session leaked per renewal. Every acquisition now takes a
68
+ lock and re-checks under it whether the work is still needed, so waiters
69
+ reuse the token the first renewal obtained and the session is killed and
70
+ opened once.
71
+
72
+ ## 0.6.10 — 2026-11-16
73
+
74
+ A minor addition: the GLPI v2 `/Dropdowns/ITILCategory` routes, so a caller
75
+ can find and create ITIL categories. Existing methods are unchanged.
76
+
77
+ ### Added
78
+
79
+ - **`search_itil_categories`, `iter_search_itil_categories`,
80
+ `get_itil_category`, `create_itil_category`, `update_itil_category` and
81
+ `delete_itil_category`** on both clients, from a new `ITILCategoryMixin`
82
+ and the `ITIL_CATEGORY_ENDPOINT` constant.
83
+ - **`skip_entity: bool = False`** on `search_itil_categories`,
84
+ `iter_search_itil_categories` and `get_itil_category`: `True` omits the
85
+ `GLPI-Entity`, `GLPI-Profile` and `GLPI-Entity-Recursive` headers so the
86
+ call spans every entity the caller can see. The write methods always send
87
+ them.
88
+ - **`GetITILCategory`, `PostITILCategory`, `PatchITILCategory` and
89
+ `DeleteITILCategory`**, modelled on `components.schemas.ITILCategory`
90
+ (entity, parent, code, templates, per-type visibility flags and
91
+ timestamps), exported from the package root and from
92
+ `glpi_python_client.models`.
93
+
7
94
  ## 0.6.9 — 2026-11-10
8
95
 
9
96
  A fix for GLPI 12. GLPI 12.0.1 sends a ticket's `ola_ttr` and `ola_tto` as an
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: glpi-python-client
3
- Version: 0.6.9
3
+ Version: 0.6.12
4
4
  Summary: A typed Python client for GLPI ITSM APIs.
5
5
  Project-URL: Homepage, https://github.com/baraline/glpi_python_client
6
6
  Project-URL: Documentation, https://glpi-python-client.readthedocs.io/en/latest/
@@ -82,6 +82,10 @@ guide for the full picture, including which methods raise which type.
82
82
  :members:
83
83
  :show-inheritance:
84
84
 
85
+ .. autoexception:: GlpiResponseBodyError
86
+ :members:
87
+ :show-inheritance:
88
+
85
89
  .. autoexception:: GlpiContentError
86
90
  :members:
87
91
  :show-inheritance:
@@ -307,6 +311,25 @@ Ticket Team Members
307
311
  :undoc-members:
308
312
  :show-inheritance:
309
313
 
314
+ Pending reasons
315
+ ---------------
316
+
317
+ Models for the GLPI pending-reason catalogue (v2) and a ticket's pending
318
+ reason item (legacy v1). The companion mixin methods are exposed on
319
+ :class:`GlpiClient` / :class:`AsyncGlpiClient` as ``list_pending_reasons``,
320
+ ``iter_pending_reasons``, ``get_ticket_pending_reason``,
321
+ ``set_ticket_pending_reason`` and ``clear_ticket_pending_reason``.
322
+
323
+ .. autoclass:: PendingReason
324
+ :members:
325
+ :undoc-members:
326
+ :show-inheritance:
327
+
328
+ .. autoclass:: PendingReasonItem
329
+ :members:
330
+ :undoc-members:
331
+ :show-inheritance:
332
+
310
333
  Documents
311
334
  ---------
312
335
 
@@ -386,6 +409,29 @@ Locations
386
409
  :undoc-members:
387
410
  :show-inheritance:
388
411
 
412
+ ITIL Categories
413
+ ---------------
414
+
415
+ .. autoclass:: GetITILCategory
416
+ :members:
417
+ :undoc-members:
418
+ :show-inheritance:
419
+
420
+ .. autoclass:: PostITILCategory
421
+ :members:
422
+ :undoc-members:
423
+ :show-inheritance:
424
+
425
+ .. autoclass:: PatchITILCategory
426
+ :members:
427
+ :undoc-members:
428
+ :show-inheritance:
429
+
430
+ .. autoclass:: DeleteITILCategory
431
+ :members:
432
+ :undoc-members:
433
+ :show-inheritance:
434
+
389
435
  Knowledge Base — Articles
390
436
  -------------------------
391
437
 
@@ -14,8 +14,8 @@ Neither is a wrapper around the other; both are the same code, as
14
14
 
15
15
  Both clients speak the GLPI **v2** high-level API and fall back to the
16
16
  legacy v1 API for features that are not exposed by v2, currently
17
- binary document uploads and the ``Fields`` plugin custom-field
18
- helpers. They expose the exact same endpoint methods and accept the
17
+ binary document uploads, the ``Fields`` plugin custom-field
18
+ helpers and the ticket pending-reason item methods. They expose the exact same endpoint methods and accept the
19
19
  same constructor arguments.
20
20
  Public methods always return Pydantic models (or simple Python types)
21
21
  and never raw dictionaries.
@@ -117,12 +117,18 @@ Optional constructor arguments
117
117
  ``"en_GB"``).
118
118
  * ``verify_ssl`` — set to ``False`` only on test instances with
119
119
  self-signed certificates.
120
+ * ``max_retries`` — automatic retries after the first attempt (default
121
+ ``2``, so 3 attempts in total); ``0`` disables retrying. See
122
+ :ref:`retry-behaviour`.
123
+ * ``retry_wait_seconds`` — pause between two attempts (default 3 seconds).
120
124
  * ``auth_token_refresh`` — number of seconds before token expiry at
121
125
  which the auth manager proactively refreshes the OAuth access token.
122
126
  * ``v1_base_url`` and ``v1_user_token`` — together enable the legacy v1
123
127
  fallback used by :meth:`GlpiClient.upload_document` and the
124
128
  ``Fields`` plugin helpers such as
125
- :meth:`GlpiClient.get_ticket_custom_fields`.
129
+ :meth:`GlpiClient.get_ticket_custom_fields`, and the ticket
130
+ pending-reason methods such as
131
+ :meth:`GlpiClient.set_ticket_pending_reason`.
126
132
 
127
133
  ``from_env``
128
134
  ~~~~~~~~~~~~
@@ -142,6 +148,7 @@ build the client for you:
142
148
  offset. There is no default: guessing UTC against a Europe/Paris instance
143
149
  shifts those values by an hour or two and never raises.
144
150
  * ``GLPI_LANGUAGE``, ``GLPI_VERIFY_SSL``
151
+ * ``GLPI_MAX_RETRIES``, ``GLPI_RETRY_WAIT_SECONDS`` -- see :ref:`retry-behaviour`.
145
152
  * ``GLPI_V1_BASE_URL``, ``GLPI_V1_USER_TOKEN``, ``GLPI_V1_APP_TOKEN``
146
153
 
147
154
  .. code-block:: python
@@ -377,6 +384,8 @@ The full set is re-exported from the package root, including
377
384
  ``GetTicket`` / ``PostTicket`` / ``PatchTicket`` / ``DeleteTicket``,
378
385
  ``GetUser`` / ``PostUser`` / ``PatchUser`` / ``DeleteUser``,
379
386
  ``GetLocation`` / ``PostLocation`` / ``PatchLocation`` / ``DeleteLocation``,
387
+ ``GetITILCategory`` / ``PostITILCategory`` / ``PatchITILCategory`` /
388
+ ``DeleteITILCategory``,
380
389
  ``GetEntity`` / ``PostEntity`` / ``PatchEntity`` / ``DeleteEntity``,
381
390
  ``GetGroup`` / ``PostGroup`` / ``PatchGroup`` / ``DeleteGroup``,
382
391
  ``UserAuthorization``,
@@ -1078,6 +1087,64 @@ to ``list_item_plugin_field_rows``, ``create_item_plugin_field_row``,
1078
1087
  or ``update_item_plugin_field_row`` only when you need the raw v1 row
1079
1088
  shape.
1080
1089
 
1090
+ Pending reasons
1091
+ ~~~~~~~~~~~~~~~
1092
+
1093
+ A pause is ticket status ``4`` (Pending) plus at most one item linking
1094
+ the ticket to an entry of the pending-reason catalogue. The catalogue is
1095
+ read from the v2 API; the ticket's item needs the legacy v1 session
1096
+ (``v1_base_url`` and ``v1_user_token``), because the v2 item schema does
1097
+ not say *which* reason a ticket carries and no v2 route writes an item.
1098
+ Without the v1 session the three ticket methods raise ``RuntimeError``.
1099
+
1100
+ .. code-block:: python
1101
+
1102
+ from glpi_python_client import GlpiClient, GlpiTicketStatus, PatchTicket
1103
+
1104
+ with GlpiClient(
1105
+ glpi_api_url="https://glpi.example.com/api.php/v2",
1106
+ server_timezone="Europe/Paris",
1107
+ client_id="oauth-client-id",
1108
+ client_secret="oauth-client-secret",
1109
+ username="api-user",
1110
+ password="api-password",
1111
+ v1_base_url="https://glpi.example.com/apirest.php",
1112
+ v1_user_token="legacy-user-token",
1113
+ ) as client:
1114
+ reasons = client.list_pending_reasons()
1115
+ reason = reasons[0]
1116
+
1117
+ # The status is the caller's to set: the item alone does not pause.
1118
+ client.update_ticket(ticket_id, PatchTicket(status=GlpiTicketStatus.PENDING))
1119
+ item = client.set_ticket_pending_reason(
1120
+ ticket_id,
1121
+ reason.id,
1122
+ followup_frequency=reason.followup_frequency or 0,
1123
+ followups_before_resolution=reason.followups_before_resolution or 0,
1124
+ )
1125
+ print(item.pendingreasons_id)
1126
+
1127
+ print(client.get_ticket_pending_reason(ticket_id)) # item or None
1128
+
1129
+ client.clear_ticket_pending_reason(ticket_id) # True, or False if none
1130
+
1131
+ Things worth knowing:
1132
+
1133
+ * ``set_ticket_pending_reason`` creates the item when the ticket has none
1134
+ and changes it otherwise, so it avoids GLPI's duplicate-key error
1135
+ unless another writer creates the item between its read and its write.
1136
+ It does **not** change the ticket status. An item set on a ticket that
1137
+ is not pending is stored but has no effect; GLPI removes an item when
1138
+ its ticket leaves status ``4``, but one set on a ticket that never was
1139
+ pending is not known to be cleaned up, so clear it explicitly.
1140
+ * The item does not copy the catalogue's ``followup_frequency``: pass the
1141
+ frequencies wanted, or the item stores ``0``.
1142
+ * ``clear_ticket_pending_reason`` leaves the ticket at status ``4``,
1143
+ without a reason. Leaving status ``4`` removes the item by itself.
1144
+ * A reason id that is not in the catalogue is stored without error.
1145
+ * None of these calls adds a followup to the timeline. The GLPI web
1146
+ interface pauses through a followup, which does.
1147
+
1081
1148
  Aggregated ticket context
1082
1149
  ~~~~~~~~~~~~~~~~~~~~~~~~~
1083
1150
 
@@ -1228,6 +1295,7 @@ batches until the API returns fewer rows than the requested
1228
1295
  * :meth:`GlpiClient.iter_search_users`
1229
1296
  * :meth:`GlpiClient.iter_search_entities`
1230
1297
  * :meth:`GlpiClient.iter_search_groups`
1298
+ * :meth:`GlpiClient.iter_search_itil_categories`
1231
1299
 
1232
1300
  .. code-block:: python
1233
1301
 
@@ -1773,7 +1841,8 @@ Connection failures, DNS errors and timeouts are translated into
1773
1841
  :class:`~glpi_python_client.GlpiTimeoutError` subclass for a timeout --
1774
1842
  so you never need to import the HTTP library to catch them. The original
1775
1843
  transport exception stays attached as ``__cause__`` for debugging, and
1776
- these faults are retried three times before they surface:
1844
+ these faults are retried (three attempts by default, see
1845
+ :ref:`retry-behaviour`) before they surface:
1777
1846
 
1778
1847
  .. code-block:: python
1779
1848
 
@@ -1803,10 +1872,11 @@ The hierarchy lets you narrow as far as you need:
1803
1872
  ├── GlpiStatusError GLPI answered with an unexpected status
1804
1873
  │ ├── GlpiAuthError 401 / 403
1805
1874
  │ ├── GlpiNotFoundError 404
1806
- │ └── GlpiServerError 5xx (retried up to 3 attempts before it
1875
+ │ └── GlpiServerError 5xx (retried, 3 attempts by default, before it
1807
1876
  │ reaches you)
1808
1877
  ├── GlpiValidationError the client rejected your argument
1809
1878
  ├── GlpiProtocolError GLPI answered 2xx with an unusable body
1879
+ │ └── GlpiResponseBodyError the 2xx body is not JSON
1810
1880
  └── GlpiContentError a rich-text body could not be converted
1811
1881
  between HTML and Markdown
1812
1882
 
@@ -1824,6 +1894,35 @@ usually want:
1824
1894
  print(exc.url) # the absolute URL that was requested
1825
1895
  print(exc.response_text) # the response body
1826
1896
 
1897
+ A success status does not guarantee a usable body. When a server, or a
1898
+ proxy in front of it, answers 2xx with an HTML page, a garbled body or
1899
+ nothing at all on a route that must return a payload, the client raises
1900
+ :class:`~glpi_python_client.GlpiResponseBodyError`, a
1901
+ :class:`~glpi_python_client.GlpiProtocolError`, instead of a bare
1902
+ ``json.JSONDecodeError``. The request was sent and answered, so the failure
1903
+ is the response, not your arguments:
1904
+
1905
+ .. code-block:: python
1906
+
1907
+ from glpi_python_client import GlpiResponseBodyError
1908
+
1909
+ try:
1910
+ ticket = client.get_ticket(1)
1911
+ except GlpiResponseBodyError as exc:
1912
+ print(exc.status_code) # 200
1913
+ print(exc.url) # the absolute URL that was requested
1914
+ print(exc.content_type) # for example "text/html"
1915
+ print(exc.body_length) # body size in bytes
1916
+ print(exc.body_excerpt) # first 200 bytes (UTF-8, replacement), for diagnostics
1917
+
1918
+ The decode error is chained as ``__cause__``. The message names the status,
1919
+ URL, content type and length but never the body, which may carry data. The
1920
+ error is **not** retried: a 2xx means the request was processed, and
1921
+ sending a write again could apply it twice. Routes that deliberately accept
1922
+ an empty answer (a 204, a ``DELETE``, a v1 call with no payload) still
1923
+ return normally; an empty 200 on a route that must return a payload raises
1924
+ the same error with ``body_length == 0``.
1925
+
1827
1926
  .. note::
1828
1927
 
1829
1928
  :class:`~glpi_python_client.GlpiStatusError`,
@@ -2219,27 +2318,44 @@ definition list's newline becomes a hard break. Bold inside bold
2219
2318
  link or image title loses a backslash before punctuation. The caption,
2220
2319
  colgroup and image-title shapes above settle too, on what they already lost.
2221
2320
 
2321
+ .. _retry-behaviour:
2322
+
2222
2323
  Retry behaviour
2223
2324
  ~~~~~~~~~~~~~~~
2224
2325
 
2225
- Each transport and v1-session retry decorator retries a server error
2226
- (5xx) up to 3 attempts with a 3-second fixed wait before
2227
- :class:`~glpi_python_client.GlpiServerError` reaches you. Client errors
2228
- (4xx) are never retried — they cannot succeed on a second attempt.
2326
+ Every v2 verb, every v1-session helper and OAuth token acquisition retry a
2327
+ network fault (:class:`~glpi_python_client.GlpiTransportError`) or a server
2328
+ error (5xx, :class:`~glpi_python_client.GlpiServerError`) before it reaches
2329
+ you. Client errors (4xx) are never retried — they cannot succeed on a second
2330
+ attempt. The two client settings below govern all of these calls alike,
2331
+ token acquisition included; which errors are retried does not depend on them:
2332
+
2333
+ * ``max_retries`` — retries after the first attempt. The default ``2`` makes
2334
+ 3 attempts in total; ``0`` disables retrying, so a failing call raises after
2335
+ exactly one request. Use ``0`` when your own code owns the retry policy: a
2336
+ retried write may already have been applied.
2337
+ * ``retry_wait_seconds`` — fixed pause between two attempts (default 3
2338
+ seconds; ``None`` keeps it).
2339
+
2340
+ .. code-block:: python
2341
+
2342
+ client = GlpiClient.from_env(max_retries=0) # or GLPI_MAX_RETRIES=0
2343
+
2344
+ The counts below are those of the default setting (3 attempts).
2229
2345
 
2230
- OAuth token acquisition follows the same 3-attempt policy, with one
2346
+ OAuth token acquisition follows the same policy, with one
2231
2347
  exception: refreshing an already-issued token does not raise directly on
2232
2348
  a failed response. It logs a warning and falls through to a fresh token
2233
- acquisition, which carries its own independent 3-attempt retry
2234
- decorator. The refresh method's own retry decorator only retries a
2349
+ acquisition, which carries its own independent retry decorator. The
2350
+ refresh method's own retry decorator only retries a
2235
2351
  network-level fault on the refresh request itself (a
2236
2352
  :class:`~glpi_python_client.GlpiTransportError` raised before any
2237
2353
  response is received) —
2238
2354
  it does **not** retry a :class:`~glpi_python_client.GlpiServerError`
2239
2355
  from the fall-through, since that failure is already being retried by
2240
2356
  the nested acquisition call. A persistent 5xx encountered while
2241
- refreshing therefore costs exactly 1 refresh POST + up to 3 nested
2242
- acquisition POSTs = 4 POST requests before
2357
+ refreshing therefore costs, with the default setting, exactly 1 refresh
2358
+ POST + up to 3 nested acquisition POSTs = 4 POST requests before
2243
2359
  :class:`~glpi_python_client.GlpiServerError` reaches you. A rejected
2244
2360
  credential (401/403) is not retried at either layer and fails after at
2245
2361
  most 2 POST requests.
@@ -24,6 +24,7 @@ from glpi_python_client._errors import (
24
24
  GlpiError,
25
25
  GlpiNotFoundError,
26
26
  GlpiProtocolError,
27
+ GlpiResponseBodyError,
27
28
  GlpiServerError,
28
29
  GlpiStatusError,
29
30
  GlpiTimeoutError,
@@ -41,6 +42,7 @@ from glpi_python_client.models import (
41
42
  DeleteEntity,
42
43
  DeleteFollowup,
43
44
  DeleteGroup,
45
+ DeleteITILCategory,
44
46
  DeleteKBArticle,
45
47
  DeleteKBArticleComment,
46
48
  DeleteKBCategory,
@@ -62,6 +64,7 @@ from glpi_python_client.models import (
62
64
  GetEntity,
63
65
  GetFollowup,
64
66
  GetGroup,
67
+ GetITILCategory,
65
68
  GetKBArticle,
66
69
  GetKBArticleComment,
67
70
  GetKBArticleRevision,
@@ -99,6 +102,7 @@ from glpi_python_client.models import (
99
102
  PatchEntity,
100
103
  PatchFollowup,
101
104
  PatchGroup,
105
+ PatchITILCategory,
102
106
  PatchKBArticle,
103
107
  PatchKBArticleComment,
104
108
  PatchKBCategory,
@@ -109,6 +113,8 @@ from glpi_python_client.models import (
109
113
  PatchTicketTask,
110
114
  PatchTimelineDocument,
111
115
  PatchUser,
116
+ PendingReason,
117
+ PendingReasonItem,
112
118
  PostComputer,
113
119
  PostContract,
114
120
  PostContractCost,
@@ -118,6 +124,7 @@ from glpi_python_client.models import (
118
124
  PostEntity,
119
125
  PostFollowup,
120
126
  PostGroup,
127
+ PostITILCategory,
121
128
  PostKBArticle,
122
129
  PostKBArticleComment,
123
130
  PostKBCategory,
@@ -138,7 +145,7 @@ from glpi_python_client.rsql import (
138
145
  date_window,
139
146
  )
140
147
 
141
- __version__ = "0.6.9"
148
+ __version__ = "0.6.12"
142
149
 
143
150
  __all__ = [
144
151
  "AsyncGlpiClient",
@@ -151,6 +158,7 @@ __all__ = [
151
158
  "DeleteEntity",
152
159
  "DeleteFollowup",
153
160
  "DeleteGroup",
161
+ "DeleteITILCategory",
154
162
  "DeleteKBArticle",
155
163
  "DeleteKBArticleComment",
156
164
  "DeleteKBCategory",
@@ -172,6 +180,7 @@ __all__ = [
172
180
  "GetEntity",
173
181
  "GetFollowup",
174
182
  "GetGroup",
183
+ "GetITILCategory",
175
184
  "GetKBArticle",
176
185
  "GetKBArticleComment",
177
186
  "GetKBArticleRevision",
@@ -196,6 +205,7 @@ __all__ = [
196
205
  "GlpiNotFoundError",
197
206
  "GlpiPriority",
198
207
  "GlpiProtocolError",
208
+ "GlpiResponseBodyError",
199
209
  "GlpiServerError",
200
210
  "GlpiSolutionStatus",
201
211
  "GlpiStatusError",
@@ -220,6 +230,7 @@ __all__ = [
220
230
  "PatchEntity",
221
231
  "PatchFollowup",
222
232
  "PatchGroup",
233
+ "PatchITILCategory",
223
234
  "PatchKBArticle",
224
235
  "PatchKBArticleComment",
225
236
  "PatchKBCategory",
@@ -230,6 +241,8 @@ __all__ = [
230
241
  "PatchTicketTask",
231
242
  "PatchTimelineDocument",
232
243
  "PatchUser",
244
+ "PendingReason",
245
+ "PendingReasonItem",
233
246
  "PostComputer",
234
247
  "PostContract",
235
248
  "PostContractCost",
@@ -239,6 +252,7 @@ __all__ = [
239
252
  "PostEntity",
240
253
  "PostFollowup",
241
254
  "PostGroup",
255
+ "PostITILCategory",
242
256
  "PostKBArticle",
243
257
  "PostKBArticleComment",
244
258
  "PostKBCategory",
@@ -0,0 +1,90 @@
1
+ """Configurable retry policy shared by the v2 transport, v1 session and OAuth.
2
+
3
+ Every network-facing helper of the client retries a transient failure. The
4
+ policy is a per-client setting, not a decorator fixed at import time, so the
5
+ decorator built here reads two attributes from the object it decorates:
6
+
7
+ ``_max_retries``
8
+ Retries after the first attempt. ``0`` disables retrying.
9
+ ``_retry_wait_seconds``
10
+ Fixed pause between attempts; ``None`` selects
11
+ :data:`DEFAULT_RETRY_WAIT_SECONDS`.
12
+
13
+ Which errors are retried is decided by each call site (``retry_on``), not by
14
+ the setting.
15
+ """
16
+
17
+ from __future__ import annotations
18
+
19
+ import functools
20
+ from collections.abc import Callable
21
+ from typing import Any, TypeVar, cast
22
+
23
+ from tenacity import (
24
+ AsyncRetrying,
25
+ retry_if_exception_type,
26
+ stop_after_attempt,
27
+ wait_fixed,
28
+ )
29
+
30
+ from glpi_python_client._errors import GlpiValidationError
31
+
32
+ #: Retries after the first attempt (3 attempts in total).
33
+ DEFAULT_MAX_RETRIES = 2
34
+
35
+ #: Seconds between two attempts when no wait is configured.
36
+ DEFAULT_RETRY_WAIT_SECONDS = 3.0
37
+
38
+ F = TypeVar("F", bound=Callable[..., Any])
39
+
40
+
41
+ def validate_retry_settings(
42
+ max_retries: object, retry_wait_seconds: object
43
+ ) -> tuple[int, float | None]:
44
+ """Return the validated ``(max_retries, retry_wait_seconds)`` pair.
45
+
46
+ Raises
47
+ ------
48
+ GlpiValidationError
49
+ If ``max_retries`` is not an integer >= 0, or ``retry_wait_seconds``
50
+ is neither ``None`` nor a number >= 0.
51
+ """
52
+
53
+ if (
54
+ isinstance(max_retries, bool)
55
+ or not isinstance(max_retries, int)
56
+ or max_retries < 0
57
+ ):
58
+ raise GlpiValidationError("max_retries must be an integer >= 0")
59
+ if retry_wait_seconds is not None and (
60
+ isinstance(retry_wait_seconds, bool)
61
+ or not isinstance(retry_wait_seconds, int | float)
62
+ or retry_wait_seconds < 0
63
+ ):
64
+ raise GlpiValidationError("retry_wait_seconds must be a number >= 0 or None")
65
+ return max_retries, retry_wait_seconds
66
+
67
+
68
+ def retried(
69
+ retry_on: type[BaseException] | tuple[type[BaseException], ...],
70
+ ) -> Callable[[F], F]:
71
+ """Retry the decorated method on ``retry_on`` per its instance's policy.
72
+
73
+ The final error is re-raised as-is, never as ``tenacity.RetryError``.
74
+ """
75
+
76
+ def decorator(func: F) -> F:
77
+ @functools.wraps(func)
78
+ async def wrapper(self: Any, *args: Any, **kwargs: Any) -> Any:
79
+ wait = self._retry_wait_seconds
80
+ retrying = AsyncRetrying(
81
+ retry=retry_if_exception_type(retry_on),
82
+ stop=stop_after_attempt(self._max_retries + 1),
83
+ wait=wait_fixed(DEFAULT_RETRY_WAIT_SECONDS if wait is None else wait),
84
+ reraise=True,
85
+ )
86
+ return await retrying(func, self, *args, **kwargs)
87
+
88
+ return cast(F, wrapper)
89
+
90
+ return decorator