Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(api): OpenAPI spec update via Stainless API #164

Merged
merged 1 commit into from
Mar 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -3668,39 +3668,39 @@ Types:

```python
from cloudflare.types.intel import (
IntelIndicatorFeedItem,
IntelIndicatorFeedMetadata,
IntelUpdateFeed,
IndicatorFeedCreateResponse,
IndicatorFeedUpdateResponse,
IndicatorFeedListResponse,
IndicatorFeedDataResponse,
IndicatorFeedGetResponse,
)
```

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/intel_indicator_feed_item.py">IntelIndicatorFeedItem</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/intel_update_feed.py">IntelUpdateFeed</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">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="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">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/intel_indicator_feed_metadata.py">IntelIndicatorFeedMetadata</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">IndicatorFeedGetResponse</a></code>

### Permissions

Types:

```python
from cloudflare.types.intel.indicator_feeds import (
IntelPermissionListItem,
IntelPermissionsUpdate,
PermissionCreateResponse,
PermissionListResponse,
PermissionDeleteResponse,
)
```

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/intel_permissions_update.py">IntelPermissionsUpdate</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">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/intel_permissions_update.py">IntelPermissionsUpdate</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>

## Sinkholes

Expand Down
30 changes: 15 additions & 15 deletions src/cloudflare/resources/intel/indicator_feeds/indicator_feeds.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@
)
from ...._wrappers import ResultWrapper
from ....types.intel import (
IntelUpdateFeed,
IntelIndicatorFeedItem,
IndicatorFeedGetResponse,
IndicatorFeedListResponse,
IntelIndicatorFeedMetadata,
IndicatorFeedCreateResponse,
IndicatorFeedUpdateResponse,
indicator_feed_create_params,
indicator_feed_update_params,
)
Expand Down Expand Up @@ -68,7 +68,7 @@ def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> IntelIndicatorFeedItem:
) -> IndicatorFeedCreateResponse:
"""
Create new indicator feed

Expand Down Expand Up @@ -105,7 +105,7 @@ def create(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(Type[IntelIndicatorFeedItem], ResultWrapper[IntelIndicatorFeedItem]),
cast_to=cast(Type[IndicatorFeedCreateResponse], ResultWrapper[IndicatorFeedCreateResponse]),
)

def update(
Expand All @@ -120,7 +120,7 @@ def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> IntelUpdateFeed:
) -> IndicatorFeedUpdateResponse:
"""
Update indicator feed data

Expand Down Expand Up @@ -151,7 +151,7 @@ def update(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(Type[IntelUpdateFeed], ResultWrapper[IntelUpdateFeed]),
cast_to=cast(Type[IndicatorFeedUpdateResponse], ResultWrapper[IndicatorFeedUpdateResponse]),
)

def list(
Expand Down Expand Up @@ -243,7 +243,7 @@ def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> IntelIndicatorFeedMetadata:
) -> IndicatorFeedGetResponse:
"""
Get indicator feed metadata

Expand Down Expand Up @@ -271,7 +271,7 @@ def get(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(Type[IntelIndicatorFeedMetadata], ResultWrapper[IntelIndicatorFeedMetadata]),
cast_to=cast(Type[IndicatorFeedGetResponse], ResultWrapper[IndicatorFeedGetResponse]),
)


Expand Down Expand Up @@ -300,7 +300,7 @@ async def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> IntelIndicatorFeedItem:
) -> IndicatorFeedCreateResponse:
"""
Create new indicator feed

Expand Down Expand Up @@ -337,7 +337,7 @@ async def create(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(Type[IntelIndicatorFeedItem], ResultWrapper[IntelIndicatorFeedItem]),
cast_to=cast(Type[IndicatorFeedCreateResponse], ResultWrapper[IndicatorFeedCreateResponse]),
)

