payi 0.1.0a34__py3-none-any.whl → 0.1.0a36__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.

Files changed (36) hide show
  1. payi/_base_client.py +6 -0
  2. payi/_models.py +9 -5
  3. payi/_response.py +9 -3
  4. payi/_version.py +1 -1
  5. payi/lib/AnthropicInstrumentor.py +97 -0
  6. payi/lib/Instruments.py +7 -0
  7. payi/lib/OpenAIInstrumentor.py +89 -0
  8. payi/lib/Stopwatch.py +27 -0
  9. payi/lib/helpers.py +14 -9
  10. payi/lib/instrument.py +514 -0
  11. payi/resources/billing_models.py +2 -2
  12. payi/resources/categories/categories.py +2 -2
  13. payi/resources/categories/resources.py +2 -2
  14. payi/resources/experiences/__init__.py +0 -14
  15. payi/resources/experiences/experiences.py +2 -34
  16. payi/resources/experiences/properties.py +4 -4
  17. payi/resources/experiences/types.py +2 -2
  18. payi/resources/ingest.py +45 -47
  19. payi/resources/limits/limits.py +2 -2
  20. payi/resources/limits/tags.py +2 -2
  21. payi/resources/price_modifiers.py +2 -2
  22. payi/resources/requests/properties.py +4 -4
  23. payi/resources/requests/requests.py +2 -2
  24. payi/types/experiences/__init__.py +0 -2
  25. payi/types/ingest_bulk_params.py +1 -1
  26. payi/types/ingest_event_param.py +18 -8
  27. payi/types/ingest_units_params.py +19 -8
  28. payi/types/limit_history_response.py +1 -1
  29. payi/types/shared/evaluation_response.py +0 -1
  30. {payi-0.1.0a34.dist-info → payi-0.1.0a36.dist-info}/METADATA +12 -12
  31. {payi-0.1.0a34.dist-info → payi-0.1.0a36.dist-info}/RECORD +33 -31
  32. payi/resources/experiences/csat.py +0 -188
  33. payi/types/experiences/csat_create_params.py +0 -14
  34. payi/types/experiences/csat_response.py +0 -10
  35. {payi-0.1.0a34.dist-info → payi-0.1.0a36.dist-info}/WHEEL +0 -0
  36. {payi-0.1.0a34.dist-info → payi-0.1.0a36.dist-info}/licenses/LICENSE +0 -0
@@ -1,17 +1,17 @@
1
1
  payi/__init__.py,sha256=_eeZx9fx2Wp81adXh7qrpkmXCso7TiRSvIlLkQ0sQhY,2399
2
- payi/_base_client.py,sha256=s3JMTpYuiwtp-jn6iB79v4iuCc29C1Rr38el1IXMtHs,68034
2
+ payi/_base_client.py,sha256=CiHJoJuzSweHB7oidXWIlWdU0vrLCpPc9hMlj_S-anE,68128
3
3
  payi/_client.py,sha256=aUtMEmV02nTs3_pYYAR-OchCkofUHeXhhRs43tyDHLE,18760
4
4
  payi/_compat.py,sha256=VWemUKbj6DDkQ-O4baSpHVLJafotzeXmCQGJugfVTIw,6580
5
5
  payi/_constants.py,sha256=JE8kyZa2Q4NK_i4fO--8siEYTzeHnT0fYbOFDgDP4uk,464
6
6
  payi/_exceptions.py,sha256=ItygKNrNXIVY0H6LsGVZvFuAHB3Vtm_VZXmWzCnpHy0,3216
7
7
  payi/_files.py,sha256=mf4dOgL4b0ryyZlbqLhggD3GVgDf6XxdGFAgce01ugE,3549
8
- payi/_models.py,sha256=iumFIitiWZTGITgF2nwOmEPIJGIEeJaUXhDlpaSN9Wg,28589
8
+ payi/_models.py,sha256=B6f-C-F-PbDp3jRKCLksaAS9osC2g1xs7DpoZV1dlUE,28659
9
9
  payi/_qs.py,sha256=AOkSz4rHtK4YI3ZU_kzea-zpwBUgEY8WniGmTPyEimc,4846
10
10
  payi/_resource.py,sha256=j2jIkTr8OIC8sU6-05nxSaCyj4MaFlbZrwlyg4_xJos,1088
