Skip to content

Commit f5bb242

Browse files
chore(api): update composite API spec
1 parent c50c6a8 commit f5bb242

3 files changed

Lines changed: 722 additions & 591 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 1822
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-08cb2774b4da40ee1c80957dd5c7d7ab2fecd8652adbfd101af54b1b32fa4494.yml
3-
openapi_spec_hash: 53274fa330f70a5df4364f397444851f
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4a0018e4541274eab118dd64e7218a503e405e80c9a90a2d17acb31b8624fcba.yml
3+
openapi_spec_hash: df9aef9c268b8476afcdecbae7f92de0
44
config_hash: 107e0f1f8a98b007260b319226b88b3c

src/cloudflare/resources/pipelines.py

Lines changed: 131 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
from __future__ import annotations
44

5+
import typing_extensions
56
from typing import Type, Iterable, cast
67

78
import httpx
@@ -47,6 +48,7 @@ def with_streaming_response(self) -> PipelinesResourceWithStreamingResponse:
4748
"""
4849
return PipelinesResourceWithStreamingResponse(self)
4950

51+
@typing_extensions.deprecated("deprecated")
5052
def create(
5153
self,
5254
*,
@@ -61,8 +63,10 @@ def create(
6163
extra_body: Body | None = None,
6264
timeout: float | httpx.Timeout | None | NotGiven = not_given,
6365
) -> PipelineCreateResponse:
64-
"""
65-
Create a new pipeline.
66+
"""[DEPRECATED] Create a new pipeline.
67+
68+
Use the new /pipelines/v1/pipelines endpoint
69+
instead.
6670
6771
Args:
6872
account_id: Specifies the public ID of the account.
@@ -99,6 +103,7 @@ def create(
99103
cast_to=cast(Type[PipelineCreateResponse], ResultWrapper[PipelineCreateResponse]),
100104
)
101105

106+
@typing_extensions.deprecated("deprecated")
102107
def update(
103108
self,
104109
pipeline_name: str,
@@ -114,8 +119,10 @@ def update(
114119
extra_body: Body | None = None,
115120
timeout: float | httpx.Timeout | None | NotGiven = not_given,
116121
) -> PipelineUpdateResponse:
117-
"""
118-
Update an existing pipeline.
122+
"""[DEPRECATED] Update an existing pipeline.
123+
124+
Use the new /pipelines/v1/pipelines
125+
endpoint instead.
119126
120127
Args:
121128
account_id: Specifies the public ID of the account.
@@ -156,6 +163,7 @@ def update(
156163
cast_to=cast(Type[PipelineUpdateResponse], ResultWrapper[PipelineUpdateResponse]),
157164
)
158165

166+
@typing_extensions.deprecated("deprecated")
159167
def list(
160168
self,
161169
*,
@@ -170,8 +178,10 @@ def list(
170178
extra_body: Body | None = None,
171179
timeout: float | httpx.Timeout | None | NotGiven = not_given,
172180
) -> PipelineListResponse:
173-
"""
174-
List, filter, and paginate pipelines in an account.
181+
"""[DEPRECATED] List, filter, and paginate pipelines in an account.
182+
183+
Use the new
184+
/pipelines/v1/pipelines endpoint instead.
175185
176186
Args:
177187
account_id: Specifies the public ID of the account.
@@ -211,6 +221,7 @@ def list(
211221
cast_to=PipelineListResponse,
212222
)
213223

224+
@typing_extensions.deprecated("deprecated")
214225
def delete(
215226
self,
216227
pipeline_name: str,
@@ -223,8 +234,10 @@ def delete(
223234
extra_body: Body | None = None,
224235
timeout: float | httpx.Timeout | None | NotGiven = not_given,
225236
) -> None:
226-
"""
227-
Delete a pipeline.
237+
"""[DEPRECATED] Delete a pipeline.
238+
239+
Use the new /pipelines/v1/pipelines endpoint
240+
instead.
228241
229242
Args:
230243
account_id: Specifies the public ID of the account.
@@ -252,6 +265,7 @@ def delete(
252265
cast_to=NoneType,
253266
)
254267

268+
@typing_extensions.deprecated("deprecated")
255269
def get(
256270
self,
257271
pipeline_name: str,
@@ -264,8 +278,10 @@ def get(
264278
extra_body: Body | None = None,
265279
timeout: float | httpx.Timeout | None | NotGiven = not_given,
266280
) -> PipelineGetResponse:
267-
"""
268-
Get configuration of a pipeline.
281+
"""[DEPRECATED] Get configuration of a pipeline.
282+
283+
Use the new
284+
/pipelines/v1/pipelines endpoint instead.
269285
270286
Args:
271287
account_id: Specifies the public ID of the account.
@@ -317,6 +333,7 @@ def with_streaming_response(self) -> AsyncPipelinesResourceWithStreamingResponse
317333
"""
318334
return AsyncPipelinesResourceWithStreamingResponse(self)
319335

336+
@typing_extensions.deprecated("deprecated")
320337
async def create(
321338
self,
322339
*,
@@ -331,8 +348,10 @@ async def create(
331348
extra_body: Body | None = None,
332349
timeout: float | httpx.Timeout | None | NotGiven = not_given,
333350
) -> PipelineCreateResponse:
334-
"""
335-
Create a new pipeline.
351+
"""[DEPRECATED] Create a new pipeline.
352+
353+
Use the new /pipelines/v1/pipelines endpoint
354+
instead.
336355
337356
Args:
338357
account_id: Specifies the public ID of the account.
@@ -369,6 +388,7 @@ async def create(
369388
cast_to=cast(Type[PipelineCreateResponse], ResultWrapper[PipelineCreateResponse]),
370389
)
371390

391+
@typing_extensions.deprecated("deprecated")
372392
async def update(
373393
self,
374394
pipeline_name: str,
@@ -384,8 +404,10 @@ async def update(
384404
extra_body: Body | None = None,
385405
timeout: float | httpx.Timeout | None | NotGiven = not_given,
386406
) -> PipelineUpdateResponse:
387-
"""
388-
Update an existing pipeline.
407+
"""[DEPRECATED] Update an existing pipeline.
408+
409+
Use the new /pipelines/v1/pipelines
410+
endpoint instead.
389411
390412
Args:
391413
account_id: Specifies the public ID of the account.
@@ -426,6 +448,7 @@ async def update(
426448
cast_to=cast(Type[PipelineUpdateResponse], ResultWrapper[PipelineUpdateResponse]),
427449
)
428450

451+
@typing_extensions.deprecated("deprecated")
429452
async def list(
430453
self,
431454
*,
@@ -440,8 +463,10 @@ async def list(
440463
extra_body: Body | None = None,
441464
timeout: float | httpx.Timeout | None | NotGiven = not_given,
442465
) -> PipelineListResponse:
443-
"""
444-
List, filter, and paginate pipelines in an account.
466+
"""[DEPRECATED] List, filter, and paginate pipelines in an account.
467+
468+
Use the new
469+
/pipelines/v1/pipelines endpoint instead.
445470
446471
Args:
447472
account_id: Specifies the public ID of the account.
@@ -481,6 +506,7 @@ async def list(
481506
cast_to=PipelineListResponse,
482507
)
483508

509+
@typing_extensions.deprecated("deprecated")
484510
async def delete(
485511
self,
486512
pipeline_name: str,
@@ -493,8 +519,10 @@ async def delete(
493519
extra_body: Body | None = None,
494520
timeout: float | httpx.Timeout | None | NotGiven = not_given,
495521
) -> None:
496-
"""
497-
Delete a pipeline.
522+
"""[DEPRECATED] Delete a pipeline.
523+
524+
Use the new /pipelines/v1/pipelines endpoint
525+
instead.
498526
499527
Args:
500528
account_id: Specifies the public ID of the account.
@@ -522,6 +550,7 @@ async def delete(
522550
cast_to=NoneType,
523551
)
524552

553+
@typing_extensions.deprecated("deprecated")
525554
async def get(
526555
self,
527556
pipeline_name: str,
@@ -534,8 +563,10 @@ async def get(
534563
extra_body: Body | None = None,
535564
timeout: float | httpx.Timeout | None | NotGiven = not_given,
536565
) -> PipelineGetResponse:
537-
"""
538-
Get configuration of a pipeline.
566+
"""[DEPRECATED] Get configuration of a pipeline.
567+
568+
Use the new
569+
/pipelines/v1/pipelines endpoint instead.
539570
540571
Args:
541572
account_id: Specifies the public ID of the account.
@@ -571,81 +602,121 @@ class PipelinesResourceWithRawResponse:
571602
def __init__(self, pipelines: PipelinesResource) -> None:
572603
self._pipelines = pipelines
573604

574-
self.create = to_raw_response_wrapper(
575-
pipelines.create,
605+
self.create = ( # pyright: ignore[reportDeprecated]
606+
to_raw_response_wrapper(
607+
pipelines.create, # pyright: ignore[reportDeprecated],
608+
)
576609
)
577-
self.update = to_raw_response_wrapper(
578-
pipelines.update,
610+
self.update = ( # pyright: ignore[reportDeprecated]
611+
to_raw_response_wrapper(
612+
pipelines.update, # pyright: ignore[reportDeprecated],
613+
)
579614
)
580-
self.list = to_raw_response_wrapper(
581-
pipelines.list,
615+
self.list = ( # pyright: ignore[reportDeprecated]
616+
to_raw_response_wrapper(
617+
pipelines.list, # pyright: ignore[reportDeprecated],
618+
)
582619
)
583-
self.delete = to_raw_response_wrapper(
584-
pipelines.delete,
620+
self.delete = ( # pyright: ignore[reportDeprecated]
621+
to_raw_response_wrapper(
622+
pipelines.delete, # pyright: ignore[reportDeprecated],
623+
)
585624
)
586-
self.get = to_raw_response_wrapper(
587-
pipelines.get,
625+
self.get = ( # pyright: ignore[reportDeprecated]
626+
to_raw_response_wrapper(
627+
pipelines.get, # pyright: ignore[reportDeprecated],
628+
)
588629
)
589630

590631

591632
class AsyncPipelinesResourceWithRawResponse:
592633
def __init__(self, pipelines: AsyncPipelinesResource) -> None:
593634
self._pipelines = pipelines
594635

595-
self.create = async_to_raw_response_wrapper(
596-
pipelines.create,
636+
self.create = ( # pyright: ignore[reportDeprecated]
637+
async_to_raw_response_wrapper(
638+
pipelines.create, # pyright: ignore[reportDeprecated],
639+
)
597640
)
598-
self.update = async_to_raw_response_wrapper(
599-
pipelines.update,
641+
self.update = ( # pyright: ignore[reportDeprecated]
642+
async_to_raw_response_wrapper(
643+
pipelines.update, # pyright: ignore[reportDeprecated],
644+
)
600645
)
601-
self.list = async_to_raw_response_wrapper(
602-
pipelines.list,
646+
self.list = ( # pyright: ignore[reportDeprecated]
647+
async_to_raw_response_wrapper(
648+
pipelines.list, # pyright: ignore[reportDeprecated],
649+
)
603650
)
604-
self.delete = async_to_raw_response_wrapper(
605-
pipelines.delete,
651+
self.delete = ( # pyright: ignore[reportDeprecated]
652+
async_to_raw_response_wrapper(
653+
pipelines.delete, # pyright: ignore[reportDeprecated],
654+
)
606655
)
607-
self.get = async_to_raw_response_wrapper(
608-
pipelines.get,
656+
self.get = ( # pyright: ignore[reportDeprecated]
657+
async_to_raw_response_wrapper(
658+
pipelines.get, # pyright: ignore[reportDeprecated],
659+
)
609660
)
610661

611662

612663
class PipelinesResourceWithStreamingResponse:
613664
def __init__(self, pipelines: PipelinesResource) -> None:
614665
self._pipelines = pipelines
615666

616-
self.create = to_streamed_response_wrapper(
617-
pipelines.create,
667+
self.create = ( # pyright: ignore[reportDeprecated]
668+
to_streamed_response_wrapper(
669+
pipelines.create, # pyright: ignore[reportDeprecated],
670+
)
618671
)
619-
self.update = to_streamed_response_wrapper(
620-
pipelines.update,
672+
self.update = ( # pyright: ignore[reportDeprecated]
673+
to_streamed_response_wrapper(
674+
pipelines.update, # pyright: ignore[reportDeprecated],
675+
)
621676
)
622-
self.list = to_streamed_response_wrapper(
623-
pipelines.list,
677+
self.list = ( # pyright: ignore[reportDeprecated]
678+
to_streamed_response_wrapper(
679+
pipelines.list, # pyright: ignore[reportDeprecated],
680+
)
624681
)
625-
self.delete = to_streamed_response_wrapper(
626-
pipelines.delete,
682+
self.delete = ( # pyright: ignore[reportDeprecated]
683+
to_streamed_response_wrapper(
684+
pipelines.delete, # pyright: ignore[reportDeprecated],
685+
)
627686
)
628-
self.get = to_streamed_response_wrapper(
629-
pipelines.get,
687+
self.get = ( # pyright: ignore[reportDeprecated]
688+
to_streamed_response_wrapper(
689+
pipelines.get, # pyright: ignore[reportDeprecated],
690+
)
630691
)
631692

632693

633694
class AsyncPipelinesResourceWithStreamingResponse:
634695
def __init__(self, pipelines: AsyncPipelinesResource) -> None:
635696
self._pipelines = pipelines
636697

637-
self.create = async_to_streamed_response_wrapper(
638-
pipelines.create,
698+
self.create = ( # pyright: ignore[reportDeprecated]
699+
async_to_streamed_response_wrapper(
700+
pipelines.create, # pyright: ignore[reportDeprecated],
701+
)
639702
)
640-
self.update = async_to_streamed_response_wrapper(
641-
pipelines.update,
703+
self.update = ( # pyright: ignore[reportDeprecated]
704+
async_to_streamed_response_wrapper(
705+
pipelines.update, # pyright: ignore[reportDeprecated],
706+
)
642707
)
643-
self.list = async_to_streamed_response_wrapper(
644-
pipelines.list,
708+
self.list = ( # pyright: ignore[reportDeprecated]
709+
async_to_streamed_response_wrapper(
710+
pipelines.list, # pyright: ignore[reportDeprecated],
711+
)
645712
)
646-
self.delete = async_to_streamed_response_wrapper(
647-
pipelines.delete,
713+
self.delete = ( # pyright: ignore[reportDeprecated]
714+
async_to_streamed_response_wrapper(
715+
pipelines.delete, # pyright: ignore[reportDeprecated],
716+
)
648717
)
649-
self.get = async_to_streamed_response_wrapper(
650-
pipelines.get,
718+
self.get = ( # pyright: ignore[reportDeprecated]
719+
async_to_streamed_response_wrapper(
720+
pipelines.get, # pyright: ignore[reportDeprecated],
721+
)
651722
)

0 commit comments

Comments
 (0)