payi 0.1.0a36__tar.gz → 0.1.0a37__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.
Potentially problematic release.
This version of payi might be problematic. Click here for more details.
- payi-0.1.0a37/.release-please-manifest.json +3 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/CHANGELOG.md +8 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/PKG-INFO +1 -1
- {payi-0.1.0a36 → payi-0.1.0a37}/api.md +7 -1
- {payi-0.1.0a36 → payi-0.1.0a37}/pyproject.toml +1 -1
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/_version.py +1 -1
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/lib/instrument.py +41 -33
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/resources/ingest.py +5 -6
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/types/__init__.py +3 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/types/ingest_event_param.py +4 -15
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/types/ingest_units_params.py +4 -15
- payi-0.1.0a37/src/payi/types/pay_i_common_models_api_router_header_info_param.py +14 -0
- payi-0.1.0a36/.release-please-manifest.json +0 -3
- {payi-0.1.0a36 → payi-0.1.0a37}/.gitignore +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/CONTRIBUTING.md +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/LICENSE +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/README.md +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/SECURITY.md +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/bin/check-release-environment +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/bin/publish-pypi +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/examples/.keep +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/mypy.ini +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/noxfile.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/release-please-config.json +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/requirements-dev.lock +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/requirements.lock +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/__init__.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/_base_client.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/_client.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/_compat.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/_constants.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/_exceptions.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/_files.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/_models.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/_qs.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/_resource.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/_response.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/_streaming.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/_types.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/_utils/__init__.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/_utils/_logs.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/_utils/_proxy.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/_utils/_reflection.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/_utils/_streams.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/_utils/_sync.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/_utils/_transform.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/_utils/_typing.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/_utils/_utils.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/lib/.keep +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/lib/AnthropicInstrumentor.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/lib/Instruments.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/lib/OpenAIInstrumentor.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/lib/Stopwatch.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/lib/helpers.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/py.typed +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/resources/__init__.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/resources/billing_models.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/resources/categories/__init__.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/resources/categories/categories.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/resources/categories/resources.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/resources/experiences/__init__.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/resources/experiences/experiences.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/resources/experiences/properties.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/resources/experiences/types.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/resources/limits/__init__.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/resources/limits/limits.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/resources/limits/tags.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/resources/price_modifiers.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/resources/requests/__init__.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/resources/requests/properties.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/resources/requests/requests.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/types/billing_model.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/types/billing_model_create_params.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/types/billing_model_list_response.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/types/billing_model_update_params.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/types/bulk_ingest_response.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/types/categories/__init__.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/types/categories/resource_create_params.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/types/categories/resource_list_response.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/types/category_delete_resource_response.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/types/category_delete_response.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/types/category_list_resources_response.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/types/category_list_response.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/types/category_resource_response.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/types/category_response.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/types/cost_data.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/types/cost_details.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/types/default_response.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/types/experience_instance_response.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/types/experiences/__init__.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/types/experiences/experience_type.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/types/experiences/properties_response.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/types/experiences/property_create_params.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/types/experiences/type_create_params.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/types/experiences/type_list_params.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/types/experiences/type_list_response.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/types/experiences/type_update_params.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/types/ingest_bulk_params.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/types/ingest_response.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/types/limit_create_params.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/types/limit_history_response.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/types/limit_list_params.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/types/limit_reset_params.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/types/limit_response.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/types/limit_update_params.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/types/limits/__init__.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/types/limits/limit_tags.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/types/limits/tag_create_params.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/types/limits/tag_create_response.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/types/limits/tag_delete_response.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/types/limits/tag_list_response.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/types/limits/tag_remove_params.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/types/limits/tag_remove_response.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/types/limits/tag_update_params.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/types/limits/tag_update_response.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/types/paged_limit_list.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/types/price_modifier.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/types/price_modifier_create_params.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/types/price_modifier_retrieve_response.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/types/price_modifier_update_params.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/types/requests/__init__.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/types/requests/property_create_params.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/types/requests_data.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/types/shared/__init__.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/types/shared/evaluation_response.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/src/payi/types/total_cost_data.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/tests/__init__.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/tests/api_resources/__init__.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/tests/api_resources/categories/__init__.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/tests/api_resources/categories/test_resources.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/tests/api_resources/experiences/__init__.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/tests/api_resources/experiences/test_properties.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/tests/api_resources/experiences/test_types.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/tests/api_resources/limits/__init__.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/tests/api_resources/limits/test_tags.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/tests/api_resources/requests/__init__.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/tests/api_resources/requests/test_properties.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/tests/api_resources/test_billing_models.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/tests/api_resources/test_categories.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/tests/api_resources/test_experiences.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/tests/api_resources/test_ingest.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/tests/api_resources/test_limits.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/tests/api_resources/test_price_modifiers.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/tests/conftest.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/tests/sample_file.txt +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/tests/test_client.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/tests/test_deepcopy.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/tests/test_extract_files.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/tests/test_files.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/tests/test_models.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/tests/test_qs.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/tests/test_required_args.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/tests/test_response.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/tests/test_streaming.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/tests/test_transform.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/tests/test_utils/test_proxy.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/tests/test_utils/test_typing.py +0 -0
- {payi-0.1.0a36 → payi-0.1.0a37}/tests/utils.py +0 -0
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.0-alpha.37 (2025-01-30)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.1.0-alpha.36...v0.1.0-alpha.37](https://github.com/Pay-i/pay-i-python/compare/v0.1.0-alpha.36...v0.1.0-alpha.37)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** manual updates ([#187](https://github.com/Pay-i/pay-i-python/issues/187)) ([028e7c8](https://github.com/Pay-i/pay-i-python/commit/028e7c86f30727a2883d9823cdedb450f8397d1c))
|
|
10
|
+
|
|
3
11
|
## 0.1.0-alpha.36 (2025-01-28)
|
|
4
12
|
|
|
5
13
|
Full Changelog: [v0.1.0-alpha.35...v0.1.0-alpha.36](https://github.com/Pay-i/pay-i-python/compare/v0.1.0-alpha.35...v0.1.0-alpha.36)
|
|
@@ -52,7 +52,13 @@ Methods:
|
|
|
52
52
|
Types:
|
|
53
53
|
|
|
54
54
|
```python
|
|
55
|
-
from payi.types import
|
|
55
|
+
from payi.types import (
|
|
56
|
+
BulkIngestResponse,
|
|
57
|
+
IngestEvent,
|
|
58
|
+
IngestResponse,
|
|
59
|
+
IngestUnits,
|
|
60
|
+
PayICommonModelsAPIRouterHeaderInfo,
|
|
61
|
+
)
|
|
56
62
|
```
|
|
57
63
|
|
|
58
64
|
Methods:
|
|
@@ -216,13 +216,13 @@ class PayiInstrumentor:
|
|
|
216
216
|
# should not happen
|
|
217
217
|
return wrapped(*args, **kwargs)
|
|
218
218
|
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
self._update_headers(context, proxy_extra_headers)
|
|
219
|
+
# after _udpate_headers, all metadata to add to ingest is in extra_headers, keyed by the xproxy-xxx header name
|
|
220
|
+
extra_headers = kwargs.get("extra_headers", {})
|
|
221
|
+
self._update_headers(context, extra_headers)
|
|
223
222
|
|
|
223
|
+
if context.get("proxy", True):
|
|
224
224
|
if "extra_headers" not in kwargs:
|
|
225
|
-
kwargs["extra_headers"] =
|
|
225
|
+
kwargs["extra_headers"] = extra_headers
|
|
226
226
|
|
|
227
227
|
return wrapped(*args, **kwargs)
|
|
228
228
|
|
|
@@ -242,16 +242,16 @@ class PayiInstrumentor:
|
|
|
242
242
|
stream = kwargs.get("stream", False)
|
|
243
243
|
|
|
244
244
|
try:
|
|
245
|
-
limit_ids =
|
|
246
|
-
request_tags =
|
|
247
|
-
experience_name =
|
|
248
|
-
experience_id =
|
|
249
|
-
user_id =
|
|
245
|
+
limit_ids = extra_headers.pop("xProxy-Limit-IDs", None)
|
|
246
|
+
request_tags = extra_headers.pop("xProxy-Request-Tags", None)
|
|
247
|
+
experience_name = extra_headers.pop("xProxy-Experience-Name", None)
|
|
248
|
+
experience_id = extra_headers.pop("xProxy-Experience-ID", None)
|
|
249
|
+
user_id = extra_headers.pop("xProxy-User-ID", None)
|
|
250
250
|
|
|
251
251
|
if limit_ids:
|
|
252
|
-
ingest["limit_ids"] = limit_ids
|
|
252
|
+
ingest["limit_ids"] = limit_ids.split(",")
|
|
253
253
|
if request_tags:
|
|
254
|
-
ingest["request_tags"] = request_tags
|
|
254
|
+
ingest["request_tags"] = request_tags.split(",")
|
|
255
255
|
if experience_name:
|
|
256
256
|
ingest["experience_name"] = experience_name
|
|
257
257
|
if experience_id:
|
|
@@ -259,8 +259,6 @@ class PayiInstrumentor:
|
|
|
259
259
|
if user_id:
|
|
260
260
|
ingest["user_id"] = user_id
|
|
261
261
|
|
|
262
|
-
extra_headers: dict[str, str] = kwargs.get("extra_headers") or {}
|
|
263
|
-
|
|
264
262
|
if len(extra_headers) > 0:
|
|
265
263
|
ingest["provider_request_headers"] = {k: [v] for k, v in extra_headers.items()} # type: ignore
|
|
266
264
|
|
|
@@ -321,30 +319,40 @@ class PayiInstrumentor:
|
|
|
321
319
|
experience_id: Optional[str] = context.get("experience_id")
|
|
322
320
|
user_id: Optional[str] = context.get("user_id")
|
|
323
321
|
|
|
322
|
+
# Merge limits from the decorator and extra headers
|
|
324
323
|
if limit_ids is not None:
|
|
325
|
-
existing_limit_ids = extra_headers.get("xProxy-Limit-IDs")
|
|
326
|
-
|
|
327
|
-
if existing_limit_ids
|
|
328
|
-
extra_headers["xProxy-Limit-IDs"] =
|
|
324
|
+
existing_limit_ids = extra_headers.get("xProxy-Limit-IDs", None)
|
|
325
|
+
|
|
326
|
+
if not existing_limit_ids:
|
|
327
|
+
extra_headers["xProxy-Limit-IDs"] = ",".join(limit_ids)
|
|
329
328
|
else:
|
|
330
|
-
|
|
329
|
+
existing_ids = existing_limit_ids.split(',')
|
|
330
|
+
combined_ids = list(set(existing_ids + limit_ids))
|
|
331
|
+
extra_headers["xProxy-Limit-IDs"] = ",".join(combined_ids)
|
|
331
332
|
|
|
333
|
+
# Merge request from the decorator and extra headers
|
|
332
334
|
if request_tags is not None:
|
|
333
|
-
existing_request_tags = extra_headers.get("xProxy-Request-Tags")
|
|
334
|
-
request_tags_str = ",".join(request_tags)
|
|
335
|
-
if existing_request_tags is None:
|
|
336
|
-
extra_headers["xProxy-Request-Tags"] = request_tags_str
|
|
337
|
-
else:
|
|
338
|
-
extra_headers["xProxy-Request-Tags"] = f"{existing_request_tags},{request_tags_str}"
|
|
339
|
-
|
|
340
|
-
if experience_name is not None:
|
|
341
|
-
extra_headers["xProxy-Experience-Name"] = experience_name
|
|
335
|
+
existing_request_tags = extra_headers.get("xProxy-Request-Tags", None)
|
|
342
336
|
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
337
|
+
if not existing_request_tags:
|
|
338
|
+
extra_headers["xProxy-Request-Tags"] = ",".join(request_tags)
|
|
339
|
+
else:
|
|
340
|
+
existing_tags = existing_request_tags.split(',')
|
|
341
|
+
combined_tags = list(set(existing_tags + request_tags))
|
|
342
|
+
extra_headers["xProxy-Request-Tags"] = ",".join(combined_tags)
|
|
343
|
+
|
|
344
|
+
# inner extra_headers user_id takes precedence over outer decorator user_id
|
|
345
|
+
if user_id is not None and extra_headers.get("xProxy-User-ID", None) is None:
|
|
346
|
+
extra_headers["xProxy-User-ID"] = user_id
|
|
347
|
+
|
|
348
|
+
# inner extra_headers experience_name and experience_id take precedence over outer decorator experience_name and experience_id
|
|
349
|
+
# if either inner value is specified, ignore outer decorator values
|
|
350
|
+
if extra_headers.get("xProxy-Experience-Name", None) is None and extra_headers.get("xProxy-Experience-ID", None) is None:
|
|
351
|
+
if experience_name is not None:
|
|
352
|
+
extra_headers["xProxy-Experience-Name"] = experience_name
|
|
353
|
+
|
|
354
|
+
if experience_id is not None:
|
|
355
|
+
extra_headers["xProxy-Experience-ID"] = experience_id
|
|
348
356
|
|
|
349
357
|
@staticmethod
|
|
350
358
|
def payi_wrapper(func: Any) -> Any:
|
|
@@ -26,6 +26,7 @@ from .._base_client import make_request_options
|
|
|
26
26
|
from ..types.ingest_response import IngestResponse
|
|
27
27
|
from ..types.ingest_event_param import IngestEventParam
|
|
28
28
|
from ..types.bulk_ingest_response import BulkIngestResponse
|
|
29
|
+
from ..types.pay_i_common_models_api_router_header_info_param import PayICommonModelsAPIRouterHeaderInfoParam
|
|
29
30
|
|
|
30
31
|
__all__ = ["IngestResource", "AsyncIngestResource"]
|
|
31
32
|
|
|
@@ -96,10 +97,9 @@ class IngestResource(SyncAPIResource):
|
|
|
96
97
|
experience_properties: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
|
|
97
98
|
http_status_code: Optional[int] | NotGiven = NOT_GIVEN,
|
|
98
99
|
properties: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
|
|
99
|
-
provider_request_headers: Optional[Iterable[
|
|
100
|
+
provider_request_headers: Optional[Iterable[PayICommonModelsAPIRouterHeaderInfoParam]] | NotGiven = NOT_GIVEN,
|
|
100
101
|
provider_request_json: Optional[str] | NotGiven = NOT_GIVEN,
|
|
101
|
-
provider_response_headers: Optional[Iterable[
|
|
102
|
-
| NotGiven = NOT_GIVEN,
|
|
102
|
+
provider_response_headers: Optional[Iterable[PayICommonModelsAPIRouterHeaderInfoParam]] | NotGiven = NOT_GIVEN,
|
|
103
103
|
provider_response_json: Union[str, List[str], None] | NotGiven = NOT_GIVEN,
|
|
104
104
|
provider_uri: Optional[str] | NotGiven = NOT_GIVEN,
|
|
105
105
|
time_to_first_token_ms: Optional[int] | NotGiven = NOT_GIVEN,
|
|
@@ -282,10 +282,9 @@ class AsyncIngestResource(AsyncAPIResource):
|
|
|
282
282
|
experience_properties: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
|
|
283
283
|
http_status_code: Optional[int] | NotGiven = NOT_GIVEN,
|
|
284
284
|
properties: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
|
|
285
|
-
provider_request_headers: Optional[Iterable[
|
|
285
|
+
provider_request_headers: Optional[Iterable[PayICommonModelsAPIRouterHeaderInfoParam]] | NotGiven = NOT_GIVEN,
|
|
286
286
|
provider_request_json: Optional[str] | NotGiven = NOT_GIVEN,
|
|
287
|
-
provider_response_headers: Optional[Iterable[
|
|
288
|
-
| NotGiven = NOT_GIVEN,
|
|
287
|
+
provider_response_headers: Optional[Iterable[PayICommonModelsAPIRouterHeaderInfoParam]] | NotGiven = NOT_GIVEN,
|
|
289
288
|
provider_response_json: Union[str, List[str], None] | NotGiven = NOT_GIVEN,
|
|
290
289
|
provider_uri: Optional[str] | NotGiven = NOT_GIVEN,
|
|
291
290
|
time_to_first_token_ms: Optional[int] | NotGiven = NOT_GIVEN,
|
|
@@ -35,3 +35,6 @@ from .price_modifier_update_params import PriceModifierUpdateParams as PriceModi
|
|
|
35
35
|
from .category_list_resources_response import CategoryListResourcesResponse as CategoryListResourcesResponse
|
|
36
36
|
from .price_modifier_retrieve_response import PriceModifierRetrieveResponse as PriceModifierRetrieveResponse
|
|
37
37
|
from .category_delete_resource_response import CategoryDeleteResourceResponse as CategoryDeleteResourceResponse
|
|
38
|
+
from .pay_i_common_models_api_router_header_info_param import (
|
|
39
|
+
PayICommonModelsAPIRouterHeaderInfoParam as PayICommonModelsAPIRouterHeaderInfoParam,
|
|
40
|
+
)
|
|
@@ -7,8 +7,9 @@ from datetime import datetime
|
|
|
7
7
|
from typing_extensions import Required, Annotated, TypedDict
|
|
8
8
|
|
|
9
9
|
from .._utils import PropertyInfo
|
|
10
|
+
from .pay_i_common_models_api_router_header_info_param import PayICommonModelsAPIRouterHeaderInfoParam
|
|
10
11
|
|
|
11
|
-
__all__ = ["IngestEventParam", "Units"
|
|
12
|
+
__all__ = ["IngestEventParam", "Units"]
|
|
12
13
|
|
|
13
14
|
|
|
14
15
|
class Units(TypedDict, total=False):
|
|
@@ -17,18 +18,6 @@ class Units(TypedDict, total=False):
|
|
|
17
18
|
output: int
|
|
18
19
|
|
|
19
20
|
|
|
20
|
-
class ProviderRequestHeader(TypedDict, total=False):
|
|
21
|
-
name: Required[str]
|
|
22
|
-
|
|
23
|
-
value: Optional[str]
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
class ProviderResponseHeader(TypedDict, total=False):
|
|
27
|
-
name: Required[str]
|
|
28
|
-
|
|
29
|
-
value: Optional[str]
|
|
30
|
-
|
|
31
|
-
|
|
32
21
|
class IngestEventParam(TypedDict, total=False):
|
|
33
22
|
category: Required[str]
|
|
34
23
|
|
|
@@ -54,11 +43,11 @@ class IngestEventParam(TypedDict, total=False):
|
|
|
54
43
|
|
|
55
44
|
properties: Optional[Dict[str, str]]
|
|
56
45
|
|
|
57
|
-
provider_request_headers: Optional[Iterable[
|
|
46
|
+
provider_request_headers: Optional[Iterable[PayICommonModelsAPIRouterHeaderInfoParam]]
|
|
58
47
|
|
|
59
48
|
provider_request_json: Optional[str]
|
|
60
49
|
|
|
61
|
-
provider_response_headers: Optional[Iterable[
|
|
50
|
+
provider_response_headers: Optional[Iterable[PayICommonModelsAPIRouterHeaderInfoParam]]
|
|
62
51
|
|
|
63
52
|
provider_response_json: Union[str, List[str], None]
|
|
64
53
|
|
|
@@ -7,8 +7,9 @@ from datetime import datetime
|
|
|
7
7
|
from typing_extensions import Required, Annotated, TypedDict
|
|
8
8
|
|
|
9
9
|
from .._utils import PropertyInfo
|
|
10
|
+
from .pay_i_common_models_api_router_header_info_param import PayICommonModelsAPIRouterHeaderInfoParam
|
|
10
11
|
|
|
11
|
-
__all__ = ["IngestUnitsParams", "Units"
|
|
12
|
+
__all__ = ["IngestUnitsParams", "Units"]
|
|
12
13
|
|
|
13
14
|
|
|
14
15
|
class IngestUnitsParams(TypedDict, total=False):
|
|
@@ -28,11 +29,11 @@ class IngestUnitsParams(TypedDict, total=False):
|
|
|
28
29
|
|
|
29
30
|
properties: Optional[Dict[str, str]]
|
|
30
31
|
|
|
31
|
-
provider_request_headers: Optional[Iterable[
|
|
32
|
+
provider_request_headers: Optional[Iterable[PayICommonModelsAPIRouterHeaderInfoParam]]
|
|
32
33
|
|
|
33
34
|
provider_request_json: Optional[str]
|
|
34
35
|
|
|
35
|
-
provider_response_headers: Optional[Iterable[
|
|
36
|
+
provider_response_headers: Optional[Iterable[PayICommonModelsAPIRouterHeaderInfoParam]]
|
|
36
37
|
|
|
37
38
|
provider_response_json: Union[str, List[str], None]
|
|
38
39
|
|
|
@@ -55,15 +56,3 @@ class Units(TypedDict, total=False):
|
|
|
55
56
|
input: int
|
|
56
57
|
|
|
57
58
|
output: int
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
class ProviderRequestHeader(TypedDict, total=False):
|
|
61
|
-
name: Required[str]
|
|
62
|
-
|
|
63
|
-
value: Optional[str]
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
class ProviderResponseHeader(TypedDict, total=False):
|
|
67
|
-
name: Required[str]
|
|
68
|
-
|
|
69
|
-
value: Optional[str]
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Optional
|
|
6
|
+
from typing_extensions import Required, TypedDict
|
|
7
|
+
|
|
8
|
+
__all__ = ["PayICommonModelsAPIRouterHeaderInfoParam"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class PayICommonModelsAPIRouterHeaderInfoParam(TypedDict, total=False):
|
|
12
|
+
name: Required[str]
|
|
13
|
+
|
|
14
|
+
value: Optional[str]
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
File without changes
|