Skip to content

Commit 5fdf07b

Browse files
chore(api): update composite API spec
1 parent 77960c9 commit 5fdf07b

File tree

493 files changed

+14923
-42464
lines changed

Some content is hidden

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

493 files changed

+14923
-42464
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: 1875
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-3e4844230289b0ec37042cb7d2e0d9bcd356e7d728d0f02cc5c789d8ac9084ff.yml
3-
openapi_spec_hash: 4f8d5e97ce1d3ede046045893273ad11
1+
configured_endpoints: 1825
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-cceecd20dfd89884f795e75b433848994bed610b79802c65104f0c70d3ada54e.yml
3+
openapi_spec_hash: c33c0e26e48c004c1781a36748d0144c
44
config_hash: 4b8075dcc6a5884435b2e16c80fc020f

api.md

Lines changed: 60 additions & 342 deletions
Large diffs are not rendered by default.

src/cloudflare/_client.py

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

src/cloudflare/resources/abuse_reports.py

Lines changed: 0 additions & 1869 deletions
This file was deleted.

src/cloudflare/resources/accounts/accounts.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,6 @@ def update(
165165
id: str,
166166
name: str,
167167
type: Literal["standard", "enterprise"],
168-
managed_by: account_update_params.ManagedBy | Omit = omit,
169168
settings: account_update_params.Settings | Omit = omit,
170169
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
171170
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -184,8 +183,6 @@ def update(
184183
185184
name: Account name
186185
187-
managed_by: Parent container details
188-
189186
settings: Account settings
190187
191188
extra_headers: Send extra headers
@@ -205,7 +202,6 @@ def update(
205202
"id": id,
206203
"name": name,
207204
"type": type,
208-
"managed_by": managed_by,
209205
"settings": settings,
210206
},
211207
account_update_params.AccountUpdateParams,
@@ -455,7 +451,6 @@ async def update(
455451
id: str,
456452
name: str,
457453
type: Literal["standard", "enterprise"],
458-
managed_by: account_update_params.ManagedBy | Omit = omit,
459454
settings: account_update_params.Settings | Omit = omit,
460455
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
461456
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -474,8 +469,6 @@ async def update(
474469
475470
name: Account name
476471
477-
managed_by: Parent container details
478-
479472
settings: Account settings
480473
481474
extra_headers: Send extra headers
@@ -495,7 +488,6 @@ async def update(
495488
"id": id,
496489
"name": name,
497490
"type": type,
498-
"managed_by": managed_by,
499491
"settings": settings,
500492
},
501493
account_update_params.AccountUpdateParams,

src/cloudflare/resources/addressing/loa_documents.py

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

33
from __future__ import annotations
44

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

77
import httpx
88

99
from ..._types import Body, Query, Headers, NotGiven, not_given
10+
from ..._utils import maybe_transform, async_maybe_transform
1011
from ..._compat import cached_property
1112
from ..._resource import SyncAPIResource, AsyncAPIResource
1213
from ..._response import (
1314
BinaryAPIResponse,
1415
AsyncBinaryAPIResponse,
1516
StreamedBinaryAPIResponse,
1617
AsyncStreamedBinaryAPIResponse,
18+
to_raw_response_wrapper,
19+
to_streamed_response_wrapper,
20+
async_to_raw_response_wrapper,
1721
to_custom_raw_response_wrapper,
22+
async_to_streamed_response_wrapper,
1823
to_custom_streamed_response_wrapper,
1924
async_to_custom_raw_response_wrapper,
2025
async_to_custom_streamed_response_wrapper,
2126
)
27+
from ..._wrappers import ResultWrapper
2228
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
2331

2432
__all__ = ["LOADocumentsResource", "AsyncLOADocumentsResource"]
2533

@@ -44,6 +52,53 @@ def with_streaming_response(self) -> LOADocumentsResourceWithStreamingResponse:
4452
"""
4553
return LOADocumentsResourceWithStreamingResponse(self)
4654

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+
47102
def get(
48103
self,
49104
loa_document_id: Optional[str],
@@ -106,6 +161,55 @@ def with_streaming_response(self) -> AsyncLOADocumentsResourceWithStreamingRespo
106161
"""
107162
return AsyncLOADocumentsResourceWithStreamingResponse(self)
108163

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+
109213
async def get(
110214
self,
111215
loa_document_id: Optional[str],
@@ -152,6 +256,9 @@ class LOADocumentsResourceWithRawResponse:
152256
def __init__(self, loa_documents: LOADocumentsResource) -> None:
153257
self._loa_documents = loa_documents
154258

259+
self.create = to_raw_response_wrapper(
260+
loa_documents.create,
261+
)
155262
self.get = to_custom_raw_response_wrapper(
156263
loa_documents.get,
157264
BinaryAPIResponse,
@@ -162,6 +269,9 @@ class AsyncLOADocumentsResourceWithRawResponse:
162269
def __init__(self, loa_documents: AsyncLOADocumentsResource) -> None:
163270
self._loa_documents = loa_documents
164271

272+
self.create = async_to_raw_response_wrapper(
273+
loa_documents.create,
274+
)
165275
self.get = async_to_custom_raw_response_wrapper(
166276
loa_documents.get,
167277
AsyncBinaryAPIResponse,
@@ -172,6 +282,9 @@ class LOADocumentsResourceWithStreamingResponse:
172282
def __init__(self, loa_documents: LOADocumentsResource) -> None:
173283
self._loa_documents = loa_documents
174284

285+
self.create = to_streamed_response_wrapper(
286+
loa_documents.create,
287+
)
175288
self.get = to_custom_streamed_response_wrapper(
176289
loa_documents.get,
177290
StreamedBinaryAPIResponse,
@@ -182,6 +295,9 @@ class AsyncLOADocumentsResourceWithStreamingResponse:
182295
def __init__(self, loa_documents: AsyncLOADocumentsResource) -> None:
183296
self._loa_documents = loa_documents
184297

298+
self.create = async_to_streamed_response_wrapper(
299+
loa_documents.create,
300+
)
185301
self.get = async_to_custom_streamed_response_wrapper(
186302
loa_documents.get,
187303
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,
53+
cidr: str | Omit = omit,
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,
286+
cidr: str | Omit = omit,
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: 9 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
import httpx
88

9-
from ...._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
9+
from ...._types import Body, Query, Headers, NotGiven, not_given
1010
from ...._utils import maybe_transform, async_maybe_transform
1111
from ...._compat import cached_property
1212
from .delegations import (
@@ -98,10 +98,9 @@ def create(
9898
self,
9999
*,
100100
account_id: str,
101-
asn: int,
101+
asn: Optional[int],
102102
cidr: str,
103-
delegate_loa_creation: bool | Omit = omit,
104-
description: str | Omit = omit,
103+
loa_document_id: Optional[str],
105104
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
106105
# The extra values given here take precedence over values defined on the client or passed to this method.
107106
extra_headers: Headers | None = None,
@@ -119,10 +118,7 @@ def create(
119118
120119
cidr: IP Prefix in Classless Inter-Domain Routing format.
121120
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.
121+
loa_document_id: Identifier for the uploaded LOA document.
126122
127123
extra_headers: Send extra headers
128124
@@ -140,8 +136,7 @@ def create(
140136
{
141137
"asn": asn,
142138
"cidr": cidr,
143-
"delegate_loa_creation": delegate_loa_creation,
144-
"description": description,
139+
"loa_document_id": loa_document_id,
145140
},
146141
prefix_create_params.PrefixCreateParams,
147142
),
@@ -364,10 +359,9 @@ async def create(
364359
self,
365360
*,
366361
account_id: str,
367-
asn: int,
362+
asn: Optional[int],
368363
cidr: str,
369-
delegate_loa_creation: bool | Omit = omit,
370-
description: str | Omit = omit,
364+
loa_document_id: Optional[str],
371365
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
372366
# The extra values given here take precedence over values defined on the client or passed to this method.
373367
extra_headers: Headers | None = None,
@@ -385,10 +379,7 @@ async def create(
385379
386380
cidr: IP Prefix in Classless Inter-Domain Routing format.
387381
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.
382+
loa_document_id: Identifier for the uploaded LOA document.
392383
393384
extra_headers: Send extra headers
394385
@@ -406,8 +397,7 @@ async def create(
406397
{
407398
"asn": asn,
408399
"cidr": cidr,
409-
"delegate_loa_creation": delegate_loa_creation,
410-
"description": description,
400+
"loa_document_id": loa_document_id,
411401
},
412402
prefix_create_params.PrefixCreateParams,
413403
),

0 commit comments

Comments
 (0)