payi 0.1.0a94__py3-none-any.whl → 0.1.0a96__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/_client.py +0 -9
- payi/_version.py +1 -1
- payi/lib/AnthropicInstrumentor.py +1 -2
- payi/lib/BedrockInstrumentor.py +3 -3
- payi/lib/instrument.py +2 -2
- payi/resources/__init__.py +0 -14
- payi/resources/ingest.py +14 -28
- payi/resources/limits/limits.py +8 -0
- payi/resources/use_cases/kpis.py +1 -177
- payi/resources/use_cases/properties.py +5 -5
- payi/resources/use_cases/use_cases.py +15 -13
- payi/types/__init__.py +3 -2
- payi/types/ingest_units_params.py +2 -4
- payi/types/limit_create_params.py +2 -2
- payi/types/{use_case_instance_response.py → use_case_create_response.py} +2 -2
- payi/types/{experience_instance_response.py → use_case_delete_response.py} +3 -3
- payi/types/use_case_retrieve_response.py +15 -0
- payi/types/use_cases/__init__.py +1 -1
- payi/types/use_cases/property_create_response.py +15 -0
- {payi-0.1.0a94.dist-info → payi-0.1.0a96.dist-info}/METADATA +1 -1
- {payi-0.1.0a94.dist-info → payi-0.1.0a96.dist-info}/RECORD +23 -36
- payi/resources/experiences/__init__.py +0 -47
- payi/resources/experiences/experiences.py +0 -383
- payi/resources/experiences/properties.py +0 -171
- payi/resources/experiences/types/__init__.py +0 -33
- payi/resources/experiences/types/limit_config.py +0 -272
- payi/resources/experiences/types/types.py +0 -581
- payi/types/experiences/__init__.py +0 -9
- payi/types/experiences/experience_type.py +0 -24
- payi/types/experiences/property_create_params.py +0 -12
- payi/types/experiences/type_create_params.py +0 -22
- payi/types/experiences/type_list_params.py +0 -17
- payi/types/experiences/type_update_params.py +0 -14
- payi/types/experiences/types/__init__.py +0 -5
- payi/types/experiences/types/limit_config_create_params.py +0 -18
- payi/types/use_cases/kpi_create_params.py +0 -13
- {payi-0.1.0a94.dist-info → payi-0.1.0a96.dist-info}/WHEEL +0 -0
- {payi-0.1.0a94.dist-info → payi-0.1.0a96.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,272 +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 List, Optional
|
|
6
|
-
from typing_extensions import Literal
|
|
7
|
-
|
|
8
|
-
import httpx
|
|
9
|
-
|
|
10
|
-
from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
|
|
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.experiences.types import limit_config_create_params
|
|
22
|
-
from ....types.experiences.experience_type import ExperienceType
|
|
23
|
-
|
|
24
|
-
__all__ = ["LimitConfigResource", "AsyncLimitConfigResource"]
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
class LimitConfigResource(SyncAPIResource):
|
|
28
|
-
@cached_property
|
|
29
|
-
def with_raw_response(self) -> LimitConfigResourceWithRawResponse:
|
|
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 LimitConfigResourceWithRawResponse(self)
|
|
37
|
-
|
|
38
|
-
@cached_property
|
|
39
|
-
def with_streaming_response(self) -> LimitConfigResourceWithStreamingResponse:
|
|
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 LimitConfigResourceWithStreamingResponse(self)
|
|
46
|
-
|
|
47
|
-
def create(
|
|
48
|
-
self,
|
|
49
|
-
experience_name: str,
|
|
50
|
-
*,
|
|
51
|
-
max: float,
|
|
52
|
-
limit_tags: Optional[List[str]] | NotGiven = NOT_GIVEN,
|
|
53
|
-
limit_type: Literal["block", "allow"] | NotGiven = NOT_GIVEN,
|
|
54
|
-
threshold: Optional[float] | NotGiven = NOT_GIVEN,
|
|
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
|
-
) -> ExperienceType:
|
|
62
|
-
"""
|
|
63
|
-
Create a new Experience Type default limit configuration
|
|
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 experience_name:
|
|
75
|
-
raise ValueError(f"Expected a non-empty value for `experience_name` but received {experience_name!r}")
|
|
76
|
-
return self._post(
|
|
77
|
-
f"/api/v1/experiences/types/{experience_name}/limit_config",
|
|
78
|
-
body=maybe_transform(
|
|
79
|
-
{
|
|
80
|
-
"max": max,
|
|
81
|
-
"limit_tags": limit_tags,
|
|
82
|
-
"limit_type": limit_type,
|
|
83
|
-
"threshold": threshold,
|
|
84
|
-
},
|
|
85
|
-
limit_config_create_params.LimitConfigCreateParams,
|
|
86
|
-
),
|
|
87
|
-
options=make_request_options(
|
|
88
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
89
|
-
),
|
|
90
|
-
cast_to=ExperienceType,
|
|
91
|
-
)
|
|
92
|
-
|
|
93
|
-
def delete(
|
|
94
|
-
self,
|
|
95
|
-
experience_name: str,
|
|
96
|
-
*,
|
|
97
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
98
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
99
|
-
extra_headers: Headers | None = None,
|
|
100
|
-
extra_query: Query | None = None,
|
|
101
|
-
extra_body: Body | None = None,
|
|
102
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
103
|
-
) -> ExperienceType:
|
|
104
|
-
"""
|
|
105
|
-
Delete an Experience Type default limit configuration
|
|
106
|
-
|
|
107
|
-
Args:
|
|
108
|
-
extra_headers: Send extra headers
|
|
109
|
-
|
|
110
|
-
extra_query: Add additional query parameters to the request
|
|
111
|
-
|
|
112
|
-
extra_body: Add additional JSON properties to the request
|
|
113
|
-
|
|
114
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
115
|
-
"""
|
|
116
|
-
if not experience_name:
|
|
117
|
-
raise ValueError(f"Expected a non-empty value for `experience_name` but received {experience_name!r}")
|
|
118
|
-
return self._delete(
|
|
119
|
-
f"/api/v1/experiences/types/{experience_name}/limit_config",
|
|
120
|
-
options=make_request_options(
|
|
121
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
122
|
-
),
|
|
123
|
-
cast_to=ExperienceType,
|
|
124
|
-
)
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
class AsyncLimitConfigResource(AsyncAPIResource):
|
|
128
|
-
@cached_property
|
|
129
|
-
def with_raw_response(self) -> AsyncLimitConfigResourceWithRawResponse:
|
|
130
|
-
"""
|
|
131
|
-
This property can be used as a prefix for any HTTP method call to return
|
|
132
|
-
the raw response object instead of the parsed content.
|
|
133
|
-
|
|
134
|
-
For more information, see https://www.github.com/Pay-i/pay-i-python#accessing-raw-response-data-eg-headers
|
|
135
|
-
"""
|
|
136
|
-
return AsyncLimitConfigResourceWithRawResponse(self)
|
|
137
|
-
|
|
138
|
-
@cached_property
|
|
139
|
-
def with_streaming_response(self) -> AsyncLimitConfigResourceWithStreamingResponse:
|
|
140
|
-
"""
|
|
141
|
-
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
142
|
-
|
|
143
|
-
For more information, see https://www.github.com/Pay-i/pay-i-python#with_streaming_response
|
|
144
|
-
"""
|
|
145
|
-
return AsyncLimitConfigResourceWithStreamingResponse(self)
|
|
146
|
-
|
|
147
|
-
async def create(
|
|
148
|
-
self,
|
|
149
|
-
experience_name: str,
|
|
150
|
-
*,
|
|
151
|
-
max: float,
|
|
152
|
-
limit_tags: Optional[List[str]] | NotGiven = NOT_GIVEN,
|
|
153
|
-
limit_type: Literal["block", "allow"] | NotGiven = NOT_GIVEN,
|
|
154
|
-
threshold: Optional[float] | NotGiven = NOT_GIVEN,
|
|
155
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
156
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
157
|
-
extra_headers: Headers | None = None,
|
|
158
|
-
extra_query: Query | None = None,
|
|
159
|
-
extra_body: Body | None = None,
|
|
160
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
161
|
-
) -> ExperienceType:
|
|
162
|
-
"""
|
|
163
|
-
Create a new Experience Type default limit configuration
|
|
164
|
-
|
|
165
|
-
Args:
|
|
166
|
-
extra_headers: Send extra headers
|
|
167
|
-
|
|
168
|
-
extra_query: Add additional query parameters to the request
|
|
169
|
-
|
|
170
|
-
extra_body: Add additional JSON properties to the request
|
|
171
|
-
|
|
172
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
173
|
-
"""
|
|
174
|
-
if not experience_name:
|
|
175
|
-
raise ValueError(f"Expected a non-empty value for `experience_name` but received {experience_name!r}")
|
|
176
|
-
return await self._post(
|
|
177
|
-
f"/api/v1/experiences/types/{experience_name}/limit_config",
|
|
178
|
-
body=await async_maybe_transform(
|
|
179
|
-
{
|
|
180
|
-
"max": max,
|
|
181
|
-
"limit_tags": limit_tags,
|
|
182
|
-
"limit_type": limit_type,
|
|
183
|
-
"threshold": threshold,
|
|
184
|
-
},
|
|
185
|
-
limit_config_create_params.LimitConfigCreateParams,
|
|
186
|
-
),
|
|
187
|
-
options=make_request_options(
|
|
188
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
189
|
-
),
|
|
190
|
-
cast_to=ExperienceType,
|
|
191
|
-
)
|
|
192
|
-
|
|
193
|
-
async def delete(
|
|
194
|
-
self,
|
|
195
|
-
experience_name: str,
|
|
196
|
-
*,
|
|
197
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
198
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
199
|
-
extra_headers: Headers | None = None,
|
|
200
|
-
extra_query: Query | None = None,
|
|
201
|
-
extra_body: Body | None = None,
|
|
202
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
203
|
-
) -> ExperienceType:
|
|
204
|
-
"""
|
|
205
|
-
Delete an Experience Type default limit configuration
|
|
206
|
-
|
|
207
|
-
Args:
|
|
208
|
-
extra_headers: Send extra headers
|
|
209
|
-
|
|
210
|
-
extra_query: Add additional query parameters to the request
|
|
211
|
-
|
|
212
|
-
extra_body: Add additional JSON properties to the request
|
|
213
|
-
|
|
214
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
215
|
-
"""
|
|
216
|
-
if not experience_name:
|
|
217
|
-
raise ValueError(f"Expected a non-empty value for `experience_name` but received {experience_name!r}")
|
|
218
|
-
return await self._delete(
|
|
219
|
-
f"/api/v1/experiences/types/{experience_name}/limit_config",
|
|
220
|
-
options=make_request_options(
|
|
221
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
222
|
-
),
|
|
223
|
-
cast_to=ExperienceType,
|
|
224
|
-
)
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
class LimitConfigResourceWithRawResponse:
|
|
228
|
-
def __init__(self, limit_config: LimitConfigResource) -> None:
|
|
229
|
-
self._limit_config = limit_config
|
|
230
|
-
|
|
231
|
-
self.create = to_raw_response_wrapper(
|
|
232
|
-
limit_config.create,
|
|
233
|
-
)
|
|
234
|
-
self.delete = to_raw_response_wrapper(
|
|
235
|
-
limit_config.delete,
|
|
236
|
-
)
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
class AsyncLimitConfigResourceWithRawResponse:
|
|
240
|
-
def __init__(self, limit_config: AsyncLimitConfigResource) -> None:
|
|
241
|
-
self._limit_config = limit_config
|
|
242
|
-
|
|
243
|
-
self.create = async_to_raw_response_wrapper(
|
|
244
|
-
limit_config.create,
|
|
245
|
-
)
|
|
246
|
-
self.delete = async_to_raw_response_wrapper(
|
|
247
|
-
limit_config.delete,
|
|
248
|
-
)
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
class LimitConfigResourceWithStreamingResponse:
|
|
252
|
-
def __init__(self, limit_config: LimitConfigResource) -> None:
|
|
253
|
-
self._limit_config = limit_config
|
|
254
|
-
|
|
255
|
-
self.create = to_streamed_response_wrapper(
|
|
256
|
-
limit_config.create,
|
|
257
|
-
)
|
|
258
|
-
self.delete = to_streamed_response_wrapper(
|
|
259
|
-
limit_config.delete,
|
|
260
|
-
)
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
class AsyncLimitConfigResourceWithStreamingResponse:
|
|
264
|
-
def __init__(self, limit_config: AsyncLimitConfigResource) -> None:
|
|
265
|
-
self._limit_config = limit_config
|
|
266
|
-
|
|
267
|
-
self.create = async_to_streamed_response_wrapper(
|
|
268
|
-
limit_config.create,
|
|
269
|
-
)
|
|
270
|
-
self.delete = async_to_streamed_response_wrapper(
|
|
271
|
-
limit_config.delete,
|
|
272
|
-
)
|