Skip to content

Commit

Permalink
feat(api): OpenAPI spec update via Stainless API (#440)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored and stainless-bot committed May 2, 2024
1 parent 40fbf58 commit d008eae
Show file tree
Hide file tree
Showing 9 changed files with 109 additions and 91 deletions.
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 1267
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5c41a7aa9877639ecb82e8e278d9d8d77a58f9d308ed8e8f570cd3243f130e05.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-6229bf7c4bed6b9026088be8817d3c8111576b2d12ff5220d193f479f230e449.yml
12 changes: 6 additions & 6 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -3650,11 +3650,11 @@ from cloudflare.types.intel import (

Methods:

- <code title="post /accounts/{account_id}/intel/indicator-feeds">client.intel.indicator_feeds.<a href="./src/cloudflare/resources/intel/indicator_feeds/indicator_feeds.py">create</a>(\*, account_id, \*\*<a href="src/cloudflare/types/intel/indicator_feed_create_params.py">params</a>) -> <a href="./src/cloudflare/types/intel/indicator_feed_create_response.py">IndicatorFeedCreateResponse</a></code>
- <code title="put /accounts/{account_id}/intel/indicator-feeds/{feed_id}/snapshot">client.intel.indicator_feeds.<a href="./src/cloudflare/resources/intel/indicator_feeds/indicator_feeds.py">update</a>(feed_id, \*, account_id, \*\*<a href="src/cloudflare/types/intel/indicator_feed_update_params.py">params</a>) -> <a href="./src/cloudflare/types/intel/indicator_feed_update_response.py">IndicatorFeedUpdateResponse</a></code>
- <code title="post /accounts/{account_id}/intel/indicator-feeds">client.intel.indicator_feeds.<a href="./src/cloudflare/resources/intel/indicator_feeds/indicator_feeds.py">create</a>(\*, account_id, \*\*<a href="src/cloudflare/types/intel/indicator_feed_create_params.py">params</a>) -> <a href="./src/cloudflare/types/intel/indicator_feed_create_response.py">Optional</a></code>
- <code title="put /accounts/{account_id}/intel/indicator-feeds/{feed_id}/snapshot">client.intel.indicator_feeds.<a href="./src/cloudflare/resources/intel/indicator_feeds/indicator_feeds.py">update</a>(feed_id, \*, account_id, \*\*<a href="src/cloudflare/types/intel/indicator_feed_update_params.py">params</a>) -> <a href="./src/cloudflare/types/intel/indicator_feed_update_response.py">Optional</a></code>
- <code title="get /accounts/{account_id}/intel/indicator-feeds">client.intel.indicator_feeds.<a href="./src/cloudflare/resources/intel/indicator_feeds/indicator_feeds.py">list</a>(\*, account_id) -> <a href="./src/cloudflare/types/intel/indicator_feed_list_response.py">SyncSinglePage[IndicatorFeedListResponse]</a></code>
- <code title="get /accounts/{account_id}/intel/indicator-feeds/{feed_id}/data">client.intel.indicator_feeds.<a href="./src/cloudflare/resources/intel/indicator_feeds/indicator_feeds.py">data</a>(feed_id, \*, account_id) -> str</code>
- <code title="get /accounts/{account_id}/intel/indicator-feeds/{feed_id}">client.intel.indicator_feeds.<a href="./src/cloudflare/resources/intel/indicator_feeds/indicator_feeds.py">get</a>(feed_id, \*, account_id) -> <a href="./src/cloudflare/types/intel/indicator_feed_get_response.py">IndicatorFeedGetResponse</a></code>
- <code title="get /accounts/{account_id}/intel/indicator-feeds/{feed_id}">client.intel.indicator_feeds.<a href="./src/cloudflare/resources/intel/indicator_feeds/indicator_feeds.py">get</a>(feed_id, \*, account_id) -> <a href="./src/cloudflare/types/intel/indicator_feed_get_response.py">Optional</a></code>

### Permissions

Expand All @@ -3670,9 +3670,9 @@ from cloudflare.types.intel.indicator_feeds import (

Methods:

- <code title="put /accounts/{account_id}/intel/indicator-feeds/permissions/add">client.intel.indicator_feeds.permissions.<a href="./src/cloudflare/resources/intel/indicator_feeds/permissions.py">create</a>(\*, account_id, \*\*<a href="src/cloudflare/types/intel/indicator_feeds/permission_create_params.py">params</a>) -> <a href="./src/cloudflare/types/intel/indicator_feeds/permission_create_response.py">PermissionCreateResponse</a></code>
- <code title="get /accounts/{account_id}/intel/indicator-feeds/permissions/view">client.intel.indicator_feeds.permissions.<a href="./src/cloudflare/resources/intel/indicator_feeds/permissions.py">list</a>(\*, account_id) -> <a href="./src/cloudflare/types/intel/indicator_feeds/permission_list_response.py">PermissionListResponse</a></code>
- <code title="put /accounts/{account_id}/intel/indicator-feeds/permissions/remove">client.intel.indicator_feeds.permissions.<a href="./src/cloudflare/resources/intel/indicator_feeds/permissions.py">delete</a>(\*, account_id, \*\*<a href="src/cloudflare/types/intel/indicator_feeds/permission_delete_params.py">params</a>) -> <a href="./src/cloudflare/types/intel/indicator_feeds/permission_delete_response.py">PermissionDeleteResponse</a></code>
- <code title="put /accounts/{account_id}/intel/indicator-feeds/permissions/add">client.intel.indicator_feeds.permissions.<a href="./src/cloudflare/resources/intel/indicator_feeds/permissions.py">create</a>(\*, account_id, \*\*<a href="src/cloudflare/types/intel/indicator_feeds/permission_create_params.py">params</a>) -> <a href="./src/cloudflare/types/intel/indicator_feeds/permission_create_response.py">Optional</a></code>
- <code title="get /accounts/{account_id}/intel/indicator-feeds/permissions/view">client.intel.indicator_feeds.permissions.<a href="./src/cloudflare/resources/intel/indicator_feeds/permissions.py">list</a>(\*, account_id) -> <a href="./src/cloudflare/types/intel/indicator_feeds/permission_list_response.py">Optional</a></code>
- <code title="put /accounts/{account_id}/intel/indicator-feeds/permissions/remove">client.intel.indicator_feeds.permissions.<a href="./src/cloudflare/resources/intel/indicator_feeds/permissions.py">delete</a>(\*, account_id, \*\*<a href="src/cloudflare/types/intel/indicator_feeds/permission_delete_params.py">params</a>) -> <a href="./src/cloudflare/types/intel/indicator_feeds/permission_delete_response.py">Optional</a></code>

## Sinkholes

Expand Down
38 changes: 19 additions & 19 deletions src/cloudflare/resources/intel/indicator_feeds/indicator_feeds.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from __future__ import annotations

from typing import Type, cast
from typing import Type, Optional, cast

import httpx

Expand Down Expand Up @@ -67,7 +67,7 @@ def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> IndicatorFeedCreateResponse:
) -> Optional[IndicatorFeedCreateResponse]:
"""
Create new indicator feed
Expand Down Expand Up @@ -102,9 +102,9 @@ def create(
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
post_parser=ResultWrapper[IndicatorFeedCreateResponse]._unwrapper,
post_parser=ResultWrapper[Optional[IndicatorFeedCreateResponse]]._unwrapper,
),
cast_to=cast(Type[IndicatorFeedCreateResponse], ResultWrapper[IndicatorFeedCreateResponse]),
cast_to=cast(Type[Optional[IndicatorFeedCreateResponse]], ResultWrapper[IndicatorFeedCreateResponse]),
)

def update(
Expand All @@ -119,7 +119,7 @@ def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> IndicatorFeedUpdateResponse:
) -> Optional[IndicatorFeedUpdateResponse]:
"""
Update indicator feed data
Expand Down Expand Up @@ -148,9 +148,9 @@ def update(
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
post_parser=ResultWrapper[IndicatorFeedUpdateResponse]._unwrapper,
post_parser=ResultWrapper[Optional[IndicatorFeedUpdateResponse]]._unwrapper,
),
cast_to=cast(Type[IndicatorFeedUpdateResponse], ResultWrapper[IndicatorFeedUpdateResponse]),
cast_to=cast(Type[Optional[IndicatorFeedUpdateResponse]], ResultWrapper[IndicatorFeedUpdateResponse]),
)

def list(
Expand Down Expand Up @@ -239,7 +239,7 @@ def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> IndicatorFeedGetResponse:
) -> Optional[IndicatorFeedGetResponse]:
"""
Get indicator feed metadata
Expand All @@ -265,9 +265,9 @@ def get(
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
post_parser=ResultWrapper[IndicatorFeedGetResponse]._unwrapper,
post_parser=ResultWrapper[Optional[IndicatorFeedGetResponse]]._unwrapper,
),
cast_to=cast(Type[IndicatorFeedGetResponse], ResultWrapper[IndicatorFeedGetResponse]),
cast_to=cast(Type[Optional[IndicatorFeedGetResponse]], ResultWrapper[IndicatorFeedGetResponse]),
)


Expand Down Expand Up @@ -296,7 +296,7 @@ async def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> IndicatorFeedCreateResponse:
) -> Optional[IndicatorFeedCreateResponse]:
"""
Create new indicator feed
Expand Down Expand Up @@ -331,9 +331,9 @@ async def create(
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
post_parser=ResultWrapper[IndicatorFeedCreateResponse]._unwrapper,
post_parser=ResultWrapper[Optional[IndicatorFeedCreateResponse]]._unwrapper,
),
cast_to=cast(Type[IndicatorFeedCreateResponse], ResultWrapper[IndicatorFeedCreateResponse]),
cast_to=cast(Type[Optional[IndicatorFeedCreateResponse]], ResultWrapper[IndicatorFeedCreateResponse]),
)