11
- payi/_response.py,sha256=FnusjH7NI-PDlV8Tzwho9X71ua7kSfJbtio3WET4hQQ,28653
11
+ payi/_response.py,sha256=CfrNS_3wbL8o9dRyRVfZQ5E1GUlA4CUIUEK8olmfGqE,28777
12
12
  payi/_streaming.py,sha256=Z_wIyo206T6Jqh2rolFg2VXZgX24PahLmpURp0-NssU,10092
13
13
  payi/_types.py,sha256=2mbMK86K3W1aMTW7sOGQ-VND6-A2IuXKm8p4sYFztBU,6141
14
- payi/_version.py,sha256=M4dvaz5wNwzNWCou3S_apqSjbmVYxS-72bf6CzU6-84,165
14
+ payi/_version.py,sha256=WXEUS3siq-XLGD6ggHrJ2yahxSKu9QmeQ9tSwTyAGos,165
15
15
  payi/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
16
16
  payi/_utils/__init__.py,sha256=PNZ_QJuzZEgyYXqkO1HVhGkj5IU9bglVUcw7H-Knjzw,2062
17
17
  payi/_utils/_logs.py,sha256=fmnf5D9TOgkgZKfgYmSa3PiUc3SZgkchn6CzJUeo0SQ,768
@@ -23,25 +23,29 @@ payi/_utils/_transform.py,sha256=Dkkyr7OveGmOolepcvXmVJWE3kqim4b0nM0h7yWbgeY,134
23
23
  payi/_utils/_typing.py,sha256=nTJz0jcrQbEgxwy4TtAkNxuU0QHHlmc6mQtA6vIR8tg,4501
24
24
  payi/_utils/_utils.py,sha256=8UmbPOy_AAr2uUjjFui-VZSrVBHRj6bfNEKRp5YZP2A,12004
25
25
  payi/lib/.keep,sha256=wuNrz-5SXo3jJaJOJgz4vFHM41YH_g20F5cRQo0vLes,224
26
- payi/lib/helpers.py,sha256=mmebWb1pgHhUs61pRX4sc3uZuSjjOJKej5oNBxwptRM,1472
26
+ payi/lib/AnthropicInstrumentor.py,sha256=aJDG90CeOmPNPq49UXm4yc59hoI1zVI406fNGeT_n8U,3149
27
+ payi/lib/Instruments.py,sha256=cyL2jxjpRluP9rN8Vn1nmVXq2NNLdZuFIsHMQWWqat4,115
28
+ payi/lib/OpenAIInstrumentor.py,sha256=eABTqxFLP109fOto33rBbXLh0FdQPh0a9VoMG4d6zGo,2575
29
+ payi/lib/Stopwatch.py,sha256=vFyGVRvkppamP7W0IuZyypKLMIaqjhB7fcRG0dNyfnQ,757
30
+ payi/lib/helpers.py,sha256=ZgkY8UE2YRc7ok2Pmxg_T9UMqKI8D8542JY3CP8RZCM,1597
31
+ payi/lib/instrument.py,sha256=Mm1_RzVw0qZKeYrVzYo_3gj6MLITDv-IQl51OFDob3g,18645
27
32
  payi/resources/__init__.py,sha256=isHGXSl9kOrZDduKrX3UenTwrdTpuKJVBjw6NYSBV20,3592
28
- payi/resources/billing_models.py,sha256=6gNDCHOujPkDdwuvm924IYTDiCMmhsPGQb2XgAg0vak,20160
29
- payi/resources/ingest.py,sha256=un-8pANh1phPsPOJ9DuYC75v7lK6-dDuzTL8sWgNu5c,18797
30
- payi/resources/price_modifiers.py,sha256=m9IX__C7_oPcZzGNpHJ2BsjMkGQ29JZrxLM1nFa8dL4,13483
33
+ payi/resources/billing_models.py,sha256=5w3RfGXtGlyq5vbTw6hQrx1UlzRBtlq8ArcFlf5e3TY,20152
34
+ payi/resources/ingest.py,sha256=F2R-m2dE0wGMHYJwUhD3HvRBqnZK82ZeDf6nPmqWKTU,18479
35
+ payi/resources/price_modifiers.py,sha256=t-k2F_zf2FhoxiqDHAPBPvhSgTjewlJqh50y58FNMuw,13475
31
36
  payi/resources/categories/__init__.py,sha256=w5gMiPdBSzJA_qfoVtFBElaoe8wGf_O63R7R1Spr6Gk,1093