async def update(
Expand All @@ -352,7 +352,7 @@ async def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> IntelUpdateFeed:
) -> IndicatorFeedUpdateResponse:
"""
Update indicator feed data

Expand Down Expand Up @@ -385,7 +385,7 @@ async def update(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(Type[IntelUpdateFeed], ResultWrapper[IntelUpdateFeed]),
cast_to=cast(Type[IndicatorFeedUpdateResponse], ResultWrapper[IndicatorFeedUpdateResponse]),
)

async def list(
Expand Down Expand Up @@ -477,7 +477,7 @@ async def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> IntelIndicatorFeedMetadata:
) -> IndicatorFeedGetResponse:
"""
Get indicator feed metadata

Expand Down Expand Up @@ -505,7 +505,7 @@ async def get(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(Type[IntelIndicatorFeedMetadata], ResultWrapper[IntelIndicatorFeedMetadata]),
cast_to=cast(Type[IndicatorFeedGetResponse], ResultWrapper[IndicatorFeedGetResponse]),
)


Expand Down
19 changes: 10 additions & 9 deletions src/cloudflare/resources/intel/indicator_feeds/permissions.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@
make_request_options,
)
from ....types.intel.indicator_feeds import (
IntelPermissionsUpdate,
PermissionListResponse,
PermissionCreateResponse,
PermissionDeleteResponse,
permission_create_params,
permission_delete_params,
)
Expand Down Expand Up @@ -54,7 +55,7 @@ def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> IntelPermissionsUpdate:
) -> PermissionCreateResponse:
"""
Grant permission to indicator feed

Expand Down Expand Up @@ -91,7 +92,7 @@ def create(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(Type[IntelPermissionsUpdate], ResultWrapper[IntelPermissionsUpdate]),
cast_to=cast(Type[PermissionCreateResponse], ResultWrapper[PermissionCreateResponse]),
)

def list(
Expand Down Expand Up @@ -145,7 +146,7 @@ def delete(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> IntelPermissionsUpdate:
) -> PermissionDeleteResponse:
"""
Revoke permission to indicator feed

Expand Down Expand Up @@ -182,7 +183,7 @@ def delete(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(Type[IntelPermissionsUpdate], ResultWrapper[IntelPermissionsUpdate]),
cast_to=cast(Type[PermissionDeleteResponse], ResultWrapper[PermissionDeleteResponse]),
)


Expand All @@ -207,7 +208,7 @@ async def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> IntelPermissionsUpdate:
) -> PermissionCreateResponse:
"""
Grant permission to indicator feed

Expand Down Expand Up @@ -244,7 +245,7 @@ async def create(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(Type[IntelPermissionsUpdate], ResultWrapper[IntelPermissionsUpdate]),
cast_to=cast(Type[PermissionCreateResponse], ResultWrapper[PermissionCreateResponse]),
)

async def list(
Expand Down Expand Up @@ -298,7 +299,7 @@ async def delete(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> IntelPermissionsUpdate:
) -> PermissionDeleteResponse:
"""
Revoke permission to indicator feed

Expand Down Expand Up @@ -335,7 +336,7 @@ async def delete(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(Type[IntelPermissionsUpdate], ResultWrapper[IntelPermissionsUpdate]),
cast_to=cast(Type[PermissionDeleteResponse], ResultWrapper[PermissionDeleteResponse]),
)


