casedev 0.1.0__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.
Files changed (185) hide show
  1. casedev/__init__.py +104 -0
  2. casedev/_base_client.py +1995 -0
  3. casedev/_client.py +560 -0
  4. casedev/_compat.py +219 -0
  5. casedev/_constants.py +14 -0
  6. casedev/_exceptions.py +108 -0
  7. casedev/_files.py +123 -0
  8. casedev/_models.py +857 -0
  9. casedev/_qs.py +150 -0
  10. casedev/_resource.py +43 -0
  11. casedev/_response.py +830 -0
  12. casedev/_streaming.py +333 -0
  13. casedev/_types.py +260 -0
  14. casedev/_utils/__init__.py +64 -0
  15. casedev/_utils/_compat.py +45 -0
  16. casedev/_utils/_datetime_parse.py +136 -0
  17. casedev/_utils/_logs.py +25 -0
  18. casedev/_utils/_proxy.py +65 -0
  19. casedev/_utils/_reflection.py +42 -0
  20. casedev/_utils/_resources_proxy.py +24 -0
  21. casedev/_utils/_streams.py +12 -0
  22. casedev/_utils/_sync.py +58 -0
  23. casedev/_utils/_transform.py +457 -0
  24. casedev/_utils/_typing.py +156 -0
  25. casedev/_utils/_utils.py +421 -0
  26. casedev/_version.py +4 -0
  27. casedev/lib/.keep +4 -0
  28. casedev/py.typed +0 -0
  29. casedev/resources/__init__.py +173 -0
  30. casedev/resources/actions/__init__.py +33 -0
  31. casedev/resources/actions/actions.py +102 -0
  32. casedev/resources/actions/v1.py +640 -0
  33. casedev/resources/compute/__init__.py +33 -0
  34. casedev/resources/compute/compute.py +102 -0
  35. casedev/resources/compute/v1/__init__.py +89 -0
  36. casedev/resources/compute/v1/environments.py +492 -0
  37. casedev/resources/compute/v1/functions.py +278 -0
  38. casedev/resources/compute/v1/invoke.py +216 -0
  39. casedev/resources/compute/v1/runs.py +290 -0
  40. casedev/resources/compute/v1/secrets.py +655 -0
  41. casedev/resources/compute/v1/v1.py +583 -0
  42. casedev/resources/convert/__init__.py +33 -0
  43. casedev/resources/convert/convert.py +102 -0
  44. casedev/resources/convert/v1/__init__.py +33 -0
  45. casedev/resources/convert/v1/jobs.py +254 -0
  46. casedev/resources/convert/v1/v1.py +450 -0
  47. casedev/resources/format/__init__.py +33 -0
  48. casedev/resources/format/format.py +102 -0
  49. casedev/resources/format/v1/__init__.py +33 -0
  50. casedev/resources/format/v1/templates.py +419 -0
  51. casedev/resources/format/v1/v1.py +244 -0
  52. casedev/resources/llm/__init__.py +33 -0
  53. casedev/resources/llm/llm.py +192 -0
  54. casedev/resources/llm/v1/__init__.py +33 -0
  55. casedev/resources/llm/v1/chat.py +243 -0
  56. casedev/resources/llm/v1/v1.py +317 -0
  57. casedev/resources/ocr/__init__.py +33 -0
  58. casedev/resources/ocr/ocr.py +102 -0
  59. casedev/resources/ocr/v1.py +407 -0
  60. casedev/resources/search/__init__.py +33 -0
  61. casedev/resources/search/search.py +102 -0
  62. casedev/resources/search/v1.py +1052 -0
  63. casedev/resources/templates/__init__.py +33 -0
  64. casedev/resources/templates/templates.py +102 -0
  65. casedev/resources/templates/v1.py +633 -0
  66. casedev/resources/vault/__init__.py +47 -0
  67. casedev/resources/vault/graphrag.py +256 -0
  68. casedev/resources/vault/objects.py +571 -0
  69. casedev/resources/vault/vault.py +764 -0
  70. casedev/resources/voice/__init__.py +61 -0
  71. casedev/resources/voice/streaming.py +160 -0
  72. casedev/resources/voice/transcription.py +327 -0
  73. casedev/resources/voice/v1/__init__.py +33 -0
  74. casedev/resources/voice/v1/speak.py +478 -0
  75. casedev/resources/voice/v1/v1.py +290 -0
  76. casedev/resources/voice/voice.py +166 -0
  77. casedev/resources/webhooks/__init__.py +33 -0
  78. casedev/resources/webhooks/v1.py +447 -0
  79. casedev/resources/webhooks/webhooks.py +102 -0
  80. casedev/resources/workflows/__init__.py +33 -0
  81. casedev/resources/workflows/v1.py +1053 -0
  82. casedev/resources/workflows/workflows.py +102 -0
  83. casedev/types/__init__.py +12 -0
  84. casedev/types/actions/__init__.py +8 -0
  85. casedev/types/actions/v1_create_params.py +22 -0
  86. casedev/types/actions/v1_create_response.py +33 -0
  87. casedev/types/actions/v1_execute_params.py +16 -0
  88. casedev/types/actions/v1_execute_response.py +31 -0
  89. casedev/types/compute/__init__.py +7 -0
  90. casedev/types/compute/v1/__init__.py +18 -0
  91. casedev/types/compute/v1/environment_create_params.py +12 -0
  92. casedev/types/compute/v1/environment_create_response.py +34 -0
  93. casedev/types/compute/v1/environment_delete_response.py +11 -0
  94. casedev/types/compute/v1/function_get_logs_params.py +12 -0
  95. casedev/types/compute/v1/function_list_params.py +12 -0
  96. casedev/types/compute/v1/invoke_run_params.py +21 -0
  97. casedev/types/compute/v1/invoke_run_response.py +39 -0
  98. casedev/types/compute/v1/run_list_params.py +18 -0
  99. casedev/types/compute/v1/secret_create_params.py +24 -0
  100. casedev/types/compute/v1/secret_create_response.py +24 -0
  101. casedev/types/compute/v1/secret_delete_group_params.py +18 -0
  102. casedev/types/compute/v1/secret_list_params.py +15 -0
  103. casedev/types/compute/v1/secret_retrieve_group_params.py +12 -0
  104. casedev/types/compute/v1/secret_update_group_params.py +16 -0
  105. casedev/types/compute/v1_deploy_params.py +114 -0
  106. casedev/types/compute/v1_deploy_response.py +30 -0
  107. casedev/types/compute/v1_get_usage_params.py +15 -0
  108. casedev/types/convert/__init__.py +8 -0
  109. casedev/types/convert/v1/__init__.py +3 -0
  110. casedev/types/convert/v1_process_params.py +15 -0
  111. casedev/types/convert/v1_process_response.py +19 -0
  112. casedev/types/convert/v1_webhook_params.py +32 -0
  113. casedev/types/convert/v1_webhook_response.py +13 -0
  114. casedev/types/format/__init__.py +5 -0
  115. casedev/types/format/v1/__init__.py +7 -0
  116. casedev/types/format/v1/template_create_params.py +32 -0
  117. casedev/types/format/v1/template_create_response.py +27 -0
  118. casedev/types/format/v1/template_list_params.py +12 -0
  119. casedev/types/format/v1_create_document_params.py +42 -0
  120. casedev/types/llm/__init__.py +5 -0
  121. casedev/types/llm/v1/__init__.py +6 -0
  122. casedev/types/llm/v1/chat_create_completion_params.py +42 -0
  123. casedev/types/llm/v1/chat_create_completion_response.py +49 -0
  124. casedev/types/llm/v1_create_embedding_params.py +27 -0
  125. casedev/types/ocr/__init__.py +6 -0
  126. casedev/types/ocr/v1_process_params.py +44 -0
  127. casedev/types/ocr/v1_process_response.py +32 -0
  128. casedev/types/search/__init__.py +15 -0
  129. casedev/types/search/v1_answer_params.py +45 -0
  130. casedev/types/search/v1_answer_response.py +35 -0
  131. casedev/types/search/v1_contents_params.py +42 -0
  132. casedev/types/search/v1_contents_response.py +31 -0
  133. casedev/types/search/v1_research_params.py +23 -0
  134. casedev/types/search/v1_research_response.py +20 -0
  135. casedev/types/search/v1_retrieve_research_params.py +15 -0
  136. casedev/types/search/v1_search_params.py +56 -0
  137. casedev/types/search/v1_search_response.py +38 -0
  138. casedev/types/search/v1_similar_params.py +44 -0
  139. casedev/types/search/v1_similar_response.py +33 -0
  140. casedev/types/templates/__init__.py +8 -0
  141. casedev/types/templates/v1_execute_params.py +22 -0
  142. casedev/types/templates/v1_execute_response.py +31 -0
  143. casedev/types/templates/v1_list_params.py +32 -0
  144. casedev/types/templates/v1_search_params.py +18 -0
  145. casedev/types/vault/__init__.py +6 -0
  146. casedev/types/vault/object_create_presigned_url_params.py +22 -0
  147. casedev/types/vault/object_create_presigned_url_response.py +51 -0
  148. casedev/types/vault_create_params.py +20 -0
  149. casedev/types/vault_create_response.py +36 -0
  150. casedev/types/vault_ingest_response.py +26 -0
  151. casedev/types/vault_list_response.py +40 -0
  152. casedev/types/vault_search_params.py +27 -0
  153. casedev/types/vault_search_response.py +53 -0
  154. casedev/types/vault_upload_params.py +26 -0
  155. casedev/types/vault_upload_response.py +39 -0
  156. casedev/types/voice/__init__.py +7 -0
  157. casedev/types/voice/transcription_create_params.py +36 -0
  158. casedev/types/voice/transcription_retrieve_response.py +41 -0
  159. casedev/types/voice/v1/__init__.py +6 -0
  160. casedev/types/voice/v1/speak_create_params.py +59 -0
  161. casedev/types/voice/v1/speak_stream_params.py +58 -0
  162. casedev/types/voice/v1_list_voices_params.py +36 -0
  163. casedev/types/webhooks/__init__.py +6 -0
  164. casedev/types/webhooks/v1_create_params.py +20 -0
  165. casedev/types/webhooks/v1_create_response.py +33 -0
  166. casedev/types/workflows/__init__.py +19 -0
  167. casedev/types/workflows/v1_create_params.py +32 -0
  168. casedev/types/workflows/v1_create_response.py +29 -0
  169. casedev/types/workflows/v1_delete_response.py +13 -0
  170. casedev/types/workflows/v1_deploy_response.py +20 -0
  171. casedev/types/workflows/v1_execute_params.py +12 -0
  172. casedev/types/workflows/v1_execute_response.py +22 -0
  173. casedev/types/workflows/v1_list_executions_params.py +13 -0
  174. casedev/types/workflows/v1_list_executions_response.py +27 -0
  175. casedev/types/workflows/v1_list_params.py +18 -0
  176. casedev/types/workflows/v1_list_response.py +37 -0
  177. casedev/types/workflows/v1_retrieve_execution_response.py +31 -0
  178. casedev/types/workflows/v1_retrieve_response.py +35 -0
  179. casedev/types/workflows/v1_undeploy_response.py +13 -0
  180. casedev/types/workflows/v1_update_params.py +26 -0
  181. casedev/types/workflows/v1_update_response.py +17 -0
  182. casedev-0.1.0.dist-info/METADATA +454 -0
  183. casedev-0.1.0.dist-info/RECORD +185 -0
  184. casedev-0.1.0.dist-info/WHEEL +4 -0
  185. casedev-0.1.0.dist-info/licenses/LICENSE +201 -0