32
- payi/resources/categories/categories.py,sha256=dGsAX313gZlLy5pSRo5_TexD1rPeWU666yHNwiUEFBA,16082
33
- payi/resources/categories/resources.py,sha256=I38bjAvpsLg4LRwJEvnKX3yyr_ErTxkkv12y19sYd7E,18712
34
- payi/resources/experiences/__init__.py,sha256=w7QTV5HMdPeOmmzUXzTefx9cqvzK8Tiqzv1sGUQLNVw,1980
35
- payi/resources/experiences/csat.py,sha256=b56MzdJAII-rHjWTIqDUPS2MlgIVuqGXBOWq4SgBSRI,6611
36
- payi/resources/experiences/experiences.py,sha256=Cbpp9T82Dqjb3TbF0nw53DtDhdbxwGhEWvT7dwohInM,15613
37
- payi/resources/experiences/properties.py,sha256=duso5QRsbakhyCNtjYwaBUaGxSmN0ET4Di27Ojeyqvs,6582
38
- payi/resources/experiences/types.py,sha256=hz5dtgmVD2eEOUU7Y29yA_UGefl77-oT4sAHFVkp-qk,19380
37
+ payi/resources/categories/categories.py,sha256=FohmajDcadMXzhG3Z1HKGkbSImO7rhzQ0olZXHz8z48,16074
38
+ payi/resources/categories/resources.py,sha256=6NriQERc9qsMjsdK3pKVCHClf33T2RFiMF4dp7QI3r4,18704
39
+ payi/resources/experiences/__init__.py,sha256=Qiyv7Tv6UC-wWpb7XVTyHvBRE0IZTnEpykFpP27xKe0,1556
40
+ payi/resources/experiences/experiences.py,sha256=ZqxkGgyfsEAS6AQhHdIdngvNt4zir6-WeB8W_NBY1io,14574
41
+ payi/resources/experiences/properties.py,sha256=CzuxZ0Guf57oFvm8hwjAp6EaALxC8QM84xu_JKHk-Ww,6568
42
+ payi/resources/experiences/types.py,sha256=PcxmOC9AhYghEeLa90iW1Tnda-34V9NgK8KEWdmWMvk,19372
39
43
  payi/resources/limits/__init__.py,sha256=URXh9vglDH-dqbVGk-XcrDa8H5Bg2pgFuVQQecgEtaA,976
40
- payi/resources/limits/limits.py,sha256=wuk78wR2Jk4iqd0wKzteV5c4CwGEyMbu8isUU5iFIa8,25832
41
- payi/resources/limits/tags.py,sha256=z8-ABZWbvL9M_LOPdL-1shhy8QkNFqwY8GKmNETWA7M,18733
44
+ payi/resources/limits/limits.py,sha256=_kpMb05GnyurCoy9F8WELFy1XYd60jhK-rrIByBqvGs,25824
45
+ payi/resources/limits/tags.py,sha256=s_3sIUOLZ-z67ZKRGzcFia6kBxI6POXTneP8hzNZ78o,18725
42
46
  payi/resources/requests/__init__.py,sha256=sWDD18RLuwPB2yzxA29HiwhFdmjZAxzy1qK_4abAZ9E,1080
43
- payi/resources/requests/properties.py,sha256=zLFdNsP-uu4DxYuJc1fX6uKRDmD2wsUp3bLekXw7xsQ,6486
44
- payi/resources/requests/requests.py,sha256=tglPpryoEMbcz7nr1brk72Mi7-julmtmu3PfEhDYwoc,3771
47
+ payi/resources/requests/properties.py,sha256=ZsUeTMKQB4PNXn-jeoRwG-fqwpXzkRQyrFB8GmaNiQg,6466
48
+ payi/resources/requests/requests.py,sha256=c-kt-qnrD17FvSrxBGoSBFbQDBEYDuJrf23-rPGzN1k,3763
45
49
  payi/types/__init__.py,sha256=8qVzwUIYOJjsf9Ugl7no3vWuDYTOZx7qL7XU7TwuSkM,2640
