payi 0.1.0a126__py3-none-any.whl → 0.1.0a127__py3-none-any.whl

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/_version.py CHANGED
@@ -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.126" # x-release-please-version
4
+ __version__ = "0.1.0-alpha.127" # x-release-please-version
payi/lib/instrument.py CHANGED
@@ -9,7 +9,7 @@ import logging
9
9
  import traceback
10
10
  from abc import abstractmethod
11
11
  from enum import Enum
12
- from typing import Any, Set, Union, Optional, Sequence, TypedDict
12
+ from typing import Any, Set, Union, Optional, Sequence, TypedDict, cast
13
13
  from datetime import datetime, timezone
14
14
  from dataclasses import dataclass
15
15
 
@@ -60,7 +60,7 @@ class _ProviderRequest:
60
60
  self._building_function_response: bool = False
61
61
  self._function_calls: Optional[list[ProviderResponseFunctionCall]] = None
62
62
  self._is_large_context: bool = False
63
- self._internal_request_properties: dict[str, str] = {}
63
+ self._internal_request_properties: dict[str, Optional[str]] = {}
64
64
 
65
65
  def process_chunk(self, _chunk: Any) -> _ChunkResult:
66
66
  return _ChunkResult(send_chunk_to_caller=True)
@@ -161,11 +161,11 @@ class PayiInstrumentConfig(TypedDict, total=False):
161
161
  use_case_name: Optional[str]
162
162
  use_case_id: Optional[str]
163
163
  use_case_version: Optional[int]
164
- use_case_properties: Optional["dict[str, str]"]
164
+ use_case_properties: Optional["dict[str, Optional[str]]"]
165
165
  user_id: Optional[str]
166
166
  account_name: Optional[str]
167
167
  request_tags: Optional["list[str]"]
168
- request_properties: Optional["dict[str, str]"]
168
+ request_properties: Optional["dict[str, Optional[str]]"]
169
169
  aws_config: Optional[PayiInstrumentAwsBedrockConfig]
170
170
  offline_instrumentation: Optional[PayiInstrumentOfflineInstrumentationConfig]
171
171
 
@@ -174,12 +174,12 @@ class PayiContext(TypedDict, total=False):
174
174
  use_case_id: Optional[str]
175
175
  use_case_version: Optional[int]
176
176
  use_case_step: Optional[str]
177
- use_case_properties: Optional["dict[str, str]"]
177
+ use_case_properties: Optional["dict[str, Optional[str]]"]
178
178
  limit_ids: Optional['list[str]']
179
179
  user_id: Optional[str]
180
180
  account_name: Optional[str]
181
181
  request_tags: Optional["list[str]"]
182
- request_properties: Optional["dict[str, str]"]
182
+ request_properties: Optional["dict[str, Optional[str]]"]
183
183
  price_as_category: Optional[str]
184
184
  price_as_resource: Optional[str]
185
185
  resource_scope: Optional[str]
@@ -191,11 +191,11 @@ class _Context(TypedDict, total=False):
191
191
  use_case_id: Optional[str]
192
192
  use_case_version: Optional[int]
193
193
  use_case_step: Optional[str]
194
- use_case_properties: Optional["dict[str, str]"]
194
+ use_case_properties: Optional["dict[str, Optional[str]]"]
195
195
  limit_ids: Optional['list[str]']
196
196
  user_id: Optional[str]
197
197
  account_name: Optional[str]
198
- request_properties: Optional["dict[str, str]"]
198
+ request_properties: Optional["dict[str, Optional[str]]"]
199
199
  price_as_category: Optional[str]
200
200
  price_as_resource: Optional[str]
201
201
  resource_scope: Optional[str]
@@ -710,7 +710,7 @@ class _PayiInstrumentor:
710
710
  return value
711
711
 
712
712
  @staticmethod
713
- def _valid_properties_or_none(value: Optional["dict[str, str]"], default: Optional["dict[str, str]"] = None) -> Optional["dict[str, str]"]:
713
+ def _valid_properties_or_none(value: Optional["dict[str, Optional[str]]"], default: Optional["dict[str, Optional[str]]"] = None) -> Optional["dict[str, Optional[str]]"]:
714
714
  if value is None:
715
715
  return default.copy() if default else None
716
716
  elif len(value) == 0:
@@ -734,8 +734,8 @@ class _PayiInstrumentor:
734
734
  use_case_step: Optional[str]= None,
735
735
  user_id: Optional[str]= None,
736
736
  account_name: Optional[str]= None,
737
- request_properties: Optional["dict[str, str]"] = None,
738
- use_case_properties: Optional["dict[str, str]"] = None,
737
+ request_properties: Optional["dict[str, Optional[str]]"] = None,
738
+ use_case_properties: Optional["dict[str, Optional[str]]"] = None,
739
739
  price_as_category: Optional[str] = None,
740
740
  price_as_resource: Optional[str] = None,
741
741
  resource_scope: Optional[str] = None,
@@ -826,8 +826,8 @@ class _PayiInstrumentor:
826
826
  use_case_version: Optional[int],
827
827
  user_id: Optional[str],
828
828
  account_name: Optional[str],
829
- request_properties: Optional["dict[str, str]"] = None,
830
- use_case_properties: Optional["dict[str, str]"] = None,
829
+ request_properties: Optional["dict[str, Optional[str]]"] = None,
830
+ use_case_properties: Optional["dict[str, Optional[str]]"] = None,
831
831
  *args: Any,
832
832
  **kwargs: Any,
833
833
  ) -> Any:
@@ -855,8 +855,8 @@ class _PayiInstrumentor:
855
855
  use_case_version: Optional[int],
856
856
  user_id: Optional[str],
857
857
  account_name: Optional[str],
858
- request_properties: Optional["dict[str, str]"] = None,
859
- use_case_properties: Optional["dict[str, str]"] = None,
858
+ request_properties: Optional["dict[str, Optional[str]]"] = None,
859
+ use_case_properties: Optional["dict[str, Optional[str]]"] = None,
860
860
  *args: Any,
861
861
  **kwargs: Any,
862
862
  ) -> Any:
@@ -1795,8 +1795,8 @@ def track(
1795
1795
  use_case_version,
1796
1796
  user_id,
1797
1797
  account_name,
1798
- request_properties,
1799
- use_case_properties,
1798
+ cast(Optional['dict[str, Optional[str]]'], request_properties),
1799
+ cast(Optional['dict[str, Optional[str]]'], use_case_properties),
1800
1800
  *args,
1801
1801
  **kwargs,
1802
1802
  )
@@ -1818,8 +1818,8 @@ def track(
1818
1818
  use_case_version,
1819
1819
  user_id,
1820
1820
  account_name,
1821
- request_properties,
1822
- use_case_properties,
1821
+ cast(Optional['dict[str, Optional[str]]'], request_properties),
1822
+ cast(Optional['dict[str, Optional[str]]'], use_case_properties),
1823
1823
  *args,
1824
1824
  **kwargs,
1825
1825
  )
