payi 0.1.0a17__py3-none-any.whl → 0.1.0a18__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 +1 -1
- payi/resources/categories/resources.py +16 -16
- payi/resources/ingest.py +6 -5
- payi/types/__init__.py +1 -0
- payi/types/category_resource_response.py +2 -0
- payi/types/ingest_bulk_params.py +5 -25
- payi/types/ingest_event_param.py +31 -0
- {payi-0.1.0a17.dist-info → payi-0.1.0a18.dist-info}/METADATA +1 -1
- {payi-0.1.0a17.dist-info → payi-0.1.0a18.dist-info}/RECORD +11 -10
- {payi-0.1.0a17.dist-info → payi-0.1.0a18.dist-info}/WHEEL +0 -0
- {payi-0.1.0a17.dist-info → payi-0.1.0a18.dist-info}/licenses/LICENSE +0 -0
payi/_version.py
CHANGED
|
@@ -90,7 +90,7 @@ class ResourcesResource(SyncAPIResource):
|
|
|
90
90
|
|
|
91
91
|
def retrieve(
|
|
92
92
|
self,
|
|
93
|
-
|
|
93
|
+
resource_id: str,
|
|
94
94
|
*,
|
|
95
95
|
category: str,
|
|
96
96
|
resource: str,
|
|
@@ -117,10 +117,10 @@ class ResourcesResource(SyncAPIResource):
|
|
|
117
117
|
raise ValueError(f"Expected a non-empty value for `category` but received {category!r}")
|
|
118
118
|
if not resource:
|
|
119
119
|
raise ValueError(f"Expected a non-empty value for `resource` but received {resource!r}")
|
|
120
|
-
if not
|
|
121
|
-
raise ValueError(f"Expected a non-empty value for `
|
|
120
|
+
if not resource_id:
|
|
121
|
+
raise ValueError(f"Expected a non-empty value for `resource_id` but received {resource_id!r}")
|
|
122
122
|
return self._get(
|
|
123
|
-
f"/api/v1/categories/{category}/resources/{resource}/{
|
|
123
|
+
f"/api/v1/categories/{category}/resources/{resource}/{resource_id}",
|
|
124
124
|
options=make_request_options(
|
|
125
125
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
126
126
|
),
|
|
@@ -165,7 +165,7 @@ class ResourcesResource(SyncAPIResource):
|
|
|
165
165
|
|
|
166
166
|
def delete(
|
|
167
167
|
self,
|
|
168
|
-
|
|
168
|
+
resource_id: str,
|
|
169
169
|
*,
|
|
170
170
|
category: str,
|
|
171
171
|
resource: str,
|
|
@@ -192,10 +192,10 @@ class ResourcesResource(SyncAPIResource):
|
|
|
192
192
|
raise ValueError(f"Expected a non-empty value for `category` but received {category!r}")
|
|
193
193
|
if not resource:
|
|
194
194
|
raise ValueError(f"Expected a non-empty value for `resource` but received {resource!r}")
|
|
195
|
-
if not
|
|
196
|
-
raise ValueError(f"Expected a non-empty value for `
|
|
195
|
+
if not resource_id:
|
|
196
|
+
raise ValueError(f"Expected a non-empty value for `resource_id` but received {resource_id!r}")
|
|
197
197
|
return self._delete(
|
|
198
|
-
f"/api/v1/categories/{category}/resources/{resource}/{
|
|
198
|
+
f"/api/v1/categories/{category}/resources/{resource}/{resource_id}",
|
|
199
199
|
options=make_request_options(
|
|
200
200
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
201
201
|
),
|
|
@@ -265,7 +265,7 @@ class AsyncResourcesResource(AsyncAPIResource):
|
|
|
265
265
|
|
|
266
266
|
async def retrieve(
|
|
267
267
|
self,
|
|
268
|
-
|
|
268
|
+
resource_id: str,
|
|
269
269
|
*,
|
|
270
270
|
category: str,
|
|
271
271
|
resource: str,
|
|
@@ -292,10 +292,10 @@ class AsyncResourcesResource(AsyncAPIResource):
|
|
|
292
292
|
raise ValueError(f"Expected a non-empty value for `category` but received {category!r}")
|
|
293
293
|
if not resource:
|
|
294
294
|
raise ValueError(f"Expected a non-empty value for `resource` but received {resource!r}")
|
|
295
|
-
if not
|
|
296
|
-
raise ValueError(f"Expected a non-empty value for `
|
|
295
|
+
if not resource_id:
|
|
296
|
+
raise ValueError(f"Expected a non-empty value for `resource_id` but received {resource_id!r}")
|
|
297
297
|
return await self._get(
|
|
298
|
-
f"/api/v1/categories/{category}/resources/{resource}/{
|
|
298
|
+
f"/api/v1/categories/{category}/resources/{resource}/{resource_id}",
|
|
299
299
|
options=make_request_options(
|
|
300
300
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
301
301
|
),
|
|
@@ -340,7 +340,7 @@ class AsyncResourcesResource(AsyncAPIResource):
|
|
|
340
340
|
|
|
341
341
|
async def delete(
|
|
342
342
|
self,
|
|
343
|
-
|
|
343
|
+
resource_id: str,
|
|
344
344
|
*,
|
|
345
345
|
category: str,
|
|
346
346
|
resource: str,
|
|
@@ -367,10 +367,10 @@ class AsyncResourcesResource(AsyncAPIResource):
|
|
|
367
367
|
raise ValueError(f"Expected a non-empty value for `category` but received {category!r}")
|
|
368
368
|
if not resource:
|
|
369
369
|
raise ValueError(f"Expected a non-empty value for `resource` but received {resource!r}")
|
|
370
|
-
if not
|
|
371
|
-
raise ValueError(f"Expected a non-empty value for `
|
|
370
|
+
if not resource_id:
|
|
371
|
+
raise ValueError(f"Expected a non-empty value for `resource_id` but received {resource_id!r}")
|
|
372
372
|
return await self._delete(
|
|
373
|
-
f"/api/v1/categories/{category}/resources/{resource}/{
|
|
373
|
+
f"/api/v1/categories/{category}/resources/{resource}/{resource_id}",
|
|
374
374
|
options=make_request_options(
|
|
375
375
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
376
376
|
),
|
payi/resources/ingest.py
CHANGED
|
@@ -7,7 +7,7 @@ from datetime import datetime
|
|
|
7
7
|
|
|
8
8
|
import httpx
|
|
9
9
|
|
|
10
|
-
from ..types import
|
|
10
|
+
from ..types import ingest_units_params
|
|
11
11
|
from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
|
|
12
12
|
from .._utils import (
|
|
13
13
|
maybe_transform,
|
|
@@ -24,6 +24,7 @@ from .._response import (
|
|
|
24
24
|
)
|
|
25
25
|
from .._base_client import make_request_options
|
|
26
26
|
from ..types.ingest_response import IngestResponse
|
|
27
|
+
from ..types.ingest_event_param import IngestEventParam
|
|
27
28
|
from ..types.bulk_ingest_response import BulkIngestResponse
|
|
28
29
|
|
|
29
30
|
__all__ = ["IngestResource", "AsyncIngestResource"]
|
|
@@ -41,7 +42,7 @@ class IngestResource(SyncAPIResource):
|
|
|
41
42
|
def bulk(
|
|
42
43
|
self,
|
|
43
44
|
*,
|
|
44
|
-
events: Iterable[
|
|
45
|
+
events: Iterable[IngestEventParam],
|
|
45
46
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
46
47
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
47
48
|
extra_headers: Headers | None = None,
|
|
@@ -66,7 +67,7 @@ class IngestResource(SyncAPIResource):
|
|
|
66
67
|
"""
|
|
67
68
|
return self._post(
|
|
68
69
|
"/api/v1/ingest/bulk",
|
|
69
|
-
body=maybe_transform(events, Iterable[
|
|
70
|
+
body=maybe_transform(events, Iterable[IngestEventParam]),
|
|
70
71
|
options=make_request_options(
|
|
71
72
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
72
73
|
),
|
|
@@ -191,7 +192,7 @@ class AsyncIngestResource(AsyncAPIResource):
|
|
|
191
192
|
async def bulk(
|
|
192
193
|
self,
|
|
193
194
|
*,
|
|
194
|
-
events: Iterable[
|
|
195
|
+
events: Iterable[IngestEventParam],
|
|
195
196
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
196
197
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
197
198
|
extra_headers: Headers | None = None,
|
|
@@ -215,7 +216,7 @@ class AsyncIngestResource(AsyncAPIResource):
|
|
|
215
216
|
"""
|
|
216
217
|
return await self._post(
|
|
217
218
|
"/api/v1/ingest/bulk",
|
|
218
|
-
body=await async_maybe_transform(events, Iterable[
|
|
219
|
+
body=await async_maybe_transform(events, Iterable[IngestEventParam]),
|
|
219
220
|
options=make_request_options(
|
|
220
221
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
221
222
|
),
|
payi/types/__init__.py
CHANGED
|
@@ -13,6 +13,7 @@ from .category_response import CategoryResponse as CategoryResponse
|
|
|
13
13
|
from .paged_budget_list import PagedBudgetList as PagedBudgetList
|
|
14
14
|
from .budget_list_params import BudgetListParams as BudgetListParams
|
|
15
15
|
from .ingest_bulk_params import IngestBulkParams as IngestBulkParams
|
|
16
|
+
from .ingest_event_param import IngestEventParam as IngestEventParam
|
|
16
17
|
from .experience_instance import ExperienceInstance as ExperienceInstance
|
|
17
18
|
from .ingest_units_params import IngestUnitsParams as IngestUnitsParams
|
|
18
19
|
from .budget_create_params import BudgetCreateParams as BudgetCreateParams
|
payi/types/ingest_bulk_params.py
CHANGED
|
@@ -2,33 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
from typing import
|
|
6
|
-
from
|
|
7
|
-
from typing_extensions import Required, Annotated, TypedDict
|
|
5
|
+
from typing import Iterable
|
|
6
|
+
from typing_extensions import Required, TypedDict
|
|
8
7
|
|
|
9
|
-
from
|
|
8
|
+
from .ingest_event_param import IngestEventParam
|
|
10
9
|
|
|
11
|
-
__all__ = ["IngestBulkParams"
|
|
10
|
+
__all__ = ["IngestBulkParams"]
|
|
12
11
|
|
|
13
12
|
|
|
14
13
|
class IngestBulkParams(TypedDict, total=False):
|
|
15
|
-
events: Required[Iterable[
|
|
16
|
-
|
|
17
|
-
class Event(TypedDict, total=False):
|
|
18
|
-
category: Required[str]
|
|
19
|
-
|
|
20
|
-
input: Required[int]
|
|
21
|
-
|
|
22
|
-
output: Required[int]
|
|
23
|
-
|
|
24
|
-
resource: Required[str]
|
|
25
|
-
|
|
26
|
-
budget_ids: Optional[List[str]]
|
|
27
|
-
|
|
28
|
-
event_timestamp: Annotated[Union[str, datetime, None], PropertyInfo(format="iso8601")]
|
|
29
|
-
|
|
30
|
-
experience_instance_id: Optional[str]
|
|
31
|
-
|
|
32
|
-
request_tags: Optional[List[str]]
|
|
33
|
-
|
|
34
|
-
user_id: Optional[str]
|
|
14
|
+
events: Required[Iterable[IngestEventParam]]
|
|
@@ -0,0 +1,31 @@
|
|
|
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, Union, Optional
|
|
6
|
+
from datetime import datetime
|
|
7
|
+
from typing_extensions import Required, Annotated, TypedDict
|
|
8
|
+
|
|
9
|
+
from .._utils import PropertyInfo
|
|
10
|
+
|
|
11
|
+
__all__ = ["IngestEventParam"]
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class IngestEventParam(TypedDict, total=False):
|
|
15
|
+
category: Required[str]
|
|
16
|
+
|
|
17
|
+
input: Required[int]
|
|
18
|
+
|
|
19
|
+
output: Required[int]
|
|
20
|
+
|
|
21
|
+
resource: Required[str]
|
|
22
|
+
|
|
23
|
+
budget_ids: Optional[List[str]]
|
|
24
|
+
|
|
25
|
+
event_timestamp: Annotated[Union[str, datetime, None], PropertyInfo(format="iso8601")]
|
|
26
|
+
|
|
27
|
+
experience_instance_id: Optional[str]
|
|
28
|
+
|
|
29
|
+
request_tags: Optional[List[str]]
|
|
30
|
+
|
|
31
|
+
user_id: Optional[str]
|
|
@@ -11,7 +11,7 @@ payi/_resource.py,sha256=j2jIkTr8OIC8sU6-05nxSaCyj4MaFlbZrwlyg4_xJos,1088
|
|
|
11
11
|
payi/_response.py,sha256=SByCajzglbiy7lSG4F5enqb7R6jVQe1OQ9TBsaxWzE8,28508
|
|
12
12
|
payi/_streaming.py,sha256=Z_wIyo206T6Jqh2rolFg2VXZgX24PahLmpURp0-NssU,10092
|
|
13
13
|
payi/_types.py,sha256=mb6zn5qmTK5j0QMh0fevdShT091HBL4w0YCUfQ3u5VY,6101
|
|
14
|
-
payi/_version.py,sha256=
|
|
14
|
+
payi/_version.py,sha256=qj9c1PY9oqVS44HbIMSDzgqwxZmN-MCWYJZQf0rmwgI,165
|
|
15
15
|
payi/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
16
16
|
payi/_utils/__init__.py,sha256=Uzq1-FIih_VUjzdNVWXks0sdC39KBKLMrZoz-_JOjJ4,1988
|
|
17
17
|
payi/_utils/_logs.py,sha256=fmnf5D9TOgkgZKfgYmSa3PiUc3SZgkchn6CzJUeo0SQ,768
|
|
@@ -25,17 +25,17 @@ payi/_utils/_utils.py,sha256=LMVTMZG8pfu8AkJNSfmv_z3guQlOfm2UxDTjTTXggfg,11411
|
|
|
25
25
|
payi/lib/.keep,sha256=wuNrz-5SXo3jJaJOJgz4vFHM41YH_g20F5cRQo0vLes,224
|
|
26
26
|
payi/lib/helpers.py,sha256=IdB_pi8dLtVh9b4DG-zasA1i9Yk-5xAayoUTNWBAFpc,1235
|
|
27
27
|
payi/resources/__init__.py,sha256=0bsV7zh4J03yh3W3MBoiiIT12uG2tdvsDrdqOeY0Cbc,2032
|
|
28
|
-
payi/resources/ingest.py,sha256=
|
|
28
|
+
payi/resources/ingest.py,sha256=ZMnTEor5q3eJRaKgYaTBbQ47mUt3byc578xm_tpKAyw,14442
|
|
29
29
|
payi/resources/budgets/__init__.py,sha256=w1UhOdDXtUH4A91ME5Tw2nr9bRvPJyJY1YWiVVy7jj0,989
|
|
30
30
|
payi/resources/budgets/budgets.py,sha256=VQiwsQIF6Rp7jlIUPQ5VpJbbVxFOxYHEPI-bWkiPt2k,26508
|
|
31
31
|
payi/resources/budgets/tags.py,sha256=N26Uc7N8N1egvujY4LZ7RDoQ7oWeTR9w1pPbbgKLLqc,17841
|
|
32
32
|
payi/resources/categories/__init__.py,sha256=w5gMiPdBSzJA_qfoVtFBElaoe8wGf_O63R7R1Spr6Gk,1093
|
|
33
33
|
payi/resources/categories/categories.py,sha256=hqJE4iSiMe5nvvsui4RjFJxFb8170iRbJfTafk2NzGw,15072
|
|
34
|
-
payi/resources/categories/resources.py,sha256=
|
|
34
|
+
payi/resources/categories/resources.py,sha256=qkKv8n_7nGOVuEI3Lcy5OfDK9Sb2pYZx3vBK7Ao9Ztw,17700
|
|
35
35
|
payi/resources/experiences/__init__.py,sha256=gguTTCoGlAWDyrDJh1CtZwIVsyBbzERX63vRtFtjxjI,1054
|
|
36
36
|
payi/resources/experiences/experiences.py,sha256=KrjAqTmy5yaDpzzSxpCFkJZVBazi1PYitIiE1CY7KuY,12986
|
|
37
37
|
payi/resources/experiences/types.py,sha256=e47Uhwq1Tj7HedKKOs2UOhWuGq92MVi1SSwucRz_vsI,17464
|
|
38
|
-
payi/types/__init__.py,sha256=
|
|
38
|
+
payi/types/__init__.py,sha256=7zBCxYcYlvjAIecjsz9nw-LqsMAMXakYhTRJwXUTneo,1803
|
|
39
39
|
payi/types/budget_create_params.py,sha256=3PziVJT3_ll-6yv3i5EF8ERm19jFJAKbv9v-CvRW5ik,653
|
|
40
40
|
payi/types/budget_history_response.py,sha256=4SnisCLr1HImVecgonZK7HIm9WTmYl0YMaTbMP70qZY,934
|
|
41
41
|
payi/types/budget_list_params.py,sha256=KaJ0H4tfp6mpCyanpysVJBTAMa5aA2Kv73uO_EsBsKE,367
|
|
@@ -46,13 +46,14 @@ payi/types/category_delete_resource_response.py,sha256=PLz4wZA1XMpS9SUYB_j4hEw5E
|
|
|
46
46
|
payi/types/category_delete_response.py,sha256=5VYDbmQEHdMS01ysg9VeSbj0ckXYnoKrE47oa8VSM-I,340
|
|
47
47
|
payi/types/category_list_resources_response.py,sha256=n0DxY7N3Iftwfl0lUEx5v55V0kxbOX0EgjXlEfJtYRQ,337
|
|
48
48
|
payi/types/category_list_response.py,sha256=5i7BhQ7kVlx8_r2MLJqAJwIELGitKE0uR63kIloLATI,294
|
|
49
|
-
payi/types/category_resource_response.py,sha256=
|
|
49
|
+
payi/types/category_resource_response.py,sha256=PsMV4rafSVMFWsTVTuuJ__ntQxfubGU9S50mI07G7Ow,523
|
|
50
50
|
payi/types/category_response.py,sha256=43i8bii20Sb-z9R5M1Ia6RGfRZmdQqsWPlv4Bl1XQf0,293
|
|
51
51
|
payi/types/cost_data.py,sha256=jZtju_3WWNXh4wCu77XnyvxZkvewcvXBS_V0z07BizA,284
|
|
52
52
|
payi/types/cost_details.py,sha256=3ldvnYILAG6Sz9wGWMs1SZvIfdGEbn5i4-CauWEXMPA,265
|
|
53
53
|
payi/types/default_response.py,sha256=o617LpRsCIZHCZxAc5nVI2JQ3HPGZo4gCDvSDkxkIJ8,270
|
|
54
54
|
payi/types/experience_instance.py,sha256=r6WYuGqMEnIi_dAlQyTEfDO5SlwzjRZfXek4lEEov4U,247
|
|
55
|
-
payi/types/ingest_bulk_params.py,sha256
|
|
55
|
+
payi/types/ingest_bulk_params.py,sha256=aIsugHkiAe_DnGQ8JVpDUDYr1YNzR5cUY9mMPqusIP0,381
|
|
56
|
+
payi/types/ingest_event_param.py,sha256=p2NwqZMPMU11D7XUC5_th8VKKZQNG6_dtd4ILdDG0wU,721
|
|
56
57
|
payi/types/ingest_response.py,sha256=o43RH25dS4S54OCr3vkipZvLeAmI-hru6LuL789iEnM,1071
|
|
57
58
|
payi/types/ingest_units_params.py,sha256=6VgmFOiLdO2F05hei1sbrucQQib6GuqGRxcqwZvbfUE,937
|
|
58
59
|
payi/types/paged_budget_list.py,sha256=FqKlbAifEWY3sZqiJSny-XtS-XIfmj14AufNffNVmqM,1385
|
|
@@ -76,7 +77,7 @@ payi/types/experiences/experience_type.py,sha256=KKjkfI0eaoB1TmTlA4UpHKa2fB1q0zX
|
|
|
76
77
|
payi/types/experiences/type_create_params.py,sha256=8dNpffodzeD5vm3s6UJrZVOG7YsiTkXo7viDnoEoCZY,311
|
|
77
78
|
payi/types/experiences/type_list_response.py,sha256=DgkPLw40oUqBETLePVMVenstMsGG12rZRU9w6kgQN28,280
|
|
78
79
|
payi/types/experiences/type_update_params.py,sha256=ziUJASn8QF_5nSp5lohT0HLK0tTOciT-X35CVH9dA5Q,329
|
|
79
|
-
payi-0.1.
|
|
80
|
-
payi-0.1.
|
|
81
|
-
payi-0.1.
|
|
82
|
-
payi-0.1.
|
|
80
|
+
payi-0.1.0a18.dist-info/METADATA,sha256=EjYx-11yc4xnuu-8qk95_7yEHN4FOncHY-PqheP2VpM,12030
|
|
81
|
+
payi-0.1.0a18.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
|
|
82
|
+
payi-0.1.0a18.dist-info/licenses/LICENSE,sha256=8vX1pjh3esb6D5DvXAf6NxiBcVyon8aHWNJCxmmHXeY,11334
|
|
83
|
+
payi-0.1.0a18.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|