Expand Down
6 changes: 3 additions & 3 deletions src/cloudflare/types/intel/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,19 @@
from .intel_schemas_ip import IntelSchemasIP as IntelSchemasIP
from .whois_get_params import WhoisGetParams as WhoisGetParams
from .domain_get_params import DomainGetParams as DomainGetParams
from .intel_update_feed import IntelUpdateFeed as IntelUpdateFeed
from .intel_domain_history import IntelDomainHistory as IntelDomainHistory
from .ip_list_get_response import IPListGetResponse as IPListGetResponse
from .sinkhole_list_response import SinkholeListResponse as SinkholeListResponse
from .intel_passive_dns_by_ip import IntelPassiveDNSByIP as IntelPassiveDNSByIP
from .domain_history_get_params import DomainHistoryGetParams as DomainHistoryGetParams
from .intel_indicator_feed_item import IntelIndicatorFeedItem as IntelIndicatorFeedItem
from .domain_history_get_response import DomainHistoryGetResponse as DomainHistoryGetResponse
from .indicator_feed_get_response import IndicatorFeedGetResponse as IndicatorFeedGetResponse
from .indicator_feed_create_params import IndicatorFeedCreateParams as IndicatorFeedCreateParams
from .indicator_feed_data_response import IndicatorFeedDataResponse as IndicatorFeedDataResponse
from .indicator_feed_list_response import IndicatorFeedListResponse as IndicatorFeedListResponse
from .indicator_feed_update_params import IndicatorFeedUpdateParams as IndicatorFeedUpdateParams
from .intel_indicator_feed_metadata import IntelIndicatorFeedMetadata as IntelIndicatorFeedMetadata
from .intel_sinkholes_sinkhole_item import IntelSinkholesSinkholeItem as IntelSinkholesSinkholeItem
from .indicator_feed_create_response import IndicatorFeedCreateResponse as IndicatorFeedCreateResponse
from .indicator_feed_update_response import IndicatorFeedUpdateResponse as IndicatorFeedUpdateResponse
from .miscategorization_create_params import MiscategorizationCreateParams as MiscategorizationCreateParams
from .miscategorization_create_response import MiscategorizationCreateResponse as MiscategorizationCreateResponse
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@

from ..._models import BaseModel

__all__ = ["IntelIndicatorFeedItem"]
__all__ = ["IndicatorFeedCreateResponse"]


class IntelIndicatorFeedItem(BaseModel):
class IndicatorFeedCreateResponse(BaseModel):
id: Optional[int] = None
"""The unique identifier for the indicator feed"""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@

from ..._models import BaseModel

__all__ = ["IntelIndicatorFeedMetadata"]
__all__ = ["IndicatorFeedGetResponse"]


class IntelIndicatorFeedMetadata(BaseModel):
class IndicatorFeedGetResponse(BaseModel):
id: Optional[int] = None
"""The unique identifier for the indicator feed"""

Expand Down
27 changes: 23 additions & 4 deletions src/cloudflare/types/intel/indicator_feed_list_response.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,28 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing import List
from typing import List, Optional
from datetime import datetime

from .intel_indicator_feed_item import IntelIndicatorFeedItem
from ..._models import BaseModel

__all__ = ["IndicatorFeedListResponse"]
__all__ = ["IndicatorFeedListResponse", "IndicatorFeedListResponseItem"]

IndicatorFeedListResponse = List[IntelIndicatorFeedItem]

class IndicatorFeedListResponseItem(BaseModel):
id: Optional[int] = None
"""The unique identifier for the indicator feed"""

created_on: Optional[datetime] = None
"""The date and time when the data entry was created"""

description: Optional[str] = None
"""The description of the example test"""

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

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


IndicatorFeedListResponse = List[IndicatorFeedListResponseItem]
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

from ..._models import BaseModel

__all__ = ["IntelUpdateFeed"]
__all__ = ["IndicatorFeedUpdateResponse"]


class IntelUpdateFeed(BaseModel):
class IndicatorFeedUpdateResponse(BaseModel):
file_id: Optional[int] = None
"""Feed id"""

Expand Down
4 changes: 2 additions & 2 deletions src/cloudflare/types/intel/indicator_feeds/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

from __future__ import annotations

from .intel_permissions_update import IntelPermissionsUpdate as IntelPermissionsUpdate
from .permission_create_params import PermissionCreateParams as PermissionCreateParams
from .permission_delete_params import PermissionDeleteParams as PermissionDeleteParams
from .permission_list_response import PermissionListResponse as PermissionListResponse
from .intel_permission_list_item import IntelPermissionListItem as IntelPermissionListItem
from .permission_create_response import PermissionCreateResponse as PermissionCreateResponse
from .permission_delete_response import PermissionDeleteResponse as PermissionDeleteResponse

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

from ...._models import BaseModel

__all__ = ["IntelPermissionsUpdate"]
__all__ = ["PermissionCreateResponse"]


class IntelPermissionsUpdate(BaseModel):
class PermissionCreateResponse(BaseModel):
success: Optional[bool] = None
"""Whether the update succeeded or not"""
Loading