@@ -0,0 +1,447 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ import httpx
6
+
7
+ from ..._types import Body, Omit, Query, Headers, NoneType, NotGiven, SequenceNotStr, omit, not_given
8
+ from ..._utils import maybe_transform, async_maybe_transform
9
+ from ..._compat import cached_property
10
+ from ..._resource import SyncAPIResource, AsyncAPIResource
11
+ from ..._response import (
12
+ to_raw_response_wrapper,
13
+ to_streamed_response_wrapper,
14
+ async_to_raw_response_wrapper,
15
+ async_to_streamed_response_wrapper,
16
+ )
17
+ from ..._base_client import make_request_options
18
+ from ...types.webhooks import v1_create_params
19
+ from ...types.webhooks.v1_create_response import V1CreateResponse
20
+
21
+ __all__ = ["V1Resource", "AsyncV1Resource"]
22
+
23
+
24
+ class V1Resource(SyncAPIResource):
25
+ @cached_property
26
+ def with_raw_response(self) -> V1ResourceWithRawResponse:
27
+ """
28
+ This property can be used as a prefix for any HTTP method call to return
29
+ the raw response object instead of the parsed content.
30
+
31
+ For more information, see https://www.github.com/CaseMark/casedev-python#accessing-raw-response-data-eg-headers
32
+ """
33
+ return V1ResourceWithRawResponse(self)
34
+
35
+ @cached_property
36
+ def with_streaming_response(self) -> V1ResourceWithStreamingResponse:
37
+ """
38
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
39
+
40
+ For more information, see https://www.github.com/CaseMark/casedev-python#with_streaming_response
41
+ """
42
+ return V1ResourceWithStreamingResponse(self)
43
+
44
+ def create(
45
+ self,
46
+ *,
47
+ events: SequenceNotStr[str],
48
+ url: str,
49
+ description: str | Omit = omit,
50
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
51
+ # The extra values given here take precedence over values defined on the client or passed to this method.
52
+ extra_headers: Headers | None = None,
53
+ extra_query: Query | None = None,
54
+ extra_body: Body | None = None,
55
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
56
+ ) -> V1CreateResponse:
57
+ """
58
+ Create a new webhook endpoint to receive real-time notifications for events in
59
+ your Case.dev workspace. Webhooks enable automated workflows by sending HTTP
60
+ POST requests to your specified URL when events occur.
61
+
62
+ **Security**: Webhooks are signed with HMAC-SHA256 using the provided secret.
63
+ The signature is included in the `X-Case-Signature` header.
64
+
65
+ **Available Events**:
66
+
67
+ - `document.processed` - Document OCR/processing completed
68
+ - `vault.updated` - Document added/removed from vault
69
+ - `action.completed` - Workflow action finished
70
+ - `compute.finished` - Compute job completed
71
+
72
+ Args:
73
+ events: Array of event types to subscribe to
74
+
75
+ url: HTTPS URL where webhook events will be sent
76
+
77
+ description: Optional description for the webhook
78
+
79
+ extra_headers: Send extra headers
80
+
81
+ extra_query: Add additional query parameters to the request
82
+
83
+ extra_body: Add additional JSON properties to the request
84
+
85
+ timeout: Override the client-level default timeout for this request, in seconds
86
+ """
87
+ return self._post(
88
+ "/webhooks/v1",
89
+ body=maybe_transform(
90
+ {
91
+ "events": events,
92
+ "url": url,
93
+ "description": description,
94
+ },
95
+ v1_create_params.V1CreateParams,
96
+ ),
97
+ options=make_request_options(
98
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
99
+ ),
100
+ cast_to=V1CreateResponse,
101
+ )
102
+
103
+ def retrieve(
104
+ self,
105
+ id: str,
106
+ *,
107
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
108
+ # The extra values given here take precedence over values defined on the client or passed to this method.
109
+ extra_headers: Headers | None = None,
110
+ extra_query: Query | None = None,
111
+ extra_body: Body | None = None,
112
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
113
+ ) -> None:
114
+ """
115
+ Retrieve detailed information about a specific webhook endpoint, including its
116
+ URL, description, subscribed events, and status.
117
+
118
+ Args:
119
+ extra_headers: Send extra headers
120
+
121
+ extra_query: Add additional query parameters to the request
122
+
123
+ extra_body: Add additional JSON properties to the request
124
+
125
+ timeout: Override the client-level default timeout for this request, in seconds
126
+ """
127
+ if not id:
128
+ raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
129
+ extra_headers = {"Accept": "*/*", **(extra_headers or {})}
130
+ return self._get(
131
+ f"/webhooks/v1/{id}",
132
+ options=make_request_options(
133
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
134
+ ),
135
+ cast_to=NoneType,
136
+ )
137
+
138
+ def list(
139
+ self,
140
+ *,
141
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
142
+ # The extra values given here take precedence over values defined on the client or passed to this method.
143
+ extra_headers: Headers | None = None,
144
+ extra_query: Query | None = None,
145
+ extra_body: Body | None = None,
146
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
147
+ ) -> None:
148
+ """Retrieve all webhook endpoints configured for your organization.
149
+
150
+ Webhooks allow
151
+ you to receive real-time notifications when events occur in your Case.dev
152
+ workspace, such as document processing completion, OCR results, or workflow
153
+ status changes.
154
+ """
155
+ extra_headers = {"Accept": "*/*", **(extra_headers or {})}
156
+ return self._get(
157
+ "/webhooks/v1",
158
+ options=make_request_options(
159
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
160
+ ),
161
+ cast_to=NoneType,
162
+ )
163
+
164
+ def delete(
165
+ self,
166
+ id: str,
167
+ *,
168
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
169
+ # The extra values given here take precedence over values defined on the client or passed to this method.
170
+ extra_headers: Headers | None = None,
171
+ extra_query: Query | None = None,
172
+ extra_body: Body | None = None,
173
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
174
+ ) -> None:
175
+ """Delete a webhook endpoint from your organization.
176
+
177
+ This action is irreversible
178
+ and will stop all webhook deliveries to the specified URL.
179
+
180
+ Args:
181
+ extra_headers: Send extra headers
182
+
183
+ extra_query: Add additional query parameters to the request
184
+
185
+ extra_body: Add additional JSON properties to the request
186
+
187
+ timeout: Override the client-level default timeout for this request, in seconds
188
+ """
189
+ if not id:
190
+ raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
191
+ extra_headers = {"Accept": "*/*", **(extra_headers or {})}
192
+ return self._delete(
193
+ f"/webhooks/v1/{id}",
194
+ options=make_request_options(
195
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
196
+ ),
197
+ cast_to=NoneType,
198
+ )
199
+
200
+
201
+ class AsyncV1Resource(AsyncAPIResource):
202
+ @cached_property
203
+ def with_raw_response(self) -> AsyncV1ResourceWithRawResponse:
204
+ """
205
+ This property can be used as a prefix for any HTTP method call to return
206
+ the raw response object instead of the parsed content.
207
+
208
+ For more information, see https://www.github.com/CaseMark/casedev-python#accessing-raw-response-data-eg-headers
209
+ """
210
+ return AsyncV1ResourceWithRawResponse(self)
211
+
212
+ @cached_property
213
+ def with_streaming_response(self) -> AsyncV1ResourceWithStreamingResponse:
214
+ """
215
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
216
+
217
+ For more information, see https://www.github.com/CaseMark/casedev-python#with_streaming_response
218
+ """
219
+ return AsyncV1ResourceWithStreamingResponse(self)
220
+
221
+ async def create(
222
+ self,
223
+ *,
224
+ events: SequenceNotStr[str],
225
+ url: str,
226
+ description: str | Omit = omit,
227
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
228
+ # The extra values given here take precedence over values defined on the client or passed to this method.
229
+ extra_headers: Headers | None = None,
230
+ extra_query: Query | None = None,
231
+ extra_body: Body | None = None,
232
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
233
+ ) -> V1CreateResponse:
234
+ """
235
+ Create a new webhook endpoint to receive real-time notifications for events in
236
+ your Case.dev workspace. Webhooks enable automated workflows by sending HTTP
237
+ POST requests to your specified URL when events occur.
238
+
239
+ **Security**: Webhooks are signed with HMAC-SHA256 using the provided secret.
240
+ The signature is included in the `X-Case-Signature` header.
241
+
242
+ **Available Events**:
243
+
244
+ - `document.processed` - Document OCR/processing completed
245
+ - `vault.updated` - Document added/removed from vault
246
+ - `action.completed` - Workflow action finished
247
+ - `compute.finished` - Compute job completed
248
+
249
+ Args:
250
+ events: Array of event types to subscribe to
251
+
252
+ url: HTTPS URL where webhook events will be sent
253
+
254
+ description: Optional description for the webhook
255
+
256
+ extra_headers: Send extra headers
257
+
258
+ extra_query: Add additional query parameters to the request
259
+
260
+ extra_body: Add additional JSON properties to the request
261
+
262
+ timeout: Override the client-level default timeout for this request, in seconds
263
+ """
264
+ return await self._post(
265
+ "/webhooks/v1",
266
+ body=await async_maybe_transform(
267
+ {
268
+ "events": events,
269
+ "url": url,
270
+ "description": description,
271
+ },
272
+ v1_create_params.V1CreateParams,
273
+ ),
274
+ options=make_request_options(
275
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
276
+ ),
277
+ cast_to=V1CreateResponse,
278
+ )
279
+
280
+ async def retrieve(
281
+ self,
282
+ id: str,
283
+ *,
284
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
285
+ # The extra values given here take precedence over values defined on the client or passed to this method.
286
+ extra_headers: Headers | None = None,
287
+ extra_query: Query | None = None,
288
+ extra_body: Body | None = None,
289
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
290
+ ) -> None:
291
+ """
292
+ Retrieve detailed information about a specific webhook endpoint, including its
293
+ URL, description, subscribed events, and status.
294
+
295
+ Args:
296
+ extra_headers: Send extra headers
297
+
298
+ extra_query: Add additional query parameters to the request
299
+
300
+ extra_body: Add additional JSON properties to the request
301
+
302
+ timeout: Override the client-level default timeout for this request, in seconds
303
+ """
304
+ if not id:
305
+ raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
306
+ extra_headers = {"Accept": "*/*", **(extra_headers or {})}
307
+ return await self._get(
308
+ f"/webhooks/v1/{id}",
309
+ options=make_request_options(
310
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
311
+ ),
312
+ cast_to=NoneType,
313
+ )
314
+
315
+ async def list(
316
+ self,
317
+ *,
318
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
319
+ # The extra values given here take precedence over values defined on the client or passed to this method.
320
+ extra_headers: Headers | None = None,
321
+ extra_query: Query | None = None,
322
+ extra_body: Body | None = None,
323
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
324
+ ) -> None:
325
+ """Retrieve all webhook endpoints configured for your organization.
326
+
327
+ Webhooks allow
328
+ you to receive real-time notifications when events occur in your Case.dev
329
+ workspace, such as document processing completion, OCR results, or workflow
330
+ status changes.
331
+ """
332
+ extra_headers = {"Accept": "*/*", **(extra_headers or {})}
333
+ return await self._get(
334
+ "/webhooks/v1",
335
+ options=make_request_options(
336
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
337
+ ),
338
+ cast_to=NoneType,
339
+ )
340
+
341
+ async def delete(
342
+ self,
343
+ id: str,
344
+ *,
345
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
346
+ # The extra values given here take precedence over values defined on the client or passed to this method.
347
+ extra_headers: Headers | None = None,
348
+ extra_query: Query | None = None,
349
+ extra_body: Body | None = None,
350
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
351
+ ) -> None:
352
+ """Delete a webhook endpoint from your organization.
353
+
354
+ This action is irreversible
355
+ and will stop all webhook deliveries to the specified URL.
356
+
357
+ Args:
358
+ extra_headers: Send extra headers
359
+
360
+ extra_query: Add additional query parameters to the request
361
+
362
+ extra_body: Add additional JSON properties to the request
363
+
364
+ timeout: Override the client-level default timeout for this request, in seconds
365
+ """
366
+ if not id:
367
+ raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
368
+ extra_headers = {"Accept": "*/*", **(extra_headers or {})}
369
+ return await self._delete(
370
+ f"/webhooks/v1/{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=NoneType,
375
+ )
376
+
377
+
378
+ class V1ResourceWithRawResponse:
379
+ def __init__(self, v1: V1Resource) -> None:
380
+ self._v1 = v1
381
+
382
+ self.create = to_raw_response_wrapper(
383
+ v1.create,
384
+ )
385
+ self.retrieve = to_raw_response_wrapper(
386
+ v1.retrieve,
387
+ )
388
+ self.list = to_raw_response_wrapper(
389
+ v1.list,
390
+ )
391
+ self.delete = to_raw_response_wrapper(
392
+ v1.delete,
393
+ )
394
+
395
+
396
+ class AsyncV1ResourceWithRawResponse:
397
+ def __init__(self, v1: AsyncV1Resource) -> None:
398
+ self._v1 = v1
399
+
400
+ self.create = async_to_raw_response_wrapper(
401
+ v1.create,
402
+ )
403
+ self.retrieve = async_to_raw_response_wrapper(
404
+ v1.retrieve,
405
+ )
406
+ self.list = async_to_raw_response_wrapper(
407
+ v1.list,
408
+ )
409
+ self.delete = async_to_raw_response_wrapper(
410
+ v1.delete,
411
+ )
412
+
413
+
414
+ class V1ResourceWithStreamingResponse:
415
+ def __init__(self, v1: V1Resource) -> None:
416
+ self._v1 = v1
417
+
418
+ self.create = to_streamed_response_wrapper(
419
+ v1.create,
420
+ )
421
+ self.retrieve = to_streamed_response_wrapper(
422
+ v1.retrieve,
423
+ )
424
+ self.list = to_streamed_response_wrapper(
425
+ v1.list,
426
+ )
427
+ self.delete = to_streamed_response_wrapper(
428
+ v1.delete,
429
+ )
430
+
431
+
432
+ class AsyncV1ResourceWithStreamingResponse:
433
+ def __init__(self, v1: AsyncV1Resource) -> None:
434
+ self._v1 = v1
435
+
436
+ self.create = async_to_streamed_response_wrapper(
437
+ v1.create,
438
+ )
439
+ self.retrieve = async_to_streamed_response_wrapper(
440
+ v1.retrieve,
441
+ )
442
+ self.list = async_to_streamed_response_wrapper(
443
+ v1.list,
444
+ )
445
+ self.delete = async_to_streamed_response_wrapper(
446
+ v1.delete,
447
+ )
@@ -0,0 +1,102 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from .v1 import (
6
+ V1Resource,
7
+ AsyncV1Resource,
8
+ V1ResourceWithRawResponse,
9
+ AsyncV1ResourceWithRawResponse,
10
+ V1ResourceWithStreamingResponse,
11
+ AsyncV1ResourceWithStreamingResponse,
12
+ )
13
+ from ..._compat import cached_property
14
+ from ..._resource import SyncAPIResource, AsyncAPIResource
15
+
16
+ __all__ = ["WebhooksResource", "AsyncWebhooksResource"]
17
+
18
+
19
+ class WebhooksResource(SyncAPIResource):
20
+ @cached_property
21
+ def v1(self) -> V1Resource:
22
+ return V1Resource(self._client)
23
+
24
+ @cached_property
25
+ def with_raw_response(self) -> WebhooksResourceWithRawResponse:
26
+ """
27
+ This property can be used as a prefix for any HTTP method call to return
28
+ the raw response object instead of the parsed content.
29
+
30
+ For more information, see https://www.github.com/CaseMark/casedev-python#accessing-raw-response-data-eg-headers
31
+ """
32
+ return WebhooksResourceWithRawResponse(self)
33
+
34
+ @cached_property
35
+ def with_streaming_response(self) -> WebhooksResourceWithStreamingResponse:
36
+ """
37
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
38
+
39
+ For more information, see https://www.github.com/CaseMark/casedev-python#with_streaming_response
40
+ """
41
+ return WebhooksResourceWithStreamingResponse(self)
42
+
43
+
44
+ class AsyncWebhooksResource(AsyncAPIResource):
45
+ @cached_property
46
+ def v1(self) -> AsyncV1Resource:
47
+ return AsyncV1Resource(self._client)
48
+
49
+ @cached_property
50
+ def with_raw_response(self) -> AsyncWebhooksResourceWithRawResponse:
51
+ """
52
+ This property can be used as a prefix for any HTTP method call to return
53
+ the raw response object instead of the parsed content.
54
+
55
+ For more information, see https://www.github.com/CaseMark/casedev-python#accessing-raw-response-data-eg-headers
56
+ """
57
+ return AsyncWebhooksResourceWithRawResponse(self)
58
+
59
+ @cached_property
60
+ def with_streaming_response(self) -> AsyncWebhooksResourceWithStreamingResponse:
61
+ """
62
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
63
+
64
+ For more information, see https://www.github.com/CaseMark/casedev-python#with_streaming_response
65
+ """
66
+ return AsyncWebhooksResourceWithStreamingResponse(self)
67
+
68
+
69
+ class WebhooksResourceWithRawResponse:
70
+ def __init__(self, webhooks: WebhooksResource) -> None:
71
+ self._webhooks = webhooks
72
+
73
+ @cached_property
74
+ def v1(self) -> V1ResourceWithRawResponse:
75
+ return V1ResourceWithRawResponse(self._webhooks.v1)
76
+
77
+
78
+ class AsyncWebhooksResourceWithRawResponse:
79
+ def __init__(self, webhooks: AsyncWebhooksResource) -> None:
80
+ self._webhooks = webhooks
81
+
82
+ @cached_property
83
+ def v1(self) -> AsyncV1ResourceWithRawResponse:
84
+ return AsyncV1ResourceWithRawResponse(self._webhooks.v1)
85
+
86
+
87
+ class WebhooksResourceWithStreamingResponse:
88
+ def __init__(self, webhooks: WebhooksResource) -> None:
89
+ self._webhooks = webhooks
90
+
91
+ @cached_property
92
+ def v1(self) -> V1ResourceWithStreamingResponse:
93
+ return V1ResourceWithStreamingResponse(self._webhooks.v1)
94
+
95
+
96
+ class AsyncWebhooksResourceWithStreamingResponse:
97
+ def __init__(self, webhooks: AsyncWebhooksResource) -> None:
98
+ self._webhooks = webhooks
99
+
100
+ @cached_property
101
+ def v1(self) -> AsyncV1ResourceWithStreamingResponse:
102
+ return AsyncV1ResourceWithStreamingResponse(self._webhooks.v1)
@@ -0,0 +1,33 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from .v1 import (
4
+ V1Resource,
5
+ AsyncV1Resource,
6
+ V1ResourceWithRawResponse,
7
+ AsyncV1ResourceWithRawResponse,
8
+ V1ResourceWithStreamingResponse,
9
+ AsyncV1ResourceWithStreamingResponse,
10
+ )
11
+ from .workflows import (
12
+ WorkflowsResource,
13
+ AsyncWorkflowsResource,
14
+ WorkflowsResourceWithRawResponse,
15
+ AsyncWorkflowsResourceWithRawResponse,
16
+ WorkflowsResourceWithStreamingResponse,
17
+ AsyncWorkflowsResourceWithStreamingResponse,
18
+ )
19
+
20
+ __all__ = [
21
+ "V1Resource",
22
+ "AsyncV1Resource",
23
+ "V1ResourceWithRawResponse",
24
+ "AsyncV1ResourceWithRawResponse",
25
+ "V1ResourceWithStreamingResponse",
26
+ "AsyncV1ResourceWithStreamingResponse",
27
+ "WorkflowsResource",
28
+ "AsyncWorkflowsResource",
29
+ "WorkflowsResourceWithRawResponse",
30
+ "AsyncWorkflowsResourceWithRawResponse",
31
+ "WorkflowsResourceWithStreamingResponse",
32
+ "AsyncWorkflowsResourceWithStreamingResponse",
33
+ ]