Skip to content

Commit

Permalink
feat(api): OpenAPI spec update via Stainless API (#989)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored and stainless-bot committed Jun 14, 2024
1 parent 1be11e8 commit d8131ea
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 1343
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-263576da5eb5ab2ac4e94b5546f7851d1bba6cc4c7cda43454f07e0fc3feed13.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5e74e6bc5452012a8e268e22531fc275f2e79381aa2f2dd3fd8c0d16e6cd0a28.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ def update(
description: str | NotGiven = NOT_GIVEN,
is_attributable: bool | NotGiven = NOT_GIVEN,
is_public: bool | NotGiven = NOT_GIVEN,
name: str | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand All @@ -148,6 +149,8 @@ def update(
is_public: The new is_public value of the feed
name: The new name of the feed
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
Expand All @@ -165,6 +168,7 @@ def update(
"description": description,
"is_attributable": is_attributable,
"is_public": is_public,
"name": name,
},
indicator_feed_update_params.IndicatorFeedUpdateParams,
),
Expand Down Expand Up @@ -373,6 +377,7 @@ async def update(
description: str | NotGiven = NOT_GIVEN,
is_attributable: bool | NotGiven = NOT_GIVEN,
is_public: bool | NotGiven = NOT_GIVEN,
name: str | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand All @@ -394,6 +399,8 @@ async def update(
is_public: The new is_public value of the feed
name: The new name of the feed
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
Expand All @@ -411,6 +418,7 @@ async def update(
"description": description,
"is_attributable": is_attributable,
"is_public": is_public,
"name": name,
},
indicator_feed_update_params.IndicatorFeedUpdateParams,
),
Expand Down
12 changes: 12 additions & 0 deletions src/cloudflare/types/intel/indicator_feed_get_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ class IndicatorFeedGetResponse(BaseModel):
description: Optional[str] = None
"""The description of the example test"""

is_attributable: Optional[bool] = None
"""Whether the indicator feed can be attributed to a provider"""

is_public: Optional[bool] = None
"""Whether the indicator feed is exposed to customers"""

latest_upload_status: Optional[
Literal["Mirroring", "Unifying", "Loading", "Provisioning", "Complete", "Error"]
] = None
Expand All @@ -29,3 +35,9 @@ class IndicatorFeedGetResponse(BaseModel):

name: Optional[str] = None
"""The name of the indicator feed"""

provider_id: Optional[str] = None
"""The unique identifier for the provider"""

provider_name: Optional[str] = None
"""The provider of the indicator feed"""
3 changes: 3 additions & 0 deletions src/cloudflare/types/intel/indicator_feed_update_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,6 @@ class IndicatorFeedUpdateParams(TypedDict, total=False):

is_public: bool
"""The new is_public value of the feed"""

name: str
"""The new name of the feed"""
2 changes: 2 additions & 0 deletions tests/api_resources/intel/test_indicator_feeds.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None:
description="This is an example description",
is_attributable=True,
is_public=True,
name="indicator_list",
)
assert_matches_type(Optional[IndicatorFeedUpdateResponse], indicator_feed, path=["response"])

Expand Down Expand Up @@ -312,6 +313,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare
description="This is an example description",
is_attributable=True,
is_public=True,
name="indicator_list",
)
assert_matches_type(Optional[IndicatorFeedUpdateResponse], indicator_feed, path=["response"])

Expand Down

0 comments on commit d8131ea

Please sign in to comment.