async def update(
Expand All @@ -348,7 +348,7 @@ async def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> IndicatorFeedUpdateResponse:
) -> Optional[IndicatorFeedUpdateResponse]:
"""
Update indicator feed data
Expand Down Expand Up @@ -379,9 +379,9 @@ async def update(
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
post_parser=ResultWrapper[IndicatorFeedUpdateResponse]._unwrapper,
post_parser=ResultWrapper[Optional[IndicatorFeedUpdateResponse]]._unwrapper,
),
cast_to=cast(Type[IndicatorFeedUpdateResponse], ResultWrapper[IndicatorFeedUpdateResponse]),
cast_to=cast(Type[Optional[IndicatorFeedUpdateResponse]], ResultWrapper[IndicatorFeedUpdateResponse]),
)

def list(
Expand Down Expand Up @@ -470,7 +470,7 @@ async def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> IndicatorFeedGetResponse:
) -> Optional[IndicatorFeedGetResponse]:
"""
Get indicator feed metadata
Expand All @@ -496,9 +496,9 @@ async def get(
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
post_parser=ResultWrapper[IndicatorFeedGetResponse]._unwrapper,
post_parser=ResultWrapper[Optional[IndicatorFeedGetResponse]]._unwrapper,
),
cast_to=cast(Type[IndicatorFeedGetResponse], ResultWrapper[IndicatorFeedGetResponse]),
cast_to=cast(Type[Optional[IndicatorFeedGetResponse]], ResultWrapper[IndicatorFeedGetResponse]),
)