46
50
  payi/types/billing_model.py,sha256=zwpKldc0WvS3iGKtDb9KvfxCd3lkv8F4TwFy3ciGMXg,639
47
51
  payi/types/billing_model_create_params.py,sha256=iVvmCcw0VxXGI_0YolknD3gmDH2lXVydU1dg2IY4dC4,547
@@ -58,12 +62,12 @@ payi/types/cost_data.py,sha256=PDmleZu-HKKOIh_EZ5EgWvpGiTUSJQadsxedWhFVgEI,283
58
62
  payi/types/cost_details.py,sha256=w9p79opEG3kcsjkRRP7niaMcUswdfB4Y7HCkVTcQ1zQ,307
59
63
  payi/types/default_response.py,sha256=o617LpRsCIZHCZxAc5nVI2JQ3HPGZo4gCDvSDkxkIJ8,270
60
64
  payi/types/experience_instance_response.py,sha256=YVWjFpCMAFXsXbU5tgMKrvXHC2F5MsTWdltzRiCUIQA,309
61
- payi/types/ingest_bulk_params.py,sha256=aIsugHkiAe_DnGQ8JVpDUDYr1YNzR5cUY9mMPqusIP0,381
62
- payi/types/ingest_event_param.py,sha256=dn2eImtw07ZuE1nE6zRIwfYIuCWw5BUUPucDMpdsp3w,1352
65
+ payi/types/ingest_bulk_params.py,sha256=d76YwiXaNeltLS3w86ZxLzTKGa7ymGLJDSelaMQGf8Y,382
66
+ payi/types/ingest_event_param.py,sha256=0bmn4SJuEFyPDomjCJg4rqvW3Q1j_3GWQUV2ppjnSuc,1620
63
67
  payi/types/ingest_response.py,sha256=14VWaX91XuVZth1JBHY1djw8nF-0o6EK4N_WPq_p-Wc,1193
64
- payi/types/ingest_units_params.py,sha256=EgNGZfQyUKGO-v5S11JjQF_LkibXaAwbCIcSusb6MdA,1602
68
+ payi/types/ingest_units_params.py,sha256=icx1GeG8wNfQlH5OdbrHQ15yocTGQD6s0JwkMXcrLQU,1871
65
69
  payi/types/limit_create_params.py,sha256=SbNoXHwy24kTTOxDhtcewtKxEkmXtTLYh4CTGysojys,578
66
- payi/types/limit_history_response.py,sha256=VPylW3Y1-7ZQWAgkClLwbxB8C5kywgRm8DzrBKJli9Q,786
70
+ payi/types/limit_history_response.py,sha256=sCx2qKBiHU9X2KrYWV8NZiarYMGurof5GF4QobR2-EU,787
67
71
  payi/types/limit_list_params.py,sha256=iWM67oL53y2IZ7D3Gyy8mdYv-B7vF-rbmRFn7SBUnJk,364
68
72
  payi/types/limit_reset_params.py,sha256=vgqImSM89pRYY0Z2RNrJuQ6WeDX72ZPg3GWpL9EVEKs,476
69
73
  payi/types/limit_response.py,sha256=wYNsbsm5oMtF7W1sTbxlZ5VE0XaS_UbP6y7ZXGKfwqk,752
@@ -78,9 +82,7 @@ payi/types/total_cost_data.py,sha256=FGh5XO5DwAIqkdmW9umyrJ7uD7U0w6CLDimzhP34Dmc
78
82
  payi/types/categories/__init__.py,sha256=HQScxfK3F_J9HYbphrhG6bYb7S6vtrwafLViar5pHcM,285
79
83
  payi/types/categories/resource_create_params.py,sha256=jEXNx_FvWA9D5170Gwf_YUcuAOaDq0RIGaGgPSEsheA,725
80
84
  payi/types/categories/resource_list_response.py,sha256=ODMelDlXvYcwxBsJwTX8miofywUY_JB0OvsFVCKJunU,320
