payi 0.1.0a16__tar.gz → 0.1.0a18__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.

Files changed (125) hide show
  1. payi-0.1.0a18/.release-please-manifest.json +3 -0
  2. {payi-0.1.0a16 → payi-0.1.0a18}/CHANGELOG.md +27 -0
  3. {payi-0.1.0a16 → payi-0.1.0a18}/PKG-INFO +1 -1
  4. {payi-0.1.0a16 → payi-0.1.0a18}/api.md +3 -3
  5. {payi-0.1.0a16 → payi-0.1.0a18}/pyproject.toml +2 -3
  6. {payi-0.1.0a16 → payi-0.1.0a18}/src/payi/_version.py +1 -1
  7. {payi-0.1.0a16 → payi-0.1.0a18}/src/payi/resources/categories/resources.py +16 -16
  8. {payi-0.1.0a16 → payi-0.1.0a18}/src/payi/resources/experiences/experiences.py +26 -6
  9. {payi-0.1.0a16 → payi-0.1.0a18}/src/payi/resources/experiences/types.py +22 -10
  10. {payi-0.1.0a16 → payi-0.1.0a18}/src/payi/resources/ingest.py +35 -17
  11. {payi-0.1.0a16 → payi-0.1.0a18}/src/payi/types/__init__.py +1 -0
  12. {payi-0.1.0a16 → payi-0.1.0a18}/src/payi/types/category_resource_response.py +4 -2
  13. {payi-0.1.0a16 → payi-0.1.0a18}/src/payi/types/experiences/type_create_params.py +3 -4
  14. payi-0.1.0a18/src/payi/types/ingest_bulk_params.py +14 -0
  15. payi-0.1.0a16/src/payi/types/ingest_bulk_params.py → payi-0.1.0a18/src/payi/types/ingest_event_param.py +3 -6
  16. {payi-0.1.0a16 → payi-0.1.0a18}/src/payi/types/ingest_units_params.py +4 -0
  17. {payi-0.1.0a16 → payi-0.1.0a18}/tests/api_resources/categories/test_resources.py +28 -28
  18. {payi-0.1.0a16 → payi-0.1.0a18}/tests/api_resources/experiences/test_types.py +82 -38
  19. {payi-0.1.0a16 → payi-0.1.0a18}/tests/api_resources/test_experiences.py +68 -18
  20. {payi-0.1.0a16 → payi-0.1.0a18}/tests/api_resources/test_ingest.py +4 -0
  21. payi-0.1.0a16/.release-please-manifest.json +0 -3
  22. {payi-0.1.0a16 → payi-0.1.0a18}/.gitignore +0 -0
  23. {payi-0.1.0a16 → payi-0.1.0a18}/CONTRIBUTING.md +0 -0
  24. {payi-0.1.0a16 → payi-0.1.0a18}/LICENSE +0 -0
  25. {payi-0.1.0a16 → payi-0.1.0a18}/README.md +0 -0
  26. {payi-0.1.0a16 → payi-0.1.0a18}/SECURITY.md +0 -0
  27. {payi-0.1.0a16 → payi-0.1.0a18}/bin/check-release-environment +0 -0
  28. {payi-0.1.0a16 → payi-0.1.0a18}/bin/publish-pypi +0 -0
  29. {payi-0.1.0a16 → payi-0.1.0a18}/examples/.keep +0 -0
  30. {payi-0.1.0a16 → payi-0.1.0a18}/mypy.ini +0 -0
  31. {payi-0.1.0a16 → payi-0.1.0a18}/noxfile.py +0 -0
  32. {payi-0.1.0a16 → payi-0.1.0a18}/release-please-config.json +0 -0
  33. {payi-0.1.0a16 → payi-0.1.0a18}/requirements-dev.lock +0 -0
  34. {payi-0.1.0a16 → payi-0.1.0a18}/requirements.lock +0 -0
  35. {payi-0.1.0a16 → payi-0.1.0a18}/src/payi/__init__.py +0 -0
  36. {payi-0.1.0a16 → payi-0.1.0a18}/src/payi/_base_client.py +0 -0
  37. {payi-0.1.0a16 → payi-0.1.0a18}/src/payi/_client.py +0 -0
  38. {payi-0.1.0a16 → payi-0.1.0a18}/src/payi/_compat.py +0 -0
  39. {payi-0.1.0a16 → payi-0.1.0a18}/src/payi/_constants.py +0 -0
  40. {payi-0.1.0a16 → payi-0.1.0a18}/src/payi/_exceptions.py +0 -0
  41. {payi-0.1.0a16 → payi-0.1.0a18}/src/payi/_files.py +0 -0
  42. {payi-0.1.0a16 → payi-0.1.0a18}/src/payi/_models.py +0 -0
  43. {payi-0.1.0a16 → payi-0.1.0a18}/src/payi/_qs.py +0 -0
  44. {payi-0.1.0a16 → payi-0.1.0a18}/src/payi/_resource.py +0 -0
  45. {payi-0.1.0a16 → payi-0.1.0a18}/src/payi/_response.py +0 -0
  46. {payi-0.1.0a16 → payi-0.1.0a18}/src/payi/_streaming.py +0 -0
  47. {payi-0.1.0a16 → payi-0.1.0a18}/src/payi/_types.py +0 -0
  48. {payi-0.1.0a16 → payi-0.1.0a18}/src/payi/_utils/__init__.py +0 -0
  49. {payi-0.1.0a16 → payi-0.1.0a18}/src/payi/_utils/_logs.py +0 -0
  50. {payi-0.1.0a16 → payi-0.1.0a18}/src/payi/_utils/_proxy.py +0 -0
  51. {payi-0.1.0a16 → payi-0.1.0a18}/src/payi/_utils/_reflection.py +0 -0
  52. {payi-0.1.0a16 → payi-0.1.0a18}/src/payi/_utils/_streams.py +0 -0
  53. {payi-0.1.0a16 → payi-0.1.0a18}/src/payi/_utils/_sync.py +0 -0
  54. {payi-0.1.0a16 → payi-0.1.0a18}/src/payi/_utils/_transform.py +0 -0
  55. {payi-0.1.0a16 → payi-0.1.0a18}/src/payi/_utils/_typing.py +0 -0
  56. {payi-0.1.0a16 → payi-0.1.0a18}/src/payi/_utils/_utils.py +0 -0
  57. {payi-0.1.0a16 → payi-0.1.0a18}/src/payi/lib/.keep +0 -0
  58. {payi-0.1.0a16 → payi-0.1.0a18}/src/payi/lib/helpers.py +0 -0
  59. {payi-0.1.0a16 → payi-0.1.0a18}/src/payi/py.typed +0 -0
  60. {payi-0.1.0a16 → payi-0.1.0a18}/src/payi/resources/__init__.py +0 -0
  61. {payi-0.1.0a16 → payi-0.1.0a18}/src/payi/resources/budgets/__init__.py +0 -0
  62. {payi-0.1.0a16 → payi-0.1.0a18}/src/payi/resources/budgets/budgets.py +0 -0
  63. {payi-0.1.0a16 → payi-0.1.0a18}/src/payi/resources/budgets/tags.py +0 -0
  64. {payi-0.1.0a16 → payi-0.1.0a18}/src/payi/resources/categories/__init__.py +0 -0
  65. {payi-0.1.0a16 → payi-0.1.0a18}/src/payi/resources/categories/categories.py +0 -0
  66. {payi-0.1.0a16 → payi-0.1.0a18}/src/payi/resources/experiences/__init__.py +0 -0
  67. {payi-0.1.0a16 → payi-0.1.0a18}/src/payi/types/budget_create_params.py +0 -0
  68. {payi-0.1.0a16 → payi-0.1.0a18}/src/payi/types/budget_history_response.py +0 -0
  69. {payi-0.1.0a16 → payi-0.1.0a18}/src/payi/types/budget_list_params.py +0 -0
  70. {payi-0.1.0a16 → payi-0.1.0a18}/src/payi/types/budget_response.py +0 -0
  71. {payi-0.1.0a16 → payi-0.1.0a18}/src/payi/types/budget_update_params.py +0 -0
  72. {payi-0.1.0a16 → payi-0.1.0a18}/src/payi/types/budgets/__init__.py +0 -0
  73. {payi-0.1.0a16 → payi-0.1.0a18}/src/payi/types/budgets/budget_tags.py +0 -0
  74. {payi-0.1.0a16 → payi-0.1.0a18}/src/payi/types/budgets/tag_create_params.py +0 -0
  75. {payi-0.1.0a16 → payi-0.1.0a18}/src/payi/types/budgets/tag_create_response.py +0 -0
  76. {payi-0.1.0a16 → payi-0.1.0a18}/src/payi/types/budgets/tag_delete_response.py +0 -0
  77. {payi-0.1.0a16 → payi-0.1.0a18}/src/payi/types/budgets/tag_list_response.py +0 -0
  78. {payi-0.1.0a16 → payi-0.1.0a18}/src/payi/types/budgets/tag_remove_params.py +0 -0
  79. {payi-0.1.0a16 → payi-0.1.0a18}/src/payi/types/budgets/tag_remove_response.py +0 -0
  80. {payi-0.1.0a16 → payi-0.1.0a18}/src/payi/types/budgets/tag_update_params.py +0 -0
  81. {payi-0.1.0a16 → payi-0.1.0a18}/src/payi/types/budgets/tag_update_response.py +0 -0
  82. {payi-0.1.0a16 → payi-0.1.0a18}/src/payi/types/bulk_ingest_response.py +0 -0
  83. {payi-0.1.0a16 → payi-0.1.0a18}/src/payi/types/categories/__init__.py +0 -0
  84. {payi-0.1.0a16 → payi-0.1.0a18}/src/payi/types/categories/resource_create_params.py +0 -0
  85. {payi-0.1.0a16 → payi-0.1.0a18}/src/payi/types/categories/resource_list_response.py +0 -0
  86. {payi-0.1.0a16 → payi-0.1.0a18}/src/payi/types/category_delete_resource_response.py +0 -0
  87. {payi-0.1.0a16 → payi-0.1.0a18}/src/payi/types/category_delete_response.py +0 -0
  88. {payi-0.1.0a16 → payi-0.1.0a18}/src/payi/types/category_list_resources_response.py +0 -0
  89. {payi-0.1.0a16 → payi-0.1.0a18}/src/payi/types/category_list_response.py +0 -0
  90. {payi-0.1.0a16 → payi-0.1.0a18}/src/payi/types/category_response.py +0 -0
  91. {payi-0.1.0a16 → payi-0.1.0a18}/src/payi/types/cost_data.py +0 -0
  92. {payi-0.1.0a16 → payi-0.1.0a18}/src/payi/types/cost_details.py +0 -0
  93. {payi-0.1.0a16 → payi-0.1.0a18}/src/payi/types/default_response.py +0 -0
  94. {payi-0.1.0a16 → payi-0.1.0a18}/src/payi/types/experience_instance.py +0 -0
  95. {payi-0.1.0a16 → payi-0.1.0a18}/src/payi/types/experiences/__init__.py +0 -0
  96. {payi-0.1.0a16 → payi-0.1.0a18}/src/payi/types/experiences/experience_type.py +0 -0
  97. {payi-0.1.0a16 → payi-0.1.0a18}/src/payi/types/experiences/type_list_response.py +0 -0
  98. {payi-0.1.0a16 → payi-0.1.0a18}/src/payi/types/experiences/type_update_params.py +0 -0
  99. {payi-0.1.0a16 → payi-0.1.0a18}/src/payi/types/ingest_response.py +0 -0
  100. {payi-0.1.0a16 → payi-0.1.0a18}/src/payi/types/paged_budget_list.py +0 -0
  101. {payi-0.1.0a16 → payi-0.1.0a18}/src/payi/types/requests_data.py +0 -0
  102. {payi-0.1.0a16 → payi-0.1.0a18}/src/payi/types/total_cost_data.py +0 -0
  103. {payi-0.1.0a16 → payi-0.1.0a18}/tests/__init__.py +0 -0
  104. {payi-0.1.0a16 → payi-0.1.0a18}/tests/api_resources/__init__.py +0 -0
  105. {payi-0.1.0a16 → payi-0.1.0a18}/tests/api_resources/budgets/__init__.py +0 -0
  106. {payi-0.1.0a16 → payi-0.1.0a18}/tests/api_resources/budgets/test_tags.py +0 -0
  107. {payi-0.1.0a16 → payi-0.1.0a18}/tests/api_resources/categories/__init__.py +0 -0
  108. {payi-0.1.0a16 → payi-0.1.0a18}/tests/api_resources/experiences/__init__.py +0 -0
  109. {payi-0.1.0a16 → payi-0.1.0a18}/tests/api_resources/test_budgets.py +0 -0
  110. {payi-0.1.0a16 → payi-0.1.0a18}/tests/api_resources/test_categories.py +0 -0
  111. {payi-0.1.0a16 → payi-0.1.0a18}/tests/conftest.py +0 -0
  112. {payi-0.1.0a16 → payi-0.1.0a18}/tests/sample_file.txt +0 -0
  113. {payi-0.1.0a16 → payi-0.1.0a18}/tests/test_client.py +0 -0
  114. {payi-0.1.0a16 → payi-0.1.0a18}/tests/test_deepcopy.py +0 -0
  115. {payi-0.1.0a16 → payi-0.1.0a18}/tests/test_extract_files.py +0 -0
  116. {payi-0.1.0a16 → payi-0.1.0a18}/tests/test_files.py +0 -0
  117. {payi-0.1.0a16 → payi-0.1.0a18}/tests/test_models.py +0 -0
  118. {payi-0.1.0a16 → payi-0.1.0a18}/tests/test_qs.py +0 -0
  119. {payi-0.1.0a16 → payi-0.1.0a18}/tests/test_required_args.py +0 -0
  120. {payi-0.1.0a16 → payi-0.1.0a18}/tests/test_response.py +0 -0
  121. {payi-0.1.0a16 → payi-0.1.0a18}/tests/test_streaming.py +0 -0
  122. {payi-0.1.0a16 → payi-0.1.0a18}/tests/test_transform.py +0 -0
  123. {payi-0.1.0a16 → payi-0.1.0a18}/tests/test_utils/test_proxy.py +0 -0
  124. {payi-0.1.0a16 → payi-0.1.0a18}/tests/test_utils/test_typing.py +0 -0
  125. {payi-0.1.0a16 → payi-0.1.0a18}/tests/utils.py +0 -0
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "0.1.0-alpha.18"
3
+ }
@@ -1,5 +1,32 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.0-alpha.18 (2024-08-08)
4
+
5
+ Full Changelog: [v0.1.0-alpha.17...v0.1.0-alpha.18](https://github.com/Pay-i/pay-i-python/compare/v0.1.0-alpha.17...v0.1.0-alpha.18)
6
+
7
+ ### Features
8
+
9
+ * **api:** update via SDK Studio ([#83](https://github.com/Pay-i/pay-i-python/issues/83)) ([c78b273](https://github.com/Pay-i/pay-i-python/commit/c78b273d807606abe94212e0092eff80895da96d))
10
+ * **api:** update via SDK Studio ([#86](https://github.com/Pay-i/pay-i-python/issues/86)) ([ea1bc86](https://github.com/Pay-i/pay-i-python/commit/ea1bc86c6a3671b49ba7394841b5534d7e8c0263))
11
+
12
+
13
+ ### Chores
14
+
15
+ * **internal:** remove deprecated ruff config ([#85](https://github.com/Pay-i/pay-i-python/issues/85)) ([744ae88](https://github.com/Pay-i/pay-i-python/commit/744ae888b57aa5a424e4a4729d7c0e85776b6d08))
16
+
17
+ ## 0.1.0-alpha.17 (2024-08-07)
18
+
19
+ Full Changelog: [v0.1.0-alpha.16...v0.1.0-alpha.17](https://github.com/Pay-i/pay-i-python/compare/v0.1.0-alpha.16...v0.1.0-alpha.17)
20
+
21
+ ### Features
22
+
23
+ * **api:** update via SDK Studio ([#79](https://github.com/Pay-i/pay-i-python/issues/79)) ([b7a562e](https://github.com/Pay-i/pay-i-python/commit/b7a562ed5f6051fd797ac76087ef095e8c73a8bc))
24
+
25
+
26
+ ### Bug Fixes
27
+
28
+ * **client:** correctly serialise array body params ([#77](https://github.com/Pay-i/pay-i-python/issues/77)) ([e3770e4](https://github.com/Pay-i/pay-i-python/commit/e3770e474a9279eb4f13cbd7d87480d4d6a5bc76))
29
+
3
30
  ## 0.1.0-alpha.16 (2024-08-07)
4
31
 
5
32
  Full Changelog: [v0.1.0-alpha.15...v0.1.0-alpha.16](https://github.com/Pay-i/pay-i-python/compare/v0.1.0-alpha.15...v0.1.0-alpha.16)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: payi
3
- Version: 0.1.0a16
3
+ Version: 0.1.0a18
4
4
  Summary: The official Python library for the payi API
5
5
  Project-URL: Homepage, https://github.com/Pay-i/pay-i-python
6
6
  Project-URL: Repository, https://github.com/Pay-i/pay-i-python
@@ -52,7 +52,7 @@ Methods:
52
52
  Types:
53
53
 
54
54
  ```python
55
- from payi.types import BulkIngestResponse, IngestEvent, IngestResponse
55
+ from payi.types import BulkIngestResponse, IngestEvent, IngestResponse, IngestUnits
56
56
  ```
57
57
 
58
58
  Methods:
@@ -93,9 +93,9 @@ from payi.types.categories import ResourceListResponse
93
93
  Methods:
94
94
 
95
95
  - <code title="post /api/v1/categories/{category}/resources/{resource}">client.categories.resources.<a href="./src/payi/resources/categories/resources.py">create</a>(resource, \*, category, \*\*<a href="src/payi/types/categories/resource_create_params.py">params</a>) -> <a href="./src/payi/types/category_resource_response.py">CategoryResourceResponse</a></code>
96
- - <code title="get /api/v1/categories/{category}/resources/{resource}/{start_timestamp}">client.categories.resources.<a href="./src/payi/resources/categories/resources.py">retrieve</a>(start_timestamp, \*, category, resource) -> <a href="./src/payi/types/category_resource_response.py">CategoryResourceResponse</a></code>
96
+ - <code title="get /api/v1/categories/{category}/resources/{resource}/{resource_id}">client.categories.resources.<a href="./src/payi/resources/categories/resources.py">retrieve</a>(resource_id, \*, category, resource) -> <a href="./src/payi/types/category_resource_response.py">CategoryResourceResponse</a></code>
97
97
  - <code title="get /api/v1/categories/{category}/resources/{resource}">client.categories.resources.<a href="./src/payi/resources/categories/resources.py">list</a>(resource, \*, category) -> <a href="./src/payi/types/categories/resource_list_response.py">ResourceListResponse</a></code>
98
- - <code title="delete /api/v1/categories/{category}/resources/{resource}/{start_timestamp}">client.categories.resources.<a href="./src/payi/resources/categories/resources.py">delete</a>(start_timestamp, \*, category, resource) -> <a href="./src/payi/types/category_resource_response.py">CategoryResourceResponse</a></code>
98
+ - <code title="delete /api/v1/categories/{category}/resources/{resource}/{resource_id}">client.categories.resources.<a href="./src/payi/resources/categories/resources.py">delete</a>(resource_id, \*, category, resource) -> <a href="./src/payi/types/category_resource_response.py">CategoryResourceResponse</a></code>
99
99
 
100
100
  # Experiences
101
101
 
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "payi"
3
- version = "0.1.0-alpha.16"
3
+ version = "0.1.0-alpha.18"
4
4
  description = "The official Python library for the payi API"
5
5
  dynamic = ["readme"]
6
6
  license = "Apache-2.0"
@@ -195,7 +195,6 @@ unfixable = [
195
195
  "T201",
196
196
  "T203",
197
197
  ]
198
- ignore-init-module-imports = true
199
198
 
200
199
  [tool.ruff.lint.flake8-tidy-imports.banned-api]
201
200
  "functools.lru_cache".msg = "This function does not retain type information for the wrapped function's arguments; The `lru_cache` function from `_utils` should be used instead"
@@ -207,7 +206,7 @@ combine-as-imports = true
207
206
  extra-standard-library = ["typing_extensions"]
208
207
  known-first-party = ["payi", "tests"]
209
208
 
210
- [tool.ruff.per-file-ignores]
209
+ [tool.ruff.lint.per-file-ignores]
211
210
  "bin/**.py" = ["T201", "T203"]
212
211
  "scripts/**.py" = ["T201", "T203"]
213
212
  "tests/**.py" = ["T201", "T203"]
@@ -1,4 +1,4 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  __title__ = "payi"
4
- __version__ = "0.1.0-alpha.16" # x-release-please-version
4
+ __version__ = "0.1.0-alpha.18" # x-release-please-version
@@ -90,7 +90,7 @@ class ResourcesResource(SyncAPIResource):
90
90
 
91
91
  def retrieve(
92
92
  self,
93
- start_timestamp: Union[str, datetime],
93
+ resource_id: str,
94
94
  *,
95
95
  category: str,
96
96
  resource: str,
@@ -117,10 +117,10 @@ class ResourcesResource(SyncAPIResource):
117
117
  raise ValueError(f"Expected a non-empty value for `category` but received {category!r}")
118
118
  if not resource:
119
119
  raise ValueError(f"Expected a non-empty value for `resource` but received {resource!r}")
120
- if not start_timestamp:
121
- raise ValueError(f"Expected a non-empty value for `start_timestamp` but received {start_timestamp!r}")
120
+ if not resource_id:
121
+ raise ValueError(f"Expected a non-empty value for `resource_id` but received {resource_id!r}")
122
122
  return self._get(
123
- f"/api/v1/categories/{category}/resources/{resource}/{start_timestamp}",
123
+ f"/api/v1/categories/{category}/resources/{resource}/{resource_id}",
124
124
  options=make_request_options(
125
125
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
126
126
  ),
@@ -165,7 +165,7 @@ class ResourcesResource(SyncAPIResource):
165
165
 
166
166
  def delete(
167
167
  self,
168
- start_timestamp: Union[str, datetime],
168
+ resource_id: str,
169
169
  *,
170
170
  category: str,
171
171
  resource: str,
@@ -192,10 +192,10 @@ class ResourcesResource(SyncAPIResource):
192
192
  raise ValueError(f"Expected a non-empty value for `category` but received {category!r}")
193
193
  if not resource:
194
194
  raise ValueError(f"Expected a non-empty value for `resource` but received {resource!r}")
195
- if not start_timestamp:
196
- raise ValueError(f"Expected a non-empty value for `start_timestamp` but received {start_timestamp!r}")
195
+ if not resource_id:
196
+ raise ValueError(f"Expected a non-empty value for `resource_id` but received {resource_id!r}")
197
197
  return self._delete(
198
- f"/api/v1/categories/{category}/resources/{resource}/{start_timestamp}",
198
+ f"/api/v1/categories/{category}/resources/{resource}/{resource_id}",
199
199
  options=make_request_options(
200
200
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
201
201
  ),
@@ -265,7 +265,7 @@ class AsyncResourcesResource(AsyncAPIResource):
265
265
 
266
266
  async def retrieve(
267
267
  self,
268
- start_timestamp: Union[str, datetime],
268
+ resource_id: str,
269
269
  *,
270
270
  category: str,
271
271
  resource: str,
@@ -292,10 +292,10 @@ class AsyncResourcesResource(AsyncAPIResource):
292
292
  raise ValueError(f"Expected a non-empty value for `category` but received {category!r}")
293
293
  if not resource:
294
294
  raise ValueError(f"Expected a non-empty value for `resource` but received {resource!r}")
295
- if not start_timestamp:
296
- raise ValueError(f"Expected a non-empty value for `start_timestamp` but received {start_timestamp!r}")
295
+ if not resource_id:
296
+ raise ValueError(f"Expected a non-empty value for `resource_id` but received {resource_id!r}")
297
297
  return await self._get(
298
- f"/api/v1/categories/{category}/resources/{resource}/{start_timestamp}",
298
+ f"/api/v1/categories/{category}/resources/{resource}/{resource_id}",
299
299
  options=make_request_options(
300
300
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
301
301
  ),
@@ -340,7 +340,7 @@ class AsyncResourcesResource(AsyncAPIResource):
340
340
 
341
341
  async def delete(
342
342
  self,
343
- start_timestamp: Union[str, datetime],
343
+ resource_id: str,
344
344
  *,
345
345
  category: str,
346
346
  resource: str,
@@ -367,10 +367,10 @@ class AsyncResourcesResource(AsyncAPIResource):
367
367
  raise ValueError(f"Expected a non-empty value for `category` but received {category!r}")
368
368
  if not resource:
369
369
  raise ValueError(f"Expected a non-empty value for `resource` but received {resource!r}")
370
- if not start_timestamp:
371
- raise ValueError(f"Expected a non-empty value for `start_timestamp` but received {start_timestamp!r}")
370
+ if not resource_id:
371
+ raise ValueError(f"Expected a non-empty value for `resource_id` but received {resource_id!r}")
372
372
  return await self._delete(
373
- f"/api/v1/categories/{category}/resources/{resource}/{start_timestamp}",
373
+ f"/api/v1/categories/{category}/resources/{resource}/{resource_id}",
374
374
  options=make_request_options(
375
375
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
376
376
  ),
@@ -42,7 +42,7 @@ class ExperiencesResource(SyncAPIResource):
42
42
 
43
43
  def create(
44
44
  self,
45
- experience_type_id: int,
45
+ experience_type_id: str,
46
46
  *,
47
47
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
48
48
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -65,6 +65,8 @@ class ExperiencesResource(SyncAPIResource):
65
65
 
66
66
  timeout: Override the client-level default timeout for this request, in seconds
67
67
  """
68
+ if not experience_type_id:
69
+ raise ValueError(f"Expected a non-empty value for `experience_type_id` but received {experience_type_id!r}")
68
70
  return self._post(
69
71
  f"/api/v1/experiences/instances/{experience_type_id}",
70
72
  options=make_request_options(
@@ -75,7 +77,7 @@ class ExperiencesResource(SyncAPIResource):
75
77
 
76
78
  def retrieve(
77
79
  self,
78
- experience_instance_id: int,
80
+ experience_instance_id: str,
79
81
  *,
80
82
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
81
83
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -96,6 +98,10 @@ class ExperiencesResource(SyncAPIResource):
96
98
 
97
99
  timeout: Override the client-level default timeout for this request, in seconds
98
100
  """
101
+ if not experience_instance_id:
102
+ raise ValueError(
103
+ f"Expected a non-empty value for `experience_instance_id` but received {experience_instance_id!r}"
104
+ )
99
105
  return self._get(
100
106
  f"/api/v1/experiences/instances/{experience_instance_id}",
101
107
  options=make_request_options(
@@ -106,7 +112,7 @@ class ExperiencesResource(SyncAPIResource):
106
112
 
107
113
  def delete(
108
114
  self,
109
- experience_instance_id: int,
115
+ experience_instance_id: str,
110
116
  *,
111
117
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
112
118
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -129,6 +135,10 @@ class ExperiencesResource(SyncAPIResource):
129
135
 
130
136
  timeout: Override the client-level default timeout for this request, in seconds
131
137
  """
138
+ if not experience_instance_id:
139
+ raise ValueError(
140
+ f"Expected a non-empty value for `experience_instance_id` but received {experience_instance_id!r}"
141
+ )
132
142
  return self._delete(
133
143
  f"/api/v1/experiences/instances/{experience_instance_id}",
134
144
  options=make_request_options(
@@ -153,7 +163,7 @@ class AsyncExperiencesResource(AsyncAPIResource):
153
163
 
154
164
  async def create(
155
165
  self,
156
- experience_type_id: int,
166
+ experience_type_id: str,
157
167
  *,
158
168
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
159
169
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -176,6 +186,8 @@ class AsyncExperiencesResource(AsyncAPIResource):
176
186
 
177
187
  timeout: Override the client-level default timeout for this request, in seconds
178
188
  """
189
+ if not experience_type_id:
190
+ raise ValueError(f"Expected a non-empty value for `experience_type_id` but received {experience_type_id!r}")
179
191
  return await self._post(
180
192
  f"/api/v1/experiences/instances/{experience_type_id}",
181
193
  options=make_request_options(
@@ -186,7 +198,7 @@ class AsyncExperiencesResource(AsyncAPIResource):
186
198
 
187
199
  async def retrieve(
188
200
  self,
189
- experience_instance_id: int,
201
+ experience_instance_id: str,
190
202
  *,
191
203
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
192
204
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -207,6 +219,10 @@ class AsyncExperiencesResource(AsyncAPIResource):
207
219
 
208
220
  timeout: Override the client-level default timeout for this request, in seconds
209
221
  """
222
+ if not experience_instance_id:
223
+ raise ValueError(
224
+ f"Expected a non-empty value for `experience_instance_id` but received {experience_instance_id!r}"
225
+ )
210
226
  return await self._get(
211
227
  f"/api/v1/experiences/instances/{experience_instance_id}",
212
228
  options=make_request_options(
@@ -217,7 +233,7 @@ class AsyncExperiencesResource(AsyncAPIResource):
217
233
 
218
234
  async def delete(
219
235
  self,
220
- experience_instance_id: int,
236
+ experience_instance_id: str,
221
237
  *,
222
238
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
223
239
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -240,6 +256,10 @@ class AsyncExperiencesResource(AsyncAPIResource):
240
256
 
241
257
  timeout: Override the client-level default timeout for this request, in seconds
242
258
  """
259
+ if not experience_instance_id:
260
+ raise ValueError(
261
+ f"Expected a non-empty value for `experience_instance_id` but received {experience_instance_id!r}"
262
+ )
243
263
  return await self._delete(
244
264
  f"/api/v1/experiences/instances/{experience_instance_id}",
245
265
  options=make_request_options(
@@ -39,8 +39,8 @@ class TypesResource(SyncAPIResource):
39
39
  def create(
40
40
  self,
41
41
  *,
42
- description: Optional[str] | NotGiven = NOT_GIVEN,
43
- name: Optional[str] | NotGiven = NOT_GIVEN,
42
+ description: str,
43
+ name: str,
44
44
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
45
45
  # The extra values given here take precedence over values defined on the client or passed to this method.
46
46
  extra_headers: Headers | None = None,
@@ -79,7 +79,7 @@ class TypesResource(SyncAPIResource):
79
79
 
80
80
  def retrieve(
81
81
  self,
82
- experience_type_id: int,
82
+ experience_type_id: str,
83
83
  *,
84
84
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
85
85
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -100,6 +100,8 @@ class TypesResource(SyncAPIResource):
100
100
 
101
101
  timeout: Override the client-level default timeout for this request, in seconds
102
102
  """
103
+ if not experience_type_id:
104
+ raise ValueError(f"Expected a non-empty value for `experience_type_id` but received {experience_type_id!r}")
103
105
  return self._get(
104
106
  f"/api/v1/experiences/types/{experience_type_id}",
105
107
  options=make_request_options(
@@ -110,7 +112,7 @@ class TypesResource(SyncAPIResource):
110
112
 
111
113
  def update(
112
114
  self,
113
- experience_type_id: int,
115
+ experience_type_id: str,
114
116
  *,
115
117
  description: Optional[str] | NotGiven = NOT_GIVEN,
116
118
  name: Optional[str] | NotGiven = NOT_GIVEN,
@@ -133,6 +135,8 @@ class TypesResource(SyncAPIResource):
133
135
 
134
136
  timeout: Override the client-level default timeout for this request, in seconds
135
137
  """
138
+ if not experience_type_id:
139
+ raise ValueError(f"Expected a non-empty value for `experience_type_id` but received {experience_type_id!r}")
136
140
  return self._patch(
137
141
  f"/api/v1/experiences/types/{experience_type_id}",
138
142
  body=maybe_transform(
@@ -169,7 +173,7 @@ class TypesResource(SyncAPIResource):
169
173
 
170
174
  def delete(
171
175
  self,
172
- experience_type_id: int,
176
+ experience_type_id: str,
173
177
  *,
174
178
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
175
179
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -192,6 +196,8 @@ class TypesResource(SyncAPIResource):
192
196
 
193
197
  timeout: Override the client-level default timeout for this request, in seconds
194
198
  """
199
+ if not experience_type_id:
200
+ raise ValueError(f"Expected a non-empty value for `experience_type_id` but received {experience_type_id!r}")
195
201
  return self._delete(
196
202
  f"/api/v1/experiences/types/{experience_type_id}",
197
203
  options=make_request_options(
@@ -213,8 +219,8 @@ class AsyncTypesResource(AsyncAPIResource):
213
219
  async def create(
214
220
  self,
215
221
  *,
216
- description: Optional[str] | NotGiven = NOT_GIVEN,
217
- name: Optional[str] | NotGiven = NOT_GIVEN,
222
+ description: str,
223
+ name: str,
218
224
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
219
225
  # The extra values given here take precedence over values defined on the client or passed to this method.
220
226
  extra_headers: Headers | None = None,
@@ -253,7 +259,7 @@ class AsyncTypesResource(AsyncAPIResource):
253
259
 
254
260
  async def retrieve(
255
261
  self,
256
- experience_type_id: int,
262
+ experience_type_id: str,
257
263
  *,
258
264
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
259
265
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -274,6 +280,8 @@ class AsyncTypesResource(AsyncAPIResource):
274
280
 
275
281
  timeout: Override the client-level default timeout for this request, in seconds
276
282
  """
283
+ if not experience_type_id:
284
+ raise ValueError(f"Expected a non-empty value for `experience_type_id` but received {experience_type_id!r}")
277
285
  return await self._get(
278
286
  f"/api/v1/experiences/types/{experience_type_id}",
279
287
  options=make_request_options(
@@ -284,7 +292,7 @@ class AsyncTypesResource(AsyncAPIResource):
284
292
 
285
293
  async def update(
286
294
  self,
287
- experience_type_id: int,
295
+ experience_type_id: str,
288
296
  *,
289
297
  description: Optional[str] | NotGiven = NOT_GIVEN,
290
298
  name: Optional[str] | NotGiven = NOT_GIVEN,
@@ -307,6 +315,8 @@ class AsyncTypesResource(AsyncAPIResource):
307
315
 
308
316
  timeout: Override the client-level default timeout for this request, in seconds
309
317
  """
318
+ if not experience_type_id:
319
+ raise ValueError(f"Expected a non-empty value for `experience_type_id` but received {experience_type_id!r}")
310
320
  return await self._patch(
311
321
  f"/api/v1/experiences/types/{experience_type_id}",
312
322
  body=await async_maybe_transform(
@@ -343,7 +353,7 @@ class AsyncTypesResource(AsyncAPIResource):
343
353
 
344
354
  async def delete(
345
355
  self,
346
- experience_type_id: int,
356
+ experience_type_id: str,
347
357
  *,
348
358
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
349
359
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -366,6 +376,8 @@ class AsyncTypesResource(AsyncAPIResource):
366
376
 
367
377
  timeout: Override the client-level default timeout for this request, in seconds
368
378
  """
379
+ if not experience_type_id:
380
+ raise ValueError(f"Expected a non-empty value for `experience_type_id` but received {experience_type_id!r}")
369
381
  return await self._delete(
370
382
  f"/api/v1/experiences/types/{experience_type_id}",
371
383
  options=make_request_options(
@@ -2,12 +2,12 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- from typing import Dict, Union, Iterable, cast
5
+ from typing import Union, Iterable
6
6
  from datetime import datetime
7
7
 
8
8
  import httpx
9
9
 
10
- from ..types import ingest_bulk_params, ingest_units_params
10
+ from ..types import ingest_units_params
11
11
  from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
12
12
  from .._utils import (
13
13
  maybe_transform,
@@ -24,6 +24,7 @@ from .._response import (
24
24
  )
25
25
  from .._base_client import make_request_options
26
26
  from ..types.ingest_response import IngestResponse
27
+ from ..types.ingest_event_param import IngestEventParam
27
28
  from ..types.bulk_ingest_response import BulkIngestResponse
28
29
 
29
30
  __all__ = ["IngestResource", "AsyncIngestResource"]
@@ -41,7 +42,7 @@ class IngestResource(SyncAPIResource):
41
42
  def bulk(
42
43
  self,
43
44
  *,
44
- events: Iterable[ingest_bulk_params.Event],
45
+ events: Iterable[IngestEventParam],
45
46
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
46
47
  # The extra values given here take precedence over values defined on the client or passed to this method.
47
48
  extra_headers: Headers | None = None,
@@ -66,12 +67,7 @@ class IngestResource(SyncAPIResource):
66
67
  """
67
68
  return self._post(
68
69
  "/api/v1/ingest/bulk",
69
- body=cast(Dict[str, object], maybe_transform(
70
- {
71
- "events": events,
72
- },
73
- ingest_bulk_params.IngestBulkParams)
74
- )["events"],
70
+ body=maybe_transform(events, Iterable[IngestEventParam]),
75
71
  options=make_request_options(
76
72
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
77
73
  ),
@@ -88,6 +84,8 @@ class IngestResource(SyncAPIResource):
88
84
  event_timestamp: Union[str, datetime, None] | NotGiven = NOT_GIVEN,
89
85
  budget_ids: Union[list[str], None] | NotGiven = NOT_GIVEN,
90
86
  request_tags: Union[list[str], None] | NotGiven = NOT_GIVEN,
87
+ experience_instance_id: Union[str, None] | NotGiven = NOT_GIVEN,
88
+ user_id: Union[str, None] | NotGiven = NOT_GIVEN,
91
89
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
92
90
  # The extra values given here take precedence over values defined on the client or passed to this method.
93
91
  extra_headers: Headers | None = None,
@@ -112,6 +110,10 @@ class IngestResource(SyncAPIResource):
112
110
  budget_ids (list[str], optional): The budget IDs to associate with the request. Defaults to None.
113
111
 
114
112
  request_tags (list[str], optional): The request tags to associate with the request. Defaults to None.
113
+
114
+ experience_instance_id (str, optional): The experience instance id
115
+
116
+ user_id (str, optional): The user id
115
117
 
116
118
  extra_headers (Dict[str, str], optional): Additional headers for the request. Defaults to None.
117
119
 
@@ -142,11 +144,19 @@ class IngestResource(SyncAPIResource):
142
144
  valid_tags = [tag.strip() for tag in request_tags if tag.strip()]
143
145
  valid_tags_str = ",".join(valid_tags) if valid_tags else NOT_GIVEN
144
146
 
147
+ if experience_instance_id is None or isinstance(experience_instance_id, NotGiven):
148
+ experience_instance_id = NOT_GIVEN
149
+
150
+ if user_id is None or isinstance(user_id, NotGiven):
151
+ user_id = NOT_GIVEN
152
+
145
153
  extra_headers = {
146
154
  **strip_not_given(
147
155
  {
148
156
  "xProxy-Budget-IDs": valid_ids_str,
149
157
  "xProxy-Request-Tags": valid_tags_str,
158
+ "xProxy-Experience-InstanceId": experience_instance_id,
159
+ "xProxy-User-ID": user_id,
150
160
  }
151
161
  ),
152
162
  **(extra_headers or {}),
@@ -182,7 +192,7 @@ class AsyncIngestResource(AsyncAPIResource):
182
192
  async def bulk(
183
193
  self,
184
194
  *,
185
- events: Iterable[ingest_bulk_params.Event],
195
+ events: Iterable[IngestEventParam],
186
196
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
187
197
  # The extra values given here take precedence over values defined on the client or passed to this method.
188
198
  extra_headers: Headers | None = None,
@@ -206,13 +216,7 @@ class AsyncIngestResource(AsyncAPIResource):
206
216
  """
207
217
  return await self._post(
208
218
  "/api/v1/ingest/bulk",
209
- body= cast(Dict[str, object],
210
- await async_maybe_transform(
211
- {
212
- "events": events,
213
- },
214
- ingest_bulk_params.IngestBulkParams)
215
- )["events"],
219
+ body=await async_maybe_transform(events, Iterable[IngestEventParam]),
216
220
  options=make_request_options(
217
221
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
218
222
  ),
@@ -229,6 +233,8 @@ class AsyncIngestResource(AsyncAPIResource):
229
233
  event_timestamp: Union[str, datetime, None] | NotGiven = NOT_GIVEN,
230
234
  budget_ids: Union[list[str], None] | NotGiven = NOT_GIVEN,
231
235
  request_tags: Union[list[str], None] | NotGiven = NOT_GIVEN,
236
+ experience_instance_id: Union[str, None] | NotGiven = NOT_GIVEN,
237
+ user_id: Union[str, None] | NotGiven = NOT_GIVEN,
232
238
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
233
239
  # The extra values given here take precedence over values defined on the client or passed to this method.
234
240
  extra_headers: Headers | None = None,
@@ -254,6 +260,10 @@ class AsyncIngestResource(AsyncAPIResource):
254
260
 
255
261
  request_tags (list[str], optional): The request tags to associate with the request. Defaults to None.
256
262
 
263
+ experience_instance_id (str, optional): The experience instance id
264
+
265
+ user_id (str, optional): The user id
266
+
257
267
  extra_headers (Dict[str, str], optional): Additional headers for the request. Defaults to None.
258
268
 
259
269
  extra_query (Dict[str, str], optional): Additional query parameters. Defaults to None.
@@ -283,11 +293,19 @@ class AsyncIngestResource(AsyncAPIResource):
283
293
  valid_tags = [tag.strip() for tag in request_tags if tag.strip()]
284
294
  valid_tags_str = ",".join(valid_tags) if valid_tags else NOT_GIVEN
285
295
 
296
+ if experience_instance_id is None or isinstance(experience_instance_id, NotGiven):
297
+ experience_instance_id = NOT_GIVEN
298
+
299
+ if user_id is None or isinstance(user_id, NotGiven):
300
+ user_id = NOT_GIVEN
301
+
286
302
  extra_headers = {
287
303
  **strip_not_given(
288
304
  {
289
305
  "xProxy-Budget-IDs": valid_ids_str,
290
306
  "xProxy-Request-Tags": valid_tags_str,
307
+ "xProxy-Experience-InstanceId": experience_instance_id,
308
+ "xProxy-User-ID": user_id,
291
309
  }
292
310
  ),
293
311
  **(extra_headers or {}),
@@ -13,6 +13,7 @@ from .category_response import CategoryResponse as CategoryResponse
13
13
  from .paged_budget_list import PagedBudgetList as PagedBudgetList
14
14
  from .budget_list_params import BudgetListParams as BudgetListParams
15
15
  from .ingest_bulk_params import IngestBulkParams as IngestBulkParams
16
+ from .ingest_event_param import IngestEventParam as IngestEventParam
16
17
  from .experience_instance import ExperienceInstance as ExperienceInstance
17
18
  from .ingest_units_params import IngestUnitsParams as IngestUnitsParams
18
19
  from .budget_create_params import BudgetCreateParams as BudgetCreateParams
@@ -13,6 +13,10 @@ class CategoryResourceResponse(BaseModel):
13
13
 
14
14
  resource: str
15
15
 
16
+ resource_id: str
17
+
18
+ start_timestamp: datetime
19
+
16
20
  input_price: Optional[float] = None
17
21
 
18
22
  max_input_units: Optional[int] = None
@@ -20,5 +24,3 @@ class CategoryResourceResponse(BaseModel):
20
24
  max_output_units: Optional[int] = None
21
25
 
22
26
  output_price: Optional[float] = None
23
-
24
- start_timestamp: Optional[datetime] = None
@@ -2,13 +2,12 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- from typing import Optional
6
- from typing_extensions import TypedDict
5
+ from typing_extensions import Required, TypedDict
7
6
 
8
7
  __all__ = ["TypeCreateParams"]
9
8
 
10
9
 
11
10
  class TypeCreateParams(TypedDict, total=False):
12
- description: Optional[str]
11
+ description: Required[str]
13
12
 
14
- name: Optional[str]
13
+ name: Required[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 Iterable
6
+ from typing_extensions import Required, TypedDict
7
+
8
+ from .ingest_event_param import IngestEventParam
9
+
10
+ __all__ = ["IngestBulkParams"]
11
+
12
+
13
+ class IngestBulkParams(TypedDict, total=False):
14
+ events: Required[Iterable[IngestEventParam]]