@@ -1862,8 +1862,8 @@ def track_context(
1862
1862
  context["price_as_resource"] = price_as_resource
1863
1863
  context["resource_scope"] = resource_scope
1864
1864
 
1865
- context["request_properties"] = request_properties
1866
- context["use_case_properties"] = use_case_properties
1865
+ context["request_properties"] = cast(Optional['dict[str, Optional[str]]'], request_properties)
1866
+ context["use_case_properties"] = cast(Optional['dict[str, Optional[str]]'], use_case_properties)
1867
1867
 
1868
1868
  _ = request_tags
1869
1869
 
@@ -16,14 +16,6 @@ from .categories import (
16
16
  CategoriesResourceWithStreamingResponse,
17
17
  AsyncCategoriesResourceWithStreamingResponse,
18
18
  )
19
- from .fixed_cost_resources import (
20
- FixedCostResourcesResource,
21
- AsyncFixedCostResourcesResource,
22
- FixedCostResourcesResourceWithRawResponse,
23
- AsyncFixedCostResourcesResourceWithRawResponse,
24
- FixedCostResourcesResourceWithStreamingResponse,
25
- AsyncFixedCostResourcesResourceWithStreamingResponse,
26
- )
27
19
 
28
20
  __all__ = [
29
21
  "ResourcesResource",
@@ -32,12 +24,6 @@ __all__ = [
32
24
  "AsyncResourcesResourceWithRawResponse",
33
25
  "ResourcesResourceWithStreamingResponse",
34
26
  "AsyncResourcesResourceWithStreamingResponse",
35
- "FixedCostResourcesResource",
36
- "AsyncFixedCostResourcesResource",
37
- "FixedCostResourcesResourceWithRawResponse",
38
- "AsyncFixedCostResourcesResourceWithRawResponse",
39
- "FixedCostResourcesResourceWithStreamingResponse",
40
- "AsyncFixedCostResourcesResourceWithStreamingResponse",
41
27
  "CategoriesResource",
42
28
  "AsyncCategoriesResource",
43
29
  "CategoriesResourceWithRawResponse",
@@ -25,14 +25,6 @@ from ..._response import (
25
25
  )
26
26
  from ...pagination import SyncCursorPage, AsyncCursorPage
27
27
  from ..._base_client import AsyncPaginator, make_request_options
28
- from .fixed_cost_resources import (
29
- FixedCostResourcesResource,
30
- AsyncFixedCostResourcesResource,
31
- FixedCostResourcesResourceWithRawResponse,
32
- AsyncFixedCostResourcesResourceWithRawResponse,
33
- FixedCostResourcesResourceWithStreamingResponse,
34
- AsyncFixedCostResourcesResourceWithStreamingResponse,
35
- )
36
28
  from ...types.category_response import CategoryResponse
37
29
  from ...types.category_delete_response import CategoryDeleteResponse
38
30
  from ...types.category_resource_response import CategoryResourceResponse
@@ -46,10 +38,6 @@ class CategoriesResource(SyncAPIResource):
46
38
  def resources(self) -> ResourcesResource:
47
39
  return ResourcesResource(self._client)
48
40
 
49
- @cached_property
50
- def fixed_cost_resources(self) -> FixedCostResourcesResource:
51
- return FixedCostResourcesResource(self._client)
52
-
53
41
  @cached_property
54
42
  def with_raw_response(self) -> CategoriesResourceWithRawResponse:
55
43
  """
@@ -237,10 +225,6 @@ class AsyncCategoriesResource(AsyncAPIResource):
237
225
  def resources(self) -> AsyncResourcesResource:
238
226
  return AsyncResourcesResource(self._client)
239
227
 
240
- @cached_property
241
- def fixed_cost_resources(self) -> AsyncFixedCostResourcesResource:
242
- return AsyncFixedCostResourcesResource(self._client)
243
-
244
228
  @cached_property
245
229
  def with_raw_response(self) -> AsyncCategoriesResourceWithRawResponse:
246
230
  """
@@ -444,10 +428,6 @@ class CategoriesResourceWithRawResponse:
444
428
  def resources(self) -> ResourcesResourceWithRawResponse:
445
429
  return ResourcesResourceWithRawResponse(self._categories.resources)
446
430
 
447
- @cached_property
448
- def fixed_cost_resources(self) -> FixedCostResourcesResourceWithRawResponse:
449
- return FixedCostResourcesResourceWithRawResponse(self._categories.fixed_cost_resources)
450
-
451
431
 
452
432
  class AsyncCategoriesResourceWithRawResponse:
453
433
  def __init__(self, categories: AsyncCategoriesResource) -> None:
@@ -470,10 +450,6 @@ class AsyncCategoriesResourceWithRawResponse:
470
450
  def resources(self) -> AsyncResourcesResourceWithRawResponse:
471
451
  return AsyncResourcesResourceWithRawResponse(self._categories.resources)
472
452
 
473
- @cached_property
474
- def fixed_cost_resources(self) -> AsyncFixedCostResourcesResourceWithRawResponse:
475
- return AsyncFixedCostResourcesResourceWithRawResponse(self._categories.fixed_cost_resources)
476
-
477
453
 
478
454
  class CategoriesResourceWithStreamingResponse:
479
455
  def __init__(self, categories: CategoriesResource) -> None:
@@ -496,10 +472,6 @@ class CategoriesResourceWithStreamingResponse:
496
472
  def resources(self) -> ResourcesResourceWithStreamingResponse:
497
473
  return ResourcesResourceWithStreamingResponse(self._categories.resources)
498
474
 
499
- @cached_property
500
- def fixed_cost_resources(self) -> FixedCostResourcesResourceWithStreamingResponse:
501
- return FixedCostResourcesResourceWithStreamingResponse(self._categories.fixed_cost_resources)
502
-
503
475
 
504
476
  class AsyncCategoriesResourceWithStreamingResponse:
505
477
  def __init__(self, categories: AsyncCategoriesResource) -> None:
@@ -521,7 +493,3 @@ class AsyncCategoriesResourceWithStreamingResponse:
521
493
  @cached_property
522
494
  def resources(self) -> AsyncResourcesResourceWithStreamingResponse:
523
495
  return AsyncResourcesResourceWithStreamingResponse(self._categories.resources)
524
-
525
- @cached_property
526
- def fixed_cost_resources(self) -> AsyncFixedCostResourcesResourceWithStreamingResponse:
527
- return AsyncFixedCostResourcesResourceWithStreamingResponse(self._categories.fixed_cost_resources)
@@ -140,6 +140,7 @@ class ResourcesResource(SyncAPIResource):
140
140
  resource: str,
141
141
  *,
142
142
  category: str,
143
+ active: bool | Omit = omit,
143
144
  cursor: str | Omit = omit,
144
145
  limit: int | Omit = omit,
145
146
  sort_ascending: bool | Omit = omit,
@@ -176,6 +177,7 @@ class ResourcesResource(SyncAPIResource):
176
177
  timeout=timeout,
177
178
  query=maybe_transform(
178
179
  {
180
+ "active": active,
179
181
  "cursor": cursor,
180
182
  "limit": limit,
181
183
  "sort_ascending": sort_ascending,
@@ -341,6 +343,7 @@ class AsyncResourcesResource(AsyncAPIResource):
341
343
  resource: str,
342
344
  *,
343
345
  category: str,
346
+ active: bool | Omit = omit,
344
347
  cursor: str | Omit = omit,
345
348
  limit: int | Omit = omit,
346
349
  sort_ascending: bool | Omit = omit,
@@ -377,6 +380,7 @@ class AsyncResourcesResource(AsyncAPIResource):
377
380
  timeout=timeout,
378
381
  query=maybe_transform(
379
382
  {
383
+ "active": active,
380
384
  "cursor": cursor,
381
385
  "limit": limit,
382
386
  "sort_ascending": sort_ascending,
payi/resources/ingest.py CHANGED
@@ -90,7 +90,7 @@ class IngestResource(SyncAPIResource):
90
90
  end_to_end_latency_ms: Optional[int] | Omit = omit,
91
91
  event_timestamp: Union[str, datetime, None] | Omit = omit,
92
92
  http_status_code: Optional[int] | Omit = omit,
93
- properties: Optional[Dict[str, str]] | Omit = omit,
93
+ properties: Optional[Dict[str, Optional[str]]] | Omit = omit,
94
94
  provider_request_headers: Optional[Iterable[PayICommonModelsAPIRouterHeaderInfoParam]] | Omit = omit,
95
95
  provider_request_json: Optional[str] | Omit = omit,
96
96
  provider_request_reasoning_json: Optional[str] | Omit = omit,
@@ -103,8 +103,9 @@ class IngestResource(SyncAPIResource):
103
103
  resource: Optional[str] | Omit = omit,
104
104
  time_to_first_completion_token_ms: Optional[int] | Omit = omit,
105
105
  time_to_first_token_ms: Optional[int] | Omit = omit,
106
- use_case_properties: Optional[Dict[str, str]] | Omit = omit,
106
+ use_case_properties: Optional[Dict[str, Optional[str]]] | Omit = omit,
107
107
  limit_ids: Optional[list[str]] | Omit = omit,
108
+ disable_logging: Optional[bool] | Omit = omit,
108
109
  request_tags: Optional[list[str]] | Omit = omit,
109
110
  use_case_id: Optional[str] | Omit = omit,
110
111
  use_case_name: Optional[str] | Omit = omit,
@@ -134,9 +135,11 @@ class IngestResource(SyncAPIResource):
134
135
 
135
136
  event_timestamp: (str, datetime, None): The timestamp of the event
136
137
 
138
+ disable_logging (bool, optional): Disable logging for the request
139
+
137
140
  limit_ids (list[str], optional): The limit IDs to associate with the request
138
141
 
139
- properties (Dict[str, str], optional): Properties to associate with the request
142
+ properties (Dict[str, Optional[str]], optional): Properties to associate with the request
140
143
 
141
144
  request_tags (list[str], optional): The request tags to associate with the request
142
145
 
@@ -148,7 +151,7 @@ class IngestResource(SyncAPIResource):
148
151
 
149
152
  use_case_version (int, optional): The use case instance version
150
153
 
151
- use_case_properties (Dict[str, str], optional): The use case properties
154
+ use_case_properties (Dict[str, Optional[str]], optional): The use case properties
152
155
 
153
156
  user_id (str, optional): The user id
154
157
 
@@ -214,6 +217,9 @@ class IngestResource(SyncAPIResource):
214
217
  "xProxy-User-ID": user_id,
215
218
  "xProxy-Resource-Scope": resource_scope,
216
219
  "xProxy-Account-Name": account_name,
220
+ "xProxy-Logging-Disable": str(disable_logging)
221
+ if is_given(disable_logging)
222
+ else not_given,
217
223
  }
218
224
  ),
219
225
  **(extra_headers or {}),
@@ -311,7 +317,7 @@ class AsyncIngestResource(AsyncAPIResource):
311
317
  end_to_end_latency_ms: Optional[int] | Omit = omit,
312
318
  event_timestamp: Union[str, datetime, None] | Omit = omit,
313
319
  http_status_code: Optional[int] | Omit = omit,
314
- properties: Optional[Dict[str, str]] | Omit = omit,
320
+ properties: Optional[Dict[str, Optional[str]]] | Omit = omit,
315
321
  provider_request_headers: Optional[Iterable[PayICommonModelsAPIRouterHeaderInfoParam]] | Omit = omit,
316
322
  provider_request_json: Optional[str] | Omit = omit,
317
323
  provider_request_reasoning_json: Optional[str] | Omit = omit,
@@ -324,8 +330,9 @@ class AsyncIngestResource(AsyncAPIResource):
324
330
  resource: Optional[str] | Omit = omit,
325
331
  time_to_first_completion_token_ms: Optional[int] | Omit = omit,
326
332
  time_to_first_token_ms: Optional[int] | Omit = omit,
327
- use_case_properties: Optional[Dict[str, str]] | Omit = omit,
333
+ use_case_properties: Optional[Dict[str, Optional[str]]] | Omit = omit,
328
334
  limit_ids: Optional[list[str]] | Omit = omit,
335
+ disable_logging: Optional[bool] | Omit = omit,
329
336
  request_tags: Optional[list[str]] | Omit = omit,
330
337
  use_case_id: Optional[str] | Omit = omit,
331
338
  use_case_name: Optional[str] | Omit = omit,
@@ -354,9 +361,11 @@ class AsyncIngestResource(AsyncAPIResource):
354
361
 
355
362
  event_timestamp: (datetime, None): The timestamp of the event
356
363
 
364
+ disable_logging: (bool, optional): Disable logging for the request
365
+
357
366
  limit_ids (list[str], optional): The limit IDs to associate with the request
358
367
 
359
- properties (Dict[str, str], optional): Properties to associate with the request
368
+ properties (Dict[str, Optional[str]], optional): Properties to associate with the request
360
369
 
361
370
  request_tags (list[str], optional): The request tags to associate with the request
362
371
 
@@ -368,7 +377,7 @@ class AsyncIngestResource(AsyncAPIResource):
368
377
 
369
378
  use_case_version (int, optional): The use case instance version
370
379
 
371
- use_case_properties (Dict[str, str], optional): The use case properties
380
+ use_case_properties (Dict[str, Optional[str]], optional): The use case properties
372
381
 
373
382
  user_id (str, optional): The user id
374
383
 
@@ -434,6 +443,9 @@ class AsyncIngestResource(AsyncAPIResource):
434
443
  else not_given,
435
444
  "xProxy-User-ID": user_id,
436
445
  "xProxy-Resource-Scope": resource_scope,
446
+ "xProxy-Logging-Disable": str(disable_logging)
447
+ if is_given(disable_logging)
448
+ else not_given,
437
449
  }
438
450
  ),
439
451
  **(extra_headers or {}),
@@ -2,7 +2,7 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- from typing import Dict
5
+ from typing import Dict, Optional
6
6
 
7
7
  import httpx
8
8
 
@@ -47,7 +47,7 @@ class PropertiesResource(SyncAPIResource):
47
47
  self,
48
48
  request_id: str,
49
49
  *,
50
- properties: Dict[str, str],
50
+ properties: Dict[str, Optional[str]],
51
51
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
52
52
  # The extra values given here take precedence over values defined on the client or passed to this method.
53
53
  extra_headers: Headers | None = None,
@@ -103,7 +103,7 @@ class AsyncPropertiesResource(AsyncAPIResource):
103
103
  self,
104
104
  request_id: str,
105
105
  *,
106
- properties: Dict[str, str],
106
+ properties: Dict[str, Optional[str]],
107
107
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
108
108
  # The extra values given here take precedence over values defined on the client or passed to this method.
109
109
  extra_headers: Headers | None = None,
@@ -2,7 +2,7 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- from typing import Dict
5
+ from typing import Dict, Optional
6
6
 
7
7
  import httpx
8
8
 
@@ -48,7 +48,7 @@ class PropertiesResource(SyncAPIResource):
48
48
  provider_response_id: str,
49
49
  *,
50
50
  category: str,
51
- properties: Dict[str, str],
51
+ properties: Dict[str, Optional[str]],
52
52
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
53
53
  # The extra values given here take precedence over values defined on the client or passed to this method.
54
54
  extra_headers: Headers | None = None,
@@ -109,7 +109,7 @@ class AsyncPropertiesResource(AsyncAPIResource):
109
109
  provider_response_id: str,
110
110
  *,
111
111
  category: str,
112
- properties: Dict[str, str],
112
+ properties: Dict[str, Optional[str]],
113
113
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
114
114
  # The extra values given here take precedence over values defined on the client or passed to this method.
115
115
  extra_headers: Headers | None = None,
@@ -2,7 +2,7 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- from typing import Dict
5
+ from typing import Dict, Optional
6
6
 
7
7
  import httpx
8
8
 
@@ -47,7 +47,7 @@ class PropertiesResource(SyncAPIResource):
47
47
  self,
48
48
  use_case_id: str,
49
49
  *,
50
- properties: Dict[str, str],
50
+ properties: Dict[str, Optional[str]],
51
51
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
52
52
  # The extra values given here take precedence over values defined on the client or passed to this method.
53
53
  extra_headers: Headers | None = None,
@@ -103,7 +103,7 @@ class AsyncPropertiesResource(AsyncAPIResource):
103
103
  self,
104
104
  use_case_id: str,
105
105
  *,
106
- properties: Dict[str, str],
106
+ properties: Dict[str, Optional[str]],
107
107
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
108
108
  # The extra values given here take precedence over values defined on the client or passed to this method.
109
109
  extra_headers: Headers | None = None,
payi/types/__init__.py CHANGED
@@ -3,9 +3,11 @@
3
3
  from __future__ import annotations
4
4
 
5
5
  from .shared import (
6
+ APIError as APIError,
6
7
  IngestUnits as IngestUnits,
7
8
  XproxyError as XproxyError,
8
9
  XproxyResult as XproxyResult,
10
+ PropertiesRequest as PropertiesRequest,
9
11
  PropertiesResponse as PropertiesResponse,
10
12
  PayICommonModelsBudgetManagementCostDetailsBase as PayICommonModelsBudgetManagementCostDetailsBase,
11
13
  PayICommonModelsBudgetManagementCreateLimitBase as PayICommonModelsBudgetManagementCreateLimitBase,
@@ -3,33 +3,16 @@
3
3
  from typing import List, Optional
4
4
  from datetime import datetime
5
5
 
6
- from pydantic import Field as FieldInfo
7
-
8
6
  from .._models import BaseModel
9
- from .shared.xproxy_error import XproxyError
10
-
11
- __all__ = ["BulkIngestResponse", "Error", "ErrorXproxyResult"]
12
-
13
-
14
- class ErrorXproxyResult(BaseModel):
15
- message: str
16
-
17
- status_code: int = FieldInfo(alias="statusCode")
7
+ from .shared.api_error import APIError
18
8
 
19
- xproxy_error: Optional[XproxyError] = None
9
+ __all__ = ["BulkIngestResponse", "Error"]
20
10
 
21
11
 
22
12
  class Error(BaseModel):
23
13
  item_index: Optional[int] = None
24
14
 
25
- xproxy_result: Optional[ErrorXproxyResult] = None
26
- """
27
- Represents an generic error that occurred as a result of processing a request.
28
- APIM returns an (not customizable) error response body of { "statusCode",
29
- "message" } and this class matches this schema. Derived classes may add
30
- additional required fields if these classes are specified as produced as a
31
- return type specific endpoints.
32
- """
15
+ xproxy_result: Optional[APIError] = None
33
16
 
34
17
 
35
18
  class BulkIngestResponse(BaseModel):
@@ -4,4 +4,3 @@ from __future__ import annotations
4
4
 
5
5
  from .resource_list_params import ResourceListParams as ResourceListParams
6
6
  from .resource_create_params import ResourceCreateParams as ResourceCreateParams
7
- from .fixed_cost_resource_create_params import FixedCostResourceCreateParams as FixedCostResourceCreateParams
@@ -2,7 +2,9 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- from typing_extensions import Required, TypedDict
5
+ from typing_extensions import Required, Annotated, TypedDict
6
+
7
+ from ..._utils import PropertyInfo
6
8
 
7
9
  __all__ = ["ResourceListParams"]
8
10
 
@@ -10,6 +12,8 @@ __all__ = ["ResourceListParams"]
10
12
  class ResourceListParams(TypedDict, total=False):
11
13
  category: Required[str]
12
14
 
15
+ active: Annotated[bool, PropertyInfo(alias="Active")]
16
+
13
17
  cursor: str
14
18
 
15
19
  limit: int
@@ -3,9 +3,11 @@
3
3
  from typing import Dict, Optional
4
4
  from datetime import datetime
5
5
 
6
+ from pydantic import Field as FieldInfo
7
+
6
8
  from .._models import BaseModel
7
9
 
8
- __all__ = ["CategoryResourceResponse", "Units"]
10
+ __all__ = ["CategoryResourceResponse", "Units", "AwsBedrockResource", "AzureResource", "GoogleVertexResource"]
9
11
 
10
12
 
11
13
  class Units(BaseModel):
@@ -14,7 +16,21 @@ class Units(BaseModel):
14
16
  output_price: Optional[float] = None
15
17
 
16
18
 
19
+ class AwsBedrockResource(BaseModel):
20
+ api_model_units: int = FieldInfo(alias="model_units")
21
+
22
+
23
+ class AzureResource(BaseModel):
24
+ ptus: int
25
+
26
+
27
+ class GoogleVertexResource(BaseModel):
28
+ gsus: int
29
+
30
+
17
31
  class CategoryResourceResponse(BaseModel):
32
+ active: bool
33
+
18
34
  category: str
19
35
 
20
36
  proxy_allowed: bool
@@ -27,12 +43,24 @@ class CategoryResourceResponse(BaseModel):
27
43
 
28
44
  units: Dict[str, Units]
29
45
 
46
+ aliased_resource: Optional[str] = None
47
+
48
+ aws_bedrock_resource: Optional[AwsBedrockResource] = None
49
+
50
+ azure_resource: Optional[AzureResource] = None
51
+
30
52
  character_billing: Optional[bool] = None
31
53
 
32
54
  cost_per_hour: Optional[float] = None
33
55
 
34
56
  deprecated_timestamp: Optional[datetime] = None
35
57
 
58
+ description: Optional[str] = None
59
+
60
+ end_timestamp: Optional[datetime] = None
61
+
62
+ google_vertex_resource: Optional[GoogleVertexResource] = None
63
+
36
64
  large_context_threshold: Optional[int] = None
37
65
 
38
66
  max_input_units: Optional[int] = None
@@ -40,3 +68,5 @@ class CategoryResourceResponse(BaseModel):
40
68
  max_output_units: Optional[int] = None
41
69
 
42
70
  max_total_units: Optional[int] = None
71
+
72
+ reservation_id: Optional[str] = None
@@ -35,7 +35,7 @@ class IngestEventParam(TypedDict, total=False):
35
35
 
36
36
  limit_ids: Optional[SequenceNotStr[str]]
37
37
 
38
- properties: Optional[Dict[str, str]]
38
+ properties: Optional[Dict[str, Optional[str]]]
39
39
 
40
40
  provider_request_headers: Optional[Iterable[PayICommonModelsAPIRouterHeaderInfoParam]]
41
41
 
@@ -65,7 +65,7 @@ class IngestEventParam(TypedDict, total=False):
65
65
 
66
66
  use_case_name: Optional[str]
67
67
 
68
- use_case_properties: Optional[Dict[str, str]]
68
+ use_case_properties: Optional[Dict[str, Optional[str]]]
69
69
 
70
70
  use_case_step: Optional[str]
71
71
 
@@ -25,7 +25,7 @@ class IngestUnitsParams(TypedDict, total=False):
25
25
 
26
26
  http_status_code: Optional[int]
27
27
 
28
- properties: Optional[Dict[str, str]]
28
+ properties: Optional[Dict[str, Optional[str]]]
29
29
 
30
30
  provider_request_headers: Optional[Iterable[PayICommonModelsAPIRouterHeaderInfoParam]]
31
31
 
@@ -49,7 +49,7 @@ class IngestUnitsParams(TypedDict, total=False):
49
49
 
50
50
  time_to_first_token_ms: Optional[int]
51
51
 
52
- use_case_properties: Optional[Dict[str, str]]
52
+ use_case_properties: Optional[Dict[str, Optional[str]]]
53
53
 
54
54
  limit_ids: Annotated[Union[list[str], None], PropertyInfo(alias="xProxy-Limit-IDs")]
55
55
 
@@ -2,11 +2,11 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- from typing import Dict
5
+ from typing import Dict, Optional
6
6
  from typing_extensions import Required, TypedDict
7
7
 
8
8
  __all__ = ["PropertyUpdateParams"]
9
9
 
10
10
 
11
11
  class PropertyUpdateParams(TypedDict, total=False):
12
- properties: Required[Dict[str, str]]
12
+ properties: Required[Dict[str, Optional[str]]]
@@ -2,7 +2,7 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- from typing import Dict
5
+ from typing import Dict, Optional
6
6
  from typing_extensions import Required, TypedDict
7
7
 
8
8
  __all__ = ["PropertyUpdateParams"]
@@ -11,4 +11,4 @@ __all__ = ["PropertyUpdateParams"]
11
11
  class PropertyUpdateParams(TypedDict, total=False):
12
12
  category: Required[str]
13
13
 
14
- properties: Required[Dict[str, str]]
14
+ properties: Required[Dict[str, Optional[str]]]
@@ -1,8 +1,10 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
+ from .api_error import APIError as APIError
3
4
  from .ingest_units import IngestUnits as IngestUnits
4
5
  from .xproxy_error import XproxyError as XproxyError
5
6
  from .xproxy_result import XproxyResult as XproxyResult
7
+ from .properties_request import PropertiesRequest as PropertiesRequest
6
8
  from .properties_response import PropertiesResponse as PropertiesResponse
7
9
  from .pay_i_common_models_budget_management_cost_details_base import (
8
10
  PayICommonModelsBudgetManagementCostDetailsBase as PayICommonModelsBudgetManagementCostDetailsBase,
@@ -0,0 +1,18 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import Optional
4
+
5
+ from pydantic import Field as FieldInfo
6
+
7
+ from ..._models import BaseModel
8
+ from .xproxy_error import XproxyError
9
+
10
+ __all__ = ["APIError"]
11
+
12
+
13
+ class APIError(BaseModel):
14
+ message: str
15
+
16
+ status_code: int = FieldInfo(alias="statusCode")
17
+
18
+ xproxy_error: Optional[XproxyError] = None
@@ -0,0 +1,11 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import Dict, Optional
4
+
5
+ from ..._models import BaseModel
6
+
7
+ __all__ = ["PropertiesRequest"]
8
+
9
+
10
+ class PropertiesRequest(BaseModel):
11
+ properties: Dict[str, Optional[str]]
@@ -32,6 +32,8 @@ class XproxyResult(BaseModel):
32
32
 
33
33
  cost: Optional[Cost] = None
34
34
 
35
+ duplicate_request: Optional[bool] = None
36
+
35
37
  limits: Optional[Dict[str, Limits]] = None
36
38
 
37
39
  request_id: Optional[str] = None
@@ -2,11 +2,11 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- from typing import Dict
5
+ from typing import Dict, Optional
6
6
  from typing_extensions import Required, TypedDict
7
7
 
8
8
  __all__ = ["PropertyUpdateParams"]
9
9
 
10
10
 
11
11
  class PropertyUpdateParams(TypedDict, total=False):
12
- properties: Required[Dict[str, str]]
12
+ properties: Required[Dict[str, Optional[str]]]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: payi
3
- Version: 0.1.0a126
3
+ Version: 0.1.0a127
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
@@ -11,7 +11,7 @@ payi/_resource.py,sha256=j2jIkTr8OIC8sU6-05nxSaCyj4MaFlbZrwlyg4_xJos,1088
11
11
  payi/_response.py,sha256=rh9oJAvCKcPwQFm4iqH_iVrmK8bNx--YP_A2a4kN1OU,28776
12
12
  payi/_streaming.py,sha256=Z_wIyo206T6Jqh2rolFg2VXZgX24PahLmpURp0-NssU,10092
13
13
  payi/_types.py,sha256=d6xrZDG6rG6opphTN7UVYdEOis3977LrQQgpNtklXZE,7234
14
- payi/_version.py,sha256=Q_d5ojHOSTeTtbTlwPmPpab5qD4yxOTyShC1FSrNwdk,166
14
+ payi/_version.py,sha256=wVEPIEAd5nV4wAk7wELHnLr7Wt_AzCgJEAnfj1KywsM,166
15
15
  payi/pagination.py,sha256=k2356QGPOUSjRF2vHpwLBdF6P-2vnQzFfRIJQAHGQ7A,1258
16
16
  payi/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
17
17
  payi/_utils/__init__.py,sha256=7fch0GT9zpNnErbciSpUNa-SjTxxjY6kxHxKMOM4AGs,2305
@@ -35,52 +35,51 @@ payi/lib/Stopwatch.py,sha256=7OJlxvr2Jyb6Zr1LYCYKczRB7rDVKkIR7gc4YoleNdE,764
35
35
  payi/lib/VertexInstrumentor.py,sha256=OWuMPiW4LdLhj6DSAAy5qZiosVo8DSAuFWGxYpEucoE,7431
36
36
  payi/lib/VertexRequest.py,sha256=42F7xCRYY6h3EMUZD1x4-_cwyAcVhnzT9M5zl4KwtE0,11801
37
37
  payi/lib/helpers.py,sha256=6c0RFMS0AYVIxU6q8ak1CDwMTwldIN7N2O2XkxTO7ag,4931
38
- payi/lib/instrument.py,sha256=eaDtiBx3cuCOB4Pxd1svEOEk6MykB_Dn3JaCJKl8Z6w,76473
38
+ payi/lib/instrument.py,sha256=CC3OqAEEltg2VWxcUhtXYeLivPpnyKb60fDwxj4KCsQ,76903
39
39
  payi/lib/version_helper.py,sha256=v0lC3kuaXn6PBDolE3mkmwJiA8Ot3z4RkVR7wlBuZCs,540
40
40
  payi/lib/data/cohere_embed_english_v3.json,sha256=YEWwjml3_i16cdsOx_7UKe6xpVFnxTEhP8T1n54R6gY,718306
41
41
  payi/resources/__init__.py,sha256=B2bn1ZfCf6TbHlzZvy5TpFPtALnFcBRPYVKQH3S5qfQ,2457
42
- payi/resources/ingest.py,sha256=Z8ZWZQW-4v-oGpHLZWRVHDMyyChchh-Hl-lJsn9CDZs,21294
43
- payi/resources/categories/__init__.py,sha256=WeotN_d-0Ri8ohsrNPbve7RyViD9_N0NA9DrV3WYg3w,1701
44
- payi/resources/categories/categories.py,sha256=H3Ld1gbb_L39HHHc65-MW7Ocn4hIw0O-jnOLtQVhtlo,20557
45
- payi/resources/categories/fixed_cost_resources.py,sha256=D0FCR20LDwSFc8eS5kU82j4v1ZhRDiNfU_3XQsMWFY8,7830
46
- payi/resources/categories/resources.py,sha256=qPa0DMxnKCsGVwBZkjCzT5x7j-fi3KSaDEOVjkq-a4w,19865
42
+ payi/resources/ingest.py,sha256=x09Tu4jj4zVYpjXv-JTA_LJGW25B8VuRnHd-ooRpQHE,21952
43
+ payi/resources/categories/__init__.py,sha256=w5gMiPdBSzJA_qfoVtFBElaoe8wGf_O63R7R1Spr6Gk,1093
44
+ payi/resources/categories/categories.py,sha256=aMSXiMWaYX4oLg1BcRGgktFbZWIkCXiFwu-u5V1Mdj4,19102
45
+ payi/resources/categories/resources.py,sha256=n3rAfpG7o3ripz-YC8fvQ_MXzoVERX8xEplLkHVN6V8,20021
47
46
  payi/resources/limits/__init__.py,sha256=URXh9vglDH-dqbVGk-XcrDa8H5Bg2pgFuVQQecgEtaA,976
48
47
  payi/resources/limits/limits.py,sha256=FxvtOKjFIrmyPLGukjhXoQ-chHWjXLed4i3WHYGPMIU,25040
49
48
  payi/resources/limits/tags.py,sha256=M3V9IVUliD9G48dvnv8MPMDKdI2_bpW6blKSFDtlAEQ,19015
50
49
  payi/resources/requests/__init__.py,sha256=L86SkNRyb9oySva7oQu6rMwBRUnctb4grtDSRN3T9_g,1571
51
50
  payi/resources/requests/requests.py,sha256=Mkyy-Iv7dZ-uKLMBm4eZdwHwm4ZKdF6O7W9QY53YcTo,4972
52
51
  payi/resources/requests/request_id/__init__.py,sha256=DMatPoq_k3AF_qutMg7_HjGfup6Z90YQarTiKuUQhZc,1544
53
- payi/resources/requests/request_id/properties.py,sha256=jWyYWNe85ajUCtl1_xChn4QrajJTOUmMCJ6f5v2jPL4,6465
52
+ payi/resources/requests/request_id/properties.py,sha256=huUnbg4N9uF4zl6a6ay_c36fDT_02txpVIGQXJPVN54,6495
54
53
  payi/resources/requests/request_id/request_id.py,sha256=TiZq8OvUPm8RHgOhnkt4VpUjYczi-7z4-ZT7im3nhj8,4902
55
54
  payi/resources/requests/request_id/result.py,sha256=uKJGqBmUrfKgNDCV6NJ5K14yMBuTNAaPqYpGTbzrvJ4,5838
56
55
  payi/resources/requests/response_id/__init__.py,sha256=Cg0v31KBriuwMO0r_4DguinMbOw80ALAYlFaMET4fdY,1557
57
- payi/resources/requests/response_id/properties.py,sha256=d8NxBqmaeQtn7M0sQ85XxF8RxT1m0_dRYnjEdNNtmSc,6964
56
+ payi/resources/requests/response_id/properties.py,sha256=m8uNNCWtp2cDYxzvsBu5tNv4GabDnPJ3sVxNKbuMhYo,6994
58
57
  payi/resources/requests/response_id/response_id.py,sha256=PR2bLNJdMlgt3qjLBtnpyXrydZVd8dFUvRLC3W5WcJk,4942
59
58
  payi/resources/requests/response_id/result.py,sha256=lEg3ufP4xAZ6wm0bXgcOMlcu8kA08F7koEtcqYQ7lFU,6336
60
59
  payi/resources/use_cases/__init__.py,sha256=ckXPaVoPQmGESfgQF_ySP_eGskI6T4bJjPKoEGyo2gI,2020
61
60
  payi/resources/use_cases/kpis.py,sha256=8zVh8t0-s-FkheNtDkvRwUlor_Pu2dbzlb77nUzhE5E,11043
62
- payi/resources/use_cases/properties.py,sha256=lFFssdc_qU2TCl0JhI8qNzEkHkJV9qQ3EXklhbny3ec,6528
61
+ payi/resources/use_cases/properties.py,sha256=r5cscOulIsJtNRomd3ILSrsq9GjpUEkeH2iXcmsjETc,6558
63
62
  payi/resources/use_cases/use_cases.py,sha256=VKOfN53jMqYgfabFaboOGwSXE1FDIuwHlD9jJa6zRAo,15582
64
63
  payi/resources/use_cases/definitions/__init__.py,sha256=pImtiVUbgsm6PkMJ0NPkrhQj8kEi36db-LF5rJukmMY,2020
65
64
  payi/resources/use_cases/definitions/definitions.py,sha256=QgpsAQdf4LsJjB4sLNG9rxLD1z0ThmBoQcgJHUE6Ggw,24410
66
65
  payi/resources/use_cases/definitions/kpis.py,sha256=Dytw3XOsmmxjp1UO6To4aiumbXBuPptENkDEDX4SGhM,22490
67
66
  payi/resources/use_cases/definitions/limit_config.py,sha256=OTOQmTbb7YaAeDg5YOtde-aCYzbdYZgqu0GCpbk4fZA,10571
68
67
  payi/resources/use_cases/definitions/version.py,sha256=fb4n_UJrCT_8SRlBbN9j0ymkkeOCvDS2I08KQXmWGfg,6013
69
- payi/types/__init__.py,sha256=16tyUhSSlJzmqKVog8WuMdJzRQn8U5oZ3u2hK-K9GoI,2459
70
- payi/types/bulk_ingest_response.py,sha256=BN6UUzNqICkSzbT0ucu2swznLpErmEN_kgWORCb2rwE,1211
68
+ payi/types/__init__.py,sha256=ec6dizDu-5dCRqVmMCo5gCtVRRXfQKkF6OSDWe8J_Ds,2529
69
+ payi/types/bulk_ingest_response.py,sha256=g-5AYEgEiVMRnZFR2pQt1azN8oW2Ca1V7F_iKJZazdQ,609
71
70
  payi/types/category_delete_resource_response.py,sha256=PLz4wZA1XMpS9SUYB_j4hEw5EoZ0VVE9Ll-MQ26SAfc,339
72
71
  payi/types/category_delete_response.py,sha256=exq8rNDGoq2-YN528V8osdcmuptJ-k63rmCvPMm6hLA,323
73
72
  payi/types/category_list_params.py,sha256=hHe6LRxl8CGykRj4F4-eW_z5d5PxP3YzY0m7qtiM5jY,307
74
73
  payi/types/category_list_resources_params.py,sha256=Od65gihJCHdJWti1jdjUMp5l0vOvZb1PR50v9IQ4Mkk,325
75
- payi/types/category_resource_response.py,sha256=izvwIS0w21PAmxIF5CcOZst1S3JZ9ghvDIbD-NLRT5I,853
74
+ payi/types/category_resource_response.py,sha256=te8e05MirXmcXmCwsT7DgP71yiKgGSDzNZWTDyQ3x9Y,1528
76
75
  payi/types/category_response.py,sha256=dlvHaKJlcGm936aduRIMxJXHapPGo4Rfs9ObIYkP4Yc,206
77
76
  payi/types/cost_data.py,sha256=KXGLnqOKxS0q8yT9eRhdQHyGMSAcuukCHWcWZC1A6Fk,487
78
77
  payi/types/cost_details.py,sha256=3ldvnYILAG6Sz9wGWMs1SZvIfdGEbn5i4-CauWEXMPA,265
79
78
  payi/types/default_response.py,sha256=o617LpRsCIZHCZxAc5nVI2JQ3HPGZo4gCDvSDkxkIJ8,270
80
79
  payi/types/ingest_bulk_params.py,sha256=A-IRb39d2tmVzEQqrvhlF_3si-9ufHBKYLlvdXupAHU,362
81
- payi/types/ingest_event_param.py,sha256=2jbVdyTfAgeJ9A2kLF48nLwb0d7pPvY5Xt5ZvIiKMQU,1985
80
+ payi/types/ingest_event_param.py,sha256=FV9fAfba3961CEVE4gN1zt4w2jecvl79qSDK5-FQ22s,2005
82
81
  payi/types/ingest_response.py,sha256=JwcZ6OL793uXTuDmZAzkzhGcdtDsSXfSy_ERjzc7MZY,378
83
- payi/types/ingest_units_params.py,sha256=5HUvyBkmVOptY3i5jLTrqHzVvg-GoZdUGSBvIPCc94I,2566
82
+ payi/types/ingest_units_params.py,sha256=IGiInZBrw7zY_K652lvZys73aIQnRu14FBDZ6ihq3bQ,2586
84
83
  payi/types/limit_create_params.py,sha256=q6kIEcRLde0b5-tsoeaLcBNPyIAwXoVsUZnDXjEoZio,538
85
84
  payi/types/limit_history_response.py,sha256=vJnVVa5BROfYHRPvpfymcOabjDhcJtFowQF-L-apNgw,770
86
85
  payi/types/limit_list_params.py,sha256=OYlK0anDA5G71FfwrMDzhEX4S5AlASLRiR0tmyD9tTU,322
@@ -93,10 +92,9 @@ payi/types/request_result.py,sha256=mD0akFmhrAqCFZwo-ampDuBH7cK5Y6GOmQm7vT-WIwE,
93
92
  payi/types/requests_data.py,sha256=coHpXgOIQv8oKaX354G-uYoJMzbJcjIW1oX1wuQppts,307
94
93
  payi/types/total_cost_data.py,sha256=1xoiInVI0UaKup_8poAHNgcpK8gu09RQnMrdorQtFgQ,301
95
94
  payi/types/use_case_instance_response.py,sha256=khdcmoU1L8djNVYLu4rSmWkaceZmGwkE9eHLedN1ePU,328
96
- payi/types/categories/__init__.py,sha256=mpdvOCRgkzQgIqgcb30nvunzZFqMrDOAoa_N0MJZouE,389
97
- payi/types/categories/fixed_cost_resource_create_params.py,sha256=heFcV8Mqw2zdxWrqOAYq7Rm3sbovcoRhnM7zhfjfxK4,608
95
+ payi/types/categories/__init__.py,sha256=hlu-e4w8iudVia3FayAnlNefJ3kNHFeGvpN0-_DUDrU,279
98
96
  payi/types/categories/resource_create_params.py,sha256=HVzUWhvmUhVu9h70DmUrBPUcO-g2VUIc5cg0sxbG3fs,745
99
- payi/types/categories/resource_list_params.py,sha256=vHKNPb3RVbg25-0g6yN-LXoNKlkYlnZb47hxlTuizUw,346
97
+ payi/types/categories/resource_list_params.py,sha256=Odl3nWHPyJuOhzSseypyOGZhw1T1fgnW1Fk4oyn9qkg,452
100
98
  payi/types/limits/__init__.py,sha256=yohSla0l53OaxH9WdwaU1crY1FvzM3H6IRg20LUr-MU,722
101
99
  payi/types/limits/limit_tags.py,sha256=O9I9IC7IkFBYRbiUWb4XXmIuXoHUlRLjW_4fbEF50Aw,346
102
100
  payi/types/limits/tag_create_params.py,sha256=USZzGNg3hHO8itcio9nCoE3BzF5DEeE6iuq6xh6Krqc,366
@@ -109,17 +107,19 @@ payi/types/limits/tag_update_params.py,sha256=xSmnOllFClguwTQ7FzHmuJiR4y339MlgpP
109
107
  payi/types/limits/tag_update_response.py,sha256=xLa4aU4eVhNmIaQTsCyEDjx1vatBACFiJCwZOWLfrig,267
110
108
  payi/types/requests/__init__.py,sha256=OKfJYcKb4NObdiRObqJV_dOyDQ8feXekDUge2o_4pXQ,122
111
109
  payi/types/requests/request_id/__init__.py,sha256=mWsqHCigEDLIrgH0MlIc2KV3j1npHcb-QyGy4Tvu5p0,204
112
- payi/types/requests/request_id/property_update_params.py,sha256=Um7m9FvIFJXkqIBH3ZMqMLSRnZZkNqA9AUHL8S3Pmo8,328
110
+ payi/types/requests/request_id/property_update_params.py,sha256=nWa3NRZS_3xDCFHehyX9OhQ7noDRvuD_J-SYvRacUus,348
113
111
  payi/types/requests/response_id/__init__.py,sha256=mWsqHCigEDLIrgH0MlIc2KV3j1npHcb-QyGy4Tvu5p0,204
114
- payi/types/requests/response_id/property_update_params.py,sha256=4rkEtCPIWqltMq-bmI4T5aIkGpWMvY_rwQ0VGDGXT4w,357
115
- payi/types/shared/__init__.py,sha256=K1oWaPn8Cyqq57HDPYZWWQae3HCgvNxg_mPs0Al7Ae8,677
112
+ payi/types/requests/response_id/property_update_params.py,sha256=_PejxT6yCTjZTQX7hxZ-jzJujWAaGO8OzdE8o8bLGoo,377
113
+ payi/types/shared/__init__.py,sha256=vflQVg5Wm1QtlR5V5IlywvJooncyo3EXN3J1MtJEXlY,792
114
+ payi/types/shared/api_error.py,sha256=LLPNrPR5HhTPg4Yvi9DGl5QV0pfn7SV8eDrDdBvWUY0,400
116
115
  payi/types/shared/evaluation_response.py,sha256=ejEToMA57PUu1SldEtJ5z9r4fAO3U0tvdjbsyIoVX1s,214
117
116
  payi/types/shared/ingest_units.py,sha256=lehu0ICBECr-v0tF-HB-rRh0LoKGZh2D_Z2pVxD9cqA,274
118
117
  payi/types/shared/pay_i_common_models_budget_management_cost_details_base.py,sha256=o8Szm4uiTnyZuW7D4rM5rzAAj6iAeSOA5gVMlMYfpmc,267
119
118
  payi/types/shared/pay_i_common_models_budget_management_create_limit_base.py,sha256=FDFCOvxG7Dep7oELqQATc_YWrRZ-Uh9WOpL2ZKPDQ6Q,482
119
+ payi/types/shared/properties_request.py,sha256=EeKHCy20XThmzLozH55_WId7jFvsn8enzSjyI1sJTZw,267
120
120
  payi/types/shared/properties_response.py,sha256=HpFNtxl_OjoMCs24xPVZLKe3FwCVcNkcRs0LsQKLrHM,259
121
121
  payi/types/shared/xproxy_error.py,sha256=I8dsEHZF_0dM-1YvZ6_mysRJuNlWJrQIHacs9yRaZCM,274
122
- payi/types/shared/xproxy_result.py,sha256=Q9DfH8vfZ7NU0d9nUKDTFeLWorZ83oICbbdJsKgTsBM,1382
122
+ payi/types/shared/xproxy_result.py,sha256=gVIHPAgcmwOYJizXHCru8LJ1yxixPv3sL9T_3-86yI4,1428
123
123
  payi/types/shared_params/__init__.py,sha256=dRGuNTZWLagRlbQfl5tKc0JMEYNRVXUad5oyl7IFeIU,317
124
124
  payi/types/shared_params/ingest_units.py,sha256=ueGIq14EQRGIDQlIHCCParrDxh1TZ_Hjfx2GP3_19yA,267
125
125
  payi/types/shared_params/pay_i_common_models_budget_management_create_limit_base.py,sha256=LRDd9ORvHlVpe2a_5iDPl_7-WMxeYci11tCCpZ8NgOU,539
@@ -130,7 +130,7 @@ payi/types/use_cases/definition_update_params.py,sha256=nRhHHVUvEFYr_dtAESZcyxZN
130
130
  payi/types/use_cases/kpi_list_params.py,sha256=lx8rGm1Ri9Qn7EsIhwb07-HLHbV1BWc904sJkmPhodI,316
131
131
  payi/types/use_cases/kpi_list_response.py,sha256=6REE5-V5j2dxAOX6ShDpXTGvYAT6xIl4X1WBAx0apSY,561
132
132
  payi/types/use_cases/kpi_update_params.py,sha256=TZvwDtS5VtngTnAR0bPPVoy8UD3YxjCVl5CEthPoYqc,346
133
- payi/types/use_cases/property_update_params.py,sha256=Um7m9FvIFJXkqIBH3ZMqMLSRnZZkNqA9AUHL8S3Pmo8,328
133
+ payi/types/use_cases/property_update_params.py,sha256=nWa3NRZS_3xDCFHehyX9OhQ7noDRvuD_J-SYvRacUus,348
134
134
  payi/types/use_cases/use_case_definition.py,sha256=R2DMV9t1EZ4pStQhZSul8SFCyfqqQuAUoevlkFOg2Mc,579
135
135
  payi/types/use_cases/definitions/__init__.py,sha256=xro0oPNhbIPOYx-6fvAINvaHL0kaCUMbALzrZmLeuwA,766
136
136
  payi/types/use_cases/definitions/kpi_create_params.py,sha256=09jkxFxXJzguEJ3MxCwaa8X5_WcsUCjnWk3al6OJ_vM,447
@@ -142,7 +142,7 @@ payi/types/use_cases/definitions/kpi_retrieve_response.py,sha256=uQXliSvS3k-yDYw
142
142
  payi/types/use_cases/definitions/kpi_update_params.py,sha256=jbawdWAdMnsTWVH0qfQGb8W7_TXe3lq4zjSRu44d8p8,373
143
143
  payi/types/use_cases/definitions/kpi_update_response.py,sha256=zLyEoT0S8d7XHsnXZYT8tM7yDw0Aze0Mk-_Z6QeMtc8,459
144
144
  payi/types/use_cases/definitions/limit_config_create_params.py,sha256=sodtLT84tBmuO_0d-h0CZWCh4vWojJMtUbMjBmEN3IE,492
145
- payi-0.1.0a126.dist-info/METADATA,sha256=HMMB7v-Q7WLRb5x3j2T4MUUB-dI5WtH6Ne0_J1w0ukQ,16324
146
- payi-0.1.0a126.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
147
- payi-0.1.0a126.dist-info/licenses/LICENSE,sha256=CQt03aM-P4a3Yg5qBg3JSLVoQS3smMyvx7tYg_6V7Gk,11334
148
- payi-0.1.0a126.dist-info/RECORD,,
145
+ payi-0.1.0a127.dist-info/METADATA,sha256=xMCqsthmMBTH7KwiZhJ9mDsfLR0v5m2obxMuNWX8Oeg,16324
146
+ payi-0.1.0a127.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
147
+ payi-0.1.0a127.dist-info/licenses/LICENSE,sha256=CQt03aM-P4a3Yg5qBg3JSLVoQS3smMyvx7tYg_6V7Gk,11334
148
+ payi-0.1.0a127.dist-info/RECORD,,
@@ -1,196 +0,0 @@
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 Union
6
- from datetime import datetime
7
-
8
- import httpx
9
-
10
- from ..._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
11
- from ..._utils import maybe_transform, async_maybe_transform
12
- from ..._compat import cached_property
13
- from ..._resource import SyncAPIResource, AsyncAPIResource
14
- from ..._response import (
15
- to_raw_response_wrapper,
16
- to_streamed_response_wrapper,
17
- async_to_raw_response_wrapper,
18
- async_to_streamed_response_wrapper,
19
- )
20
- from ..._base_client import make_request_options
21
- from ...types.categories import fixed_cost_resource_create_params
22
- from ...types.category_resource_response import CategoryResourceResponse
23
-
24
- __all__ = ["FixedCostResourcesResource", "AsyncFixedCostResourcesResource"]
25
-
26
-
27
- class FixedCostResourcesResource(SyncAPIResource):
28
- @cached_property
29
- def with_raw_response(self) -> FixedCostResourcesResourceWithRawResponse:
30
- """
31
- This property can be used as a prefix for any HTTP method call to return
32
- the raw response object instead of the parsed content.
33
-
34
- For more information, see https://www.github.com/Pay-i/pay-i-python#accessing-raw-response-data-eg-headers
35
- """
36
- return FixedCostResourcesResourceWithRawResponse(self)
37
-
38
- @cached_property
39
- def with_streaming_response(self) -> FixedCostResourcesResourceWithStreamingResponse:
40
- """
41
- An alternative to `.with_raw_response` that doesn't eagerly read the response body.
42
-
43
- For more information, see https://www.github.com/Pay-i/pay-i-python#with_streaming_response
44
- """
45
- return FixedCostResourcesResourceWithStreamingResponse(self)
46
-
47
- def create(
48
- self,
49
- resource: str,
50
- *,
51
- category: str,
52
- units: SequenceNotStr[str],
53
- cost_per_hour: float | Omit = omit,
54
- start_timestamp: Union[str, datetime, None] | Omit = omit,
55
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
56
- # The extra values given here take precedence over values defined on the client or passed to this method.
57
- extra_headers: Headers | None = None,
58
- extra_query: Query | None = None,
59
- extra_body: Body | None = None,
60
- timeout: float | httpx.Timeout | None | NotGiven = not_given,
61
- ) -> CategoryResourceResponse:
62
- """
63
- Create a fixed cost resource
64
-
65
- Args:
66
- extra_headers: Send extra headers
67
-
68
- extra_query: Add additional query parameters to the request
69
-
70
- extra_body: Add additional JSON properties to the request
71
-
72
- timeout: Override the client-level default timeout for this request, in seconds
73
- """
74
- if not category:
75
- raise ValueError(f"Expected a non-empty value for `category` but received {category!r}")
76
- if not resource:
77
- raise ValueError(f"Expected a non-empty value for `resource` but received {resource!r}")
78
- return self._post(
79
- f"/api/v1/categories/{category}/fixed_cost_resources/{resource}",
80
- body=maybe_transform(
81
- {
82
- "units": units,
83
- "cost_per_hour": cost_per_hour,
84
- "start_timestamp": start_timestamp,
85
- },
86
- fixed_cost_resource_create_params.FixedCostResourceCreateParams,
87
- ),
88
- options=make_request_options(
89
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
90
- ),
91
- cast_to=CategoryResourceResponse,
92
- )
93
-
94
-
95
- class AsyncFixedCostResourcesResource(AsyncAPIResource):
96
- @cached_property
97
- def with_raw_response(self) -> AsyncFixedCostResourcesResourceWithRawResponse:
98
- """
99
- This property can be used as a prefix for any HTTP method call to return
100
- the raw response object instead of the parsed content.
101
-
102
- For more information, see https://www.github.com/Pay-i/pay-i-python#accessing-raw-response-data-eg-headers
103
- """
104
- return AsyncFixedCostResourcesResourceWithRawResponse(self)
105
-
106
- @cached_property
107
- def with_streaming_response(self) -> AsyncFixedCostResourcesResourceWithStreamingResponse:
108
- """
109
- An alternative to `.with_raw_response` that doesn't eagerly read the response body.
110
-
111
- For more information, see https://www.github.com/Pay-i/pay-i-python#with_streaming_response
112
- """
113
- return AsyncFixedCostResourcesResourceWithStreamingResponse(self)
114
-
115
- async def create(
116
- self,
117
- resource: str,
118
- *,
119
- category: str,
120
- units: SequenceNotStr[str],
121
- cost_per_hour: float | Omit = omit,
122
- start_timestamp: Union[str, datetime, None] | Omit = omit,
123
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
124
- # The extra values given here take precedence over values defined on the client or passed to this method.
125
- extra_headers: Headers | None = None,
126
- extra_query: Query | None = None,
127
- extra_body: Body | None = None,
128
- timeout: float | httpx.Timeout | None | NotGiven = not_given,
129
- ) -> CategoryResourceResponse:
130
- """
131
- Create a fixed cost resource
132
-
133
- Args:
134
- extra_headers: Send extra headers
135
-
136
- extra_query: Add additional query parameters to the request
137
-
138
- extra_body: Add additional JSON properties to the request
139
-
140
- timeout: Override the client-level default timeout for this request, in seconds
141
- """
142
- if not category:
143
- raise ValueError(f"Expected a non-empty value for `category` but received {category!r}")
144
- if not resource:
145
- raise ValueError(f"Expected a non-empty value for `resource` but received {resource!r}")
146
- return await self._post(
147
- f"/api/v1/categories/{category}/fixed_cost_resources/{resource}",
148
- body=await async_maybe_transform(
149
- {
150
- "units": units,
151
- "cost_per_hour": cost_per_hour,
152
- "start_timestamp": start_timestamp,
153
- },
154
- fixed_cost_resource_create_params.FixedCostResourceCreateParams,
155
- ),
156
- options=make_request_options(
157
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
158
- ),
159
- cast_to=CategoryResourceResponse,
160
- )
161
-
162
-
163
- class FixedCostResourcesResourceWithRawResponse:
164
- def __init__(self, fixed_cost_resources: FixedCostResourcesResource) -> None:
165
- self._fixed_cost_resources = fixed_cost_resources
166
-
167
- self.create = to_raw_response_wrapper(
168
- fixed_cost_resources.create,
169
- )
170
-
171
-
172
- class AsyncFixedCostResourcesResourceWithRawResponse:
173
- def __init__(self, fixed_cost_resources: AsyncFixedCostResourcesResource) -> None:
174
- self._fixed_cost_resources = fixed_cost_resources
175
-
176
- self.create = async_to_raw_response_wrapper(
177
- fixed_cost_resources.create,
178
- )
179
-
180
-
181
- class FixedCostResourcesResourceWithStreamingResponse:
182
- def __init__(self, fixed_cost_resources: FixedCostResourcesResource) -> None:
183
- self._fixed_cost_resources = fixed_cost_resources
184
-
185
- self.create = to_streamed_response_wrapper(
186
- fixed_cost_resources.create,
187
- )
188
-
189
-
190
- class AsyncFixedCostResourcesResourceWithStreamingResponse:
191
- def __init__(self, fixed_cost_resources: AsyncFixedCostResourcesResource) -> None:
192
- self._fixed_cost_resources = fixed_cost_resources
193
-
194
- self.create = async_to_streamed_response_wrapper(
195
- fixed_cost_resources.create,
196
- )
@@ -1,22 +0,0 @@
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 Union
6
- from datetime import datetime
7
- from typing_extensions import Required, Annotated, TypedDict
8
-
9
- from ..._types import SequenceNotStr
10
- from ..._utils import PropertyInfo
11
-
12
- __all__ = ["FixedCostResourceCreateParams"]
13
-
14
-
15
- class FixedCostResourceCreateParams(TypedDict, total=False):
16
- category: Required[str]
17
-
18
- units: Required[SequenceNotStr[str]]
19
-
20
- cost_per_hour: float
21
-
22
- start_timestamp: Annotated[Union[str, datetime, None], PropertyInfo(format="iso8601")]