81
- payi/types/experiences/__init__.py,sha256=Gc4p-d906wf_ZiangTJlWZgLjdJt4lVOzTPTB--12MI,735
82
- payi/types/experiences/csat_create_params.py,sha256=YK2M8yuqkZ7p-Z5S_6nSOeALX0Ox6QI8xiA2AzZ9vJI,342
83
- payi/types/experiences/csat_response.py,sha256=tRJepzTgOPoeOEtm6leCCcbzwl8QJtL57mWlBk9ni3k,202
85
+ payi/types/experiences/__init__.py,sha256=-3_HQPYDVAP6g9e289iSBPU8kmEUt4WPNEbV1n4v5Ow,610
84
86
  payi/types/experiences/experience_type.py,sha256=1L08GHoLAfdBwE691RidkHIukpyqqO2_toL5CcWxE4k,315
85
87
  payi/types/experiences/properties_response.py,sha256=HpFNtxl_OjoMCs24xPVZLKe3FwCVcNkcRs0LsQKLrHM,259
86
88
  payi/types/experiences/property_create_params.py,sha256=6v1L_4pj5N5k386cbtjSAWr2QJw---WUJ5lyshRnMwc,328
@@ -101,8 +103,8 @@ payi/types/limits/tag_update_response.py,sha256=xLa4aU4eVhNmIaQTsCyEDjx1vatBACFi
101
103
  payi/types/requests/__init__.py,sha256=K4qfrWMIIg1-UNB0Vu5UdGEmf6TWoF-i3gPc_LT78D8,204
102
104
  payi/types/requests/property_create_params.py,sha256=6v1L_4pj5N5k386cbtjSAWr2QJw---WUJ5lyshRnMwc,328
103
105
  payi/types/shared/__init__.py,sha256=zgBdtU5-a1ee8l5ABWyzuELwWRTKOCCcOx7gbCgdE4A,161
