payi 0.1.0a110__py3-none-any.whl → 0.1.0a137__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.
- payi/__init__.py +3 -1
- payi/_base_client.py +12 -12
- payi/_client.py +8 -8
- payi/_compat.py +48 -48
- payi/_models.py +87 -59
- payi/_qs.py +7 -7
- payi/_streaming.py +4 -6
- payi/_types.py +53 -12
- payi/_utils/__init__.py +9 -2
- payi/_utils/_compat.py +45 -0
- payi/_utils/_datetime_parse.py +136 -0
- payi/_utils/_sync.py +3 -31
- payi/_utils/_transform.py +13 -3
- payi/_utils/_typing.py +6 -1
- payi/_utils/_utils.py +5 -6
- payi/_version.py +1 -1
- payi/lib/AnthropicInstrumentor.py +83 -57
- payi/lib/BedrockInstrumentor.py +292 -57
- payi/lib/GoogleGenAiInstrumentor.py +18 -31
- payi/lib/OpenAIInstrumentor.py +56 -72
- payi/lib/ProviderRequest.py +216 -0
- payi/lib/StreamWrappers.py +379 -0
- payi/lib/VertexInstrumentor.py +18 -37
- payi/lib/VertexRequest.py +16 -2
- payi/lib/data/cohere_embed_english_v3.json +30706 -0
- payi/lib/helpers.py +53 -1
- payi/lib/instrument.py +404 -668
- payi/resources/categories/__init__.py +0 -14
- payi/resources/categories/categories.py +25 -53
- payi/resources/categories/resources.py +27 -23
- payi/resources/ingest.py +126 -132
- payi/resources/limits/__init__.py +14 -14
- payi/resources/limits/limits.py +58 -58
- payi/resources/limits/properties.py +171 -0
- payi/resources/requests/request_id/properties.py +8 -8
- payi/resources/requests/request_id/result.py +3 -3
- payi/resources/requests/response_id/properties.py +8 -8
- payi/resources/requests/response_id/result.py +3 -3
- payi/resources/use_cases/definitions/definitions.py +27 -27
- payi/resources/use_cases/definitions/kpis.py +23 -23
- payi/resources/use_cases/definitions/limit_config.py +14 -14
- payi/resources/use_cases/definitions/version.py +3 -3
- payi/resources/use_cases/kpis.py +15 -15
- payi/resources/use_cases/properties.py +6 -6
- payi/resources/use_cases/use_cases.py +7 -7
- payi/types/__init__.py +2 -0
- payi/types/bulk_ingest_response.py +3 -20
- payi/types/categories/__init__.py +0 -1
- payi/types/categories/resource_list_params.py +5 -1
- payi/types/category_list_resources_params.py +5 -1
- payi/types/category_resource_response.py +31 -1
- payi/types/ingest_event_param.py +7 -6
- payi/types/ingest_units_params.py +5 -4
- payi/types/limit_create_params.py +3 -3
- payi/types/limit_list_response.py +1 -3
- payi/types/limit_response.py +1 -3
- payi/types/limits/__init__.py +2 -9
- payi/types/limits/{tag_remove_params.py → property_update_params.py} +4 -5
- payi/types/limits/{tag_delete_response.py → property_update_response.py} +3 -3
- payi/types/requests/request_id/property_update_params.py +2 -2
- payi/types/requests/response_id/property_update_params.py +2 -2
- payi/types/shared/__init__.py +2 -0
- payi/types/shared/api_error.py +18 -0
- payi/types/shared/pay_i_common_models_budget_management_create_limit_base.py +3 -3
- payi/types/shared/properties_request.py +11 -0
- payi/types/shared/xproxy_result.py +2 -0
- payi/types/shared_params/pay_i_common_models_budget_management_create_limit_base.py +3 -3
- payi/types/use_cases/definitions/limit_config_create_params.py +3 -3
- payi/types/use_cases/property_update_params.py +2 -2
- {payi-0.1.0a110.dist-info → payi-0.1.0a137.dist-info}/METADATA +6 -6
- {payi-0.1.0a110.dist-info → payi-0.1.0a137.dist-info}/RECORD +73 -75
- payi/resources/categories/fixed_cost_resources.py +0 -196
- payi/resources/limits/tags.py +0 -507
- payi/types/categories/fixed_cost_resource_create_params.py +0 -21
- payi/types/limits/limit_tags.py +0 -16
- payi/types/limits/tag_create_params.py +0 -13
- payi/types/limits/tag_create_response.py +0 -10
- payi/types/limits/tag_list_response.py +0 -10
- payi/types/limits/tag_remove_response.py +0 -10
- payi/types/limits/tag_update_params.py +0 -13
- payi/types/limits/tag_update_response.py +0 -10
- {payi-0.1.0a110.dist-info → payi-0.1.0a137.dist-info}/WHEEL +0 -0
- {payi-0.1.0a110.dist-info → payi-0.1.0a137.dist-info}/licenses/LICENSE +0 -0
|
@@ -22,7 +22,7 @@ from .version import (
|
|
|
22
22
|
VersionResourceWithStreamingResponse,
|
|
23
23
|
AsyncVersionResourceWithStreamingResponse,
|
|
24
24
|
)
|
|
25
|
-
from ...._types import
|
|
25
|
+
from ...._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
|
|
26
26
|
from ...._utils import maybe_transform, async_maybe_transform
|
|
27
27
|
from ...._compat import cached_property
|
|
28
28
|
from ...._resource import SyncAPIResource, AsyncAPIResource
|
|
@@ -88,14 +88,14 @@ class DefinitionsResource(SyncAPIResource):
|
|
|
88
88
|
*,
|
|
89
89
|
description: str,
|
|
90
90
|
name: str,
|
|
91
|
-
limit_config: PayICommonModelsBudgetManagementCreateLimitBase |
|
|
92
|
-
logging_enabled: Optional[bool] |
|
|
91
|
+
limit_config: PayICommonModelsBudgetManagementCreateLimitBase | Omit = omit,
|
|
92
|
+
logging_enabled: Optional[bool] | Omit = omit,
|
|
93
93
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
94
94
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
95
95
|
extra_headers: Headers | None = None,
|
|
96
96
|
extra_query: Query | None = None,
|
|
97
97
|
extra_body: Body | None = None,
|
|
98
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
98
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
99
99
|
) -> UseCaseDefinition:
|
|
100
100
|
"""
|
|
101
101
|
Create a new Use Case
|
|
@@ -135,7 +135,7 @@ class DefinitionsResource(SyncAPIResource):
|
|
|
135
135
|
extra_headers: Headers | None = None,
|
|
136
136
|
extra_query: Query | None = None,
|
|
137
137
|
extra_body: Body | None = None,
|
|
138
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
138
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
139
139
|
) -> UseCaseDefinition:
|
|
140
140
|
"""
|
|
141
141
|
Get Use Case details
|
|
@@ -163,14 +163,14 @@ class DefinitionsResource(SyncAPIResource):
|
|
|
163
163
|
self,
|
|
164
164
|
use_case_name: str,
|
|
165
165
|
*,
|
|
166
|
-
description: Optional[str] |
|
|
167
|
-
logging_enabled: Optional[bool] |
|
|
166
|
+
description: Optional[str] | Omit = omit,
|
|
167
|
+
logging_enabled: Optional[bool] | Omit = omit,
|
|
168
168
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
169
169
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
170
170
|
extra_headers: Headers | None = None,
|
|
171
171
|
extra_query: Query | None = None,
|
|
172
172
|
extra_body: Body | None = None,
|
|
173
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
173
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
174
174
|
) -> UseCaseDefinition:
|
|
175
175
|
"""
|
|
176
176
|
Update a Use Case definition
|
|
@@ -204,16 +204,16 @@ class DefinitionsResource(SyncAPIResource):
|
|
|
204
204
|
def list(
|
|
205
205
|
self,
|
|
206
206
|
*,
|
|
207
|
-
cursor: str |
|
|
208
|
-
limit: int |
|
|
209
|
-
sort_ascending: bool |
|
|
210
|
-
use_case_name: str |
|
|
207
|
+
cursor: str | Omit = omit,
|
|
208
|
+
limit: int | Omit = omit,
|
|
209
|
+
sort_ascending: bool | Omit = omit,
|
|
210
|
+
use_case_name: str | Omit = omit,
|
|
211
211
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
212
212
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
213
213
|
extra_headers: Headers | None = None,
|
|
214
214
|
extra_query: Query | None = None,
|
|
215
215
|
extra_body: Body | None = None,
|
|
216
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
216
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
217
217
|
) -> SyncCursorPage[UseCaseDefinition]:
|
|
218
218
|
"""
|
|
219
219
|
Get all Use Cases
|
|
@@ -257,7 +257,7 @@ class DefinitionsResource(SyncAPIResource):
|
|
|
257
257
|
extra_headers: Headers | None = None,
|
|
258
258
|
extra_query: Query | None = None,
|
|
259
259
|
extra_body: Body | None = None,
|
|
260
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
260
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
261
261
|
) -> UseCaseDefinition:
|
|
262
262
|
"""
|
|
263
263
|
Delete a Use Case
|
|
@@ -319,14 +319,14 @@ class AsyncDefinitionsResource(AsyncAPIResource):
|
|
|
319
319
|
*,
|
|
320
320
|
description: str,
|
|
321
321
|
name: str,
|
|
322
|
-
limit_config: PayICommonModelsBudgetManagementCreateLimitBase |
|
|
323
|
-
logging_enabled: Optional[bool] |
|
|
322
|
+
limit_config: PayICommonModelsBudgetManagementCreateLimitBase | Omit = omit,
|
|
323
|
+
logging_enabled: Optional[bool] | Omit = omit,
|
|
324
324
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
325
325
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
326
326
|
extra_headers: Headers | None = None,
|
|
327
327
|
extra_query: Query | None = None,
|
|
328
328
|
extra_body: Body | None = None,
|
|
329
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
329
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
330
330
|
) -> UseCaseDefinition:
|
|
331
331
|
"""
|
|
332
332
|
Create a new Use Case
|
|
@@ -366,7 +366,7 @@ class AsyncDefinitionsResource(AsyncAPIResource):
|
|
|
366
366
|
extra_headers: Headers | None = None,
|
|
367
367
|
extra_query: Query | None = None,
|
|
368
368
|
extra_body: Body | None = None,
|
|
369
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
369
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
370
370
|
) -> UseCaseDefinition:
|
|
371
371
|
"""
|
|
372
372
|
Get Use Case details
|
|
@@ -394,14 +394,14 @@ class AsyncDefinitionsResource(AsyncAPIResource):
|
|
|
394
394
|
self,
|
|
395
395
|
use_case_name: str,
|
|
396
396
|
*,
|
|
397
|
-
description: Optional[str] |
|
|
398
|
-
logging_enabled: Optional[bool] |
|
|
397
|
+
description: Optional[str] | Omit = omit,
|
|
398
|
+
logging_enabled: Optional[bool] | Omit = omit,
|
|
399
399
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
400
400
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
401
401
|
extra_headers: Headers | None = None,
|
|
402
402
|
extra_query: Query | None = None,
|
|
403
403
|
extra_body: Body | None = None,
|
|
404
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
404
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
405
405
|
) -> UseCaseDefinition:
|
|
406
406
|
"""
|
|
407
407
|
Update a Use Case definition
|
|
@@ -435,16 +435,16 @@ class AsyncDefinitionsResource(AsyncAPIResource):
|
|
|
435
435
|
def list(
|
|
436
436
|
self,
|
|
437
437
|
*,
|
|
438
|
-
cursor: str |
|
|
439
|
-
limit: int |
|
|
440
|
-
sort_ascending: bool |
|
|
441
|
-
use_case_name: str |
|
|
438
|
+
cursor: str | Omit = omit,
|
|
439
|
+
limit: int | Omit = omit,
|
|
440
|
+
sort_ascending: bool | Omit = omit,
|
|
441
|
+
use_case_name: str | Omit = omit,
|
|
442
442
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
443
443
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
444
444
|
extra_headers: Headers | None = None,
|
|
445
445
|
extra_query: Query | None = None,
|
|
446
446
|
extra_body: Body | None = None,
|
|
447
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
447
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
448
448
|
) -> AsyncPaginator[UseCaseDefinition, AsyncCursorPage[UseCaseDefinition]]:
|
|
449
449
|
"""
|
|
450
450
|
Get all Use Cases
|
|
@@ -488,7 +488,7 @@ class AsyncDefinitionsResource(AsyncAPIResource):
|
|
|
488
488
|
extra_headers: Headers | None = None,
|
|
489
489
|
extra_query: Query | None = None,
|
|
490
490
|
extra_body: Body | None = None,
|
|
491
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
491
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
492
492
|
) -> UseCaseDefinition:
|
|
493
493
|
"""
|
|
494
494
|
Delete a Use Case
|
|
@@ -7,7 +7,7 @@ from typing_extensions import Literal
|
|
|
7
7
|
|
|
8
8
|
import httpx
|
|
9
9
|
|
|
10
|
-
from ...._types import
|
|
10
|
+
from ...._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
|
|
11
11
|
from ...._utils import maybe_transform, async_maybe_transform
|
|
12
12
|
from ...._compat import cached_property
|
|
13
13
|
from ...._resource import SyncAPIResource, AsyncAPIResource
|
|
@@ -62,7 +62,7 @@ class KpisResource(SyncAPIResource):
|
|
|
62
62
|
extra_headers: Headers | None = None,
|
|
63
63
|
extra_query: Query | None = None,
|
|
64
64
|
extra_body: Body | None = None,
|
|
65
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
65
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
66
66
|
) -> KpiCreateResponse:
|
|
67
67
|
"""
|
|
68
68
|
Create a new KPI definition for a Use Case
|
|
@@ -105,7 +105,7 @@ class KpisResource(SyncAPIResource):
|
|
|
105
105
|
extra_headers: Headers | None = None,
|
|
106
106
|
extra_query: Query | None = None,
|
|
107
107
|
extra_body: Body | None = None,
|
|
108
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
108
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
109
109
|
) -> KpiRetrieveResponse:
|
|
110
110
|
"""
|
|
111
111
|
Get a KPI definition for a Use Case
|
|
@@ -136,14 +136,14 @@ class KpisResource(SyncAPIResource):
|
|
|
136
136
|
kpi_name: str,
|
|
137
137
|
*,
|
|
138
138
|
use_case_name: str,
|
|
139
|
-
description: Optional[str] |
|
|
140
|
-
goal: Optional[float] |
|
|
139
|
+
description: Optional[str] | Omit = omit,
|
|
140
|
+
goal: Optional[float] | Omit = omit,
|
|
141
141
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
142
142
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
143
143
|
extra_headers: Headers | None = None,
|
|
144
144
|
extra_query: Query | None = None,
|
|
145
145
|
extra_body: Body | None = None,
|
|
146
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
146
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
147
147
|
) -> KpiUpdateResponse:
|
|
148
148
|
"""
|
|
149
149
|
Update a KPI definition for a Use Case
|
|
@@ -180,16 +180,16 @@ class KpisResource(SyncAPIResource):
|
|
|
180
180
|
self,
|
|
181
181
|
use_case_name: str,
|
|
182
182
|
*,
|
|
183
|
-
cursor: str |
|
|
184
|
-
kpi_name: str |
|
|
185
|
-
limit: int |
|
|
186
|
-
sort_ascending: bool |
|
|
183
|
+
cursor: str | Omit = omit,
|
|
184
|
+
kpi_name: str | Omit = omit,
|
|
185
|
+
limit: int | Omit = omit,
|
|
186
|
+
sort_ascending: bool | Omit = omit,
|
|
187
187
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
188
188
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
189
189
|
extra_headers: Headers | None = None,
|
|
190
190
|
extra_query: Query | None = None,
|
|
191
191
|
extra_body: Body | None = None,
|
|
192
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
192
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
193
193
|
) -> SyncCursorPage[KpiListResponse]:
|
|
194
194
|
"""
|
|
195
195
|
Get all KPIs for a Use Case
|
|
@@ -236,7 +236,7 @@ class KpisResource(SyncAPIResource):
|
|
|
236
236
|
extra_headers: Headers | None = None,
|
|
237
237
|
extra_query: Query | None = None,
|
|
238
238
|
extra_body: Body | None = None,
|
|
239
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
239
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
240
240
|
) -> KpiDeleteResponse:
|
|
241
241
|
"""
|
|
242
242
|
Delete a KPI definition for a Use Case
|
|
@@ -296,7 +296,7 @@ class AsyncKpisResource(AsyncAPIResource):
|
|
|
296
296
|
extra_headers: Headers | None = None,
|
|
297
297
|
extra_query: Query | None = None,
|
|
298
298
|
extra_body: Body | None = None,
|
|
299
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
299
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
300
300
|
) -> KpiCreateResponse:
|
|
301
301
|
"""
|
|
302
302
|
Create a new KPI definition for a Use Case
|
|
@@ -339,7 +339,7 @@ class AsyncKpisResource(AsyncAPIResource):
|
|
|
339
339
|
extra_headers: Headers | None = None,
|
|
340
340
|
extra_query: Query | None = None,
|
|
341
341
|
extra_body: Body | None = None,
|
|
342
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
342
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
343
343
|
) -> KpiRetrieveResponse:
|
|
344
344
|
"""
|
|
345
345
|
Get a KPI definition for a Use Case
|
|
@@ -370,14 +370,14 @@ class AsyncKpisResource(AsyncAPIResource):
|
|
|
370
370
|
kpi_name: str,
|
|
371
371
|
*,
|
|
372
372
|
use_case_name: str,
|
|
373
|
-
description: Optional[str] |
|
|
374
|
-
goal: Optional[float] |
|
|
373
|
+
description: Optional[str] | Omit = omit,
|
|
374
|
+
goal: Optional[float] | Omit = omit,
|
|
375
375
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
376
376
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
377
377
|
extra_headers: Headers | None = None,
|
|
378
378
|
extra_query: Query | None = None,
|
|
379
379
|
extra_body: Body | None = None,
|
|
380
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
380
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
381
381
|
) -> KpiUpdateResponse:
|
|
382
382
|
"""
|
|
383
383
|
Update a KPI definition for a Use Case
|
|
@@ -414,16 +414,16 @@ class AsyncKpisResource(AsyncAPIResource):
|
|
|
414
414
|
self,
|
|
415
415
|
use_case_name: str,
|
|
416
416
|
*,
|
|
417
|
-
cursor: str |
|
|
418
|
-
kpi_name: str |
|
|
419
|
-
limit: int |
|
|
420
|
-
sort_ascending: bool |
|
|
417
|
+
cursor: str | Omit = omit,
|
|
418
|
+
kpi_name: str | Omit = omit,
|
|
419
|
+
limit: int | Omit = omit,
|
|
420
|
+
sort_ascending: bool | Omit = omit,
|
|
421
421
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
422
422
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
423
423
|
extra_headers: Headers | None = None,
|
|
424
424
|
extra_query: Query | None = None,
|
|
425
425
|
extra_body: Body | None = None,
|
|
426
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
426
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
427
427
|
) -> AsyncPaginator[KpiListResponse, AsyncCursorPage[KpiListResponse]]:
|
|
428
428
|
"""
|
|
429
429
|
Get all KPIs for a Use Case
|
|
@@ -470,7 +470,7 @@ class AsyncKpisResource(AsyncAPIResource):
|
|
|
470
470
|
extra_headers: Headers | None = None,
|
|
471
471
|
extra_query: Query | None = None,
|
|
472
472
|
extra_body: Body | None = None,
|
|
473
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
473
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
474
474
|
) -> KpiDeleteResponse:
|
|
475
475
|
"""
|
|
476
476
|
Delete a KPI definition for a Use Case
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
from typing import
|
|
5
|
+
from typing import Dict, Optional
|
|
6
6
|
from typing_extensions import Literal
|
|
7
7
|
|
|
8
8
|
import httpx
|
|
9
9
|
|
|
10
|
-
from ...._types import
|
|
10
|
+
from ...._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
|
|
11
11
|
from ...._utils import maybe_transform, async_maybe_transform
|
|
12
12
|
from ...._compat import cached_property
|
|
13
13
|
from ...._resource import SyncAPIResource, AsyncAPIResource
|
|
@@ -49,15 +49,15 @@ class LimitConfigResource(SyncAPIResource):
|
|
|
49
49
|
use_case_name: str,
|
|
50
50
|
*,
|
|
51
51
|
max: float,
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
threshold: Optional[float] |
|
|
52
|
+
limit_type: Literal["block", "allow"] | Omit = omit,
|
|
53
|
+
properties: Optional[Dict[str, Optional[str]]] | Omit = omit,
|
|
54
|
+
threshold: Optional[float] | Omit = omit,
|
|
55
55
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
56
56
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
57
57
|
extra_headers: Headers | None = None,
|
|
58
58
|
extra_query: Query | None = None,
|
|
59
59
|
extra_body: Body | None = None,
|
|
60
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
60
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
61
61
|
) -> UseCaseDefinition:
|
|
62
62
|
"""
|
|
63
63
|
Create a new Use Case default limit configuration
|
|
@@ -78,8 +78,8 @@ class LimitConfigResource(SyncAPIResource):
|
|
|
78
78
|
body=maybe_transform(
|
|
79
79
|
{
|
|
80
80
|
"max": max,
|
|
81
|
-
"limit_tags": limit_tags,
|
|
82
81
|
"limit_type": limit_type,
|
|
82
|
+
"properties": properties,
|
|
83
83
|
"threshold": threshold,
|
|
84
84
|
},
|
|
85
85
|
limit_config_create_params.LimitConfigCreateParams,
|
|
@@ -99,7 +99,7 @@ class LimitConfigResource(SyncAPIResource):
|
|
|
99
99
|
extra_headers: Headers | None = None,
|
|
100
100
|
extra_query: Query | None = None,
|
|
101
101
|
extra_body: Body | None = None,
|
|
102
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
102
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
103
103
|
) -> UseCaseDefinition:
|
|
104
104
|
"""
|
|
105
105
|
Delete a Use Case default limit configuration
|
|
@@ -149,15 +149,15 @@ class AsyncLimitConfigResource(AsyncAPIResource):
|
|
|
149
149
|
use_case_name: str,
|
|
150
150
|
*,
|
|
151
151
|
max: float,
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
threshold: Optional[float] |
|
|
152
|
+
limit_type: Literal["block", "allow"] | Omit = omit,
|
|
153
|
+
properties: Optional[Dict[str, Optional[str]]] | Omit = omit,
|
|
154
|
+
threshold: Optional[float] | Omit = omit,
|
|
155
155
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
156
156
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
157
157
|
extra_headers: Headers | None = None,
|
|
158
158
|
extra_query: Query | None = None,
|
|
159
159
|
extra_body: Body | None = None,
|
|
160
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
160
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
161
161
|
) -> UseCaseDefinition:
|
|
162
162
|
"""
|
|
163
163
|
Create a new Use Case default limit configuration
|
|
@@ -178,8 +178,8 @@ class AsyncLimitConfigResource(AsyncAPIResource):
|
|
|
178
178
|
body=await async_maybe_transform(
|
|
179
179
|
{
|
|
180
180
|
"max": max,
|
|
181
|
-
"limit_tags": limit_tags,
|
|
182
181
|
"limit_type": limit_type,
|
|
182
|
+
"properties": properties,
|
|
183
183
|
"threshold": threshold,
|
|
184
184
|
},
|
|
185
185
|
limit_config_create_params.LimitConfigCreateParams,
|
|
@@ -199,7 +199,7 @@ class AsyncLimitConfigResource(AsyncAPIResource):
|
|
|
199
199
|
extra_headers: Headers | None = None,
|
|
200
200
|
extra_query: Query | None = None,
|
|
201
201
|
extra_body: Body | None = None,
|
|
202
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
202
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
203
203
|
) -> UseCaseDefinition:
|
|
204
204
|
"""
|
|
205
205
|
Delete a Use Case default limit configuration
|
|
@@ -4,7 +4,7 @@ from __future__ import annotations
|
|
|
4
4
|
|
|
5
5
|
import httpx
|
|
6
6
|
|
|
7
|
-
from ...._types import
|
|
7
|
+
from ...._types import Body, Query, Headers, NotGiven, not_given
|
|
8
8
|
from ...._compat import cached_property
|
|
9
9
|
from ...._resource import SyncAPIResource, AsyncAPIResource
|
|
10
10
|
from ...._response import (
|
|
@@ -48,7 +48,7 @@ class VersionResource(SyncAPIResource):
|
|
|
48
48
|
extra_headers: Headers | None = None,
|
|
49
49
|
extra_query: Query | None = None,
|
|
50
50
|
extra_body: Body | None = None,
|
|
51
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
51
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
52
52
|
) -> UseCaseDefinition:
|
|
53
53
|
"""
|
|
54
54
|
Increment a Use Case version
|
|
@@ -102,7 +102,7 @@ class AsyncVersionResource(AsyncAPIResource):
|
|
|
102
102
|
extra_headers: Headers | None = None,
|
|
103
103
|
extra_query: Query | None = None,
|
|
104
104
|
extra_body: Body | None = None,
|
|
105
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
105
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
106
106
|
) -> UseCaseDefinition:
|
|
107
107
|
"""
|
|
108
108
|
Increment a Use Case version
|
payi/resources/use_cases/kpis.py
CHANGED
|
@@ -6,7 +6,7 @@ from typing import Union
|
|
|
6
6
|
|
|
7
7
|
import httpx
|
|
8
8
|
|
|
9
|
-
from ..._types import
|
|
9
|
+
from ..._types import Body, Omit, Query, Headers, NoneType, NotGiven, omit, not_given
|
|
10
10
|
from ..._utils import maybe_transform, async_maybe_transform
|
|
11
11
|
from ..._compat import cached_property
|
|
12
12
|
from ..._resource import SyncAPIResource, AsyncAPIResource
|
|
@@ -49,13 +49,13 @@ class KpisResource(SyncAPIResource):
|
|
|
49
49
|
kpi_name: str,
|
|
50
50
|
*,
|
|
51
51
|
use_case_id: str,
|
|
52
|
-
score: Union[bool, float, None] |
|
|
52
|
+
score: Union[bool, float, None] | Omit = omit,
|
|
53
53
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
54
54
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
55
55
|
extra_headers: Headers | None = None,
|
|
56
56
|
extra_query: Query | None = None,
|
|
57
57
|
extra_body: Body | None = None,
|
|
58
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
58
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
59
59
|
) -> None:
|
|
60
60
|
"""
|
|
61
61
|
Update a KPI on a Use Case instance
|
|
@@ -87,16 +87,16 @@ class KpisResource(SyncAPIResource):
|
|
|
87
87
|
self,
|
|
88
88
|
use_case_id: str,
|
|
89
89
|
*,
|
|
90
|
-
cursor: str |
|
|
91
|
-
kpi_name: str |
|
|
92
|
-
limit: int |
|
|
93
|
-
sort_ascending: bool |
|
|
90
|
+
cursor: str | Omit = omit,
|
|
91
|
+
kpi_name: str | Omit = omit,
|
|
92
|
+
limit: int | Omit = omit,
|
|
93
|
+
sort_ascending: bool | Omit = omit,
|
|
94
94
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
95
95
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
96
96
|
extra_headers: Headers | None = None,
|
|
97
97
|
extra_query: Query | None = None,
|
|
98
98
|
extra_body: Body | None = None,
|
|
99
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
99
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
100
100
|
) -> SyncCursorPage[KpiListResponse]:
|
|
101
101
|
"""
|
|
102
102
|
Return all KPI scores for a Use Case instance
|
|
@@ -159,13 +159,13 @@ class AsyncKpisResource(AsyncAPIResource):
|
|
|
159
159
|
kpi_name: str,
|
|
160
160
|
*,
|
|
161
161
|
use_case_id: str,
|
|
162
|
-
score: Union[bool, float, None] |
|
|
162
|
+
score: Union[bool, float, None] | Omit = omit,
|
|
163
163
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
164
164
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
165
165
|
extra_headers: Headers | None = None,
|
|
166
166
|
extra_query: Query | None = None,
|
|
167
167
|
extra_body: Body | None = None,
|
|
168
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
168
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
169
169
|
) -> None:
|
|
170
170
|
"""
|
|
171
171
|
Update a KPI on a Use Case instance
|
|
@@ -197,16 +197,16 @@ class AsyncKpisResource(AsyncAPIResource):
|
|
|
197
197
|
self,
|
|
198
198
|
use_case_id: str,
|
|
199
199
|
*,
|
|
200
|
-
cursor: str |
|
|
201
|
-
kpi_name: str |
|
|
202
|
-
limit: int |
|
|
203
|
-
sort_ascending: bool |
|
|
200
|
+
cursor: str | Omit = omit,
|
|
201
|
+
kpi_name: str | Omit = omit,
|
|
202
|
+
limit: int | Omit = omit,
|
|
203
|
+
sort_ascending: bool | Omit = omit,
|
|
204
204
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
205
205
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
206
206
|
extra_headers: Headers | None = None,
|
|
207
207
|
extra_query: Query | None = None,
|
|
208
208
|
extra_body: Body | None = None,
|
|
209
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
209
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
210
210
|
) -> AsyncPaginator[KpiListResponse, AsyncCursorPage[KpiListResponse]]:
|
|
211
211
|
"""
|
|
212
212
|
Return all KPI scores for a Use Case instance
|
|
@@ -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
|
|
|
7
7
|
import httpx
|
|
8
8
|
|
|
9
|
-
from ..._types import
|
|
9
|
+
from ..._types import Body, Query, Headers, NotGiven, not_given
|
|
10
10
|
from ..._utils import maybe_transform, async_maybe_transform
|
|
11
11
|
from ..._compat import cached_property
|
|
12
12
|
from ..._resource import SyncAPIResource, AsyncAPIResource
|
|
@@ -47,13 +47,13 @@ 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,
|
|
54
54
|
extra_query: Query | None = None,
|
|
55
55
|
extra_body: Body | None = None,
|
|
56
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
56
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
57
57
|
) -> UseCaseInstanceResponse:
|
|
58
58
|
"""
|
|
59
59
|
Update a Use Case instance properties
|
|
@@ -103,13 +103,13 @@ 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,
|
|
110
110
|
extra_query: Query | None = None,
|
|
111
111
|
extra_body: Body | None = None,
|
|
112
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
112
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
113
113
|
) -> UseCaseInstanceResponse:
|
|
114
114
|
"""
|
|
115
115
|
Update a Use Case instance properties
|
|
@@ -12,7 +12,7 @@ from .kpis import (
|
|
|
12
12
|
KpisResourceWithStreamingResponse,
|
|
13
13
|
AsyncKpisResourceWithStreamingResponse,
|
|
14
14
|
)
|
|
15
|
-
from ..._types import
|
|
15
|
+
from ..._types import Body, Query, Headers, NotGiven, not_given
|
|
16
16
|
from ..._compat import cached_property
|
|
17
17
|
from .properties import (
|
|
18
18
|
PropertiesResource,
|
|
@@ -84,7 +84,7 @@ class UseCasesResource(SyncAPIResource):
|
|
|
84
84
|
extra_headers: Headers | None = None,
|
|
85
85
|
extra_query: Query | None = None,
|
|
86
86
|
extra_body: Body | None = None,
|
|
87
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
87
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
88
88
|
) -> UseCaseInstanceResponse:
|
|
89
89
|
"""
|
|
90
90
|
Create a Use Case instance
|
|
@@ -117,7 +117,7 @@ class UseCasesResource(SyncAPIResource):
|
|
|
117
117
|
extra_headers: Headers | None = None,
|
|
118
118
|
extra_query: Query | None = None,
|
|
119
119
|
extra_body: Body | None = None,
|
|
120
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
120
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
121
121
|
) -> UseCaseInstanceResponse:
|
|
122
122
|
"""
|
|
123
123
|
Get a Use Case instance details
|
|
@@ -150,7 +150,7 @@ class UseCasesResource(SyncAPIResource):
|
|
|
150
150
|
extra_headers: Headers | None = None,
|
|
151
151
|
extra_query: Query | None = None,
|
|
152
152
|
extra_body: Body | None = None,
|
|
153
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
153
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
154
154
|
) -> UseCaseInstanceResponse:
|
|
155
155
|
"""
|
|
156
156
|
Delete a Use Case instance
|
|
@@ -216,7 +216,7 @@ class AsyncUseCasesResource(AsyncAPIResource):
|
|
|
216
216
|
extra_headers: Headers | None = None,
|
|
217
217
|
extra_query: Query | None = None,
|
|
218
218
|
extra_body: Body | None = None,
|
|
219
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
219
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
220
220
|
) -> UseCaseInstanceResponse:
|
|
221
221
|
"""
|
|
222
222
|
Create a Use Case instance
|
|
@@ -249,7 +249,7 @@ class AsyncUseCasesResource(AsyncAPIResource):
|
|
|
249
249
|
extra_headers: Headers | None = None,
|
|
250
250
|
extra_query: Query | None = None,
|
|
251
251
|
extra_body: Body | None = None,
|
|
252
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
252
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
253
253
|
) -> UseCaseInstanceResponse:
|
|
254
254
|
"""
|
|
255
255
|
Get a Use Case instance details
|
|
@@ -282,7 +282,7 @@ class AsyncUseCasesResource(AsyncAPIResource):
|
|
|
282
282
|
extra_headers: Headers | None = None,
|
|
283
283
|
extra_query: Query | None = None,
|
|
284
284
|
extra_body: Body | None = None,
|
|
285
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
285
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
286
286
|
) -> UseCaseInstanceResponse:
|
|
287
287
|
"""
|
|
288
288
|
Delete a Use Case instance
|
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.
|
|
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
|
-
|
|
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[
|
|
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):
|