Expand Down
38 changes: 19 additions & 19 deletions src/cloudflare/resources/intel/indicator_feeds/permissions.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from __future__ import annotations

from typing import Type, cast
from typing import Type, Optional, cast

import httpx

Expand Down Expand Up @@ -52,7 +52,7 @@ def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> PermissionCreateResponse:
) -> Optional[PermissionCreateResponse]:
"""
Grant permission to indicator feed
Expand Down Expand Up @@ -87,9 +87,9 @@ def create(
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
post_parser=ResultWrapper[PermissionCreateResponse]._unwrapper,
post_parser=ResultWrapper[Optional[PermissionCreateResponse]]._unwrapper,
),
cast_to=cast(Type[PermissionCreateResponse], ResultWrapper[PermissionCreateResponse]),
cast_to=cast(Type[Optional[PermissionCreateResponse]], ResultWrapper[PermissionCreateResponse]),
)

def list(
Expand All @@ -102,7 +102,7 @@ def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> PermissionListResponse:
) -> Optional[PermissionListResponse]:
"""
List indicator feed permissions
Expand All @@ -126,9 +126,9 @@ def list(
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
post_parser=ResultWrapper[PermissionListResponse]._unwrapper,
post_parser=ResultWrapper[Optional[PermissionListResponse]]._unwrapper,
),
cast_to=cast(Type[PermissionListResponse], ResultWrapper[PermissionListResponse]),
cast_to=cast(Type[Optional[PermissionListResponse]], ResultWrapper[PermissionListResponse]),
)