104
- payi/types/shared/evaluation_response.py,sha256=V1HnUI1NeXdwZKJmlN_jhOC2nJPFTw1jjISWuqlIi0E,215
105
- payi-0.1.0a34.dist-info/METADATA,sha256=_wqrA1-CPIE70zN6uu9k0gWzXo9lQhSzuCna6TLznzo,12584
106
- payi-0.1.0a34.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
107
- payi-0.1.0a34.dist-info/licenses/LICENSE,sha256=CQt03aM-P4a3Yg5qBg3JSLVoQS3smMyvx7tYg_6V7Gk,11334
108
- payi-0.1.0a34.dist-info/RECORD,,
106
+ payi/types/shared/evaluation_response.py,sha256=ejEToMA57PUu1SldEtJ5z9r4fAO3U0tvdjbsyIoVX1s,214
107
+ payi-0.1.0a36.dist-info/METADATA,sha256=nKLBtCqXxjNSWv1jgbXfj9AWaCWGXe3y8HslbJnzdMc,12594
108
+ payi-0.1.0a36.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
109
+ payi-0.1.0a36.dist-info/licenses/LICENSE,sha256=CQt03aM-P4a3Yg5qBg3JSLVoQS3smMyvx7tYg_6V7Gk,11334
110
+ payi-0.1.0a36.dist-info/RECORD,,
@@ -1,188 +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 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 csat_create_params
24
- from ...types.experiences.csat_response import CsatResponse
25
-
26
- __all__ = ["CsatResource", "AsyncCsatResource"]
27
-
28
-
29
- class CsatResource(SyncAPIResource):
30
- @cached_property
31
- def with_raw_response(self) -> CsatResourceWithRawResponse:
32
- """
33
- This property can be used as a prefix for any HTTP method call to return the
34
- the raw response object instead of the parsed content.
35
-
36
- For more information, see https://www.github.com/Pay-i/pay-i-python#accessing-raw-response-data-eg-headers
37
- """
38
- return CsatResourceWithRawResponse(self)
39
-
40
- @cached_property
41
- def with_streaming_response(self) -> CsatResourceWithStreamingResponse:
42
- """
43
- An alternative to `.with_raw_response` that doesn't eagerly read the response body.
44
-
45
- For more information, see https://www.github.com/Pay-i/pay-i-python#with_streaming_response
46
- """
47
- return CsatResourceWithStreamingResponse(self)
48
-
49
- def create(
50
- self,
51
- experience_id: str,
52
- *,
53
- csat_rating: int,
54
- user_id: Optional[str] | 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
- ) -> CsatResponse:
62
- """
63
- Update an Experience properties
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_id:
75
- raise ValueError(f"Expected a non-empty value for `experience_id` but received {experience_id!r}")
76
- return self._post(
77
- f"/api/v1/experiences/instances/{experience_id}/csat",
78
- body=maybe_transform(
79
- {
80
- "csat_rating": csat_rating,
81
- "user_id": user_id,
82
- },
83
- csat_create_params.CsatCreateParams,
84
- ),
85
- options=make_request_options(
86
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
87
- ),
88
- cast_to=CsatResponse,
89
- )
90
-
91
-
92
- class AsyncCsatResource(AsyncAPIResource):
93
- @cached_property
94
- def with_raw_response(self) -> AsyncCsatResourceWithRawResponse:
95
- """
96
- This property can be used as a prefix for any HTTP method call to return the
97
- the raw response object instead of the parsed content.
98
-
99
- For more information, see https://www.github.com/Pay-i/pay-i-python#accessing-raw-response-data-eg-headers
100
- """
101
- return AsyncCsatResourceWithRawResponse(self)
102
-
103
- @cached_property
104
- def with_streaming_response(self) -> AsyncCsatResourceWithStreamingResponse:
105
- """
106
- An alternative to `.with_raw_response` that doesn't eagerly read the response body.
107
-
108
- For more information, see https://www.github.com/Pay-i/pay-i-python#with_streaming_response
109
- """
110
- return AsyncCsatResourceWithStreamingResponse(self)
111
-
112
- async def create(
113
- self,
114
- experience_id: str,
115
- *,
116
- csat_rating: int,
117
- user_id: Optional[str] | NotGiven = NOT_GIVEN,
118
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
119
- # The extra values given here take precedence over values defined on the client or passed to this method.
120
- extra_headers: Headers | None = None,
121
- extra_query: Query | None = None,
122
- extra_body: Body | None = None,
123
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
124
- ) -> CsatResponse:
125
- """
126
- Update an Experience properties
127
-
128
- Args:
129
- extra_headers: Send extra headers
130
-
131
- extra_query: Add additional query parameters to the request
132
-
133
- extra_body: Add additional JSON properties to the request
134
-
135
- timeout: Override the client-level default timeout for this request, in seconds
136
- """
137
- if not experience_id:
138
- raise ValueError(f"Expected a non-empty value for `experience_id` but received {experience_id!r}")
139
- return await self._post(
140
- f"/api/v1/experiences/instances/{experience_id}/csat",
141
- body=await async_maybe_transform(
142
- {
143
- "csat_rating": csat_rating,
144
- "user_id": user_id,
145
- },
146
- csat_create_params.CsatCreateParams,
147
- ),
148
- options=make_request_options(
149
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
150
- ),
151
- cast_to=CsatResponse,
152
- )
153
-
154
-
155
- class CsatResourceWithRawResponse:
156
- def __init__(self, csat: CsatResource) -> None:
157
- self._csat = csat
158
-
159
- self.create = to_raw_response_wrapper(
160
- csat.create,
161
- )
162
-
163
-
164
- class AsyncCsatResourceWithRawResponse:
165
- def __init__(self, csat: AsyncCsatResource) -> None:
166
- self._csat = csat
167
-
168
- self.create = async_to_raw_response_wrapper(
169
- csat.create,
170
- )
171
-
172
-
173
- class CsatResourceWithStreamingResponse:
174
- def __init__(self, csat: CsatResource) -> None:
175
- self._csat = csat
176
-
177
- self.create = to_streamed_response_wrapper(
178
- csat.create,
179
- )
180
-
181
-
182
- class AsyncCsatResourceWithStreamingResponse:
183
- def __init__(self, csat: AsyncCsatResource) -> None:
184
- self._csat = csat
185
-
186
- self.create = async_to_streamed_response_wrapper(
187
- csat.create,
188
- )
@@ -1,14 +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 Optional
6
- from typing_extensions import Required, TypedDict
7
-
8
- __all__ = ["CsatCreateParams"]
9
-
10
-
11
- class CsatCreateParams(TypedDict, total=False):
12
- csat_rating: Required[int]
13
-
14
- user_id: Optional[str]
@@ -1,10 +0,0 @@
1
- # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
-
4
- from ..._models import BaseModel
5
-
6
- __all__ = ["CsatResponse"]
7
-
8
-
9
- class CsatResponse(BaseModel):
10
- request_id: str