bluehive 0.1.0a23__tar.gz → 0.1.0a25__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 (143) hide show
  1. bluehive-0.1.0a25/.release-please-manifest.json +3 -0
  2. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/CHANGELOG.md +16 -0
  3. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/PKG-INFO +1 -1
  4. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/pyproject.toml +1 -1
  5. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/_base_client.py +5 -2
  6. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/_compat.py +3 -3
  7. bluehive-0.1.0a25/src/bluehive/_utils/_json.py +35 -0
  8. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/_version.py +1 -1
  9. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/types/employers/service_bundle_create_response.py +12 -0
  10. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/types/employers/service_bundle_list_response.py +12 -0
  11. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/types/employers/service_bundle_retrieve_response.py +12 -0
  12. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/types/employers/service_bundle_update_response.py +12 -0
  13. bluehive-0.1.0a25/tests/test_utils/test_json.py +126 -0
  14. bluehive-0.1.0a23/.release-please-manifest.json +0 -3
  15. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/.gitignore +0 -0
  16. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/CONTRIBUTING.md +0 -0
  17. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/LICENSE +0 -0
  18. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/README.md +0 -0
  19. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/SECURITY.md +0 -0
  20. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/api.md +0 -0
  21. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/bin/check-release-environment +0 -0
  22. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/bin/publish-pypi +0 -0
  23. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/examples/.keep +0 -0
  24. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/noxfile.py +0 -0
  25. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/release-please-config.json +0 -0
  26. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/requirements-dev.lock +0 -0
  27. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/requirements.lock +0 -0
  28. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/__init__.py +0 -0
  29. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/_client.py +0 -0
  30. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/_constants.py +0 -0
  31. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/_exceptions.py +0 -0
  32. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/_files.py +0 -0
  33. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/_models.py +0 -0
  34. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/_qs.py +0 -0
  35. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/_resource.py +0 -0
  36. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/_response.py +0 -0
  37. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/_streaming.py +0 -0
  38. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/_types.py +0 -0
  39. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/_utils/__init__.py +0 -0
  40. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/_utils/_compat.py +0 -0
  41. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/_utils/_datetime_parse.py +0 -0
  42. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/_utils/_logs.py +0 -0
  43. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/_utils/_proxy.py +0 -0
  44. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/_utils/_reflection.py +0 -0
  45. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/_utils/_resources_proxy.py +0 -0
  46. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/_utils/_streams.py +0 -0
  47. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/_utils/_sync.py +0 -0
  48. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/_utils/_transform.py +0 -0
  49. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/_utils/_typing.py +0 -0
  50. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/_utils/_utils.py +0 -0
  51. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/lib/.keep +0 -0
  52. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/py.typed +0 -0
  53. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/resources/__init__.py +0 -0
  54. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/resources/database.py +0 -0
  55. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/resources/employees.py +0 -0
  56. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/resources/employers/__init__.py +0 -0
  57. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/resources/employers/employers.py +0 -0
  58. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/resources/employers/service_bundles.py +0 -0
  59. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/resources/fax.py +0 -0
  60. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/resources/health.py +0 -0
  61. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/resources/hl7.py +0 -0
  62. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/resources/integrations.py +0 -0
  63. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/resources/orders.py +0 -0
  64. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/resources/providers.py +0 -0
  65. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/resources/version.py +0 -0
  66. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/types/__init__.py +0 -0
  67. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/types/database_check_health_response.py +0 -0
  68. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/types/employee_create_params.py +0 -0
  69. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/types/employee_create_response.py +0 -0
  70. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/types/employee_delete_response.py +0 -0
  71. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/types/employee_link_user_params.py +0 -0
  72. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/types/employee_link_user_response.py +0 -0
  73. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/types/employee_list_params.py +0 -0
  74. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/types/employee_list_response.py +0 -0
  75. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/types/employee_retrieve_response.py +0 -0
  76. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/types/employee_unlink_user_params.py +0 -0
  77. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/types/employee_unlink_user_response.py +0 -0
  78. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/types/employee_update_params.py +0 -0
  79. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/types/employee_update_response.py +0 -0
  80. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/types/employer_create_params.py +0 -0
  81. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/types/employer_create_response.py +0 -0
  82. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/types/employer_list_response.py +0 -0
  83. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/types/employer_retrieve_response.py +0 -0
  84. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/types/employers/__init__.py +0 -0
  85. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/types/employers/service_bundle_create_params.py +0 -0
  86. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/types/employers/service_bundle_update_params.py +0 -0
  87. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/types/fax_list_providers_response.py +0 -0
  88. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/types/fax_retrieve_status_response.py +0 -0
  89. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/types/fax_send_params.py +0 -0
  90. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/types/fax_send_response.py +0 -0
  91. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/types/health_check_response.py +0 -0
  92. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/types/hl7_send_results_params.py +0 -0
  93. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/types/hl7_send_results_response.py +0 -0
  94. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/types/integration_check_active_response.py +0 -0
  95. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/types/integration_list_response.py +0 -0
  96. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/types/order_create_params.py +0 -0
  97. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/types/order_create_response.py +0 -0
  98. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/types/order_retrieve_response.py +0 -0
  99. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/types/order_retrieve_results_params.py +0 -0
  100. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/types/order_retrieve_results_response.py +0 -0
  101. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/types/order_schedule_appointment_params.py +0 -0
  102. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/types/order_schedule_appointment_response.py +0 -0
  103. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/types/order_send_for_employee_params.py +0 -0
  104. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/types/order_send_for_employee_response.py +0 -0
  105. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/types/order_update_params.py +0 -0
  106. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/types/order_update_response.py +0 -0
  107. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/types/order_update_status_params.py +0 -0
  108. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/types/order_update_status_response.py +0 -0
  109. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/types/order_upload_results_params.py +0 -0
  110. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/types/order_upload_results_response.py +0 -0
  111. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/types/provider_lookup_params.py +0 -0
  112. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/types/provider_lookup_response.py +0 -0
  113. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/src/bluehive/types/version_retrieve_response.py +0 -0
  114. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/tests/__init__.py +0 -0
  115. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/tests/api_resources/__init__.py +0 -0
  116. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/tests/api_resources/employers/__init__.py +0 -0
  117. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/tests/api_resources/employers/test_service_bundles.py +0 -0
  118. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/tests/api_resources/test_database.py +0 -0
  119. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/tests/api_resources/test_employees.py +0 -0
  120. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/tests/api_resources/test_employers.py +0 -0
  121. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/tests/api_resources/test_fax.py +0 -0
  122. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/tests/api_resources/test_health.py +0 -0
  123. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/tests/api_resources/test_hl7.py +0 -0
  124. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/tests/api_resources/test_integrations.py +0 -0
  125. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/tests/api_resources/test_orders.py +0 -0
  126. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/tests/api_resources/test_providers.py +0 -0
  127. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/tests/api_resources/test_version.py +0 -0
  128. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/tests/conftest.py +0 -0
  129. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/tests/sample_file.txt +0 -0
  130. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/tests/test_client.py +0 -0
  131. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/tests/test_deepcopy.py +0 -0
  132. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/tests/test_extract_files.py +0 -0
  133. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/tests/test_files.py +0 -0
  134. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/tests/test_models.py +0 -0
  135. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/tests/test_qs.py +0 -0
  136. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/tests/test_required_args.py +0 -0
  137. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/tests/test_response.py +0 -0
  138. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/tests/test_streaming.py +0 -0
  139. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/tests/test_transform.py +0 -0
  140. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/tests/test_utils/test_datetime_parse.py +0 -0
  141. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/tests/test_utils/test_proxy.py +0 -0
  142. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/tests/test_utils/test_typing.py +0 -0
  143. {bluehive-0.1.0a23 → bluehive-0.1.0a25}/tests/utils.py +0 -0
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "0.1.0-alpha.25"
3
+ }
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.0-alpha.25 (2026-02-05)
4
+
5
+ Full Changelog: [v0.1.0-alpha.24...v0.1.0-alpha.25](https://github.com/bluehive-health/bluehive-sdk-python/compare/v0.1.0-alpha.24...v0.1.0-alpha.25)
6
+
7
+ ### Features
8
+
9
+ * **api:** api update ([627f5f8](https://github.com/bluehive-health/bluehive-sdk-python/commit/627f5f83617b10bed718ab5cead88c0c0ddb4ca9))
10
+
11
+ ## 0.1.0-alpha.24 (2026-01-30)
12
+
13
+ Full Changelog: [v0.1.0-alpha.23...v0.1.0-alpha.24](https://github.com/bluehive-health/bluehive-sdk-python/compare/v0.1.0-alpha.23...v0.1.0-alpha.24)
14
+
15
+ ### Features
16
+
17
+ * **client:** add custom JSON encoder for extended type support ([0a0efd2](https://github.com/bluehive-health/bluehive-sdk-python/commit/0a0efd203839e8f7547da5576d89edea65d758ac))
18
+
3
19
  ## 0.1.0-alpha.23 (2026-01-29)
4
20
 
5
21
  Full Changelog: [v0.1.0-alpha.22...v0.1.0-alpha.23](https://github.com/bluehive-health/bluehive-sdk-python/compare/v0.1.0-alpha.22...v0.1.0-alpha.23)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: bluehive
3
- Version: 0.1.0a23
3
+ Version: 0.1.0a25
4
4
  Summary: The official Python library for the bluehive API
5
5
  Project-URL: Homepage, https://github.com/bluehive-health/bluehive-sdk-python
6
6
  Project-URL: Repository, https://github.com/bluehive-health/bluehive-sdk-python
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "bluehive"
3
- version = "0.1.0-alpha.23"
3
+ version = "0.1.0-alpha.25"
4
4
  description = "The official Python library for the bluehive API"
5
5
  dynamic = ["readme"]
6
6
  license = "Apache-2.0"
@@ -86,6 +86,7 @@ from ._exceptions import (
86
86
  APIConnectionError,
87
87
  APIResponseValidationError,
88
88
  )
89
+ from ._utils._json import openapi_dumps
89
90
 
90
91
  log: logging.Logger = logging.getLogger(__name__)
91
92
 
@@ -554,8 +555,10 @@ class BaseClient(Generic[_HttpxClientT, _DefaultStreamT]):
554
555
  kwargs["content"] = options.content
555
556
  elif isinstance(json_data, bytes):
556
557
  kwargs["content"] = json_data
557
- else:
558
- kwargs["json"] = json_data if is_given(json_data) else None
558
+ elif not files:
559
+ # Don't set content when JSON is sent as multipart/form-data,
560
+ # since httpx's content param overrides other body arguments
561
+ kwargs["content"] = openapi_dumps(json_data) if is_given(json_data) and json_data is not None else None
559
562
  kwargs["files"] = files
560
563
  else:
561
564
  headers.pop("Content-Type", None)
@@ -139,6 +139,7 @@ def model_dump(
139
139
  exclude_defaults: bool = False,
140
140
  warnings: bool = True,
141
141
  mode: Literal["json", "python"] = "python",
142
+ by_alias: bool | None = None,
142
143
  ) -> dict[str, Any]:
143
144
  if (not PYDANTIC_V1) or hasattr(model, "model_dump"):
144
145
  return model.model_dump(
@@ -148,13 +149,12 @@ def model_dump(
148
149
  exclude_defaults=exclude_defaults,
149
150
  # warnings are not supported in Pydantic v1
150
151
  warnings=True if PYDANTIC_V1 else warnings,
152
+ by_alias=by_alias,
151
153
  )
152
154
  return cast(
153
155
  "dict[str, Any]",
154
156
  model.dict( # pyright: ignore[reportDeprecated, reportUnnecessaryCast]
155
- exclude=exclude,
156
- exclude_unset=exclude_unset,
157
- exclude_defaults=exclude_defaults,
157
+ exclude=exclude, exclude_unset=exclude_unset, exclude_defaults=exclude_defaults, by_alias=bool(by_alias)
158
158
  ),
159
159
  )
160
160
 
@@ -0,0 +1,35 @@
1
+ import json
2
+ from typing import Any
3
+ from datetime import datetime
4
+ from typing_extensions import override
5
+
6
+ import pydantic
7
+
8
+ from .._compat import model_dump
9
+
10
+
11
+ def openapi_dumps(obj: Any) -> bytes:
12
+ """
13
+ Serialize an object to UTF-8 encoded JSON bytes.
14
+
15
+ Extends the standard json.dumps with support for additional types
16
+ commonly used in the SDK, such as `datetime`, `pydantic.BaseModel`, etc.
17
+ """
18
+ return json.dumps(
19
+ obj,
20
+ cls=_CustomEncoder,
21
+ # Uses the same defaults as httpx's JSON serialization
22
+ ensure_ascii=False,
23
+ separators=(",", ":"),
24
+ allow_nan=False,
25
+ ).encode()
26
+
27
+
28
+ class _CustomEncoder(json.JSONEncoder):
29
+ @override
30
+ def default(self, o: Any) -> Any:
31
+ if isinstance(o, datetime):
32
+ return o.isoformat()
33
+ if isinstance(o, pydantic.BaseModel):
34
+ return model_dump(o, exclude_unset=True, mode="json", by_alias=True)
35
+ return super().default(o)
@@ -1,4 +1,4 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  __title__ = "bluehive"
4
- __version__ = "0.1.0-alpha.23" # x-release-please-version
4
+ __version__ = "0.1.0-alpha.25" # x-release-please-version
@@ -22,6 +22,18 @@ class ServiceBundleCreateResponse(BaseModel):
22
22
 
23
23
  created_by: Optional[str] = FieldInfo(alias="createdBy", default=None)
24
24
 
25
+ externally_managed: Optional[bool] = FieldInfo(alias="externallyManaged", default=None)
26
+ """Indicates if this bundle originated from a third-party integration.
27
+
28
+ Externally managed bundles cannot be edited or deleted in BlueHive.
29
+ """
30
+
31
+ integration: Optional[str] = None
32
+ """
33
+ Name of the third-party integration that manages this bundle (e.g., "Enterprise
34
+ Health"). Null if bundle was created in BlueHive.
35
+ """
36
+
25
37
  limit: Optional[float] = None
26
38
 
27
39
  occurrence: Optional[str] = None
@@ -23,6 +23,18 @@ class ServiceBundleListResponseItem(BaseModel):
23
23
 
24
24
  created_by: Optional[str] = FieldInfo(alias="createdBy", default=None)
25
25
 
26
+ externally_managed: Optional[bool] = FieldInfo(alias="externallyManaged", default=None)
27
+ """Indicates if this bundle originated from a third-party integration.
28
+
29
+ Externally managed bundles cannot be edited or deleted in BlueHive.
30
+ """
31
+
32
+ integration: Optional[str] = None
33
+ """
34
+ Name of the third-party integration that manages this bundle (e.g., "Enterprise
35
+ Health"). Null if bundle was created in BlueHive.
36
+ """
37
+
26
38
  limit: Optional[float] = None
27
39
 
28
40
  occurrence: Optional[str] = None
@@ -22,6 +22,18 @@ class ServiceBundleRetrieveResponse(BaseModel):
22
22
 
23
23
  created_by: Optional[str] = FieldInfo(alias="createdBy", default=None)
24
24
 
25
+ externally_managed: Optional[bool] = FieldInfo(alias="externallyManaged", default=None)
26
+ """Indicates if this bundle originated from a third-party integration.
27
+
28
+ Externally managed bundles cannot be edited or deleted in BlueHive.
29
+ """
30
+
31
+ integration: Optional[str] = None
32
+ """
33
+ Name of the third-party integration that manages this bundle (e.g., "Enterprise
34
+ Health"). Null if bundle was created in BlueHive.
35
+ """
36
+
25
37
  limit: Optional[float] = None
26
38
 
27
39
  occurrence: Optional[str] = None
@@ -22,6 +22,18 @@ class ServiceBundleUpdateResponse(BaseModel):
22
22
 
23
23
  created_by: Optional[str] = FieldInfo(alias="createdBy", default=None)
24
24
 
25
+ externally_managed: Optional[bool] = FieldInfo(alias="externallyManaged", default=None)
26
+ """Indicates if this bundle originated from a third-party integration.
27
+
28
+ Externally managed bundles cannot be edited or deleted in BlueHive.
29
+ """
30
+
31
+ integration: Optional[str] = None
32
+ """
33
+ Name of the third-party integration that manages this bundle (e.g., "Enterprise
34
+ Health"). Null if bundle was created in BlueHive.
35
+ """
36
+
25
37
  limit: Optional[float] = None
26
38
 
27
39
  occurrence: Optional[str] = None
@@ -0,0 +1,126 @@
1
+ from __future__ import annotations
2
+
3
+ import datetime
4
+ from typing import Union
5
+
6
+ import pydantic
7
+
8
+ from bluehive import _compat
9
+ from bluehive._utils._json import openapi_dumps
10
+
11
+
12
+ class TestOpenapiDumps:
13
+ def test_basic(self) -> None:
14
+ data = {"key": "value", "number": 42}
15
+ json_bytes = openapi_dumps(data)
16
+ assert json_bytes == b'{"key":"value","number":42}'
17
+
18
+ def test_datetime_serialization(self) -> None:
19
+ dt = datetime.datetime(2023, 1, 1, 12, 0, 0)
20
+ data = {"datetime": dt}
21
+ json_bytes = openapi_dumps(data)
22
+ assert json_bytes == b'{"datetime":"2023-01-01T12:00:00"}'
23
+
24
+ def test_pydantic_model_serialization(self) -> None:
25
+ class User(pydantic.BaseModel):
26
+ first_name: str
27
+ last_name: str
28
+ age: int
29
+
30
+ model_instance = User(first_name="John", last_name="Kramer", age=83)
31
+ data = {"model": model_instance}
32
+ json_bytes = openapi_dumps(data)
33
+ assert json_bytes == b'{"model":{"first_name":"John","last_name":"Kramer","age":83}}'
34
+
35
+ def test_pydantic_model_with_default_values(self) -> None:
36
+ class User(pydantic.BaseModel):
37
+ name: str
38
+ role: str = "user"
39
+ active: bool = True
40
+ score: int = 0
41
+
42
+ model_instance = User(name="Alice")
43
+ data = {"model": model_instance}
44
+ json_bytes = openapi_dumps(data)
45
+ assert json_bytes == b'{"model":{"name":"Alice"}}'
46
+
47
+ def test_pydantic_model_with_default_values_overridden(self) -> None:
48
+ class User(pydantic.BaseModel):
49
+ name: str
50
+ role: str = "user"
51
+ active: bool = True
52
+
53
+ model_instance = User(name="Bob", role="admin", active=False)
54
+ data = {"model": model_instance}
55
+ json_bytes = openapi_dumps(data)
56
+ assert json_bytes == b'{"model":{"name":"Bob","role":"admin","active":false}}'
57
+
58
+ def test_pydantic_model_with_alias(self) -> None:
59
+ class User(pydantic.BaseModel):
60
+ first_name: str = pydantic.Field(alias="firstName")
61
+ last_name: str = pydantic.Field(alias="lastName")
62
+
63
+ model_instance = User(firstName="John", lastName="Doe")
64
+ data = {"model": model_instance}
65
+ json_bytes = openapi_dumps(data)
66
+ assert json_bytes == b'{"model":{"firstName":"John","lastName":"Doe"}}'
67
+
68
+ def test_pydantic_model_with_alias_and_default(self) -> None:
69
+ class User(pydantic.BaseModel):
70
+ user_name: str = pydantic.Field(alias="userName")
71
+ user_role: str = pydantic.Field(default="member", alias="userRole")
72
+ is_active: bool = pydantic.Field(default=True, alias="isActive")
73
+
74
+ model_instance = User(userName="charlie")
75
+ data = {"model": model_instance}
76
+ json_bytes = openapi_dumps(data)
77
+ assert json_bytes == b'{"model":{"userName":"charlie"}}'
78
+
79
+ model_with_overrides = User(userName="diana", userRole="admin", isActive=False)
80
+ data = {"model": model_with_overrides}
81
+ json_bytes = openapi_dumps(data)
82
+ assert json_bytes == b'{"model":{"userName":"diana","userRole":"admin","isActive":false}}'
83
+
84
+ def test_pydantic_model_with_nested_models_and_defaults(self) -> None:
85
+ class Address(pydantic.BaseModel):
86
+ street: str
87
+ city: str = "Unknown"
88
+
89
+ class User(pydantic.BaseModel):
90
+ name: str
91
+ address: Address
92
+ verified: bool = False
93
+
94
+ if _compat.PYDANTIC_V1:
95
+ # to handle forward references in Pydantic v1
96
+ User.update_forward_refs(**locals()) # type: ignore[reportDeprecated]
97
+
98
+ address = Address(street="123 Main St")
99
+ user = User(name="Diana", address=address)
100
+ data = {"user": user}
101
+ json_bytes = openapi_dumps(data)
102
+ assert json_bytes == b'{"user":{"name":"Diana","address":{"street":"123 Main St"}}}'
103
+
104
+ address_with_city = Address(street="456 Oak Ave", city="Boston")
105
+ user_verified = User(name="Eve", address=address_with_city, verified=True)
106
+ data = {"user": user_verified}
107
+ json_bytes = openapi_dumps(data)
108
+ assert (
109
+ json_bytes == b'{"user":{"name":"Eve","address":{"street":"456 Oak Ave","city":"Boston"},"verified":true}}'
110
+ )
111
+
112
+ def test_pydantic_model_with_optional_fields(self) -> None:
113
+ class User(pydantic.BaseModel):
114
+ name: str
115
+ email: Union[str, None]
116
+ phone: Union[str, None]
117
+
118
+ model_with_none = User(name="Eve", email=None, phone=None)
119
+ data = {"model": model_with_none}
120
+ json_bytes = openapi_dumps(data)
121
+ assert json_bytes == b'{"model":{"name":"Eve","email":null,"phone":null}}'
122
+
123
+ model_with_values = User(name="Frank", email="frank@example.com", phone=None)
124
+ data = {"model": model_with_values}
125
+ json_bytes = openapi_dumps(data)
126
+ assert json_bytes == b'{"model":{"name":"Frank","email":"frank@example.com","phone":null}}'
@@ -1,3 +0,0 @@
1
- {
2
- ".": "0.1.0-alpha.23"
3
- }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes