Skip to content

Commit cb197df

Browse files
chore(api): update composite API spec
1 parent a4762dd commit cb197df

File tree

563 files changed

+48432
-15436
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

563 files changed

+48432
-15436
lines changed

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 1826
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-cceecd20dfd89884f795e75b433848994bed610b79802c65104f0c70d3ada54e.yml
3-
openapi_spec_hash: c33c0e26e48c004c1781a36748d0144c
1+
configured_endpoints: 1891
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f28fbb1a0c731820e25e5f357a4b5cfb1f047c34e3143d3d822a6e8c01d72c27.yml
3+
openapi_spec_hash: d1177ac271608ae36d73ab114c33f8d8
44
config_hash: 84858df1d29be0215f0f3c1bde838ddc

api.md

Lines changed: 433 additions & 91 deletions
Large diffs are not rendered by default.

src/cloudflare/_client.py

Lines changed: 195 additions & 0 deletions
Large diffs are not rendered by default.

src/cloudflare/resources/abuse_reports.py

Lines changed: 2132 additions & 0 deletions
Large diffs are not rendered by default.

src/cloudflare/resources/accounts/accounts.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ def update(
165165
id: str,
166166
name: str,
167167
type: Literal["standard", "enterprise"],
168+
managed_by: account_update_params.ManagedBy | Omit = omit,
168169
settings: account_update_params.Settings | Omit = omit,
169170
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
170171
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -183,6 +184,8 @@ def update(
183184
184185
name: Account name
185186
187+
managed_by: Parent container details
188+
186189
settings: Account settings
187190
188191
extra_headers: Send extra headers
@@ -202,6 +205,7 @@ def update(
202205
"id": id,
203206
"name": name,
204207
"type": type,
208+
"managed_by": managed_by,
205209
"settings": settings,
206210
},
207211
account_update_params.AccountUpdateParams,
@@ -451,6 +455,7 @@ async def update(
451455
id: str,
452456
name: str,
453457
type: Literal["standard", "enterprise"],
458+
managed_by: account_update_params.ManagedBy | Omit = omit,
454459
settings: account_update_params.Settings | Omit = omit,
455460
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
456461
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -469,6 +474,8 @@ async def update(
469474
470475
name: Account name
471476
477+
managed_by: Parent container details
478+
472479
settings: Account settings
473480
474481
extra_headers: Send extra headers
@@ -488,6 +495,7 @@ async def update(
488495
"id": id,
489496
"name": name,
490497
"type": type,
498+
"managed_by": managed_by,
491499
"settings": settings,
492500
},
493501
account_update_params.AccountUpdateParams,

src/cloudflare/resources/addressing/loa_documents.py

Lines changed: 1 addition & 117 deletions
Original file line numberDiff line numberDiff line change
@@ -2,32 +2,24 @@
22

33
from __future__ import annotations
44

5-
from typing import Type, Optional, cast
5+
from typing import Optional
66

77
import httpx
88

99
from ..._types import Body, Query, Headers, NotGiven, not_given
10-
from ..._utils import maybe_transform, async_maybe_transform
1110
from ..._compat import cached_property
1211
from ..._resource import SyncAPIResource, AsyncAPIResource
1312
from ..._response import (
1413
BinaryAPIResponse,
1514
AsyncBinaryAPIResponse,
1615
StreamedBinaryAPIResponse,
1716
AsyncStreamedBinaryAPIResponse,
18-
to_raw_response_wrapper,
19-
to_streamed_response_wrapper,
20-
async_to_raw_response_wrapper,
2117
to_custom_raw_response_wrapper,
22-
async_to_streamed_response_wrapper,
2318
to_custom_streamed_response_wrapper,
2419
async_to_custom_raw_response_wrapper,
2520
async_to_custom_streamed_response_wrapper,
2621
)
27-
from ..._wrappers import ResultWrapper
2822
from ..._base_client import make_request_options
29-
from ...types.addressing import loa_document_create_params
30-
from ...types.addressing.loa_document_create_response import LOADocumentCreateResponse
3123

3224
__all__ = ["LOADocumentsResource", "AsyncLOADocumentsResource"]
3325

@@ -52,53 +44,6 @@ def with_streaming_response(self) -> LOADocumentsResourceWithStreamingResponse:
5244
"""
5345
return LOADocumentsResourceWithStreamingResponse(self)
5446

55-
def create(
56-
self,
57-
*,
58-
account_id: str,
59-
loa_document: str,
60-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
61-
# The extra values given here take precedence over values defined on the client or passed to this method.
62-
extra_headers: Headers | None = None,
63-
extra_query: Query | None = None,
64-
extra_body: Body | None = None,
65-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
66-
) -> Optional[LOADocumentCreateResponse]:
67-
"""
68-
Submit LOA document (pdf format) under the account.
69-
70-
Args:
71-
account_id: Identifier of a Cloudflare account.
72-
73-
loa_document: LOA document to upload.
74-
75-
extra_headers: Send extra headers
76-
77-
extra_query: Add additional query parameters to the request
78-
79-
extra_body: Add additional JSON properties to the request
80-
81-
timeout: Override the client-level default timeout for this request, in seconds
82-
"""
83-
if not account_id:
84-
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
85-
# It should be noted that the actual Content-Type header that will be
86-
# sent to the server will contain a `boundary` parameter, e.g.
87-
# multipart/form-data; boundary=---abc--
88-
extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})}
89-
return self._post(
90-
f"/accounts/{account_id}/addressing/loa_documents",
91-
body=maybe_transform({"loa_document": loa_document}, loa_document_create_params.LOADocumentCreateParams),
92-
options=make_request_options(
93-
extra_headers=extra_headers,
94-
extra_query=extra_query,
95-
extra_body=extra_body,
96-
timeout=timeout,
97-
post_parser=ResultWrapper[Optional[LOADocumentCreateResponse]]._unwrapper,
98-
),
99-
cast_to=cast(Type[Optional[LOADocumentCreateResponse]], ResultWrapper[LOADocumentCreateResponse]),
100-
)
101-
10247
def get(
10348
self,
10449
loa_document_id: Optional[str],
@@ -161,55 +106,6 @@ def with_streaming_response(self) -> AsyncLOADocumentsResourceWithStreamingRespo
161106
"""
162107
return AsyncLOADocumentsResourceWithStreamingResponse(self)
163108

164-
async def create(
165-
self,
166-
*,
167-
account_id: str,
168-
loa_document: str,
169-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
170-
# The extra values given here take precedence over values defined on the client or passed to this method.
171-
extra_headers: Headers | None = None,
172-
extra_query: Query | None = None,
173-
extra_body: Body | None = None,
174-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
175-
) -> Optional[LOADocumentCreateResponse]:
176-
"""
177-
Submit LOA document (pdf format) under the account.
178-
179-
Args:
180-
account_id: Identifier of a Cloudflare account.
181-
182-
loa_document: LOA document to upload.
183-
184-
extra_headers: Send extra headers
185-
186-
extra_query: Add additional query parameters to the request
187-
188-
extra_body: Add additional JSON properties to the request
189-
190-
timeout: Override the client-level default timeout for this request, in seconds
191-
"""
192-
if not account_id:
193-
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
194-
# It should be noted that the actual Content-Type header that will be
195-
# sent to the server will contain a `boundary` parameter, e.g.
196-
# multipart/form-data; boundary=---abc--
197-
extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})}
198-
return await self._post(
199-
f"/accounts/{account_id}/addressing/loa_documents",
200-
body=await async_maybe_transform(
201-
{"loa_document": loa_document}, loa_document_create_params.LOADocumentCreateParams
202-
),
203-
options=make_request_options(
204-
extra_headers=extra_headers,
205-
extra_query=extra_query,
206-
extra_body=extra_body,
207-
timeout=timeout,
208-
post_parser=ResultWrapper[Optional[LOADocumentCreateResponse]]._unwrapper,
209-
),
210-
cast_to=cast(Type[Optional[LOADocumentCreateResponse]], ResultWrapper[LOADocumentCreateResponse]),
211-
)
212-
213109
async def get(
214110
self,
215111
loa_document_id: Optional[str],
@@ -256,9 +152,6 @@ class LOADocumentsResourceWithRawResponse:
256152
def __init__(self, loa_documents: LOADocumentsResource) -> None:
257153
self._loa_documents = loa_documents
258154

259-
self.create = to_raw_response_wrapper(
260-
loa_documents.create,
261-
)
262155
self.get = to_custom_raw_response_wrapper(
263156
loa_documents.get,
264157
BinaryAPIResponse,
@@ -269,9 +162,6 @@ class AsyncLOADocumentsResourceWithRawResponse:
269162
def __init__(self, loa_documents: AsyncLOADocumentsResource) -> None:
270163
self._loa_documents = loa_documents
271164

272-
self.create = async_to_raw_response_wrapper(
273-
loa_documents.create,
274-
)
275165
self.get = async_to_custom_raw_response_wrapper(
276166
loa_documents.get,
277167
AsyncBinaryAPIResponse,
@@ -282,9 +172,6 @@ class LOADocumentsResourceWithStreamingResponse:
282172
def __init__(self, loa_documents: LOADocumentsResource) -> None:
283173
self._loa_documents = loa_documents
284174

285-
self.create = to_streamed_response_wrapper(
286-
loa_documents.create,
287-
)
288175
self.get = to_custom_streamed_response_wrapper(
289176
loa_documents.get,
290177
StreamedBinaryAPIResponse,
@@ -295,9 +182,6 @@ class AsyncLOADocumentsResourceWithStreamingResponse:
295182
def __init__(self, loa_documents: AsyncLOADocumentsResource) -> None:
296183
self._loa_documents = loa_documents
297184

298-
self.create = async_to_streamed_response_wrapper(
299-
loa_documents.create,
300-
)
301185
self.get = async_to_custom_streamed_response_wrapper(
302186
loa_documents.get,
303187
AsyncStreamedBinaryAPIResponse,

src/cloudflare/resources/addressing/prefixes/bgp_prefixes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def create(
5050
prefix_id: str,
5151
*,
5252
account_id: str,
53-
cidr: str | Omit = omit,
53+
cidr: str,
5454
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
5555
# The extra values given here take precedence over values defined on the client or passed to this method.
5656
extra_headers: Headers | None = None,
@@ -283,7 +283,7 @@ async def create(
283283
prefix_id: str,
284284
*,
285285
account_id: str,
286-
cidr: str | Omit = omit,
286+
cidr: str,
287287
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
288288
# The extra values given here take precedence over values defined on the client or passed to this method.
289289
extra_headers: Headers | None = None,

src/cloudflare/resources/addressing/prefixes/prefixes.py

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
import httpx
88

9-
from ...._types import Body, Query, Headers, NotGiven, not_given
9+
from ...._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
1010
from ...._utils import maybe_transform, async_maybe_transform
1111
from ...._compat import cached_property
1212
from .delegations import (
@@ -98,9 +98,10 @@ def create(
9898
self,
9999
*,
100100
account_id: str,
101-
asn: Optional[int],
101+
asn: int,
102102
cidr: str,
103-
loa_document_id: Optional[str],
103+
delegate_loa_creation: bool | Omit = omit,
104+
description: str | Omit = omit,
104105
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
105106
# The extra values given here take precedence over values defined on the client or passed to this method.
106107
extra_headers: Headers | None = None,
@@ -118,7 +119,10 @@ def create(
118119
119120
cidr: IP Prefix in Classless Inter-Domain Routing format.
120121
121-
loa_document_id: Identifier for the uploaded LOA document.
122+
delegate_loa_creation: Whether Cloudflare is allowed to generate the LOA document on behalf of the
123+
prefix owner.
124+
125+
description: Description of the prefix.
122126
123127
extra_headers: Send extra headers
124128
@@ -136,7 +140,8 @@ def create(
136140
{
137141
"asn": asn,
138142
"cidr": cidr,
139-
"loa_document_id": loa_document_id,
143+
"delegate_loa_creation": delegate_loa_creation,
144+
"description": description,
140145
},
141146
prefix_create_params.PrefixCreateParams,
142147
),
@@ -359,9 +364,10 @@ async def create(
359364
self,
360365
*,
361366
account_id: str,
362-
asn: Optional[int],
367+
asn: int,
363368
cidr: str,
364-
loa_document_id: Optional[str],
369+
delegate_loa_creation: bool | Omit = omit,
370+
description: str | Omit = omit,
365371
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
366372
# The extra values given here take precedence over values defined on the client or passed to this method.
367373
extra_headers: Headers | None = None,
@@ -379,7 +385,10 @@ async def create(
379385
380386
cidr: IP Prefix in Classless Inter-Domain Routing format.
381387
382-
loa_document_id: Identifier for the uploaded LOA document.
388+
delegate_loa_creation: Whether Cloudflare is allowed to generate the LOA document on behalf of the
389+
prefix owner.
390+
391+
description: Description of the prefix.
383392
384393
extra_headers: Send extra headers
385394
@@ -397,7 +406,8 @@ async def create(
397406
{
398407
"asn": asn,
399408
"cidr": cidr,
400-
"loa_document_id": loa_document_id,
409+
"delegate_loa_creation": delegate_loa_creation,
410+
"description": description,
401411
},
402412
prefix_create_params.PrefixCreateParams,
403413
),

0 commit comments

Comments
 (0)