def delete(
Expand All @@ -143,7 +143,7 @@ def delete(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> PermissionDeleteResponse:
) -> Optional[PermissionDeleteResponse]:
"""
Revoke permission to indicator feed
Expand Down Expand Up @@ -178,9 +178,9 @@ def delete(
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
post_parser=ResultWrapper[PermissionDeleteResponse]._unwrapper,
post_parser=ResultWrapper[Optional[PermissionDeleteResponse]]._unwrapper,
),
cast_to=cast(Type[PermissionDeleteResponse], ResultWrapper[PermissionDeleteResponse]),
cast_to=cast(Type[Optional[PermissionDeleteResponse]], ResultWrapper[PermissionDeleteResponse]),
)


Expand All @@ -205,7 +205,7 @@ async def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> PermissionCreateResponse:
) -> Optional[PermissionCreateResponse]:
"""
Grant permission to indicator feed
Expand Down Expand Up @@ -240,9 +240,9 @@ async def create(
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
post_parser=ResultWrapper[PermissionCreateResponse]._unwrapper,
post_parser=ResultWrapper[Optional[PermissionCreateResponse]]._unwrapper,
),
cast_to=cast(Type[PermissionCreateResponse], ResultWrapper[PermissionCreateResponse]),
cast_to=cast(Type[Optional[PermissionCreateResponse]], ResultWrapper[PermissionCreateResponse]),
)

async def list(
Expand All @@ -255,7 +255,7 @@ async def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> PermissionListResponse:
) -> Optional[PermissionListResponse]:
"""
List indicator feed permissions
Expand All @@ -279,9 +279,9 @@ async def list(
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
post_parser=ResultWrapper[PermissionListResponse]._unwrapper,
post_parser=ResultWrapper[Optional[PermissionListResponse]]._unwrapper,
),
cast_to=cast(Type[PermissionListResponse], ResultWrapper[PermissionListResponse]),
cast_to=cast(Type[Optional[PermissionListResponse]], ResultWrapper[PermissionListResponse]),
)

async def delete(
Expand All @@ -296,7 +296,7 @@ async def delete(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> PermissionDeleteResponse:
) -> Optional[PermissionDeleteResponse]:
"""
Revoke permission to indicator feed
Expand Down Expand Up @@ -331,9 +331,9 @@ async def delete(
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
post_parser=ResultWrapper[PermissionDeleteResponse]._unwrapper,
post_parser=ResultWrapper[Optional[PermissionDeleteResponse]]._unwrapper,
),
cast_to=cast(Type[PermissionDeleteResponse], ResultWrapper[PermissionDeleteResponse]),
cast_to=cast(Type[Optional[PermissionDeleteResponse]], ResultWrapper[PermissionDeleteResponse]),
)


Expand Down
6 changes: 6 additions & 0 deletions src/cloudflare/types/intel/indicator_feed_create_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ class IndicatorFeedCreateResponse(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"""

modified_on: Optional[datetime] = None
"""The date and time when the data entry was last modified"""

Expand Down
6 changes: 6 additions & 0 deletions src/cloudflare/types/intel/indicator_feed_list_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ class IndicatorFeedListResponse(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"""

modified_on: Optional[datetime] = None
"""The date and time when the data entry was last modified"""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ class PermissionListResponseItem(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"""

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

Expand Down
Loading

0 comments on commit d008eae

Please sign in to comment.