payi 0.1.0a15__py3-none-any.whl → 0.1.0a16__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/_base_client.py +29 -42
- payi/_client.py +8 -0
- payi/_compat.py +12 -17
- payi/_files.py +4 -8
- payi/_response.py +9 -8
- payi/_types.py +3 -6
- payi/_utils/_proxy.py +1 -2
- payi/_utils/_reflection.py +1 -1
- payi/_utils/_utils.py +6 -12
- payi/_version.py +1 -1
- payi/resources/__init__.py +14 -0
- payi/resources/experiences/__init__.py +33 -0
- payi/resources/experiences/experiences.py +325 -0
- payi/resources/experiences/types.py +459 -0
- payi/resources/ingest.py +6 -7
- payi/types/__init__.py +1 -1
- payi/types/budget_list_params.py +7 -9
- payi/types/budgets/tag_create_response.py +2 -1
- payi/types/budgets/tag_delete_response.py +2 -1
- payi/types/budgets/tag_list_response.py +2 -1
- payi/types/budgets/tag_remove_response.py +2 -1
- payi/types/budgets/tag_update_response.py +2 -1
- payi/types/categories/resource_list_response.py +2 -1
- payi/types/category_delete_resource_response.py +2 -1
- payi/types/category_delete_response.py +2 -1
- payi/types/category_list_resources_response.py +2 -1
- payi/types/category_list_response.py +2 -1
- payi/types/experience_instance.py +13 -0
- payi/types/experiences/__init__.py +8 -0
- payi/types/experiences/experience_type.py +17 -0
- payi/types/experiences/type_create_params.py +14 -0
- payi/types/experiences/type_list_response.py +10 -0
- payi/types/experiences/type_update_params.py +14 -0
- payi/types/ingest_bulk_params.py +25 -5
- payi/types/ingest_response.py +2 -0
- {payi-0.1.0a15.dist-info → payi-0.1.0a16.dist-info}/METADATA +1 -1
- {payi-0.1.0a15.dist-info → payi-0.1.0a16.dist-info}/RECORD +39 -31
- payi/types/ingest_units_param.py +0 -23
- {payi-0.1.0a15.dist-info → payi-0.1.0a16.dist-info}/WHEEL +0 -0
- {payi-0.1.0a15.dist-info → payi-0.1.0a16.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,459 @@
|
|
|
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 Optional
|
|
6
|
+
|
|
7
|
+
import httpx
|
|
8
|
+
|
|
9
|
+
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
|
|
10
|
+
from ..._utils import (
|
|
11
|
+
maybe_transform,
|
|
12
|
+
async_maybe_transform,
|
|
13
|
+
)
|
|
14
|
+
from ..._compat import cached_property
|
|
15
|
+
from ..._resource import SyncAPIResource, AsyncAPIResource
|
|
16
|
+
from ..._response import (
|
|
17
|
+
to_raw_response_wrapper,
|
|
18
|
+
to_streamed_response_wrapper,
|
|
19
|
+
async_to_raw_response_wrapper,
|
|
20
|
+
async_to_streamed_response_wrapper,
|
|
21
|
+
)
|
|
22
|
+
from ..._base_client import make_request_options
|
|
23
|
+
from ...types.experiences import type_create_params, type_update_params
|
|
24
|
+
from ...types.experiences.experience_type import ExperienceType
|
|
25
|
+
from ...types.experiences.type_list_response import TypeListResponse
|
|
26
|
+
|
|
27
|
+
__all__ = ["TypesResource", "AsyncTypesResource"]
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
class TypesResource(SyncAPIResource):
|
|
31
|
+
@cached_property
|
|
32
|
+
def with_raw_response(self) -> TypesResourceWithRawResponse:
|
|
33
|
+
return TypesResourceWithRawResponse(self)
|
|
34
|
+
|
|
35
|
+
@cached_property
|
|
36
|
+
def with_streaming_response(self) -> TypesResourceWithStreamingResponse:
|
|
37
|
+
return TypesResourceWithStreamingResponse(self)
|
|
38
|
+
|
|
39
|
+
def create(
|
|
40
|
+
self,
|
|
41
|
+
*,
|
|
42
|
+
description: Optional[str] | NotGiven = NOT_GIVEN,
|
|
43
|
+
name: Optional[str] | NotGiven = NOT_GIVEN,
|
|
44
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
45
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
46
|
+
extra_headers: Headers | None = None,
|
|
47
|
+
extra_query: Query | None = None,
|
|
48
|
+
extra_body: Body | None = None,
|
|
49
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
50
|
+
) -> ExperienceType:
|
|
51
|
+
"""Adds a new experience type.
|
|
52
|
+
|
|
53
|
+
Instances of this type can be created via
|
|
54
|
+
/experiences/instance.
|
|
55
|
+
|
|
56
|
+
Args:
|
|
57
|
+
extra_headers: Send extra headers
|
|
58
|
+
|
|
59
|
+
extra_query: Add additional query parameters to the request
|
|
60
|
+
|
|
61
|
+
extra_body: Add additional JSON properties to the request
|
|
62
|
+
|
|
63
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
64
|
+
"""
|
|
65
|
+
return self._post(
|
|
66
|
+
"/api/v1/experiences/types",
|
|
67
|
+
body=maybe_transform(
|
|
68
|
+
{
|
|
69
|
+
"description": description,
|
|
70
|
+
"name": name,
|
|
71
|
+
},
|
|
72
|
+
type_create_params.TypeCreateParams,
|
|
73
|
+
),
|
|
74
|
+
options=make_request_options(
|
|
75
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
76
|
+
),
|
|
77
|
+
cast_to=ExperienceType,
|
|
78
|
+
)
|
|
79
|
+
|
|
80
|
+
def retrieve(
|
|
81
|
+
self,
|
|
82
|
+
experience_type_id: int,
|
|
83
|
+
*,
|
|
84
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
85
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
86
|
+
extra_headers: Headers | None = None,
|
|
87
|
+
extra_query: Query | None = None,
|
|
88
|
+
extra_body: Body | None = None,
|
|
89
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
90
|
+
) -> ExperienceType:
|
|
91
|
+
"""
|
|
92
|
+
Get details for a specific Experience Type
|
|
93
|
+
|
|
94
|
+
Args:
|
|
95
|
+
extra_headers: Send extra headers
|
|
96
|
+
|
|
97
|
+
extra_query: Add additional query parameters to the request
|
|
98
|
+
|
|
99
|
+
extra_body: Add additional JSON properties to the request
|
|
100
|
+
|
|
101
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
102
|
+
"""
|
|
103
|
+
return self._get(
|
|
104
|
+
f"/api/v1/experiences/types/{experience_type_id}",
|
|
105
|
+
options=make_request_options(
|
|
106
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
107
|
+
),
|
|
108
|
+
cast_to=ExperienceType,
|
|
109
|
+
)
|
|
110
|
+
|
|
111
|
+
def update(
|
|
112
|
+
self,
|
|
113
|
+
experience_type_id: int,
|
|
114
|
+
*,
|
|
115
|
+
description: Optional[str] | NotGiven = NOT_GIVEN,
|
|
116
|
+
name: Optional[str] | NotGiven = NOT_GIVEN,
|
|
117
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
118
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
119
|
+
extra_headers: Headers | None = None,
|
|
120
|
+
extra_query: Query | None = None,
|
|
121
|
+
extra_body: Body | None = None,
|
|
122
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
123
|
+
) -> ExperienceType:
|
|
124
|
+
"""
|
|
125
|
+
Updates an existing experience type.
|
|
126
|
+
|
|
127
|
+
Args:
|
|
128
|
+
extra_headers: Send extra headers
|
|
129
|
+
|
|
130
|
+
extra_query: Add additional query parameters to the request
|
|
131
|
+
|
|
132
|
+
extra_body: Add additional JSON properties to the request
|
|
133
|
+
|
|
134
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
135
|
+
"""
|
|
136
|
+
return self._patch(
|
|
137
|
+
f"/api/v1/experiences/types/{experience_type_id}",
|
|
138
|
+
body=maybe_transform(
|
|
139
|
+
{
|
|
140
|
+
"description": description,
|
|
141
|
+
"name": name,
|
|
142
|
+
},
|
|
143
|
+
type_update_params.TypeUpdateParams,
|
|
144
|
+
),
|
|
145
|
+
options=make_request_options(
|
|
146
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
147
|
+
),
|
|
148
|
+
cast_to=ExperienceType,
|
|
149
|
+
)
|
|
150
|
+
|
|
151
|
+
def list(
|
|
152
|
+
self,
|
|
153
|
+
*,
|
|
154
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
155
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
156
|
+
extra_headers: Headers | None = None,
|
|
157
|
+
extra_query: Query | None = None,
|
|
158
|
+
extra_body: Body | None = None,
|
|
159
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
160
|
+
) -> TypeListResponse:
|
|
161
|
+
"""Get all Experience Types"""
|
|
162
|
+
return self._get(
|
|
163
|
+
"/api/v1/experiences/types",
|
|
164
|
+
options=make_request_options(
|
|
165
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
166
|
+
),
|
|
167
|
+
cast_to=TypeListResponse,
|
|
168
|
+
)
|
|
169
|
+
|
|
170
|
+
def delete(
|
|
171
|
+
self,
|
|
172
|
+
experience_type_id: int,
|
|
173
|
+
*,
|
|
174
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
175
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
176
|
+
extra_headers: Headers | None = None,
|
|
177
|
+
extra_query: Query | None = None,
|
|
178
|
+
extra_body: Body | None = None,
|
|
179
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
180
|
+
) -> ExperienceType:
|
|
181
|
+
"""Deletes an experience type.
|
|
182
|
+
|
|
183
|
+
This will remove visiblity of this type from all
|
|
184
|
+
dashboard stats.
|
|
185
|
+
|
|
186
|
+
Args:
|
|
187
|
+
extra_headers: Send extra headers
|
|
188
|
+
|
|
189
|
+
extra_query: Add additional query parameters to the request
|
|
190
|
+
|
|
191
|
+
extra_body: Add additional JSON properties to the request
|
|
192
|
+
|
|
193
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
194
|
+
"""
|
|
195
|
+
return self._delete(
|
|
196
|
+
f"/api/v1/experiences/types/{experience_type_id}",
|
|
197
|
+
options=make_request_options(
|
|
198
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
199
|
+
),
|
|
200
|
+
cast_to=ExperienceType,
|
|
201
|
+
)
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
class AsyncTypesResource(AsyncAPIResource):
|
|
205
|
+
@cached_property
|
|
206
|
+
def with_raw_response(self) -> AsyncTypesResourceWithRawResponse:
|
|
207
|
+
return AsyncTypesResourceWithRawResponse(self)
|
|
208
|
+
|
|
209
|
+
@cached_property
|
|
210
|
+
def with_streaming_response(self) -> AsyncTypesResourceWithStreamingResponse:
|
|
211
|
+
return AsyncTypesResourceWithStreamingResponse(self)
|
|
212
|
+
|
|
213
|
+
async def create(
|
|
214
|
+
self,
|
|
215
|
+
*,
|
|
216
|
+
description: Optional[str] | NotGiven = NOT_GIVEN,
|
|
217
|
+
name: Optional[str] | NotGiven = NOT_GIVEN,
|
|
218
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
219
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
220
|
+
extra_headers: Headers | None = None,
|
|
221
|
+
extra_query: Query | None = None,
|
|
222
|
+
extra_body: Body | None = None,
|
|
223
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
224
|
+
) -> ExperienceType:
|
|
225
|
+
"""Adds a new experience type.
|
|
226
|
+
|
|
227
|
+
Instances of this type can be created via
|
|
228
|
+
/experiences/instance.
|
|
229
|
+
|
|
230
|
+
Args:
|
|
231
|
+
extra_headers: Send extra headers
|
|
232
|
+
|
|
233
|
+
extra_query: Add additional query parameters to the request
|
|
234
|
+
|
|
235
|
+
extra_body: Add additional JSON properties to the request
|
|
236
|
+
|
|
237
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
238
|
+
"""
|
|
239
|
+
return await self._post(
|
|
240
|
+
"/api/v1/experiences/types",
|
|
241
|
+
body=await async_maybe_transform(
|
|
242
|
+
{
|
|
243
|
+
"description": description,
|
|
244
|
+
"name": name,
|
|
245
|
+
},
|
|
246
|
+
type_create_params.TypeCreateParams,
|
|
247
|
+
),
|
|
248
|
+
options=make_request_options(
|
|
249
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
250
|
+
),
|
|
251
|
+
cast_to=ExperienceType,
|
|
252
|
+
)
|
|
253
|
+
|
|
254
|
+
async def retrieve(
|
|
255
|
+
self,
|
|
256
|
+
experience_type_id: int,
|
|
257
|
+
*,
|
|
258
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
259
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
260
|
+
extra_headers: Headers | None = None,
|
|
261
|
+
extra_query: Query | None = None,
|
|
262
|
+
extra_body: Body | None = None,
|
|
263
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
264
|
+
) -> ExperienceType:
|
|
265
|
+
"""
|
|
266
|
+
Get details for a specific Experience Type
|
|
267
|
+
|
|
268
|
+
Args:
|
|
269
|
+
extra_headers: Send extra headers
|
|
270
|
+
|
|
271
|
+
extra_query: Add additional query parameters to the request
|
|
272
|
+
|
|
273
|
+
extra_body: Add additional JSON properties to the request
|
|
274
|
+
|
|
275
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
276
|
+
"""
|
|
277
|
+
return await self._get(
|
|
278
|
+
f"/api/v1/experiences/types/{experience_type_id}",
|
|
279
|
+
options=make_request_options(
|
|
280
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
281
|
+
),
|
|
282
|
+
cast_to=ExperienceType,
|
|
283
|
+
)
|
|
284
|
+
|
|
285
|
+
async def update(
|
|
286
|
+
self,
|
|
287
|
+
experience_type_id: int,
|
|
288
|
+
*,
|
|
289
|
+
description: Optional[str] | NotGiven = NOT_GIVEN,
|
|
290
|
+
name: Optional[str] | NotGiven = NOT_GIVEN,
|
|
291
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
292
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
293
|
+
extra_headers: Headers | None = None,
|
|
294
|
+
extra_query: Query | None = None,
|
|
295
|
+
extra_body: Body | None = None,
|
|
296
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
297
|
+
) -> ExperienceType:
|
|
298
|
+
"""
|
|
299
|
+
Updates an existing experience type.
|
|
300
|
+
|
|
301
|
+
Args:
|
|
302
|
+
extra_headers: Send extra headers
|
|
303
|
+
|
|
304
|
+
extra_query: Add additional query parameters to the request
|
|
305
|
+
|
|
306
|
+
extra_body: Add additional JSON properties to the request
|
|
307
|
+
|
|
308
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
309
|
+
"""
|
|
310
|
+
return await self._patch(
|
|
311
|
+
f"/api/v1/experiences/types/{experience_type_id}",
|
|
312
|
+
body=await async_maybe_transform(
|
|
313
|
+
{
|
|
314
|
+
"description": description,
|
|
315
|
+
"name": name,
|
|
316
|
+
},
|
|
317
|
+
type_update_params.TypeUpdateParams,
|
|
318
|
+
),
|
|
319
|
+
options=make_request_options(
|
|
320
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
321
|
+
),
|
|
322
|
+
cast_to=ExperienceType,
|
|
323
|
+
)
|
|
324
|
+
|
|
325
|
+
async def list(
|
|
326
|
+
self,
|
|
327
|
+
*,
|
|
328
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
329
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
330
|
+
extra_headers: Headers | None = None,
|
|
331
|
+
extra_query: Query | None = None,
|
|
332
|
+
extra_body: Body | None = None,
|
|
333
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
334
|
+
) -> TypeListResponse:
|
|
335
|
+
"""Get all Experience Types"""
|
|
336
|
+
return await self._get(
|
|
337
|
+
"/api/v1/experiences/types",
|
|
338
|
+
options=make_request_options(
|
|
339
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
340
|
+
),
|
|
341
|
+
cast_to=TypeListResponse,
|
|
342
|
+
)
|
|
343
|
+
|
|
344
|
+
async def delete(
|
|
345
|
+
self,
|
|
346
|
+
experience_type_id: int,
|
|
347
|
+
*,
|
|
348
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
349
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
350
|
+
extra_headers: Headers | None = None,
|
|
351
|
+
extra_query: Query | None = None,
|
|
352
|
+
extra_body: Body | None = None,
|
|
353
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
354
|
+
) -> ExperienceType:
|
|
355
|
+
"""Deletes an experience type.
|
|
356
|
+
|
|
357
|
+
This will remove visiblity of this type from all
|
|
358
|
+
dashboard stats.
|
|
359
|
+
|
|
360
|
+
Args:
|
|
361
|
+
extra_headers: Send extra headers
|
|
362
|
+
|
|
363
|
+
extra_query: Add additional query parameters to the request
|
|
364
|
+
|
|
365
|
+
extra_body: Add additional JSON properties to the request
|
|
366
|
+
|
|
367
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
368
|
+
"""
|
|
369
|
+
return await self._delete(
|
|
370
|
+
f"/api/v1/experiences/types/{experience_type_id}",
|
|
371
|
+
options=make_request_options(
|
|
372
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
373
|
+
),
|
|
374
|
+
cast_to=ExperienceType,
|
|
375
|
+
)
|
|
376
|
+
|
|
377
|
+
|
|
378
|
+
class TypesResourceWithRawResponse:
|
|
379
|
+
def __init__(self, types: TypesResource) -> None:
|
|
380
|
+
self._types = types
|
|
381
|
+
|
|
382
|
+
self.create = to_raw_response_wrapper(
|
|
383
|
+
types.create,
|
|
384
|
+
)
|
|
385
|
+
self.retrieve = to_raw_response_wrapper(
|
|
386
|
+
types.retrieve,
|
|
387
|
+
)
|
|
388
|
+
self.update = to_raw_response_wrapper(
|
|
389
|
+
types.update,
|
|
390
|
+
)
|
|
391
|
+
self.list = to_raw_response_wrapper(
|
|
392
|
+
types.list,
|
|
393
|
+
)
|
|
394
|
+
self.delete = to_raw_response_wrapper(
|
|
395
|
+
types.delete,
|
|
396
|
+
)
|
|
397
|
+
|
|
398
|
+
|
|
399
|
+
class AsyncTypesResourceWithRawResponse:
|
|
400
|
+
def __init__(self, types: AsyncTypesResource) -> None:
|
|
401
|
+
self._types = types
|
|
402
|
+
|
|
403
|
+
self.create = async_to_raw_response_wrapper(
|
|
404
|
+
types.create,
|
|
405
|
+
)
|
|
406
|
+
self.retrieve = async_to_raw_response_wrapper(
|
|
407
|
+
types.retrieve,
|
|
408
|
+
)
|
|
409
|
+
self.update = async_to_raw_response_wrapper(
|
|
410
|
+
types.update,
|
|
411
|
+
)
|
|
412
|
+
self.list = async_to_raw_response_wrapper(
|
|
413
|
+
types.list,
|
|
414
|
+
)
|
|
415
|
+
self.delete = async_to_raw_response_wrapper(
|
|
416
|
+
types.delete,
|
|
417
|
+
)
|
|
418
|
+
|
|
419
|
+
|
|
420
|
+
class TypesResourceWithStreamingResponse:
|
|
421
|
+
def __init__(self, types: TypesResource) -> None:
|
|
422
|
+
self._types = types
|
|
423
|
+
|
|
424
|
+
self.create = to_streamed_response_wrapper(
|
|
425
|
+
types.create,
|
|
426
|
+
)
|
|
427
|
+
self.retrieve = to_streamed_response_wrapper(
|
|
428
|
+
types.retrieve,
|
|
429
|
+
)
|
|
430
|
+
self.update = to_streamed_response_wrapper(
|
|
431
|
+
types.update,
|
|
432
|
+
)
|
|
433
|
+
self.list = to_streamed_response_wrapper(
|
|
434
|
+
types.list,
|
|
435
|
+
)
|
|
436
|
+
self.delete = to_streamed_response_wrapper(
|
|
437
|
+
types.delete,
|
|
438
|
+
)
|
|
439
|
+
|
|
440
|
+
|
|
441
|
+
class AsyncTypesResourceWithStreamingResponse:
|
|
442
|
+
def __init__(self, types: AsyncTypesResource) -> None:
|
|
443
|
+
self._types = types
|
|
444
|
+
|
|
445
|
+
self.create = async_to_streamed_response_wrapper(
|
|
446
|
+
types.create,
|
|
447
|
+
)
|
|
448
|
+
self.retrieve = async_to_streamed_response_wrapper(
|
|
449
|
+
types.retrieve,
|
|
450
|
+
)
|
|
451
|
+
self.update = async_to_streamed_response_wrapper(
|
|
452
|
+
types.update,
|
|
453
|
+
)
|
|
454
|
+
self.list = async_to_streamed_response_wrapper(
|
|
455
|
+
types.list,
|
|
456
|
+
)
|
|
457
|
+
self.delete = async_to_streamed_response_wrapper(
|
|
458
|
+
types.delete,
|
|
459
|
+
)
|
payi/resources/ingest.py
CHANGED
|
@@ -24,7 +24,6 @@ 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_units_param import IngestUnitsParam
|
|
28
27
|
from ..types.bulk_ingest_response import BulkIngestResponse
|
|
29
28
|
|
|
30
29
|
__all__ = ["IngestResource", "AsyncIngestResource"]
|
|
@@ -42,7 +41,7 @@ class IngestResource(SyncAPIResource):
|
|
|
42
41
|
def bulk(
|
|
43
42
|
self,
|
|
44
43
|
*,
|
|
45
|
-
|
|
44
|
+
events: Iterable[ingest_bulk_params.Event],
|
|
46
45
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
47
46
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
48
47
|
extra_headers: Headers | None = None,
|
|
@@ -69,10 +68,10 @@ class IngestResource(SyncAPIResource):
|
|
|
69
68
|
"/api/v1/ingest/bulk",
|
|
70
69
|
body=cast(Dict[str, object], maybe_transform(
|
|
71
70
|
{
|
|
72
|
-
"
|
|
71
|
+
"events": events,
|
|
73
72
|
},
|
|
74
73
|
ingest_bulk_params.IngestBulkParams)
|
|
75
|
-
)["
|
|
74
|
+
)["events"],
|
|
76
75
|
options=make_request_options(
|
|
77
76
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
78
77
|
),
|
|
@@ -183,7 +182,7 @@ class AsyncIngestResource(AsyncAPIResource):
|
|
|
183
182
|
async def bulk(
|
|
184
183
|
self,
|
|
185
184
|
*,
|
|
186
|
-
|
|
185
|
+
events: Iterable[ingest_bulk_params.Event],
|
|
187
186
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
188
187
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
189
188
|
extra_headers: Headers | None = None,
|
|
@@ -210,10 +209,10 @@ class AsyncIngestResource(AsyncAPIResource):
|
|
|
210
209
|
body= cast(Dict[str, object],
|
|
211
210
|
await async_maybe_transform(
|
|
212
211
|
{
|
|
213
|
-
"
|
|
212
|
+
"events": events,
|
|
214
213
|
},
|
|
215
214
|
ingest_bulk_params.IngestBulkParams)
|
|
216
|
-
)["
|
|
215
|
+
)["events"],
|
|
217
216
|
options=make_request_options(
|
|
218
217
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
219
218
|
),
|
payi/types/__init__.py
CHANGED
|
@@ -13,7 +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 .
|
|
16
|
+
from .experience_instance import ExperienceInstance as ExperienceInstance
|
|
17
17
|
from .ingest_units_params import IngestUnitsParams as IngestUnitsParams
|
|
18
18
|
from .budget_create_params import BudgetCreateParams as BudgetCreateParams
|
|
19
19
|
from .budget_update_params import BudgetUpdateParams as BudgetUpdateParams
|
payi/types/budget_list_params.py
CHANGED
|
@@ -2,22 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
from typing_extensions import
|
|
6
|
-
|
|
7
|
-
from .._utils import PropertyInfo
|
|
5
|
+
from typing_extensions import TypedDict
|
|
8
6
|
|
|
9
7
|
__all__ = ["BudgetListParams"]
|
|
10
8
|
|
|
11
9
|
|
|
12
10
|
class BudgetListParams(TypedDict, total=False):
|
|
13
|
-
budget_name:
|
|
11
|
+
budget_name: str
|
|
14
12
|
|
|
15
|
-
page_number:
|
|
13
|
+
page_number: int
|
|
16
14
|
|
|
17
|
-
page_size:
|
|
15
|
+
page_size: int
|
|
18
16
|
|
|
19
|
-
sort_ascending:
|
|
17
|
+
sort_ascending: bool
|
|
20
18
|
|
|
21
|
-
sort_by:
|
|
19
|
+
sort_by: str
|
|
22
20
|
|
|
23
|
-
tags:
|
|
21
|
+
tags: str
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
from typing import List
|
|
4
|
+
from typing_extensions import TypeAlias
|
|
4
5
|
|
|
5
6
|
from .budget_tags import BudgetTags
|
|
6
7
|
|
|
7
8
|
__all__ = ["TagCreateResponse"]
|
|
8
9
|
|
|
9
|
-
TagCreateResponse = List[BudgetTags]
|
|
10
|
+
TagCreateResponse: TypeAlias = List[BudgetTags]
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
from typing import List
|
|
4
|
+
from typing_extensions import TypeAlias
|
|
4
5
|
|
|
5
6
|
from .budget_tags import BudgetTags
|
|
6
7
|
|
|
7
8
|
__all__ = ["TagDeleteResponse"]
|
|
8
9
|
|
|
9
|
-
TagDeleteResponse = List[BudgetTags]
|
|
10
|
+
TagDeleteResponse: TypeAlias = List[BudgetTags]
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
from typing import List
|
|
4
|
+
from typing_extensions import TypeAlias
|
|
4
5
|
|
|
5
6
|
from .budget_tags import BudgetTags
|
|
6
7
|
|
|
7
8
|
__all__ = ["TagListResponse"]
|
|
8
9
|
|
|
9
|
-
TagListResponse = List[BudgetTags]
|
|
10
|
+
TagListResponse: TypeAlias = List[BudgetTags]
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
from typing import List
|
|
4
|
+
from typing_extensions import TypeAlias
|
|
4
5
|
|
|
5
6
|
from .budget_tags import BudgetTags
|
|
6
7
|
|
|
7
8
|
__all__ = ["TagRemoveResponse"]
|
|
8
9
|
|
|
9
|
-
TagRemoveResponse = List[BudgetTags]
|
|
10
|
+
TagRemoveResponse: TypeAlias = List[BudgetTags]
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
from typing import List
|
|
4
|
+
from typing_extensions import TypeAlias
|
|
4
5
|
|
|
5
6
|
from .budget_tags import BudgetTags
|
|
6
7
|
|
|
7
8
|
__all__ = ["TagUpdateResponse"]
|
|
8
9
|
|
|
9
|
-
TagUpdateResponse = List[BudgetTags]
|
|
10
|
+
TagUpdateResponse: TypeAlias = List[BudgetTags]
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
from typing import List
|
|
4
|
+
from typing_extensions import TypeAlias
|
|
4
5
|
|
|
5
6
|
from ..category_resource_response import CategoryResourceResponse
|
|
6
7
|
|
|
7
8
|
__all__ = ["ResourceListResponse"]
|
|
8
9
|
|
|
9
|
-
ResourceListResponse = List[CategoryResourceResponse]
|
|
10
|
+
ResourceListResponse: TypeAlias = List[CategoryResourceResponse]
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
from typing import List
|
|
4
|
+
from typing_extensions import TypeAlias
|
|
4
5
|
|
|
5
6
|
from .category_resource_response import CategoryResourceResponse
|
|
6
7
|
|
|
7
8
|
__all__ = ["CategoryDeleteResourceResponse"]
|
|
8
9
|
|
|
9
|
-
CategoryDeleteResourceResponse = List[CategoryResourceResponse]
|
|
10
|
+
CategoryDeleteResourceResponse: TypeAlias = List[CategoryResourceResponse]
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
from typing import Dict, List
|
|
4
|
+
from typing_extensions import TypeAlias
|
|
4
5
|
|
|
5
6
|
from .category_resource_response import CategoryResourceResponse
|
|
6
7
|
|
|
7
8
|
__all__ = ["CategoryDeleteResponse"]
|
|
8
9
|
|
|
9
|
-
CategoryDeleteResponse = Dict[str, List[CategoryResourceResponse]]
|
|
10
|
+
CategoryDeleteResponse: TypeAlias = Dict[str, List[CategoryResourceResponse]]
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
from typing import List
|
|
4
|
+
from typing_extensions import TypeAlias
|
|
4
5
|
|
|
5
6
|
from .category_resource_response import CategoryResourceResponse
|
|
6
7
|
|
|
7
8
|
__all__ = ["CategoryListResourcesResponse"]
|
|
8
9
|
|
|
9
|
-
CategoryListResourcesResponse = List[CategoryResourceResponse]
|
|
10
|
+
CategoryListResourcesResponse: TypeAlias = List[CategoryResourceResponse]
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
from typing import List
|
|
4
|
+
from typing_extensions import TypeAlias
|
|
4
5
|
|
|
5
6
|
from .category_response import CategoryResponse
|
|
6
7
|
|
|
7
8
|
__all__ = ["CategoryListResponse"]
|
|
8
9
|
|
|
9
|
-
CategoryListResponse = List[CategoryResponse]
|
|
10
|
+
CategoryListResponse: TypeAlias = List[CategoryResponse]
|